/* Marble "paper" design system, mirrored from the iOS parent dashboard
   (PColor.marble + PFontStyle parent styles + MarbleControls). */

@font-face {
  font-family: 'Merel';
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/merel-bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Merel';
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/merel-medium.woff2') format('woff2');
}

:root {
  --paper: #F4EFE4;
  --card: #FDFCFA;
  --card-2: #F5F3F0;
  --pill-bg: #EBE6DC;
  --ink: #141414;
  --ink-2: #626262;
  --ink-3: #949494;
  --ink-4: #C8C8C7;
  --line: #E7E1D4;
  --red: #F42324;
  --green: #1FA20D;
  --jade: #0E9594;
  --marigold: #E8A33D;
  --vermilion: #E63E1C;
  --paint-ink: #27272F;

  --serif: 'EB Garamond', Georgia, serif;
  --brand: 'Merel', 'Avenir Next', sans-serif;
  --body: 'Source Sans 3', -apple-system, sans-serif;

  --radius: 10px;
  --maxw: 880px;
}

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

html { scroll-behavior: smooth; }

body {
  background:
    linear-gradient(var(--paper-grid, rgba(20,20,20,0.045)) 1px, transparent 1px),
    linear-gradient(90deg, var(--paper-grid, rgba(20,20,20,0.045)) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px, 42px 42px, auto;
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 80px;
}

.hidden { display: none !important; }

/* ── Top bar ─────────────────────────────────────────── */
.topbar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar__logo { color: var(--red); }
.topbar__logo svg { height: 28px; width: auto; display: block; }

/* ── Type ────────────────────────────────────────────── */
.kicker {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(48px, 8.5vw, 84px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}
.serif-h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.15;
  margin-bottom: 12px;
}
.serif-h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.2;
  margin-bottom: 8px;
}
.brand-h3 {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 20px;
}
.hero__sub, .stage__sub {
  color: var(--ink-2);
  max-width: 560px;
  margin-bottom: 28px;
}

.hero { padding-top: 48px; }
.hero--compact { padding-top: 36px; margin-bottom: 26px; }
.hero--compact .hero__sub { margin-bottom: 0; }
.stage { padding-top: 88px; }

/* ── Cards ───────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow:
    0 27px 40px rgba(0,0,0,0.05),
    0 5.4px 6.5px rgba(0,0,0,0.02);
}

/* ── Buttons & pills ─────────────────────────────────── */
.btn {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 16px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.06s ease, opacity 0.15s ease;
}
.btn:active { transform: translateY(2px); }
.btn--primary {
  background: var(--ink);
  color: var(--card);
  height: 56px;
  padding: 0 34px;
  box-shadow: 0 3px 0 #454545;
}
.btn--primary:disabled {
  background: #BFB8AE;
  box-shadow: 0 3px 0 #AFA8A0;
  cursor: default;
}
.btn--outline {
  background: var(--card);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  box-shadow: 0 2.5px 0 var(--pill-bg);
}
.btn--red {
  background: var(--red);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 3px 0 #8B0023;
}
.btn--gate { height: 58px; padding: 0 40px; font-size: 17px; }
.btn--small { height: 42px; padding: 0 20px; font-size: 14px; }

.pill {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 12px 20px;
  cursor: pointer;
  box-shadow: 0 2.5px 0 var(--pill-bg);
  transition: transform 0.06s ease, background 0.12s ease, color 0.12s ease;
}
.pill:active { transform: translateY(2px); box-shadow: none; }
.pill:hover { background: var(--pill-bg); }
.pill.selected { background: var(--ink); color: var(--card); border-color: var(--ink); }
.pill--quiet { color: var(--ink-3); box-shadow: none; }

.answer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* ── Setup bar ───────────────────────────────────────── */
.setup-card { margin-bottom: 16px; padding: 26px 28px; }
.setup-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr;
  gap: 18px;
}
.field__optional { font-weight: 400; font-size: 13px; color: var(--ink-3); text-transform: none; }
.seg { display: flex; gap: 6px; }
.seg button {
  flex: 1;
  font-family: var(--brand);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 6px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  cursor: pointer;
  box-shadow: 0 2px 0 var(--pill-bg);
  white-space: nowrap;
}
.seg button.selected { background: var(--ink); color: var(--card); border-color: var(--ink); }

/* ── Intake (legacy shared bits) ─────────────────────── */
.intake { max-width: 620px; }
.intake__row { margin-bottom: 26px; }
.field__label {
  display: block;
  font-family: var(--brand);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
}
.field__hint { font-size: 15px; color: var(--ink-3); margin: -4px 0 10px; }
.seg-hint { font-size: 13px; margin: 8px 0 0; }
input[type="text"], select {
  font-family: var(--body);
  font-size: 18px;
  color: var(--ink);
  background: var(--card-2);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 13px 16px;
  width: 100%;
  outline: none;
}
input[type="text"]:focus, select:focus { border-color: var(--ink); }

.country-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.country {
  font-family: var(--body);
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 16px 12px;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 2.5px 0 var(--pill-bg);
  transition: border-color 0.1s ease, transform 0.06s ease;
}
.country:active { transform: translateY(2px); box-shadow: none; }
.country.selected { border-color: var(--ink); border-width: 2px; background: var(--card-2); }
.country__flag { display: block; font-size: 26px; margin-bottom: 6px; }
.country__name { display: block; font-family: var(--brand); font-weight: 700; font-size: 15px; }
.country__sub { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }

.dob-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; max-width: 380px; }

/* ── Stickers (generated riso set) ───────────────────── */
.sticker {
  /* Tight, barely-blurred shadow: a sticker sits flat on the page, so its
     shadow is a crisp sliver, not a diffuse glow. */
  filter:
    drop-shadow(1.2px 0 0 #FFFCF3) drop-shadow(-1.2px 0 0 #FFFCF3)
    drop-shadow(0 1.2px 0 #FFFCF3) drop-shadow(0 -1.2px 0 #FFFCF3)
    drop-shadow(0 1.5px 1px rgba(0,0,0,0.25));
}
.sticker--chip { height: 24px; width: auto; filter: none; }
.sticker--chapter { height: 52px; width: auto; flex-shrink: 0; }
.sticker--hero { height: 92px; width: auto; }
/* A small tilted interest sticker on the bottom-right corner of each
   seed card: tiny colorful details through the plan. */
.seed-card__deco { position: absolute; z-index: 1; pointer-events: none; }
.chapter__theme { display: flex; align-items: center; gap: 14px; }

.interest-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.interest { display: inline-flex; align-items: center; gap: 8px; }
.interest {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--pill-bg);
}
.interest:hover { background: var(--pill-bg); }
.interest.selected { background: var(--ink); color: var(--card); border-color: var(--ink); }

/* ── Explorer ────────────────────────────────────────── */
.explore-card {
  padding: 34px 32px 28px;
  background: radial-gradient(120% 90% at 50% 0%, #131a2e 0%, #0A0C14 55%);
  color: #EDEFF7;
}
#map-viz svg { display: block; width: 100%; height: auto; }

.explore-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}
.explore-card .subject-tab {
  background: transparent;
  border-color: rgba(237,239,247,0.18);
  color: #98A0B8;
}
.explore-card .subject-tab.selected {
  background: var(--tab-color, #FFFCF3);
  border-color: var(--tab-color, #FFFCF3);
  color: #0A0C14;
}

.subject-glance {
  font-family: var(--serif);
  font-size: clamp(20px, 2.8vw, 25px);
  line-height: 1.5;
  color: #FFFCF3;
  max-width: 700px;
  padding: 26px 4px 8px;
}

.trust-line {
  font-size: 13px;
  color: #646C84;
  padding: 6px 4px 0;
}
.trust-line a { color: #98A0B8; }
#domain-web { margin-top: 24px; }

.explore-more {
  margin-top: 26px;
  padding-top: 6px;
  border-top: 1px solid rgba(237,239,247,0.08);
}
.web-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 8px auto 0;
  padding: 8px 14px;
  background: transparent;
  border: none;
  border-radius: 999px;
  font-family: var(--brand);
  font-weight: 700;
  font-size: 13px;
  color: #98A0B8;
  cursor: pointer;
}
.web-toggle:hover:not(:disabled) { color: #EDEFF7; }
.web-toggle:disabled { color: #646C84; cursor: default; }
.web-toggle__chev { color: #646C84; }

#web-svg svg { display: block; width: 100%; height: auto; }
#web-detail {
  border: 1px solid rgba(237,239,247,0.12);
  border-radius: 12px;
  background: rgba(237,239,247,0.05);
  padding: 16px 18px;
  margin-top: 4px;
}
#web-detail .domain-card__name { color: #EDEFF7; }
#web-detail .domain-card__summary { color: #EDEFF7; }
#web-detail .domain-card__browse {
  background: transparent;
  color: #EDEFF7;
  border-color: rgba(237,239,247,0.3);
  box-shadow: none;
}
#web-detail .domain-card__browse:hover { background: rgba(237,239,247,0.12); }

.explore-domains { margin-top: 14px; }
.explore-domains .domain-card {
  background: rgba(237,239,247,0.05);
  border-color: rgba(237,239,247,0.1);
}
.explore-domains .domain-card__name { color: #EDEFF7; }
.explore-domains .domain-card__summary { color: #EDEFF7; }
.explore-domains .domain-card__browse {
  background: transparent;
  color: #EDEFF7;
  border-color: rgba(237,239,247,0.3);
  box-shadow: none;
}
.explore-domains .domain-card__browse:hover { background: rgba(237,239,247,0.12); }
.explore-empty { color: #646C84; font-size: 15px; padding: 8px 4px; }

.evaluate {
  padding: 48px 4px 20px;
  border-top: 1px solid rgba(237,239,247,0.12);
  margin-top: 44px;
}
.evaluate__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
}
.evaluate__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  color: #FFFCF3;
}
.evaluate__progress {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #98A0B8;
  white-space: nowrap;
}
.evaluate__bars { max-width: 420px; margin-bottom: 38px; }
.evaluate__note { color: #98A0B8; font-size: 15.5px; }
.evaluate__question {
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.35;
  color: #FFFCF3;
  max-width: 680px;
  margin: 6px 0 4px;
}
.evaluate .pill {
  background: transparent;
  color: #EDEFF7;
  border-color: rgba(237,239,247,0.3);
  box-shadow: none;
}
.evaluate .pill:hover { background: rgba(237,239,247,0.12); }
.evaluate .pill.selected { background: #FFFCF3; color: #0A0C14; border-color: #FFFCF3; }
.evaluate .pill--quiet { color: #98A0B8; }
.evaluate__alt { margin-top: 20px; font-size: 14px; }
.evaluate__alt a { color: #98A0B8; }
.evaluate__alt a:hover { color: #EDEFF7; }
.evaluate__done-text {
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.45;
  color: #FFFCF3;
  max-width: 680px;
  margin-bottom: 30px;
}
.cta-preview__q.known { background: var(--green); color: #fff; transition: left 0.6s cubic-bezier(0.34, 1.3, 0.64, 1); }
.cta-preview__bars { display: flex; flex-direction: column; gap: 20px; }
.cta-preview__row { display: flex; align-items: center; gap: 12px; }
.cta-preview__subject {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #98A0B8;
  width: 92px;
  line-height: 1.3;
  text-align: right;
}
/* Read-out, not a control: thin scale line (no slider-rail affordance),
   value badges sit on it like markers. The real input is the big age
   slider in the explorer above. */
.cta-preview__track {
  position: relative;
  flex: 1;
  height: 2px;
  border-radius: 1px;
  background: rgba(237,239,247,0.22);
  cursor: default;
}
.cta-preview__tick {
  position: absolute;
  top: -7px;
  bottom: -7px;
  left: 50%;
  border-left: 2px dashed rgba(237,239,247,0.5);
}
.cta-preview__q {
  position: absolute;
  top: 50%;
  left: 66%;
  transform: translate(-50%, -50%);
  background: #FFFCF3;
  color: #0A0C14;
  font-family: var(--brand);
  font-weight: 700;
  font-size: 13px;
  border-radius: 999px;
  padding: 2px 9px;
  transition: left 0.5s ease;
}
/* Nothing placed yet: hollow dashed chip, reads as "empty", not pressable. */
.cta-preview__q.empty {
  background: transparent;
  border: 1.5px dashed rgba(237,239,247,0.4);
  color: #98A0B8;
  font-size: 12px;
  padding: 1px 8px;
}
.cta-preview__shimmer {
  position: absolute;
  inset: 0;
  border-radius: 5px;
  overflow: hidden;
}
.cta-preview__shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 34%;
  left: -40%;
  border-radius: 5px;
  background: linear-gradient(90deg, transparent, rgba(255,252,243,0.3), transparent);
  animation: barsweep 1.6s ease-in-out infinite;
}
@keyframes barsweep {
  to { left: 108%; }
}
.cta-preview__q.pulse {
  animation: qpulse 1.4s ease-in-out infinite;
}
@keyframes qpulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.14); opacity: 0.7; }
}
.cta-preview__text {
  flex: 1 1 260px;
  max-width: 360px;
  font-size: 15.5px;
  line-height: 1.5;
  color: #98A0B8;
}
.btn--cta {
  background: #FFFCF3;
  color: #0A0C14;
  height: 58px;
  padding: 0 40px;
  font-size: 17px;
  box-shadow: 0 0 0 1px rgba(255,252,243,0.25), 0 4px 0 rgba(255,252,243,0.28), 0 10px 30px rgba(0,0,0,0.5);
}
.btn--cta:disabled {
  background: rgba(237,239,247,0.15);
  color: #646C84;
  box-shadow: none;
  cursor: default;
}
/* Red variant of the big CTA (declared after .btn--cta so it wins). */
.btn--cta.btn--red {
  background: var(--red);
  color: #FFFCF3;
  box-shadow: 0 4px 0 #8B0023, 0 10px 30px rgba(0,0,0,0.5);
}
.explore-cta__hint { font-size: 13px; color: #98A0B8; }

.map-age {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 4px 10px;
}
.map-age__label {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #98A0B8;
}
.map-age__value {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 44px;
  line-height: 1;
  color: #FFFCF3;
}

.map-slider { padding: 6px 46px 0 110px; }
.map-slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 34px;
  background: transparent;
  cursor: ew-resize;
}
.map-slider input::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
  background: rgba(237,239,247,0.18);
}
.map-slider input::-webkit-slider-thumb {
  -webkit-appearance: none;
  box-sizing: border-box;
  width: 30px;
  height: 30px;
  margin-top: -11px;
  border-radius: 50%;
  background: #FFFCF3;
  border: 3px solid #0A0C14;
  box-shadow: 0 0 0 2px rgba(255,252,243,0.35), 0 2px 10px rgba(0,0,0,0.5);
}
.map-slider input::-moz-range-track { height: 8px; border-radius: 4px; background: rgba(237,239,247,0.18); }
.map-slider input::-moz-range-thumb {
  box-sizing: border-box;
  width: 30px; height: 30px; border-radius: 50%;
  background: #FFFCF3; border: 3px solid #0A0C14;
}
.map-slider__labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--brand);
  font-weight: 700;
  font-size: 12px;
  color: #646C84;
  padding: 2px 8px 6px;
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 12px 6px 4px;
  border-top: 1px solid rgba(237,239,247,0.12);
  font-size: 13px;
  color: #98A0B8;
}
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* ── Topics browser ──────────────────────────────────── */
.topics-card { margin-top: 18px; }
.topics-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.subject-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.subject-tab {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--card);
  cursor: pointer;
  color: var(--ink-2);
}
.subject-tab.selected { background: var(--ink); color: var(--card); border-color: var(--ink); }

.domain-group { margin-bottom: 18px; }
.domain-group__name {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.domain-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-2);
  padding: 18px 20px;
  margin-bottom: 12px;
}
.domain-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.domain-card__name {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 16px;
}
.domain-card__browse {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 0 var(--pill-bg);
}
.domain-card__browse:hover { background: var(--pill-bg); }
.domain-card__browse .done { color: var(--green); }
.domain-card__summary {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.45;
  color: var(--ink);
}
.topic-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-chip {
  font-family: var(--body);
  font-size: 15px;
  color: var(--ink);
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  transition: background 0.1s ease;
}
.topic-chip:hover { background: var(--pill-bg); }
.topic-chip.answered-yes { border-color: var(--green); }
.topic-chip.answered-no { border-color: var(--vermilion); }
.topic-chip .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.topics-hint { font-size: 14px; color: var(--ink-3); margin-top: 6px; }
.topics-empty { color: var(--ink-3); font-size: 15px; }

/* ── Check-in ────────────────────────────────────────── */
.checkin-card { max-width: 640px; min-height: 220px; }
.checkin-intro { color: var(--ink-2); margin-bottom: 20px; }
.checkin-progress { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.checkin-progress__bar {
  flex: 1;
  height: 6px;
  background: var(--pill-bg);
  border-radius: 3px;
  overflow: hidden;
}
#checkin-progress-fill {
  height: 100%;
  width: 0;
  background: var(--ink);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.checkin-progress__label {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
}
.q-eyebrow {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}
.q-text {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.25;
}
.checkin-done__big {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.3;
  margin-bottom: 22px;
}

/* ── Results ─────────────────────────────────────────── */
.subject-card {
  margin-bottom: 22px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 27px 40px rgba(0,0,0,0.05), 0 5.4px 6.5px rgba(0,0,0,0.02);
}
.subject-card__hero {
  background: linear-gradient(160deg, #33333d, var(--paint-ink) 55%, #1b1b22);
  color: #FFFCF3;
  padding: 26px 28px 30px;
}
.status-eyebrow {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.status-eyebrow.ahead { color: var(--jade); }
.status-eyebrow.ontrack { color: var(--marigold); }
.status-eyebrow.support { color: var(--vermilion); }
.subject-card__name {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 6px;
}
.subject-card__framing { color: rgba(255,252,243,0.75); font-size: 16px; max-width: 480px; margin-bottom: 22px; }

.frontier { position: relative; padding-top: 26px; }
.frontier__track {
  position: relative;
  height: 14px;
  border-radius: 7px;
  background: rgba(255,252,243,0.14);
}
.frontier__fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 7px;
  background: #FFFCF3;
  min-width: 14px;
  transition: width 0.8s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.frontier__expected {
  position: absolute;
  top: -8px;
  bottom: -8px;
  left: 50%;
  border-left: 2px dashed rgba(255,252,243,0.55);
}
.frontier__expected-label {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--brand);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,252,243,0.65);
  white-space: nowrap;
}
.frontier__badge {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--green);
  color: #fff;
  font-family: var(--brand);
  font-weight: 700;
  font-size: 14px;
  border-radius: 999px;
  padding: 4px 11px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  transition: left 0.8s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.subject-card__body { background: var(--card); padding: 22px 28px 26px; }
.subject-card__body h4 {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.next-topic {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-top: 1px solid var(--line);
  padding: 13px 2px;
  cursor: pointer;
  font-family: var(--body);
  font-size: 16px;
  color: var(--ink);
}
.next-topic:hover { background: var(--card-2); }
.next-topic .chev { color: var(--ink-4); font-size: 18px; }
.next-topic .domain { display: block; font-size: 13px; color: var(--ink-3); }

/* ── The custom curriculum (journey) ─────────────────── */
.journey {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  color: var(--ink);
  padding: 44px 34px 30px;
  box-shadow: 0 27px 40px rgba(0,0,0,0.07), 0 5.4px 6.5px rgba(0,0,0,0.03);
}
.journey__head { text-align: center; margin-bottom: 36px; }
.journey__kicker {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.journey__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 10px;
}
.journey__title { margin-bottom: 28px; }
.journey__sub {
  color: var(--ink-2);
  max-width: 620px;
  margin: 0 auto 24px;
}
.journey__meta { color: var(--ink-3); font-size: 14px; max-width: 640px; margin: 0 auto; }

.j-part { margin-bottom: 14px; }
.j-part__label {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  margin: 26px 0 20px;
}

#j-parts { position: relative; padding-left: 64px; }
.j-path { position: absolute; left: 0; top: 0; pointer-events: none; }
@media (min-width: 900px) {
  #j-parts.j-parts--center { padding-left: 0; }
  .j-parts--center .seed-card {
    width: calc(50% - 56px);
    max-width: none;
    margin-bottom: 34px;
  }
  .j-parts--center .seed-card--r { margin-left: calc(50% + 56px); }
}

.seed-card {
  position: relative;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 26px;
  margin-bottom: 18px;
  max-width: 640px;
}
.seed-card__eyebrow {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--seed-color, #98A0B8);
  margin-bottom: 8px;
}
.seed-card__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 27px;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 10px;
}
.seed-card__pitch {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.seed-card__fact {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.seed-card__hook {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17.5px;
  line-height: 1.4;
  color: #8a5a10;
  margin-bottom: 14px;
}
.seed-card__skills {
  background: transparent;
  border: none;
  padding: 0;
  font-family: var(--brand);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-3);
  cursor: pointer;
}
.seed-card__skills:hover { color: var(--ink); }

.chapter {
  position: relative;
  padding: 0 0 26px 34px;
  border-left: 2px solid rgba(237,239,247,0.14);
  margin-left: 10px;
}
.chapter:last-child { border-left-color: transparent; }
.chapter::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--chapter-color, #FFFCF3);
  box-shadow: 0 0 0 4px rgba(237,239,247,0.12);
}
.chapter__kicker {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--chapter-color, #98A0B8);
  margin-bottom: 6px;
}
.chapter__theme {
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  line-height: 1.25;
  color: #FFFCF3;
  margin-bottom: 8px;
}
.chapter__hook {
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--marigold);
  max-width: 620px;
  margin: -4px 0 14px;
}
.chapter__summary {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.45;
  color: #EDEFF7;
  max-width: 620px;
  margin-bottom: 14px;
}
.waypoints { display: flex; flex-direction: column; gap: 6px; }
.waypoint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: rgba(237,239,247,0.05);
  border: 1px solid rgba(237,239,247,0.1);
  border-radius: 10px;
  padding: 11px 16px;
  font-family: var(--body);
  font-size: 15.5px;
  color: #EDEFF7;
  cursor: pointer;
  transition: background 0.12s ease;
}
.waypoint:hover { background: rgba(237,239,247,0.12); }
.waypoint .chev { color: #646C84; }
.waypoint.done { opacity: 0.55; }
.waypoint.done .wp-name { text-decoration: line-through; text-decoration-color: rgba(237,239,247,0.5); }
.waypoint .wp-tag {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--marigold);
  white-space: nowrap;
}
.chapter__more { font-size: 13px; color: #646C84; margin-top: 8px; }
.journey__foot { text-align: center; margin-top: 20px; }

.journey__coverage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.journey__coverage-kicker {
  width: 100%;
  text-align: center;
  font-family: var(--brand);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #646C84;
  margin-bottom: 4px;
}
.cov-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 6px;
}
.cov-row__label {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-right: 6px;
}
.cov-chip {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
}
.cov-chip--now {
  border-color: rgba(31,162,13,0.45);
  background: rgba(31,162,13,0.08);
}
.cov-chip--soon { color: var(--ink-3); }

.gate-card { text-align: center; margin-top: 22px; padding-top: 58px; padding-bottom: 62px; }
.gate-card p:not(.q-eyebrow) { color: var(--ink-2); max-width: 500px; margin: 0 auto 22px; }
.gate-card .gate-how { margin-bottom: 18px; }

.restart { text-align: center; margin-top: 34px; font-size: 15px; }
.restart a { color: var(--ink-3); }

/* ── Modal ───────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.modal__scrim { position: absolute; inset: 0; background: rgba(20,20,20,0.45); }
.modal__sheet {
  position: relative;
  width: min(680px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  border-radius: 18px 18px 0 0;
  padding: 34px 30px 44px;
}
@media (min-width: 720px) {
  .modal { align-items: center; }
  .modal__sheet { border-radius: 18px; }
}
.m-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: -8px 0 18px;
}
.m-stepper span {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  min-width: 90px;
  text-align: center;
}
.m-step-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--card);
  font-size: 20px;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 2px 0 var(--pill-bg);
}
.m-step-btn:disabled { opacity: 0.3; cursor: default; }
.m-step-btn:not(:disabled):hover { background: var(--pill-bg); }
.modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--card-2);
  font-size: 20px;
  color: var(--ink-2);
  cursor: pointer;
}
.m-meta { font-size: 14px; color: var(--ink-3); margin-bottom: 6px; }
.m-desc { color: var(--ink-2); font-size: 16px; margin-bottom: 8px; }
.m-block { margin-top: 26px; }
.m-block__label {
  font-family: var(--brand);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.m-question { font-family: var(--serif); font-size: 22px; line-height: 1.3; }
.m-saved { margin-top: 12px; font-size: 15px; color: var(--green); font-weight: 600; }
.m-evidence { padding-left: 0; list-style: none; }
.m-evidence li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 16px;
  color: var(--ink-2);
}
.m-evidence li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}
.m-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  background: none;
  text-align: left;
  border: none;
  border-top: 1px solid var(--line);
  padding: 12px 2px;
  font-family: var(--body);
  font-size: 16px;
  color: var(--ink);
  cursor: pointer;
}
.m-link-row:hover { background: var(--card-2); }
.m-link-row .rel { font-size: 13px; color: var(--ink-3); white-space: nowrap; }

/* ── Footer ──────────────────────────────────────────── */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 20px 60px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 14px;
  text-align: center;
}
.footer a { color: var(--ink-2); }

/* ── Print: the takeaway prints as a clean paper document ── */
@media print {
  .topbar, .hero, #stage-map, #stage-checkin, #stage-results,
  .journey__foot, .gate-card, .restart, .footer, .modal { display: none !important; }
  body { background: #fff; }
  .stage { padding-top: 0; }
  .journey {
    background: #fff;
    color: #141414;
    box-shadow: none;
    padding: 0;
  }
  .journey__title { color: #141414; }
  .journey__meta, .journey__kicker, .chapter__more { color: #626262; }
  .topbar, .hero--compact, #stage-explore { display: none !important; }
  .chapter { border-left-color: #ddd; }
  .chapter__summary, .chapter__theme { color: #141414; }
  .chapter__hook { color: #8a5a10; }
  .j-path { display: none; }
  #j-parts { padding-left: 0; }
  .journey__coverage { border-top-color: #ddd; }
  .cov-chip { color: #141414; border-color: #ccc; }
  .seed-card { background: #fff; border-color: #ddd; }
  .seed-card__title { color: #141414; }
  .seed-card__pitch { color: #333; }
  .seed-card__fact { color: #626262; }
  .seed-card__hook { color: #8a5a10; }
  .seed-card__skills { display: none; }
  .waypoint { background: #fff; border-color: #ddd; color: #141414; }
  .waypoint .chev { display: none; }
}

/* ── Mobile ──────────────────────────────────────────── */
@media (max-width: 720px) {
  .setup-grid { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .card { padding: 20px; }
  .map-slider { padding: 6px 6px 0; }
  .map-slider__labels { padding: 2px 4px 6px; }
  .stage { padding-top: 64px; }
  .subject-card__hero, .subject-card__body { padding-left: 20px; padding-right: 20px; }
  .map-age__value { font-size: 34px; }
  .btn--cta { width: 100%; padding: 0 12px; }
  #j-parts { padding-left: 46px; }
}
