@font-face { font-family:"Josefin Sans"; src:url("/vendor/josefin-sans/JosefinSans-variable.woff2") format("woff2"); font-style:normal; font-weight:100 700; font-display:swap; }
/* HCMCx 3D Atlas -- dark editorial style.
   Same house rules as the dashboard:
   - ZERO border-radius, ZERO box-shadow, ZERO gradients
   - hairline borders, signal palette only
   - sharp edges */

:root {
  --bg: #101e28;
  --bg-raised: #192b37;
  --bg-strong: #233a48;
  --line: #99adb9;
  --line-bright: #cedbe2;
  --ink: #f1f7fa;
  --dim: #c0d0db;
  --accent: #72d3d5;
  --accent-ink: #101e28;
  --accent-hover: #f1f7fa;
  --lacquer: #b8543b;
  --cool: var(--accent);
  --amber: var(--accent);
  --warn: #f85149;
  --ok: #3fb950;
  --hero-orange: var(--accent);
  --water: #1d4ed8;
  --metro: #dc2626;
  --bus: #facc15;
  --sensor: #22c55e;
  --poi: #f1f7fa;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-sans: "Josefin Sans", sans-serif;
}

:root[data-theme="light"] {
  --bg: #f8fafb;
  --bg-raised: #ffffff;
  --bg-strong: #e9eff3;
  --line: #6f7f8b;
  --line-bright: #304a59;
  --ink: #142c3b;
  --dim: #465d6b;
  --accent: #00646e;
  --accent-ink: #ffffff;
  --accent-hover: #004c55;
}
:root[data-theme="contrast"] {
  --bg: #071017;
  --bg-raised: #071017;
  --bg-strong: #152633;
  --line: #f1f7fa;
  --line-bright: #ffffff;
  --ink: #ffffff;
  --dim: #f1f7fa;
  --accent: #ffbf8d;
  --accent-ink: #071017;
  --accent-hover: #ffffff;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* Force the design law from the dashboard. */
.atlas-page *,
.atlas-page *::before,
.atlas-page *::after {
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* ── Page shell ──────────────────────────────────────────────────────────── */
.atlas-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.atlas-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  flex-wrap: wrap;
}
.atlas-header-meta { flex: 1 1 auto; min-width: 280px; }
.atlas-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cool);
  margin: 0 0 4px;
}
.atlas-eyebrow--mt { margin-top: 14px; }
.atlas-title {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.atlas-title-phone { display: none; }
.atlas-kicker {
  font-size: 13px;
  color: var(--dim);
  margin: 0;
  max-width: 60ch;
}
.atlas-header-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.atlas-header-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
}
.atlas-header-nav a:hover { border-color: var(--line-bright); color: var(--cool); }
.atlas-nav-sibling { color: var(--amber) !important; border-color: var(--amber) !important; }

/* ── Map area ─────────────────────────────────────────────────────────────── */
.atlas-map-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.atlas-map {
  position: absolute;
  inset: 0;
  background: var(--bg);
}

.atlas-map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 50;
}
.atlas-map-loading-inner {
  text-align: center;
  padding: 32px;
  border: 1px solid var(--line-bright);
  background: var(--bg-raised);
  max-width: 360px;
}
.atlas-map-loading-glyph {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 22px;
  color: var(--cool);
  padding: 12px 18px;
  border: 1px solid var(--cool);
  margin-bottom: 12px;
}
.atlas-map-loading-line {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}
.atlas-map-loading-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--dim);
  margin: 0;
}

/* ── Layer rail (top-left inside map) ─────────────────────────────────────── */
.atlas-layers {
  position: absolute;
  top: calc(var(--atlas-watch-height, 88px) + 8px);
  left: 12px;
  z-index: 5;
  border: 1px solid var(--line-bright);
  background: var(--bg);

  padding: 0 12px;
  width: 188px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.atlas-layers details[open] { padding-bottom: 10px; }
/* Collapsed by default: the map is the first impression, panels are one tap away. */
.atlas-panel-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
}
.atlas-panel-summary::-webkit-details-marker { display: none; }
.atlas-panel-summary::after { content: "+"; margin-left: auto; color: var(--dim); font-family: var(--font-mono); }
details[open] > .atlas-panel-summary::after { content: "-"; }
.atlas-toggle, .atlas-basemap-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 4px 0 0;
  padding: 6px 8px;
  background: var(--bg-raised);
  color: var(--ink);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
}
.atlas-toggle:hover, .atlas-basemap-btn:hover { border-color: var(--line-bright); }
.atlas-toggle--on { color: var(--ink); background: var(--bg-strong); }
.atlas-toggle:not(.atlas-toggle--on) { color: var(--dim); text-decoration: line-through; }
.atlas-toggle-swatch {
  display: inline-block;
  width: 12px; height: 12px;
  border: 1px solid var(--line-bright);
}
.atlas-toggle-swatch--buildings { background: #fbe6a0; }
.atlas-toggle-swatch--water { background: var(--water); }
.atlas-toggle-swatch--metro { background: var(--metro); }
.atlas-toggle-swatch--station { background: #fff; border-color: var(--metro); border-width: 2px; }
.atlas-toggle-swatch--bus { background: var(--bus); }
.atlas-toggle-swatch--poi { background: var(--poi); }
.atlas-toggle-swatch--sensor { background: var(--sensor); }
.atlas-toggle-swatch--flood { background: transparent; border: 2px dashed #ef4444; }
.atlas-toggle-swatch--aqi { background: #9ca3af; border: 2px solid #f59e0b; }

.atlas-basemap-btn--active {
  color: var(--accent-ink);
  background: var(--cool);
  border-color: var(--cool);
}

/* ── Inspect card (right inside map) ──────────────────────────────────────── */
.atlas-inspect {
  position: absolute;
  top: calc(var(--atlas-watch-height, 88px) + 8px);
  right: 12px;
  z-index: 5;
  width: 280px;
  border: 1px solid var(--line-bright);
  background: var(--bg);

  padding: 10px 12px;
}
.atlas-inspect[hidden] { display: none; }
.atlas-data-heading {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.atlas-inspect-blurb {
  font-size: 11px;
  color: var(--dim);
  margin: 0 0 10px;
}
.atlas-inspect-card[hidden] { display: none; }
.atlas-inspect-coords {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cool);
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.atlas-inspect-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
  font-size: 11px;
  border-bottom: 1px dashed var(--line);
}
.atlas-inspect-row:last-child { border-bottom: none; }
.atlas-inspect-row span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.atlas-inspect-row strong { color: var(--ink); font-weight: 700; }

/* ── Quick-jump area grid (bottom inside map) ────────────────────────────── */
.atlas-quick {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--line-bright);
  background: var(--bg);

  padding: 0 14px;
  max-height: 240px;
  overflow-y: auto;
}
.atlas-quick:has(details[open]) { right: 12px; }
.atlas-quick-details { flex: 1; }
.atlas-quick-details[open] { padding-bottom: 10px; }
.atlas-quick .atlas-flyover-btn { margin: 8px 0; min-height: 28px; }
.atlas-quick-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.atlas-quick-heading {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.atlas-flyover-btn {
  margin-left: auto;
  padding: 5px 10px;
  background: var(--hero-orange);
  color: var(--accent-ink);
  border: 1px solid var(--hero-orange);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}
.atlas-flyover-btn:hover { background: var(--accent-hover); }
.atlas-area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 6px;
}
.atlas-area-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
}
.atlas-area-tile:hover { border-color: var(--line-bright); background: var(--bg-strong); }
.atlas-area-tile--active { border-color: var(--cool); background: var(--bg-strong); }
.atlas-area-tile-cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}
.atlas-area-tile-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.atlas-area-tile-namevi {
  font-size: 11px;
  color: var(--dim);
  font-style: italic;
}

/* ── Toast (transient feedback) ───────────────────────────────────────────── */
.atlas-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  padding: 8px 14px;
  border: 1px solid var(--cool);
  background: var(--bg-strong);
  color: var(--cool);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease-out;
}
.atlas-toast--visible { opacity: 1; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.atlas-footer {
  padding: 10px 24px 14px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.atlas-footer p {
  margin: 0 0 4px;
  font-size: 11px;
  color: var(--dim);
  max-width: 65ch;
}
.atlas-footer code {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 4px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
}
.atlas-footer-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}
.atlas-footer-meta span { color: var(--cool); }

/* ── MapLibre controls (override) ─────────────────────────────────────────────────────── */
.maplibregl-ctrl-attrib {
  background: var(--bg) !important;
  color: var(--dim) !important;
  font-size: 10px !important;
}
.maplibregl-ctrl-attrib a { color: var(--cool) !important; }
.maplibregl-ctrl-group {
  background: var(--bg-raised) !important;
  border: 1px solid var(--line-bright) !important;
}
.maplibregl-ctrl-group button {
  background: var(--bg-raised) !important;
  border-bottom-color: var(--line) !important;
}
.maplibregl-ctrl-group button:hover { background: var(--bg-strong) !important; }
.maplibregl-ctrl-scale { background: var(--bg) !important; color: var(--cool) !important; }

/* ── Mobile (≤ 600px) ────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .atlas-title-desk { display: none; }
  .atlas-title-phone { display: inline; }
  .atlas-header { padding: 10px 14px 8px; }
  .atlas-kicker { display: none; } /* the footer carries the same facts; the map gets the screen */
  .atlas-layers { width: 160px; }
  .atlas-inspect { width: calc(100% - 24px); top: auto; bottom: 72px; }
  .atlas-quick { max-height: 50vh; right: 12px; }
  .atlas-area-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Scrollbar ─────────────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-bright); }
/* Controls and the text equivalent remain usable without the map canvas. */
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.atlas-header-nav a, .atlas-toggle, .atlas-basemap-btn,
.atlas-area-tile, .atlas-quick .atlas-flyover-btn, .atlas-inspect-close { min-height: 44px; }
.atlas-header-nav { gap: 8px; }
.atlas-layers { width: 210px; max-height: calc(100% - 92px); overflow-y: auto; }
.atlas-inspect { max-height: calc(100% - 100px); overflow-y: auto; }
.atlas-inspect-row { gap: 10px; }
.atlas-inspect-row strong { text-align: right; overflow-wrap: anywhere; }
.atlas-inspect-close { float: right; color: var(--ink); background: var(--bg-raised); border: 1px solid var(--line-bright); cursor: pointer; }
.atlas-maturity { color: var(--amber); font-size: 11px; margin: 6px 0 0; }
.atlas-data { padding: 18px 24px; border-top: 2px solid var(--line-bright); }
.atlas-data h2 { font-size: 22px; margin: 0 0 8px; }
.atlas-data p { max-width: 65ch; }
.atlas-data details { border-top: 1px solid var(--line-bright); }
.atlas-data summary { min-height: 44px; padding: 12px 0; cursor: pointer; font-weight: 600; }
.atlas-data a, .atlas-footer a { color: var(--amber); }
.atlas-table-wrap { overflow-x: auto; }
.atlas-data table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.atlas-data caption { text-align: left; padding: 8px 0; color: var(--dim); }
.atlas-data th, .atlas-data td { padding: 10px 8px; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.atlas-data th { font-size: 11px; color: var(--dim); }
.atlas-data small { display: block; font-size: 11px; color: var(--dim); }
/* Reference features & map limits are prose records, not data rows. Without a
   measure they ran to 125-138ch on one line at 1440. */
.atlas-reference-list { padding-left: 20px; }
.atlas-reference-list li { margin-bottom: 8px; max-width: 65ch; }
button:active { transform: scale(0.97); }
@media (max-width: 600px) {
  .atlas-header-meta { min-width: 0; }
  .atlas-header { gap: 8px; }
  .atlas-header-nav { gap: 4px; }
  .atlas-header-nav a { padding: 12px 7px; letter-spacing: 0; }
  .atlas-layers { width: 198px; }
  .atlas-quick { gap: 8px; padding: 0 8px; }
  .atlas-area-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atlas-data { padding: 16px 14px; }
  .atlas-data th, .atlas-data td { padding: 8px 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; }
  button:active { transform: none; }
}

.maplibregl-ctrl-group button { width: 44px !important; height: 44px !important; }
.atlas-quick { bottom: 30px; }

/* One Wada chord, three reading conditions. Geographic signals keep their meaning. */
.atlas-theme-control { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ink); }
.atlas-theme-control select { min-height: 44px; max-width: 100%; border: 1px solid var(--line); background: var(--bg-raised); color: var(--ink); font: inherit; padding: 8px; }
.atlas-flyover-btn { min-height: 44px; }
.atlas-quick .atlas-panel-summary { gap: 6px; }
.atlas-quick .atlas-eyebrow { letter-spacing: 0.08em; white-space: nowrap; }
.atlas-quick-heading { font-size: 11px; white-space: nowrap; }
/* The attribution toggle is a tertiary control, and MapLibre carries it in a
   24px bar. A 44px box hung 20px below that bar, and 10px of it fell outside
   the map, where the viewport clipped the button in half. The visible control
   now matches the 32px zoom buttons beside it, and touch still gets its 44px
   target from a hit area that grows upward, away from the map edge. */
.maplibregl-ctrl-attrib-button { min-width: 32px; min-height: 32px; }
.maplibregl-ctrl-attrib-button::after {
  content: "";
  position: absolute;
  top: -12px; left: -12px; right: 0; bottom: 0;
}
/* Reserve the button's own width so the credit line cannot run under it. */
.maplibregl-ctrl-attrib.maplibregl-compact-show { padding-right: 34px; }
.maplibregl-ctrl-icon, .maplibregl-ctrl-attrib-button { filter: invert(1); }
:root[data-theme="light"] .maplibregl-ctrl-icon, :root[data-theme="light"] .maplibregl-ctrl-attrib-button { filter: none; }
.maplibregl-ctrl-scale { border-color: var(--line-bright) !important; }
:root[data-theme="contrast"] .atlas-toggle--on { border-width: 2px; }
:root[data-theme="contrast"] :focus-visible { outline-width: 3px; }
@media (forced-colors: active) {
  .atlas-toggle-swatch { forced-color-adjust: none; }
}

/* Operational source controls use the existing Palette roles. */
.atlas-environment-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 16px 0; }
.atlas-environment-controls label { display: flex; flex-direction: column; gap: 6px; max-width: 100%; }
.atlas-environment-controls select, .atlas-environment-controls button, .atlas-environment > button { min-height: 44px; max-width: 100%; padding: 8px 12px; border: 1px solid var(--line); color: var(--ink); background: var(--bg-raised); font: inherit; border-radius: 0; }
.atlas-environment-controls input[type="range"] { min-height: 44px; accent-color: var(--accent); }
.atlas-environment-controls input[type="checkbox"] { width: 24px; height: 24px; accent-color: var(--accent); }
#atlas-radar-coverage-control { flex-direction: row; align-items: center; min-height: 44px; }
.atlas-environment [hidden] { display: none !important; }
.atlas-environment-evidence { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 6px 16px; }
.atlas-environment-evidence dt { color: var(--dim); }
.atlas-environment-evidence dd { margin: 0; overflow-wrap: anywhere; }
.atlas-environment-legend { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; }
.atlas-environment-legend li { display: flex; align-items: center; gap: 6px; }
.atlas-environment-legend i { width: 16px; height: 16px; border: 1px solid var(--line); }
@media (max-width: 600px) { .atlas-environment-controls label, .atlas-environment-controls button { width: 100%; } .atlas-environment-controls select { width: 100%; } }
.atlas-observation-hud { position: absolute; top: calc(var(--atlas-watch-height, 88px) + 8px); right: 14px; z-index: 5; max-width: min(300px, 45%); padding: 10px; border: 1px solid var(--line-bright); background: var(--bg); color: var(--ink); font-size: 11px; }
.atlas-observation-hud span, .atlas-observation-hud strong { display: block; margin-bottom: 5px; overflow-wrap: anywhere; }
.atlas-observation-hud a { color: var(--accent); display: inline-flex; align-items: center; min-height: 44px; }
.atlas-observation-hud[hidden] { display: none; }
@media (max-width: 600px) { .atlas-observation-hud { top: calc(var(--atlas-watch-height, 88px) + 8px); right: 10px; max-width: 53%; } }
.atlas-watch { position: absolute; top: 0; left: 0; right: 0; z-index: 6; background: var(--bg); color: var(--ink); border-bottom: 2px solid var(--line-bright); }
.atlas-watch-grid { display: flex; flex-wrap: wrap; gap: 0; }
.atlas-watch button { min-height: 44px; padding: 8px 10px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; color: inherit; font: inherit; text-align: left; }
.atlas-watch button:active { transform: scale(0.97); }
.atlas-watch button.is-watch { border-bottom: 2px solid var(--lacquer); }
.atlas-watch small, .atlas-watch strong { display: block; overflow-wrap: anywhere; }
.atlas-watch small { color: var(--dim); font-size: 11px; }
.atlas-watch strong { font-size: 13px; font-weight: 700; }
.atlas-watch-action { margin: 0; padding: 8px 12px 10px; font-size: 13px; line-height: 1.35; max-width: 75ch; }
.atlas-watch-action[hidden] { display: none; }
@media (min-width: 1100px) { .atlas-watch-grid button { flex: 0 1 auto; min-width: 160px; max-width: 260px; } }
@media (prefers-reduced-motion: reduce) { .atlas-watch button:active { transform: none; } }
.atlas-environment h3 { font-size: 13px; }
.atlas-rain-location { min-height: 44px; padding: 6px; border: 1px solid var(--line); background: var(--bg-raised); color: var(--accent); font: inherit; text-align: left; }

/* Two-row environmental toolbar; full evidence remains expandable. */
.atlas-environment { position: relative; padding: 10px 24px; }
.atlas-environment-topline { display: flex; align-items: baseline; gap: 16px; padding-right: 240px; }
.atlas-environment-topline h2 { flex-shrink: 0; font-size: 15px; margin: 0; }
.atlas-environment-topline p { margin: 0; font-size: 11px; color: var(--dim); }
.atlas-environment-controls { margin: 6px 0 0; gap: 8px 16px; align-items: center; }
.atlas-environment-controls label { flex-direction: row; align-items: center; gap: 8px; font-size: 11px; }
.atlas-environment-controls select, .atlas-environment-controls button { padding: 6px 8px; font-size: 11px; }
.atlas-environment-controls input[type="range"] { width: 100px; }
.atlas-environment-controls #atlas-environment-overview { margin-left: auto; }
.atlas-environment .atlas-environment-details { border-top: 0; }
.atlas-environment-details > summary { position: absolute; top: 3px; right: 24px; min-height: 44px; padding: 12px 0; font-size: 11px; }
.atlas-environment-detail-body { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; }
.atlas-environment-detail-body button { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); color: var(--ink); background: var(--bg-raised); font: inherit; }
@media (max-width: 700px) {
  .atlas-environment { padding: 10px 14px; }
  .atlas-environment-topline { display: block; padding-right: 0; }
  .atlas-environment-topline p { margin-top: 4px; }
  .atlas-environment-controls label, .atlas-environment-controls button { width: auto; }
  .atlas-environment-controls select { width: auto; max-width: 100%; }
  .atlas-environment-controls label { flex-wrap: wrap; }
  .atlas-environment-controls #atlas-environment-overview { margin-left: 0; }
  .atlas-environment-details > summary { position: static; padding: 12px 0 0; }
}

/* Give the city the remaining viewport, independent of geographic zoom. */
.atlas-header { gap: 12px; align-items: center; padding: 10px 16px; }
.atlas-header-meta { flex: 1 1 260px; min-width: 0; }
.atlas-header-nav { gap: 6px; }
.atlas-title { font-size: 18px; }
.atlas-maturity { margin: 4px 0 0; }
.atlas-about { position: relative; }
.atlas-about summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-size: 11px; padding: 0 8px; border: 1px solid var(--line); }
.atlas-about-body { position: absolute; z-index: 30; top: 100%; left: 0; width: min(60ch, calc(100vw - 40px)); padding: 14px; border: 1px solid var(--line); background: var(--bg-raised); }
.atlas-map-wrap { flex: none; height: max(280px, calc(100svh - var(--atlas-header-height, 100px) - var(--atlas-toolbar-height, 97px))); min-height: 280px; }
.atlas-environment-detail-body { position: absolute; z-index: 25; bottom: 100%; left: 0; right: 0; max-height: 55svh; overflow-y: auto; background: var(--bg); padding: 16px 24px; margin: 0; border: 1px solid var(--line); }
@media (min-width: 1000px) { .atlas-header { flex-wrap: nowrap; } }
@media (max-width: 700px) { .atlas-about-body { position: fixed; top: 100px; left: 14px; } .atlas-environment-detail-body { padding: 14px; } }
/* Keep the title readable and the navigation on its own compact row. */
.atlas-header { display: grid; grid-template-columns: 1fr; gap: 4px; }
.atlas-header-meta { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; column-gap: 16px; }
.atlas-header-meta > .atlas-eyebrow { grid-column: 1 / -1; font-size: 10px; margin: 0; }
.atlas-header-meta .atlas-title { margin: 0; }
.atlas-header-meta .atlas-maturity { font-size: 11px; max-width: 65ch; margin: 0; }
.atlas-header-nav { width: 100%; }
.atlas-theme-control:first-of-type { margin-left: auto; }
@media (max-width: 700px) { .atlas-header-meta { grid-template-columns: 1fr; gap: 3px; } .atlas-theme-control:first-of-type { margin-left: 0; } }
@media (max-width: 839px) {
  .atlas-header-nav { flex-wrap: nowrap; overflow-x: auto; }
  .atlas-map-wrap { height: max(420px, 62svh); min-height: 420px; }
  .atlas-watch-action { max-height: 4.2em; overflow: hidden; }
}

/* Responsive operator controls: primary choices remain visible; tools expand. */
.atlas-skip { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 12px; background: var(--bg); color: var(--ink); transform: translateY(-150%); border: 2px solid var(--accent); }
.atlas-skip:focus { transform: none; }
.atlas-header-nav { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(180px, 1.5fr) minmax(130px, 1fr) auto; gap: 8px; overflow: visible; }
.atlas-header-nav > .atlas-theme-control { margin: 0; min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 8px; }
.atlas-header-nav select { width: 100%; min-width: 0; font-size: 13px; }
.atlas-menu { position: relative; }
.atlas-menu > summary, .atlas-extra-controls > summary, .atlas-watch-shell > summary, .atlas-watch-notices > summary { cursor: pointer; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); font-size: 13px; }
.atlas-menu-body { position: absolute; top: 100%; right: 0; z-index: 40; width: min(420px, calc(100vw - 32px)); max-height: 65svh; overflow-y: auto; padding: 12px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; border: 1px solid var(--line-bright); background: var(--bg); }
.atlas-menu-body > .atlas-theme-control, .atlas-menu-body > .atlas-about { grid-column: 1 / -1; }
.atlas-menu-body a { min-height: 44px; display: flex; align-items: center; padding: 8px; }
.atlas-about-body { position: static; width: auto; padding: 10px 0; border: 0; }
.atlas-watch-shell > summary { display: none; }
.atlas-watch-notices { position: relative; }
.atlas-watch-notices > summary { border: 0; font-size: 11px; }
.atlas-watch-notice-body { position: absolute; z-index: 30; top: 100%; left: 0; right: 0; max-height: 50svh; overflow: auto; padding: 12px; background: var(--bg); border: 1px solid var(--line-bright); }
.atlas-watch-action { max-height: none; overflow: visible; max-width: none; padding: 0; }
.atlas-extra-controls { position: relative; }
.atlas-extra-controls-body { position: absolute; z-index: 30; bottom: 100%; left: 0; min-width: 280px; max-width: calc(100vw - 32px); max-height: 55svh; overflow: auto; display: grid; gap: 12px; padding: 14px; background: var(--bg); border: 1px solid var(--line-bright); }
.atlas-extra-controls-body label { display: grid; gap: 4px; }
.atlas-extra-controls-body select { width: 100%; }
.atlas-extra-controls-body input[type="range"] { width: 100%; }
.atlas-environment-controls { gap: 8px; }
.atlas-environment-topline { min-width: 0; }
.atlas-environment-topline p { overflow-wrap: anywhere; }
.atlas-watch strong { font-size: 13px; }
.atlas-map-wrap { min-height: 340px; height: max(340px, calc(100svh - var(--atlas-header-height,100px) - var(--atlas-toolbar-height,97px))); }
@media (max-width: 900px) {
  .atlas-header-meta { grid-template-columns: 1fr; gap: 3px; }
  .atlas-header-nav > .atlas-theme-control { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
  .atlas-menu { align-self: end; }
  .atlas-environment-topline { display: block; padding-right: 0; }
  .atlas-environment-details > summary { position: static; padding: 10px 0; }
}
@media (max-width: 700px) {
  .atlas-header { padding: 10px 12px; }
  .atlas-header-nav { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .atlas-menu > summary { text-align: center; }
  .atlas-watch-shell > summary { display: list-item; }
  .atlas-watch-shell[open] > .atlas-watch-grid { max-height: 40svh; overflow: auto; }
  .atlas-watch-shell[open] > .atlas-watch-notices { background: var(--bg); }
  .atlas-watch strong { font-size: 11px; }
  .atlas-watch-notice-body { position: static; max-height: 40svh; }
  .atlas-map-wrap { height: max(380px, 55svh); min-height: 380px; }
  .atlas-environment-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .atlas-environment-controls > label { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2fr); align-items: center; }
  .atlas-environment-controls > label select { width: 100%; min-width: 0; }
  .atlas-environment-controls #atlas-environment-overview { margin: 0; }
  .atlas-environment-controls #atlas-environment-refresh { grid-column: 1 / -1; }
  .atlas-extra-controls-body { left: 0; min-width: 0; width: min(300px,calc(100vw - 32px)); }
  .atlas-environment-detail-body { position: static; max-height: none; overflow: visible; margin-top: 8px; }
  .atlas-observation-hud { max-width: 60%; font-size: 11px; padding: 8px; }
  .atlas-layers { max-height: calc(100% - var(--atlas-watch-height,44px) - 80px); }
  .atlas-inspect { bottom: 64px; max-height: calc(100% - var(--atlas-watch-height,44px) - 80px); }
  .atlas-environment-evidence { grid-template-columns: minmax(0,1fr); gap: 4px; }
  .atlas-environment-evidence dd { margin-bottom: 10px; }
}
@media (max-height: 520px) and (min-width: 701px) { .atlas-map-wrap { min-height: 320px; } .atlas-menu-body { max-height: 70svh; } }
button:disabled { opacity: 0.55; cursor: not-allowed; }

.atlas-hud-details > summary { display: none; }
@media (max-width: 700px) {
  .atlas-layers { width: 44%; }
  .atlas-layers:has(details[open]) { width: calc(100% - 24px); z-index: 8; }
  .atlas-observation-hud { width: 44%; max-width: 44%; padding: 0; }
  .atlas-hud-details > summary { display: list-item; cursor: pointer; min-height: 44px; padding: 12px; }
  .atlas-hud-details > div { padding: 8px; max-height: 40svh; overflow-y: auto; }
}
@media (max-width: 700px) { .atlas-watch { max-height: calc(100% - 88px); overflow-y: auto; } }

/* The host already has a status rail: keep its embedded map strip compact. */
.atlas-embedded .atlas-watch-shell > summary { display: list-item; }
.atlas-embedded .atlas-header { padding: 6px 12px; }
.atlas-embedded .atlas-header-meta > .atlas-eyebrow { display: none; }
.atlas-embedded .atlas-header-meta .atlas-title { font-size: 13px; }
.atlas-embedded .atlas-header-meta .atlas-maturity { font-size: 10px; }
.atlas-embedded .atlas-watch { max-height: calc(100% - 88px); overflow-y: auto; }
@media (min-width: 701px) {
  .atlas-embedded .atlas-environment { padding: 6px 14px; }
  .atlas-embedded .atlas-environment-topline { display: flex; padding-right: 230px; gap: 10px; }
  .atlas-embedded .atlas-environment-topline h2 { font-size: 13px; }
  .atlas-embedded .atlas-environment-details > summary { position: absolute; right: 14px; top: 0; padding: 10px 0; }
}

/* A geographic story strip, rather than another independent KPI dashboard. */
.atlas-lens-bar {
  display:flex; align-items:stretch; min-width:0;
  border-bottom:1px solid var(--line-bright); background:var(--bg);
}
.atlas-lens-bar .atlas-lenses { border-bottom:0; flex:0 0 auto; min-width:0; }
/* The rail is navigation; the story is supporting prose. When space is short the
   prose must yield, not the navigation. The rail used to carry flex:1 1 auto
   with min-width:0 while the story kept its default min-width:auto, so the
   story's nowrap text refused to shrink and the rail absorbed every pixel of
   the shortfall — crushing 620px of navigation to 204px and wrapping it into
   five rows (181px of chrome) at the 1024px width. The story may now shrink and
   ellipsize, which it was always styled to do. */
/* One bar: the lens rail carries the current lens's meaning as a trailing
   segment instead of sitting in a third full-width row. The description is
   the only thing that drops to its own line, and only on phone. */
.atlas-lenses { display:flex; gap:0; overflow-x:auto; border-block:0; background:transparent; align-items:stretch; }
.atlas-lenses button { flex:0 0 auto; min-height:44px; padding:10px 18px; font-size: 13px; border:0; border-right:1px solid var(--line); cursor:pointer; background:transparent; color:var(--ink); }
.atlas-lenses button[aria-pressed="true"] { background:var(--ink); color:var(--bg); }
.atlas-lens-story {
  display:flex; gap:12px; align-items:center; justify-content:flex-end;
  padding:0 16px; background:var(--bg); font-size:13px;
  border-bottom:1px solid var(--line); min-height:44px;
  margin-left:auto; min-width:0; overflow:hidden;
}
/* The caption says what the selected lens means, and its text changes with
   every lens, so the width it needs changes with the lens too. Beside a
   content-sized rail it never fitted whole: at 1440 it kept 89% of the title
   and of the description, at 1024 only 32%, and two ellipsized fragments in
   the rail's own type read as two more rail items. The bar now wraps, and the
   caption stacks inside whatever room it has, so the prose is either shown
   whole or is not shown at all. */
@media (min-width: 701px) {
  .atlas-lens-bar { flex-wrap: wrap; }
  .atlas-lens-story { flex: 1 1 auto; justify-content: flex-start; }
  .atlas-lens-story-copy { flex-wrap: wrap; }
}
.atlas-lens-story-copy { display:flex; gap:10px; align-items:baseline; min-width:0; }
.atlas-lens-story strong { font-size: 13px; white-space:nowrap; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.atlas-lens-story #atlas-lens-description {
  color:var(--dim); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:normal;
  /* A caption is prose too. Unbounded it held 118 characters on one line
     (87ch); the measure caps it and the bar takes the extra row. */
  max-width:65ch;
}
.atlas-lens-story details { position:relative; flex:0 0 auto; }
.atlas-lens-story summary { min-height:44px; display:flex; align-items:center; cursor:pointer; }
#atlas-lens-body { position:absolute; right:0; top:100%; width:min(520px,calc(100vw - 32px)); max-height:55svh; overflow:auto; z-index:45; background:var(--bg); color:var(--ink); border:1px solid var(--line-bright); padding:16px; }
#atlas-lens-body button { display:block; width:100%; text-align:left; min-height:44px; margin-bottom:4px; }
.lens-hours { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; font-size: 11px; }
.atlas-showcase .atlas-map-wrap { height:calc(100svh - var(--atlas-header-height,110px) - 120px); min-height:360px; }
.atlas-showcase .atlas-environment { margin-top:0; }
@media(max-width:700px) {
 .atlas-lenses button { padding:10px 14px; }
 /* Phone keeps two bars, not three: the rail scrolls, the story sits under it
    but as a compact strip rather than a paragraph. */
 .atlas-lens-bar { flex-direction:column; }
 .atlas-lens-story { justify-content:flex-start; gap:8px; padding:6px 12px; border-top:1px solid var(--line); min-height:0; margin-left:0; }
 .atlas-lens-story-copy { flex-direction:column; gap:0; align-items:flex-start; width:100%; }
 .atlas-lens-story #atlas-lens-description { white-space:normal; font-size: 11px; line-height:1.35; max-width:none; }
 .atlas-lens-story strong { font-size: 13px; }
 .atlas-showcase .atlas-map-wrap { height:calc(100svh - var(--atlas-header-height,180px) - 170px); min-height:320px; }
}
@media(max-width:700px) {
 .atlas-showcase .atlas-header { padding:8px 12px; }
 .atlas-showcase .atlas-header-meta > .atlas-eyebrow { display:none; }
 .atlas-showcase .atlas-header-meta .atlas-maturity { font-size:10px; line-height:1.2; }
 .atlas-showcase .atlas-header-nav { gap:4px 8px; }
 .atlas-showcase .atlas-header-nav > .atlas-theme-control { font-size:0; gap:0; }
 .atlas-showcase .atlas-header-nav select { font-size: 11px; height:44px; }
 .atlas-showcase .atlas-lens-story { padding:6px 12px; }
 .atlas-showcase .atlas-lens-story > span { display:none; }
 .atlas-showcase .atlas-lens-story:has(details[open]) > span { display:block; }
 .atlas-showcase .atlas-map-wrap { height:calc(100svh - var(--atlas-header-height,150px) - 105px); }
}
.atlas-showcase .atlas-menu-body .atlas-watch { position:static; width:100%; max-width:none; grid-column:1/-1; }
/* City watch now lives in Tools; it must not reserve space in the map HUD. */
.atlas-showcase { --atlas-watch-height:0px; }
.atlas-showcase .atlas-layers { top:12px; }

/* The city is the artwork: loading feedback shares its frame without covering it. */
.atlas-map-loading { inset:auto 16px 16px; justify-content:flex-start; background:transparent; pointer-events:none; }
.atlas-map-loading-inner { padding:12px 16px; max-width:min(520px,100%); text-align:left; border-left:3px solid var(--cool); }
.atlas-map-loading-glyph { display:none; }
.atlas-map-loading-sub { font-family:var(--font-sans); letter-spacing:0; text-transform:none; margin:0; }
.atlas-lenses { scrollbar-width:thin; }
.atlas-menu-body .atlas-watch { position:static; width:100%; max-width:none; grid-column:1/-1; }

/* Briefing is deliberate: opening it pauses neither the map nor its state. */
#atlas-open-brief { color:var(--accent); font-weight:600; }
#atlas-city-brief { width:min(860px,calc(100vw - 24px)); max-height:86svh; padding:20px; background:var(--bg); color:var(--ink); border:2px solid var(--line-bright); }
#atlas-city-brief::backdrop { background:rgba(7,16,23,.65); }
#atlas-city-brief header { display:flex; justify-content:space-between; align-items:center; gap:12px; }
#atlas-city-brief h2 { font-size: 18px; margin:0; }
#atlas-city-brief button { min-height:44px; padding:8px 12px; cursor:pointer; background:var(--bg-raised); border:1px solid var(--line); color:var(--ink); }
#atlas-city-brief button:disabled { cursor:default; opacity:.65; }
#atlas-city-brief a { color:var(--accent); text-underline-offset:3px; }
#atlas-city-brief p { line-height:1.55; }
.atlas-brief-tabs { display:flex; overflow-x:auto; margin:16px 0; }
.atlas-brief-tabs button { flex:0 0 auto; }
.atlas-brief-tabs [aria-pressed="true"] { background:var(--ink) !important; color:var(--bg) !important; }
#atlas-brief-content article { padding:12px 0; border-top:1px solid var(--line); }
#atlas-brief-content small { display:block; margin-top:6px; color:var(--dim); }
.brief-facts { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.brief-facts dd { margin:0; font-weight:600; }
.brief-channels { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.brief-channels > div { border-top:1px solid var(--line); padding:12px 0; }
.brief-channels a { margin-left:12px; }
.brief-player iframe { width:100%; aspect-ratio:16/9; border:0; margin-top:16px; }
.brief-table { overflow-x:auto; }
.brief-table table { width:100%; border-collapse:collapse; }
.brief-table :is(th,td) { text-align:left; padding:10px 8px; border-bottom:1px solid var(--line); min-width:90px; }
@media(max-width:700px) { #atlas-city-brief { padding:14px; } .brief-channels { grid-template-columns:1fr; } .brief-facts { grid-template-columns:1fr; } }
#atlas-city-brief header { position:sticky; top:0; z-index:2; background:var(--bg); padding-bottom:8px; border-bottom:2px solid var(--line-bright); }
#atlas-city-brief header { top:-20px; margin-top:-20px; padding-top:20px; }
@media(max-width:700px) {
 #atlas-city-brief header { top:-14px; margin-top:-14px; padding-top:14px; }
 .brief-table { overflow:visible; }
 .brief-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
 .brief-table tbody { display:block; }
 .brief-table tbody tr { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); gap:6px 12px; padding:14px 0; border-top:1px solid var(--line); }
 .brief-table tbody :is(th,td) { padding:0; min-width:0; border:0; overflow-wrap:anywhere; }
 .brief-table tbody td:nth-child(2) { text-align:right; }
 .brief-table tbody td:nth-child(3) { font-size: 11px; color:var(--dim); }
 .brief-table tbody td:nth-child(4) { font-size: 11px; text-align:right; }
}
#atlas-brief-content label { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:14px 0; }
#atlas-brief-content select { min-height:44px; max-width:100%; background:var(--bg-raised); color:var(--ink); border:1px solid var(--line); padding:8px; }

/* The skyline owns the viewport. Controls fit their labels rather than equal cards. */
.atlas-showcase .atlas-header { grid-template-columns:minmax(0,1fr) auto; gap:8px 16px; padding:8px 16px; }
.atlas-showcase .atlas-header-meta { display:block; }
.atlas-showcase .atlas-header-meta > .atlas-eyebrow { display:none; }
.atlas-showcase .atlas-header-nav { display:flex; width:auto; gap:8px; align-items:center; }
.atlas-showcase .atlas-header-nav > .atlas-theme-control { display:block; font-size:0; }
.atlas-showcase .atlas-header-nav select { width:auto; max-width:220px; height:44px; padding:8px 24px 8px 8px; border:0; border-bottom:1px solid var(--line); background:transparent; font-size:13px; }
.atlas-showcase .atlas-menu > summary { border:0; padding:10px 8px; white-space:nowrap; }
.atlas-showcase .atlas-lenses button { padding:8px 12px; font-size:13px; border-right:0; }
.atlas-showcase .atlas-lenses button[aria-pressed="true"] { background:transparent; color:var(--accent); box-shadow:inset 0 -2px var(--accent); }
.atlas-showcase .atlas-lens-story { padding:0 16px; min-height:44px; font-size: 11px; border-bottom:0; }
.atlas-showcase .atlas-lens-story strong { font-size:13px; font-weight:500; }
.atlas-showcase .atlas-map-wrap { height:calc(100svh - var(--atlas-header-height,60px) - 90px); }
@media(max-width:700px) {
 .atlas-showcase .atlas-header { grid-template-columns:1fr; gap:0; padding:6px 12px 0; }
 .atlas-showcase .atlas-header-nav { justify-content:space-between; gap:4px; }
 .atlas-showcase .atlas-header-nav select { max-width:210px; font-size: 11px; }
 .atlas-showcase .atlas-title { font-size:18px; line-height:1.4; }
 .atlas-showcase .atlas-lens-story { gap:6px; padding:0 12px; }
 .atlas-showcase .atlas-lens-story strong { max-width:23ch; font-size: 11px; line-height:1.25; }
 .atlas-showcase .atlas-layers > summary { min-height:44px; padding:10px 12px; }
 .atlas-showcase .atlas-areas { max-width:calc(100% - 24px); }
 .atlas-showcase .atlas-areas > summary, .atlas-showcase #atlas-flyover-btn { min-height:44px; padding:8px; font-size:11px; letter-spacing:0; }
}
@media(max-width:700px) {
 .atlas-showcase .atlas-header-nav > .atlas-theme-control:nth-child(2) { flex:1; min-width:0; }
 .atlas-showcase .atlas-header-nav > .atlas-theme-control:nth-child(2) select { width:100%; max-width:100%; }
 .atlas-showcase .atlas-menu { flex:0 0 auto; }
}
.atlas-flood-replay { position:absolute; z-index:24; bottom:86px; left:12px; width:min(540px,calc(100% - 74px)); background:var(--bg); color:var(--ink); border:1px solid var(--line-bright); }
.atlas-flood-replay > details > summary { cursor:pointer; min-height:44px; padding:10px 12px; font-size:13px; }
.flood-replay-body { padding:0 12px 10px; max-height:38svh; overflow:auto; font-size: 11px; }
.flood-replay-body label { display:flex; gap:8px; align-items:center; }
.flood-replay-body select { flex:1; min-width:0; min-height:44px; }
.flood-timeline-controls { display:flex; gap:6px; align-items:center; }
.flood-timeline-controls button { min-width:44px; min-height:44px; padding:8px; }
.flood-timeline-controls input { min-width:0; flex:1; height:44px; }
.flood-replay-body output { display:block; font-weight:600; }
.flood-replay-body details summary { min-height:44px; cursor:pointer; padding:10px 0; }
#flood-frame { accent-color:var(--accent); }
/* Frames carry hierarchy, not unused space. Fine-pointer bars can be shorter. */
.atlas-showcase .atlas-quick { padding:0 6px; gap:4px; border:0; border-top:1px solid var(--line); }
.atlas-showcase .atlas-quick-head { gap:6px; margin:0; }
.atlas-showcase .atlas-quick .atlas-eyebrow { letter-spacing:0; font-size:11px; }
.atlas-showcase .atlas-quick .atlas-flyover-btn { margin:0; padding:4px 6px; letter-spacing:0; background:transparent; color:var(--accent); border:0; }
.atlas-showcase .atlas-map-wrap { height:calc(100svh - var(--atlas-header-height,60px) - var(--atlas-lens-bar-height,90px)); }
@media(pointer:fine) and (min-width:701px) {
 .atlas-showcase .atlas-header { padding:4px 12px; }
 .atlas-showcase .atlas-header-nav select, .atlas-showcase .atlas-menu > summary { min-height:32px; height:32px; padding-block:4px; }
 .atlas-showcase .atlas-lenses button { min-height:32px; padding:4px 10px; }
 .atlas-showcase .atlas-lens-story, .atlas-showcase .atlas-lens-story summary { min-height:28px; }
 .atlas-showcase .atlas-quick-details > summary, .atlas-showcase .atlas-quick .atlas-flyover-btn { min-height:32px; padding-block:4px; }
 .atlas-showcase .atlas-layers > summary { min-height:32px; padding:6px 10px; }
}
@media(max-width:700px) {
 .atlas-showcase .atlas-header { grid-template-columns:54px minmax(0,1fr); align-items:center; gap:4px; padding:2px 8px; }
 .atlas-showcase .atlas-title { font-size:13px; line-height:1.2; }
 .atlas-showcase .atlas-header-nav { width:100%; }
 .atlas-showcase .atlas-header-nav select { padding-inline:2px; }
 .atlas-showcase .atlas-menu > summary { padding-inline:2px; font-size: 11px; }
 .atlas-showcase .atlas-quick .atlas-quick-heading { font-size:11px; }
}
#atlas-water-network .network-body, #atlas-camera-view .network-body { padding:0 10px 8px; max-height:34svh; overflow:auto; font-size: 11px; }
.network-body button { min-height:44px; padding:6px; text-align:left; }
.network-body table { width:100%; border-collapse:collapse; font-size: 11px; }
.network-body td, .network-body th { padding:5px 3px; text-align:left; }
#atlas-camera-view img, #atlas-camera-view iframe { width:100%; max-height:240px; aspect-ratio:16/9; object-fit:contain; border:0; }
#atlas-camera-view { width:min(480px,calc(100% - 74px)); }
@media(pointer:fine) { .network-body button { min-height:28px; border:0; background:transparent; } }
.atlas-showcase .atlas-layers:not(:has(details[open])) { width:max-content; }
.atlas-showcase .atlas-layers .atlas-panel-summary { padding:8px 10px; }
.atlas-showcase .atlas-layers .atlas-eyebrow { font-size:11px; letter-spacing:.04em; }
@media(pointer:fine) and (min-width:701px) {
 .atlas-showcase .atlas-layers .atlas-panel-summary, .atlas-showcase .atlas-flood-replay > details > summary { min-height:32px; padding:6px 10px; }
 .flood-timeline-controls button, .flood-replay-body select { min-height:32px; }
 .flood-timeline-controls input { height:32px; }
 .atlas-showcase .maplibregl-ctrl-group button { width:32px !important; height:32px !important; }
}

/* Contemporary city atlas: clear surfaces, ordinary labels, geography first. */
:root { --divider: #415763; --control-fill: #192b37; }
:root[data-theme="light"] { --divider: #d4dfe6; --control-fill: #eef3f6; }
:root[data-theme="contrast"] { --divider: #f1f7fa; --control-fill: #071017; }
.atlas-showcase .atlas-header { background:var(--bg-raised); border-bottom:1px solid var(--divider); }
.atlas-showcase .atlas-title { font-size:18px; font-weight:650; letter-spacing:-.025em; line-height:1.2; }
.atlas-showcase .atlas-header-nav select { background:var(--control-fill); border:0; color:var(--ink); font-family:var(--font-sans); padding-inline:10px; }
.atlas-showcase .atlas-menu > summary { font-family:var(--font-sans); letter-spacing:0; color:var(--dim); }
.atlas-showcase .atlas-lenses { background:var(--bg-raised); border-bottom:1px solid var(--divider); }
.atlas-showcase .atlas-lenses button { color:var(--dim); font-weight:500; }
.atlas-showcase .atlas-lenses button:hover { color:var(--ink); background:var(--control-fill); }
.atlas-showcase .atlas-lenses button[aria-pressed="true"] { color:var(--accent); background:var(--control-fill); border-bottom:2px solid var(--accent); }
.atlas-showcase .atlas-lens-story { background:var(--bg); color:var(--dim); }
.atlas-showcase .atlas-lens-story strong { color:var(--ink); font-weight:600; }
.atlas-showcase .atlas-eyebrow, .atlas-showcase .atlas-toggle, .atlas-showcase .atlas-panel-summary, .atlas-showcase .atlas-flyover-btn, .atlas-showcase .atlas-inspect-close, .atlas-showcase .atlas-area-tile, .atlas-showcase .atlas-quick summary { font-family:var(--font-sans); text-transform:none; letter-spacing:0; }
.atlas-showcase .atlas-layers { border:1px solid var(--divider); background:var(--bg-raised); }
.atlas-showcase .atlas-panel-summary { font-weight:600; }
.atlas-showcase .atlas-toggle { border-color:var(--divider); }
.atlas-showcase .atlas-toggle:hover { background:var(--control-fill); }
.atlas-showcase .atlas-quick { background:var(--bg-raised); border:1px solid var(--divider); }
.atlas-showcase .atlas-quick .atlas-eyebrow { color:var(--ink); font-weight:600; font-size: 11px; }
.atlas-showcase .atlas-quick .atlas-flyover-btn { color:var(--accent); font-weight:600; }
.atlas-flood-replay { width:min(380px,calc(100% - 74px)); background:var(--bg-raised); border:1px solid var(--divider); }
.atlas-flood-replay > details > summary { font-weight:600; border-bottom:1px solid transparent; }
.atlas-flood-replay > details[open] > summary { border-bottom-color:var(--divider); }
.atlas-flood-replay select, .atlas-flood-replay button { font-family:var(--font-sans); background:var(--control-fill); color:var(--ink); border:1px solid var(--line); padding:4px 8px; }
.atlas-flood-replay table { width:100%; border-collapse:collapse; font-variant-numeric:tabular-nums; }
.atlas-flood-replay td, .atlas-flood-replay th { border-bottom:1px solid var(--divider); padding:8px 4px; }
.atlas-observation-hud { background:var(--bg-raised); border-color:var(--divider); padding:12px; }
.atlas-observation-hud strong { font-size:13px; font-weight:600; }
.atlas-menu-body { background:var(--bg-raised); border-color:var(--divider); }
.atlas-section { border-color:var(--divider); }

/* The address search is a form control inside the evidence dock, so it wears
   the dock's own tokens. It used to render as raw browser chrome -- Arial on
   a white field, 21px tall -- in a panel whose other controls are 32-44px,
   and the row left 500px of it empty. */
.atlas-search-form { display:flex; gap:8px; align-items:stretch; }
.atlas-search-form input, .atlas-search-form button {
  font-family: var(--font-sans);
  font-size: 13px;
  min-height: 44px;
  background: var(--control-fill);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 4px 8px;
}
.atlas-search-form input { flex: 1 1 auto; min-width: 0; }
.atlas-search-form input::placeholder { color: var(--dim); }
.atlas-search-form button { flex: 0 0 auto; cursor: pointer; }
@media(pointer:fine) and (min-width:701px) {
  .atlas-search-form input, .atlas-search-form button { min-height:32px; }
}
.atlas-footer { text-transform:none; letter-spacing:0; font-family:var(--font-sans); }
.atlas-showcase :is(button,select,summary,a):focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
@media(max-width:700px) {
 .atlas-showcase .atlas-title { font-size:13px; letter-spacing:-.015em; }
 .atlas-showcase .atlas-quick { gap:0; }
 .atlas-showcase .atlas-quick .atlas-eyebrow { font-size:11px; }
 .atlas-flood-replay { width:calc(100% - 74px); }
}

/* Three phone actions keep deliberate widths instead of squeezing the tour. */
@media(max-width:700px) {
 .atlas-showcase .atlas-quick { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) 84px; align-items:center; gap:0; overflow-x:hidden; }
 .atlas-showcase .atlas-quick-details { min-width:0; }
 .atlas-showcase .atlas-quick .atlas-panel-summary { padding:4px; white-space:normal; }
 .atlas-showcase .atlas-quick .atlas-eyebrow { white-space:normal; line-height:1.2; }
 .atlas-showcase .atlas-quick-details:not([open]) .atlas-quick-heading { display:none; }
 .atlas-showcase .atlas-quick .atlas-flyover-btn { min-width:84px; padding:4px; margin:0; line-height:1.2; }
 .atlas-showcase .atlas-quick:has(details[open]) { display:block; }
}

/* Geographic evidence dock: reserve space instead of covering the city. */
.atlas-showcase .atlas-map-wrap { display:grid; grid-template-columns:minmax(0,1fr) min(340px,30vw); overflow-anchor:none; }
.atlas-showcase #atlas-map { position:relative; inset:auto; grid-column:1; width:100%; height:100%; min-width:0; }
#atlas-evidence-dock { grid-column:2; grid-row:1; min-height:0; overflow:hidden; background:var(--bg-raised); border-left:1px solid var(--divider); display:flex; flex-direction:column; }
#atlas-dock-toggle { text-align:left; color:var(--ink); background:var(--bg-raised); border:0; border-bottom:2px solid var(--divider); padding:6px 12px; font:600 13px var(--font-sans); min-height:32px; cursor:pointer; }
#atlas-dock-content { overflow:auto; min-height:0; overflow-anchor:none; overscroll-behavior:contain; }
#atlas-dock-content[hidden] { display:none; }
.atlas-showcase #atlas-dock-content > * { position:static; width:100%; max-width:none; max-height:none; margin:0; border:0; border-bottom:1px solid var(--divider); padding:0 12px; background:transparent; }
#atlas-dock-content > [hidden] { display:none; }
.atlas-showcase #atlas-dock-content .atlas-quick { display:block; }
#atlas-dock-content .atlas-quick > details { border-bottom:1px solid var(--divider); }
#atlas-dock-content summary { cursor:pointer; padding:8px 0; min-height:32px; }
#atlas-dock-content .flood-replay-body,#atlas-dock-content .network-body { max-height:none; overflow:visible; padding:0 0 12px; }
#atlas-dock-content #atlas-observation-hud { position:static; width:100%; max-width:none; padding:0 0 8px; border:0; }
#atlas-dock-content .atlas-inspect { max-height:none; overflow:visible; padding-block:12px; }
.atlas-showcase .atlas-map-wrap.evidence-collapsed { grid-template-columns:minmax(0,1fr) 140px; }
@media(max-width:700px) {
 .atlas-showcase .atlas-map-wrap { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr) auto; min-height:380px; }
 .atlas-showcase #atlas-map { grid-column:1; grid-row:1; }
 #atlas-evidence-dock { grid-column:1; grid-row:2; max-height:36svh; border-left:0; border-top:2px solid var(--divider); }
 #atlas-dock-toggle { min-height:44px; padding:6px 12px; }
 #atlas-dock-content summary { min-height:44px; }
 .atlas-showcase .atlas-map-wrap.evidence-collapsed { grid-template-columns:minmax(0,1fr); }
}
#atlas-dock-content #atlas-lens-evidence { position:static; }
#atlas-dock-content #atlas-lens-body { position:static; width:100%; max-width:none; max-height:none; border:0; padding:0 0 12px; }
#atlas-dock-content .flood-timeline-controls { flex-wrap:wrap; }
#atlas-dock-content #flood-frame { flex:1 1 100%; order:-1; min-width:0; width:100%; }
@media(max-width:700px) {
 .atlas-showcase .atlas-lenses { overflow-x:auto; overflow-y:hidden; flex-wrap:nowrap; max-width:100%; }
 .atlas-showcase #atlas-mobile-lens { flex:0 0 142px; width:142px; }
 .atlas-showcase .atlas-lenses > button { flex:0 0 auto; white-space:nowrap; }
}
.maplibregl-ctrl-attrib-button { background-repeat:no-repeat; background-position:center; }
@media(min-width:701px) {
 .atlas-showcase .atlas-map-wrap.evidence-collapsed { grid-template-columns:minmax(0,1fr); }
 .evidence-collapsed #atlas-evidence-dock { position:absolute; right:12px; top:12px; width:auto; border:1px solid var(--divider); }
}
#atlas-dock-toggle { white-space:nowrap; }
@media(min-width:701px) { .evidence-collapsed #atlas-evidence-dock { min-width:max-content; } }

/* Owner's seven-rule audit: one layer chooser, four human tasks, no hidden rail. */
.atlas-showcase .atlas-lenses { display:flex; flex-wrap:wrap; overflow:visible; align-items:center; gap:0; padding:0 12px; }
.atlas-showcase .atlas-lenses [data-lens] { display:none; }
.atlas-showcase #atlas-mobile-lens { display:block; flex:0 1 280px; width:280px; min-width:0; max-width:100%; min-height:36px; padding:6px 28px 6px 8px; background:var(--bg-raised); color:var(--ink); border:0; border-right:1px solid var(--divider); font:500 14px var(--font-sans); }
.atlas-showcase .atlas-lenses > button { min-height:36px; padding:6px 14px; font:500 14px var(--font-sans); white-space:normal; }
.atlas-showcase .atlas-lenses > button:first-of-type { margin-left:auto; }
.atlas-showcase .atlas-lens-story { font-size: 13px; line-height:1.4; }
.atlas-showcase .atlas-lens-story strong { font-size: 13px; }
.atlas-section p,.atlas-provenance p,.atlas-kicker { max-width:65ch; }
.atlas-provenance { columns:2 30ch; column-gap:40px; max-width:1100px; }
.atlas-provenance p { margin-top:0; }
@media(max-width:700px) {
 .atlas-showcase .atlas-lenses { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); padding:0; overflow:visible; }
 .atlas-showcase #atlas-mobile-lens { grid-column:1/-1; width:100%; max-width:none; min-height:44px; border-right:0; border-bottom:1px solid var(--divider); font-size:15px; }
 .atlas-showcase .atlas-lenses > button { width:100%; min-height:44px; font-size: 11px; padding:6px 4px; line-height:1.25; }
 .atlas-showcase .atlas-lenses > button:first-of-type { margin-left:0; }
 .atlas-showcase .atlas-lens-story { display:none; }
 .atlas-showcase .atlas-map-wrap { min-height:0; }
}
@media(pointer:coarse) { .atlas-showcase #atlas-mobile-lens,.atlas-showcase .atlas-lenses > button { min-height:44px; } }
@media(min-width:701px) { .atlas-showcase .atlas-lenses > #atlas-open-place { margin-left:auto; } }

/* Comparable hourly evidence: one scale, visible gaps, exact values on request. */
.rain-location-reading { display:grid; grid-template-columns:minmax(0,1fr) auto; width:100%; text-align:left; padding:10px 0; border:0; border-bottom:1px solid var(--divider); background:transparent; color:var(--ink); cursor:pointer; font:inherit; }
.rain-location-reading > span { color:var(--dim); }
.rain-chart { display:block; grid-column:1/-1; width:100%; height:auto; max-height:86px; }
.rain-chart .rain-bar { fill:var(--accent); }
.rain-chart .rain-gap { fill:var(--dim); }
.rain-chart text { fill:var(--dim); font:11px var(--font-sans); }
.rain-reading-detail { padding-top:12px; }
.rain-reading-detail h3,#atlas-lens-body h3,#atlas-inspect-props h3 { font-size: 18px; line-height:1.25; margin:8px 0; }
.rain-reading-detail table { width:100%; border-collapse:collapse; font-variant-numeric:tabular-nums; }
.rain-reading-detail :is(th,td) { padding:6px 0; border-bottom:1px solid var(--divider); text-align:left; }
#atlas-lens-body :is(button,select),#atlas-landmark-choice { font:inherit; color:var(--ink); background:var(--bg-raised); border:1px solid var(--line); padding:6px 8px; min-height:32px; max-width:100%; }
#atlas-lens-body .rain-location-reading { display:grid; gap:4px 10px; border:0; border-bottom:1px solid var(--divider); background:transparent; padding:10px 0; }
#atlas-lens-body label { display:block; margin:12px 0; }
#atlas-landmark-choice { display:block; width:100%; margin-top:6px; }
.landmark-facts { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; font-variant-numeric:tabular-nums; }
.landmark-facts dt { color:var(--dim); }
.landmark-facts dd { margin:0; overflow-wrap:anywhere; }
@media(max-width:700px),(pointer:coarse) { #atlas-lens-body :is(button,select),#atlas-landmark-choice { min-height:44px; } }
#atlas-lens-body > p { margin:4px 0; }
#atlas-lens-body > .reading-source { font-size: 11px; line-height:1.4; margin:6px 0; color:var(--dim); }

#atlas-lens-body .reading-action { width:fit-content; }

/* ── Function index ─────────────────────────────────────────────────────────
   Bottom-left, inside the map, translucent. Colour is only worth something
   if you can ask questions of it: every band is a button that counts the
   buildings of that function in the current view and filters to them.
   Never full-width. Never opaque. Never a bar crossing the map. */
.atlas-function-index {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 6;
  max-width: 264px;
  border: 1px solid var(--line-bright);
  /* Translucent so the map reads through it, but no blur: blur is a
     decorative effect the anti-slop gate bans, and it costs a GPU pass
     on the phone for a panel nobody leaves open. */
  background: var(--bg-raised);
  font-family: var(--font-mono);
  font-size: 11px;
}
.atlas-function-index > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  cursor: pointer;
  list-style: none;
}
.atlas-function-index > summary::-webkit-details-marker { display: none; }
.atlas-function-index > summary::after { content: "+"; margin-left: auto; color: var(--dim); }
.atlas-function-index[open] > summary::after { content: "\2212"; }
.atlas-function-body { padding: 0 12px 10px; }
.atlas-function-note {
  margin: 0 0 8px;
  color: var(--dim);
  line-height: 1.45;
  max-width: 34ch;
}
.atlas-function-list { list-style: none; margin: 0 0 8px; padding: 0; }
.atlas-function-list li { border-top: 1px solid var(--line); }
.atlas-function-list li:first-child { border-top: 0; }
.atlas-function-list button {
  display: grid;
  grid-template-columns: 12px 1fr auto auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 4px 0;
  background: none;
  border: 0;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.atlas-function-list button:hover { color: var(--accent); }
.atlas-function-list button[aria-pressed="true"] { color: var(--accent); }
.atlas-function-list button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.atlas-function-swatch {
  width: 12px;
  height: 12px;
  border: 1px solid var(--line-bright);
}
.atlas-function-name { line-height: 1.3; }
.atlas-function-count { font-variant-numeric: tabular-nums; color: var(--ink); }
.atlas-function-share { color: var(--dim); min-width: 3ch; text-align: right; font-variant-numeric: tabular-nums; }
.atlas-function-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.atlas-function-actions .atlas-flyover-btn { min-height: 34px; font-size: 10px; }

@media (max-width: 600px) {
  .atlas-function-index { left: 8px; bottom: 8px; right: 8px; max-width: none; }
  .atlas-function-list button { min-height: 44px; }
  .atlas-function-actions .atlas-flyover-btn { min-height: 44px; }
}

/* Building functions belong to the coordinated evidence dock, not over its phone action. */
.atlas-showcase #atlas-dock-content > .atlas-function-index { font-family:var(--font-sans); font-size:13px; }
@media(pointer:coarse) { .atlas-function-list button,.atlas-function-actions .atlas-flyover-btn { min-height:44px; } }
