:root {
  --ink: #0f1b2d;
  --ink-2: #33415c;
  --muted: #5b6678;
  --line: #dfe3ea;
  --line-2: #eceff4;
  --bg: #f6f5f1;
  --card: #ffffff;
  --accent: #0e8a7e;
  --accent-ink: #0a6b62;
  --accent-soft: #e3f3f0;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.55 var(--sans);
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--accent-ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 .5rem; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h2 { font-size: 1.7rem; }
.h3, h3 { font-size: 1.25rem; }
p { margin: 0 0 .9rem; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 600; color: var(--accent-ink); margin-bottom: .6rem; }
.lede { font-size: 1.125rem; color: var(--ink-2); max-width: 46ch; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 10; }
main:focus { outline: none; }
.print-only { display: none; }

/* header / footer */
.site-header { background: var(--ink); color: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 600; letter-spacing: .01em; }
.brand-mark { width: 26px; height: 26px; color: #37c2a8; }
.header-cta { color: #fff; text-decoration: none; font-size: .9rem; border: 1px solid rgba(255,255,255,.3); padding: 7px 14px; border-radius: 999px; }
.header-cta:hover { background: rgba(255,255,255,.1); }
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 28px 0 40px; color: var(--muted); font-size: .85rem; }
.site-footer p { margin: 0 0 .4rem; }
main.wrap { padding-top: 40px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 1rem var(--sans); border-radius: 10px; padding: 12px 20px; cursor: pointer;
  border: 1px solid transparent; text-decoration: none; transition: background .15s, border-color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .opt input:focus-visible + .opt-mark, .step:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #7fd6c8; outline-offset: 2px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.25rem; }
.actions.spread { justify-content: space-between; }
.actions.center { justify-content: center; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin-bottom: 20px; }
.panel.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }

/* intro */
.intro { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: start; padding: 24px 0; }
.trust { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 8px; color: var(--ink-2); }
.trust li { padding-left: 26px; position: relative; }
.trust li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 8px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }
.domain-list { list-style: none; margin: 0; padding: 8px 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.domain-list li { display: flex; gap: 16px; padding: 14px 22px; border-bottom: 1px solid var(--line-2); }
.domain-list li:last-child { border-bottom: 0; }
.domain-list strong { display: block; }
.domain-list .muted { display: block; font-size: .9rem; }
.dl-num { font-family: var(--serif); color: var(--accent); font-size: 1.1rem; min-width: 1.6em; font-variant-numeric: tabular-nums; }

/* forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; margin-top: 20px; }
.span-2 { grid-column: 1 / -1; }
label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
input:not([type=checkbox]):not([type=radio]), select {
  font: 400 1rem var(--sans); padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); width: 100%;
}
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: .92rem; margin-bottom: 10px; padding: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks legend { width: 100%; }
.checks .check { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-weight: 500; }
.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; font-size: .9rem; }
.check input { margin-top: .25em; accent-color: var(--accent); }
.form-error { color: var(--bad); background: var(--bad-soft); padding: 10px 12px; border-radius: 8px; font-size: .92rem; margin-top: 12px; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* progress */
.progress-head { margin-bottom: 20px; }
.steps { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.step { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; color: var(--muted); font: 600 .9rem var(--sans); cursor: pointer; }
.step.is-done { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.step.is-current { background: var(--ink); border-color: var(--ink); color: #fff; }
.progress { height: 6px; background: var(--line-2); border-radius: 999px; overflow: hidden; margin-bottom: 6px; }
.progress span { display: block; height: 100%; background: var(--accent); transition: width .3s; }

/* questions */
.q { padding: 22px 0; border-top: 1px solid var(--line-2); margin-top: 18px; }
.q legend { float: left; width: 100%; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; display: flex; gap: 12px; line-height: 1.35; margin-bottom: 14px; }
.q .opts { clear: both; }
.q-num { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: #fff; font: 600 .85rem/28px var(--sans); text-align: center; }
.q-missing legend { color: var(--bad); }
.q-missing .q-num { background: var(--bad); }
.opts { display: grid; gap: 8px; }
.opt { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 400; font-size: .97rem; transition: border-color .15s, background .15s; }
.opt:hover { border-color: #b9c2cf; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt-mark { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #9aa5b5; margin-top: 2px; background: #fff; }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opt input:checked + .opt-mark { border-color: var(--accent); box-shadow: inset 0 0 0 4px #fff; background: var(--accent); }
.opt-unsure { border-style: dashed; color: var(--muted); }

/* results */
.score-hero { display: grid; grid-template-columns: 300px 1fr; gap: 36px; align-items: center; }
.gauge { width: 100%; }
.gauge-track { fill: none; stroke: var(--line-2); stroke-width: 16; stroke-linecap: round; }
.gauge-fill { fill: none; stroke-width: 16; stroke-linecap: round; }
.gauge-num { font: 600 44px var(--serif); fill: var(--ink); }
.gauge-sub { font: 500 11px var(--sans); fill: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.level { font-size: clamp(2.2rem, 4vw, 3rem); margin-bottom: .4rem; }
.lvl-initial { color: #c0392b; } .lvl-developing { color: #d35400; } .lvl-defined { color: #b7791f; } .lvl-managed { color: #0e8a7e; } .lvl-optimized { color: #1f7a3a; }
.bar .lvl-initial { background: #c0392b; } .bar .lvl-developing { background: #d35400; } .bar .lvl-defined { background: #d69e2e; } .bar .lvl-managed { background: #0e8a7e; } .bar .lvl-optimized { background: #1f7a3a; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.stat { border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; min-width: 120px; }
.stat strong { display: block; font: 600 1.6rem var(--serif); }
.stat span { font-size: .85rem; color: var(--muted); }
.stat-bad { border-color: #f3c3bd; background: var(--bad-soft); }
.stat-bad strong { color: var(--bad); }
.stat-good strong { color: var(--accent-ink); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-2 .panel { margin-bottom: 20px; }
.radar { width: 100%; max-width: 420px; display: block; margin: 0 auto; overflow: visible; }
.radar-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.radar-axis { stroke: var(--line); stroke-width: 1; }
.radar-shape { fill: rgba(14,138,126,.18); stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.radar-dot { fill: var(--accent); }
.radar-label { font: 600 10.5px var(--sans); fill: var(--ink-2); }
.radar-val { fill: var(--accent-ink); }
.bars { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 14px; }
.bar-label { display: flex; justify-content: space-between; font-weight: 600; font-size: .93rem; }
.bar-val { font-variant-numeric: tabular-nums; }
.bar { height: 10px; background: var(--line-2); border-radius: 999px; overflow: hidden; margin: 5px 0 3px; }
.bar span { display: block; height: 100%; border-radius: 999px; }

/* gate */
.gate { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; border-color: #b9e3dc; }
.gate-form { display: grid; gap: 14px; align-content: start; background: #fafbfc; border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.preview-list { padding-left: 1.2em; margin: 0 0 14px; display: grid; gap: 8px; }
.preview-list .tag { margin-right: 8px; }
.locked { display: grid; gap: 10px; margin: 4px 0 18px; padding: 14px; border-radius: 10px; background: repeating-linear-gradient(135deg, #f3f4f7 0 8px, #eef0f4 8px 16px); }
.locked-line { height: 10px; border-radius: 6px; background: #dfe3ea; }
.locked-line.short { width: 60%; }

/* report */
.tag { display: inline-block; font: 600 .72rem var(--sans); text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 6px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.tag-bad { background: var(--bad-soft); color: var(--bad); }
.tag-soft { background: transparent; border: 1px solid var(--line); text-transform: none; letter-spacing: 0; font-weight: 500; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.findings { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.findings li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid #f3c3bd; border-radius: 10px; background: #fffaf9; }
.findings strong { display: block; }
.phase { margin-top: 22px; }
.phase-title { font-size: 1.05rem; font-family: var(--sans); font-weight: 700; color: var(--accent-ink); padding-bottom: 8px; border-bottom: 2px solid var(--accent-soft); }
.recs { margin: 0; padding-left: 1.3em; display: grid; gap: 16px; }
.recs li { padding-left: 4px; }
.recs p { margin: 6px 0 0; color: var(--ink-2); }
.rec-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.note { background: #fff8e6; border-left: 3px solid #d69e2e; padding: 6px 10px; border-radius: 4px; }
.opt-list { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.cta { background: var(--ink); color: #fff; border-color: var(--ink); display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; }
.cta p { color: #c9d2e0; margin: 0; }
.cta .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.cta .actions { margin-top: 0; justify-content: flex-end; }
.disclaimer { text-align: center; }

@media (max-width: 860px) {
  .intro, .score-hero, .grid-2, .gate, .cta { grid-template-columns: 1fr; }
  .intro { gap: 28px; }
  .score-hero { gap: 12px; }
  .gauge-wrap { max-width: 280px; margin: 0 auto; }
  .cta .actions { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .panel { padding: 20px; }
  .header-cta { font-size: .8rem; padding: 6px 10px; }
  main.wrap { padding-top: 24px; }
}

@media print {
  @page { margin: 16mm 14mm; }
  body { background: #fff; font-size: 11pt; }
  .site-header, .site-footer, .no-print, .skip { display: none !important; }
  .print-only { display: block; }
  .print-head { border-bottom: 2px solid var(--ink); margin-bottom: 18px; padding-bottom: 10px; }
  .print-head h1 { font-size: 22pt; }
  main.wrap, .wrap { max-width: none; padding: 0; }
  .panel { border: 1px solid #ccc; padding: 14px 16px; margin-bottom: 10px; }
  .score-hero, .grid-2 .panel, .cta { break-inside: avoid; }
  .recs li, .findings li { break-inside: avoid; }
  .phase-title, .panel > .h3 { break-after: avoid; }
  .score-hero { grid-template-columns: 190px 1fr; gap: 20px; }
  .level { font-size: 24pt; }
  .lede { font-size: 10.5pt; }
  .stats { flex-wrap: nowrap; }
  .stat { min-width: 0; padding: 6px 10px; }
  .stat strong { font-size: 15pt; }
  .grid-2 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .grid-2 .panel { margin-bottom: 10px; }
  .bars { gap: 6px; }
  .bar-label { font-size: 9.5pt; }
  .bars .small { font-size: 8pt; }
  .radar { max-width: 300px; }
  .cta { background: #fff; color: var(--ink); border: 2px solid var(--ink); grid-template-columns: 1fr; }
  .cta p { color: var(--ink-2); }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

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