/* ==========================================================================
   Tori — Naija stories, out loud.
   Data-light by design: no external fonts, no images, system stacks only.
   Palette: golden-age paperback — deep coffee, warm cream, amber, palm green.
   ========================================================================== */

:root {
  /* GREEN - WHITE - GREEN. The mark was Nigerian and the rest of the page was
     a 1980s paperback in amber, which is two brands arguing. The flag wins:
     Nigeria green carries the accent, white carries the type, and the deep
     green-black is the night version of the same idea. */
  --ink:        #08150f;   /* green-black: the page at night */
  --ink-soft:   #0f2419;   /* raised surfaces - cards, nav, player */
  --paper:      #f2f7f3;   /* white, warmed a touch so it is not clinical */
  --paper-dim:  #b4c8bb;
  --accent:     #16a35d;   /* Nigeria green, lifted for a dark ground */
  --accent-deep: #0b7a43;
  --green:      #16a35d;   /* the logo bars: same green, one source */
  --muted:      #8aa392;
  --line:       rgba(22, 163, 93, 0.24);
  --veil:       rgba(8, 21, 15, 0.93);   /* sticky header / player over content */

  /* Text that sits ON the green accent. White in BOTH themes, which is why it
     is a separate token rather than --paper: the light theme flips --paper to
     near-black, and every "color: var(--paper)" on a green button would have
     gone black-on-green. White on #00754a and on #16a35d both clear WCAG AA. */
  --on-accent: #ffffff;

  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 14px;
  --container: 1100px;
}

/* ==========================================================================
   Light mode.
   ==========================================================================
   Dark is the brand default — a paperback read at night is the product's own
   image of itself. Light exists because plenty of people read on a bright
   phone in Lagos daylight, and because an investor opening the deck on a white
   laptop should not be handed a black page.

   Only the TOKENS are redefined, never a component: a colour whose sole
   definition lives inside a media query is the classic bug where half the page
   renders in one theme and half in the other.

   Three states, not two. An explicit choice stamps data-theme on <html>; the
   default "system" setting stamps nothing, and only prefers-color-scheme
   separates the two. So the media query is guarded with
   :not([data-theme="dark"]) — otherwise a light OS would beat a deliberate
   choice of dark, which is exactly backwards.
   -------------------------------------------------------------------------- */
:root[data-theme="light"],
:root:not([data-theme="dark"]) {
  /* placeholder so the selector list is never empty; real values below */
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ink:        #ffffff;   /* the white band of the flag, as the page */
    --ink-soft:   #eef5f0;
    --paper:      #0c1f16;   /* near-black green for body text */
    --paper-dim:  #47614f;
    --accent:     #00754a;   /* darker: #16a35d on white fails contrast */
    --accent-deep: #005636;
    --green:      #00754a;
    --muted:      #6b8574;
    --line:       rgba(12, 31, 22, 0.14);
    --veil:       rgba(255, 255, 255, 0.94);
  }
}

:root[data-theme="light"] {
  --ink:        #ffffff;
  --ink-soft:   #eef5f0;
  --paper:      #0c1f16;
  --paper-dim:  #47614f;
  --accent:     #00754a;
  --accent-deep: #005636;
  --green:      #00754a;
  --muted:      #6b8574;
  --line:       rgba(12, 31, 22, 0.14);
  --veil:       rgba(255, 255, 255, 0.94);
}

/* The mini-player used to need a per-theme override. It does not any more:
   --veil is defined in every palette, so the sticky surfaces follow the theme
   from one token instead of three rules that could drift apart. */

/* The toggle itself. */
.theme-toggle {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--paper);
  cursor: pointer; font-size: 1rem; line-height: 1;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* One glyph per theme; the other is hidden. */
.theme-toggle .t-sun { display: none; }
:root[data-theme="light"] .theme-toggle .t-sun { display: block; }
:root[data-theme="light"] .theme-toggle .t-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .t-sun { display: block; }
  :root:not([data-theme="dark"]) .theme-toggle .t-moon { display: none; }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--sans);
  background: var(--ink);
  color: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 760px; }
.center { text-align: center; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ---------- Typography ---------- */

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; }

h1 { font-size: clamp(2.6rem, 8vw, 4.4rem); letter-spacing: -0.01em; }
h1 em { font-style: italic; color: var(--accent); }

h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin-bottom: 1.2rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }

.kicker {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.lede { font-size: 1.15rem; color: var(--paper-dim); }

a { color: var(--accent); }
a:hover { color: var(--paper); }

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--veil);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.8rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex; align-items: center; gap: 0.5rem;
  text-decoration: none;
}
/* The mark is a sound-level meter in Nigeria's green–white–green, read left to
   right. Two green bars, a tall centre bar, two green bars: the flag's three
   bands, drawn as a waveform.
   The centre bar takes currentColor rather than a literal white, because white
   disappears on the cream background of the light theme — so it is cream on the
   dark page and coffee on the light one, and the flag's structure survives in
   both. The width and height attributes are on the <svg> itself as well as in
   CSS: an inline SVG with neither has no intrinsic size, and if the stylesheet
   is slow or blocked the logo renders as nothing at all. */
.brand-mark { width: 28px; height: 28px; color: var(--paper); }
.brand-mark .bm-g { fill: var(--green); }
.brand-mark .bm-c { fill: currentColor; }
.brand-name {
  font-family: var(--serif); font-weight: 700; font-size: 1.5rem;
  color: var(--paper); letter-spacing: 0.01em;
}

.nav-links {
  display: flex; align-items: center; gap: 1.4rem;
  list-style: none;
}
.nav-links a {
  color: var(--paper-dim); text-decoration: none;
  font-size: 0.92rem; font-weight: 500;
}
.nav-links a:hover { color: var(--accent); }

.nav-cta {
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  color: var(--accent) !important;
}
.nav-cta:hover { background: var(--accent); color: var(--on-accent) !important; }

.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--paper); border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start;
    gap: 0;
    background: var(--ink-soft);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block; padding: 0.9rem 1.25rem; font-size: 1rem;
  }
  .nav-cta { border: none; border-radius: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5rem);
  background:
    radial-gradient(ellipse 80% 60% at 75% 10%, rgba(240,161,46,0.14), transparent 60%),
    radial-gradient(ellipse 60% 50% at 10% 90%, rgba(63,125,78,0.12), transparent 60%);
}

.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem; align-items: center;
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

.hero-copy .lede { max-width: 34rem; margin-top: 1.2rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }

.hero-note {
  margin-top: 1rem; font-size: 0.85rem; color: var(--muted);
  letter-spacing: 0.03em;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 700; font-size: 0.95rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  font-family: var(--sans);
}
.btn-primary {
  background: var(--accent); color: var(--on-accent);
}
.btn-primary:hover { background: var(--paper); color: var(--on-accent); }
.btn-ghost {
  border-color: var(--line); color: var(--paper);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Hero player mock */

.hero-player { position: relative; }

.player-card {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  display: flex; gap: 1rem; align-items: stretch;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  max-width: 420px; margin: 0 auto;
}

.player-cover {
  flex: 0 0 108px;
  border-radius: 10px;
  background: linear-gradient(160deg, var(--accent) 0%, var(--accent-deep) 55%, #7d4a0a 100%);
  color: var(--on-accent);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0.6rem;
  min-height: 148px;
}
.player-cover-series {
  font-size: 0.55rem; font-weight: 800; letter-spacing: 0.22em;
  margin-bottom: auto;
}
.player-cover-title {
  font-family: var(--serif); font-weight: 700; font-size: 1rem; line-height: 1.15;
}
.player-cover-author { font-size: 0.65rem; margin-top: 0.25rem; }

.player-meta {
  flex: 1; display: flex; flex-direction: column; justify-content: space-between;
  min-width: 0;
}
.player-ep { font-size: 0.75rem; color: var(--muted); }

.waveform {
  display: flex; align-items: center; gap: 3px;
  height: 44px; margin: 0.6rem 0;
}
.waveform span {
  flex: 1; background: var(--accent); border-radius: 2px;
  height: 30%;
  animation: wave 1.4s ease-in-out infinite;
}
.waveform span:nth-child(3n)   { animation-delay: 0.15s; height: 65%; }
.waveform span:nth-child(3n+1) { animation-delay: 0.3s;  height: 45%; }
.waveform span:nth-child(4n)   { animation-delay: 0.45s; height: 85%; }
.waveform span:nth-child(5n)   { animation-delay: 0.6s;  height: 55%; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.55); opacity: 0.7; }
  50%      { transform: scaleY(1);    opacity: 1; }
}

.player-controls {
  display: flex; align-items: center; gap: 1rem;
}
.pc-btn {
  color: var(--paper-dim); font-size: 0.9rem;
}
.pc-play {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
}

.player-chip {
  position: absolute;
  background: var(--green); color: var(--paper);
  font-size: 0.72rem; font-weight: 700;
  padding: 0.35rem 0.75rem; border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.4);
  white-space: nowrap;
}
.chip-1 { top: -14px; right: 4%; background: var(--accent); color: var(--on-accent); }
.chip-2 { bottom: -14px; left: 6%; }

@media (max-width: 420px) {
  .player-card { flex-direction: column; }
  .player-cover { flex-basis: auto; min-height: 110px; }
}

/* ---------- Stats strip ---------- */

.stats-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--ink-soft);
  padding: 2rem 0;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
}
@media (max-width: 820px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

.stat-num {
  display: block;
  font-family: var(--serif); font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 700; color: var(--accent);
}
.stat-label { font-size: 0.85rem; color: var(--muted); }

/* ---------- Sections ---------- */

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--ink-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.pullquote {
  margin: 2rem 0 0;
  padding: 1.4rem 1.6rem;
  border-left: 4px solid var(--accent);
  background: rgba(240,161,46,0.07);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--serif); font-style: italic;
  font-size: 1.25rem; color: var(--paper);
}

/* Pillars */

.pillars {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
  margin-top: 2rem;
}
@media (max-width: 820px) { .pillars { grid-template-columns: 1fr; } }

.pillar {
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.pillar-tag {
  display: inline-block;
  font-size: 0.7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--green);
  border: 1px solid rgba(63,125,78,0.5);
  padding: 0.2rem 0.6rem; border-radius: 999px;
  margin-bottom: 0.9rem;
}
.pillar h3 { color: var(--accent); font-size: 1.35rem; }
.pillar p { color: var(--paper-dim); font-size: 0.95rem; margin: 0; }

/* Features */

.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
  margin-top: 2rem;
}
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

.feature {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.feature-icon { font-size: 1.6rem; margin-bottom: 0.6rem; }
.feature h3 { font-family: var(--sans); font-size: 1.02rem; color: var(--paper); }
.feature p { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* Pricing */

.tiers {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  margin-top: 2rem;
}
@media (max-width: 680px)  { .tiers { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px)  { .tiers { grid-template-columns: 1fr; } }

.tiers-note {
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 44rem;
}

.tier {
  position: relative;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.2rem;
  display: flex; flex-direction: column;
}
.tier-featured { border-color: var(--accent); box-shadow: 0 12px 40px rgba(240,161,46,0.12); }
.tier-flag {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--on-accent);
  font-size: 0.68rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.7rem; border-radius: 999px;
  white-space: nowrap;
}
.tier h3 { font-family: var(--sans); font-size: 1rem; color: var(--paper-dim); }
.tier-price {
  font-family: var(--serif); font-size: 1.5rem; font-weight: 700;
  color: var(--accent); margin: 0.4rem 0 0.9rem;
}
.tier-price span { font-size: 0.85rem; color: var(--muted); font-family: var(--sans); font-weight: 400; }
.tier ul { list-style: none; }
.tier li {
  font-size: 0.85rem; color: var(--muted);
  padding: 0.3rem 0 0.3rem 1.2rem;
  position: relative;
}
.tier li::before {
  content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700;
}

/* Split (partners) */

.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem;
  margin-top: 2rem;
}
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

.checklist { list-style: none; margin-bottom: 1rem; }
.checklist li {
  padding: 0.45rem 0 0.45rem 1.6rem; position: relative;
  color: var(--paper-dim); font-size: 0.97rem;
}
.checklist li::before {
  content: "◆"; position: absolute; left: 0; top: 0.5rem;
  color: var(--accent); font-size: 0.7rem;
}

/* Timeline */

.timeline {
  list-style: none; margin-top: 2rem;
  border-left: 2px solid var(--line);
  padding-left: 1.8rem;
}
.timeline li { position: relative; padding-bottom: 2rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: calc(-1.8rem - 7px); top: 0.35rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(240,161,46,0.18);
}
.timeline h3 { color: var(--accent); font-size: 1.15rem; }
.timeline p { color: var(--paper-dim); font-size: 0.97rem; margin: 0; }

/* Waitlist */

.waitlist {
  background:
    radial-gradient(ellipse 70% 80% at 50% 100%, rgba(240,161,46,0.13), transparent 65%);
}

.waitlist-form {
  display: flex; gap: 0.7rem; justify-content: center;
  margin-top: 1.6rem; flex-wrap: wrap;
}
.waitlist-form input {
  flex: 1 1 260px; max-width: 340px;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--ink-soft);
  color: var(--paper);
  font-size: 0.95rem;
  font-family: var(--sans);
}
.waitlist-form input:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent;
}
.waitlist-form input::placeholder { color: var(--muted); }

/* ---------- Listen: story cards ---------- */

.story-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
  margin-top: 2rem;
}
@media (max-width: 900px) { .story-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .story-grid { grid-template-columns: 1fr; } }

.story-card {
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
}

.story-cover {
  position: relative;
  min-height: 168px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0.9rem;
}
.story-series {
  position: absolute; top: 0.8rem; left: 0.9rem;
  font-size: 0.55rem; font-weight: 800; letter-spacing: 0.22em;
  color: rgba(248,240,225,0.85);
}
.story-cover-title {
  font-family: var(--serif); font-weight: 700;
  font-size: 1.25rem; line-height: 1.15;
  color: var(--paper);
  max-width: 75%;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.story-play {
  position: absolute; right: 0.9rem; bottom: 0.9rem;
  width: 48px; height: 48px; border-radius: 50%;
  border: none; cursor: pointer;
  background: var(--accent); color: var(--on-accent);
  font-size: 1.05rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,0.45);
  transition: transform 0.15s ease;
}
.story-play:hover { transform: scale(1.08); }
/* Scoped to the cover button only. Chapter rows share the playback hook but
   must never pick up circular, filled cover styling — that turned them into
   white ellipses mid-playback. */
.story-card.playing .story-play-main { background: var(--paper); }

/* Paperback-cover gradients, one per story */

/* The season cover runs dark, so its type flips to paper rather than ink. */
.cover-rate { background: linear-gradient(150deg, #2b87a6 0%, #14384d 48%, #3a1c12 100%); }
.player-cover.cover-rate,
.player-cover.cover-rate .player-cover-series,
.player-cover.cover-rate .player-cover-title,
.player-cover.cover-rate .player-cover-author { color: var(--paper); }
.player-cover.cover-rate .player-cover-title { text-shadow: 0 2px 14px rgba(0,0,0,0.45); }
.player-cover.cover-rate .player-cover-author { color: var(--paper-dim); }
.cover-danfo  { background: linear-gradient(155deg, #e8a33d 0%, #9a5c10 55%, #4a2a06 100%); }
.cover-lekki  { background: linear-gradient(155deg, #c25e4c 0%, #8c3446 55%, #40141f 100%); }
.cover-ghost  { background: linear-gradient(155deg, #3e6273 0%, #24404d 55%, #0c1a21 100%); }
.cover-market { background: linear-gradient(155deg, #56995f 0%, #2f5e3c 55%, #12301c 100%); }
.cover-abuja  { background: linear-gradient(155deg, #8a5286 0%, #5a2f57 55%, #241026 100%); }
.cover-campus { background: linear-gradient(155deg, #a83b32 0%, #6e211c 55%, #2c0b09 100%); }

.story-meta { padding: 1rem 1.1rem 1.2rem; }
.story-meta h3 { font-family: var(--sans); font-size: 1rem; color: var(--paper); margin-bottom: 0.15rem; }
.story-author { color: var(--muted); font-size: 0.8rem; margin-bottom: 0.6rem; }
.story-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }
.chip {
  font-size: 0.68rem; font-weight: 700;
  color: var(--paper-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}
.chip-time { color: var(--accent); border-color: rgba(240,161,46,0.4); }
.story-blurb { color: var(--muted); font-size: 0.86rem; margin: 0; }

/* ---------- Sticky mini-player ---------- */

/* [hidden] must beat the display:flex below, or an empty player (and its
   full-width seek bar) paints across the bottom of the page on load. */
.mini-player[hidden] { display: none; }

.mini-player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.7rem 1.1rem;
  background: var(--veil);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}
.mp-toggle {
  flex: 0 0 auto;
  width: 42px; height: 42px; border-radius: 50%;
  border: none; cursor: pointer;
  background: var(--accent); color: var(--on-accent);
  font-size: 0.95rem; font-weight: 700;
}
/* Title first: the chapter name is what a listener needs to read, so it gets
   the room and the scrubber takes whatever is left. */
.mp-info { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.mp-title {
  font-weight: 700; font-size: 0.9rem; color: var(--paper);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mp-author { font-size: 0.75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-seek {
  flex: 0 1 260px; accent-color: var(--accent); min-width: 80px; cursor: pointer;
}
@media (max-width: 640px) { .mp-seek { flex-basis: 100px; } }
.mp-time { font-size: 0.8rem; color: var(--paper-dim); font-variant-numeric: tabular-nums; }

body.has-player { padding-bottom: 70px; }

/* Hero pitch card — what Tori is, not a story */
.pitch-card .player-cover { min-height: 150px; }
.pitch-list { list-style: none; margin: 0.2rem 0 1rem; }
.pitch-list li {
  position: relative; padding: 0.4rem 0 0.4rem 1.1rem;
  color: var(--paper-dim); font-size: 0.86rem; line-height: 1.5;
}
.pitch-list li::before {
  content: "▸"; position: absolute; left: 0; color: var(--accent); font-size: 0.75rem;
}
.pitch-list strong { color: var(--paper); }
.pitch-cta { align-self: flex-start; padding: 0.55rem 1.2rem; font-size: 0.88rem; }

/* Collapsible chapter list keeps every card the same height until opened */
.ch-toggle {
  width: 100%; margin-top: 0.9rem;
  display: flex; align-items: center; justify-content: space-between;
  background: none; border: none; border-top: 1px solid var(--line);
  padding: 0.7rem 0.2rem 0.2rem;
  color: var(--accent); cursor: pointer;
  font-family: var(--sans); font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.04em;
}
.ch-toggle:hover { color: var(--paper); }
.ch-caret { transition: transform 0.2s ease; }
.ch-toggle.is-open .ch-caret { transform: rotate(180deg); }
.ch-list[hidden] { display: none; }
.ch-list { border-top: none; }

/* ---------- Free registration gate ---------- */

.reg-overlay[hidden] { display: none; }
.reg-overlay {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
  background: rgba(12, 7, 3, 0.82);
  backdrop-filter: blur(6px);
  animation: reg-fade 0.2s ease;
}
@keyframes reg-fade { from { opacity: 0; } to { opacity: 1; } }

.reg-modal {
  position: relative;
  width: 100%; max-width: 460px;
  background: var(--ink-soft);
  border: 1px solid rgba(240,161,46,0.4);
  border-radius: var(--radius);
  padding: 2rem 1.8rem 1.6rem;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.reg-modal h2 { font-size: clamp(1.5rem, 4vw, 1.9rem); margin-bottom: 0.6rem; }
.reg-sub { color: var(--paper-dim); font-size: 0.95rem; }

.reg-close {
  position: absolute; top: 0.6rem; right: 0.8rem;
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 1.6rem; line-height: 1;
  padding: 0.2rem 0.4rem;
}
.reg-close:hover { color: var(--accent); }

.reg-form { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.reg-form input {
  flex: 1 1 200px;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.95rem; font-family: var(--sans);
}
.reg-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.reg-form input::placeholder { color: var(--muted); }
.reg-error { flex-basis: 100%; margin: 0; color: #e08c8c; font-size: 0.82rem; }
.reg-fine { margin: 0.9rem 0 0; color: var(--muted); font-size: 0.78rem; }

/* ---------- Catalogue & rights tracker ---------- */

.cat-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.2rem; }
.cat-filter {
  background: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--paper-dim); font-family: var(--sans);
  font-size: 0.82rem; font-weight: 600; padding: 0.35rem 0.9rem;
}
.cat-filter:hover { color: var(--accent); border-color: var(--accent); }
.cat-filter.is-active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

.cat-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.cat-table { width: 100%; border-collapse: collapse; min-width: 680px; table-layout: fixed; }
.cat-table th:nth-child(1), .cat-table td:nth-child(1) { width: 26%; }
.cat-table th:nth-child(2), .cat-table td:nth-child(2) { width: 15%; }
.cat-table th:nth-child(3), .cat-table td:nth-child(3) { width: 7%; }
.cat-table th:nth-child(4), .cat-table td:nth-child(4) { width: 26%; }
.cat-table th:nth-child(5), .cat-table td:nth-child(5) { width: 14%; }
.cat-table th:nth-child(6), .cat-table td:nth-child(6) { width: 12%; }
.cat-table td { overflow-wrap: anywhere; }
.cat-table th, .cat-table td {
  text-align: left; padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(240,161,46,0.12);
  font-size: 0.88rem; vertical-align: top;
}
.cat-table th {
  background: var(--ink-soft); color: var(--accent);
  font-family: var(--sans); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.12em;
  position: sticky; top: 0;
}
.cat-table tbody tr:last-child td { border-bottom: none; }
.cat-table tbody tr:hover { background: rgba(240,161,46,0.05); }
.cat-table td { color: var(--paper-dim); }
.cat-note { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 0.3rem; max-width: 32ch; }

.pill {
  display: inline-block; white-space: nowrap;
  font-size: 0.7rem; font-weight: 700; text-transform: capitalize;
  padding: 0.2rem 0.6rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--paper-dim);
}
.pill-not-contacted { color: var(--muted); }
.pill-contacted     { color: #7fb3d5; border-color: rgba(127,179,213,0.45); }
.pill-negotiating   { color: var(--accent); border-color: rgba(240,161,46,0.5); }
.pill-licensed      { color: var(--paper); background: var(--green); border-color: var(--green); }
.pill-declined      { color: #c98a8a; border-color: rgba(201,138,138,0.45); }
.pill-audio-published { color: var(--paper); background: var(--green); border-color: var(--green); }
.pill-audio-recorded  { color: var(--accent); border-color: rgba(240,161,46,0.5); }

.cat-gap-note {
  margin-top: 1.2rem; padding: 1rem 1.2rem;
  border-left: 3px solid var(--accent);
  background: rgba(240,161,46,0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--paper-dim); font-size: 0.9rem; max-width: 60ch;
}
.cat-gap-note code { color: var(--accent); font-size: 0.85em; }

/* Reveal on scroll */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
  background: var(--ink-soft);
}
.footer-grid {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 2rem; align-items: start;
}
@media (max-width: 680px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-tag { color: var(--muted); font-size: 0.85rem; margin-top: 0.4rem; }

.footer-links {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 1.2rem;
}
.footer-links a { color: var(--paper-dim); text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent); }

.footer-legal { color: var(--muted); font-size: 0.8rem; text-align: right; }
@media (max-width: 680px) { .footer-legal { text-align: left; } }

/* ---------- Chapter lists on story cards ---------- */

.ch-list { list-style: none; margin-top: 0.9rem; border-top: 1px solid var(--line); }
.ch-btn {
  /* Chapter rows share the .story-play class for the click handler, so they
     must opt out of that rule's absolute positioning and stay in flow. */
  position: static; box-shadow: none;
  width: 100%; display: flex; align-items: center; gap: 0.7rem;
  padding: 0.6rem 0.2rem;
  background: none; border: none; border-bottom: 1px solid var(--line);
  color: var(--paper-dim); font-family: var(--sans); font-size: 0.85rem;
  cursor: pointer; text-align: left;
}
.ch-btn:hover { color: var(--accent); }
.ch-num {
  flex: 0 0 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700;
}
.ch-btn.is-playing .ch-num { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
/* The Nigerian cast: the version that should actually ship. */
.ch-btn.is-ng .ch-num { border-color: var(--green); color: var(--paper); background: var(--green); }
.ch-btn.is-ng .ch-name em { color: var(--green); font-style: normal; font-weight: 700; }
.ch-btn.is-ng .ch-num sup { font-size: 0.6em; }

/* The ElevenLabs cut: nine real voices, the reference version. */
.ch-btn.is-11l .ch-num { border-color: var(--accent); color: var(--accent); background: rgba(240,161,46,0.12); }
.ch-btn.is-11l .ch-name em { color: var(--accent); font-style: normal; font-weight: 700; }
.ch-btn.is-11l .ch-num sup { font-size: 0.6em; }

/* The drama cut, sitting beside its narrated twin for comparison. */
.ch-btn.is-drama .ch-num { border-color: var(--green); color: var(--green); }
.ch-btn.is-drama .ch-name em { color: var(--green); font-style: normal; font-weight: 700; }
.ch-btn.is-drama .ch-num sup { font-size: 0.6em; }

/* Playing chapter: highlighted, still fully legible. */
.ch-btn.is-playing { color: var(--accent); background: rgba(240,161,46,0.08); }
.ch-btn.is-playing .ch-dur { color: var(--accent); }
.ch-name { flex: 1; }
.ch-dur { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.78rem; }

.story-play-main {
  position: absolute; right: 0.9rem; bottom: 0.9rem;
  width: 48px; height: 48px; border-radius: 50%;
  border: none; cursor: pointer;
  background: var(--accent); color: var(--on-accent);
  font-size: 1.05rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,0.45);
}
.story-play-main:hover { transform: scale(1.08); }

.pc-play { border: none; cursor: pointer; }
.pc-hint { font-size: 0.75rem; color: var(--muted); }

#waitlist-result {
  margin-top: 1rem; color: var(--accent); font-weight: 700;
}

/* ---------- Player: skip controls, loading and failure ------------------- */
/* .mp-skip previously had NO rules at all — it rendered as a default browser
   button with a glyph and a <sub>, which is why it looked wrong on the dark
   bar. The number lives inside the SVG so it scales with the icon instead of
   being a separately-sized subscript. */
.mp-skip {
  flex: 0 0 auto;
  width: 38px; height: 38px; padding: 0;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid rgba(245, 240, 232, 0.22);
  border-radius: 50%;
  color: var(--paper);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.08s ease;
  -webkit-tap-highlight-color: transparent;
}
.mp-skip svg { width: 22px; height: 22px; display: block; }
.mp-skip svg text {
  font-size: 7.5px; font-weight: 700; fill: currentColor;
  font-family: inherit; letter-spacing: -0.02em;
}
.mp-skip:hover { border-color: var(--accent); color: var(--accent); background: rgba(240, 161, 46, 0.10); }
.mp-skip:active { transform: scale(0.92); }
.mp-skip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Held down: the button is repeating, so it should look like it is. */
.mp-skip.is-holding {
  border-color: var(--accent); color: var(--accent);
  background: rgba(240, 161, 46, 0.18);
}

/* Play / pause, with a spinner underneath for the buffering state. */
.mp-toggle { position: relative; display: grid; place-items: center; }
.mp-icon { line-height: 1; }
.mp-spinner {
  position: absolute; inset: 0; margin: auto;
  width: 20px; height: 20px;
  border: 2px solid rgba(42, 28, 14, 0.25);
  border-top-color: var(--on-accent);
  border-radius: 50%;
  display: none;
}
/* Buffering: hide the glyph, show the spinner. Without this the button showed
   a pause icon while nothing was playing — it claimed to be doing something it
   was not, which is the one thing a transport control must never do. */
.mini-player.is-loading .mp-icon { visibility: hidden; }
.mini-player.is-loading .mp-spinner { display: block; animation: mp-spin 0.7s linear infinite; }
@keyframes mp-spin { to { transform: rotate(360deg); } }

/* Playback failed. Says what happened instead of sitting there silently. */
.mini-player.has-error { border-top-color: #c0533f; }
.mini-player.has-error .mp-title { color: #ffb4a2; }

/* Chapter rows and cover buttons get the same treatment, so a click anywhere
   shows the same three states: idle, loading, playing. */
.js-play.is-loading { position: relative; color: transparent !important; }
.js-play.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 14px; height: 14px;
  border: 2px solid rgba(240, 161, 46, 0.30);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: mp-spin 0.7s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .mp-spinner, .js-play.is-loading::after { animation-duration: 2s; }
}
