:root {
  /* Durham flag palette: blue #00548F, gold #FFD046, red #EF3E42 */
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #16202a;
  --muted: #55616d;
  --line: #d8dde3;
  --brand: #00548f;
  --brand-ink: #ffffff;
  --gold: #ffd046;
  --red: #c8292e;
  --lane: #2f9e62;
  --road: #4a4f54;
  --bridge: #8c9298;
  --post: #ffd046;
  --accent-bg: #e6eef6;
  --focus: #ffd046;
  --hin: #ef3e42;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161c;
    --surface: #19212a;
    --ink: #e8edf2;
    --muted: #a2adb8;
    --line: #2c3742;
    --brand: #5fa8e0;
    --brand-ink: #0b1219;
    --red: #ff6b6f;
    --lane: #3fae73;
    --road: #3a4048;
    --bridge: #6b737b;
    --accent-bg: #1c2a38;
    --hin: #ff6b6f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.wrap { max-width: 720px; margin: 0 auto; padding-inline: 20px; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.hero { background: #00548f; color: #ffffff; border-bottom: 6px solid #ffd046; padding-block: 56px 48px; }
.hero a { color: inherit; }
.eyebrow { margin: 0 0 8px; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; opacity: .85; }
h1 { margin: 0 0 16px; font-size: clamp(40px, 9vw, 64px); line-height: 1.05; letter-spacing: -.02em; }
.lede { margin: 0 0 24px; font-size: 19px; max-width: 36em; }
.count { margin: 20px 0 0; font-weight: 600; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.btn {
  display: inline-block; padding: 12px 20px; border-radius: 10px; border: 2px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2;
}
.btn-primary { background: var(--surface); color: var(--ink); }
.hero .btn-primary { background: #ffd046; color: #0b1f33; }
.section .btn-primary, .act .btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.section .btn-ghost { color: var(--brand); }

.section { padding-block: 40px 8px; }
h2 { font-size: 26px; line-height: 1.25; margin: 0 0 12px; }

.video { margin: 24px 0; }
.video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 12px; background: #0b1219; }
.video figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.stat-num { display: block; font-size: 30px; font-weight: 700; color: var(--brand); line-height: 1.1; }
.stat-label { display: block; color: var(--muted); font-size: 15px; margin-top: 6px; }

.timeline { list-style: none; margin: 16px 0 0; padding: 0; border-left: 3px solid var(--line); }
.timeline li { position: relative; padding: 0 0 18px 20px; }
.timeline li::before {
  content: ""; position: absolute; left: -9px; top: 6px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--line);
}
.timeline li.done::before { background: var(--brand); border-color: var(--brand); }
.timeline li.now::before { background: #ef3e42; border-color: #ef3e42; }
.timeline .when { display: block; font-weight: 700; }
.timeline .what { display: block; color: var(--muted); }
.timeline li.now .what { color: var(--ink); }

.act, .council { }
form { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-top: 16px; }
.field { margin-bottom: 16px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--muted); font-size: 14px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
.checks { border: 0; padding: 0; margin: 0 0 16px; }
.checks label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-bottom: 8px; }
.checks input { width: auto; margin-top: 6px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { min-height: 1.6em; margin: 12px 0 0; font-weight: 600; }
.form-msg.error { color: var(--red); }

.email-preview { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 16px 0; }
.ep-row { margin: 0 0 6px; font-size: 15px; }
.ep-k { display: inline-block; min-width: 64px; color: var(--muted); }
#ep-body { white-space: pre-wrap; font: inherit; font-size: 15px; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.notice { background: var(--accent-bg); border-radius: 10px; padding: 12px 14px; font-size: 15px; margin-top: 16px; }

.map { position: relative; aspect-ratio: 4 / 3; max-width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.small { font-size: 14px; color: var(--muted); }

.footer { margin-top: 48px; padding-block: 24px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }

.page h1 { font-size: 36px; margin-top: 40px; }
.page h2 { font-size: 21px; margin-top: 28px; }

/* High Injury Network map */
.lookup-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 16px 0 8px; }
.lookup-bar .small { margin: 0; }
.result { border-left: 4px solid var(--line); background: var(--surface); border-radius: 0 10px 10px 0; padding: 10px 14px; margin: 12px 0; }
.result strong { display: block; font-size: 18px; line-height: 1.3; }
.result span { display: block; color: var(--muted); font-size: 15px; margin-top: 2px; }
.result.on { border-left-color: var(--hin); }
.result.close { border-left-color: #ffd046; }
.result.far { border-left-color: var(--brand); }
.bigmap { height: 520px; max-height: 70vh; border-radius: 12px; border: 1px solid var(--line); z-index: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; color: var(--muted); margin: 10px 0 16px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 22px; height: 5px; border-radius: 3px; }
.sw-hin { background: var(--hin); }
.sw-ours { background: #ffd046; height: 7px; }
.sw-you { width: 12px; height: 12px; border-radius: 50%; background: #00548f; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.streets .cta-row { margin: 8px 0 16px; }
.teaser { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; background: var(--accent-bg); border-radius: 12px; padding: 14px 16px; margin-top: 16px; }
.teaser p { margin: 0; flex: 1 1 260px; }
.page .btn-primary { background: var(--brand); color: var(--brand-ink); }
.page .btn-ghost { color: var(--brand); }
