/* Gateproof brand (option C, chosen 2026-10-13): Inter body, Source Serif 4 headings, deep green + brass.
   Fonts are self-hosted (SIL OFL, see fonts/LICENSE-*): no third-party requests. Status colours pass WCAG AA on white.
   Spacing scale: 4 8 12 16 24 32 48 72 px. */
@font-face { font-family: "Inter"; src: url(fonts/inter-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/inter-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/inter-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(fonts/source-serif-4-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(fonts/source-serif-4-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #fbfaf6; --surface: #ffffff; --ink: #1c2b24; --muted: #56635c; --line: #e4e1d7; --line-soft: #efede6;
  --primary: #14432f; --primary-dark: #0f3324; --brass: #d29a1e; --tint: #eef4ef;
  --missing: #a8261b; --conflict: #9a4a07; --check: #76580a; --ok: #2c6e45;
  --r: 12px; --r-lg: 18px; --shadow: 0 1px 2px rgba(20,40,30,.06), 0 8px 24px rgba(20,40,30,.08);
  --body: "Inter", system-ui, sans-serif; --head: "Source Serif 4", Georgia, serif; --mono: ui-monospace, "DejaVu Sans Mono", monospace;
  --max: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font: 16px/1.6 var(--body); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-underline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); margin: 0 0 16px; letter-spacing: -.015em; }
h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); margin: 0 0 16px; }
h3 { font-size: 1.15rem; margin: 0 0 6px; }
.wrap, main, .topbar, .site-footer .cols, .site-footer .legal { max-width: var(--max); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible, .pick:focus-within { outline: 3px solid var(--brass); outline-offset: 2px; }

/* header: mark + name left, two links + one button right; sticky */
.topbar-wrap { position: sticky; top: 0; z-index: 10; background: rgba(251,250,246,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 30px; height: 30px; }
.wm { font-family: var(--head); font-weight: 700; font-size: 1.3rem; letter-spacing: -.01em; }
.topbar nav { display: flex; align-items: center; gap: 4px; }
.topbar nav a { color: var(--ink); text-decoration: none; font-size: .95rem; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.topbar nav a:hover { background: var(--tint); }
.topbar nav a.btn { background: var(--primary); color: #fff; font-weight: 600; margin-left: 8px; padding: 9px 16px; }
.topbar nav a.btn:hover { background: var(--primary-dark); }

/* hero */
header.hero { background: var(--primary); color: #fff; position: relative; overflow: hidden; }
header.hero::after { content: ""; position: absolute; right: -120px; top: -160px; width: 520px; height: 520px; border-radius: 50%;
  border: 70px solid rgba(255,255,255,.04); pointer-events: none; }
header.hero .wrap { position: relative; z-index: 1; padding-top: 56px; padding-bottom: 56px; }
header.hero h1 { color: #fff; }
header.hero a { color: #fff; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #e3ab33; margin: 0 0 14px; }
.lede { font-size: 1.15rem; line-height: 1.55; color: rgba(255,255,255,.88); margin: 0 0 24px; max-width: 36em; }
.trust { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 20px; font-size: .95rem; color: rgba(255,255,255,.92); }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { width: 18px; height: 18px; fill: none; stroke: var(--brass); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cta { display: inline-block; background: #fff; color: var(--primary) !important; padding: 11px 20px; border-radius: var(--r); font-weight: 600; text-decoration: none; }
.cta:hover { background: var(--tint); }
.cta-note { display: inline-block; opacity: .85; margin: 8px 0 0 10px; font-size: .95rem; }

/* tool card */
.tool-card { background: var(--surface); color: var(--ink); border-radius: var(--r-lg); padding: 24px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.tool-card h2 { font-size: 1.25rem; margin: 0 0 14px; }
.tool-card a { color: var(--primary) !important; }
#drop { border: 2px dashed #cfd8d2; border-radius: var(--r); padding: 28px 20px; text-align: center; background: #f8fbf9; cursor: pointer; transition: background .15s, border-color .15s; }
#drop:hover, #drop.over { border-color: var(--primary); background: var(--tint); }
#drop p { margin: 6px 0 12px; }
.drop-icon { width: 34px; height: 34px; fill: none; stroke: var(--primary); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hint { color: var(--muted); font-size: .9rem; }
.pick { position: relative; display: inline-block; background: var(--primary); color: #fff; padding: 10px 20px; border-radius: var(--r); font-weight: 600; cursor: pointer; }
.pick:hover { background: var(--primary-dark); }
.pick input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.apptype { margin: 14px 0; font-size: .93rem; }
.apptype summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.apptype fieldset { border: 0; margin: 8px 0 0; padding: 0; }
.apptype label { display: block; margin: 4px 0; }
button { font: inherit; font-weight: 600; padding: 11px 22px; border: 0; border-radius: var(--r); background: var(--primary); color: #fff; cursor: pointer; }
button:hover:not(:disabled) { background: var(--primary-dark); }
button:disabled { background: #b9c3bd; cursor: default; }
#run { width: 100%; padding: 13px; font-size: 1.02rem; }
#status { color: var(--muted); min-height: 1.5em; margin: 10px 0 0; font-size: .92rem; }

/* sections */
main { padding-top: 8px; }
main > section { padding: 56px 0 8px; }
main > section.results { padding-top: 32px; }
main > section.results:not(:has(#report:not([hidden]))) { display: none; }
.sub { color: var(--muted); margin: -6px 0 20px; max-width: 46em; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; }
.stats b { display: block; font-family: var(--head); font-size: 2.1rem; line-height: 1.1; color: var(--primary); margin-bottom: 6px; }
.stats span { font-size: .92rem; color: var(--muted); }
.steps ol { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps li { counter-increment: s; position: relative; padding-top: 52px; color: var(--muted); }
.steps li::before { content: counter(s); position: absolute; top: 0; left: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--tint);
  color: var(--primary); font: 700 1.1rem/38px var(--head); text-align: center; }
.steps li b { display: block; color: var(--ink); font-size: 1.05rem; margin-bottom: 4px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.card .badge { margin-bottom: 12px; }
.card p { color: var(--muted); font-size: .94rem; margin: 0; }
.card.link { text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s; }
.card.link p { flex: 1; margin-bottom: 14px; }
.card.link span { color: var(--primary); font-weight: 600; }
.card.link:hover { box-shadow: var(--shadow); border-color: #cfd8d2; }
ul.findings { list-style: none; margin: 0; padding: 8px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
ul.findings li { display: flex; gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
ul.findings li:last-child { border-bottom: 0; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 0 20px; margin-bottom: 10px; max-width: 820px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 16px 0; }
.faq details p { color: var(--muted); margin: 0 0 16px; }

/* badges */
.badge { display: inline-block; flex: none; min-width: 84px; text-align: center; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px; color: #fff; background: var(--k); }
.badge.ok { background: transparent; color: var(--k); box-shadow: inset 0 0 0 1.5px var(--k); }
.missing { --k: var(--missing); } .conflict { --k: var(--conflict); } .check { --k: var(--check); } .ok { --k: var(--ok); }

/* report */
#report { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px 28px 20px; overflow-x: auto; box-shadow: var(--shadow); }
#report h2 { font-size: 1.5rem; margin-top: 24px; }
#report h3 { font-size: 1.15rem; margin: 28px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); }
#report ul { list-style: none; padding: 0; margin: 0; }
#report li { padding: 8px 0; border-bottom: 1px solid var(--line-soft); display: flex; gap: 10px; align-items: baseline; }
#report table { border-collapse: collapse; font-size: .88rem; width: 100%; margin: 10px 0; }
#report th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 2px solid var(--ink); padding: 6px 8px; }
#report td { border-bottom: 1px solid var(--line); padding: 6px 8px; vertical-align: top; }
#report td.mono, .mono { font-family: var(--mono); font-size: .84em; }
#report details { display: inline; } #report summary { display: inline; cursor: pointer; color: var(--primary); font-size: .88rem; margin-left: 6px; }
#report details[open] { display: block; font-size: .84rem; color: var(--muted); margin-top: 4px; }
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 20px 0 8px; }
.summary div { border: 1px solid var(--line); border-top: 4px solid var(--k); border-radius: var(--r); padding: 12px 14px; font-size: .88rem; color: var(--muted); }
.summary b { font-family: var(--head); font-size: 2rem; display: block; line-height: 1.1; color: var(--k); }
#actions { margin-top: 16px; }
#actions button { background: var(--surface); color: var(--primary); box-shadow: inset 0 0 0 1.5px var(--primary); margin-right: 8px; }
#actions button:hover { background: var(--tint); }

/* content pages (guides, checklist, terms) */
header.hero.page .wrap { padding-top: 48px; padding-bottom: 48px; }
header.hero.page p { max-width: 46em; color: rgba(255,255,255,.88); }
main.prose > * { max-width: 760px; }
main.prose { padding-top: 40px; }
main.prose h2 { margin-top: 40px; }
table.data { border-collapse: collapse; font-size: .95rem; margin: 12px 0; background: var(--surface); }
table.data th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 2px solid var(--ink); padding: 6px 10px; }
table.data td { border-bottom: 1px solid var(--line); padding: 6px 10px; }
table.data td.n { text-align: right; font-variant-numeric: tabular-nums; }
ul.check { list-style: none; padding-left: 0; }
ul.check li { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
ul.check input { accent-color: var(--primary); width: 1.05em; height: 1.05em; margin-right: 8px; }
ul.check small { color: var(--muted); display: block; margin-left: 28px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 40px 0 32px; background: var(--surface); font-size: .92rem; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.site-footer .about p { color: var(--muted); max-width: 30em; }
.site-footer .fh { font-family: var(--body); font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 6px 0 10px; }
.site-footer .cols > div > a:not(.brand) { display: block; color: var(--ink); text-decoration: none; margin: 6px 0; }
.site-footer .cols > div > a:not(.brand):hover { color: var(--primary); text-decoration: underline; }
.site-footer .legal { color: var(--muted); font-size: .84rem; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line-soft); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .cards { grid-template-columns: repeat(2, 1fr); } .cards.three, .stats, .steps ol { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .topbar nav a:not(.btn) { display: none; } .topbar nav a.btn { padding: 12px 18px; }
  .cards { grid-template-columns: 1fr; } .summary { grid-template-columns: 1fr 1fr; }
  header.hero .wrap { padding-top: 36px; padding-bottom: 36px; }
  .tool-card { padding: 18px; } #report { padding: 8px 16px 16px; }
}
@media print {
  .topbar-wrap, header.hero, main > section:not(.results), #actions, .site-footer { display: none !important; }
  main > section.results { display: block !important; padding: 0; }
  body { background: #fff; } #report { border: 0; padding: 0; box-shadow: none; }
  .badge { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #report details > *:not(summary) { display: block; }
  #report li, #report tr { break-inside: avoid; }
}
