/* XKDR Environment: xkdr.org visual language (as in Burn Watch): warm
   off-white ground, black type, coral accent, Montserrat UI + Merriweather
   headings, square corners. */
:root {
  --ground: #f2f1f0;
  --surface: #ffffff;
  --ink: #000000;
  --muted: #4b4b4b;
  --faint: #7a7a7a;
  --rule: #d6d6d6;
  --accent: #f57d6a;
  --accent-ink: #b8442f;
  --night: #2f4b7c;
  --ui: "Montserrat", system-ui, sans-serif;
  --serif: "Merriweather", Georgia, serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* beats inline display: flex */
html, body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--ui); font-size: 14px; line-height: 1.5; }
a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

header.top { display: flex; align-items: center; gap: 24px; padding: 14px max(20px, env(safe-area-inset-left)); border-bottom: 1px solid var(--rule); background: var(--ground); position: sticky; top: 0; z-index: 1000; flex-wrap: wrap; }
header.top .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
header.top .brand img { height: 26px; }
header.top .brand span { font-family: var(--serif); font-weight: 700; font-size: 17px; }
header.top nav { display: flex; gap: 20px; flex-wrap: wrap; }
header.top nav a { text-decoration: none; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; padding-bottom: 3px; border-bottom: 2px solid transparent; }
header.top nav a.on, header.top nav a:hover { border-bottom-color: var(--accent); color: var(--ink); }

main { max-width: 1280px; margin: 0 auto; padding: 24px max(20px, env(safe-area-inset-right)) 64px max(20px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 22px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; margin: 0; line-height: 1.2; text-wrap: balance; }
h1 { font-size: 28px; }
h2 { font-size: 19px; }
h3 { font-size: 15px; }
.lede { font-family: var(--serif); font-weight: 300; font-size: 15px; color: var(--muted); max-width: 75ch; margin: 6px 0 0; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-ink); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }

.panel { background: var(--surface); border: 1px solid var(--rule); padding: 18px; min-width: 0; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

.controls { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; }
.controls label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
select, input[type=date], input[type=text], input[type=password], input[type=month] {
  font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--ink); background: var(--surface); color: var(--ink); border-radius: 0; min-width: 0; }
button, .btn { font: inherit; font-weight: 700; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; padding: 9px 16px; border: 1px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; border-radius: 0; text-decoration: none; display: inline-block; }
button:hover, .btn:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }
button.ghost, .btn.ghost { background: transparent; color: var(--ink); }
button:disabled { opacity: 0.45; cursor: not-allowed; }

#map { height: 560px; border: 1px solid var(--rule); background: #e8e6e3; }
@media (max-width: 900px) { #map { height: 420px; } }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 10px; margin-right: 5px; vertical-align: -1px; border: 1px solid rgba(0,0,0,0.15); }

.chart { width: 100%; min-height: 240px; }
.stat-row { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.stat-row div { display: flex; flex-direction: column; }
.stat-row b { font-family: var(--serif); font-size: 20px; font-variant-numeric: tabular-nums; }
.stat-row span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--rule); padding: 22px; text-decoration: none; display: flex; flex-direction: column; gap: 8px; }
.card:hover { border-color: var(--ink); color: var(--ink); }
.card .go { margin-top: auto; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-ink); }

.stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; max-height: 300px; overflow: auto; }
.stations button { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 13px; text-align: left; background: var(--surface); color: var(--ink); border-color: var(--rule); padding: 7px 10px; }
.stations button.on { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
.chip { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 1px 6px; border: 1px solid var(--rule); color: var(--muted); margin-left: 4px; }

footer { border-top: 1px solid var(--rule); padding: 18px max(20px, env(safe-area-inset-left)); font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.footmade { font-family: "Josefin Sans", var(--ui); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); }

.u-legend { font-family: var(--ui); font-size: 12px; }
.err { color: var(--accent-ink); font-weight: 600; }
.captcha img { border: 1px solid var(--rule); background: #fff; max-width: 100%; }
.progress { height: 6px; background: var(--rule); }
.progress div { height: 100%; background: var(--accent); width: 0; transition: width 0.4s; }
