:root {
  --bg: #f6f7f9; --panel: #ffffff; --ink: #14181f; --muted: #5b6573; --line: #d9dee5; --soft: #eef1f5;
  --sea: #dfe8f1; --land: #f4f2ee; --border: #b7bec8; --link: #1f5fbf;
  --l1: #fbe3cf; --l2: #f5b07a; --l3: #e0662f; --l4: #9f2a12;
  --czib: #5b3fa8; --nav: #0f6f6a; --nav-key: #c2410c; --posture: #111827;
  --radius: 10px; --gap: 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1318; --panel: #171c23; --ink: #e8ecf1; --muted: #9aa4b2; --line: #2b333d; --soft: #1e252e;
    --sea: #0d1b2a; --land: #232a33; --border: #4a5562; --link: #6aa3ff;
    --l1: #4a3326; --l2: #7d4524; --l3: #c4552a; --l4: #f08a5d;
    --czib: #b59bff; --nav: #4fd1c5; --nav-key: #fb923c; --posture: #f3f4f6; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.5; }
a { color: var(--link); }
.wrap { max-width: 76rem; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.top { background: var(--panel); border-bottom: 1px solid var(--line); }
.top-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; flex-wrap: wrap; }
.brand { display: flex; gap: 10px; align-items: baseline; }
.brand strong { font-size: 20px; letter-spacing: .02em; }
.top-nav { display: flex; gap: 14px; align-items: center; font-size: 14px; flex-wrap: wrap; }
.hero h1 { font-size: clamp(22px, 3.6vw, 32px); line-height: 1.2; margin: 24px 0 8px; max-width: 46ch; }
.lede { color: var(--muted); max-width: 72ch; margin: 0 0 16px; }
.mapcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: var(--gap); }
.map-tools { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.layers { border: 0; padding: 0; margin: 0; display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }
.layers label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); }
.legend .sw { display: inline-block; width: 14px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; border: 1px solid var(--border); }
.legend .ln { display: inline-block; width: 18px; height: 0; border-top: 2px dashed var(--czib); margin-right: 4px; vertical-align: 3px; }
.legend .dt { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; }
#map { height: min(62vh, 560px); min-height: 340px; background: var(--sea); }
.leaflet-container { background: var(--sea); font: inherit; }
.leaflet-tooltip { font-size: 13px; width: max-content; max-width: min(320px, 80vw); white-space: normal; }
.posture-icon { background: var(--posture); color: var(--panel); border-radius: 4px; font-size: 11px; font-weight: 700;
  line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--panel); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: var(--gap); }
.card h2 { margin: 0 0 4px; font-size: 18px; }
.card p { margin: 0 0 10px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
@media (max-width: 820px) { .two { grid-template-columns: 1fr; } }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 5px 6px; border-top: 1px solid var(--soft); vertical-align: top; }
th { color: var(--muted); font-weight: 600; border-top: 0; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lvl { display: inline-block; min-width: 22px; text-align: center; border-radius: 4px; font-weight: 700; font-size: 12px; padding: 0 4px; }
.lvl-3 { background: var(--l3); color: #fff; } .lvl-4 { background: var(--l4); color: #fff; }
.bars { display: grid; grid-template-columns: minmax(0, 11rem) 1fr 3rem; gap: 6px 10px; align-items: center; font-size: 14px; }
.bar { height: 10px; border-radius: 3px; background: var(--nav); opacity: .75; }
.bar.key { background: var(--nav-key); opacity: 1; }
.empty { color: var(--muted); font-size: 14px; margin: 4px 0; }
.foot { padding-top: 6px; padding-bottom: 28px; }
.ok { color: inherit; } .bad { color: var(--l4); font-weight: 600; }
.tip { white-space: pre-line; }
