:root {
  --paper: #fbfaf8;
  --surface: #ffffff;
  --warm: #f2f0ec;
  --ink: #171614;
  --muted: #625e58;
  --line: rgba(23, 22, 20, 0.13);
  --blue: #006fca;
  --blue-dark: #00589f;
  --blue-soft: #edf7ff;
  --orange: #bd4e00;
  --green: #137b45;
  --shadow: 0 1px 2px rgba(18,16,12,.04), 0 12px 34px rgba(18,16,12,.06);
  --max: 1160px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
a { color: var(--blue-dark); text-underline-offset: 3px; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible + span {
  outline: 3px solid rgba(0,111,202,.3);
  outline-offset: 3px;
}

.topbar, main, footer { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 750; letter-spacing: -.03em; }
.brand span { display: grid; place-items: center; width: 30px; height: 30px; background: var(--ink); color: white; border-radius: 4px; font-family: Georgia, serif; }
.quiet-link { font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; }
.quiet-link:hover { color: var(--ink); text-decoration: underline; }

.intro { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .65fr); gap: clamp(38px, 8vw, 112px); padding: clamp(72px, 10vw, 130px) 0 88px; align-items: end; }
.eyebrow, .step-label { margin: 0 0 18px; color: var(--blue-dark); font-size: 12px; line-height: 1.3; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3, p { text-wrap: pretty; }
h1 { max-width: 820px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(48px, 7.1vw, 92px); line-height: .98; letter-spacing: -.055em; font-weight: 500; }
.lede { max-width: 710px; margin: 34px 0 28px; color: var(--muted); font-size: clamp(19px, 2.1vw, 24px); line-height: 1.45; }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px; }
.trust-row span { padding: 7px 10px; border: 1px solid var(--line); background: rgba(255,255,255,.6); border-radius: 999px; font-size: 12px; color: var(--muted); font-weight: 650; }
.deadline { border-top: 3px solid var(--ink); padding-top: 22px; }
.deadline-label { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 750; color: var(--muted); }
.deadline-date { margin: 7px 0 14px; font-size: clamp(31px, 3.5vw, 45px); line-height: 1; letter-spacing: -.04em; font-weight: 760; }
.deadline p:last-of-type { color: var(--muted); font-size: 15px; }
.deadline a { font-size: 14px; font-weight: 700; }

.workspace { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.workspace-head { display: flex; justify-content: space-between; align-items: end; padding: 32px clamp(22px, 5vw, 62px); background: var(--warm); border-bottom: 1px solid var(--line); }
.workspace-head h2, .resources h2, .pilot h2, .sources h2, .result h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(31px, 4vw, 48px); line-height: 1.06; letter-spacing: -.035em; font-weight: 500; }
.workspace-head .step-label { margin-bottom: 8px; }
.workspace-head > p { color: var(--muted); font-size: 14px; font-weight: 650; }
#check-form { padding: 0 clamp(22px, 5vw, 62px); }
.question { margin: 0; padding: 34px 0; border: 0; border-bottom: 1px solid var(--line); }
.question legend { display: flex; gap: 15px; width: 100%; padding: 0; font-size: clamp(19px, 2.2vw, 24px); line-height: 1.3; font-weight: 720; letter-spacing: -.015em; }
.question legend span { flex: 0 0 auto; color: var(--blue-dark); font: 700 12px/1.6 ui-monospace, monospace; }
.question > p { max-width: 760px; margin: 12px 0 20px 35px; color: var(--muted); font-size: 15px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px; margin-left: 35px; }
.choice-row label { position: relative; }
.choice-row input { position: absolute; opacity: 0; pointer-events: none; }
.choice-row span { display: block; min-width: 104px; min-height: 46px; padding: 10px 17px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); text-align: center; font-weight: 650; transition: border-color .15s, background .15s, color .15s; }
.choice-row label:hover span { border-color: rgba(0,111,202,.5); }
.choice-row input:checked + span { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-dark); box-shadow: inset 0 0 0 1px var(--blue); }
.submit-row { display: flex; justify-content: flex-end; align-items: center; gap: 20px; padding: 34px 0; }
#form-error { margin: 0; color: #a83232; font-size: 14px; }
.primary, .secondary, .intent { min-height: 48px; border-radius: 5px; padding: 11px 19px; font-weight: 720; border: 1px solid transparent; }
.primary { background: var(--blue); color: white; }
.primary:hover { background: var(--blue-dark); }
.secondary { background: var(--ink); color: white; }
.secondary:hover { background: #37332e; }

.result { display: grid; grid-template-columns: .62fr 1.38fr; margin: 48px 0 0; background: var(--ink); color: white; border-radius: 16px; overflow: hidden; }
.score-block { padding: clamp(30px, 5vw, 64px); border-right: 1px solid rgba(255,255,255,.18); }
.score-block .step-label { color: #91caff; }
.score { display: flex; align-items: baseline; margin: 22px 0 4px; line-height: 1; }
.score strong { font: 500 clamp(72px, 10vw, 126px)/.8 Georgia, serif; letter-spacing: -.06em; }
.score span { color: #aaa6a0; }
.level { color: #d8d3cb; }
.result-main { padding: clamp(30px, 5vw, 64px); }
.result-main h2 { font-size: clamp(30px, 4vw, 44px); }
.result-main > p { color: #c9c5bf; }
#gap-list { margin: 24px 0 30px; padding-left: 23px; }
#gap-list li { margin: 0 0 16px; padding-left: 8px; }
#gap-list strong { display: block; color: white; }
#gap-list span { color: #bdb8b0; font-size: 15px; }

.resources, .pilot, .sources { padding: clamp(78px, 10vw, 120px) 0; }
.resources { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 8vw, 100px); }
.resource-links { border-top: 1px solid var(--line); }
.resource-links a { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.resource-links a:hover strong { color: var(--blue-dark); }
.resource-links span { color: var(--muted); font-size: 14px; }

.pilot { border-top: 1px solid var(--line); }
.pilot-copy { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(35px, 8vw, 100px); align-items: end; margin-bottom: 42px; }
.pilot-copy .eyebrow { grid-column: 1 / -1; margin-bottom: -12px; }
.pilot-copy > p:last-child { color: var(--muted); margin: 0; }
.offers { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: white; }
.offers article { display: flex; flex-direction: column; gap: 20px; padding: clamp(28px, 5vw, 52px); }
.offers article + article { border-left: 1px solid var(--line); background: var(--warm); }
.offers h3 { margin: 0 0 3px; font-size: 21px; }
.offers article p { margin: 0; color: var(--muted); font-size: 14px; }
.offers .price { color: var(--ink); font-size: 38px; line-height: 1; font-weight: 760; letter-spacing: -.04em; }
.offers .price span { font-size: 12px; color: var(--muted); letter-spacing: 0; }
.offers ul { min-height: 94px; margin: 0; padding-left: 20px; color: var(--muted); font-size: 15px; }
.intent { margin-top: auto; background: var(--surface); border-color: var(--ink); color: var(--ink); }
.intent:hover { background: var(--ink); color: white; }
.intent[disabled] { opacity: .6; cursor: default; }
.intent-status { min-height: 24px; color: var(--green); font-size: 14px; text-align: center; }

.sources { border-top: 1px solid var(--line); }
.sources h2 { margin-bottom: 38px; }
.source-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.source-grid div { padding: 24px 28px 24px 0; }
.source-grid div + div { border-left: 1px solid var(--line); padding-left: 28px; }
.source-grid p, .citation { color: var(--muted); font-size: 14px; }
.citation { max-width: 900px; margin-top: 28px; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px 0 42px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

@media (max-width: 780px) {
  .topbar, main, footer { width: min(calc(100% - 26px), var(--max)); }
  .intro, .resources, .pilot-copy, .result { grid-template-columns: 1fr; }
  .intro { padding-top: 60px; }
  .deadline { max-width: 520px; }
  .result .score-block { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.18); }
  .offers, .source-grid { grid-template-columns: 1fr; }
  .offers article + article, .source-grid div + div { border-left: 0; border-top: 1px solid var(--line); }
  .source-grid div, .source-grid div + div { padding: 22px 0; }
  .resource-links a { grid-template-columns: 1fr; gap: 2px; }
  .workspace-head { align-items: start; }
  .workspace-head > p { display: none; }
}

@media (max-width: 500px) {
  .quiet-link { display: none; }
  h1 { font-size: 47px; }
  .question legend { gap: 9px; }
  .question > p, .choice-row { margin-left: 0; }
  .choice-row { display: grid; grid-template-columns: 1fr 1fr; }
  .choice-row span { min-width: 0; }
  .submit-row { align-items: stretch; flex-direction: column; }
  .primary { width: 100%; }
  footer { flex-direction: column; }
}

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