
:root {
  color-scheme: light dark;

  /* Surfaces & Backgrounds */
  --bg: #f7f6fb;
  --surface: #ffffff;
  --surface-2: #efedf6;
  --surface-3: #e3e0ee;

  /* Text & legibility: contrast verified against background and surface */
  --text: #17151f;
  --text-2: #3d3a4a;
  --muted: #5c586a;

  /* Borders */
  --border: #dcd8e8;
  --border-2: #c7c2d9;

  /* Accents */
  --accent: #5b3fc4;
  --accent-2: #4a31a8;
  --accent-dim: #7a63d2;
  --accent-ink: #ffffff;

  /* Status */
  --ok: #17703d;
  --danger: #b3261e;

  /* Spacing Scale (8pt grid basis with 4pt steps) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Shape & Radii */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Typography & Layout */
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text",
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --page: 58rem;
  --measure: 68ch;

  /* Component layout dimensions */
  --dock-h: 13.5rem;

  /* Legacy component aliases (one value, two names, zero drift) */
  --text-muted: var(--muted);
  --surface-sunken: var(--surface-2);
  --accent-text: var(--accent-ink);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0c;
    --surface: #131317;
    --surface-2: #1c1c22;
    --surface-3: #26262e;
    --text: #f4f4f5;
    --text-2: #b4b4bd;
    --muted: #9a9aa4;
    --border: #24242b;
    --border-2: #34343e;
    --accent: #a78bfa;
    --accent-2: #c4b5fd;
    --accent-dim: #6d5bb0;
    --accent-ink: #14121c;
    --ok: #86efac;
    --danger: #fca5a5;
  }
}

/* Explicit dark theme for the web player or dark mode override */
:root[data-theme="dark"], html[data-theme="dark"], [data-theme="dark"], .theme-dark {
  color-scheme: dark;
  --bg: #0a0a0c;
  --surface: #131317;
  --surface-2: #1c1c22;
  --surface-3: #26262e;
  --text: #f4f4f5;
  --text-2: #b4b4bd;
  --muted: #9a9aa4;
  --border: #24242b;
  --border-2: #34343e;
  --accent: #a78bfa;
  --accent-2: #c4b5fd;
  --accent-dim: #6d5bb0;
  --accent-ink: #14121c;
  --ok: #86efac;
  --danger: #fca5a5;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Cross-Document View Transitions (audio-feed-rra) per Modern Web Guidance:
   Enables smooth app-like transitions across same-origin navigations.
   Respects user's reduced-motion preference. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

/*
 * audio-feed-3xq part 4c — the listen landing page's own rules, extracted verbatim from
 * renderListenLanding's inline <style> in src/routes/listen.ts. Served content-addressed with
 * DESIGN_TOKENS composed in front (src/routes/assets.ts), the same contract as listen.css: the
 * landing never used the shell, so its tokens ship in its stylesheet.
 */
* {
  box-sizing: border-box;
}
::selection {
  background: var(--accent);
  color: var(--accent-ink);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: grid;
  place-items: center;
  min-block-size: 100dvb;
  padding: 1.5rem;
  background-image: radial-gradient(90% 50% at 50% 0%, color-mix(in srgb, var(--accent) 11%,
    transparent) 0%, transparent 65%);
}
main {
  max-inline-size: 28rem;
  inline-size: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  box-shadow: 0 24px 60px -30px rgb(0 0 0 / 0.9);
}
.mark {
  inline-size: 2.75rem;
  block-size: 2.75rem;
  display: block;
  margin-block-end: 1.25rem;
}
h1 {
  font-size: 1.4rem;
  font-weight: 660;
  letter-spacing: -0.025em;
  margin: 0 0 0.5rem;
}
p.lede {
  color: var(--text-2);
  font-size: 0.9rem;
  margin: 0 0 1.5rem;
  text-wrap: pretty;
}
label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-block-end: 0.4rem;
}
input {
  inline-size: 100%;
  font: inherit;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  background: var(--bg);
  color: var(--text);
}
input::placeholder {
  color: var(--muted);
}
input:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
button {
  font: inherit;
  font-weight: 600;
  margin-block-start: 0.9rem;
  inline-size: 100%;
  padding: 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
button:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
}
.status {
  margin-block-start: 0.75rem;
  font-size: 0.83rem;
  color: var(--muted);
  min-block-size: 1.2rem;
}
.status[data-tone="error"] {
  color: var(--danger);
}
.hint {
  margin: 1.5rem 0 0;
  padding-block-start: 1.25rem;
  border-block-start: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
  text-wrap: pretty;
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
