/* Bay Area Abandoned Vehicle Map
   Same plain, high-contrast system as the California Derelict Vessel Map: SBB-style red, ink and greys, Public Sans.
   Leaflet's own CSS is loaded first. */

@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/public-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/public-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/public-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/public-sans-latin-700-normal.woff2") format("woff2"); }

:root {
  --ink: #151515;
  --accent: #C60018;
  --accent-dark: #8F0011;
  --text-2: #595959;
  --text-3: #3D3D3D;
  --rule: #DCDCDC;
  --strip: #F4F4F4;
  --hover: #EFEFEF;
  --map-border: #CFCFCF;
  --water: #3B6A84;
  --water-ink: #2F566C;
  --map-water: #D9E4EA;
  --map-land: #F3F3F1;
  /* density squares, fewest to most reports */
  --r1: #F7D9DC;
  --r2: #EFA3AB;
  --r3: #E0606E;
  --r4: #C60018;
  --r5: #6E000D;
  /* chart series */
  --s-sf: #2A78D6;
  --s-oak: #EB6834;
  --s-sj: #1BAF7A;
  --grid: #E1E0D9;
  --font: "Public Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --map-h: clamp(480px, calc(100vh - 220px), 780px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; color: var(--ink); background: #fff;
  font-variant-numeric: tabular-nums; line-height: 1.45;
}
a { color: var(--ink); }
a:hover { color: var(--accent-dark); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 3000; background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 999px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 8px; color: #fff; }

/* ---------- header ---------- */
.site-header {
  position: relative; z-index: 1100; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 16px; padding: 14px 32px;
  background: #fff; border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 34px; height: 34px; flex: 0 0 auto; background: var(--accent); display: flex; align-items: center; justify-content: center; }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.brand-short { display: none; }
.header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 28px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 0 5px;
  font-size: 16px; font-weight: 500; text-decoration: none; border-bottom: 3px solid transparent;
}
.site-nav a[aria-current="page"] { font-weight: 600; border-bottom-color: var(--accent); }
.report-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 16px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.report-btn:hover { background: var(--accent-dark); color: #fff; }
.report-short { display: none; }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; align-items: center; justify-content: center; }

/* ---------- notice strip ---------- */
.notice {
  display: flex; flex-wrap: wrap; gap: 6px 28px; padding: 11px 32px;
  background: var(--strip); color: var(--text-3); font-size: 14.5px;
}
.notice-short { display: none; }
.notice a { white-space: nowrap; }

/* ---------- summary tiles ---------- */
.kpis { display: flex; flex-wrap: wrap; gap: 24px 32px; }
.kpi { flex: 1 1 200px; border-top: 2px solid var(--ink); padding-top: 10px; min-width: 0; }
.kpi-num { font-size: 36px; font-weight: 700; line-height: 1.1; }
.kpi-label { font-size: 14.5px; color: var(--text-2); }
.map-page .kpis { padding: 28px 32px 8px; }

/* ---------- map page layout ---------- */
.workspace { display: grid; grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); gap: 32px; padding: 24px 32px 48px; align-items: start; }
.list-pane { min-width: 0; }
.list-pane h1 { margin: 0 0 4px; font-size: 30px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; }
.lede { margin: 0; font-size: 15.5px; color: var(--text-2); }
.sheet-handle { display: none; }

.segmented { display: flex; gap: 3px; margin-top: 22px; padding: 3px; border: 1px solid var(--ink); border-radius: 999px; }
.segmented button {
  flex: 1 1 0; min-height: 44px; border: 0; border-radius: 999px; background: #fff; color: var(--ink);
  font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.segmented button span.n { font-weight: 400; }
.lbl-short { display: none; }
.segmented button[aria-pressed="true"], .chips button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chips button {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--ink);
  border-radius: 999px; background: #fff; color: var(--ink); font-size: 14.5px; font-weight: 600; cursor: pointer;
}
.chips button span.n { font-weight: 400; }
.chips button svg { display: none; }
.chips button[aria-pressed="true"] svg { display: block; }
.chips button.chip-wide { flex: 1 1 100%; justify-content: flex-start; }
.help { margin: 8px 2px 0; font-size: 13.5px; color: var(--text-2); }
.count { margin: 22px 0 0; padding-bottom: 8px; border-bottom: 2px solid var(--ink); font-size: 14px; font-weight: 600; }
.empty { margin: 0; padding: 20px 0; font-size: 15.5px; color: var(--text-3); }

.report-list { list-style: none; margin: 0; padding: 0; max-height: calc(var(--map-h) - 330px); min-height: 220px; overflow-y: auto; overscroll-behavior: contain; }
.report-list li { border-bottom: 1px solid var(--rule); }
.row {
  display: grid; grid-template-columns: 98px minmax(0, 1fr) 18px; gap: 12px; align-items: start;
  padding: 14px 12px; background: #fff; color: var(--ink); text-decoration: none; width: 100%;
  border: 0; text-align: left; cursor: pointer; font: inherit;
}
.row:hover { background: var(--strip); color: var(--ink); }
.row[aria-current="true"] { background: var(--hover); box-shadow: inset 4px 0 0 var(--accent); }
.row-count { display: flex; flex-direction: column; }
.row-num { font-size: 23px; font-weight: 700; line-height: 1; }
.row-unit { margin-top: 5px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.row-place { font-size: 17px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.row-sub { font-size: 14px; color: var(--text-2); }
.row svg { margin-top: 4px; }
.row-bar { display: block; height: 5px; margin-top: 6px; background: var(--hover); }
.row-bar i { display: block; height: 100%; background: var(--accent); }

.map-pane { min-width: 0; }
.map-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; margin-bottom: 12px; }
.map-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.map-head span { font-size: 14px; color: var(--text-2); }
.map-wrap { isolation: isolate; position: relative; height: var(--map-h); border: 1px solid var(--map-border); background: var(--map-water); overflow: hidden; }
#map { position: absolute; inset: 0; background: var(--map-water); font-family: var(--font); }
#map.land-ground { background: var(--map-land); }
.map-msg { position: absolute; left: 50%; top: 50%; z-index: 900; transform: translate(-50%, -50%); max-width: 80%; padding: 14px 18px; background: #fff; border: 1px solid var(--ink); font-size: 15px; text-align: center; }

.legend {
  position: absolute; left: 12px; bottom: 28px; z-index: 650; display: flex; flex-direction: column; gap: 8px;
  padding: 12px 14px; background: #fff; border: 1px solid var(--map-border); font-size: 13.5px; max-width: 250px;
}
.lg-title { font-weight: 700; }
.lg-ramp { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.lg-ramp li { display: flex; align-items: center; gap: 10px; }
.lg-ramp i { display: block; flex: 0 0 auto; width: 22px; height: 14px; border: 1px solid rgba(21, 21, 21, 0.18); }
.lg-ramp i.lg-dotbox { display: flex; align-items: center; justify-content: center; width: 28px; height: 20px; border: 0; }
.lg-dotbox b { display: block; flex: 0 0 auto; border-radius: 50%; background: var(--accent); border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(21, 21, 21, 0.22); box-sizing: content-box; }
.lg-line { display: flex; align-items: center; gap: 10px; }
.lg-line i { display: block; flex: 0 0 auto; width: 22px; height: 0; border-top: 1.5px solid #6E6E6E; }
.lg-short { display: none; }

/* ---------- Leaflet tweaks ---------- */
.leaflet-container { font-family: var(--font); font-size: 14px; background: var(--map-water); }
.leaflet-top.leaflet-right .leaflet-control { margin: 12px 12px 0 0; }
.city-label { pointer-events: none; }
.city-label::before { content: ""; position: absolute; left: -2.5px; top: -2.5px; width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); }
.city-label span {
  position: absolute; left: 6px; top: -9px; font-size: 12px; line-height: 18px; font-weight: 600; color: var(--text-3);
  white-space: nowrap; text-shadow: 0 0 3px #F3F3F1, 0 0 3px #F3F3F1, 0 0 2px #fff;
}
.hood-label { pointer-events: none; width: 0 !important; height: 0 !important; background: none; border: 0; }
.hood-label span {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); font-size: 11.5px; line-height: 1.15; font-weight: 600;
  color: #4A4A4A; white-space: nowrap; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 2px #fff, 0 0 2px #fff;
}
.leaflet-bar { box-shadow: none; border-radius: 0; }
.leaflet-control-zoom { border: 1px solid var(--ink) !important; background: #fff; }
.leaflet-control-zoom a, .leaflet-control-zoom a:hover {
  width: 44px; height: 44px; line-height: 44px; font-size: 0; color: transparent; border-radius: 0 !important;
  border-bottom: 1px solid var(--rule); background-color: #fff; background-repeat: no-repeat; background-position: center;
}
.leaflet-control-zoom a:last-child { border-bottom: 0; }
.leaflet-control-zoom a:hover { background-color: var(--strip); }
.leaflet-control-zoom-in { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M8 2v12M2 8h12' stroke='%23151515' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.leaflet-control-zoom-out { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M2 8h12' stroke='%23151515' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.leaflet-control-zoom a.leaflet-disabled { opacity: 0.35; cursor: default; }
.leaflet-control.ca-control { margin-top: 10px; }
.ca-btn { display: block; min-height: 40px; padding: 0 14px; border: 1px solid var(--ink); background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.ca-btn:hover { background: var(--strip); }
.leaflet-control-attribution { padding: 2px 6px; background: rgba(255, 255, 255, 0.85); color: var(--text-3); font-size: 11px; }
.leaflet-control-attribution a { color: var(--text-3); }

.report-popup .leaflet-popup-content-wrapper { padding: 0; border: 1px solid var(--ink); border-radius: 0; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18); color: var(--ink); }
.report-popup .leaflet-popup-content { margin: 0; padding: 16px 18px 18px; font-size: 14px; line-height: 1.4; }
.report-popup .leaflet-popup-tip-container { display: none; }
.leaflet-container .report-popup a.leaflet-popup-close-button {
  top: 0; right: 0; width: 44px; height: 44px; padding: 0; font-size: 0; color: transparent;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M2 2l10 10M12 2L2 12' stroke='%23151515' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center no-repeat;
}
.leaflet-container a { color: var(--ink); }
.leaflet-container a:hover { color: var(--accent-dark); }
.leaflet-container .leaflet-control-attribution a { color: var(--text-3); }
.leaflet-container .report-popup p { margin: 0; }
.popup-body:focus { outline: none; }
.report-popup .popup-kicker { font-size: 13px; color: var(--text-2); }
.report-popup .popup-big { padding-right: 30px; font-size: 26px; font-weight: 700; line-height: 1.15; }
.report-popup .popup-big small { font-size: 15px; font-weight: 500; }
.leaflet-container .report-popup .popup-place { margin: 4px 0 12px; font-size: 15px; }
.leaflet-squares-pane { transition: opacity 0.25s ease; }
.dot-canvas { position: absolute; left: 0; top: 0; pointer-events: none; transition: opacity 0.2s ease; }
.leaflet-container .report-popup .popup-months { margin: 10px 0 0; font-size: 13.5px; }
@media (prefers-reduced-motion: reduce) { .leaflet-squares-pane, .dot-canvas { transition: none; } }
.facts { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 5px 10px; margin: 0; padding-top: 10px; border-top: 1px solid var(--rule); font-size: 14px; }
.facts dt { color: var(--text-2); }
.facts dd { margin: 0; }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 44px; margin-top: 12px; border-bottom: 1px solid var(--ink); }
.spark i { display: block; flex: 1 1 0; min-height: 1px; background: #BDBDBD; }
.spark i.on { background: var(--accent); }
.spark-axis { display: flex; justify-content: space-between; margin-top: 3px; font-size: 12px; color: var(--text-2); }
.report-popup .popup-link { display: inline-block; margin-top: 12px; font-size: 15px; font-weight: 600; }
.leaflet-container .report-popup .popup-fine { margin: 6px 0 0; font-size: 12.5px; color: var(--text-2); }
.leaflet-container .report-popup .popup-note { margin: 10px 0 0; font-size: 13px; color: var(--text-3); }

/* ---------- Data and About pages ---------- */
.page { max-width: 1280px; margin: 0 auto; padding: 40px 32px 56px; }
.page h1 { margin: 0; font-size: 40px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.page .intro { margin: 10px 0 0; max-width: 62ch; font-size: 17px; color: var(--text-3); }
.page .kpis { margin-top: 32px; }
.page .kpi-num { font-size: 40px; }
.page .kpi-label { font-size: 15px; }
.block { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--rule); min-width: 0; }
.block h2 { margin: 0; font-size: 22px; font-weight: 700; }
.block .note { margin: 4px 0 18px; max-width: 70ch; font-size: 15px; color: var(--text-2); }
.scroll-x { overflow-x: auto; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 40px 56px; margin-top: 48px; }
.chart-grid .block { margin-top: 0; }

.key { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 16px; padding: 0; list-style: none; font-size: 14px; }
.key li { display: flex; align-items: center; gap: 8px; }
.key i, .trow i { display: block; flex: 0 0 auto; width: 14px; height: 14px; border-radius: 2px; }
.sw-sf { background: var(--s-sf); }
.sw-oak { background: var(--s-oak); }
.sw-sjav { background: var(--s-sj); }
.sw-sjvc { background: repeating-linear-gradient(135deg, var(--s-sj) 0 2px, #fff 2px 4px); box-shadow: inset 0 0 0 1px var(--s-sj); }

.chart { position: relative; min-width: 640px; padding-top: 6px; }
.plot { position: relative; height: 230px; margin-left: 48px; }
.gl { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--grid); }
.gl.zero { border-top-color: var(--ink); }
.gl span { position: absolute; left: -48px; top: -9px; width: 42px; text-align: right; font-size: 12px; color: var(--text-2); }
.cols { position: absolute; inset: 0; display: grid; gap: 6px; align-items: end; }
.col { appearance: none; display: flex; align-items: flex-end; justify-content: center; height: 100%; padding: 0; border: 0; background: transparent; cursor: default; min-width: 0; }
.col:hover { background: rgba(21, 21, 21, 0.045); }
.col:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.stk { display: flex; flex-direction: column-reverse; gap: 2px; width: 74%; max-width: 24px; }
.stk i { display: block; width: 100%; }
.stk i:last-child { border-radius: 4px 4px 0 0; }
.stk .sf { background: var(--s-sf); }
.stk .oak { background: var(--s-oak); }
.stk .sjav { background: var(--s-sj); }
.stk .sjvc { background: repeating-linear-gradient(135deg, var(--s-sj) 0 2px, #fff 2px 4px); box-shadow: inset 0 0 0 1px var(--s-sj); }
.xlabels { display: grid; gap: 6px; margin: 6px 0 0 48px; }
.xlabels span { text-align: center; font-size: 12.5px; color: var(--text-2); line-height: 1.25; white-space: nowrap; }
.m-short { display: none; }
.tip {
  position: absolute; z-index: 5; min-width: 210px; padding: 10px 12px; background: #fff; border: 1px solid var(--ink);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14); font-size: 13.5px; pointer-events: none;
}
.tip .ttl { margin: 0 0 6px; font-weight: 700; }
.trow { display: grid; grid-template-columns: 14px 56px minmax(0, 1fr); gap: 8px; align-items: center; padding: 2px 0; }
.trow b { font-size: 14.5px; text-align: right; }
.trow span { color: var(--text-2); }
.trow.sum { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--rule); }
.notes { display: grid; gap: 14px; margin: 24px 0 0; padding: 0; list-style: none; max-width: 78ch; }
.notes li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 16px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 15.5px; }
.notes b { font-size: 15px; }
details { margin-top: 14px; font-size: 15px; }
summary { min-height: 32px; cursor: pointer; font-weight: 600; }
.data-table { border-collapse: collapse; margin-top: 8px; font-size: 14.5px; }
.data-table th, .data-table td { padding: 6px 24px 6px 0; border-bottom: 1px solid var(--rule); text-align: left; }
.data-table thead th { border-bottom: 2px solid var(--ink); }
.data-table .num { text-align: right; padding-right: 0; }
.data-table.rep-table .num { padding-left: 22px; }

.bars { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.bars li { display: grid; grid-template-columns: minmax(120px, 46%) minmax(0, 1fr) 62px; gap: 12px; align-items: center; font-size: 15px; }
.bars .who small { display: block; font-size: 12.5px; color: var(--text-2); }
.bar-track { position: relative; height: 18px; background: var(--hover); }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; }
.bar-fill.c0 { background: var(--s-sf); }
.bar-fill.c1 { background: var(--s-oak); }
.bar-fill.c2 { background: var(--s-sj); }
.bar-fill.c2::after { content: none; }
.bars b { font-weight: 600; text-align: right; }

.src-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 15px; }
.src-table th, .src-table td { padding: 14px 24px 14px 0; vertical-align: top; border-bottom: 1px solid var(--rule); text-align: left; }
.src-table thead th { padding-top: 10px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.src-table tbody th { font-weight: 700; width: 16%; }
.src-table td:last-child { padding-right: 0; }
.src-cards { display: none; }
.src-card { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.src-card h3 { margin: 0 0 6px; font-size: 17px; }
.src-card p { margin: 0 0 6px; font-size: 15px; }

.prose { max-width: 68ch; }
.prose h2 { margin: 40px 0 8px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 22px; font-weight: 700; scroll-margin-top: 16px; }
.prose p, .prose li { font-size: 16.5px; }
.prose p { margin: 0 0 12px; }
.prose ul { margin: 0 0 12px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }

/* ---------- footer ---------- */
.site-footer { display: flex; flex-wrap: wrap; gap: 24px 64px; padding: 32px 32px 48px; border-top: 1px solid var(--rule); }
.foot-main { flex: 1 1 420px; max-width: 640px; }
.foot-main h2 { margin: 0 0 8px; font-size: 20px; font-weight: 700; }
.foot-main p { margin: 0 0 10px; font-size: 15.5px; }
.foot-small { flex: 1 1 280px; font-size: 14px; color: var(--text-2); }
.foot-small p { margin: 0 0 6px; }
.foot-small a { color: var(--text-2); }

body:not(.map-page) .site-footer { padding-left: max(32px, calc((100vw - 1280px) / 2 + 32px)); padding-right: max(32px, calc((100vw - 1280px) / 2 + 32px)); }

/* ---------- phones ---------- */
@media (max-width: 859.98px) {
  .site-header { height: 56px; min-height: 56px; flex-wrap: nowrap; gap: 8px; padding: 0 8px 0 16px; }
  .brand { gap: 10px; min-width: 0; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-mark svg { width: 18px; height: 18px; }
  .brand-long { display: none; }
  .brand-short { display: inline; }
  .brand-name { font-size: 16px; white-space: nowrap; }
  .header-actions { flex-wrap: nowrap; gap: 4px; }
  .report-btn { padding: 0 14px; font-size: 14px; }
  .report-long { display: none; }
  .report-short { display: inline; }
  .js .menu-btn { display: flex; }
  .js .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0;
    padding: 4px 16px 8px; background: #fff; border-bottom: 1px solid var(--rule); box-shadow: 0 10px 18px rgba(0, 0, 0, 0.14);
  }
  .js .site-header.menu-open .site-nav { display: flex; }
  .js .site-nav a { border-bottom: 1px solid var(--rule); }
  .js .site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
  .site-nav a { min-height: 48px; }
  .notice { padding: 8px 16px; font-size: 13px; }
  .notice-long { display: none; }
  .notice-short { display: inline; }

  .page { padding: 28px 16px 40px; }
  .page h1 { font-size: 32px; }
  .site-footer { padding: 28px 16px 40px; }

  /* map page: full-height map with the list as a bottom sheet */
  body.map-page { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
  @supports (height: 100dvh) { body.map-page { height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); } }
  .map-page .kpis, .map-page .map-head, .map-page .site-footer, .map-page .lede { display: none; }
  .map-page main { position: relative; flex: 1 1 auto; min-height: 0; }
  .workspace { display: block; position: absolute; inset: 0; padding: 0; }
  .map-pane { position: absolute; inset: 0; }
  .map-wrap { position: absolute; inset: 0; height: auto; border: 0; }
  .list-pane {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 1000; display: flex; flex-direction: column;
    height: var(--sheet-h, 372px); max-height: calc(100% - 56px); padding: 0 16px; background: #fff;
    border-radius: 16px 16px 0 0; box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.16);
  }
  .workspace[data-sheet="peek"] { --sheet-h: 148px; }
  .workspace[data-sheet="half"] { --sheet-h: 372px; }
  .workspace[data-sheet="full"] { --sheet-h: calc(100% - 56px); }
  .sheet-handle { display: flex; align-self: stretch; align-items: center; justify-content: center; flex: 0 0 auto; height: 28px; margin-top: 2px; border: 0; background: transparent; cursor: grab; touch-action: none; }
  .sheet-handle::before { content: ""; width: 40px; height: 4px; border-radius: 2px; background: #BDBDBD; }
  .list-pane > :not(.report-list) { flex-shrink: 0; }
  .list-pane h1 { font-size: 20px; margin: 0; }
  .sheet-title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .segmented { margin-top: 12px; }
  .segmented button { min-height: 40px; font-size: 14px; }
  .lbl-long { display: none; }
  .lbl-short { display: inline; }
  .chips { margin-top: 8px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .chips button { flex: 0 0 auto; min-height: 40px; padding: 0 12px; font-size: 13.5px; }
  .chips button.chip-wide { flex: 0 0 auto; }
  .help { display: none; }
  .count { margin-top: 10px; padding-bottom: 6px; font-size: 13.5px; }
  .report-list { flex: 1 1 auto; max-height: none; min-height: 0; }
  .row { grid-template-columns: 86px minmax(0, 1fr) 16px; gap: 8px; padding: 12px 2px; }
  .row-num { font-size: 20px; }
  .row-unit { font-size: 12.5px; margin-top: 4px; }
  .row-place { font-size: 16px; }
  .row-sub { font-size: 13.5px; }
  .row-bar { display: none; }
  .row svg { width: 16px; height: 16px; }

  .legend { left: 12px; top: 12px; bottom: auto; flex-direction: row; align-items: center; gap: 10px; padding: 6px 10px; font-size: 12.5px; max-width: calc(100% - 80px); }
  .lg-ramp { flex-direction: row; gap: 2px; }
  .lg-ramp li { gap: 0; }
  .lg-ramp li span { display: none; }
  .lg-ramp i { width: 20px; }
  .lg-line { display: none; }
  .lg-short { display: inline; }
  .lg-title { display: none; }
  .workspace[data-sheet="full"] .legend, .workspace[data-sheet="full"] .leaflet-bottom { display: none; }
  .map-page .leaflet-bottom.leaflet-right { margin-bottom: var(--sheet-h, 372px); }
}

@media (max-width: 600px) {
  .src-wide { display: none; }
  .src-cards { display: block; border-top: 2px solid var(--ink); }
  .chart { min-width: 0 !important; }
  .cols, .xlabels { gap: 2px; }
  .xlabels span { font-size: 10.5px; }
  .xlabels span.skip-sm { visibility: hidden; }
  .m-long { display: none; }
  .m-short { display: inline; }
  .notes li { grid-template-columns: 1fr; gap: 4px; }
  body:not(.map-page) .site-footer { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 480px) {
  .chart-grid { grid-template-columns: minmax(0, 1fr); }
  .bars li { grid-template-columns: minmax(96px, 40%) minmax(0, 1fr) 54px; gap: 8px; }
  .page .kpi-num { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
