@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:        #ffffff;
  --panel:     #f7f8fa;
  --panel-2:   #eef1f4;
  --line:      #e1e5ea;
  --line-2:    #cfd6dd;
  --ink:       #10161c;
  --ink-2:     #3d4855;
  --muted:     #6b7684;
  --accent:    #c8102e;
  --accent-sf: #fdeef0;

  --c1:#2d6a9f; --c2:#e4a11b; --c3:#2e8b6e; --c4:#b4453c;
  --c5:#7a5fa0; --c6:#3f8fa8; --c7:#a2703f; --c8:#5a6a76;

  --r: 3px;
  --sh: 0 1px 2px rgba(16,22,28,.05), 0 6px 20px rgba(16,22,28,.05);
  --fs: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --fm: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --bar: 58px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--fs); font-size: 14.5px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
}
a { color: var(--ink); text-underline-offset: 2px; }
code { font-family: var(--fm); font-size: .92em; background: var(--panel-2); padding: 1px 4px; border-radius: 2px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }

.appbar {
  height: var(--bar); flex: 0 0 var(--bar);
  display: flex; align-items: center; gap: 20px;
  padding: 0 14px; background: var(--bg);
  border-bottom: 1px solid var(--line); position: relative; z-index: 900;
}
.brand { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; color: inherit; text-decoration: none; cursor: pointer; }
.brand:hover .brand-text b, .brand:focus-visible .brand-text b { text-decoration: underline; }
.brand-mark { color: var(--accent); display: flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 15.5px; letter-spacing: .14em; font-weight: 600; }
.brand-text em {
  font-style: normal; font-size: 12px; color: var(--muted);
  letter-spacing: .04em;
}

.tabs {
  display: flex; gap: 2px; margin-left: 8px; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; scroll-behavior: smooth;
}
.tabs.is-scrollable {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent 100%);
          mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent 100%);
}
.tabs.is-scrolled-end { -webkit-mask-image: none; mask-image: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font: 500 16px/1 var(--fs); color: var(--muted); white-space: nowrap;
  padding: 10px 13px; border-radius: var(--r); position: relative;
}
.tab:hover { color: var(--ink); background: var(--panel); }
.tab.is-active { color: var(--ink); font-weight: 600; }
.tab.is-active::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: -11px;
  height: 2px; background: var(--accent);
}
.appbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.crs-switch { display: flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.crs-method { font: 500 11.5px/1.3 var(--fs); color: var(--muted); max-width: 150px; }
@media (max-width: 1230px) { .crs-switch, .crs-method { display: none; } }
.crs-opt {
  appearance: none; border: 0; border-right: 1px solid var(--line); background: var(--bg);
  font: 600 13.2px/1 var(--fs); letter-spacing: .01em;
  color: var(--muted); padding: 8px 11px; cursor: pointer;
}
.crs-opt:last-child { border-right: 0; }
.crs-opt.is-active { background: var(--ink); color: #fff; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg); border-radius: 999px;
  padding: 6px 13px 6px 9px; font: 500 13.8px/1 var(--fs); color: var(--ink-2);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.pill-warn .dot { background: var(--accent); }
.pill-ok .dot { background: var(--c3); }
.pill:hover { border-color: var(--line-2); }

.view { flex: 1 1 auto; min-height: 0; overflow: auto; display: none; position: relative; }
.view.is-active { display: block; }
.view-split.is-active { display: grid; grid-template-columns: 288px 1fr; overflow: hidden; }

.grid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(186px, auto); gap: 12px; padding: 14px 14px 84px;
}
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r);
  display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden;
  animation: rise .4s cubic-bezier(.22,.8,.3,1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.grid > .card:nth-child(1) { animation-delay: .03s; }
.grid > .card:nth-child(2) { animation-delay: .09s; }
.grid > .card:nth-child(3) { animation-delay: .15s; }
.grid > .card:nth-child(4) { animation-delay: .21s; }
.grid > .card:nth-child(5) { animation-delay: .27s; }
.grid > .card:nth-child(6) { animation-delay: .33s; }
.grid > .card:nth-child(7) { animation-delay: .39s; }
.grid > .card:nth-child(n+8) { animation-delay: .44s; }
@media (prefers-reduced-motion: reduce) { .card { animation: none; } }

.card-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-bottom: 1px solid var(--line); flex: 0 0 auto;
}
.card-head h2 { margin: 0; font-size: clamp(13.5px, .5vw + 11px, 19px); font-weight: 600; letter-spacing: -.005em; }
.card-note { font: 500 11px/1 var(--fs); letter-spacing: .01em; color: var(--muted); }
.card-tools { display: flex; gap: 6px; align-items: center; }
.card-foot { margin: 0; padding: 8px 12px 11px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }
.card-grow { flex: 1 1 auto; }

.card-remove {
  appearance: none; border: 0; background: transparent; color: var(--muted);
  cursor: pointer; font: 400 15px/1 var(--fs); padding: 0 2px;
}
.card-remove:hover { color: var(--accent); }

.kpi { justify-content: center; padding: 12px 10px; gap: 3px; }
.kpi-eyebrow { font: 600 clamp(11px, .35vw + 9px, 14px)/1.15 var(--fs); letter-spacing: .01em; color: var(--muted); }
.kpi-num { font: 600 clamp(34px, 3vw + 18px, 68px)/1 var(--fs); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.kpi-sub { font-size: clamp(12px, .3vw + 10px, 14px); color: var(--muted); }

.map-wrap { position: relative; flex: 1 1 auto; min-height: 0; }
.map-wrap-full { height: 100%; }
.map { position: absolute; inset: 0; background: var(--panel); }
.leaflet-container { font-family: var(--fs); background: var(--panel); }
.leaflet-control-attribution { font-size: 10px; }
.map-wrap .leaflet-bottom { bottom: 41px; }
@media (max-width: 480px) { .map-wrap .leaflet-bottom { bottom: 54px; } }

.readout {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 500;
  display: flex; gap: 0; background: rgba(255,255,255,.94);
  backdrop-filter: blur(6px); border-top: 1px solid var(--line);
  font-family: var(--fm); pointer-events: none;
}
.ro-cell { flex: 1 1 0; padding: 5px 10px; border-right: 1px solid var(--line); min-width: 0; }
.ro-cell:last-child { border-right: 0; }
.ro-k { display: block; font-size: 9.5px; letter-spacing: .08em; color: var(--muted); }
.ro-v { display: block; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ro-scale .ro-v { color: var(--accent); }
.readout-sm .ro-cell { padding: 4px 9px; }

.map-legend {
  position: absolute; right: 10px; top: 10px; z-index: 500;
  background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: var(--r);
  padding: 8px 10px; max-width: 190px; box-shadow: var(--sh);
}
.map-legend:empty { display: none; }
.lg-title { font: 600 10.5px/1 var(--fs); letter-spacing: .01em; color: var(--muted); margin-bottom: 6px; }
.lg-row { display: flex; align-items: center; gap: 7px; font-size: 12px; padding: 2px 0; }
.lg-sw { width: 11px; height: 11px; border-radius: 2px; flex: 0 0 auto; }
.lg-shape { font: 500 9px/1 var(--fm); color: var(--muted); border: 1px solid var(--line-2); border-radius: 2px; padding: 1px 4px; }
.lg-ramp { display: flex; height: 9px; border-radius: 2px; overflow: hidden; margin: 3px 0 4px; }
.lg-ramp span { flex: 1; }
.lg-scale { display: flex; justify-content: space-between; font: 400 10px var(--fm); color: var(--muted); }

.rail {
  border-right: 1px solid var(--line); background: var(--panel);
  overflow: auto; padding: 4px 0 24px;
}
.rail-block { padding: 13px 14px; border-bottom: 1px solid var(--line); }
.rail-label {
  display: block; font: 600 11.5px/1.2 var(--fs);
  letter-spacing: .01em; color: var(--ink-2); margin-bottom: 7px;
}
.rail-label + .rail-label { margin-top: 14px; }
.rail-hint { margin: 7px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.5; }

input[type=search], input[type=number], input[type=text], textarea, select, .url-input {
  font: 400 12.5px var(--fs); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-2); border-radius: var(--r); padding: 6px 8px; min-width: 0; width: 100%;
}
textarea { font-family: var(--fm); font-size: 11px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.mini-select { width: auto; font-size: 11.5px; padding: 5px 7px; }
.mini-select.wide, .wide { width: 100%; }
.dataset-select {
  font: 500 14.5px var(--fs); color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--ink-2); border-radius: var(--r);
  padding: 11px 12px; min-width: 0;
}
.dataset-select:hover { border-color: var(--ink); }
select.wide + .rail-label { margin-top: 13px; }

.solid-btn {
  appearance: none; border: 1px solid var(--ink); background: var(--ink); color: #fff;
  font: 500 12px/1 var(--fs); padding: 7px 12px; border-radius: var(--r); cursor: pointer; white-space: nowrap;
}
.solid-btn:hover { background: #000; }
.solid-btn.wide { width: 100%; margin-top: 11px; }
.ghost-btn {
  appearance: none; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink-2);
  font: 500 11.5px/1 var(--fs); padding: 6px 10px; border-radius: var(--r); cursor: pointer;
}
.ghost-btn:hover { border-color: var(--ink); color: var(--ink); }

.chip-group + .chip-group { margin-top: 12px; }
.chip-group-label { font: 600 10.5px/1 var(--fs); color: var(--muted); letter-spacing: .02em; margin-bottom: 6px; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  appearance: none; cursor: pointer; border: 1px solid var(--line-2); background: var(--bg);
  border-radius: 999px; padding: 4px 10px; font: 500 11.5px/1.3 var(--fs); color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 5px;
}
.chip .chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); flex: 0 0 auto; }
.chip .chip-dot.chip-dot--poly { border-radius: 2px; }
.chip .chip-dot.chip-dot--line { width: 9px; height: 4px; border-radius: 1px; }
.chip.is-on { border-color: var(--ink); color: var(--ink); background: var(--bg); }
.chip:hover { border-color: var(--ink); }
.chip-dot-demo { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); vertical-align: middle; }
.chip-dot-demo--poly { border-radius: 2px; }
.chip-dot-demo--line { width: 9px; height: 4px; border-radius: 1px; }

.opt-row { display: flex; flex-wrap: wrap; gap: 10px; }
.opt { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-2); cursor: pointer; }
.opt-block { display: flex; margin-top: 8px; }
.slider-row { margin-top: 11px; }
.slider-row label { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.slider-row output { font-family: var(--fm); color: var(--ink); }
input[type=range] { width: 100%; accent-color: var(--accent); }

.inspector {
  position: absolute; right: 12px; bottom: 40px; z-index: 600; width: 264px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh); padding: 12px 13px;
}
.inspector-close { position: absolute; top: 5px; right: 8px; border: 0; background: none; font-size: 17px; color: var(--muted); cursor: pointer; }
.inspector h3 { margin: 0 0 6px; font-size: 13.5px; }
.inspector dl { margin: 0; display: grid; grid-template-columns: 84px 1fr; gap: 4px 9px; font-size: 11.5px; }
.inspector dt { color: var(--muted); font-family: var(--fs); font-weight: 600; font-size: 10.5px; letter-spacing: .01em; padding-top: 1px; }
.inspector dd { margin: 0; }

.chart { flex: 1 1 auto; min-height: 0; padding: 8px 10px; overflow-y: auto; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-tall { min-height: 220px; }
.ax-label { font: 400 10.5px var(--fm); fill: var(--muted); }
.val-label { font: 500 10.5px var(--fm); fill: var(--ink-2); }
.gridline { stroke: var(--line); stroke-width: 1; }
.bar-r:hover { opacity: .78; }

.demo-panel { display: grid; grid-template-rows: 1fr 300px; min-height: 0; overflow: hidden; }
.demo-map { border-bottom: 1px solid var(--line); }
.demo-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px; overflow: auto; }
@media (min-width: 1100px) {
  .demo-panel { grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr; }
  .demo-map { border-bottom: 0; border-right: 1px solid var(--line); }
  .demo-charts { grid-template-columns: 1fr; align-content: start; overflow-y: auto; }
}
.table-wrap { overflow: auto; flex: 1 1 auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); }
th { font: 600 11px var(--fs); letter-spacing: .01em; color: var(--ink-2); position: sticky; top: 0; background: var(--bg); }
td.num { text-align: right; font-family: var(--fm); font-variant-numeric: tabular-nums; }

.prose-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 16px; font-size: 17.4px; }
.span-full { grid-column: 1 / -1; }
.span-half { grid-column: span 1; }
#tab-projections .card-head h2 { font-size: 19.2px; }
#tab-projections .card-note { font-size: 13.2px; }
.crs-table-wrap { overflow: auto; }
.crs-table { font-size: 16.2px; }
.crs-table th, .crs-table td { padding: 10px 12px; }
.crs-table thead th { font: 600 13.8px var(--fs); color: var(--ink-2); letter-spacing: .01em; }
.crs-table th[scope=row] { font-weight: 600; font-size: 16.8px; font-family: var(--fs); letter-spacing: 0; color: var(--ink); position: static; }
.crs-table th[scope=row] em { display: block; font-style: normal; font-family: var(--fm); font-size: 13.8px; color: var(--muted); margin-top: 2px; }
.crs-table td { font-size: 16.2px; color: var(--ink-2); vertical-align: top; line-height: 1.5; }
.row-mark { background: var(--accent-sf); }
.row-mark th[scope=row] { box-shadow: inset 2px 0 0 var(--accent); }
#tab-projections .card-foot { font-size: 16.2px; line-height: 1.6; padding: 12px 14px 16px; }
.conv { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; padding: 14px; }
.conv label { display: flex; flex-direction: column; gap: 5px; font: 600 14.4px var(--fs); letter-spacing: .01em; color: var(--ink-2); }
.conv-out { margin: 0; padding: 4px 14px 14px; display: grid; grid-template-columns: 132px 1fr; gap: 7px 10px; font-size: 16.2px; }
.conv-out dt { font: 600 14.4px var(--fs); letter-spacing: .01em; color: var(--ink-2); padding-top: 2px; }
.conv-out dd { margin: 0; font-family: var(--fm); font-variant-numeric: tabular-nums; font-size: 16.2px; }
#tab-projections .ax-label { font-size: 12.6px; }
#tab-projections .val-label { font-size: 12.6px; }
#tab-projections input[type=number] { font-size: 15px; }
#tab-projections .solid-btn { font-size: 14.4px; }

.empty-banner {
  margin: 10px 0; padding: 10px 12px; font-size: 11.5px; color: var(--ink-2);
  background: var(--panel-2); border: 1px dashed var(--line-2); border-radius: var(--r); line-height: 1.5;
}
.empty-banner code { background: rgba(16,22,28,.06); }
.chip-flag { color: var(--accent); font-weight: 700; margin-left: 1px; }

.fab {
  position: fixed; bottom: 20px; z-index: 950; height: 46px; border: 0; border-radius: 999px;
  padding: 0 18px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  font: 600 13.5px/1 var(--fs); white-space: nowrap;
  box-shadow: 0 3px 10px rgba(16,22,28,.18), 0 10px 30px rgba(16,22,28,.14);
  transition: transform .18s cubic-bezier(.22,.8,.3,1), box-shadow .18s ease;
}
.fab:hover { transform: translateY(-2px); }
.fab:active { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .fab { transition: none; } .fab:hover { transform: none; } }

.fab-add {
  left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff;
  box-shadow: 0 3px 10px rgba(200,16,46,.28), 0 10px 30px rgba(16,22,28,.14);
}
.fab-add:hover { transform: translateX(-50%) translateY(-2px); box-shadow: 0 5px 16px rgba(200,16,46,.34), 0 14px 38px rgba(16,22,28,.18); }
.fab-add:active { transform: translateX(-50%) translateY(0); }

.fab-explore {
  right: 20px; background: var(--ink); color: #fff;
}
@media (max-width: 560px) {
  .fab-explore { right: 50%; transform: translateX(50%); bottom: 74px; }
  .fab-explore:hover { transform: translateX(50%) translateY(-2px); }
  .fab-explore:active { transform: translateX(50%) translateY(0); }
}

.sheet { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: end center; }
.sheet[hidden] { display: none; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(16,22,28,.28); animation: fade .18s ease both; }
@keyframes fade { from { opacity: 0; } }
.sheet-panel {
  position: relative; z-index: 2; width: min(720px, calc(100vw - 24px));
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0;
  box-shadow: 0 -8px 40px rgba(16,22,28,.16); padding: 16px 18px 22px;
  margin-bottom: 0; animation: up .22s cubic-bezier(.22,.8,.3,1) both;
}
.sheet-narrow { width: min(520px, calc(100vw - 24px)); }
@keyframes up { from { transform: translateY(14px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet-panel, .sheet-scrim { animation: none; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { margin: 0; font-size: 15px; }
.sheet-sub { margin: 5px 0 14px; font-size: 12px; color: var(--muted); }
.sheet-note { margin: 9px 0 0; font-size: 11px; color: var(--muted); }

.sheet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 9px; }
.wcard {
  appearance: none; text-align: left; cursor: pointer; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--r); padding: 11px 12px;
  display: flex; flex-direction: column; gap: 5px; transition: border-color .14s, background .14s;
}
.wcard:hover { border-color: var(--ink); background: var(--panel); }
.wcard .wcard-ico { color: var(--accent); }
.wcard b { font-size: 12px; font-weight: 600; }
.wcard span { font-size: 11px; color: var(--muted); line-height: 1.4; }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 1100;
  background: var(--ink); color: #fff; font-size: 12px; padding: 9px 14px;
  border-radius: var(--r); box-shadow: var(--sh); max-width: 82vw;
}
.toast[hidden] { display: none; }

.attrib {
  flex: 0 0 auto; border-top: 1px solid var(--line); background: var(--panel);
  padding: 6px 14px; display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 10.5px; color: var(--muted);
}
.attrib a { color: var(--ink-2); }

@media (min-width: 1101px) {
  .card-map { grid-column: 1 / 9 !important; grid-row: 1 / 5 !important; }
  #kpiCard1 { grid-column: 9 / 11 !important; grid-row: 1 !important; }
  #kpiCard2 { grid-column: 11 / 13 !important; grid-row: 1 !important; }
  #cardAge  { grid-column: 9 / 13 !important; grid-row: 2 / 4 !important; }
  #cardOcc  { grid-column: 9 / 13 !important; grid-row: 4 !important; }
}
@media (min-width: 1101px) and (max-width: 1200px) {
  #cardAge .chart, #cardOcc .chart { padding: 5px 5px; }
}
@media (max-width: 1100px) {
  .grid > .card { grid-column: span 6 !important; }
  .grid > .card-map { grid-column: 1 / -1 !important; }
  .prose-grid { grid-template-columns: 1fr; }
  .demo-charts { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  :root { --bar: auto; }
  .appbar { flex-wrap: wrap; padding: 8px 12px; gap: 10px; height: auto; }
  .appbar-right { width: 100%; }
  .view-split.is-active {
    display: flex; flex-direction: column; overflow: visible;
  }
  .view-split.is-active > .rail {
    flex: 0 0 auto;
  }
  .view-split.is-active > *:not(.rail) {
    flex: 1 1 auto; min-height: 0;
  }
  .rail { border-right: 0; border-bottom: 1px solid var(--line); max-height: 38vh; }
  .view-split.is-active > *:not(.rail) { min-height: 260px; }
  .map-wrap-full { min-height: 60vh; }
  .grid { grid-auto-rows: 168px; }
  .grid > .card { grid-column: 1 / -1 !important; }
  .demo-panel { grid-template-rows: 56vh auto; }
  .conv { grid-template-columns: 1fr; }
}
