/* pages.css — standalone pages: address report, embeddable widget, partners/pricing.
   Same tokens as the map (style.css section 10), light and dark. */
:root {
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --navy: #14324F; --navy-2: #1F4A72; --gold: #F2B33D; --accent: #2468A8;
  --bg: #EEF2F6; --surface: #fff; --surface-2: #F5F7FA; --hover: #EEF4FB; --track: #E4E9EF;
  --text: #1B2633; --muted: #5A6878; --border: #DFE5EC; --ink: #12304D;
  --good: #17784A; --good-bg: #E6F4EC; --bad: #B03A2E;
  --warn-bg: #FFF6E5; --warn-border: #F0CF8E; --warn-text: #7A4F00;
  --info-bg: #EEF4FF; --info-border: #A9C1EC; --info-text: #1F3F7A;
  --shadow-sm: 0 1px 2px rgba(16,32,52,.05), 0 1px 3px rgba(16,32,52,.06);
  --shadow: 0 8px 24px rgba(16,32,52,.12);
  --hero: linear-gradient(115deg, #0E2A45 0%, #14324F 45%, #1F527F 100%);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --navy: #1C3D60; --navy-2: #24507D; --accent: #6CB0F0;
  --bg: #0B1520; --surface: #121F2D; --surface-2: #172736; --hover: #1B2F43; --track: #24384C;
  --text: #E3EAF2; --muted: #9AAABB; --border: #24374A; --ink: #EAF2FA;
  --good: #5FD08F; --good-bg: rgba(46,160,96,.17); --bad: #FF8A7A;
  --warn-bg: rgba(242,179,61,.10); --warn-border: rgba(242,179,61,.38); --warn-text: #F5C76B;
  --info-bg: rgba(108,176,240,.12); --info-border: rgba(108,176,240,.38); --info-text: #A9D0F5;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 8px 24px rgba(0,0,0,.45);
  --hero: linear-gradient(115deg, #08121D 0%, #0D1D2E 50%, #143150 100%);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.5; }
a { color: var(--accent); }
h1, h2, h3 { color: var(--ink); letter-spacing: -.01em; line-height: 1.25; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* "Read it to me" (js/listen.js, css/listen.css): the button row takes no room until the button can work. */
.ls-row { margin: 10px 0 12px; }
.ls-row:has(> .ls-btn[hidden]) { display: none; }
.muted { color: var(--muted); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Buttons & fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px;
  border: 1px solid transparent; font-weight: 600; font-size: .92rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: linear-gradient(180deg, var(--navy-2), var(--navy)); color: #fff; }
.btn-accent { background: var(--gold); color: #14324F; box-shadow: 0 2px 10px rgba(242,179,61,.3); }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-outline:hover { border-color: var(--accent); background: var(--hover); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.28); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn[disabled] { opacity: .55; cursor: default; }
input[type=text], input[type=search], input[type=url], input[type=tel], input[type=email], select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(36,104,168,.18); }
label.field { display: flex; flex-direction: column; gap: 5px; font-size: .82rem; font-weight: 600; }
.field-help { font-weight: 400; color: var(--muted); font-size: .76rem; }

/* Top bar */
.topbar { background: var(--hero); color: #fff; }
.topbar .wrap { display: flex; align-items: center; gap: 14px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.topbar a.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; }
.topbar .brand svg { width: 32px; height: 32px; }
.topbar .spacer { flex: 1; }
.topbar .btn { padding: 8px 14px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 22px; }
.tag { display: inline-block; font-size: .74rem; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.tag-info { background: var(--info-bg); border-color: var(--info-border); color: var(--info-text); }
.tag-warn { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn-text); }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-text); font-size: .88rem; }
.notice.info { background: var(--info-bg); border-color: var(--info-border); color: var(--info-text); }
.error { padding: 12px 14px; border-radius: 12px; background: #FDECEA; color: #7A1F15; border: 1px solid #F1B5AD; }
[data-theme="dark"] .error { background: #3A1A17; color: #FFB4A8; border-color: rgba(255,138,122,.4); }
.shape { display: inline-flex; vertical-align: middle; }
.shape svg { display: block; }

/* ===================================================== Address report */
.report-search { display: flex; gap: 10px; margin: 22px 0 6px; }
.report-search input { flex: 1; }
.rp-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin: 24px 0 16px; }
.rp-head h1, .rp-head .rp-title { font-size: 1.7rem; margin: 2px 0 4px; }
.rp-kicker { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.rp-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.rp-brand { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); margin-top: 18px; }
.rp-brand img { max-height: 48px; max-width: 160px; object-fit: contain; }
.rp-brand b { color: var(--ink); display: block; }
/* Lender co-brand: a second, compact block beside the agent's (report.js lenderBlock). */
.rp-brands { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.rp-brands > .rp-brand { flex: 1 1 280px; margin-top: 0; min-width: 0; }
.rp-cobrand { padding: 10px 14px; font-size: .88rem; }
.rp-cobrand img { max-height: 36px; max-width: 120px; }
.rp-cobrand .rp-co-label { font-size: .72rem; display: block; }
.rp-cobrand span, .rp-cobrand small { display: block; overflow-wrap: anywhere; }
.rp-cobrand .rp-eh { font-size: .7rem; color: var(--muted); }
.rp-grid { display: grid; gap: 16px; }
.rp-school { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 26px; }
.rp-school-head { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.rp-school-head h2 { font-size: 1.25rem; margin: 0; }
.rp-sub { color: var(--muted); font-size: .88rem; }
.rp-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: .88rem; align-content: start; }
.rp-facts dt { color: var(--muted); }
.rp-facts dd { margin: 0; font-weight: 600; }
.rp-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .86rem; font-weight: 600; margin-top: 6px; }
.rp-links a { text-decoration: none; }
.metric-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.metric-table th, .metric-table td { padding: 6px 4px; border-bottom: 1px solid var(--border); text-align: right; font-variant-numeric: tabular-nums; }
.metric-table th:first-child, .metric-table td:first-child { text-align: left; }
.metric-table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.metric-table td.school { font-weight: 700; color: var(--ink); }
.metric-table td.up { color: var(--good); } .metric-table td.down { color: var(--bad); }
.metric-bar { display: block; height: 5px; border-radius: 3px; background: var(--track); margin-top: 3px; overflow: hidden; }
.metric-bar span { display: block; height: 100%; background: var(--accent); }
.rp-section-title { font-size: 1.15rem; margin: 30px 0 10px; }
.rp-near { width: 100%; border-collapse: collapse; font-size: .88rem; }
.rp-near th, .rp-near td { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.rp-near th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rp-near td.num, .rp-near th.num { text-align: right; font-variant-numeric: tabular-nums; }
.rp-near tr.is-assigned td { background: var(--hover); }
.rp-res { columns: 2; column-gap: 26px; }
.rp-res-group { break-inside: avoid; margin-bottom: 14px; }
.rp-res-group h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 6px; }
.rp-res-group a { display: block; font-weight: 600; text-decoration: none; font-size: .9rem; }
.rp-res-group small { display: block; color: var(--muted); font-size: .78rem; margin-bottom: 6px; }
.rp-foot { margin: 30px 0 40px; font-size: .78rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 14px; }
.rp-empty { text-align: center; padding: 50px 20px; }
.rp-empty h1 { font-size: 1.8rem; }

@media (max-width: 760px) {
  .rp-head { flex-direction: column; }
  .rp-actions { justify-content: flex-start; }
  .rp-school { grid-template-columns: 1fr; }
  .rp-res { columns: 1; }
  .report-search { flex-direction: column; }
  .rp-near .hide-sm { display: none; }
}
@media print {
  :root, :root[data-theme="dark"] { --bg: #fff; --surface: #fff; --surface-2: #F5F7FA; --hover: #EEF4FB; --text: #1B2633; --muted: #4A5868;
    --border: #D5DCE4; --ink: #12304D; --accent: #1F5C96; --track: #E4E9EF; --good: #17784A; --bad: #B03A2E; color-scheme: light;
    --navy: #14324F; --navy-2: #1F4A72; --good-bg: #E6F4EC;
    --warn-bg: #FFF6E5; --warn-border: #F0CF8E; --warn-text: #7A4F00;
    --info-bg: #EEF4FF; --info-border: #A9C1EC; --info-text: #1F3F7A; --shadow-sm: none; --shadow: none; }
  [data-theme="dark"] .error { background: #FDECEA; color: #7A1F15; border-color: #F1B5AD; }
  html, body { height: auto !important; min-height: 0 !important; }
  body { font-size: 10.5pt; background: #fff; }
  .topbar, .report-search, .rp-actions, .no-print, .skip-link { display: none !important; }
  /* Screen-reader-only text has no use on paper, and a 1px box after the last line can start a blank page. */
  .sr-only { display: none !important; }
  .leaflet-control-attribution { background: rgba(255,255,255,.85) !important; color: #4A5868 !important; }
  .card { box-shadow: none; break-inside: avoid; padding: 12pt; }
  .wrap { max-width: none; padding: 0; }
  .rp-head { margin-top: 0; }
  a { color: inherit; text-decoration: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* No forced page size: Letter and A4 both work (Chromium uses the paper picked in the print dialog). */
  @page { margin: .55in .55in .6in; }
  main { margin-bottom: 0 !important; padding-bottom: 0 !important; }
  /* Headings stay with what follows them; paragraphs don't leave one stray line. */
  h1, h2, h3, h4 { break-after: avoid; page-break-after: avoid; break-inside: avoid; }
  p, li, dd { orphans: 3; widows: 3; }
  tr, thead { break-inside: avoid; page-break-inside: avoid; }
  thead { display: table-header-group; }
  tfoot { display: table-footer-group; }
  img, svg, figure { break-inside: avoid; }

  /* ---- Address report (report.html): a compact, multi-card-per-page school report */
  #report { font-size: 9.5pt; line-height: 1.38; }
  .rp-head { display: block; margin: 0 0 8pt; padding: 0 0 7pt; border-bottom: 2pt solid #14324F; }
  .rp-head h1 { font-size: 17pt; margin: 1pt 0 2pt; }
  .rp-kicker { font-size: 7.5pt; color: #1F5C96; }
  .rp-head .muted { font-size: 8.5pt; }
  .rp-brand { margin-top: 6pt; padding: 6pt 10pt; border-radius: 6pt; break-inside: avoid; }
  .rp-brands { margin-top: 6pt; gap: 6pt; flex-wrap: nowrap; break-inside: avoid; }
  .rp-brands > .rp-brand { margin-top: 0; flex: 1 1 0; }
  .rp-cobrand { padding: 5pt 9pt; font-size: 8.5pt; line-height: 1.3; }
  .rp-cobrand img { max-height: 24pt; max-width: 90pt; }
  .rp-cobrand .rp-co-label { font-size: 7pt; }
  .rp-cobrand .rp-eh { font-size: 6.8pt; }
  #report > .notice { margin: 8pt 0 !important; padding: 5pt 9pt; border-radius: 6pt; font-size: 8.5pt; break-inside: avoid; }
  .rp-section-title { font-size: 12pt; margin: 12pt 0 5pt; padding-bottom: 2pt; border-bottom: 1px solid var(--border); }
  .rp-section-title + p.muted { margin: 0 0 5pt !important; font-size: 8.5pt; break-after: avoid; }
  #report .rp-grid { display: block; }
  #report .rp-grid > .card, #report .rp-grid > .notice { margin: 0 0 8pt; }
  #report .rp-grid > .card:last-child { margin-bottom: 0; }
  #report .rp-school { grid-template-columns: 1fr 1.25fr; gap: 3pt 16pt; padding: 8pt 11pt; border-radius: 7pt; }
  #report .rp-school-head h2 { font-size: 12.5pt; margin-top: 2pt !important; }
  #report .rp-school-head .tag { font-size: 7pt; padding: 0 6pt; }
  #report .rp-sub { font-size: 8.5pt; }
  #report .rp-facts { font-size: 8.5pt; gap: 1.5pt 10pt; }
  #report .metric-table { font-size: 8.5pt; }
  #report .metric-table th, #report .metric-table td { padding: 2pt 3pt; }
  #report .metric-table thead th { font-size: 6.8pt; }
  #report .metric-table td:first-child { line-height: 1.2; }
  #report .metric-bar { height: 2.5pt; margin-top: 1.5pt; }
  #report .metric-table + p.muted { font-size: 7pt !important; margin-top: 3pt !important; }
  /* Long tables may run over a page (repeating their header); short blocks stay whole. */
  #report .card:has(> .rp-near) { break-inside: auto; padding: 2pt 8pt !important; border-radius: 7pt; }
  #report .rp-near { font-size: 8.3pt; }
  #report .rp-near th, #report .rp-near td { padding: 2.5pt 4pt; line-height: 1.25; }
  #report .rp-near th { font-size: 6.8pt; }
  #report .rp-near .tag { font-size: 6.5pt; padding: 0 5pt; }
  #report .rp-near tbody { break-inside: avoid; }   /* one group per school level, kept whole */
  #report .card:not(.rp-school):has(> .rp-facts) { padding: 7pt 11pt; border-radius: 7pt; }
  #report .card:not(.rp-school) > .rp-facts { grid-template-columns: auto 1fr auto 1fr; }
  #report .rp-res { columns: 3; column-gap: 14pt; padding: 8pt 11pt; border-radius: 7pt; break-inside: auto; }
  #report .rp-res-group { margin-bottom: 8pt; }
  #report .rp-res-group h3 { font-size: 7pt; margin-bottom: 3pt; }
  #report .rp-res-group a { font-size: 8.3pt; }
  #report .rp-res-group small { font-size: 7.3pt; margin-bottom: 4pt; line-height: 1.3; }
  /* The sources note never sits alone on a last page: it takes the end of the previous section with it. */
  #report .rp-foot { margin: 10pt 0 0; padding-top: 6pt; font-size: 7.3pt; line-height: 1.35; break-inside: avoid; break-before: avoid; }
}

/* ===================================================== Embeddable widget */
body.embed { background: transparent; font-size: 14px; }
.wg { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; max-width: 960px; margin: 0 auto; }
.wg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.wg-head h1 { font-size: 1.05rem; margin: 0; }
.wg-form { display: flex; gap: 8px; }
.wg-form input { flex: 1; min-width: 0; }
.wg-form .btn { background: var(--wg-accent-bg, var(--wg-accent, var(--navy))); color: #fff; }
.wg-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.wg-item { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.wg-item b { color: var(--ink); display: block; line-height: 1.3; }
.wg-item small { color: var(--muted); }
.wg-stats { font-size: .78rem; text-align: right; white-space: nowrap; }
.wg-stats b { display: inline; }
.wg-note { font-size: .74rem; color: var(--muted); margin-top: 10px; }
/* Boundary provenance line (js/boundary-src.js): district-confirmed or 2015-16 federal survey. */
.bnd-src { display: block; font-size: .72rem; line-height: 1.35; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.bnd-src.bnd-district::before { content: "¹3 a0"; color: #009E73; font-weight: 700; }
.bnd-src .bnd-enroll { white-space: nowrap; }
.wg-cta { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.wg-cta a { font-size: .82rem; font-weight: 700; text-decoration: none; color: var(--wg-accent, var(--accent)); }
.wg-attr { margin-top: 10px; font-size: .72rem; color: var(--muted); text-align: right; }
.wg-attr a { color: var(--muted); }
/* White-label options (embed.js): brand line and logo (Pro), district scope, help/enroll links */
.wg-titles { display: flex; flex-direction: column; min-width: 0; }
.wg-brand { font-size: .74rem; font-weight: 700; color: var(--wg-accent, var(--muted)); text-transform: uppercase; letter-spacing: .06em; overflow-wrap: anywhere; }
.wg-head h1 { overflow-wrap: anywhere; }
.wg-logo { max-height: 36px; max-width: 120px; width: auto; object-fit: contain; flex-shrink: 0; }
.wg-scope { margin: -4px 0 10px; font-size: .8rem; color: var(--muted); }
.wg-outside { margin-top: 12px; }
.wg-outside b { display: block; margin-bottom: 2px; }
.wg-help { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: .82rem; }
.wg-help a { font-weight: 700; text-decoration: none; color: var(--wg-accent, var(--accent)); overflow-wrap: anywhere; }
.wg-help span { overflow-wrap: anywhere; }
.wg-help[hidden], .wg-scope[hidden], .wg-brand[hidden], .wg-logo[hidden] { display: none; }
.wg-tel { display: table; margin-top: 2px; min-height: 24px; line-height: 24px; font-size: .78rem; font-weight: 600; text-decoration: none; color: var(--wg-accent, var(--accent)); }
/* Map under the answer (embed.js; Leaflet loads lazily) */
.wg-mapbox { margin-top: 12px; }
.wg-mapbox[hidden], .wg-extra[hidden], .wg-tabs[hidden] { display: none; }
.wg-tabs { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.wg-tab { font: inherit; font-size: .8rem; font-weight: 700; padding: 6px 12px; min-height: 34px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--ink); cursor: pointer; }
.wg-tab[aria-selected="true"] { background: var(--wg-accent-bg, var(--wg-accent, var(--navy))); border-color: transparent; color: #fff; }
.wg-tab:focus-visible { outline: 3px solid var(--wg-accent, var(--accent)); outline-offset: 2px; }
.wg-map { height: 230px; border-radius: 12px; border: 1px solid var(--border); overflow: hidden; background: var(--surface-2); z-index: 0; }
.wg-map .leaflet-control-attribution { font-size: 9px; }
[data-theme="dark"] .wg-map .leaflet-control-attribution { background: rgba(18,31,45,.8); color: #9AAABB; }
[data-theme="dark"] .wg-map .leaflet-control-attribution a { color: #6CB0F0; }
[data-theme="dark"] .wg-map .leaflet-bar a { background: #172736; color: #E3EAF2; border-color: #24374A; }
.wg-pin { background: none; border: 0; }
.wg-mapkey { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .74rem; color: var(--muted); margin: 6px 0 0; }
.wg-k { display: inline-flex; align-items: center; gap: 6px; overflow-wrap: anywhere; min-width: 0; }
.wg-k-area { position: relative; width: 14px; height: 10px; border: 2px solid; border-radius: 3px; flex-shrink: 0; overflow: hidden; }
.wg-k-area i { position: absolute; inset: 0; opacity: .25; }
.wg-k-pin { width: 10px; height: 10px; border-radius: 50%; background: #D9412E; border: 2px solid #fff; box-shadow: 0 0 0 1px #D9412E; flex-shrink: 0; }
/* Verified extras under the answer */
.wg-extra { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: .82rem; }
.wg-x { display: flex; flex-direction: column; gap: 1px; overflow-wrap: anywhere; }
.wg-x-k { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.wg-x a { font-weight: 700; text-decoration: none; color: var(--wg-accent, var(--accent)); }

/* ===================================================== Partners / pricing */
.hero { background: var(--hero); color: #fff; padding: 56px 0 70px; }
.hero h1 { color: #fff; font-size: 2.3rem; font-weight: 800; letter-spacing: -.025em; margin: 10px 0 12px; max-width: 760px; }
.hero p { font-size: 1.08rem; opacity: .85; max-width: 680px; margin: 0 0 22px; }
.hero .pill { display: inline-block; font-size: .76rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: -40px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 1.6rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.stat span { font-size: .84rem; color: var(--muted); }
.section { padding: 46px 0 0; }
.section > .wrap > h2 { font-size: 1.6rem; margin: 0 0 6px; }
.section-lead { color: var(--muted); margin: 0 0 22px; max-width: 700px; }
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.plan { display: flex; flex-direction: column; gap: 12px; }
.plan h3 { margin: 0; font-size: 1.1rem; }
.plan .price { font-size: 1.5rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.plan ul { margin: 0; padding-left: 18px; font-size: .88rem; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.plan.featured { border: 2px solid var(--gold); position: relative; }
.plan.featured::before { content: "Most popular"; position: absolute; top: -12px; left: 18px; background: var(--gold); color: #14324F;
  font-size: .72rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; }
.audience { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.audience .card h3 { margin: 10px 0 6px; font-size: 1.05rem; }
.audience .card p { margin: 0; font-size: .9rem; color: var(--muted); }
.icon-bubble { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #FFF3D6; color: #14324F; }
[data-theme="dark"] .icon-bubble { background: rgba(242,179,61,.15); color: var(--gold); }
.icon-bubble svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.builder { display: grid; grid-template-columns: 360px 1fr; gap: 18px; align-items: start; }
.builder form { display: flex; flex-direction: column; gap: 14px; }
.builder .preview { background: repeating-conic-gradient(var(--surface-2) 0% 25%, var(--bg) 0% 50%) 50% / 22px 22px; border-radius: 16px; padding: 18px; border: 1px solid var(--border); }
.builder iframe { width: 100%; height: 470px; border: 0; border-radius: 16px; background: transparent; }
pre.code { background: #0E1A26; color: #D7E4F2; padding: 14px; border-radius: 12px; overflow-x: auto; font-size: .8rem; white-space: pre-wrap; word-break: break-all; margin: 0; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 700; cursor: pointer; color: var(--ink); }
.faq p { margin: 8px 0 0; color: var(--muted); font-size: .92rem; }
.site-foot { margin-top: 56px; padding: 26px 0 40px; border-top: 1px solid var(--border); color: var(--muted); font-size: .84rem; }
.site-foot .foot-meta { margin: 0 0 8px; }
.site-foot .foot-links { line-height: 2; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.billing-toggle { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); margin: 0 0 22px; }
.billing-toggle[hidden] { display: none; }
.billing-toggle button { border: 0; background: transparent; padding: 7px 16px; border-radius: 999px; font-weight: 600; font-size: .88rem; cursor: pointer; color: var(--muted); }
.billing-toggle button[aria-checked="true"] { background: var(--navy); color: #fff; }
.billing-toggle .save { font-size: .72rem; font-weight: 700; color: var(--good); margin-left: 4px; }
.billing-toggle button[aria-checked="true"] .save { color: var(--gold); }

/* ===================================================== Thank-you page */
.thanks { max-width: 760px; margin: 0 auto; padding: 0 0 20px; }
.thanks-hero { text-align: center; padding: 44px 0 10px; }
.thanks-hero h1 { font-size: 2rem; margin: 12px 0 8px; }
.thanks-hero p { color: var(--muted); margin: 0 auto; max-width: 600px; }
.thanks-check { width: 56px; height: 56px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--good-bg); color: var(--good); }
.thanks-check svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.thanks .card { margin-top: 18px; }
.thanks .card h2 { font-size: 1.15rem; margin: 0 0 10px; }
.thanks ol, .thanks ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.thanks li { font-size: .93rem; }
.key-box { display: flex; gap: 8px; align-items: stretch; margin: 10px 0; }
.key-box code { flex: 1; min-width: 0; padding: 11px 13px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--border); font-size: .95rem; word-break: break-all; color: var(--ink); }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

@media (max-width: 960px) {
  .plans { grid-template-columns: 1fr 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .builder { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .plans, .audience { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.7rem; }
}

/* Quality pass: blue focus ring on light surfaces (gold stays on the navy bars
   and in dark mode), reduced motion, 40px tap targets on phones. */
:root:not([data-theme="dark"]) :focus-visible { outline-color: #1F5F9E; }
:root .topbar :focus-visible, :root .hero :focus-visible { outline-color: var(--gold); }
input:focus-visible, select:focus-visible, textarea:focus-visible { box-shadow: 0 0 0 3px var(--accent); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; }
}
@media (max-width: 760px) {
  .btn, input[type=text], input[type=search], input[type=url], select { min-height: 40px; }
  .wg-cta a, .rp-links a, .topbar a.brand { display: inline-flex; align-items: center; min-height: 40px; }
}

/* ===================================================== Sample branded report (report.html?sample=1) */
.rp-sample { position: relative; overflow: hidden; border: 2px dashed var(--warn-border); flex-wrap: wrap; }
.rp-sample::after { content: "SAMPLE"; position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  font-size: 3.2rem; font-weight: 800; letter-spacing: .3em; color: rgba(176,58,46,.16); transform: rotate(-8deg); }
.rp-sample-logo { width: 96px; height: 48px; color: var(--muted); flex-shrink: 0; }
.rp-sample-badge { margin-left: auto; font-size: .76rem; font-weight: 800; letter-spacing: .14em; color: #fff; background: #B03A2E; border-radius: 6px; padding: 3px 9px; }
.rp-sample-note { font-size: .84rem; color: var(--warn-text); background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: 10px; padding: 8px 12px; margin: 8px 0 0; }
.rp-sample-note a { font-weight: 700; color: inherit; }
.sample-watermark { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 50; overflow: hidden;
  font-size: clamp(4rem, 18vw, 12rem); font-weight: 800; letter-spacing: .12em; color: rgba(176,58,46,.07); transform: rotate(-24deg); user-select: none; }
[data-theme="dark"] .sample-watermark { color: rgba(255,138,122,.08); }
@media print { .sample-watermark { color: rgba(176,58,46,.12); } }

/* ===================================================== Partner portal (partners.html) */
html:has(body.partners) { scroll-behavior: smooth; }
body.partners { overflow-x: hidden; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--gold); color: #14324F; font-weight: 700; padding: 8px 14px; border-radius: 8px; text-decoration: none; }
.skip-link:focus { top: 10px; }
.partners section[id] { scroll-margin-top: 60px; }
.btn-icon { padding: 8px 10px !important; }
.btn-icon svg { width: 18px; height: 18px; }
#theme-toggle .i-sun { display: none; }
[data-theme="dark"] #theme-toggle .i-sun { display: inline; }
[data-theme="dark"] #theme-toggle .i-moon { display: none; }
.small-note { font-size: .84rem; margin: 10px 0 0; }

/* Sticky section nav */
.section-nav { position: sticky; top: 0; z-index: 120; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.section-nav .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-top: 7px; padding-bottom: 7px; }
.section-nav .wrap::-webkit-scrollbar { display: none; }
.section-nav a { flex-shrink: 0; padding: 7px 12px; border-radius: 999px; font-size: .86rem; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; }
.section-nav a:hover { color: var(--ink); background: var(--hover); }
.section-nav a.is-active { color: var(--ink); background: var(--hover); box-shadow: inset 0 0 0 1px var(--border); }

/* Hero with audience switcher and live demo */
.partners .hero { padding: 42px 0 76px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 34px; align-items: start; }
.hero-copy h1 { max-width: none; }
.hero .hero-lead { font-size: 1.06rem; opacity: .9; margin: 0 0 18px; }
.aud-switch { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); }
.aud-switch button { border: 0; background: transparent; color: #fff; padding: 7px 13px; border-radius: 10px; font-weight: 600; font-size: .86rem; cursor: pointer; }
.aud-switch button:hover { background: rgba(255,255,255,.12); }
.aud-switch button[aria-selected="true"] { background: var(--gold); color: #14324F; }
.aud-panel { margin: 14px 0 20px; padding: 16px 18px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); min-height: 200px; }
.aud-panel h2 { color: #fff; font-size: 1.15rem; margin: 0 0 8px; }
.aud-panel ul { margin: 0 0 10px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.aud-panel li { position: relative; padding-left: 24px; font-size: .93rem; color: #fff; opacity: .92; }
.aud-panel li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 12px; height: 7px; border-left: 2.5px solid var(--gold); border-bottom: 2.5px solid var(--gold); transform: rotate(-45deg); }
.aud-plan { color: var(--gold); font-weight: 700; font-size: .9rem; text-decoration: none; }
.aud-plan:hover { text-decoration: underline; }
.hero .hero-note { font-size: .84rem; opacity: .8; margin: 14px 0 0; }
.hero .demo { color: var(--text); padding: 20px; box-shadow: var(--shadow); }
.demo h2 { margin: 0 0 4px; font-size: 1.15rem; }
.hero .demo p { opacity: 1; max-width: none; }
.hero .demo .demo-lead { color: var(--muted); font-size: .9rem; margin: 0 0 12px; }
.demo-form { display: flex; gap: 8px; }
.demo-form input { flex: 1; min-width: 0; }
.demo-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 12px; font-size: .8rem; }
.chip { border: 1px solid var(--border); background: var(--surface-2); color: var(--ink); border-radius: 999px; padding: 5px 11px; font-size: .8rem; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--accent); background: var(--hover); }
.demo-frame { border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); min-height: 150px; overflow: hidden; }
.demo-frame iframe { display: block; width: 100%; height: 300px; border: 0; background: transparent; }
.demo-empty { display: flex; gap: 12px; align-items: center; padding: 22px 18px; color: var(--muted); font-size: .88rem; min-height: 150px; }
.demo-empty[hidden] { display: none; }
.demo-empty svg { width: 34px; height: 34px; flex-shrink: 0; fill: none; stroke: var(--accent); stroke-width: 1.8; }
.hero .demo .demo-foot { font-size: .76rem; color: var(--muted); margin: 10px 0 0; }
.stats-row { position: relative; z-index: 2; }

/* Plans tweaks */
.plan.featured::before { content: none; }
.plan-flag { position: absolute; top: -12px; left: 18px; background: var(--gold); color: #14324F; font-size: .72rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; }

/* Free vs Pro table */
.cmp-wrap { padding: 8px 22px 20px; }
.cmp { width: 100%; border-collapse: collapse; font-size: .93rem; }
.cmp th, .cmp td { padding: 12px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.cmp thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cmp thead th:nth-child(n+2), .cmp td { text-align: center; width: 22%; }
.cmp thead th:last-child { color: var(--ink); }
.cmp tbody th { font-weight: 600; color: var(--text); }
.cmp td:last-child { background: rgba(242,179,61,.08); }
.cmp td.yes::before, .cmp td.no::before { font-size: 1rem; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.cmp td.yes::before { content: "✓"; font-weight: 800; color: var(--good); background: var(--good-bg); }
.cmp td.no::before { content: "—"; color: var(--muted); }
.cmp td.txt { font-weight: 600; color: var(--ink); }
.cmp-price th, .cmp-price td { border-bottom: 0; font-size: 1rem; }
.cmp-price td.txt { font-weight: 800; }
.cmp-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }

/* Calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.calc-inputs { display: flex; flex-direction: column; gap: 16px; }
.calc-inputs .field { display: flex; flex-direction: column; gap: 5px; font-size: .82rem; font-weight: 600; }
input[type=number] { width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); outline: none; }
.range-row { display: flex; gap: 12px; align-items: center; }
.range-row input[type=range] { flex: 1; min-width: 0; accent-color: var(--accent); min-height: 32px; }
.range-row output { min-width: 62px; text-align: right; font-weight: 800; font-size: .95rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.calc-out { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; }
.calc-big b { display: block; font-size: 2.6rem; font-weight: 800; color: var(--ink); letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.calc-big span { color: var(--muted); font-size: .9rem; }
.calc-rows { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 16px 0 12px; font-size: .92rem; }
.calc-rows dt { color: var(--muted); }
.calc-rows dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.calc-rows dd.pos { color: var(--good); } .calc-rows dd.neg { color: var(--bad); }
.calc-formula { font-size: .82rem; color: var(--text); background: var(--surface); border: 1px dashed var(--border); border-radius: 10px; padding: 9px 11px; margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.calc-disclaimer { font-size: .8rem; color: var(--muted); margin: 0; }

/* Sample report */
.sample-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.browser-frame { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--surface); }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.browser-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--track); flex-shrink: 0; }
.browser-bar em { font-style: normal; font-size: .76rem; color: var(--muted); margin-left: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 2px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.browser-frame iframe { display: block; width: 100%; height: 560px; border: 0; background: var(--bg); }
.sample-side { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.checks { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checks li { position: relative; padding-left: 28px; font-size: .94rem; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800; color: var(--good); background: var(--good-bg); }

/* Builder additions */
.builder-out { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.builder > form { min-width: 0; }
.seg-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.seg-field legend { font-size: .82rem; font-weight: 600; padding: 0; margin-bottom: 6px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.seg label { flex: 1 1 auto; position: relative; }
.seg input[type=radio] { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.seg label span { display: block; text-align: center; padding: 7px 8px; border-radius: 9px; font-size: .8rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 1px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 8px; font-size: .8rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg-sm { display: inline-flex; padding: 3px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row > .field { min-width: 0; }
label.field.field-inline { flex-direction: row; align-items: center; gap: 10px; margin-top: 8px; }
.field-inline input { flex: 1; min-width: 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--surface); background: var(--sw); box-shadow: 0 0 0 1px var(--border); cursor: pointer; position: relative; padding: 0; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.swatch[aria-pressed="true"]::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .9rem; }
.preview-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.preview-label { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.builder .preview[data-theme="dark"] { background: repeating-conic-gradient(#132232 0% 25%, #0B1520 0% 50%) 50% / 22px 22px; }
.builder .preview[data-theme="light"] { background: repeating-conic-gradient(#F5F7FA 0% 25%, #E8EDF3 0% 50%) 50% / 22px 22px; }
.preview-inner { margin: 0 auto; transition: max-width .2s; }
.code-box { position: relative; }
.code-box pre.code { padding-bottom: 60px; }
.copy-btn { position: absolute; right: 10px; bottom: 10px; }
.copy-btn.is-copied { background: #17784A; color: #fff; box-shadow: none; }
.howto { padding: 18px 20px; }
.howto h3 { margin: 0 0 10px; font-size: 1.02rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.tabs button { border: 0; background: transparent; padding: 8px 12px; font-weight: 600; font-size: .86rem; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabpanel ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: .92rem; }

/* Sponsored listing preview (markup and look shared with the map's Help tab, style.css section 11) */
.lp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.lp-form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); outline: none; resize: vertical; }
.lp-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.help-mock { border-radius: 16px; background: var(--bg); border: 1px solid var(--border); padding: 12px; }
.help-mock-tab { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px 4px; }
.help-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: var(--shadow-sm); font-size: 14px; }
.help-card h3 { font-size: .98rem; margin: 0 0 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card-desc { font-size: .84rem; line-height: 1.5; color: var(--muted); margin: 0 0 14px; }
.res-county { font-size: .72rem; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; }
.res-listing { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: var(--surface-2); }
.res-listing-top { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.res-sponsored { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--warn-text); background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: 6px; padding: 1px 6px; }
.res-cat { font-size: .74rem; color: var(--muted); }
.res-name { font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.res-listing p { font-size: .82rem; margin: 4px 0; color: var(--text); overflow-wrap: anywhere; }
.res-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .78rem; color: var(--muted); }
.res-meta a { color: var(--accent); }
.lp-cta { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.lp-price b { display: block; font-size: 1.4rem; font-weight: 800; color: var(--ink); }
.lp-price span { font-size: .84rem; color: var(--muted); }
.lp-details-link { font-weight: 700; font-size: .9rem; }
.lp-details-link[hidden] { display: none; }
.lp-cta .small-note { margin: 0; }

/* FAQ search + accordion */
.faq-search { position: relative; max-width: 520px; margin: 4px 0 6px; }
.faq-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.faq-search input { padding-left: 38px; }
#faq-status:empty { display: none; }
.faq details[hidden] { display: none; }
.faq summary { list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex-shrink: 0; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; margin-right: 4px; }
.faq details[open] > summary::after { transform: rotate(-135deg); }
.faq-empty { padding: 14px 0; }
#faq-list { margin-top: 14px; }

/* Sticky CTA bar (phones) */
.sticky-cta { display: none; }
@media (max-width: 760px) {
  .sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 150; display: flex; align-items: center; gap: 8px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border);
    box-shadow: 0 -6px 20px rgba(16,32,52,.14); transform: translateY(110%); visibility: hidden; transition: transform .25s ease, visibility .25s; }
  .sticky-cta.is-shown { transform: none; visibility: visible; }
  .sticky-cta-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
  .sticky-cta-text b { color: var(--ink); }
  .sticky-cta-text span { font-size: .78rem; color: var(--muted); }
  .sticky-cta .btn { padding: 8px 12px; }
  body.partners .site-foot { padding-bottom: 96px; }
}

@media (max-width: 960px) {
  .hero-grid, .calc, .sample-grid, .lp-grid { grid-template-columns: 1fr; }
  .aud-panel { min-height: 0; }
}
@media (max-width: 760px) {
  .hide-xs { display: none !important; }
  .partners .topbar .wrap { gap: 8px; }
  .partners .topbar .btn { padding: 6px 10px; font-size: .84rem; }
  .partners .hero { padding: 26px 0 64px; }
  .partners .hero h1 { font-size: 1.7rem; }
  .demo-form { flex-direction: column; }
  .field-row { grid-template-columns: 1fr; }
  .browser-frame iframe { height: 480px; }
  .stats-row { gap: 10px; }
  .stat { padding: 14px; }
  .stat b { font-size: 1.35rem; }
  /* Free vs Pro: each row becomes a card */
  .cmp-wrap { padding: 0; background: transparent; border: 0; box-shadow: none; }
  .cmp, .cmp tbody { display: block; }
  .cmp thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cmp tr { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
  .cmp tbody th { grid-column: 1 / -1; display: block; border-bottom: 1px solid var(--border); padding: 10px 14px; }
  .cmp td { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: auto; padding: 10px 14px; border: 0; text-align: left; font-size: .9rem; }
  .cmp td::after { content: attr(data-label); order: -1; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
  .cmp td + td { border-left: 1px solid var(--border); }
  .cmp-actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { html:has(body.partners) { scroll-behavior: auto; } }
/* Partners: links to the audience pages (home.html has the full list) */
.pt-more { position: relative; z-index: 2; margin-top: -40px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 14px 18px; box-shadow: var(--shadow); }
.pt-more-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-right: 6px; }
.pt-more a { font-weight: 600; font-size: .9rem; text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--ink); }
.pt-more a:hover { border-color: var(--accent); background: var(--hover); }
.hero .hero-link { color: var(--gold); font-weight: 700; }

body.is-sample.is-framed .topbar, body.is-sample.is-framed .report-search { display: none; }
body.is-sample.is-framed .rp-head { margin-top: 14px; }
.builder .field-row { grid-template-columns: 1fr; }
#eb-size label { flex: 1 1 0; min-width: 0; }
#eb-size label span { white-space: normal; line-height: 1.25; padding: 7px 4px; }

/* ===================================================== Compare homes (compare-homes.html) */
.ch-intro { padding: 26px 0 4px; }
.ch-intro h1 { font-size: 1.75rem; margin: 4px 0 6px; }
.ch-intro p { margin: 0; max-width: 680px; }
.ch-form { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 12px; align-items: end; margin: 16px 0 8px; padding: 16px; }
.ch-field { position: relative; }
.ch-field > span:not(.ch-letter) { padding-left: 28px; min-height: 22px; display: flex; align-items: center; gap: 4px; }
.ch-field .ch-letter { position: absolute; top: 0; left: 0; }
.ch-go { height: 44px; }
.ch-letter { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; color: #fff; font-size: .78rem; font-weight: 800;
  background: var(--ch, #0072B2); flex-shrink: 0; vertical-align: middle; }
[data-home="0"] { --ch: #0072B2; } [data-home="1"] { --ch: #D55E00; } [data-home="2"] { --ch: #009E73; }
.ch-status { margin-top: 24px; }
#ch-out .error { margin: 12px 0 0; }
.ch-note { margin: 16px 0; }
.ch-top { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; align-items: stretch; }
.ch-summary h2 { font-size: 1.15rem; margin: 0 0 10px; }
.ch-wins { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ch-wins li { display: grid; grid-template-columns: 9.5em 1fr; gap: 4px 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); font-size: .9rem; }
.ch-wins li:last-child { border-bottom: 0; padding-bottom: 0; }
.ch-wname { font-weight: 700; color: var(--ink); grid-row: span 2; }
.ch-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ch-chip { font-size: .76rem; padding: 1px 8px 1px 2px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.ch-chip b { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--ch); color: #fff; font-size: .66rem; margin-right: 3px; }
.ch-fine { font-size: .76rem; margin: 12px 0 0; }
.ch-mapcard { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.ch-map { flex: 1; min-height: 280px; border-radius: 12px; background: var(--surface-2); z-index: 0; }
.ch-legend { list-style: none; margin: 0; padding: 0 4px; display: flex; flex-direction: column; gap: 4px; font-size: .8rem; }
.ch-legend li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ch-legend .ch-addr { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-hname { font-weight: 700; color: var(--ink); white-space: nowrap; }
.ch-home-pin span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50% 50% 50% 6px; color: #fff; font-weight: 800; font-size: .85rem;
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); font-family: var(--font); box-sizing: border-box; }
.ch-school-pin { background: none; border: 0; }
.ch-map .leaflet-control-attribution { font-size: .62rem; background: rgba(255,255,255,.75); }
[data-theme="dark"] .ch-map .leaflet-control-attribution { background: rgba(18,31,45,.8); color: var(--muted); }
[data-theme="dark"] .ch-map .leaflet-control-attribution a { color: var(--accent); }
.ch-school-pin svg { display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.ch-tablecard { padding: 8px 16px 14px; overflow-x: auto; }
.ch-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ch-table th, .ch-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.ch-table tbody th[scope="row"] { font-weight: 600; color: var(--muted); width: 16%; white-space: nowrap; }
.ch-table thead th { vertical-align: bottom; border-bottom: 2px solid var(--border); }
.ch-table[data-homes="2"] thead th { width: 42%; }
.ch-table[data-homes="3"] thead th { width: 28%; }
.ch-home { border-top: 4px solid var(--ch); }
.ch-home .ch-letter { margin-right: 6px; }
.ch-home .ch-addr, .ch-card .ch-addr { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); margin-top: 3px; }
.ch-level-row th { background: var(--surface-2); color: var(--ink); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; padding-top: 7px; padding-bottom: 7px; }
.ch-school b { display: block; color: var(--ink); line-height: 1.3; }
.ch-school b a { color: inherit; text-decoration: none; }
.ch-school b a:hover { text-decoration: underline; }
.ch-school small { display: block; color: var(--muted); font-size: .76rem; margin-top: 2px; }
.ch-table td, .ch-card dd { font-variant-numeric: tabular-nums; }
.ch-v { font-weight: 700; color: var(--ink); }
.ch-v.up { color: var(--good); } .ch-v.down { color: var(--bad); }
.ch-st { display: block; color: var(--muted); font-size: .74rem; }
.ch-card dd .ch-st { display: inline; margin-left: 6px; }
.ch-best { background: var(--good-bg); }
.ch-cards { display: none; }
.ch-card { padding: 16px; border-top: 4px solid var(--ch); }
.ch-card h3 { margin: 0; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.ch-dist { font-size: .84rem; margin: 6px 0 4px; }
.ch-card-level { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }
.ch-card-level h4 { margin: 0 0 4px; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.ch-card .rp-facts { margin: 6px 0 0; }

@media (max-width: 860px) {
  .ch-form { grid-template-columns: 1fr; }
  .ch-top { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ch-intro h1 { font-size: 1.4rem; }
  .ch-tablecard, .ch-tablehead { display: none; }
  .ch-cards { display: grid; gap: 14px; margin-top: 18px; }
  .ch-wins li { grid-template-columns: 1fr; }
  .ch-wname { grid-row: auto; }
  .ch-map { min-height: 230px; }
}
@media print {
  .ch-intro, .ch-form, .ch-cards { display: none !important; }
  .ch-tablecard, .ch-tablehead { display: block !important; }
  .ch-tablecard { overflow: visible; padding: 4pt 8pt; break-inside: auto; }
  /* fixed map size, so the map refit on print matches the printed page (same size as html.pm-print below) */
  .ch-top { grid-template-columns: 1fr 3.3in; gap: 10pt; }
  .ch-map { min-height: 0; width: 3.1in; height: 2.1in; flex: none; }
  .ch-legend { font-size: 8pt; gap: 2pt; }
  .ch-summary, .ch-mapcard { break-inside: avoid; padding: 10pt; }
  .ch-table { font-size: 8.5pt; }
  .ch-table th, .ch-table td { padding: 3pt 5pt; }
  .ch-table tr { break-inside: avoid; }
  .ch-level-row { break-after: avoid; }
  .ch-wins { gap: 5pt; }
  .ch-wins li { font-size: 8.5pt; padding-bottom: 5pt; }
  .ch-note { margin: 8pt 0; font-size: 8.5pt; padding: 6pt 8pt; }
  .ch-best { background: #E6F4EC; }
  .rp-section-title { margin: 12pt 0 6pt; }
  .ch-fine { font-size: 7.5pt; margin-top: 6pt; }
  .leaflet-control-attribution { font-size: 6pt; }
  .ch-out-foot { margin: 10pt 0 0; padding-top: 6pt; font-size: 7.5pt; }
}

/* ===================================================== Where help is needed (need-finder.html) */
.nf-intro { padding-bottom: 8px; }
.nf-intro p { max-width: 760px; }
.nf-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; margin: 14px 0 0; }
.nf-filters { padding: 16px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
.nf-h2 { font-size: 1.05rem; margin: 0 0 8px; }
.nf-filters fieldset { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
.nf-filters legend { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 0; margin-bottom: 8px; }
.nf-filters .nf-group { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--border); padding-top: 12px; }
.nf-filters select { padding: 8px 10px; }
.nf-filters input[type=number] { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.nf-preset-list { display: flex; flex-direction: column; gap: 6px; }
.nf-preset { text-align: left; padding: 8px 11px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--ink);
  font-weight: 600; font-size: .84rem; cursor: pointer; line-height: 1.3; }
.nf-preset:hover { border-color: var(--accent); background: var(--hover); }
.nf-preset[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.nf-check { display: flex; align-items: flex-start; gap: 8px; font-size: .86rem; font-weight: 600; cursor: pointer; }
.nf-check input { margin: 3px 0 0; accent-color: var(--accent); flex: none; width: 16px; height: 16px; }
.nf-thr { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; }
.nf-thr.is-on { background: var(--surface-2); border-color: var(--border); }
.nf-range { display: flex; align-items: center; gap: 10px; padding-left: 24px; }
.nf-range input { flex: 1; min-width: 0; accent-color: var(--accent); }
.nf-range input:disabled { opacity: .45; }
.nf-range output { min-width: 3.2em; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.nf-thr:not(.is-on) .nf-range output { color: var(--muted); font-weight: 500; }
.nf-subj { padding-left: 24px; }
.nf-thr .nf-state { margin: 0; padding-left: 24px; }
.nf-form-actions { display: flex; justify-content: flex-end; }
.nf-form-actions .btn { padding: 8px 14px; }
.nf-results { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.nf-results:focus { outline: none; }
.nf-summary { padding: 16px 18px; }
.nf-summary p { margin: 0; }
.nf-sum-main { font-size: 1.05rem; color: var(--ink); }
.nf-est { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.nf-est-label { font-weight: 700; font-size: .88rem; display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nf-est ul { margin: 6px 0; padding-left: 18px; font-size: .92rem; }
.nf-summary .field-help { display: block; margin-top: 6px; }
.nf-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.nf-actions[hidden] { display: none; }
.nf-actions .btn { padding: 9px 14px; }
.nf-pro-badge { font-size: .66rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 1px 6px; border-radius: 6px;
  background: var(--navy); color: #fff; }
.btn-accent .nf-pro-badge { background: #14324F; color: var(--gold); }
body.is-pro .nf-pro-badge { display: none; }
.nf-upsell { border-color: var(--info-border); background: var(--info-bg); padding: 16px 18px; }
.nf-upsell:focus { outline: none; }
.nf-upsell h3 { margin: 0 0 6px; font-size: 1.02rem; }
.nf-upsell p { margin: 0 0 12px; font-size: .9rem; }
.nf-key { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; flex-wrap: wrap; }
.nf-key .field { flex: 1; min-width: 200px; }
.nf-upsell .nf-key-msg { font-size: .84rem; margin: 8px 0 0; min-height: 1em; }
.nf-mapcard { padding: 8px; }
.nf-map { height: 380px; border-radius: 12px; background: var(--surface-2); z-index: 0; }
.nf-legend { font-size: .78rem; margin: 6px 4px 0; display: flex; align-items: center; gap: 6px; }
.nf-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); opacity: .6; flex: none; }
.nf-pop table { border-collapse: collapse; margin: 6px 0; font-size: .82rem; }
.nf-pop th { text-align: left; font-weight: 500; color: #5A6878; padding: 1px 10px 1px 0; }
.nf-pop td { font-weight: 700; font-variant-numeric: tabular-nums; }
[data-theme="dark"] .nf-map .leaflet-popup-content-wrapper, [data-theme="dark"] .nf-map .leaflet-popup-tip { background: var(--surface); color: var(--text); }
[data-theme="dark"] .nf-pop th { color: var(--muted); }
[data-theme="dark"] .nf-map .leaflet-tooltip { background: var(--surface); color: var(--text); border-color: var(--border); }
[data-theme="dark"] .nf-map .leaflet-control-attribution, [data-theme="dark"] .nf-pack-map .leaflet-control-attribution { background: rgba(18,31,45,.8); color: var(--muted); }
[data-theme="dark"] .nf-map .leaflet-bar a { background: var(--surface); color: var(--text); border-color: var(--border); }
.nf-tablecard { padding: 4px 0 8px; overflow-x: auto; }
.nf-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.nf-table th, .nf-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.nf-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nf-table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); vertical-align: bottom; white-space: nowrap; }
.nf-table thead th button { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; display: inline-flex; gap: 3px; align-items: center; }
.nf-table thead th button:hover { color: var(--accent); }
.nf-table thead th[aria-sort="ascending"], .nf-table thead th[aria-sort="descending"] { color: var(--ink); }
.nf-arrow { font-size: .62rem; min-width: .8em; }
.nf-table tbody th { font-weight: 700; min-width: 170px; }
.nf-table tbody th a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 2px; }
.nf-table tbody th a:hover { text-decoration-color: currentColor; }
.nf-table tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: .76rem; margin-top: 2px; }
.nf-table tbody th small a { color: var(--accent); font-weight: 600; }
#nf-table thead th:first-child, #nf-table tbody th { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.nf-more { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 10px 10px 2px; flex-wrap: wrap; }
.nf-more:empty { display: none; }
.nf-fine { font-size: .78rem; margin: 0; }
/* Grant data pack */
.nf-pack-tools { display: flex; gap: 14px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-top: 18px; padding: 16px; }
.nf-pack-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; flex: 1; min-width: 0; }
.nf-pack-sec { margin-top: 14px; }
.nf-pack-sec h2 { font-size: 1.1rem; margin: 0 0 10px; }
.nf-pack-sec h3 { font-size: .95rem; margin: 14px 0 6px; }
.nf-crit { margin: 0; padding-left: 18px; columns: 2; column-gap: 26px; font-size: .9rem; }
.nf-figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 0; }
.nf-fig { padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.nf-fig dt { font-size: .76rem; color: var(--muted); font-weight: 600; }
.nf-fig dd { margin: 2px 0 0; font-size: 1.25rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.nf-fig dd small { font-size: .74rem; font-weight: 500; }
.nf-fig > small { display: block; font-size: .72rem; color: var(--muted); margin-top: 2px; }
.nf-pack-map { height: 320px; border-radius: 12px; background: var(--surface-2); z-index: 0; }
.nf-pack-tablesec { overflow-x: auto; }
.nf-pack-table tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: .74rem; }
.nf-method ul { margin: 0; padding-left: 18px; font-size: .86rem; display: flex; flex-direction: column; gap: 4px; }
.nf-repro { font-size: .8rem; margin: 12px 0 0; word-break: break-all; }

@media (max-width: 900px) {
  .nf-layout { grid-template-columns: 1fr; }
  .nf-filters { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 640px) {
  .nf-intro h1 { font-size: 1.35rem; }
  .nf-map { height: 300px; }
  .nf-actions .btn { flex: 1 1 calc(50% - 8px); white-space: normal; text-align: center; }
  .nf-pack-fields { grid-template-columns: 1fr; }
  .nf-crit { columns: 1; }
  .nf-figs { grid-template-columns: 1fr 1fr; }
  .nf-fig dd { font-size: 1.05rem; }
  .nf-table th, .nf-table td { padding: 6px 7px; }
  .nf-table tbody th { min-width: 140px; }
}
@media print {
  .nf-filters, .nf-actions, .nf-upsell, .nf-more, .skip-link { display: none !important; }
  .nf-layout { grid-template-columns: 1fr; }
  /* fixed map sizes, the same as html.pm-print below: the tiles loaded before printing are the printed ones */
  .nf-map { height: 3.4in; width: 7in; max-width: 100%; margin: 0 auto; }
  .nf-tablecard { overflow: visible; }
  #nf-table thead th:first-child, #nf-table tbody th { position: static; }
  .nf-table { font-size: 8pt; }
  .nf-table th, .nf-table td { padding: 2.5pt 4pt; }
  .nf-table tr { break-inside: avoid; }
  .nf-table thead { display: table-header-group; }
  body.nf-pack-on #nf-app { display: none !important; }
  .nf-pack-sec { margin-top: 8pt; }
  .nf-pack-sec h2 { font-size: 11pt; margin-bottom: 4pt; }
  .nf-pack-map { height: 3in; }
  .nf-figs { grid-template-columns: repeat(4, 1fr); gap: 5pt; }
  .nf-fig { padding: 4pt 6pt; }
  .nf-fig dd { font-size: 12pt; }
  .nf-pack-tablesec { overflow: visible; }
  /* The "Schools" heading always prints with the first rows of its table (the first rows are their own tbody). */
  .nf-pack-table tbody.nf-keep { break-inside: avoid; }
  .nf-pack-table thead th { white-space: normal; font-size: 6.8pt; }
  .nf-pack-table tbody th { min-width: 1.6in; }
  .nf-pack-table tbody td:nth-child(2) { min-width: 1.35in; }
  .nf-pack-table tbody th small { font-size: 7pt; }
  .nf-pack-sec .nf-figs { grid-template-columns: repeat(5, 1fr); }
  .nf-pack-sec .nf-fig dt { font-size: 7.5pt; line-height: 1.25; }
  .nf-pack-sec .nf-fig small { font-size: 7pt; line-height: 1.25; }
  .nf-pack-map { height: 2.7in; width: 7in; max-width: 100%; margin: 0 auto; }
  .nf-method { break-inside: auto; }
  .nf-method ul { font-size: 8.5pt; }
  .nf-repro { font-size: 7.5pt; }
  .leaflet-control-zoom { display: none; }
}

/* Print maps at their printed size on screen while their tiles load (js/print-maps.js);
   keep these sizes equal to the @media print ones above. */
html.pm-print .ch-map { min-height: 0; width: 3.1in; height: 2.1in; flex: none; }
html.pm-print .nf-map { height: 3.4in; width: 7in; max-width: none; }
html.pm-print .nf-pack-map { height: 2.7in; width: 7in; max-width: none; }
html.pm-print .nf-mapcard, html.pm-print .nf-pack-sec { overflow: hidden; }

/* ===================================================== For school districts (for-districts.html) */
.fd-hero { padding: 46px 0 54px; }
.fd-hero h1 { max-width: 820px; }
.fd-setup-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: -10px 0 20px; font-size: .88rem; }
.fd-plans { grid-template-columns: repeat(3, 1fr); }
.fd-builder form fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.fd-builder legend { font-size: .82rem; font-weight: 700; padding: 0 4px; }
.fd-builder form fieldset.fd-levels { flex-direction: row; flex-wrap: wrap; gap: 8px 18px; }
.fd-levels label, .fd-check { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; min-height: 32px; cursor: pointer; }
.fd-color { display: flex; gap: 8px; align-items: center; }
.fd-color input[type=color] { width: 44px; height: 42px; padding: 2px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); flex-shrink: 0; cursor: pointer; }
.fd-color input[type=text] { flex: 1; min-width: 0; }
.fd-builder iframe { height: 300px; display: block; }
.btn-sm { padding: 6px 12px; font-size: .82rem; }
.fd-rejected { margin: 0; }
.fd-rejected[hidden] { display: none; }
.fd-data p { margin: 0 0 12px; max-width: 760px; }
.fd-data .row-actions { margin-top: 6px; }
@media (max-width: 960px) { .fd-plans { grid-template-columns: 1fr; } }
@media (max-width: 620px) {
  .fd-hero h1 { font-size: 1.55rem; }
  .fd-builder .preview { padding: 8px; }
  .preview-bar { flex-wrap: wrap; }
}
/* ===================================================== Enrollment trends (enrollment.html) */
.enrollment main > .card, .enrollment #en-status { margin-top: 16px; }
.en-h2 { font-size: 1.15rem; margin: 0 0 10px; }
.en-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.en-tile { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.en-tile b { display: block; font-size: 1.35rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.en-tile span { font-size: .78rem; color: var(--muted); }
.en-chart { position: relative; }
.en-charthead { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; margin: 0 0 6px; }
.en-axisnote { margin: 0; font-size: .8rem; color: var(--muted); }
.en-axisnote.zoomed { color: var(--warn-text); font-weight: 600; }
.en-plot { position: relative; border-radius: 8px; }
.en-plot:focus { outline: none; }
.en-plot:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.en-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.en-chart .ax text { font-size: 11px; fill: var(--muted); }
.en-chart .ax line { stroke: var(--border); }
.en-chart .ax line.zero { stroke: var(--muted); }
.en-chart .ax .brk { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.en-chart .ln { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.en-chart .pt { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.en-chart .pt.base { fill: var(--surface); stroke: var(--accent); }
.en-chart .pt.on { r: 6; }
.en-chart .guide { stroke: var(--muted); stroke-dasharray: 3 3; }
.en-chart .lbl { font-size: 11px; fill: var(--text); font-weight: 600; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.en-tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--surface); font-size: .78rem; padding: 4px 8px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, -125%); }
.en-keyhint { margin: 4px 0 0; font-size: .76rem; color: var(--muted); }
.en-tableview { margin-top: 10px; font-size: .86rem; }
.en-tableview summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.en-small { max-width: 480px; margin-top: 8px; }
.en-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1.5fr); gap: 12px; padding: 16px; align-items: end; }
.en-filters select, .en-filters input[type=number] { padding: 8px 10px; width: 100%; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.en-filters .en-help { grid-column: 1 / -1; margin: 0; }
.en-tablehead { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.en-tablehead .en-h2 { margin: 0; }
.en-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-sm { padding: 6px 12px; font-size: .82rem; }
.en-quick .btn[aria-pressed="true"] { border-color: var(--accent); background: var(--hover); }
.en-count { font-size: .84rem; margin: 6px 0; }
.en-tablecard { padding: 16px; }
.en-scroll { overflow-x: auto; position: relative; }
.en-table td.down { color: var(--bad); font-weight: 600; }
.en-table td.up { color: var(--good); font-weight: 600; }
.en-table td.spark { color: var(--accent); padding-top: 4px; padding-bottom: 2px; }
.en-table .et-spark { display: block; }
.en-table .et-spark .et-base { fill: var(--surface); stroke: currentColor; stroke-width: 1.5; }
.en-table tbody th { font-weight: 600; min-width: 160px; }
.en-table tbody th a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 2px; }
.en-table tbody th a:hover { text-decoration-color: currentColor; }
.en-table tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: .76rem; }
.en-caution { background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--text); border-radius: 12px; padding: 10px 14px; margin: 10px 0; font-size: .88rem; }
.en-caution p { margin: 0 0 6px; }
.en-caution p:last-child { margin: 0; }
.en-official { padding-left: 18px; }
.en-official li { margin-bottom: 10px; }
.en-official .tag { margin-left: 6px; }
.en-small-print { font-size: .8rem; }
.en-methods ul { padding-left: 18px; font-size: .9rem; }
.en-methods li { margin-bottom: 6px; }
@media (max-width: 760px) {
  .en-filters { grid-template-columns: 1fr 1fr; }
  .ch-intro h1 { font-size: 1.4rem; }
}
/* Phones: each table row becomes a small card (name, then labelled numbers); the column
   headings stay as a row of sort buttons. Labels come from data-label on each cell. */
@media (max-width: 640px) {
  .en-table, .en-table tbody { display: block; }
  .en-table thead { display: block; }
  .en-table thead tr { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
  .en-table thead th { border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; font-size: .7rem; }
  .en-table thead th[aria-sort="ascending"], .en-table thead th[aria-sort="descending"] { border-color: var(--accent); background: var(--hover); }
  .en-table thead th.spark { display: none; }
  .en-table tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .en-table tbody th, .en-table tbody td { border: 0; padding: 0; min-width: 0; }
  .en-table tbody th { grid-column: 1 / -1; }
  .en-table tbody td.num { text-align: left; white-space: normal; }
  .en-table tbody td::before { content: attr(data-label); display: block; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
  .en-table tbody td.spark { padding: 0; overflow: hidden; }
  .en-table tbody td.spark .et-spark { max-width: 100%; }
  .en-table tbody td:empty, .en-table tbody td[data-empty] { display: none; }
}
@media (max-width: 420px) {
  .en-filters { grid-template-columns: 1fr; }
}
/* data-guide.html styles live in css/data-guide.css */
/* Long button labels (often in Spanish) wrap on phones instead of widening the page. */
@media (max-width: 480px) {
  .row-actions .btn { white-space: normal; text-align: center; max-width: 100%; }
}
/* ---------------------------------------------------------------- 404.html */
.nf404 { padding-top: 28px; max-width: 760px; }
.nf404 h1 { margin: 6px 0 8px; font-size: 1.8rem; }
.nf404-search { margin: 22px 0 16px; padding: 18px; }
.nf404-search .field { display: block; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.nf404-row { display: flex; gap: 8px; flex-wrap: wrap; }
.nf404-row input { flex: 1 1 240px; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }

/* "See a sample" links next to plans (they open samples.html#<product>) */
.sm-see { display: inline-flex; align-items: center; gap: 5px; font-size: .84rem; font-weight: 600; }
.sm-see::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .55; flex-shrink: 0; }
.sm-see[hidden] { display: none !important; }
.plan .sm-see, .pc-card .sm-see { align-self: center; }

/* for-districts.html: district-confirmed boundaries list (js/for-districts.js) */
.fd-bnd h3 { margin: 0 0 6px; }
.fd-bnd-list { margin: 4px 0 12px; padding-left: 18px; }
.fd-bnd-list li { margin: 3px 0; overflow-wrap: anywhere; }
.fd-bnd + .fd-data { margin-top: 14px; }

/* ===================================================== Accessibility (WCAG 2.1 AA audit, 2026-11; accessibility.html) */
/* Focus ring token: 3:1+ against light surfaces (blue) and dark surfaces / navy bars (gold). WCAG 1.4.11, 2.4.7. */
:root { --focus-ring: #1F5F9E; }
:root[data-theme="dark"] { --focus-ring: #F2B33D; }
iframe:focus-visible, .leaflet-marker-icon:focus-visible, .leaflet-container:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
/* Skip-link targets take focus (tabindex="-1") so screen readers start reading there; a whole region needs no ring. */
main[tabindex="-1"]:focus, section[tabindex="-1"]:focus, div[tabindex="-1"]:focus { outline: none; }
/* Reflow (1.4.10) and text spacing (1.4.12): long button labels (often Spanish) wrap on phones instead of widening the page. */
@media (max-width: 480px) {
  main .btn, .wg .btn { white-space: normal; text-align: center; max-width: 100%; }
}
/* Accessibility statement page */
.a11y-main { max-width: 820px; padding-top: 24px; padding-bottom: 8px; }
.a11y-main h1 { margin: 6px 0 8px; font-size: 1.9rem; }
.a11y-main h2 { margin: 30px 0 8px; font-size: 1.25rem; }
.a11y-main h3 { margin: 18px 0 6px; font-size: 1.02rem; }
.a11y-main p, .a11y-main li { max-width: 75ch; }
.a11y-main ul { padding-left: 22px; }
.a11y-main li { margin: 4px 0; }
.a11y-lead { font-size: 1.05rem; color: var(--text); }
.a11y-meta { color: var(--muted); font-size: .9rem; }
.a11y-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.a11y-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.a11y-table th, .a11y-table td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.a11y-table thead th { background: var(--surface-2); color: var(--ink); }
.a11y-table tr:last-child td { border-bottom: 0; }
.a11y-report { margin: 12px 0 4px; }
