:root {
  --ink: #1f211f;
  --muted: #66675f;
  --paper: #f2efe8;
  --card: #fbfaf7;
  --line: #d7d1c5;
  --greige: #afa797;
  --moss: #4d5d4b;
  --rust: #a95338;
  --gold: #c59a4a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
main { width: min(1120px, calc(100% - 34px)); margin: 0 auto; }
.hero { padding: 76px 0 46px; border-bottom: 1px solid var(--line); }
.eyebrow, .section-kicker { font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--rust); }
h1 { margin: 16px 0 22px; max-width: 1000px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 6vw, 78px); line-height: .98; letter-spacing: -.04em; font-weight: 500; }
h1 span { color: #777266; font-size: .62em; line-height: 1.08; display: inline-block; margin-top: 12px; }
.lede { max-width: 820px; font-size: 20px; color: #484a45; }
.facts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.facts span { padding: 10px 14px; border: 1px solid var(--line); background: rgba(255,255,255,.4); font-size: 14px; }
.facts b { margin-right: 4px; }
.progress-wrap { position: sticky; top: 0; z-index: 10; margin: 0 -17px; padding: 14px 17px; background: rgba(242,239,232,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.progress-wrap > div:first-child { display: flex; justify-content: space-between; font-size: 13px; }
#progress-note { color: var(--muted); }
.progress-track { height: 5px; margin-top: 9px; background: #ddd8ce; overflow: hidden; }
#progress-bar { width: 0; height: 100%; background: var(--rust); transition: width .2s ease; }
.context-panel, .submit-panel { margin: 42px 0; padding: 34px; background: var(--card); border: 1px solid var(--line); }
h2 { margin: 6px 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-weight: 500; }
.context-panel > p { margin-top: 0; color: var(--muted); }
.context-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 24px; }
label { display: block; font-size: 13px; font-weight: 750; }
input, select { width: 100%; margin-top: 7px; padding: 12px; border: 1px solid #c8c1b5; border-radius: 0; background: white; color: var(--ink); font: inherit; }
.part-header { margin: 64px 0 30px; padding-bottom: 22px; border-bottom: 2px solid var(--ink); }
.part-header h2 { font-size: 42px; }
.part-header p { max-width: 790px; color: var(--muted); }
.dimension { margin: 42px 0 56px; }
.dimension-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.dimension-title span { color: var(--rust); font-weight: 800; }
.dimension-title h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 500; }
.question-card { margin: 0 0 16px; padding: 26px; border: 1px solid var(--line); background: var(--card); }
.question-card legend { width: 100%; padding: 0 0 18px; font-size: 17px; font-weight: 750; }
.question-card legend span { color: var(--rust); margin-right: 7px; }
.option { display: flex; align-items: flex-start; gap: 11px; padding: 11px 12px; margin: 5px 0; border: 1px solid transparent; background: #f4f1eb; font-size: 14px; font-weight: 500; cursor: pointer; }
.option:hover { border-color: var(--greige); }
.option:has(input:checked) { border-color: var(--moss); background: #e8ece5; }
.option input { width: auto; margin: 3px 0 0; accent-color: var(--moss); }
.question-note { margin: 13px 0 0; color: var(--rust); font-size: 13px; font-style: italic; }
.submit-panel { text-align: center; }
#incomplete-message { min-height: 1.5em; color: var(--rust); font-weight: 700; }
.button-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
button { border: 1px solid var(--ink); padding: 13px 18px; font: inherit; font-weight: 800; cursor: pointer; }
.primary { background: var(--ink); color: white; }
.primary:hover { background: var(--rust); border-color: var(--rust); }
.secondary { background: transparent; color: var(--ink); }
.results { margin: 72px 0; scroll-margin-top: 80px; }
.score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 18px 0; }
.score-card { min-height: 210px; padding: 30px; color: white; display: flex; flex-direction: column; justify-content: space-between; }
.readiness-card { background: var(--moss); }
.vulnerability-card { background: var(--rust); }
.score-card span { font-family: Georgia, serif; font-size: 76px; line-height: 1; }
.score-card small { font-size: 18px; opacity: .75; }
.score-card strong { font-size: 18px; }
.score-label { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 800; }
.position-card { display: grid; grid-template-columns: .8fr 1.2fr; gap: 32px; margin: 18px 0; padding: 32px; border: 1px solid var(--line); background: var(--card); }
.matrix { display: grid; grid-template-columns: 1fr 1fr; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.matrix > div { min-height: 112px; padding: 16px; border-right: 1px solid var(--line); border-top: 1px solid var(--line); font-weight: 800; color: #777268; transition: .2s; }
.matrix small { display: block; margin-top: 8px; font-weight: 500; line-height: 1.35; }
.matrix .active { background: var(--gold); color: var(--ink); box-shadow: inset 0 0 0 3px var(--ink); }
.dimension-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 18px 0; }
.dimension-grid article, .actions-card { padding: 30px; background: var(--card); border: 1px solid var(--line); }
.dimension-grid h3 { margin: 0 0 22px; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.bar-row { margin: 16px 0; }
.bar-meta { display: flex; justify-content: space-between; gap: 15px; font-size: 13px; font-weight: 750; }
.bar-track { height: 9px; background: #e0dbd1; margin-top: 7px; }
.bar-fill { height: 100%; background: var(--moss); }
#vulnerability-dimensions .bar-fill { background: var(--rust); }
.actions-card { margin-top: 18px; }
.actions-card ol { padding-left: 22px; }
.actions-card li { padding: 7px 0 13px 8px; border-bottom: 1px solid var(--line); }
.disclaimer { color: var(--muted); font-size: 12px; }
footer { padding: 32px 17px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 12px; }

@media (max-width: 760px) {
  .hero { padding-top: 50px; }
  .context-grid, .score-grid, .position-card, .dimension-grid { grid-template-columns: 1fr; }
  .context-panel, .question-card, .position-card, .dimension-grid article, .actions-card { padding: 22px; }
  .position-card { gap: 20px; }
  .matrix > div { min-height: 125px; padding: 12px; font-size: 13px; }
  .progress-wrap > div:first-child { gap: 10px; }
}

@media print {
  body { background: white; }
  .hero, .progress-wrap, form, footer { display: none !important; }
  main { width: 100%; }
  .results { margin: 0; }
  .score-card { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .position-card, .dimension-grid, .score-grid { break-inside: avoid; }
}
