:root {
  color-scheme: dark;
  font-family: "Plus Jakarta Sans", Roboto, Arial, sans-serif;
  background: #08090b;
  color: #f4f4f5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --muted: #a1a1aa;
  --blue: #60a5fa;
  --blue-strong: #2563eb;
  --danger: #fca5a5;
}

* {
  box-sizing: border-box;
}

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  min-width: 320px;
  margin: 0;
  background: #08090b;
  color: #f4f4f5;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.site-header,
.site-footer {
  width: min(100% - 2rem, 1160px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header {
  min-height: 88px;
}

.brand {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  color: #c4c4cc;
  font-size: 0.875rem;
}

nav a,
.site-footer a,
.text-link {
  text-decoration: none;
}

nav a:hover,
.site-footer a:hover,
.text-link:hover {
  color: var(--blue);
}

.page-shell {
  width: min(100% - 2rem, 1000px);
  flex: 1;
  margin: 0 auto;
  padding: 4rem 0 5rem;
}

.intro {
  max-width: 650px;
  margin: 0 auto 2.25rem;
  text-align: center;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.7rem;
  font-family: Roboto, "Plus Jakarta Sans", Arial, sans-serif;
  font-size: clamp(2.4rem, 7vw, 4rem);
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.brand-title {
  margin-bottom: 0;
  font-size: clamp(1.4rem, 8.7vw, 4rem);
  white-space: nowrap;
}

h2 {
  margin-bottom: 0.5rem;
  font-family: Roboto, "Plus Jakarta Sans", Arial, sans-serif;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.intro > p:last-child,
.muted,
.field-help {
  color: var(--muted);
  line-height: 1.6;
}

.intro > p:last-child {
  max-width: 550px;
  margin-inline: auto;
  margin-bottom: 0;
}

.panel,
.library-panel,
.policy-panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.panel {
  padding: clamp(1rem, 4vw, 2rem) 0;
}

.upload-form {
  display: grid;
  gap: 1.15rem;
}

.upload-steps {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  padding: 0 0 1rem;
  color: var(--muted);
  list-style: none;
}

.upload-steps li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.upload-steps li[aria-current="step"] {
  color: #fff;
}

.upload-steps li span {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border-radius: 50%;
  background: #242832;
  font-size: 0.75rem;
}

.upload-steps li[aria-current="step"] span {
  background: var(--blue-strong);
}

.upload-step {
  display: grid;
  gap: 1rem;
}

.upload-step[hidden] {
  display: none;
}

.upload-step h3 {
  margin: 0;
  font-family: Roboto, "Plus Jakarta Sans", Arial, sans-serif;
  font-size: 1.35rem;
}

.step-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.consent-field {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: #e4e4e7;
  font-size: 1rem;
  line-height: 1.6;
}

.consent-field input {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  margin: 0.15rem 0 0;
  accent-color: var(--blue-strong);
  cursor: pointer;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field > span,
.field label {
  color: #e4e4e7;
  font-size: 1rem;
  font-weight: 650;
}

.field input,
.field select {
  width: 100%;
  min-height: 56px;
  padding: 0.9rem 1rem;
  border: 0;
  border-radius: 12px;
  outline: none;
  background: #181b22;
  color: #fafafa;
  font-size: 1rem;
}

.field input:focus,
.field select:focus {
  background: #222733;
}

.field input[type="file"] {
  padding: 0.5rem;
}

.field input[type="file"]::file-selector-button {
  margin-right: 0.7rem;
  padding: 0.7rem 0.85rem;
  border: 0;
  border-radius: 8px;
  background: #303746;
  color: #f4f4f5;
  cursor: pointer;
}

.field-help {
  margin: 0;
  font-size: 0.76rem;
}

.turnstile-wrap {
  min-height: 66px;
  overflow: hidden;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.35rem;
  border: 0;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 750;
  cursor: pointer;
  transition: background 150ms ease;
}

.primary-button {
  background: var(--blue-strong);
  color: white;
}

.primary-button:hover:not(:disabled) {
  background: #1d4ed8;
}

.secondary-button {
  background: #171a20;
  color: #e4e4e7;
}

.secondary-button:hover {
  background: #343a47;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.notice {
  margin: 0;
  padding: 0;
  color: #bfdbfe;
  font-size: 0.95rem;
  line-height: 1.5;
}

.notice[data-tone="error"] {
  color: var(--danger);
}

.notice[data-tone="success"] {
  color: #86efac;
}

.result-card {
  display: grid;
  gap: 0.8rem;
  padding: 0;
  background: transparent;
}

.result-url {
  overflow-wrap: anywhere;
  color: #86efac;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
}

.result-card audio,
.track audio {
  width: 100%;
  height: 40px;
}

.library-panel {
  margin-top: 1.25rem;
  padding: clamp(1rem, 4vw, 1.5rem) 0;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.track-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.track {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 280px) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  background: transparent;
}

.track__details {
  display: grid;
  min-width: 0;
  gap: 0.25rem;
}

.track__details strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track__details span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-link {
  color: #bfdbfe;
  font-size: 0.95rem;
  font-weight: 650;
  white-space: nowrap;
}

.empty-state {
  padding: 1.25rem 0;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  min-height: 88px;
  color: var(--muted);
  font-size: 0.9rem;
}

.policy-panel {
  display: grid;
  gap: 1.2rem;
  padding: clamp(1.2rem, 4vw, 2rem) 0;
  color: #d4d4d8;
  line-height: 1.7;
}

.policy-panel h2 {
  margin-bottom: 0.35rem;
  color: #fafafa;
}

.policy-panel p,
.policy-panel ul {
  margin-bottom: 0;
}

.policy-panel a {
  color: #bfdbfe;
}

@media (max-width: 700px) {
  .page-shell {
    padding-top: 2.5rem;
  }

  .track {
    grid-template-columns: 1fr;
  }

  .track audio {
    grid-column: auto;
    grid-row: auto;
  }

  .track .text-link {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 500px) {
  .site-header,
  .site-footer {
    width: min(100% - 1.25rem, 1160px);
  }

  nav {
    gap: 0.7rem;
    font-size: 0.78rem;
  }

  .upload-steps li {
    gap: 0.35rem;
    font-size: 0.72rem;
  }

  .primary-button,
  .secondary-button {
    min-height: 58px;
    padding-inline: 1.15rem;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 0.75rem;
    padding-block: 1rem;
    font-size: 0.72rem;
  }

  .site-footer > * {
    min-width: 0;
    flex: 1 1 0;
  }

  .site-footer a {
    overflow-wrap: anywhere;
  }

  .site-footer span {
    text-align: right;
  }
}
