:root {
  --navy: #0C2742;
  --blue: #0C447C;
  --bright: #378ADD;
  --gold: #E0A21B;
  --gold-deep: #8C6800;
  --gold-soft: #F6E3B4;
  --bg: #F4F8FC;
  --card: #FFFFFF;
  --ink: #0C2742;
  --ink-soft: rgba(12, 39, 66, 0.72);
  --ink-faint: rgba(12, 39, 66, 0.45);
  --line: rgba(12, 39, 66, 0.12);
  --red: #C43E2F;
  --red-soft: #FBEAE7;
  --amber: #B45309;
  --amber-soft: #FBEFDD;
  --green: #2E7D4F;
  --green-soft: #E6F4EC;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
}
a { color: var(--blue); }

/* ---------- nav ---------- */
#topnav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 12px 28px;
  background: rgba(244, 248, 252, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 8px;
  color: var(--navy); text-decoration: none;
  font-weight: 700; font-size: 16px; white-space: nowrap;
}
.brand svg { width: 20px; height: 20px; color: var(--gold); }
.brand em { font-style: normal; color: var(--blue); }
.navlinks { display: flex; gap: 18px; margin-left: auto; }
.navlinks a {
  color: var(--ink-soft); text-decoration: none;
  font-size: 14px; font-weight: 500;
}
.navlinks a:hover { color: var(--blue); }
.cta-mini {
  background: var(--blue); color: #fff; text-decoration: none;
  font-size: 14px; font-weight: 600;
  padding: 7px 14px; border-radius: 8px; white-space: nowrap;
}
.cta-mini:hover { background: var(--navy); }
#progressbar { position: sticky; top: 57px; z-index: 49; height: 3px; background: transparent; }
#progressfill { height: 100%; width: 0%; background: var(--gold); transition: width 0.1s linear; }

/* ---------- hero ---------- */
.hero {
  max-width: 900px; margin: 0 auto;
  padding: 72px 24px 20px; text-align: center;
}
.eyebrow {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold-deep); margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--serif); font-size: clamp(38px, 6vw, 64px);
  line-height: 1.08; color: var(--navy); margin-bottom: 18px;
}
.hero .sub { font-size: 20px; color: var(--ink-soft); max-width: 640px; margin: 0 auto 26px; }
.synthetic-chip {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--gold-soft); color: var(--ink);
  border: 1px solid rgba(140, 104, 0, 0.25);
  font-size: 13.5px; line-height: 1.45; text-align: left;
  padding: 10px 16px; border-radius: 12px; max-width: 620px;
}
.synthetic-chip svg { width: 22px; height: 22px; flex: none; color: var(--gold-deep); }

/* ---------- chapters ---------- */
.chapter { max-width: 1020px; margin: 0 auto; padding: 72px 24px; }
.kicker {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold-deep); margin-bottom: 10px;
}
.kicker.light { color: var(--gold); }
.chapter h2 {
  font-family: var(--serif); font-size: clamp(28px, 4vw, 40px);
  color: var(--navy); line-height: 1.15; margin-bottom: 14px;
}
.lede { font-size: 18px; color: var(--ink-soft); max-width: 760px; margin-bottom: 28px; }
.fineprint { font-size: 13px; color: var(--ink-faint); }
.fineprint.centered { text-align: center; margin-top: 22px; }
.mono-note { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }

/* ---------- band + confidence chips ---------- */
.bandchip {
  display: inline-block; font-weight: 600; font-size: 14px;
  padding: 6px 14px; border-radius: 999px; line-height: 1.35;
}
.band-green { background: var(--green-soft); color: var(--green); border: 1px solid rgba(46,125,79,.35); }
.band-gold  { background: var(--gold-soft);  color: var(--gold-deep); border: 1px solid rgba(140,104,0,.35); }
.band-amber { background: var(--amber-soft); color: var(--amber); border: 1px solid rgba(180,83,9,.35); }
.band-red   { background: var(--red-soft);   color: var(--red); border: 1px solid rgba(196,62,47,.35); }

.chip {
  display: inline-block; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.04em; padding: 2px 9px; border-radius: 999px;
  vertical-align: middle; white-space: nowrap;
}
.chip-measured   { background: var(--green-soft); color: var(--green); border: 1px solid rgba(46,125,79,.4); }
.chip-assessed   { background: #E7F0FA; color: var(--blue); border: 1px solid rgba(12,68,124,.35); }
.chip-self       { background: rgba(12,39,66,.06); color: var(--ink-soft); border: 1px dashed rgba(12,39,66,.35); }
.chip-unmeasured { background: transparent; color: var(--ink-faint); border: 1px dashed rgba(12,39,66,.3); }

/* ---------- scoreboard ---------- */
.scoreboard { padding-top: 44px; }
.scorerow {
  display: grid; grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 40px; align-items: center; margin-top: 8px;
}
.bigdial-wrap { text-align: center; }
.scoremeta { margin-top: 10px; }
.confline { font-family: var(--mono); font-size: 12.5px; color: var(--ink-faint); margin-top: 10px; }

.dial { position: relative; display: inline-block; }
.dial svg { display: block; }
.dial .dial-num {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--serif); color: var(--navy);
}
.dial .dial-num .v { font-size: 64px; font-weight: 700; line-height: 1; }
.dial .dial-num .of { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); margin-top: 4px; }
.dial.small .dial-num .v { font-size: 30px; }
.dial.small .dial-num .of { display: none; }

.wheel {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
}
.pillarmini {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; display: flex; gap: 16px; align-items: center;
  text-align: left;
}
.pillarmini .pm-meta { min-width: 0; }
.pillarmini h4 {
  font-family: var(--serif); font-size: 19px; color: var(--navy); line-height: 1.2;
}
.pillarmini h4 span { color: var(--ink-faint); font-family: var(--mono); font-size: 11px; letter-spacing: .1em; display: block; text-transform: uppercase; margin-bottom: 2px; }
.pillarmini p { font-size: 13px; color: var(--ink-soft); line-height: 1.45; margin-top: 4px; }

/* ---------- pillar cards ---------- */
.pillargrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.pillarcard {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px; border-top: 4px solid var(--line);
}
.pillarcard.pc-green { border-top-color: var(--green); }
.pillarcard.pc-gold  { border-top-color: var(--gold); }
.pillarcard.pc-amber { border-top-color: var(--amber); }
.pillarcard.pc-red   { border-top-color: var(--red); }
.pc-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.pc-head h3 { font-family: var(--serif); font-size: 24px; color: var(--navy); }
.pc-head .pc-score { margin-left: auto; font-family: var(--serif); font-size: 30px; font-weight: 700; }
.pc-score.s-green { color: var(--green); } .pc-score.s-gold { color: var(--gold-deep); }
.pc-score.s-amber { color: var(--amber); } .pc-score.s-red { color: var(--red); }
.pc-tag { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.pc-line { font-size: 14.5px; color: var(--ink-soft); margin: 8px 0 18px; line-height: 1.5; }

.comp { padding: 12px 0; border-top: 1px solid var(--line); }
.comp-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.comp-name { font-weight: 600; font-size: 14.5px; }
.comp-weight { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }
.comp-top .chip { margin-left: auto; }
.comp-barrow { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.comp-track {
  flex: 1; height: 10px; border-radius: 6px;
  background: rgba(12, 39, 66, 0.08); overflow: hidden; position: relative;
}
.comp-fill { height: 100%; border-radius: 6px; width: 0; transition: width 0.9s cubic-bezier(.2,.7,.3,1); }
.comp-fill.f-green { background: var(--green); } .comp-fill.f-gold { background: var(--gold); }
.comp-fill.f-amber { background: var(--amber); } .comp-fill.f-red { background: var(--red); }
.comp-val { font-family: var(--mono); font-size: 14px; font-weight: 600; width: 32px; text-align: right; }
.comp-track.unmeasured { background: repeating-linear-gradient(45deg, rgba(12,39,66,.05), rgba(12,39,66,.05) 6px, rgba(12,39,66,.11) 6px, rgba(12,39,66,.11) 12px); }
.comp-val.na { color: var(--ink-faint); font-size: 11.5px; width: auto; }
.comp-method { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); line-height: 1.55; margin-top: 7px; }
.comp-mirrornote { font-size: 12px; color: var(--gold-deep); background: var(--gold-soft); border-radius: 8px; padding: 4px 10px; margin-top: 7px; display: inline-block; }

.rulecard {
  margin-top: 26px; background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--gold); border-radius: 12px;
  padding: 16px 20px; font-size: 15px; color: var(--ink-soft); max-width: 760px;
}

/* ---------- escalation board ---------- */
.boardwrap { max-width: none; background: var(--navy); padding: 0; }
.boardinner { max-width: 1020px; margin: 0 auto; padding: 76px 24px; }
.boardwrap h2 { color: #fff; }
.boardwrap .lede { color: rgba(255,255,255,0.78); }
.boardrule { margin-top: 26px; font-size: 14.5px; color: rgba(255,255,255,0.66); max-width: 720px; }
.boardrule strong { color: var(--gold); }

#escboard { display: grid; gap: 18px; }
.esc {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px; padding: 20px 22px;
}
.esc-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.esc-id { font-family: var(--mono); font-size: 12.5px; color: rgba(255,255,255,0.55); letter-spacing: .06em; }
.esc-sev { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; padding: 2px 8px; border-radius: 4px; }
.sev-CRITICAL { background: var(--red); color: #fff; }
.sev-MAJOR { background: var(--gold); color: var(--navy); }
.esc-pillar { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--bright); border: 1px solid rgba(55,138,221,.5); padding: 2px 8px; border-radius: 4px; }
.esc-day { margin-left: auto; font-family: var(--mono); font-size: 12.5px; color: rgba(255,255,255,0.7); }
.esc-status { font-weight: 700; font-size: 13px; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.st-out { background: var(--red); color: #fff; animation: pulse 2.2s infinite; }
.st-progress { background: var(--gold); color: var(--navy); }
.st-back { background: var(--green); color: #fff; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(196,62,47,.55); } 55% { box-shadow: 0 0 0 9px rgba(196,62,47,0); } }
.esc-title { color: #fff; font-size: 17.5px; font-weight: 600; line-height: 1.4; margin-bottom: 2px; }
.esc-sub { font-family: var(--mono); font-size: 11.5px; color: rgba(255,255,255,0.5); margin-bottom: 16px; }
.esc-delta { display: inline-block; margin-left: 10px; background: var(--green-soft); color: var(--green); font-family: var(--mono); font-size: 11px; padding: 2px 9px; border-radius: 999px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.step { position: relative; padding: 0 10px 0 0; }
.step::before {
  content: ""; position: absolute; top: 11px; left: 24px; right: 2px; height: 2px;
  background: rgba(255,255,255,0.16);
}
.step:last-child::before { display: none; }
.step-dot {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; position: relative; z-index: 1;
  border: 2px solid rgba(255,255,255,0.25); color: rgba(255,255,255,0.4); background: var(--navy);
}
.step.done .step-dot { background: var(--green); border-color: var(--green); color: #fff; }
.step.done::before { background: var(--green); }
.step.active .step-dot { background: var(--gold); border-color: var(--gold); color: var(--navy); animation: glowstep 2s infinite; }
@keyframes glowstep { 0%,100% { box-shadow: 0 0 0 0 rgba(224,162,27,.5); } 55% { box-shadow: 0 0 0 7px rgba(224,162,27,0); } }
.step-name { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin-top: 8px; color: rgba(255,255,255,0.85); }
.step.pending .step-name { color: rgba(255,255,255,0.4); }
.step-note { font-size: 12px; line-height: 1.45; color: rgba(255,255,255,0.6); margin-top: 4px; padding-right: 6px; }
.step.pending .step-note { color: rgba(255,255,255,0.35); }

/* ---------- mirror ---------- */
.mirrorrow {
  display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 18px;
  align-items: center; margin-top: 6px;
}
.guess {
  background: var(--gold-soft); border: 1px solid rgba(140,104,0,.25);
  border-radius: 4px 14px 4px 14px; padding: 18px;
  transform: rotate(-1deg); position: relative;
}
.guess:nth-child(2) { transform: rotate(0.8deg); }
.guess:nth-child(3) { transform: rotate(-0.5deg); }
.guess .g-who { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 6px; }
.guess .g-val { font-family: var(--serif); font-size: 26px; color: var(--navy); line-height: 1.2; }
.guess .g-lock {
  position: absolute; top: -9px; right: 12px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em;
  background: var(--navy); color: #fff; padding: 2px 8px; border-radius: 4px;
}
.mirror-measured { text-align: center; padding: 0 8px; }
.mirror-measured .mm-label { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
.punchline { text-align: center; margin-top: 40px; }
.punchline p:first-child { font-family: var(--serif); font-size: clamp(22px, 3.4vw, 32px); color: var(--navy); line-height: 1.3; }
.punchline .up { color: var(--green); }
.sub-punch { font-size: 15.5px; color: var(--ink-soft); max-width: 620px; margin: 12px auto 0; }
.mirror-note { font-size: 13px; color: var(--ink-faint); text-align: center; margin-top: 16px; }

/* ---------- journey ---------- */
.journeywrap { background: linear-gradient(180deg, rgba(12,68,124,0.045), transparent); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); max-width: none; }
.journeywrap > * { max-width: 1020px; margin-left: auto; margin-right: auto; }
.journey { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 14px; align-items: stretch; }
.jstage {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px; text-align: center;
}
.jstage .j-date { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); letter-spacing: .08em; }
.jstage h4 { font-family: var(--serif); font-size: 19px; color: var(--navy); margin: 4px 0 10px; }
.jstage .j-score { font-family: var(--serif); font-size: 44px; font-weight: 700; line-height: 1; }
.j-score.s-red { color: var(--red); } .j-score.s-amber { color: var(--amber); }
.jstage .j-noscore { font-family: var(--serif); font-size: 30px; color: var(--ink-faint); letter-spacing: .1em; }
.jstage .bandchip { margin-top: 10px; font-size: 12px; }
.jstage .j-note { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; margin-top: 12px; }
.jstage .chip { margin-top: 10px; }
.jarrow { align-self: center; font-size: 26px; color: var(--ink-faint); }

/* ---------- math ---------- */
.formula {
  font-family: var(--mono); font-size: 13.5px; line-height: 1.8;
  background: var(--navy); color: #DCE9F5; border-radius: 12px;
  padding: 20px 24px; overflow-x: auto; margin-bottom: 26px;
}
.formula strong { color: var(--gold); }
.mathgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mathcard { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; }
.mathcard h4 { font-family: var(--serif); font-size: 18px; color: var(--navy); margin-bottom: 10px; }
.mathcard p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }
.mathcard .mono-note { display: block; margin-top: 12px; }
.bandrow { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.bandrow:first-child { border-top: none; }
.bandrow .br-range { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); width: 56px; flex: none; }
.bandrow .bandchip { font-size: 11.5px; padding: 3px 10px; }
.ironrules { list-style: none; }
.ironrules li { font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; padding: 7px 0 7px 22px; position: relative; border-top: 1px solid var(--line); }
.ironrules li:first-child { border-top: none; }
.ironrules li::before { content: "★"; position: absolute; left: 0; color: var(--gold); font-size: 12px; top: 9px; }

/* ---------- CTA + footer ---------- */
.cta-final { text-align: center; }
.cta-final .lede { margin-left: auto; margin-right: auto; }
.btn-primary {
  display: inline-block; background: var(--blue); color: #fff; text-decoration: none;
  font-weight: 600; padding: 12px 22px; border-radius: 10px;
}
.btn-primary:hover { background: var(--navy); }
.btn-primary.big { font-size: 18px; padding: 16px 30px; }
.cta-final .fineprint { margin-top: 18px; }
footer { border-top: 1px solid var(--line); padding: 28px 24px 40px; text-align: center; }
footer p { font-size: 13px; color: var(--ink-faint); max-width: 720px; margin: 0 auto; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .navlinks { display: none; }
  .scorerow { grid-template-columns: 1fr; gap: 26px; }
  .wheel { grid-template-columns: repeat(2, 1fr); }
  .pillargrid { grid-template-columns: 1fr; }
  .mathgrid { grid-template-columns: 1fr; }
  .mirrorrow { grid-template-columns: 1fr 1fr; }
  .mirror-measured { grid-column: 1 / -1; }
  .journey { grid-template-columns: 1fr; }
  .jarrow { transform: rotate(90deg); justify-self: center; }
  .steps { grid-template-columns: 1fr 1fr; gap: 14px 8px; }
  .step::before { display: none; }
}
@media (max-width: 560px) {
  .wheel { grid-template-columns: 1fr; }
  .mirrorrow { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}
