:root {
  color-scheme: light;
  --ink: #172033; --muted: #596477; --paper: #f3f6fa; --panel: #fff; --line: #c8d1df;
  --accent: #14543d; --accent-dark: #0a3d2b; --focus: #a83f00; --warn: #fff5cf;
  --pass: #096b42; --review: #805500; --fail: #9b2c2c; --na: #596477;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.55; }
a { color: #005ea8; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.skip-link { position: absolute; top: -100px; left: 1rem; z-index: 10; padding: .75rem 1rem; color: #fff; background: var(--ink); }
.skip-link:focus { top: 1rem; }
.site-header, main, footer { width: min(1100px, calc(100% - 2rem)); margin-inline: auto; }
.site-header { padding: 3rem 0 1.5rem; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 850px; margin-bottom: .5rem; font-size: clamp(2.4rem, 7vw, 4.8rem); line-height: .98; letter-spacing: -.045em; }
h2 { margin-bottom: .65rem; line-height: 1.15; }
h3 { margin: 1.5rem 0 .5rem; }
.eyebrow, .step { margin-bottom: .3rem; color: var(--accent); font-size: .78rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.lede { max-width: 760px; color: var(--muted); font-size: 1.12rem; }
.panel { margin-bottom: 1rem; padding: clamp(1rem, 3vw, 1.6rem); border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: 0 4px 18px rgba(23, 32, 51, .05); }
.compact { padding-block: 1rem; }
.warning { border-left: 6px solid #ad7400; background: var(--warn); }
.panel p:last-child { margin-bottom: 0; }
.field-grid { display: grid; gap: .85rem 1rem; margin-block: .8rem; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: block; font-weight: 760; }
input[type="text"], textarea, select { width: 100%; min-height: 44px; margin-top: .32rem; padding: .62rem .7rem; border: 1px solid #8390a5; border-radius: 9px; color: var(--ink); background: #fff; font: inherit; }
textarea { min-height: 62px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; }
.checkbox { display: flex; align-items: center; gap: .65rem; min-height: 44px; padding-top: 1.3rem; }
.checkbox input { width: 1.3rem; height: 1.3rem; margin: 0; }
.hint { color: var(--muted); font-size: .9rem; }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; }
button { min-height: 44px; padding: .65rem 1rem; border: 1px solid #69758a; border-radius: 9px; color: var(--ink); background: #fff; font: inherit; font-weight: 820; cursor: pointer; }
button.primary { border-color: var(--accent); color: #fff; background: var(--accent); }
button:hover:not(:disabled) { border-color: var(--accent-dark); box-shadow: inset 0 0 0 2px var(--accent-dark); }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
.status { min-height: 1.6rem; margin: .25rem 0 1rem; font-weight: 760; }
.status.error { color: var(--fail); }
.results { border-top: 7px solid var(--accent); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.status-badge { padding: .35rem .65rem; border-radius: 999px; font-size: .85rem; font-weight: 850; text-transform: uppercase; }
.stage-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .65rem; margin: 1rem 0; }
.stage-card { padding: .75rem; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.stage-card strong { display: block; }
.state-pass { color: var(--pass); font-weight: 800; }
.state-review { color: var(--review); font-weight: 800; }
.state-fail { color: var(--fail); font-weight: 800; }
.state-not-applicable { color: var(--na); font-weight: 800; }
.classification, .local-details dl { display: grid; grid-template-columns: minmax(150px, .5fr) minmax(0, 1.5fr); margin: .5rem 0; }
dt, dd { margin: 0; padding: .5rem; border-bottom: 1px solid var(--line); }
dt { font-weight: 800; }
dd { overflow-wrap: anywhere; white-space: pre-wrap; }
.local-details { margin: 1rem 0; padding: .8rem; border: 1px solid var(--line); border-radius: 10px; }
.local-details summary { min-height: 44px; padding-top: .55rem; font-weight: 800; cursor: pointer; }
.result-list { margin-top: .5rem; padding-left: 1.5rem; }
.result-list li { margin-bottom: .65rem; }
.finding-code { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; font-weight: 850; }
.offer { border: 2px solid var(--accent); }
footer { padding: 1rem 0 2.5rem; color: var(--muted); font-size: .9rem; }
.test-page main { padding-top: 2rem; }
.test-summary { padding: 1rem; border-radius: 10px; font-weight: 800; }
.test-summary.pass { color: #075b36; background: #dff5e8; }
.test-summary.fail { color: #8f2525; background: #fde4e4; }
.test-results { padding-left: 1.4rem; }
.result-pass { color: #075b36; }
.result-fail { color: #8f2525; }
@media (max-width: 780px) {
  .site-header, main, footer { width: min(100% - 1rem, 1100px); }
  .site-header { padding-top: 2rem; }
  .field-grid.two, .stage-grid { grid-template-columns: 1fr; }
  .section-heading { display: block; }
  .actions button { width: 100%; }
  .classification, .local-details dl { grid-template-columns: 1fr; }
  dd { padding-top: 0; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
