:root {
  --bg: #f6f3ee;
  --paper: #fffdf9;
  --ink: #1c1917;
  --muted: #57534e;
  --line: #e7e0d6;
  --accent: #1d4ed8;
  --under: #0f766e;
  --at: #b45309;
  --watch: #57534e;
  --warn-bg: #fff4e5;
  --warn-ink: #9a3412;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(28, 25, 23, 0.06);
  --font: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}
a { color: var(--accent); }
header, main, footer { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
header { padding: 28px 0 8px; }
h1, h2, h3 { font-family: var(--font); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: clamp(1.7rem, 4vw, 2.35rem); margin: 0 0 8px; }
h2 { font-size: 1.45rem; margin: 0 0 12px; }
h3 { font-size: 1.1rem; margin: 0 0 6px; }
.stamp, .meta, .muted, figcaption, .note { color: var(--muted); font-size: 0.92rem; }
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 8px 0 20px;
}
nav a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
nav a:hover { border-color: var(--ink); }
.banner, .card, .panel, .table-wrap, #map {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.banner { padding: 14px 16px; margin: 0 0 20px; }
.banner.warn { background: var(--warn-bg); border-color: #f0c7a0; color: var(--warn-ink); }
section { padding: 8px 0 28px; }
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 16px 0;
}
.metrics div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.metrics strong { display: block; font-family: var(--font); font-size: 1.5rem; }
.fhb-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: fhb; }
.fhb-list li {
  counter-increment: fhb;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px 14px 56px;
  position: relative;
}
.fhb-list li::before {
  content: counter(fhb);
  position: absolute;
  left: 16px; top: 14px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--ink); color: #fff;
  display: grid; place-items: center;
  font-size: 0.85rem;
}
.fhb-list button { all: unset; cursor: pointer; color: var(--accent); font-weight: 600; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; align-items: end; }
label { display: grid; gap: 4px; font-size: 0.8rem; color: var(--muted); }
select, button.btn {
  font: inherit;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}
button.btn { cursor: pointer; }
button.btn:hover { border-color: var(--ink); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); white-space: nowrap; }
th button { all: unset; cursor: pointer; color: inherit; }
th.num, td.num { text-align: right; }
tr.selectable { cursor: pointer; }
tr.selectable:hover, tr.selected { background: #f3efe7; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.78rem; }
.pill.under { background: #d1fae5; color: #065f46; }
.pill.at { background: #ffedd5; color: #9a3412; }
.pill.watch { background: #e7e5e4; color: #44403c; }
#map { height: 420px; margin: 12px 0 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.legend .under { background: var(--under); }
.legend .at { background: var(--at); }
.legend .watch { background: var(--watch); }
.props { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; }
.props dt { color: var(--muted); font-size: 0.85rem; }
.props dd { margin: 0; }
.panel { padding: 16px; }
.sources { display: grid; gap: 8px; }
.sources a { display: block; }
footer { padding: 8px 0 40px; color: var(--muted); font-size: 0.9rem; }
@media (max-width: 800px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .props { grid-template-columns: 1fr; }
  #map { height: 300px; }
  th, td { padding: 8px 6px; }
}
@media (max-width: 520px) {
  .metrics { grid-template-columns: 1fr; }
}
