/* =========================================================
   edgi landing — Observatory palette
   ========================================================= */


:root {
  --bg: #0A0E1A;
  --surface: #111827;
  --surface-raised: #1E293B;
  --surface-hover: #243049;
  --content: #E8E4D9;
  --content-secondary: #9C9589;
  --content-dim: rgba(232, 228, 217, 0.5);
  --accent: #D4A04A;
  --accent-bright: #E8B84A;
  --accent-deep: #B8862E;
  --interactive: #00C8D6;
  --correct: #5CC97E;
  --incorrect: #D85555;
  --mastery: #7EAE7B;

  --border: rgba(232, 228, 217, 0.08);
  --border-strong: rgba(232, 228, 217, 0.16);

  --f-display: 'Playfair Display', 'Source Serif 4', Georgia, serif;
  --f-body: 'Source Serif 4', Georgia, serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --f-ui: 'DM Sans', system-ui, -apple-system, sans-serif;

  --max: 1180px;
  --pad-x: clamp(20px, 5vw, 48px);

  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  /* Stop iOS rubber-banding — a major source of "page moves up
     and down on its own" jitter when a finger is barely resting
     on the screen. */
  overscroll-behavior: none;
  /* Replace `overflow-x: hidden` on body with `clip` on html — same
     visual effect (no horizontal scroll) but doesn't turn the body
     into a scroll container, which on iOS Safari interacts badly
     with position:sticky and position:fixed children. */
  overflow-x: clip;
}
body {
  background: var(--bg);
  color: var(--content);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Background constellation canvas */
#constellation {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  /* Pin to its own compositor layer so canvas redraws don't
     invalidate the document layout above it. */
  transform: translateZ(0);
  will-change: transform;
}

/* Film grain — a single fixed, near-invisible overlay over the whole
   page. Kills the "flat digital gradient" look; reads as printed
   paper. The faint drift stops it looking like a fixed screen-door
   pattern on big monitors. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
@media (prefers-reduced-motion: no-preference) {
  .grain { animation: grainShift 7s steps(6) infinite; }
}
@keyframes grainShift {
  0%   { background-position: 0 0; }
  100% { background-position: 200px 200px; }
}

/* =========================================================
   Typography utilities
   ========================================================= */

.display {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
}

.display-2 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(32px, 4.5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
}

.hero-accent {
  color: var(--accent);
  font-style: italic;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.eyebrow, .label {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.label { color: var(--content-secondary); margin-bottom: 16px; }

.lede {
  font-family: var(--f-body);
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.5;
  color: var(--content);
  max-width: 620px;
  margin: 20px 0 32px;
}

.subtle {
  font-family: var(--f-body);
  font-size: 18px;
  color: var(--content-secondary);
  max-width: 560px;
  margin: 8px auto 0;
}

.body {
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--content);
  margin: 0 0 18px;
  max-width: 540px;
}

.body em, .lede em {
  font-style: italic;
  color: var(--accent-bright);
}

.center-text { text-align: center; margin-left: auto; margin-right: auto; }

/* =========================================================
   Scroll-reveal
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Hero elements are above the fold — animate in immediately, no IO needed */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero .reveal {
  animation: heroFadeUp 700ms var(--ease-out) both;
  animation-delay: var(--delay, 0ms);
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; animation: none; }
  .node-breathe, .node-halo { animation: none !important; }
}

/* =========================================================
   Nav
   ========================================================= */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0 var(--pad-x);
  background: linear-gradient(180deg, rgba(10,14,26,0.85), rgba(10,14,26,0));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* Pin to its own compositor layer so the sticky+blur combo doesn't
     repaint the document below it every scroll-tick on iOS Safari. */
  transform: translateZ(0);
  will-change: transform;
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Wordmark — Playfair italic 'edgi' + Source Serif italic '.tv'.
   Mirror of lib/widgets/common/edgi_wordmark.dart. Keep them in sync. */
.logo {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--content);
}
.logo-dot,
.logo-tv {
  font-family: var(--f-body);
  font-style: italic;
  font-size: 0.95em;
  color: var(--accent);
}
.logo-dot { font-weight: 700; }
.logo-tv  { font-weight: 500; }

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  color: var(--content);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  transition: background 160ms, border-color 160ms;
}
.nav-link:hover {
  background: rgba(232, 228, 217, 0.05);
  border-color: var(--content-dim);
}

/* =========================================================
   CTAs
   ========================================================= */

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-ui);
  font-weight: 600;
  font-size: 15px;
  color: #0A0E1A;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  padding: 14px 24px;
  border: 0;
  border-radius: 999px;
  box-shadow:
    0 0 0 0 rgba(232, 184, 74, 0.4),
    0 8px 24px -8px rgba(212, 160, 74, 0.5);
  transition: transform 200ms var(--ease-out), box-shadow 400ms var(--ease-out);
}
.cta-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 8px rgba(232, 184, 74, 0.08),
    0 14px 32px -8px rgba(212, 160, 74, 0.6);
}
.cta-primary:active { transform: translateY(0); }
.cta-primary svg { transition: transform 200ms var(--ease-out); }
.cta-primary:hover svg { transform: translateX(3px); }

.cta-large {
  font-size: 17px;
  padding: 18px 32px;
}

.cta-secondary {
  display: inline-flex;
  align-items: center;
  font-family: var(--f-ui);
  font-weight: 500;
  font-size: 15px;
  color: var(--content);
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  transition: all 200ms var(--ease-out);
}
.cta-secondary:hover {
  border-color: var(--content);
  background: rgba(232, 228, 217, 0.04);
}

.final-cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: relative;
  padding: clamp(72px, 8vh, 120px) var(--pad-x) clamp(28px, 3.5vh, 60px);
  z-index: 1;
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
}

/* Two columns on desktop / iPad landscape: copy left, the real feed
   screenshot right. Standard centered hero — copy and phone share one
   vertical center (the phone's middle lands by the sub-headline). */
@media (min-width: 920px) {
  .hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(20px, 3vw, 56px);
    align-items: center;
  }
  /* Headline shares the row with the product shot now — cap it so it
     sizes to its column rather than overrunning into the visual. */
  .hero .display { font-size: clamp(40px, 4.6vw, 64px); }
}

.hero-copy {
  position: relative;
  z-index: 2;        /* above the aurora */
  max-width: 600px;
}

/* Masked line-rise for the H1 — each line slides up out of its own
   clip box. The padding/margin pair gives descenders (the italic 'y'
   in "you") room inside the overflow:hidden box and then cancels its
   own layout effect, so enlarging both keeps the spacing identical. */
.hl {
  display: block;
  overflow: hidden;
  padding-bottom: 0.5em;
  margin-bottom: -0.5em;
}
.hl-in {
  display: block;
  transform: translateY(112%);
  animation: lineRise 850ms var(--ease-out) var(--line-delay, 0ms) forwards;
}
@keyframes lineRise {
  to { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hl-in { transform: none; animation: none; }
}

/* ---- Hero product visual ----
   The real feed screenshot, floating in a warm aurora with pointer +
   scroll parallax (landing.js lerps --px/--py/--sy onto .hero-art-tilt)
   and two glass UI chips. Desktop / iPad-landscape only. */
.hero-art {
  display: none;
}
@media (min-width: 920px) {
  .hero-art {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;   /* let the aurora bleed without a scrollbar */
  }
}
/* Canvas sizing — shared by the Ask-section orb (the hero no longer
   has one, but the renderer is multi-instance). */
.orb-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Warm aurora behind the phone — lit-from-within, not pasted-on. */
.hero-aurora {
  position: absolute;
  z-index: 0;
  width: 130%;
  aspect-ratio: 1;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(closest-side, rgba(232, 184, 74, 0.30), rgba(232, 184, 74, 0.08) 45%, transparent 70%),
    radial-gradient(closest-side, rgba(0, 200, 214, 0.14), transparent 65%);
  background-position: 50% 42%, 64% 70%;
  background-repeat: no-repeat;
  filter: blur(28px);
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-aurora { animation: auroraDrift 14s ease-in-out infinite alternate; }
}
@keyframes auroraDrift {
  from { transform: translate(-52%, -50%) scale(1);    opacity: 0.9; }
  to   { transform: translate(-48%, -46%) scale(1.08); opacity: 1; }
}

/* Outer wrapper carries the JS parallax transform via custom props so
   it never fights the inner float keyframes. No CSS transition here on
   purpose — landing.js lerps the props every frame. */
.hero-art-tilt {
  position: relative;
  z-index: 2;
  transform:
    perspective(1300px)
    rotateY(calc(var(--px, 0) * -7deg))
    rotateX(calc(var(--py, 0) * 5deg))
    translate3d(calc(var(--px, 0) * 10px), calc(var(--sy, 0px) + var(--py, 0) * -8px), 0);
  transform-style: preserve-3d;
  will-change: transform;
}
.hero-art-img {
  display: block;
  height: clamp(440px, 56vh, 600px);
  width: auto;
  max-width: none;
  filter:
    drop-shadow(0 36px 60px rgba(0, 0, 0, 0.5))
    drop-shadow(0 10px 22px rgba(0, 0, 0, 0.38));
}
@media (prefers-reduced-motion: no-preference) {
  .hero-art-img { animation: phoneFloat 7s ease-in-out infinite alternate; }
}
@keyframes phoneFloat {
  from { transform: translateY(6px)  rotate(-0.4deg); }
  to   { transform: translateY(-10px) rotate(0.4deg); }
}

/* Floating glass chips — widen the visual mass so the phone doesn't
   read as small. */
.hero-float-chip {
  position: absolute;
  z-index: 3;
  font-family: var(--f-ui);
  font-weight: 600;
  font-size: 14px;
  color: var(--content);
  background: rgba(17, 24, 39, 0.66);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 9px 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
}
.hero-float-chip-xp {
  top: 26%;
  right: 4%;
  color: var(--accent-bright);
  animation: chipBobA 5.5s ease-in-out infinite alternate;
}
.hero-float-chip-streak {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  bottom: 17%;
  left: 0%;
  animation: chipBobB 6.5s ease-in-out infinite alternate;
}
.hero-float-chip .chip-flame {
  color: var(--accent-bright);
  /* warm flame glow so it reads as fire, not just an amber glyph */
  filter: drop-shadow(0 0 5px rgba(232, 140, 60, 0.7));
}
@media (prefers-reduced-motion: reduce) {
  .hero-float-chip-xp, .hero-float-chip-streak { animation: none; }
}
@keyframes chipBobA {
  from { transform: translateY(0); }
  to   { transform: translateY(-12px); }
}
@keyframes chipBobB {
  from { transform: translateY(0); }
  to   { transform: translateY(10px); }
}
@media (max-width: 1040px) {
  .hero-art-img { height: clamp(400px, 50vh, 540px); }
  .hero-float-chip { font-size: 13px; }
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* App Store badge — recreated inline (not Apple's PNG) so it themes
   with the page and stays crisp. Two-line lockup. */
.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 9px 18px 9px 16px;
  border-radius: 14px;
  background: #06080F;
  border: 1px solid var(--border-strong);
  color: var(--content);
  transition: transform 200ms var(--ease-out), border-color 200ms var(--ease-out), background 200ms var(--ease-out);
}
.appstore-badge:hover {
  transform: translateY(-1px);
  border-color: var(--content-dim);
  background: #0B0F1A;
}
.appstore-badge .asb-glyph { opacity: 0.95; }
.appstore-badge .asb-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  text-align: left;
}
.appstore-badge .asb-text small {
  font-family: var(--f-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--content-secondary);
}
.appstore-badge .asb-text strong {
  font-family: var(--f-ui);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.appstore-badge-lg { padding: 12px 22px 12px 20px; }
.appstore-badge-lg .asb-text strong { font-size: 20px; }

.hero-meta {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--content-dim);
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.06em;
}
.meta-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--mastery);
  box-shadow: 0 0 8px var(--mastery);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Hero search typewriter */
.hero-search {
  margin-top: 32px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface, #111827);
  border: 1px solid var(--border, rgba(232,228,217,0.1));
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 15px;
  color: rgba(232, 228, 217, 0.5);
  box-shadow: 0 8px 24px -12px rgba(0,0,0,0.6);
  min-width: 300px;
  max-width: 100%;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.hero-search:hover {
  border-color: rgba(232, 184, 74, 0.4);
  transform: translateY(-1px);
}
.hero-search svg { flex-shrink: 0; opacity: 0.5; }
.hero-typed { color: var(--content, #E8E4D9); }
.hero-caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  background: var(--accent, #D4A04A);
  margin-left: 2px;
  vertical-align: -2px;
  animation: caretBlink 1s steps(2) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }

/* Rabbit-hole terms */
.term {
  color: var(--interactive);
  border-bottom: 1px dashed rgba(0, 200, 214, 0.5);
  cursor: pointer;
  transition: all 150ms var(--ease-out);
  padding-bottom: 1px;
}
.term:hover {
  color: var(--accent-bright);
  border-bottom-color: var(--accent-bright);
  background: rgba(232, 184, 74, 0.05);
}
.term-hint {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  font-family: var(--f-mono);
  color: var(--content-dim);
  letter-spacing: 0.06em;
}

.term-popover {
  position: absolute;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 18px 20px;
  max-width: 320px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  z-index: 10;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.5;
}
.term-popover.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.term-popover .term-title {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.term-popover .term-body { color: var(--content); }
.term-link {
  display: block;
  margin-top: 12px;
  font-family: var(--f-ui);
  font-size: 12px;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 150ms var(--ease-out);
}
.term-link:hover { color: var(--accent-bright); }

/* =========================================================
   SOCIAL PROOF
   ========================================================= */

.proof {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad-x) 60px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.proof-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--content-dim);
  margin-bottom: 28px;
}
.proof-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(28px, 5vw, 56px);
  opacity: 0.7;
}
.wordmark {
  font-family: var(--f-ui);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--content);
  opacity: 0.75;
  transition: opacity 200ms var(--ease-out);
}
.wordmark:hover { opacity: 1; }
/* Visual distinctions so the row feels like real wordmarks */
.wm-google { font-family: 'DM Sans'; letter-spacing: -0.04em; }
.wm-apple { font-weight: 500; letter-spacing: -0.03em; }
.wm-spacex { font-family: var(--f-mono); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; font-size: 16px; }
.wm-jpm { font-family: var(--f-display); font-weight: 600; letter-spacing: 0; }
.wm-mit { font-family: var(--f-display); font-weight: 700; letter-spacing: 0.02em; }
.wm-stanford { font-family: var(--f-display); font-style: italic; font-weight: 600; }

/* =========================================================
   SECTION HEAD
   ========================================================= */

.section-head {
  max-width: 720px;
  margin-bottom: 56px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* =========================================================
   PAINS
   ========================================================= */

.pains {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) var(--pad-x);
  position: relative;
  z-index: 1;
}

.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}
@media (max-width: 820px) {
  .pain-grid { grid-template-columns: 1fr; }
}

.pain-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px;
  transition: border-color 300ms var(--ease-out), transform 300ms var(--ease-out);
}
.pain-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.pain-stat {
  font-family: var(--f-display);
  font-size: clamp(48px, 5vw, 64px);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.pain-text {
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.5;
  color: var(--content);
}
.pain-text em {
  color: var(--accent-bright);
  font-style: italic;
}

/* Footnote citations on pain stats */
.pain-stat {
  position: relative;
}
.cite {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  vertical-align: super;
  line-height: 1;
  margin-left: 4px;
  padding: 2px 5px;
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(212, 160, 74, 0.35);
  border-radius: 999px;
  cursor: pointer;
  transition: background 150ms var(--ease-out), color 150ms var(--ease-out),
              border-color 150ms var(--ease-out);
}
.cite:hover,
.cite:focus-visible,
.cite.active {
  background: rgba(232, 184, 74, 0.12);
  color: var(--accent-bright);
  border-color: var(--accent-bright);
  outline: none;
}

.cite-popover {
  position: absolute;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 14px 16px;
  max-width: 300px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  z-index: 20;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
  font-family: var(--f-body);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--content);
}
.cite-popover.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.cite-popover .cite-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.cite-popover .cite-body {
  color: var(--content);
  margin: 0 0 8px;
}
.cite-popover .cite-link {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--interactive);
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 200, 214, 0.4);
  display: inline-block;
  padding-bottom: 1px;
  word-break: break-word;
}
.cite-popover .cite-link:hover {
  color: var(--accent-bright);
  border-bottom-color: var(--accent-bright);
}

.pain-kicker {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.4;
  color: var(--content);
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

/* =========================================================
   SPARK
   ========================================================= */

.spark {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) var(--pad-x);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (max-width: 900px) {
  .spark { grid-template-columns: 1fr; }
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  font-family: var(--f-body);
}
.feature-list li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  font-size: 18px;
  color: var(--content);
  border-bottom: 1px solid var(--border);
}
.feature-list li:last-child { border-bottom: none; }
.bullet {
  color: var(--accent);
  flex-shrink: 0;
  font-size: 14px;
}

/* =========================================================
   SPARK PHONE MOCK
   ========================================================= */

.phone-mock {
  max-width: 340px;
  margin: 0 auto;
  aspect-ratio: 9 / 19;
  background: #0a0a0a;
  border-radius: 48px;
  padding: 10px;
  box-shadow:
    0 0 0 2px rgba(232, 228, 217, 0.08),
    0 40px 80px -20px rgba(0,0,0,0.6),
    0 0 90px -20px rgba(212, 160, 74, 0.3);
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.spark-tap-hint {
  position: absolute;
  inset: 0;
  border-radius: 38px;
  pointer-events: none;
  transition: opacity 500ms var(--ease-out);
  z-index: 10;
}
.tap-target {
  position: absolute;
  left: 66.5%;
  top: 85.5%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.spark-tap-hint.gone { opacity: 0; }
.tap-ring {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,184,74,0.18) 0%, transparent 70%);
  border: 1.5px solid rgba(232,184,74,0.55);
  animation: tapPulse 2s ease-in-out infinite;
}
.tap-label {
  display: block;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.85;
}
@keyframes tapPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(232,184,74,0.35); }
  50% { transform: scale(1.2); box-shadow: 0 0 0 14px rgba(232,184,74,0); }
}

.phone-screen {
  --ambient-accent: 212, 160, 74;       /* warm amber */
  --ambient-atmosphere: 15, 31, 46;     /* deep teal */
  --ambient-deep: #0D0E14;
  --ambient-image-url: none;
  width: 100%; height: 100%;
  border-radius: 38px;
  background: var(--ambient-deep);
  overflow: hidden;
  position: relative;
  padding: 0;
  display: flex;
  flex-direction: column;
}
/* Per-section palette — matches lib/widgets/spark/concept_spark_page.dart
   (_accentForPhase / _atmosphereForPhase). Accent is the warm/teal blob;
   atmosphere is the deep mood color. Both interpolated via long
   CSS transitions on the ambient-mesh layer. */
.phone-screen.section-0 {
  --ambient-accent: 212, 160, 74;       /* amber — core idea */
  --ambient-atmosphere: 15, 31, 46;     /* deep teal */
}
.phone-screen.section-1 {
  --ambient-accent: 138, 174, 123;      /* amber→cyan @ 0.35 — backstory */
  --ambient-atmosphere: 13, 19, 33;     /* midnight */
}
.phone-screen.section-2 {
  --ambient-accent: 85, 184, 158;       /* amber→cyan @ 0.6 — bigger picture */
  --ambient-atmosphere: 26, 21, 16;     /* warm amber undertone */
}
.phone-screen.section-complete {
  --ambient-accent: 232, 184, 74;       /* brighter amber on completion */
  --ambient-atmosphere: 36, 26, 16;
}

/* ---- Ambient mesh background ----
   Layered: blurred image → dark veil → 3 drifting blobs → vignette.
   Mirrors lib/widgets/spark/components/ambient_mesh_background.dart. */
.ambient-mesh {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  overflow: hidden;
}
.ambient-image {
  position: absolute;
  inset: -10%;   /* oversize so blur edges aren't visible */
  background-image: var(--ambient-image-url);
  background-size: cover;
  background-position: center;
  filter: blur(40px) saturate(1.1);
  opacity: 0.55;
}
.ambient-veil {
  position: absolute;
  inset: 0;
  background: rgba(13, 14, 20, 0.78);
}
.ambient-blob {
  position: absolute;
  inset: -25%;     /* oversize so the radial gradient can drift without revealing edges */
  border-radius: 50%;
  mix-blend-mode: plus-lighter;
  transition: background 1200ms var(--ease-out);
  will-change: transform;
}
.ambient-blob-accent {
  background: radial-gradient(circle at 50% 50%,
    rgba(var(--ambient-accent), 0.42) 0%,
    rgba(var(--ambient-accent), 0.0) 60%);
  animation: ambient-drift-accent 90s ease-in-out infinite;
}
.ambient-blob-atmosphere {
  background: radial-gradient(circle at 50% 50%,
    rgba(var(--ambient-atmosphere), 0.55) 0%,
    rgba(var(--ambient-atmosphere), 0.0) 60%);
  animation: ambient-drift-atmosphere 110s ease-in-out infinite;
}
.ambient-blob-shadow {
  /* Cool deep — adds depth without competing with the accent. Plain
     blend mode (not plus-lighter) so it reads as shadow not highlight. */
  background: radial-gradient(circle at 50% 50%,
    rgba(27, 25, 48, 0.35) 0%,
    rgba(27, 25, 48, 0.0) 60%);
  mix-blend-mode: normal;
  animation: ambient-drift-shadow 130s ease-in-out infinite;
}
.ambient-vignette {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at center,
    transparent 55%,
    rgba(13, 14, 20, 0.45) 85%,
    rgba(13, 14, 20, 0.7) 100%);
  /* Thin highlight ring defining the screen edge. The screen interior
     (#0D0E14) and the chrome (#0a0a0a) are nearly the same dark, so
     without this the bottom edge dissolves where there's no content
     contrast to draw it. */
  box-shadow: inset 0 0 0 1px rgba(232, 228, 217, 0.10);
}

/* Closed-loop drifts — each blob traces a different rough orbit.
   Start/end keyframes are intentionally close so the loop has no
   visible reset. ease-in-out keeps motion gentle. */
@keyframes ambient-drift-accent {
  0%   { transform: translate(-12%, -16%); }
  25%  { transform: translate(8%, -8%); }
  50%  { transform: translate(12%, 6%); }
  75%  { transform: translate(-4%, 12%); }
  100% { transform: translate(-12%, -16%); }
}
@keyframes ambient-drift-atmosphere {
  0%   { transform: translate(14%, 12%); }
  25%  { transform: translate(2%, 18%); }
  50%  { transform: translate(-14%, 6%); }
  75%  { transform: translate(-4%, -10%); }
  100% { transform: translate(14%, 12%); }
}
@keyframes ambient-drift-shadow {
  0%   { transform: translate(-18%, 14%); }
  33%  { transform: translate(10%, 16%); }
  66%  { transform: translate(6%, -8%); }
  100% { transform: translate(-18%, 14%); }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-blob { animation: none; }
}

/* Lift all spark content above the ambient mesh */
.spark-header,
.spark-spine,
.spark-stage {
  position: relative;
  z-index: 1;
}

/* ---- Concept identity header ---- */
.spark-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 28px 16px 12px;
  flex-shrink: 0;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.concept-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background-color: rgba(232, 184, 74, 0.12);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.4), 0 0 10px rgba(212, 160, 74, 0.25);
  flex-shrink: 0;
  transition: background-image 600ms var(--ease-out);
}
.concept-titles {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}
.concept-title {
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--content);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.concept-section {
  font-family: var(--f-body);
  font-style: italic;
  font-size: 12px;
  color: var(--accent-bright);
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
  height: 0;
}
.concept-section.visible {
  opacity: 1;
  transform: translateY(0);
  height: auto;
  margin-top: 2px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.level-chip {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-bright);
  padding: 3px 8px;
  border: 1px solid rgba(232, 184, 74, 0.45);
  border-radius: 6px;
  background: rgba(232, 184, 74, 0.08);
}
.icon-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(232, 228, 217, 0.06);
  border: 1px solid rgba(232, 228, 217, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--content-secondary);
}

/* ---- Progress spine ----
   Sectioned: one segment per card, separated by either a question dot
   (inline checkpoint follows this card) or a thin notch (decorative
   card boundary). Mirrors
   lib/widgets/spark/components/story_spine_progress.dart. */
.spark-spine {
  position: relative;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 10px;
  margin: 4px 16px 0;
  flex-shrink: 0;
}
.spine-segment {
  position: relative;
  height: 4px;
  flex: 0 0 auto;
}
.spine-segment-track {
  position: absolute;
  inset: 0;
  background: rgba(232, 228, 217, 0.12);
  border-radius: 2px;
}
.spine-segment-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0%;
  background: linear-gradient(90deg,
    rgba(var(--ambient-accent), 0.55),
    rgba(var(--ambient-accent), 0.4));
  border-radius: 2px;
  transition: width 500ms cubic-bezier(0.22, 1, 0.36, 1),
              background 800ms var(--ease-out),
              box-shadow 400ms var(--ease-out);
}
.spine-segment.is-active .spine-segment-fill {
  background: linear-gradient(90deg,
    rgba(var(--ambient-accent), 0.95),
    rgba(var(--ambient-accent), 0.75));
  box-shadow: 0 0 6px rgba(var(--ambient-accent), 0.5);
}
.spine-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(232, 228, 217, 0.18);
  transition: background 400ms var(--ease-out), box-shadow 400ms var(--ease-out);
}
.spine-dot.is-done {
  background: rgba(var(--ambient-accent), 0.55);
}
.spine-dot.is-active {
  background: rgba(var(--ambient-accent), 0.95);
  box-shadow: 0 0 8px rgba(var(--ambient-accent), 0.6);
}
.spine-notch {
  flex: 0 0 auto;
  width: 2px;
  height: 8px;
  border-radius: 1px;
  background: rgba(232, 228, 217, 0.18);
  transition: background 400ms var(--ease-out);
}
.spine-notch.is-done {
  background: rgba(var(--ambient-accent), 0.45);
}

/* ---- Stage ---- */
.spark-stage {
  flex: 1;
  position: relative;
  display: flex;
  overflow: hidden;
}
.phase {
  position: absolute;
  inset: 0 0 20px 0;
  display: flex;
  flex-direction: column;
  padding: 18px 20px 12px;
  overflow: hidden;
}
.phase.entering { animation: phaseEnter 420ms var(--ease-out-back); }
@keyframes phaseEnter {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Reveal phase ---- */
.phase-reveal {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0px 24px 80px;
}
.phase-reveal .overline {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.42em;
  color: var(--accent);
  margin-bottom: 22px;
}
.phase-reveal .reveal-term {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 700;
  font-size: 40px;
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--content);
  margin: 0 0 24px;
  text-shadow: 0 0 40px rgba(232, 184, 74, 0.35);
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  animation: termPunchIn 620ms var(--ease-out-back) 600ms forwards;
}
@keyframes termPunchIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.phase-reveal .tagline {
  font-family: var(--f-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.45;
  color: rgba(232, 228, 217, 0.82);
  margin: 0;
  max-width: 300px;
}
.phase-reveal .kw {
  display: inline-block;
  opacity: 0;
  transform: translateY(6px);
  animation: kwIn 460ms cubic-bezier(0.33, 1, 0.68, 1) forwards;
}
@keyframes kwIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Sentence phase ---- */
.phase-sentence {
  gap: 12px;
  justify-content: flex-start;
}
/* Text-only sentences (no image) sit awkwardly pinned to the top; bias
   them toward the upper-middle, left-aligned. Mirrors the app's
   _buildSentenceTextOnly — CrossAxisAlignment.start with
   Spacer(flex: 2) above and Spacer(flex: 3) below. */
.phase-sentence:not(:has(.sentence-image)) {
  justify-content: flex-start;
}
.phase-sentence:not(:has(.sentence-image))::before {
  content: '';
  flex: 2;
}
.phase-sentence:not(:has(.sentence-image))::after {
  content: '';
  flex: 3;
}
.sentence-image {
  width: 100%;
  height: 162px;
  border-radius: 10px;
  background: rgba(232, 228, 217, 0.04);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  cursor: zoom-in;
  transition: transform 200ms var(--ease-out);
}
.sentence-image::after {
  content: '';
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background:
    rgba(10, 14, 26, 0.7)
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23E8E4D9' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M15 3h6v6'/><path d='M9 21H3v-6'/><path d='M21 3l-7 7'/><path d='M3 21l7-7'/></svg>")
    center/14px no-repeat;
  opacity: 0;
  transition: opacity 180ms var(--ease-out);
  pointer-events: none;
}
.sentence-image:hover::after,
.sentence-image:active::after { opacity: 1; }
.sentence-image:active { transform: scale(0.98); }
.sentence-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  background: rgba(248, 245, 236, 0.96);
}
.sentence-image.has-photo img {
  object-fit: cover;
  padding: 0;
  background: transparent;
}
.sentence-caption {
  font-family: var(--f-body);
  font-style: italic;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(232, 228, 217, 0.55);
  margin: -4px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sentence-text {
  font-family: var(--f-body);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--content);
  margin: 8px 0 0;
  letter-spacing: -0.01em;
}
.linked-concept {
  color: var(--interactive);
  border-bottom: 1px dashed rgba(0, 200, 214, 0.5);
  cursor: pointer;
  padding-bottom: 1px;
  transition: color 150ms var(--ease-out), border-color 150ms var(--ease-out);
  font-weight: 600;
}
.linked-concept:hover,
.linked-concept.active {
  color: var(--accent-bright);
  border-bottom-color: var(--accent-bright);
}

/* ---- Question phase ----
   Head (eyebrow + prompt + options) sits in the upper-middle of the
   stage via 2:3 flex spacers, matching the text-only sentence rhythm.
   Feedback panel is absolutely positioned at the bottom so the head
   doesn't shift when it slides in. */
.phase-question {
  gap: 0;
  justify-content: flex-start;
  align-items: stretch;
  padding: 18px 20px;
}
.phase-question::before {
  content: '';
  flex: 2;
}
.phase-question::after {
  content: '';
  flex: 3;
}
.q-head {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.phase-question .q-eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.36em;
  color: var(--accent-bright);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.phase-question .q-eyebrow::after {
  content: '';
  flex: 0 0 18px;
  height: 1px;
  background: rgba(var(--ambient-accent), 0.5);
}
.phase-question .q-prompt {
  font-family: var(--f-display);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--content);
  margin: 0;
  letter-spacing: -0.01em;
}
.q-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.q-options--binary {
  flex-direction: row;
}
.q-options--binary li {
  flex: 1;
  display: flex;
}
.q-options--binary .q-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.q-option {
  display: block;
  width: 100%;
  padding: 14px 16px;
  background: rgba(232, 228, 217, 0.05);
  border: 1px solid rgba(232, 228, 217, 0.14);
  border-radius: 14px;
  font-family: var(--f-body);
  font-size: 15.5px;
  line-height: 1.35;
  color: var(--content);
  cursor: pointer;
  transition: background 180ms var(--ease-out), border-color 180ms var(--ease-out),
              transform 180ms var(--ease-out);
  text-align: left;
}
.q-option:hover {
  background: rgba(232, 228, 217, 0.09);
  border-color: rgba(232, 228, 217, 0.28);
  transform: translateY(-1px);
}
.q-option[disabled] {
  cursor: default;
  opacity: 0.55;
}
.q-option.correct {
  background: rgba(92, 201, 126, 0.18);
  border-color: var(--correct);
  color: var(--content);
  opacity: 1;
}
.q-option.incorrect {
  background: rgba(216, 85, 85, 0.16);
  border-color: var(--incorrect);
  opacity: 1;
}
/* Feedback panel — absolutely pinned to the bottom of the question
   stage so the head above (eyebrow / prompt / options) keeps its
   vertical position when feedback slides in. Mirrors
   QuestionFeedbackPanel in the app. */
.q-feedback {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  padding: 14px 14px 12px;
  background: rgba(232, 228, 217, 0.05);
  border: 1px solid rgba(232, 228, 217, 0.12);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(12px);
  animation: feedbackIn 360ms var(--ease-out) forwards;
}
.q-feedback.is-correct {
  background: rgba(92, 201, 126, 0.10);
  border-color: rgba(92, 201, 126, 0.35);
}
.q-feedback.is-incorrect {
  background: rgba(216, 85, 85, 0.10);
  border-color: rgba(216, 85, 85, 0.35);
}
.q-feedback-label {
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-bright);
}
.q-feedback.is-correct .q-feedback-label { color: var(--correct); }
.q-feedback.is-incorrect .q-feedback-label { color: var(--incorrect); }
.q-feedback-text {
  margin: 0;
  font-family: var(--f-body);
  font-size: 13.5px;
  line-height: 1.45;
  color: rgba(232, 228, 217, 0.86);
}
.q-continue {
  align-self: stretch;
  margin-top: 4px;
  padding: 11px 14px;
  background: var(--content);
  color: #0A0E1A;
  border: none;
  border-radius: 10px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background 160ms var(--ease-out);
}
.q-continue:hover { transform: translateY(-1px); }
@keyframes feedbackIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Complete phase ----
   Modeled on lib/widgets/spark/next_node_selector.dart — "Where to next?"
   header, italic divider, and a glassmorphic candidate card per next
   spark. The XP chip up top stands in for the chain-tier badge. */
.phase-complete {
  align-items: stretch;
  justify-content: flex-start;
  gap: 14px;
  padding: 28px 20px 18px;
}
.phase-complete .next-xp-chip {
  align-self: center;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  padding: 5px 12px;
  background: rgba(232, 184, 74, 0.14);
  border: 1px solid rgba(232, 184, 74, 0.4);
  border-radius: 999px;
  font-family: var(--f-mono);
  margin-bottom: 4px;
}
.phase-complete .next-xp-chip .plus {
  font-size: 12px;
  color: var(--accent-bright);
  font-weight: 700;
}
.phase-complete .next-xp-chip .value {
  font-family: var(--f-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-bright);
  line-height: 1;
}
.phase-complete .next-xp-chip .suffix {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-left: 4px;
}
.phase-complete .next-title {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--content);
  margin: 0;
  text-align: center;
}
.phase-complete .next-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}
.phase-complete .next-divider span {
  flex: 1;
  height: 0.5px;
  background: rgba(232, 228, 217, 0.18);
}
.phase-complete .next-divider em {
  font-family: var(--f-body);
  font-style: italic;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(232, 228, 217, 0.5);
}

/* Candidate card — glassmorphic, accent-tinted, matches _NextNodeCard:
   gradient overlay, accent border, avatar + Playfair title + serif
   rationale + chevron. */
.phase-complete .next-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 14px 14px 14px;
  background: linear-gradient(135deg,
    rgba(232, 228, 217, 0.10),
    rgba(232, 228, 217, 0.04));
  border: 1px solid rgba(232, 184, 74, 0.30);
  border-radius: 18px;
  color: var(--content);
  text-decoration: none;
  text-align: left;
  font-family: var(--f-body);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25),
              0 0 18px rgba(232, 184, 74, 0.12);
  transition: transform 180ms var(--ease-out), border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
  animation: next-card-in 460ms 220ms both var(--ease-out);
  opacity: 0;
}
.phase-complete .next-card:hover {
  transform: translateY(-1px);
  border-color: rgba(232, 184, 74, 0.55);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.30),
              0 0 24px rgba(232, 184, 74, 0.22);
}
.next-card-avatar {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(232, 184, 74, 0.12);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.4),
              0 0 14px rgba(212, 160, 74, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.next-card-avatar--glyph {
  font-family: var(--f-display);
  font-size: 22px;
  color: var(--accent-bright);
}
.next-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.next-card-title {
  font-family: var(--f-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--content);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.next-card-sub {
  font-family: var(--f-body);
  font-style: italic;
  font-size: 12.5px;
  line-height: 1.35;
  color: rgba(232, 228, 217, 0.62);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.next-card-chevron {
  flex: 0 0 auto;
  font-size: 18px;
  color: var(--accent-bright);
  opacity: 0.7;
}
@keyframes next-card-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Ask-about-this rail (decorative) ---- */

/* Interactive children inside the mock */
.phone-mock .q-option,
.phone-mock .linked-concept,
.phone-mock .concept-popover,
.phone-mock .icon-btn { cursor: pointer; }

/* Linked-concept popover (scoped inside phone mock) */
.concept-popover {
  position: absolute;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px 14px;
  max-width: 260px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
  z-index: 5;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
  font-family: var(--f-body);
  font-size: 13px;
  line-height: 1.4;
  color: var(--content);
}
.concept-popover.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.concept-popover .cp-title {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .phase.entering,
  .phase-reveal .reveal-term, .phase-reveal .kw,
  .q-feedback, .next-card {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* =========================================================
   CHAIN
   ========================================================= */

.chain {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) var(--pad-x);
  position: relative;
  z-index: 1;
}

.chain-wrap {
  max-width: 940px;
  margin: 0 auto;
  position: relative;
}

.chain-svg {
  width: 100%;
  height: auto;
  overflow: visible;
  display: block;
}
/* Swap horizontal/vertical layouts at the mobile breakpoint */
.chain-svg-mobile { display: none; }
@media (max-width: 720px) {
  .chain-svg-desktop { display: none; }
  .chain-svg-mobile  { display: block; max-width: 360px; margin: 0 auto; }
}

.chain-node circle {
  fill: var(--surface, #111827);
  stroke: rgba(232, 228, 217, 0.18);
  stroke-width: 1.5;
  transition: fill 500ms ease, stroke 500ms ease;
}
.chain-node.lit circle {
  fill: var(--accent, #D4A04A);
  stroke: var(--accent-bright, #E8B84A);
  filter: drop-shadow(0 0 10px rgba(212, 160, 74, 0.7));
}
.chain-node text {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 15px;
  font-weight: 600;
  fill: rgba(232, 228, 217, 0.45);
  transition: fill 500ms ease;
}
.chain-svg-mobile .chain-node text {
  font-size: 17px;
}
.chain-node.lit text { fill: var(--content, #E8E4D9); }

.chain-edge {
  fill: none;
  stroke: rgba(232, 228, 217, 0.12);
  stroke-width: 1.5;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  transition: stroke-dashoffset 700ms ease-out, stroke 700ms ease;
}
.chain-edge.drawn {
  stroke-dashoffset: 0;
  stroke: var(--accent, #D4A04A);
  stroke-opacity: 0.6;
}

.chain-punchline {
  text-align: center;
  margin-top: 48px;
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: clamp(17px, 2vw, 22px);
  color: rgba(232, 228, 217, 0.5);
}
.chain-flash { color: var(--accent, #D4A04A); }

/* =========================================================
   MAP
   ========================================================= */

.map {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) var(--pad-x);
  position: relative;
  z-index: 1;
}

.map-head {
  max-width: 720px;
  margin: 0 auto clamp(48px, 6vw, 72px);
  text-align: center;
}
.map-lede {
  margin: 18px auto 0;
  max-width: 56ch;
}

.map-stage {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.map-stage-inner {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(212, 160, 74, 0.10), transparent 55%),
    radial-gradient(ellipse at 75% 75%, rgba(0, 200, 214, 0.06), transparent 55%),
    radial-gradient(ellipse at 50% 50%, #0d1626 0%, #050810 100%);
  border: 1px solid var(--border-strong);
  box-shadow:
    0 40px 100px -20px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  aspect-ratio: 2 / 1;
  cursor: crosshair;
}

#map-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.map-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 50%, rgba(6, 8, 16, 0.85) 100%);
}

.map-readout {
  position: absolute;
  top: 22px;
  left: 26px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  color: rgba(232, 228, 217, 0.85);
  text-align: left;
  pointer-events: none;
  user-select: none;
}
.map-readout-num {
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--accent-bright, #E8B84A);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  transition: color 220ms ease;
}
.map-readout-cap {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(232, 228, 217, 0.42);
  margin-top: 6px;
}

/* Hover popover for hero nodes */
.map-card {
  position: absolute;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 14px));
  background: rgba(15, 22, 40, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(232, 184, 74, 0.35);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 180px;
  max-width: 260px;
  opacity: 0;
  transition: opacity 180ms ease;
  z-index: 4;
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.7);
}
.map-card.is-visible { opacity: 1; }
.map-card::after {
  content: '';
  position: absolute;
  left: 50%; top: 100%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(232, 184, 74, 0.35);
}
.mc-domain {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-bright, #E8B84A);
}
.mc-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--content, #E8E4D9);
  margin-top: 4px;
  line-height: 1.2;
}
.mc-desc {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 12px;
  color: rgba(232, 228, 217, 0.75);
  margin-top: 6px;
  line-height: 1.5;
}
.mc-stats {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  color: rgba(232, 228, 217, 0.55);
  margin-top: 8px;
  letter-spacing: 0.04em;
}

.map-node {
  fill: #E8E4D9;
  fill-opacity: 0;
  transition: fill-opacity 600ms ease, r 500ms ease;
  transform-box: fill-box;
  transform-origin: center;
}
.map-node.is-on { fill-opacity: 0.55; }
.map-node.is-hero { fill: var(--accent-bright, #E8B84A); }
.map-node.is-hero.is-on { fill-opacity: 1; }
.map-node.is-mastered.is-on { fill: var(--accent-bright, #E8B84A); fill-opacity: 1; }
.map-node.is-recent.is-on { fill: #BFE0BC; fill-opacity: 0.95; }
.map-node.is-hero { cursor: pointer; }
.map-node.is-active {
  transform: scale(1.4);
  filter: drop-shadow(0 0 10px rgba(232, 184, 74, 0.9));
}

.map-node-halo {
  fill: url(#mapNodeGlow);
  opacity: 0;
  transition: opacity 800ms ease;
  transform-box: fill-box;
  transform-origin: center;
  animation: mapHaloPulse 5s ease-in-out infinite;
}
.map-node-halo.is-sage { fill: url(#mapNodeGlowSage); }
.map-node-halo.is-on { opacity: 0.75; }
@keyframes mapHaloPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.18); }
}

.map-edge {
  fill: none;
  stroke: rgba(212, 160, 74, 0.32);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 900ms ease, stroke 600ms ease, stroke-opacity 600ms ease;
}
.map-edge.is-on { stroke-dashoffset: 0; }
.map-edge.is-recent { stroke: rgba(191, 224, 188, 0.45); }
.map-edge.is-active {
  stroke: rgba(232, 184, 74, 0.85);
  stroke-width: 1.5;
}

.map-label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  fill: rgba(232, 228, 217, 0.78);
  opacity: 0;
  transition: opacity 350ms ease;
  pointer-events: none;
}
.map-label.is-on { opacity: 1; }

.map-scrubber {
  margin: 36px auto 0;
  max-width: 720px;
  padding: 0 12px;
  position: relative;
}
.map-scrubber-track {
  position: relative;
  height: 2px;
  background: rgba(232, 228, 217, 0.10);
  border-radius: 2px;
  margin: 0 12px;
}
.map-scrubber-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-deep, #B8862E), var(--accent-bright, #E8B84A));
  border-radius: 2px;
  box-shadow: 0 0 16px rgba(232, 184, 74, 0.45);
  transition: width 700ms cubic-bezier(.4, .1, .25, 1);
}
.map-scrubber-stops {
  position: relative;
  margin-top: -8px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.map-stop {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: rgba(232, 228, 217, 0.45);
  transition: color 220ms ease;
  font: inherit;
}
.map-stop:hover { color: rgba(232, 228, 217, 0.85); }
.map-stop.is-active { color: var(--content, #E8E4D9); }
.map-stop-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #06080f;
  border: 2px solid rgba(232, 228, 217, 0.25);
  transition: border-color 220ms ease, background 220ms ease, transform 220ms ease;
}
.map-stop:hover .map-stop-dot {
  border-color: rgba(232, 228, 217, 0.6);
}
.map-stop.is-active .map-stop-dot {
  background: var(--accent-bright, #E8B84A);
  border-color: var(--accent-bright, #E8B84A);
  box-shadow: 0 0 0 4px rgba(232, 184, 74, 0.18);
  transform: scale(1.1);
}
.map-stop-label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
  .map-node, .map-edge, .map-label, .map-node-halo,
  .map-scrubber-fill, .map-readout-num {
    transition: none !important;
    animation: none !important;
  }
}

/* =========================================================
   HOLO CARD
   ========================================================= */

.holo-sec {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) var(--pad-x);
  position: relative;
  z-index: 1;
}

.holo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(40px, 6vw, 80px);
}
@media (max-width: 900px) {
  .holo-grid { grid-template-columns: 1fr; }
}

.holo-copy h2 em { font-style: italic; color: var(--accent-bright); }
.display em, .display-2 em { font-style: italic; color: var(--accent-bright); }
.holo-copy .body { margin-top: 20px; }

.holo-stage-wrap { justify-self: center; width: 100%; max-width: 380px; }
.holo-stage {
  perspective: 1200px;
  width: 100%;
  aspect-ratio: 2 / 3;
  position: relative;
}
.holo-stage::before {
  content: '';
  position: absolute;
  inset: -40px -20px -60px -20px;
  background: radial-gradient(ellipse at 50% 70%, rgba(212, 160, 74, 0.22), transparent 70%);
  filter: blur(20px);
  z-index: -1;
}

.holo-card {
  position: relative;
  display: block;
  width: 100%; height: 100%;
  border-radius: 18px;
  transform-style: preserve-3d;
  transform: rotateX(calc(var(--ry, 0) * -1deg)) rotateY(calc(var(--rx, 0) * 1deg));
  transition: transform 200ms ease-out;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.1) inset;
  cursor: grab;
  text-decoration: none;
  color: inherit;
}
.holo-card:active { cursor: grabbing; }

.holo-base {
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg, #1a1410 0%, #0c111c 100%);
}
.holo-image {
  position: absolute; inset: 18px 18px 38% 18px;
  border-radius: 12px;
  background-color: #1a1410;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
}
.holo-image-grad {
  position: absolute; inset: 18px 18px 38% 18px;
  border-radius: 12px;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 100%, rgba(26, 20, 16, 0.7) 0%, transparent 55%),
    conic-gradient(from 0deg at 50% 55%, rgba(232,184,74,0.10), transparent 25%, rgba(126,174,123,0.10) 50%, transparent 75%, rgba(232,184,74,0.10) 100%);
  mix-blend-mode: screen;
}

.holo-foil {
  position: absolute; inset: 0;
  border-radius: inherit;
  background: conic-gradient(
    from calc(var(--foil-angle, 0) * 1deg) at 50% 50%,
    #E8B84A 0deg, #7EAE7B 60deg, #4ECDC4 120deg,
    #4A6FA5 180deg, #BF6A3E 240deg, #D4A04A 300deg, #E8B84A 360deg
  );
  mix-blend-mode: color-dodge;
  opacity: 0.32;
  pointer-events: none;
  transition: opacity 300ms ease;
}
.holo-card:hover .holo-foil { opacity: 0.52; }

.holo-sweep {
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.5) 50%, transparent 70%);
  transform: translateX(-120%);
  mix-blend-mode: overlay;
  pointer-events: none;
}
.holo-card.sweeping .holo-sweep { animation: holoSweep 1.4s ease-out; }
@keyframes holoSweep {
  from { transform: translateX(-120%); }
  to   { transform: translateX(120%); }
}

.holo-content {
  position: absolute;
  left: 18px; right: 18px;
  top: 64%;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.holo-eyebrow {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px; color: rgba(232,228,217,0.5);
  letter-spacing: 0.12em; text-transform: uppercase;
}
.holo-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 800;
  font-size: clamp(26px, 3vw, 32px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--content, #E8E4D9);
  margin-top: -2px;
}
.holo-line {
  font-size: 13px;
  color: rgba(232,228,217,0.7);
  line-height: 1.4;
}
.holo-stats {
  display: flex; gap: 8px;
  font-size: 10px; font-family: 'IBM Plex Mono', ui-monospace, monospace;
  color: rgba(232,228,217,0.55); letter-spacing: 0.04em;
}
.holo-stats span {
  padding: 4px 8px; border-radius: 6px;
  background: rgba(232,228,217,0.08);
  border: 1px solid rgba(232,228,217,0.06);
}

.holo-caption {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: rgba(232,228,217,0.3);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  letter-spacing: 0.08em;
}

/* Feynman-note pill */
.feynman-note {
  display: inline-block;
  margin-top: 28px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(232, 228, 217, 0.04);
  border: 1px solid rgba(232, 228, 217, 0.14);
  font-size: 13px;
  color: rgba(232, 228, 217, 0.55);
}
.feynman-note strong { color: var(--content, #E8E4D9); }

/* =========================================================
   GENERATE — shared tokens
   ========================================================= */

/* Cover-art treatments (typographic, no external assets) */
.cover-octopus {
  background:
    radial-gradient(ellipse at 20% 20%, rgba(0,200,214,0.45), transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(168,85,247,0.5),  transparent 55%),
    linear-gradient(135deg, #0d2436, #1a0d36);
  color: #E8E4D9;
}
.cover-rome {
  background:
    radial-gradient(ellipse at 30% 30%, rgba(232,184,74,0.35), transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(216,85,85,0.45),  transparent 55%),
    linear-gradient(135deg, #2a0e0e, #3a1410);
  color: #F4E8D4;
}
.cover-interest {
  background:
    radial-gradient(ellipse at 25% 25%, rgba(232,184,74,0.55), transparent 55%),
    radial-gradient(ellipse at 75% 80%, rgba(184,134,46,0.45), transparent 55%),
    linear-gradient(135deg, #1a1208, #3a280f);
  color: #F4E8D4;
}
.cover-medici {
  background:
    radial-gradient(ellipse at 30% 30%, rgba(126,174,123,0.35), transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(40,80,60,0.55),    transparent 55%),
    linear-gradient(135deg, #0d1f16, #1f3527);
  color: #E8E4D9;
}


/* =========================================================
   GENERATE — OPTION B (podcast hero)
   ========================================================= */

.podcast-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) var(--pad-x) clamp(60px, 8vh, 100px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (max-width: 900px) {
  .podcast-hero { grid-template-columns: 1fr; }
}

.podcast-mock {
  max-width: 380px;
  margin: 0 auto;
  background: linear-gradient(180deg, #141d2e, #0c121d);
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  padding: 22px;
  box-shadow:
    0 40px 80px -20px rgba(0,0,0,0.6),
    0 0 80px -30px rgba(0, 200, 214, 0.35);
  position: relative;
}

/* Cover stack — covers absolutely stacked, JS toggles .active */
.podcast-cover-stack {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 50px -16px rgba(0,0,0,0.6);
}
.podcast-cover {
  position: absolute;
  inset: 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
.podcast-cover.active { opacity: 1; transform: scale(1); }
.pc-meta {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  opacity: 0.75;
}
.pc-title {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 700;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-top: auto;
}
.pc-host {
  font-family: var(--f-body);
  font-size: 12px;
  margin-top: 8px;
  opacity: 0.75;
  font-style: italic;
}

.podcast-now {
  margin-top: 18px;
  min-height: 50px;
}
.podcast-now-line {
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.45;
  color: var(--content);
  transition: opacity 400ms var(--ease-out);
}
.podcast-now-line em { color: var(--accent-bright); font-style: italic; }

.podcast-waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 36px;
  margin-top: 10px;
}
.podcast-waveform span {
  flex: 1;
  background: linear-gradient(180deg, var(--interactive), rgba(0,200,214,0.3));
  border-radius: 2px;
  animation: waveBar 1.4s ease-in-out infinite;
}
.podcast-waveform span:nth-child(2n)  { animation-delay: 0.08s; }
.podcast-waveform span:nth-child(3n)  { animation-delay: 0.16s; }
.podcast-waveform span:nth-child(5n)  { animation-delay: 0.24s; }
.podcast-waveform span:nth-child(7n)  { animation-delay: 0.32s; }
.podcast-waveform span:nth-child(11n) { animation-delay: 0.4s; }

.podcast-scrub { margin-top: 12px; }
.scrub-track {
  height: 3px;
  background: rgba(232, 228, 217, 0.1);
  border-radius: 3px;
  overflow: hidden;
}
.scrub-fill {
  height: 100%;
  width: 42%;
  background: linear-gradient(90deg, var(--interactive), var(--accent-bright));
}
.scrub-times {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--content-dim);
  font-variant-numeric: tabular-nums;
}

.podcast-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
}
.pc-icon {
  background: transparent;
  border: none;
  color: var(--content-secondary);
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pc-play {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--content);
  color: #0a0a0a;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px -6px rgba(232, 228, 217, 0.3);
}

/* =========================================================
   LADDER
   ========================================================= */

.ladder {
  padding: clamp(100px, 14vh, 180px) var(--pad-x);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212, 160, 74, 0.08), transparent 60%),
    var(--bg);
  position: relative;
  z-index: 1;
}
.ladder-inner {
  max-width: 820px;
  margin: 0 auto;
}
.ladder-lede {
  max-width: 580px;
  margin: 20px auto 64px;
  text-align: center;
}

.ladder-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border-radius: 20px;
  overflow: hidden;
}
.step {
  background: var(--surface);
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  align-items: start;
  transition: background 200ms var(--ease-out);
}
.step:hover {
  background: var(--surface-hover);
}
.step-num {
  font-family: var(--f-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--content-dim);
  letter-spacing: 0.1em;
  padding-top: 2px;
}
.step-body h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 24px;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.step-body p {
  font-family: var(--f-body);
  font-size: 16px;
  color: var(--content-secondary);
  margin: 0;
  line-height: 1.5;
}
.step-body p em { color: var(--accent-bright); font-style: italic; }

.step-final {
  background: linear-gradient(90deg, rgba(212, 160, 74, 0.12), rgba(212, 160, 74, 0.04));
}
.step-final .step-num { color: var(--accent); }
.step-final .step-body h3 { color: var(--accent-bright); }

/* =========================================================
   PROOF FLOW
   ========================================================= */

.proof-flow {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) var(--pad-x);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  position: relative;
  z-index: 1;
}
.proof-flow-copy { max-width: 520px; }
.proof-flow-kicker {
  margin-top: 24px;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.5;
  color: var(--content);
  border-left: 2px solid var(--accent);
  padding-left: 18px;
}
.proof-flow-kicker em {
  font-style: italic;
  color: var(--accent-bright);
}

.proof-flow-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  position: relative;
}

.proof-mock {
  width: min(320px, 100%);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

/* Recording state */
.proof-mock-recording {
  position: relative;
  transform: rotate(-1.5deg);
  background:
    radial-gradient(circle at 50% 110%, rgba(216, 85, 85, 0.12), transparent 60%),
    var(--surface);
}
.proof-mock-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.proof-chip {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--content);
  background: rgba(232, 228, 217, 0.08);
  border: 1px solid var(--border-strong);
  padding: 6px 10px;
  border-radius: 999px;
}
.proof-timer {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--content-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.proof-timer-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #D85555;
  box-shadow: 0 0 8px rgba(216, 85, 85, 0.7);
  animation: proofPulse 1.2s ease-in-out infinite;
}
@keyframes proofPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}

.proof-mock-body { padding: 8px 0 14px; }
.proof-wave {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
}
.proof-wave span {
  display: block;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  animation: proofWave 1.1s ease-in-out infinite;
  opacity: 0.85;
}
.proof-wave span:nth-child(odd)  { height: 28%; animation-delay: -0.1s; }
.proof-wave span:nth-child(3n)   { height: 60%; animation-delay: -0.3s; }
.proof-wave span:nth-child(4n)   { height: 80%; animation-delay: -0.5s; }
.proof-wave span:nth-child(5n)   { height: 45%; animation-delay: -0.7s; }
.proof-wave span:nth-child(7n)   { height: 92%; animation-delay: -0.2s; }
@keyframes proofWave {
  0%, 100% { transform: scaleY(0.4); }
  50%      { transform: scaleY(1); }
}

.proof-mock-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.proof-mic {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(180deg, #E25555, #B83434);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(216, 85, 85, 0.5);
  animation: proofMicPulse 1.6s ease-out infinite;
}
@keyframes proofMicPulse {
  0%   { box-shadow: 0 0 0 0 rgba(216, 85, 85, 0.5); }
  100% { box-shadow: 0 0 0 14px rgba(216, 85, 85, 0); }
}
.proof-hint {
  font-family: var(--f-ui);
  font-size: 13px;
  color: var(--content-secondary);
}

/* Score state */
.proof-mock-score {
  position: relative;
  transform: rotate(1.5deg) translateY(-10px);
  background:
    radial-gradient(circle at 50% 0%, rgba(212, 160, 74, 0.16), transparent 70%),
    var(--surface);
  border-color: rgba(212, 160, 74, 0.35);
}
.proof-score-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.proof-tier {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-ui);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-bright);
}
.proof-score-overall {
  font-family: var(--f-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--content);
}
.proof-score-overall span {
  font-size: 13px;
  color: var(--content-dim);
}

.proof-concepts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.proof-concepts li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--f-ui);
  font-size: 14px;
  color: var(--content);
}
.proof-concept-name { color: var(--content); }
.proof-stars {
  font-family: var(--f-mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
}
.proof-star-empty { color: rgba(232, 228, 217, 0.18); }

.proof-publish {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent-deep));
  color: #1A1410;
  font-family: var(--f-ui);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: default;
}

@media (max-width: 800px) {
  .proof-flow {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .proof-mock-recording { transform: none; }
  .proof-mock-score { transform: none; }
}

/* =========================================================
   ARCHETYPES
   ========================================================= */

.archetypes {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) var(--pad-x);
  position: relative;
  z-index: 1;
}

.archetype-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}
@media (max-width: 900px) {
  .archetype-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .archetype-grid { grid-template-columns: 1fr; }
}

.arc-card {
  background: linear-gradient(180deg, var(--surface-raised), var(--surface));
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 28px 24px;
  transition: transform 400ms var(--ease-out-back), border-color 300ms var(--ease-out), box-shadow 400ms var(--ease-out);
  cursor: default;
  position: relative;
  overflow: hidden;
}
.arc-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(232, 184, 74, 0.08), transparent);
  transition: left 700ms var(--ease-out);
}
.arc-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--accent);
  box-shadow: 0 20px 40px -16px rgba(212, 160, 74, 0.3);
}
.arc-card:hover::before { left: 100%; }

.arc-eyebrow {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--content-dim);
  margin-bottom: 4px;
}
.arc-card h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.05;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.arc-tag {
  font-family: var(--f-body);
  font-style: italic;
  font-size: 14px;
  color: var(--content);
  margin: 0 0 12px;
}
.arc-desc {
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--content-secondary);
  margin: 0 0 20px;
}
.arc-strengths {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.arc-strengths span {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  background: rgba(232, 228, 217, 0.06);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--content-secondary);
}

/* =========================================================
   TESTIMONIALS
   ========================================================= */

.testimonials {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) var(--pad-x);
  position: relative;
  z-index: 1;
}
.quote-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 48px;
}
@media (max-width: 820px) {
  .quote-grid { grid-template-columns: 1fr; }
}

.quote {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  margin: 0;
  transition: border-color 300ms var(--ease-out), transform 300ms var(--ease-out);
}
.quote:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.quote blockquote {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 22px;
  line-height: 1.35;
  color: var(--content);
  margin: 0 0 20px;
  letter-spacing: -0.005em;
}
.quote figcaption {
  font-family: var(--f-ui);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.quote-name { color: var(--content); font-weight: 600; }
.quote-role { color: var(--content-dim); font-size: 13px; }

/* =========================================================
   FINAL CTA
   ========================================================= */

.final-cta {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(100px, 16vh, 180px) var(--pad-x);
  text-align: center;
  position: relative;
  z-index: 1;
}
.final-cta .display { margin-bottom: 48px; }

.store-badges {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 32px 0 0;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #000;
  border: 1px solid rgba(232, 228, 217, 0.22);
  border-radius: 12px;
  color: var(--content);
  transition: border-color 180ms var(--ease-out), transform 180ms var(--ease-out),
              background 180ms var(--ease-out);
  min-width: 168px;
}
.store-badge:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  background: #050505;
}
.store-glyph {
  flex-shrink: 0;
}
.store-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-align: left;
}
.store-eyebrow {
  font-family: var(--f-ui);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: rgba(232, 228, 217, 0.75);
  margin-bottom: 3px;
}
.store-title {
  font-family: var(--f-ui);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--content);
}

.final-meta {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--content-dim);
  margin-top: 24px;
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  padding: 60px var(--pad-x) 40px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
  background: var(--bg);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.footer-tagline {
  font-size: 12px;
  color: var(--content-dim);
  margin-top: 4px;
}
.footer-nav {
  display: flex;
  gap: 20px;
  font-family: var(--f-ui);
  font-size: 13px;
  flex-wrap: wrap;
}
.footer-nav a {
  color: var(--content-dim);
  transition: color 200ms var(--ease-out);
}
.footer-nav a:hover { color: var(--content); }
.footer-copy {
  font-size: 12px;
  color: var(--content-dim);
}

/* =========================================================
   IMAGE LIGHTBOX
   Tap any sentence image in the spark demo to open a full-size
   preview. Click outside or hit the X to close.
   ========================================================= */

.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 9, 18, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 200ms var(--ease-out);
}
.img-lightbox.is-open {
  display: flex;
  opacity: 1;
}
.img-lightbox-inner {
  margin: 0;
  max-width: min(960px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transform: scale(0.96);
  transition: transform 220ms var(--ease-out);
}
.img-lightbox.is-open .img-lightbox-inner { transform: scale(1); }
.img-lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  width: auto;
  height: auto;
  border-radius: 12px;
  background: rgba(248, 245, 236, 0.96);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  object-fit: contain;
}
.img-lightbox.is-photo img { background: transparent; }
.img-lightbox-caption {
  font-family: var(--f-body);
  font-style: italic;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(232, 228, 217, 0.75);
  text-align: center;
  max-width: 640px;
}
.img-lightbox-caption:empty { display: none; }
.img-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(15, 22, 40, 0.7);
  color: var(--content);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 180ms var(--ease-out), border-color 180ms var(--ease-out);
}
.img-lightbox-close:hover {
  background: rgba(15, 22, 40, 0.95);
  border-color: var(--accent);
}

/* =========================================================
   TOPIC RIVER
   A slow ticker of catalog breadth under the hero. Two identical
   groups inside the track; animating to -50% loops seamlessly.
   ========================================================= */

.topic-river {
  position: relative;
  z-index: 1;
  margin-top: clamp(40px, 5vh, 76px);
  padding: 4px 0 10px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.topic-river-track {
  display: flex;
  width: max-content;
  animation: riverScroll 80s linear infinite;
}
.topic-river-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.topic {
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: rgba(232, 228, 217, 0.4);
  white-space: nowrap;
  padding-right: 28px;
}
.topic::before {
  content: '✦';
  color: rgba(212, 160, 74, 0.5);
  font-size: 9px;
  margin-right: 28px;
  vertical-align: 1px;
}
@keyframes riverScroll {
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .topic-river-track { animation: none; }
}

/* =========================================================
   ASK — the Orb
   Visual (scripted agent chat) left, copy right on desktop;
   copy first on mobile.
   ========================================================= */

.ask {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) var(--pad-x);
  position: relative;
  z-index: 1;
}
.ask-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 900px) {
  .ask-grid { grid-template-columns: 1fr; }
  .ask-visual { order: 2; }
}

.agent-mock {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
  background: linear-gradient(180deg, #131b2c, #0c121d);
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  padding: 18px 18px 16px;
  box-shadow:
    0 40px 80px -20px rgba(0, 0, 0, 0.6),
    0 0 80px -30px rgba(212, 160, 74, 0.35);
  display: flex;
  flex-direction: column;
}

.agent-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 14px;
  border-bottom: 1px solid var(--border);
}
.agent-orb-wrap {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}
.agent-name {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 700;
  font-size: 18px;
  color: var(--content);
  line-height: 1.1;
}
.agent-status {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--content-dim);
  margin-top: 4px;
  transition: color 300ms var(--ease-out);
}
.agent-status.is-thinking { color: var(--accent); }

.agent-thread {
  height: 332px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  gap: 10px;
  padding: 16px 2px;
  overflow: hidden;
  transition: opacity 420ms var(--ease-out);
}

.msg {
  max-width: 86%;
  padding: 12px 15px;
  border-radius: 16px;
  font-family: var(--f-body);
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--content);
  opacity: 0;
  transform: translateY(8px);
  animation: msgIn 380ms var(--ease-out) forwards;
}
@keyframes msgIn {
  to { opacity: 1; transform: translateY(0); }
}
.msg-user {
  align-self: flex-end;
  background: rgba(232, 184, 74, 0.14);
  border: 1px solid rgba(232, 184, 74, 0.28);
  border-bottom-right-radius: 6px;
}
.msg-orb {
  align-self: flex-start;
  background: rgba(232, 228, 217, 0.05);
  border: 1px solid var(--border);
  border-bottom-left-radius: 6px;
}
.msg .kw {
  display: inline-block;
  opacity: 0;
  transform: translateY(5px);
  animation: kwIn 420ms cubic-bezier(0.33, 1, 0.68, 1) forwards;
}
.msg-typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 15px 16px;
}
.msg-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(232, 228, 217, 0.5);
  animation: typingBlink 1.1s ease-in-out infinite;
}
.msg-typing span:nth-child(2) { animation-delay: 0.18s; }
.msg-typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes typingBlink {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50%      { opacity: 1;   transform: translateY(-2px); }
}

.agent-chip {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 11px 14px;
  background: linear-gradient(135deg,
    rgba(232, 228, 217, 0.10),
    rgba(232, 228, 217, 0.04));
  border: 1px solid rgba(232, 184, 74, 0.35);
  border-radius: 14px;
  text-decoration: none;
  opacity: 0;
  transform: translateY(8px);
  animation: msgIn 380ms var(--ease-out) forwards;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 16px rgba(232, 184, 74, 0.10);
  transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.agent-chip:hover {
  border-color: rgba(232, 184, 74, 0.6);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3), 0 0 22px rgba(232, 184, 74, 0.2);
}
.agent-chip-glyph {
  font-size: 16px;
  color: var(--accent-bright);
}
.agent-chip-body {
  display: flex;
  flex-direction: column;
}
.agent-chip-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--content);
  line-height: 1.2;
}
.agent-chip-sub {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 3px;
}
.agent-chip-arrow {
  color: var(--accent-bright);
  opacity: 0.8;
}

.agent-input {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 8px 0 16px;
  background: rgba(10, 14, 26, 0.55);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  position: relative;
}
.agent-input-text {
  font-family: var(--f-body);
  font-size: 14px;
  color: var(--content);
  white-space: nowrap;
  overflow: hidden;
}
.agent-input-caret {
  flex-shrink: 0;
  width: 2px;
  height: 16px;
  background: var(--accent);
  margin-left: 2px;
  animation: caretBlink 1s steps(2) infinite;
}
.agent-input-hint {
  position: absolute;
  left: 17px;
  font-family: var(--f-body);
  font-style: italic;
  font-size: 14px;
  color: var(--content-dim);
  transition: opacity 200ms var(--ease-out);
  pointer-events: none;
}
.agent-input-hint.hidden { opacity: 0; }
.agent-input-send {
  margin-left: auto;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(232, 184, 74, 0.14);
  border: 1px solid rgba(232, 184, 74, 0.35);
  color: var(--accent-bright);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms var(--ease-out), color 200ms var(--ease-out);
}
.agent-input-send.armed {
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: #0A0E1A;
}

@media (prefers-reduced-motion: reduce) {
  .msg, .agent-chip {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .msg .kw {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .msg-typing span { animation: none; }
  .agent-input-caret { display: none; }
}

/* =========================================================
   FINAL QR
   Desktop bridge to the phone — scan instead of mailing
   yourself a link. Hidden below 900px (you'd just tap).
   ========================================================= */

.final-qr {
  display: none;
}
@media (min-width: 900px) {
  .final-qr {
    margin: 40px auto 0;
    display: inline-flex;
    align-items: center;
    gap: 18px;
    padding: 16px 22px 16px 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(17, 24, 39, 0.5);
  }
}
.final-qr img {
  width: 112px;
  height: 112px;
  display: block;
  opacity: 0.92;
}
.final-qr-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--content-secondary);
  text-align: left;
  line-height: 1.8;
}

/* =========================================================
   MOBILE TUNE-UPS
   - Bump body / pain / feature copy so it reads on phones
   - Drop the nav backdrop-blur (jitter on iOS Safari over the
     fixed constellation canvas)
   - Map: switch to `meet` so labels don't get cropped
   - Tighten section padding so things don't feel airy
   ========================================================= */

@media (max-width: 720px) {
  /* Body text up a notch for readability */
  body { font-size: 17px; }

  .pain-text { font-size: 17.5px; line-height: 1.5; }
  .feature-list li { font-size: 17px; padding: 12px 0; }
  .feature-list { margin-top: 20px; }
  .body { font-size: 17.5px; }
  .lede { font-size: 18px; line-height: 1.5; }
  .subtle { font-size: 17.5px; }
  .map-lede { font-size: 17px; }

  /* Tighten breathing room on small screens — the desktop
     12vh top/bottom padding leaves big gaps that hurt rhythm. */
  .pains,
  .spark,
  .chain,
  .map,
  .holo-sec,
  .podcast-hero,
  .ask,
  .proof-flow {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .agent-thread { height: 300px; }

  .section-head { margin-bottom: 36px; }

  .pain-card { padding: 28px 24px; border-radius: 16px; }
  .pain-stat { font-size: 52px; margin-bottom: 10px; }

  /* Hero CTAs: full-width buttons read better than the cramped
     desktop pill row. */
  .hero-ctas { gap: 10px; }
  .cta-primary { font-size: 16px; padding: 14px 22px; }
  .hero-search { font-size: 16px; min-width: 0; width: 100%; }

  /* Display-2 a touch larger so subsection headings have punch */
  .display-2 { font-size: 36px; line-height: 1.05; }

  /* Map on mobile: portrait stage with a portrait-relaid constellation
     (see landing.js: MOBILE_MAP). Auto-loops Day 1 → Year 1; the
     scrubber and hover card are desktop-only affordances. */
  .map-stage-inner { aspect-ratio: 3 / 4; cursor: default; }
  .map-readout { top: 14px; left: 14px; }
  .map-readout-num { font-size: 28px; }
  .map-readout-cap { font-size: 9px; letter-spacing: 0.14em; }
  .map-scrubber { display: none; }
  .map-card { display: none; }

  /* Chain: a touch more breathing room around the now-vertical
     constellation, and pull the punchline closer. */
  .chain-wrap { max-width: 380px; }
  .chain-punchline { margin-top: 28px; font-size: 18px; }

  /* Spark phone mock fits cleaner without the desktop-sized
     glow margins. */
  .phone-mock { max-width: 320px; }

  /* Holo card sized down so it fits in portrait without crowding */
  .holo-stage-wrap { max-width: 320px; }

  /* Final CTA buttons stack readably */
  .final-cta-row { flex-direction: column; align-items: stretch; }
  .final-cta-row a { justify-content: center; }
  .cta-large { font-size: 16px; padding: 16px 24px; }
}

/* Slightly tighter spacing on very small screens */
@media (max-width: 380px) {
  .display { font-size: 38px; }
  .display-2 { font-size: 32px; }
  .pain-stat { font-size: 46px; }
}

/* Honor prefers-reduced-motion for the lightbox */
@media (prefers-reduced-motion: reduce) {
  .img-lightbox, .img-lightbox-inner { transition: none; }
}
