:root {
  --ink: #1c2733; --muted: #5b6b7a; --line: #dfe6ec; --bg: #fbfaf7;
  --card: #ffffff; --accent: #166534; --accent-soft: #e8f3ec;
  --gold: #b45309; --nav: #12202c;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; margin: 0; color: var(--ink); background: var(--bg); line-height: 1.65; font-size: 16px; }
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
img, svg { max-width: 100%; }
nav { background: var(--nav); color: #fff; }
nav .inner { max-width: 1080px; margin: 0 auto; padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
nav .brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 19px; }
nav .links a { color: #dbe7ee; text-decoration: none; margin-left: 18px; font-size: 14px; }
nav .links a:hover { color: #fff; text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.hero { padding: 56px 0 40px; }
.hero h1 { font-size: 42px; line-height: 1.12; margin: 0 0 16px; max-width: 780px; letter-spacing: -0.5px; }
.hero p.lede { font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 760px; margin: 0; }
section { padding: 36px 0; border-top: 1px solid var(--line); }
h1 { font-size: 34px; line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.3px; }
h2 { font-size: 27px; line-height: 1.25; margin: 0 0 14px; letter-spacing: -0.2px; }
h3 { font-size: 19px; line-height: 1.35; margin: 28px 0 8px; }
p { margin: 0 0 1em; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.card h3 { margin-top: 0; }
.card p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 6px 0 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.stat .value { font-size: 28px; font-weight: 700; line-height: 1.2; }
.stat .label { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.town-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-top: 14px; }
.town-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.town-card:hover { border-color: var(--accent); }
.town-card strong { display: block; }
.town-card span { font-size: 12px; color: var(--muted); }
.town-card.audited { background: var(--accent-soft); border-color: var(--accent); }
.town-card.audited span { color: var(--accent); font-weight: 600; }
.notice { background: #fffbeb; border: 1px solid #f5d48b; border-radius: 10px; padding: 14px 16px; font-size: 14px; line-height: 1.6; margin: 1.2em 0; }
.notice strong { color: var(--gold); }
table { border-collapse: collapse; width: 100%; margin: 1.4em 0; font-size: 14px; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
th { background: #f1f4f6; font-weight: 600; }
tbody tr:nth-child(even) td { background: #f8fafb; }
blockquote { border-left: 4px solid var(--accent); margin: 1.4em 0; padding: 12px 18px; background: var(--accent-soft); }
ul, ol { padding-left: 22px; margin: 0 0 1em; }
li { margin-bottom: 0.4em; }
li > ul, li > ol { margin: 0.4em 0 0; }
code { background: #f1f4f6; padding: 1px 5px; border-radius: 4px; font-size: 13px; }

/* Long audit documents: narrower measure, taller line height, room to breathe. */
.doc { max-width: 780px; font-size: 17px; line-height: 1.78; }
.doc h1 { font-size: 34px; line-height: 1.15; margin-bottom: 16px; }
.doc h2 { font-size: 25px; margin: 2.1em 0 0.6em; padding-top: 0.4em; border-top: 1px solid var(--line); scroll-margin-top: 20px; }
.doc h2:first-of-type { margin-top: 0.6em; }
.doc h3 { font-size: 18px; margin: 1.8em 0 0.5em; }
.doc p { margin: 0 0 1.1em; }
.doc ul, .doc ol { margin-bottom: 1.1em; }
.doc li { margin-bottom: 0.5em; }
.doc table { font-size: 14px; line-height: 1.5; }
.doc hr { border: none; border-top: 1px solid var(--line); margin: 2em 0; }

/* Table of contents for long documents. */
.toc { background: #f1f4f6; border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin: 0 0 28px; font-size: 14px; line-height: 1.55; }
.toc strong { display: block; margin-bottom: 6px; }
.toc ul { margin: 0; padding-left: 18px; }
.toc li { margin-bottom: 3px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* Charts. */
.figure { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin: 20px 0; }
.figure svg { display: block; width: 100%; height: auto; }
.figure figcaption { font-size: 13px; line-height: 1.55; color: var(--muted); margin-top: 12px; }
.figure figcaption strong { color: var(--ink); }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 18px; }
.chart-grid > .figure { margin: 0; }
.chart-grid > .figure:nth-child(n+3) { grid-column: 1 / -1; }
.charts > p { max-width: 780px; }

/* Two-column split (featured audit on the homepage). */
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: start; margin-top: 16px; }
.split .figure { margin: 0; }

footer { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--muted); font-size: 13px; margin-top: 40px; }
.btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; padding: 11px 18px; border-radius: 8px; font-weight: 600; margin-top: 12px; }
.btn:hover { background: #14532d; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.6; }

/* Visual summary: gap tiles, finding cards, status badges. Status is
   status, not alarm: colors distinguish states, labels carry meaning. */
.gap-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-top: 14px; }
.gap-tile { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--s-fg, var(--muted)); border-radius: 10px; padding: 14px; }
.gap-tile strong { display: block; font-size: 15px; margin: 6px 0 4px; }
.gap-tile p { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 0; }
.badge { display: inline-block; background: var(--s-bg, #f1f5f9); color: var(--s-fg, var(--muted)); border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.finding-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 14px; }
.finding-card { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--s-fg, var(--muted)); border-radius: 10px; padding: 16px; }
.finding-card strong { display: block; font-size: 16px; margin: 6px 0 6px; }
.finding-card p { color: var(--ink); font-size: 14px; line-height: 1.6; margin: 0 0 8px; }
.finding-card p.muted { color: var(--muted); font-size: 12px; margin: 0; }

@media (max-width: 860px) {
  .hero h1 { font-size: 32px; }
  .split { grid-template-columns: 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
  .chart-grid > .figure:nth-child(n+3) { grid-column: auto; }
  .doc { font-size: 16px; line-height: 1.7; }
  section { padding: 28px 0; }
  .gap-map, .finding-grid { grid-template-columns: 1fr; }
}
