/* Layout: a calm single column of guidance on a cool prairie-sky ground; the dark radar panel is the one loud element */
:root {
  --bg: #EDF2F5;
  --surface: #FFFFFF;
  --surface-2: #E2EAEF;
  --ink: #132330;
  --ink-2: #4A5C6B;
  --line: #C7D4DD;
  --sky: #1C5C89;
  --sky-soft: #DCE9F2;
  --action: #F0AE2E;
  --action-hover: #E29C10;
  --action-ink: #1B1407;
  --ok: #2E7A53;
  --alert: #B42318;
  --scope-bg: #0F2230;
  --scope-panel: #15303F;
  --scope-ring: #3A6684;
  --scope-ink: #E8F1F6;
  --scope-ink-2: #A3BBCB;
  --hail-1: #4CB07C;
  --hail-2: #E9C84A;
  --hail-3: #EF8636;
  --hail-4: #DA4A92;
  --font-display: "Overpass", "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --radius: 10px;
  --radius-lg: 18px;
  --wrap: 1120px;
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1821;
    --surface: #13222D;
    --surface-2: #192C3A;
    --ink: #E4EDF2;
    --ink-2: #A3B6C4;
    --line: #2A4152;
    --sky: #86BCE2;
    --sky-soft: #1A3446;
    --action: #F3B841;
    --action-hover: #F7C963;
    --action-ink: #1B1407;
    --ok: #64C38F;
    --alert: #F4908A;
    --scope-bg: #07131B;
    --scope-panel: #0E2230;
    --scope-ring: #2F5872;
    --scope-ink: #E8F1F6;
    --scope-ink-2: #94AEC0;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0C1821;
  --surface: #13222D;
  --surface-2: #192C3A;
  --ink: #E4EDF2;
  --ink-2: #A3B6C4;
  --line: #2A4152;
  --sky: #86BCE2;
  --sky-soft: #1A3446;
  --action: #F3B841;
  --action-hover: #F7C963;
  --action-ink: #1B1407;
  --ok: #64C38F;
  --alert: #F4908A;
  --scope-bg: #07131B;
  --scope-panel: #0E2230;
  --scope-ring: #2F5872;
  --scope-ink: #E8F1F6;
  --scope-ink-2: #94AEC0;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img, svg { max-width: 100%; }
a { color: var(--sky); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.08;
  text-wrap: balance;
  margin: 0;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 6.2vw, 4.25rem); font-weight: 900; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; font-weight: 800; }
p { margin: 0; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); color: var(--ink); padding: 8px 12px; z-index: 20; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 12px 16px; min-height: 68px; flex-wrap: wrap; padding-block: 10px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; letter-spacing: -0.01em;
}
.brand picture, .brand img { display: block; }
.brand img { height: 56px; width: auto; }
.brand-footer img { height: 60px; }
.nav { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 700; padding: 8px 10px; border-radius: 8px; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
@media (max-width: 820px) {
  .nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; flex-wrap: nowrap; gap: 0; padding-bottom: 2px; }
  .nav a { font-size: .92rem; padding: 6px 8px; }
  .header-cta { margin-left: auto; }
}
@media (max-width: 420px) {
  .brand img { height: 46px; }
  .header-cta { min-height: 38px; padding: 0 12px; font-size: .88rem; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px;
  border-radius: var(--radius); border: 2px solid transparent;
  font: 800 1.02rem/1.1 var(--font-display);
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}
.btn-action { background: var(--action); color: var(--action-ink); }
.btn-action:hover { background: var(--action-hover); }
.btn-line { background: transparent; color: var(--sky); border-color: currentColor; }
.btn-small { min-height: 42px; padding: 0 16px; font-size: .95rem; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: progress; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:active { transform: none; } }

/* Hero and Hail Check */
.hero { padding-block: clamp(32px, 6vw, 72px); }
.hero-grid { display: grid; gap: clamp(28px, 4vw, 56px); grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: start; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.hero-copy { display: grid; gap: 20px; align-content: start; min-width: 0; }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 46ch; }
.crumbs { font-size: .92rem; color: var(--ink-2); }
.crumbs a { color: var(--ink-2); }

.check-form { display: grid; gap: 8px; }
.check-form label { font-weight: 700; }
.field-row { display: flex; gap: 10px; flex-wrap: wrap; }
.field-row input { flex: 1 1 240px; min-width: 0; }
.field-row .ac { flex: 1 1 240px; min-width: 0; }
.field-row .btn { flex: 0 0 auto; }

/* Address suggestions */
.ac { position: relative; }
.ac-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30;
  margin: 0; padding: 4px; list-style: none;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 14px 30px rgba(8, 20, 30, .18);
  max-height: min(60vh, 380px); overflow-y: auto;
}
.ac-list[hidden] { display: none; }
.ac-option { display: grid; gap: 1px; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.ac-option[aria-selected="true"], .ac-option:hover { background: var(--sky-soft); }
.ac-main { font-weight: 700; color: var(--ink); line-height: 1.3; }
.ac-sub { font-size: .84rem; color: var(--ink-2); }
.ac-foot { padding: 6px 12px 4px; font-size: .74rem; color: var(--ink-2); }
.ac-foot a { color: inherit; }
.link-btn {
  justify-self: start; display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 6px 2px; margin: 0;
  font: inherit; font-weight: 700; color: var(--sky);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.link-btn[hidden] { display: none; }
.link-btn[disabled] { opacity: .6; cursor: progress; }
.link-btn svg { flex: none; }

input[type="text"], input[type="tel"], input[type="email"], select, textarea {
  width: 100%; min-height: 52px; padding: 12px 14px;
  font: inherit; font-size: 1.0625rem; color: var(--ink);
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius);
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--sky); outline: none; box-shadow: 0 0 0 3px var(--sky-soft); }
.fine { font-size: .9rem; color: var(--ink-2); }

.scope {
  background: var(--scope-bg); color: var(--scope-ink);
  border-radius: var(--radius-lg);
  padding: clamp(16px, 3vw, 26px);
  display: grid; gap: 16px; min-width: 0;
}
.scope-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; }
.scope-title { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; }
.scope-window { color: var(--scope-ink-2); font-size: .9rem; display: inline-flex; align-items: center; gap: 8px; }
.scope-body { display: grid; grid-template-columns: minmax(0, 230px) minmax(0, 1fr); gap: 20px; align-items: center; }
@media (max-width: 560px) {
  .scope-body { grid-template-columns: minmax(0, 1fr); }
  .scope-plot { max-width: 290px; margin-inline: auto; width: 100%; }
}
.scope-plot svg { display: block; width: 100%; height: auto; }
.scope-read { display: grid; gap: 12px; min-width: 0; }
.scope-answer { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.3rem, 2.4vw, 1.65rem); line-height: 1.15; text-wrap: balance; }
.scope-stats { display: grid; gap: 10px; margin: 0; }
.scope-stats div { display: grid; gap: 1px; }
.scope-stats dt { color: var(--scope-ink-2); font-size: .85rem; }
.scope-stats dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.scope-note { color: var(--scope-ink); font-size: .98rem; }
.scope-source { color: var(--scope-ink-2); font-size: .82rem; }
.scope-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.scope .btn-line { color: var(--scope-ink); }
.scope .scope-loading, .scope .scope-error { font-size: 1.05rem; }
.scope .scope-error { color: var(--scope-ink); }
.legend { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: .82rem; color: var(--scope-ink-2); list-style: none; padding: 0; margin: 0; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.legend i.faded { background: var(--hail-2); opacity: .42; }
.scope-approx { background: var(--scope-panel); border-left: 3px solid var(--action); border-radius: 8px; padding: 10px 12px; font-size: .92rem; color: var(--scope-ink); }
.choices { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.choice {
  width: 100%; display: grid; gap: 2px; text-align: left; cursor: pointer;
  background: var(--scope-panel); color: var(--scope-ink);
  border: 2px solid var(--scope-ring); border-radius: var(--radius); padding: 12px 14px; font: inherit;
}
.choice:hover, .choice:focus-visible { border-color: var(--action); }
.choice-main { font-weight: 700; }
.choice-sub { font-size: .84rem; color: var(--scope-ink-2); }
.sample-chip { display: inline-block; background: var(--action); color: var(--action-ink); font-weight: 800; font-size: .76rem; padding: 2px 8px; border-radius: 999px; }
.ruler-wrap { overflow-x: auto; }
.ruler-wrap svg { display: block; width: 100%; max-width: 390px; height: auto; }

/* Sections */
.band { padding-block: clamp(44px, 7vw, 88px); }
.band-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: grid; gap: 10px; max-width: 62ch; margin-bottom: 28px; }
.section-head p { color: var(--ink-2); font-size: 1.1rem; }
.more { margin-top: 22px; font-weight: 700; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 22px 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: 4px 12px; align-items: start; }
.steps li::before {
  content: counter(step); grid-row: span 2;
  font-family: var(--font-display); font-weight: 900; font-size: 1.9rem; line-height: 1; color: var(--sky);
}
.steps h3 { font-size: 1.1rem; }
.steps p { color: var(--ink-2); }

.rights { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
@media (max-width: 640px) { .rights { grid-template-columns: minmax(0, 1fr); } }
.two-col .rights { grid-template-columns: minmax(0, 1fr); }
.rights > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 6px; align-content: start; }
.band-alt .rights > div { background: var(--bg); }
.rights dt { font-family: var(--font-display); font-weight: 800; font-size: 1.12rem; }
.rights dd { margin: 0; color: var(--ink-2); }
.cite { font-size: .85rem; color: var(--ink-2); }

/* Forms */
.forms-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 920px) { .forms-grid { grid-template-columns: minmax(0, 1fr); } }
.side-stack { display: grid; gap: 24px; min-width: 0; }
.form-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(18px, 3vw, 28px); display: grid; gap: 16px; min-width: 0; }
.band-alt .form-card { background: var(--bg); }
.form-card h3 { font-size: 1.25rem; }
.form-card > p { color: var(--ink-2); }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 700; }
.field .opt { font-weight: 400; color: var(--ink-2); }
.consent { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; font-size: .92rem; color: var(--ink-2); }
.consent input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--sky); }
.form-status { font-weight: 700; min-height: 1.2em; }
.form-status[data-state="ok"] { color: var(--ok); }
.form-status[data-state="error"] { color: var(--alert); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.paid-note { display: grid; gap: 8px; padding: 4px 4px 0; }
.paid-note p { color: var(--ink-2); }

/* Grant teaser */
.grant { display: grid; gap: clamp(20px, 4vw, 48px); grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; }
@media (max-width: 820px) { .grant { grid-template-columns: minmax(0, 1fr); } }
.grant-figure { display: grid; gap: 6px; }
.grant-figure .big { font-family: var(--font-display); font-weight: 900; font-size: clamp(3.2rem, 9vw, 5.5rem); line-height: .95; letter-spacing: -0.03em; color: var(--sky); font-variant-numeric: tabular-nums; }
.grant-figure p:last-child { color: var(--ink-2); max-width: 30ch; }
.grant-copy { display: grid; gap: 14px; }
.grant-copy p { color: var(--ink-2); }

/* FAQ */
.faq { display: grid; gap: 26px 40px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.faq h3 { font-size: 1.12rem; margin-bottom: 6px; }
.faq p { color: var(--ink-2); }

/* Inner pages */
.page-hero { padding-block: clamp(32px, 6vw, 64px) 8px; }
.page-hero .wrap { display: grid; gap: 14px; }
.page-hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); max-width: 22ch; }
.page-hero .lede { max-width: 60ch; }
.updated { font-size: .9rem; color: var(--ink-2); }
.content-grid { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); align-items: start; padding-block: 28px 80px; }
@media (max-width: 920px) { .content-grid { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 921px) { .content-grid aside { position: sticky; top: 24px; } }
.prose { max-width: var(--measure); min-width: 0; }
.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 2em; font-size: clamp(1.4rem, 2.6vw, 1.75rem); }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 0; }
.prose li + li { margin-top: .4em; }
.note { background: var(--sky-soft); border-radius: var(--radius); padding: 16px 18px; }
.aside-card { background: var(--scope-bg); color: var(--scope-ink); border-radius: var(--radius-lg); padding: 22px; display: grid; gap: 12px; }
.aside-card h2 { color: var(--scope-ink); font-size: 1.3rem; }
.aside-card p { color: var(--scope-ink-2); }
.aside-card .btn-line { color: var(--scope-ink); }
.aside-card .btn { width: 100%; }
.sources { font-size: .92rem; color: var(--ink-2); }
.sources li + li { margin-top: .3em; }
.two-col { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); align-items: start; }
@media (max-width: 920px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
.near { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.near a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--surface); }
.near a:hover { border-color: var(--sky); }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: 44px 32px; font-size: .95rem; color: var(--ink-2); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }
.footer-grid h2 { font-size: 1rem; margin-bottom: 10px; }
.footer-brand { display: grid; gap: 10px; align-content: start; justify-items: start; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-links a { color: var(--ink); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.towns-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
.disclosure { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: .88rem; }
