/* =============================================================================
   GROUNDS — Apologetics App
   Cinematic & dramatic design system. Cold cosmos (blues/violets) resolving into
   warm transcendent gold at "the cause." All visual tokens live here.
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------- */
:root {
  /* Space / background */
  --void:      #04050a;
  --space-1:   #070b16;
  --space-2:   #0d1426;
  --space-3:   #141d35;
  --panel:     rgba(18, 26, 48, 0.55);
  --panel-brd: rgba(120, 150, 220, 0.14);

  /* Ink */
  --ink:       #eef2fb;
  --ink-soft:  #c3cce2;
  --muted:     #8590ac;
  --faint:     #5b6480;

  /* Cosmos accents (cold) */
  --cool:      #5aa2ff;
  --cool-2:    #7c6bff;
  --cool-glow: rgba(90, 162, 255, 0.35);

  /* Transcendent accent (warm — "the cause") */
  --gold:      #f6c65b;
  --gold-2:    #ffdf9e;
  --gold-deep: #c9962f;
  --gold-glow: rgba(246, 198, 91, 0.30);

  /* Type */
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Rhythm */
  --maxw: 940px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(80px, 14vh, 180px);
  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Reset-ish ----------------------------------------------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--void);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--gold-glow); color: #fff; }
strong { color: #f7f9ff; font-weight: 700; }

/* ---- Cosmic background layers ------------------------------------------- */
#starfield {
  position: fixed; inset: 0; z-index: -2;
  display: block;
}
.bg-gradient {
  position: fixed; inset: 0; z-index: -3;
  background:
    radial-gradient(1200px 800px at 70% -10%, rgba(124,107,255,0.16), transparent 60%),
    radial-gradient(1000px 700px at 10% 110%, rgba(90,162,255,0.12), transparent 60%),
    linear-gradient(180deg, var(--void), var(--space-1) 40%, var(--space-2));
}
.bg-vignette {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 30%, transparent 55%, rgba(2,3,7,0.75));
}

/* ---- Shared layout ------------------------------------------------------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
section { padding-block: var(--section-y); position: relative; }

.overline {
  font-size: 0.78rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--gold); font-weight: 600;
}
.overline.cool { color: var(--cool); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.06; }
h2.display { font-size: clamp(2.2rem, 6vw, 4.4rem); letter-spacing: -0.01em; }
h3.sub { font-size: clamp(1.5rem, 3.4vw, 2.3rem); }
.lead { font-size: clamp(1.05rem, 1.9vw, 1.28rem); color: var(--ink-soft); max-width: 60ch; }

/* ---- Top bar ------------------------------------------------------------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(4,5,10,0.85), rgba(4,5,10,0));
  transition: background .4s var(--ease);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.25rem; letter-spacing: .02em; }
.brand .mark {
  width: 26px; height: 26px; display: grid; place-items: center;
  color: var(--gold); filter: drop-shadow(0 0 10px var(--gold-glow));
}
.topbar .module-tag { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 620px) { .topbar .module-tag { display: none; } }

/* ---- HERO ---------------------------------------------------------------- */
.hero {
  min-height: 100svh; display: grid; align-items: center;
  padding-top: 80px; text-align: center;
}
.hero .origin {
  font-size: .82rem; letter-spacing: .12em; color: var(--muted);
  margin-top: 22px; font-style: italic; font-family: var(--serif);
}
@media (max-width: 620px) {
  .hero .origin { font-size: .95rem; line-height: 1.6; letter-spacing: .06em; }
}
.hero h1 {
  font-size: clamp(2.8rem, 9vw, 6.4rem);
  background: linear-gradient(180deg, #fff, var(--ink-soft) 60%, var(--cool));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-top: 14px;
}
.hero .hero-sub { color: var(--ink-soft); font-family: var(--serif); font-size: clamp(1.2rem,3vw,1.7rem); font-style: italic; margin-top: 20px; }
.scroll-cue {
  margin-top: 54px; color: var(--muted); font-size: .78rem; letter-spacing: .24em; text-transform: uppercase;
  display: inline-flex; flex-direction: column; align-items: center; gap: 10px;
}
.scroll-cue .chev { width: 20px; height: 20px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  transform: rotate(45deg); animation: bob 1.8s var(--ease) infinite; }
@keyframes bob { 0%,100%{ transform: rotate(45deg) translate(0,0); opacity:.4 } 50%{ transform: rotate(45deg) translate(4px,4px); opacity:1 } }

/* ---- Passage (generic statement / big question) ------------------------- */
.passage.center { text-align: center; }
.passage.left   { text-align: left; }
.passage .passage-big {
  font-family: var(--serif); line-height: 1.06; margin: 16px 0 24px;
  font-size: clamp(1.9rem, 5.6vw, 4rem);
  background: linear-gradient(180deg, #fff, var(--gold-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.passage.center .passage-big { margin-inline: auto; max-width: 17ch; }
.passage.left .passage-big { max-width: 20ch; }
.passage.center .lead { margin-inline: auto; }

/* ---- Home landing -------------------------------------------------------- */
.home-hero { text-align: center; }
.home-title {
  font-size: clamp(3.4rem, 12vw, 8rem) !important;
  /* background-image (not the `background` shorthand) so background-clip:text survives */
  background-image: linear-gradient(180deg, #fff, var(--gold-2) 55%, var(--gold-deep)) !important;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---- Syllogism (the centerpiece) ---------------------------------------- */
.syllogism { display: grid; gap: 18px; max-width: 780px; margin-inline: auto; }
.syl-line {
  position: relative; padding: 26px 30px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--panel-brd);
  backdrop-filter: blur(8px);
}
.syl-line .label { font-size: .74rem; letter-spacing: .24em; text-transform: uppercase; color: var(--cool); font-weight: 600; }
.syl-line .text { font-family: var(--serif); font-size: clamp(1.4rem, 3.6vw, 2.1rem); margin-top: 8px; line-height: 1.15; }
.syl-line.conclusion { border-color: rgba(246,198,91,0.4); background: linear-gradient(180deg, rgba(246,198,91,0.10), rgba(246,198,91,0.02)); }
.syl-line.conclusion .label { color: var(--gold); }
.syl-line.conclusion .text { color: var(--gold-2); text-shadow: 0 0 30px var(--gold-glow); }
.syl-connector { width: 2px; height: 26px; margin: -8px auto; background: linear-gradient(var(--cool), transparent); opacity: .6; }

/* ---- Syllogism note ------------------------------------------------------ */
.syl-note {
  text-align: center; margin: 26px auto 0; max-width: 52ch; color: var(--muted);
  font-style: italic; font-family: var(--serif); font-size: 1.05rem;
}
.plain-english {
  max-width: 680px; margin: 22px auto 0; padding: 18px 22px;
  border: 1px solid rgba(90,162,255,0.24); border-radius: 14px;
  background: linear-gradient(90deg, rgba(90,162,255,0.09), rgba(18,26,48,0.28));
  text-align: left;
}
.plain-english span {
  display: block; margin-bottom: 5px; color: var(--cool); font-size: .7rem;
  font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
}
.plain-english p { color: var(--ink-soft); font-size: 1rem; }

/* ---- Progressive depth -------------------------------------------------- */
.deep-section { padding-top: clamp(42px, 8vh, 90px); }
.deep-heading { max-width: 720px; margin: 0 auto 24px; text-align: center; }
.deep-heading h2 { margin-top: 10px; font-size: clamp(1.6rem, 3.4vw, 2.35rem); }
.deep-heading p { margin-top: 10px; color: var(--muted); }
.deep-dives { max-width: 780px; margin-inline: auto; display: grid; gap: 12px; }
.deep-dive {
  border: 1px solid rgba(90,162,255,0.2); border-radius: 14px;
  background: linear-gradient(180deg, rgba(90,162,255,0.06), rgba(18,26,48,0.42));
  overflow: hidden; transition: border-color .3s var(--ease), background .3s var(--ease);
}
.deep-dive[open] { border-color: var(--cool-glow); background: rgba(18,26,48,0.68); }
.deep-dive summary {
  cursor: pointer; list-style: none; padding: 18px 22px; display: flex;
  align-items: center; gap: 14px; color: var(--ink); font-weight: 600;
}
.deep-dive summary::-webkit-details-marker { display: none; }
.deep-dive .plus {
  margin-left: auto; flex: none; color: var(--cool); font-size: 1.35rem;
  transition: transform .3s var(--ease);
}
.deep-dive[open] .plus { transform: rotate(45deg); }
.deep-answer { padding: 0 22px 20px; color: var(--ink-soft); }
.deep-answer::before {
  content: ""; display: block; height: 1px; margin-bottom: 16px;
  background: rgba(90,162,255,0.16);
}

/* ---- Pillars (two-column feature: knowing/showing, believer/unbeliever) -- */
.pillars { display: grid; gap: 22px; margin-top: 40px; }
@media (min-width: 820px) { .pillars { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .pillars.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pillar {
  padding: 30px 28px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--panel-brd);
  /* NOTE: no backdrop-filter here — on tall grid items it suppresses child
     painting in some renderers. The solid panel background is enough. */
}
.pillar-label {
  font-family: var(--serif); font-size: 1.5rem; color: var(--gold-2); margin-bottom: 10px;
}
.pillar-lead { color: var(--ink-soft); font-size: 1.02rem; margin-bottom: 22px; }
.pillar-point { padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--panel-brd); }
.pillar-point:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
.pillar-point h5 { font-family: var(--sans); font-weight: 600; font-size: 1rem; color: #fff; margin-bottom: 6px; }
.pillar-point p { color: var(--ink-soft); font-size: .95rem; }

/* ---- Callout with contrast (magisterial vs. ministerial, knowing/showing) - */
.callout-section { text-align: center; }
.contrast { display: grid; gap: 16px; margin-top: 36px; align-items: stretch; }
@media (min-width: 760px) { .contrast { grid-template-columns: 1fr auto 1fr; align-items: center; } }
.contrast-card {
  text-align: left; padding: 26px 26px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--panel-brd); height: 100%;
}
.contrast-card.gold { border-color: rgba(246,198,91,0.4); background: linear-gradient(180deg, rgba(246,198,91,0.09), rgba(246,198,91,0.015)); }
.contrast-card.cool { border-color: rgba(90,162,255,0.32); background: linear-gradient(180deg, rgba(90,162,255,0.07), transparent); }
.contrast-label { font-family: var(--serif); font-size: 1.35rem; margin-bottom: 8px; }
.contrast-card.gold .contrast-label { color: var(--gold-2); }
.contrast-card.cool .contrast-label { color: var(--cool); }
.contrast-card p { color: var(--ink-soft); font-size: 1rem; }
.vs {
  font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1.1rem;
  text-align: center; padding: 6px 0;
}
.callout-note {
  max-width: 62ch; margin: 34px auto 0; color: var(--ink-soft); font-size: 1.05rem; line-height: 1.7;
}

/* ---- Clickable companion section ---------------------------------------- */
.portal-section { padding-top: clamp(28px, 6vh, 64px); padding-bottom: clamp(72px, 12vh, 140px); }
.portal-card {
  display: grid; gap: 30px; padding: clamp(28px, 5vw, 48px); border-radius: 22px;
  color: inherit; text-decoration: none; overflow: hidden; position: relative;
  border: 1px solid rgba(90,162,255,0.36);
  background:
    radial-gradient(620px 260px at 100% 0%, rgba(124,107,255,0.18), transparent 70%),
    linear-gradient(135deg, rgba(90,162,255,0.10), rgba(18,26,48,0.62) 58%, rgba(246,198,91,0.06));
  transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.portal-card::after {
  content: ""; position: absolute; width: 190px; height: 190px; right: -90px; bottom: -110px;
  border: 1px solid rgba(246,198,91,0.20); border-radius: 50%; box-shadow: 0 0 60px rgba(246,198,91,0.08);
}
.portal-card:hover { transform: translateY(-4px); border-color: var(--cool); box-shadow: 0 22px 70px -34px var(--cool-glow); }
.portal-copy { position: relative; z-index: 1; }
.portal-copy h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin-top: 10px; max-width: 19ch; }
.portal-copy > p { color: var(--ink-soft); font-size: 1.06rem; max-width: 60ch; margin-top: 14px; }
.portal-points { display: grid; gap: 9px; margin-top: 24px; }
.portal-point { display: flex; align-items: baseline; gap: 11px; color: var(--ink-soft); font-size: .96rem; }
.portal-point > span { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--gold); box-shadow: 0 0 12px var(--gold-glow); }
.portal-cta {
  position: relative; z-index: 1; align-self: end; justify-self: start; display: inline-flex; align-items: center; gap: 12px;
  color: var(--gold-2); border: 1px solid rgba(246,198,91,0.36); border-radius: 100px;
  padding: 11px 18px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(246,198,91,0.08);
}
@media (min-width: 760px) {
  .portal-card { grid-template-columns: 1fr auto; align-items: end; }
  .portal-cta { justify-self: end; }
}

/* ---- Module nav (prev / roadmap / next) --------------------------------- */
.module-nav {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch;
  padding-block: 20px 10px; margin-top: 40px;
}
.mod-link {
  display: flex; flex-direction: column; gap: 4px; padding: 18px 22px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--panel-brd); text-decoration: none;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.mod-link:hover { border-color: var(--cool-glow); transform: translateY(-2px); }
.mod-link.empty { background: transparent; border: none; pointer-events: none; }
.mod-link.next { text-align: right; }
.mod-link.home { text-align: center; }
.mod-link .dir { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.mod-link .mt { font-family: var(--serif); font-size: 1.12rem; color: var(--ink); }
@media (max-width: 620px) {
  .module-nav { grid-template-columns: 1fr; }
  .mod-link.next, .mod-link.home { text-align: left; }
  .mod-link.empty { display: none; }
  .plain-english { padding: 16px 18px; }
  .deep-dive summary { padding: 17px 18px; }
  .deep-answer { padding: 0 18px 18px; }
}

/* ---- Defense sections ---------------------------------------------------- */
.premise-block { margin-top: 10px; }
.premise-head .lead { margin-top: 14px; }
.cases { display: grid; gap: 18px; margin-top: 34px; }
@media (min-width: 720px) { .cases.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 720px) { .cases.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.case-card {
  padding: 24px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--panel-brd);
  transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.case-card:hover { transform: translateY(-4px); border-color: var(--cool-glow); box-shadow: 0 18px 50px -20px var(--cool-glow); }
.case-card h4 { font-family: var(--serif); font-size: 1.32rem; margin-bottom: 8px; color: #fff; }
.case-card p { color: var(--ink-soft); font-size: .98rem; }

/* Two-track layout (philosophical / scientific) */
.tracks { display: grid; gap: 30px; margin-top: 36px; }
@media (min-width: 860px) { .tracks { grid-template-columns: 1fr 1fr; } }
.track { padding: 26px; border-radius: var(--radius); background: rgba(10,16,30,0.5); border: 1px solid var(--panel-brd); }
.track > .track-title {
  font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--cool);
  font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
}
.track > .track-title::before { content:""; width: 8px; height: 8px; border-radius: 50%; background: var(--cool); box-shadow: 0 0 12px var(--cool-glow); }
.track .case-card { background: rgba(18,26,48,0.4); margin-bottom: 14px; }
.track .case-card:last-child { margin-bottom: 0; }

/* ---- Conclusion / properties cascade ------------------------------------ */
.conclusion-section { text-align: center; }
.conclusion-section .big-line {
  font-family: var(--serif); font-size: clamp(2rem,6vw,4rem);
  color: var(--gold-2); text-shadow: 0 0 40px var(--gold-glow); margin: 16px auto 20px; max-width: 18ch;
}
.props { display: grid; gap: 14px; max-width: 720px; margin: 44px auto 0; text-align: left; }
.prop {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: baseline;
  padding: 20px 24px; border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(246,198,91,0.06), transparent);
  border: 1px solid rgba(246,198,91,0.14); border-left: 3px solid var(--gold);
}
.prop .name { font-family: var(--serif); font-size: 1.35rem; color: var(--gold-2); white-space: nowrap; }
.prop .reason { color: var(--ink-soft); font-size: .98rem; }
@media (max-width: 620px) {
  .prop { grid-template-columns: 1fr; gap: 6px; }
  .prop .name { white-space: normal; }
}
.landing-line { max-width: 62ch; margin: 40px auto 0; font-family: var(--serif); font-size: clamp(1.15rem,2.4vw,1.5rem); color: var(--ink); font-style: italic; }

/* ---- Objections (accordion) --------------------------------------------- */
.objections { max-width: 780px; margin-inline: auto; display: grid; gap: 12px; }
.obj {
  border: 1px solid var(--panel-brd); border-radius: 14px; background: var(--panel); overflow: hidden;
  transition: border-color .3s var(--ease);
}
.obj[open] { border-color: var(--cool-glow); }
.obj summary {
  cursor: pointer; list-style: none; padding: 20px 24px; display: flex; gap: 14px; align-items: center;
  font-family: var(--serif); font-size: 1.2rem; color: #fff;
}
.obj summary::-webkit-details-marker { display: none; }
.obj summary .plus { margin-left: auto; color: var(--cool); font-size: 1.5rem; transition: transform .3s var(--ease); flex: none; }
.obj[open] summary .plus { transform: rotate(45deg); }
.obj .answer { padding: 0 24px 22px; color: var(--ink-soft); }
.obj .answer::before { content:""; display:block; height:1px; background: var(--panel-brd); margin-bottom: 18px; }

/* ---- Tradition timeline -------------------------------------------------- */
.timeline { max-width: 760px; margin: 40px auto 0; display: grid; gap: 0; position: relative; }
.tl-item { display: grid; grid-template-columns: 130px 1fr; gap: 24px; padding: 22px 0; border-top: 1px solid var(--panel-brd); }
.tl-item:last-child { border-bottom: 1px solid var(--panel-brd); }
.tl-item .era { color: var(--gold); font-weight: 600; font-size: .9rem; letter-spacing: .04em; }
.tl-item .who { font-family: var(--serif); font-size: 1.35rem; color: #fff; }
.tl-item .note { color: var(--muted); font-size: .95rem; margin-top: 4px; }
@media (max-width: 620px) { .tl-item { grid-template-columns: 1fr; gap: 6px; } }

/* ---- Image placeholder (ChatGPT prompt slot) ---------------------------- */
.img-slot {
  position: relative; border-radius: var(--radius);
  border: 1.5px dashed rgba(120,150,220,0.35);
  background:
    repeating-linear-gradient(45deg, rgba(90,162,255,0.04) 0 12px, transparent 12px 24px),
    radial-gradient(120% 120% at 50% 0%, rgba(124,107,255,0.10), transparent 70%);
  display: grid; place-items: center; text-align: center; padding: 32px 26px; margin: 40px auto 0;
}
.img-slot .badge {
  font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--cool);
  border: 1px solid var(--cool-glow); border-radius: 100px; padding: 5px 12px; margin-bottom: 16px; display: inline-block;
}
.img-slot .caption { font-family: var(--serif); font-size: 1.25rem; color: var(--ink); margin-bottom: 14px; }
.img-slot .prompt {
  font-size: .86rem; color: var(--muted); max-width: 60ch; margin-inline: auto; line-height: 1.5;
  background: rgba(4,6,12,0.5); border-radius: 10px; padding: 14px 16px; border: 1px solid var(--panel-brd);
}
.img-slot .copy-btn {
  margin-top: 16px; font: inherit; font-size: .82rem; letter-spacing: .06em;
  color: var(--gold-2); background: rgba(246,198,91,0.10); border: 1px solid rgba(246,198,91,0.35);
  padding: 9px 18px; border-radius: 100px; cursor: pointer; transition: all .25s var(--ease);
}
.img-slot .copy-btn:hover { background: rgba(246,198,91,0.2); }
/* Placeholders grow to fit their prompt text; the ratio is only a minimum so
   short slots still feel image-shaped. Real images (.has-image) crop to ratio. */
.img-slot[data-aspect="16/9"] { min-height: clamp(200px, 42vw, 360px); }
.img-slot[data-aspect="3/4"]  { min-height: 320px; max-width: 440px; }
.img-slot.has-image { overflow: hidden; padding: 0; display: block; }
.img-slot.has-image[data-aspect="16/9"] { aspect-ratio: 16/9; min-height: 0; }
.img-slot.has-image[data-aspect="3/4"]  { aspect-ratio: 3/4; min-height: 0; }
.img-slot.has-image img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Roadmap ------------------------------------------------------------- */
.roadmap-grid { display: grid; gap: 14px; margin-top: 44px; }
@media (min-width: 720px) { .roadmap-grid { grid-template-columns: 1fr 1fr; } }
.road-card {
  display: flex; gap: 18px; align-items: center; padding: 20px 24px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--panel-brd); transition: all .35s var(--ease);
  text-decoration: none; color: inherit;
}
a.road-card.live { cursor: pointer; }
.road-card .n { font-family: var(--serif); font-size: 1.6rem; color: var(--faint); width: 40px; flex: none; text-align: center; }
.road-card .body h4 { font-size: 1.08rem; color: var(--ink); font-family: var(--sans); font-weight: 600; }
.road-card .body .note { color: var(--muted); font-size: .88rem; }
.road-card .status { margin-left: auto; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); flex: none; }
.road-card.live { border-color: rgba(246,198,91,0.4); background: linear-gradient(90deg, rgba(246,198,91,0.08), var(--panel)); }
.road-card.live .n { color: var(--gold); }
.road-card.live .status { color: var(--gold); }
.road-card.live:hover { transform: translateY(-3px); box-shadow: 0 18px 50px -22px var(--gold-glow); }

/* ---- 100 Hard Questions ------------------------------------------------- */
.qa-library { max-width: 1180px; padding-top: 130px; padding-bottom: 110px; }
.qa-hero { max-width: 800px; margin-bottom: 58px; }
.qa-hero h1 { margin: 10px 0 16px; font-size: clamp(3.5rem, 8vw, 6.8rem); letter-spacing: -.035em; }
.qa-hero .lead { max-width: 62ch; }
.qa-search {
  min-height: 72px; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px;
  align-items: center; margin-top: 32px; padding: 8px 9px 8px 22px; border: 1px solid rgba(90,162,255,.32);
  border-radius: 20px; color: var(--cool); background: rgba(13,20,38,.9); box-shadow: 0 22px 70px rgba(0,0,0,.26);
}
.qa-search input { min-width: 0; border: 0; outline: 0; color: #fff; background: transparent; font: 500 1rem/1.3 var(--sans); }
.qa-search input::placeholder { color: var(--faint); }
.qa-search button {
  min-height: 52px; padding: 0 22px; border: 1px solid rgba(246,198,91,.28); border-radius: 14px;
  color: #1a1204; background: linear-gradient(135deg, var(--gold-2), var(--gold)); font: 700 .78rem/1 var(--sans); cursor: pointer;
}
.qa-layout { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 34px; align-items: start; }
.qa-filters { position: sticky; top: 92px; display: grid; gap: 8px; }
.qa-filters .overline { margin-bottom: 8px; letter-spacing: .2em; }
.qa-filters button {
  min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 15px;
  border: 1px solid var(--panel-brd); border-radius: 13px; color: var(--ink-soft); background: rgba(13,20,38,.56);
  font: 600 .78rem/1.25 var(--sans); text-align: left; cursor: pointer; transition: .22s ease;
}
.qa-filters button strong { color: var(--muted); font-size: .7rem; }
.qa-filters button.active { color: #120e05; border-color: transparent; background: linear-gradient(135deg, var(--gold-2), var(--gold)); }
.qa-filters button.active strong { color: rgba(18,14,5,.58); }
.qa-results-head { min-height: 72px; display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 15px; }
.qa-results-head span { color: var(--cool); font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.qa-results-head h2 { margin-top: 2px; font-size: 2rem; }
.qa-results-head a { min-height: 44px; display: grid; place-items: center; color: var(--muted); font-size: .75rem; text-decoration: none; }
.qa-results { display: grid; gap: 12px; }
.qa-card { overflow: hidden; border: 1px solid var(--panel-brd); border-radius: 18px; background: linear-gradient(145deg, rgba(18,26,48,.9), rgba(8,13,26,.92)); }
.qa-card[open] { border-color: rgba(90,162,255,.42); box-shadow: inset 3px 0 0 var(--cool), 0 18px 50px rgba(0,0,0,.2); }
.qa-card summary { min-height: 100px; display: grid; grid-template-columns: 54px minmax(0,1fr) 42px; gap: 14px; align-items: center; padding: 19px 20px; list-style: none; cursor: pointer; }
.qa-card summary::-webkit-details-marker { display: none; }
.qa-number { color: var(--gold); font-family: var(--serif); font-size: 1.15rem; }
.qa-summary-copy > span { display: block; margin-bottom: 4px; color: var(--cool); font-size: .64rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.qa-summary-copy > strong { display: block; font-family: var(--serif); font-size: 1.35rem; font-weight: 600; line-height: 1.18; }
.qa-plus { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: var(--cool); background: rgba(90,162,255,.09); font-size: 1.25rem; transition: .2s ease; }
.qa-card[open] .qa-plus { transform: rotate(45deg); color: #06101f; background: var(--cool); }
.qa-answer { padding: 0 24px 24px 88px; border-top: 1px solid rgba(120,150,220,.11); }
.qa-answer p { margin: 20px 0; color: var(--ink-soft); line-height: 1.78; }
.qa-answer a { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 11px 15px; border: 1px solid rgba(246,198,91,.2); border-radius: 12px; color: var(--gold); background: rgba(246,198,91,.05); font-size: .72rem; text-decoration: none; }
.qa-answer a strong { color: var(--gold-2); }
.qa-empty { padding: 50px 24px; border: 1px dashed var(--panel-brd); border-radius: 18px; color: var(--muted); text-align: center; }
.qa-empty h3 { margin-bottom: 5px; color: var(--ink); font-size: 1.7rem; }

@media (max-width: 760px) {
  .qa-library { padding-top: 96px; }
  .qa-search { grid-template-columns: 26px minmax(0,1fr); padding-right: 12px; }
  .qa-search button { grid-column: 1 / -1; width: 100%; }
  .qa-layout { grid-template-columns: 1fr; }
  .qa-filters { position: static; display: flex; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .qa-filters .overline { display: none; }
  .qa-filters button { flex: 0 0 auto; }
  .qa-card summary { grid-template-columns: 42px minmax(0,1fr) 38px; padding-inline: 14px; }
  .qa-answer { padding-left: 20px; }
}

/* ---- Footer -------------------------------------------------------------- */
footer { padding: 60px var(--gutter) 80px; text-align: center; border-top: 1px solid var(--panel-brd); }
footer .ack { max-width: 70ch; margin: 0 auto; color: var(--faint); font-size: .8rem; line-height: 1.7; }
footer .sig { font-family: var(--serif); color: var(--muted); margin-bottom: 18px; font-size: 1.1rem; }

/* ---- Scroll-reveal animation -------------------------------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .scroll-cue .chev { animation: none; }
}

/* ---- Toast (copy confirmation) ------------------------------------------ */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--gold); color: #1a1204; font-weight: 600; font-size: .88rem;
  padding: 12px 22px; border-radius: 100px; opacity: 0; pointer-events: none;
  transition: all .4s var(--ease); z-index: 100; box-shadow: 0 10px 40px -8px var(--gold-glow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Mobile lesson player -----------------------------------------------
   Desktop keeps the long-form reading layout. On phones, every content
   section becomes a contained lesson screen with persistent navigation. */
.lesson-page { display: block; }
.mobile-pager,
.lesson-menu,
.mobile-swipe-hint { display: none; }

@keyframes lesson-in-forward {
  from { opacity: 0; transform: translateX(22px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes lesson-in-back {
  from { opacity: 0; transform: translateX(-22px); }
  to { opacity: 1; transform: translateX(0); }
}

/* The device/pointer alternatives cover Android browsers that have retained
   a desktop-sized layout viewport. Ordinary mouse-driven desktops still keep
   the continuous reading layout. */
@media (max-width: 700px),
       (max-device-width: 700px),
       (hover: none) and (pointer: coarse) and (max-width: 1200px) {
  body.lesson-mode {
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: pan-y;
  }
  body.lesson-mode .topbar {
    height: 58px;
    padding-block: 10px;
    background: linear-gradient(180deg, rgba(4,5,10,0.98), rgba(7,11,22,0.92));
    border-bottom: 1px solid rgba(120,150,220,0.10);
  }
  body.lesson-mode .topbar .module-tag { display: none; }
  body.lesson-mode .toast { bottom: calc(94px + env(safe-area-inset-bottom)); }

  #app.mobile-lesson {
    height: 100dvh;
    overflow: hidden;
  }
  #app.mobile-lesson .lesson-page {
    display: none;
    position: fixed;
    z-index: 2;
    inset: 58px 0 calc(80px + env(safe-area-inset-bottom)) 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(90,162,255,0.28) transparent;
  }
  #app.mobile-lesson .lesson-page.active { display: block; }
  #app.mobile-lesson .lesson-page.enter-forward { animation: lesson-in-forward .38s var(--ease) both; }
  #app.mobile-lesson .lesson-page.enter-back { animation: lesson-in-back .38s var(--ease) both; }
  #app.mobile-lesson .lesson-page > section {
    min-height: 100%;
    padding: clamp(30px, 6vh, 52px) 21px 46px;
  }
  #app.mobile-lesson .lesson-page > .hero {
    min-height: 100%;
    padding-top: 26px;
    padding-bottom: 26px;
  }
  #app.mobile-lesson .hero h1 {
    font-size: clamp(2.45rem, 12vw, 3.6rem);
    margin-top: 12px;
  }
  #app.mobile-lesson .hero .hero-sub {
    font-size: 1.18rem;
    line-height: 1.42;
    margin-top: 18px;
  }
  #app.mobile-lesson .hero .origin {
    margin-top: 18px;
    font-size: .88rem;
    line-height: 1.5;
  }
  #app.mobile-lesson .scroll-cue {
    margin-top: 28px;
  }
  #app.mobile-lesson .lesson-cue { cursor: pointer; }
  #app.mobile-lesson .overline {
    font-size: .69rem;
    letter-spacing: .23em;
    line-height: 1.55;
  }
  #app.mobile-lesson h2.sub,
  #app.mobile-lesson h3.sub { font-size: clamp(1.65rem, 7.8vw, 2.15rem); }
  #app.mobile-lesson .passage .passage-big {
    font-size: clamp(2rem, 10vw, 3rem);
    line-height: 1.08;
  }
  #app.mobile-lesson .lead { font-size: 1.02rem; }
  #app.mobile-lesson .cases,
  #app.mobile-lesson .tracks,
  #app.mobile-lesson .pillars,
  #app.mobile-lesson .contrast,
  #app.mobile-lesson .timeline { margin-top: 24px; }
  #app.mobile-lesson .cases,
  #app.mobile-lesson .tracks,
  #app.mobile-lesson .pillars,
  #app.mobile-lesson .contrast { grid-template-columns: 1fr; }
  #app.mobile-lesson .tl-item { grid-template-columns: 1fr; gap: 6px; }
  #app.mobile-lesson .case-card,
  #app.mobile-lesson .pillar,
  #app.mobile-lesson .contrast-card,
  #app.mobile-lesson .track { padding: 20px; }
  #app.mobile-lesson .syl-line { padding: 20px; }
  #app.mobile-lesson .syl-line .text { font-size: 1.45rem; }
  #app.mobile-lesson .img-slot { margin-top: 28px; padding: 24px 18px; }
  #app.mobile-lesson .props { margin-top: 28px; }
  #app.mobile-lesson .conclusion-section .sub { margin-top: 38px !important; }
  #app.mobile-lesson .landing-line { margin-top: 28px; }
  #app.mobile-lesson .objections { gap: 10px; }
  #app.mobile-lesson .obj summary { padding: 17px 18px; font-size: 1.12rem; }
  #app.mobile-lesson .obj .answer { padding: 0 18px 19px; }
  #app.mobile-lesson .module-nav,
  #app.mobile-lesson > footer { display: none; }

  .mobile-pager {
    display: block;
    position: fixed;
    z-index: 90;
    left: 0; right: 0; bottom: 0;
    min-height: calc(80px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(6,9,18,0.96);
    border-top: 1px solid rgba(120,150,220,0.18);
    box-shadow: 0 -18px 50px rgba(0,0,0,0.34);
    backdrop-filter: blur(18px);
  }
  .mobile-progress-track {
    height: 3px;
    background: rgba(120,150,220,0.12);
    overflow: hidden;
  }
  .mobile-progress-track span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--cool), var(--gold));
    box-shadow: 0 0 18px var(--cool-glow);
    transition: width .4s var(--ease);
  }
  .mobile-pager-row {
    height: 76px;
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) 78px;
    align-items: stretch;
  }
  .mobile-pager button {
    appearance: none;
    border: 0;
    color: inherit;
    font: inherit;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--ink-soft) !important;
    font-size: .69rem !important;
    font-weight: 700 !important;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .mobile-nav-button > span[aria-hidden="true"] {
    color: var(--gold);
    font-size: 1.05rem;
  }
  .mobile-section-button {
    align-self: center;
    min-width: 0;
    min-height: 57px;
    padding: 7px 13px;
    border-inline: 1px solid rgba(120,150,220,0.12) !important;
  }
  .mobile-section-button > span {
    display: block;
    color: var(--cool);
    font-size: .61rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
  }
  .mobile-section-button > strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    margin-top: 2px;
    color: var(--ink);
    font-family: var(--serif);
    font-size: .94rem;
    font-weight: 600;
    line-height: 1.15;
  }
  .mobile-pager button:focus-visible,
  .lesson-menu button:focus-visible {
    outline: 2px solid var(--cool);
    outline-offset: -3px;
  }

  .lesson-menu.open {
    display: block;
    position: fixed;
    z-index: 120;
    inset: 0;
  }
  .lesson-menu-scrim {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    background: rgba(1,2,6,0.76);
    backdrop-filter: blur(5px);
  }
  .lesson-menu-sheet {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    max-height: 78dvh;
    display: flex;
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom);
    background: linear-gradient(180deg, #11182c, #070b16);
    border: 1px solid rgba(120,150,220,0.22);
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -30px 90px rgba(0,0,0,0.56);
    animation: lesson-sheet-in .35s var(--ease) both;
  }
  @keyframes lesson-sheet-in {
    from { transform: translateY(24px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
  .lesson-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 21px 16px;
    border-bottom: 1px solid rgba(120,150,220,0.14);
  }
  .lesson-menu-head span {
    color: var(--gold);
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
  }
  .lesson-menu-head h2 { margin-top: 3px; font-size: 1.65rem; }
  .lesson-menu-head button {
    width: 44px; height: 44px;
    flex: none;
    border: 1px solid rgba(120,150,220,0.2);
    border-radius: 50%;
    color: var(--ink-soft);
    background: rgba(255,255,255,0.03);
    font-size: 1.7rem;
    line-height: 1;
  }
  .lesson-menu-list {
    overflow-y: auto;
    padding: 10px 12px 18px;
  }
  .lesson-menu-item {
    width: 100%;
    min-height: 56px;
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--ink-soft);
    background: transparent;
    font: inherit;
    text-align: left;
  }
  .lesson-menu-item[aria-current="step"] {
    color: #fff;
    border-color: rgba(246,198,91,0.28);
    background: rgba(246,198,91,0.08);
  }
  .lesson-menu-number {
    color: var(--cool);
    font-family: var(--serif);
    font-size: 1.14rem;
    text-align: center;
  }

  /* The roadmap becomes a horizontal module shelf instead of another long
     phone page. */
  #app:not(.mobile-lesson) .home-hero {
    min-height: 48svh;
    padding: 86px 21px 28px;
  }
  #app:not(.mobile-lesson) .home-hero h1 { font-size: clamp(3.35rem, 18vw, 5rem) !important; }
  #app:not(.mobile-lesson) .home-hero .scroll-cue { display: none; }
  #app:not(.mobile-lesson) .home-hero + section { padding: 34px 21px 70px; }
  .mobile-swipe-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 24px;
    color: var(--muted);
    font-size: .69rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
  }
  .mobile-swipe-hint span { color: var(--gold); font-size: 1rem; }
  #app:not(.mobile-lesson) .roadmap-grid {
    display: flex;
    gap: 14px;
    width: auto;
    margin: 20px -21px 0;
    padding: 4px 21px 18px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
  }
  #app:not(.mobile-lesson) .roadmap-grid::-webkit-scrollbar { display: none; }
  #app:not(.mobile-lesson) .road-card {
    min-width: min(82vw, 340px);
    min-height: 158px;
    flex: 0 0 min(82vw, 340px);
    align-items: flex-start;
    scroll-snap-align: center;
    padding: 22px 20px;
  }
  #app:not(.mobile-lesson) .road-card .body .note { margin-top: 5px; }
  #app:not(.mobile-lesson) footer { padding: 38px 21px 54px; }
}

/* ---- Phone reading comfort ----------------------------------------------
   Scale the root instead of enlarging only one component, so cards,
   accordions, navigation, and main prose remain balanced together. */
@media (max-width: 620px),
       (max-device-width: 700px),
       (hover: none) and (pointer: coarse) and (max-width: 1200px) {
  html { font-size: 17px; }
  body { line-height: 1.7; }
}
