:root {
  --bg: #ffffff;
  --text: #1b1f24;
  --muted: #4a525c;
  --accent: #0b5cad;
  --accent-text: #ffffff;
  --accent-hover: #084a8c;
  --border: #c9d0d8;
  --soft: #f2f5f8;
  --focus: #b4530a;
  --high: #a1142f;
  --medium: #7a4b00;
  --low: #2d5a2e;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161b;
    --text: #e8ecf1;
    --muted: #b7c0ca;
    --accent: #8ec2ff;
    --accent-text: #0b1a2b;
    --accent-hover: #b5d7ff;
    --border: #3a434d;
    --soft: #1b2128;
    --focus: #ffb26b;
    --high: #ff9aa9;
    --medium: #ffcf75;
    --low: #9fdc9f;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--bg); color: var(--text); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }
.prose { max-width: 70ch; }

/* Header: one row on wide screens; brand + scan button, then the menu, on narrow screens */
header.site { border-bottom: 1px solid var(--border); }
header.site .wrap { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "brand nav cta"; align-items: center; gap: 0.5rem 1.25rem; padding-top: 0.6rem; padding-bottom: 0.6rem; }
.brand { grid-area: brand; font-weight: 700; font-size: 1.25rem; color: var(--text); text-decoration: none; letter-spacing: 0.01em; display: inline-flex; align-items: center; min-height: 44px; }
.brand span { color: var(--accent); }
header.site nav { grid-area: nav; justify-self: end; }
header.site .cta { grid-area: cta; }
nav ul { list-style: none; display: flex; gap: 0.25rem 1rem; margin: 0; padding: 0; }
nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.35rem; text-decoration: none; font-weight: 500; }
nav a:hover { text-decoration: underline; }
nav a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; }
@media (max-width: 700px) {
  header.site .wrap { grid-template-columns: 1fr auto; grid-template-areas: "brand cta" "nav nav"; }
  header.site nav { justify-self: stretch; }
  nav ul { justify-content: space-between; }
}

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0.55rem 1.1rem; border-radius: 6px; font-weight: 600; text-decoration: none; border: 2px solid var(--accent); font-size: 1rem; font-family: inherit; cursor: pointer; }
.btn.primary { background: var(--accent); color: var(--accent-text); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-text); }
.btn.secondary { color: var(--accent); background: transparent; }
.btn.small { padding: 0.35rem 0.85rem; font-size: 0.95rem; }

main { display: block; }
.hero { padding: 2.25rem 0 1.5rem; }
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); line-height: 1.15; margin: 0 0 0.85rem; max-width: 22ch; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; margin: 0 0 1.25rem; }
section { padding: 1.85rem 0; }
section + section { border-top: 1px solid var(--border); }
h2 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 0.85rem; font-weight: 700; }
h3 { font-size: 1.15rem; margin: 0 0 0.4rem; font-weight: 700; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); gap: 1rem; }
.card { border: 1px solid var(--border); border-radius: 8px; padding: 1.1rem; background: var(--soft); display: flex; flex-direction: column; }
.card p { margin: 0.25rem 0 0; }
.card .more { margin-top: auto; padding-top: 0.75rem; }
.note { color: var(--muted); font-size: 0.95rem; }
.stat { font-size: 2rem; font-weight: 700; color: var(--accent); line-height: 1.1; margin: 0; }
ol.steps { padding-left: 1.4rem; margin: 0; }
ol.steps li { margin-bottom: 0.5rem; }
.checklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); gap: 0.25rem 2rem; padding-left: 1.2rem; margin: 0; }

/* Scan form */
.scan { border: 1px solid var(--border); border-radius: 10px; padding: 1.1rem; background: var(--soft); max-width: 40rem; }
.scan .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1rem; }
.scan .wide { grid-column: 1 / -1; }
.scan label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.scan input, .scan select { width: 100%; min-height: 44px; padding: 0.5rem 0.65rem; font-size: 1rem; font-family: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--muted); border-radius: 6px; }
.scan .submit { margin-top: 0.9rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.scan .submit .btn { min-width: 12rem; }
.scan p.note { margin: 0.6rem 0 0; }
@media (max-width: 560px) { .scan .fields { grid-template-columns: 1fr; } .scan .submit .btn { width: 100%; } }

details { border: 1px solid var(--border); border-radius: 6px; padding: 0.6rem 1rem; margin-bottom: 0.6rem; background: var(--soft); }
summary { cursor: pointer; font-weight: 600; min-height: 32px; }
footer.site { border-top: 1px solid var(--border); padding: 1.75rem 0; color: var(--muted); font-size: 0.95rem; }
footer.site ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; padding: 0; margin: 0 0 0.6rem; }
footer.site a { display: inline-flex; align-items: center; min-height: 44px; }
footer.site p { margin: 0.25rem 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; background: var(--soft); padding: 0.05rem 0.3rem; border-radius: 4px; overflow-wrap: anywhere; }

/* Report */
.summary-strip { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; border: 1px solid var(--border); border-radius: 8px; padding: 0.8rem 1.1rem; background: var(--soft); margin: 0; }
.summary-strip div { display: flex; gap: 0.5rem; align-items: baseline; }
.summary-strip dt { color: var(--muted); }
.summary-strip dd { margin: 0; font-weight: 700; font-size: 1.2rem; }
.findings { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr)); gap: 1rem; list-style: none; padding: 0; margin: 0; }
.finding { border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.1rem; background: var(--soft); }
.finding .top { display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem; align-items: center; margin-bottom: 0.4rem; }
.finding h3 { margin: 0; font-size: 1.05rem; }
.finding dl { margin: 0.4rem 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 0.75rem; }
.finding dt { font-weight: 600; color: var(--muted); }
.finding dd { margin: 0; }
.badge { display: inline-block; border: 2px solid currentColor; border-radius: 999px; padding: 0 0.6rem; font-size: 0.85rem; font-weight: 700; line-height: 1.6; }
.badge.high { color: var(--high); }
.badge.medium { color: var(--medium); }
.badge.low { color: var(--low); }
.tag { font-size: 0.85rem; color: var(--muted); }
figure { margin: 0; }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); gap: 1rem; margin: 0.5rem 0 1.5rem; }
.pair img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
figcaption { font-size: 0.95rem; color: var(--muted); margin-top: 0.35rem; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
.h3 { font-size: 1.15rem; }
pre { background: var(--soft); border: 1px solid var(--border); border-radius: 6px; padding: 0.75rem 1rem; white-space: pre-wrap; overflow-wrap: anywhere; }
pre code { background: none; padding: 0; }
figure img, .card img { display: block; max-width: 100%; height: auto; }
figure.card { margin: 0; }
/* v3 (11-28): form fields aligned in rows, service tiers, example finding, info badge */
.scan .fields > div { display: flex; flex-direction: column; }
.scan .fields > div > input, .scan .fields > div > select { margin-top: auto; }
.card .tier { font-size: 0.85rem; font-weight: 600; color: var(--muted); margin: 0 0 0.35rem; }
.card .tier.free { color: var(--accent); }
.example-title { margin-top: 1.75rem; }
.finding h4 { margin: 0; font-size: 1.05rem; }
.pair .finding .more { margin: 0.75rem 0 0; }
.badge.info { color: var(--muted); }
