@font-face {
  font-family: "Geist";
  src: url("./fonts/Geist-Variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("./fonts/IBMPlexMono.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #060b0d;
  --surface: #0c1518;
  --raised: #111e21;
  --inset: #091113;
  --line: #26383b;
  --line-strong: #3f5557;
  --main: #eaf4f1;
  --weak: #a2b4b3;
  --teal: #70c7ba;
  --bright: #afe9da;
  --focus: #c0f5e6;
  --sans: "Geist", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
  --text-control: .875rem;
  --text-small: .75rem;
  --tracking-display: -.045em;
  --tracking-title: -.035em;
  --tracking-heading: -.02em;
  --gutter: clamp(1.1rem, 4vw, 5rem);
  --frame: min(100% - var(--gutter) * 2, 100rem);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23a6c9c2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  font: 100%/1.5 var(--sans);
  color: var(--main);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { scrollbar-color: #34504d var(--bg); }
body { margin: 0; min-width: 300px; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; border: 0; background: transparent; }
button:disabled { cursor: default; opacity: .46; }
a { color: inherit; text-decoration: none; }
:where(button, a, input, select, summary):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
::selection { background: #70c7ba; color: #071911; }
.ui-icon, i[data-icon] { width: 18px; height: 18px; display: inline-block; flex: none; vertical-align: middle; }
svg.ui-icon { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.skip { position: fixed; z-index: 100; transform: translateY(-120%); padding: .6rem 1rem; background: var(--focus); color: #13231e; }
.skip:focus { transform: translateY(0); }
main:focus { outline: none; }
.topinner, .content { width: var(--frame); margin-inline: auto; }

/* The masthead inherits the enamel and copper-trace vocabulary of THEN KAS. */
.topbar { border-bottom: 1px solid #304440; background: #0a1214; }
.topinner { min-height: 64px; display: flex; align-items: stretch; gap: clamp(20px, 3.4vw, 58px); }
.brand { display: inline-flex; align-items: center; gap: 9px; align-self: center; flex: none; }
.brand img { width: 33px; height: 33px; }
.brand-type { color: #d4f5e9; font-size: 1.56rem; font-weight: 680; line-height: 1.1; letter-spacing: var(--tracking-title); }
.brand-light { color: #b6cfc7; font-weight: 540; }
.nav { display: flex; align-items: stretch; gap: clamp(11px, 1.6vw, 27px); }
.nav a { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 0 3px; color: var(--weak); font-size: var(--text-control); font-weight: 550; }
.nav .ui-icon { width: 16px; height: 16px; color: #839b96; }
.nav a[aria-current="page"] { color: #e0f6ec; }
.nav a[aria-current="page"] .ui-icon { color: var(--teal); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; height: 3px; bottom: -1px; inset-inline: 0; background: var(--teal); }
.nav a:hover, .head-actions button:hover { color: var(--focus); }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: .65rem; }
.search-launch, .icon-button { border: 1px solid var(--line); border-radius: 5px; color: var(--weak); }
.search-launch { min-height: 36px; display: inline-flex; align-items: center; gap: 10px; width: clamp(180px, 16vw, 244px); padding: 0 9px 0 12px; text-align: left; background: var(--inset); font-size: .85rem; }
.search-launch .ui-icon { width: 15px; height: 15px; color: #9fb7af; }
.search-launch kbd { border: 1px solid #354543; border-radius: 3px; color: #afc1ba; font: .72rem var(--mono); margin-left: auto; padding: 1px 5px; }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; }
.icon-button:hover { background: var(--raised); border-color: var(--line-strong); }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: clamp(23px, 3.3vh, 42px) 0 clamp(19px, 2.6vh, 33px); }
.page-head h1 { font-size: clamp(2rem, 3.5vw, 3.65rem); line-height: 1.06; font-weight: 650; letter-spacing: var(--tracking-title); }
.page-head p { color: var(--weak); font-size: clamp(.89rem, 1.08vw, 1rem); margin-top: 9px; line-height: 1.5; max-width: 62ch; }
.readout { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .55rem 1rem; }
.network-badge, .head-clock { display: inline-flex; align-items: center; white-space: nowrap; gap: 7px; color: #c0d4cd; font: .8rem/1.5 var(--sans); }
.network-badge .ui-icon { color: var(--teal); width: 16px; height: 16px; }
.head-clock { border-left: 1px solid var(--line-strong); padding-left: 1rem; color: #cddad3; font: .79rem/1.5 var(--mono); font-variant-numeric: tabular-nums; gap: 5px; }
.head-clock .ui-icon { width: 13px; height: 13px; color: #8fa7a0; margin-right: 2px; }
.head-clock span { color: #98aaa2; font-size: .74rem; }

/* One instrument frame: the route picker and readouts stay off of the city art. */
.viz-panel { background: var(--surface); border: 1px solid #364a4a; border-radius: 8px; overflow: hidden; }
.viz-stage {
  --scene-height: clamp(385px, 53vh, 700px);
  --viewer-bar-height: 60px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  block-size: calc(var(--scene-height) + var(--viewer-bar-height));
}
.viewer-bar { display: flex; align-items: center; gap: 18px; padding: 8px 14px 8px 9px; min-height: 51px; border-bottom: 1px solid var(--line-strong); background: #101d1f; }
.switcher { display: inline-flex; align-items: center; gap: 3px; flex: none; }
.switcher button, .zoom-tools button, .action { display: inline-flex; align-items: center; justify-content: center; }
.switcher button { gap: 7px; min-height: 33px; padding: 0 12px; color: #afc1ba; font-size: var(--text-control); font-weight: 550; border-radius: 4px; }
.switcher .ui-icon { width: 16px; height: 16px; }
.switcher button:hover { background: #203235; color: var(--focus); }
.switcher button[aria-pressed="true"] { color: #0a2822; background: #9adaca; box-shadow: inset 0 1px 0 #d3fae675; }
.district-control { display: flex; gap: 9px; align-items: center; border-left: 1px solid var(--line-strong); padding-left: 17px; min-width: 0; }
.district-control label { color: #a9bbb5; font-size: .82rem; }
.district-control select, .chain-filter select { appearance: none; min-width: 0; color: #e0ece6; border: 1px solid #34494a; border-radius: 4px; background: var(--inset) var(--chevron) no-repeat right 8px center/15px; height: 33px; padding: 0 30px 0 10px; font-size: .85rem; font-weight: 500; cursor: pointer; }
.district-control select:hover, .chain-filter select:hover { border-color: #68817d; }
.stream-badge { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; color: #b1c2ba; font: 550 .8rem/1.3 var(--sans); white-space: nowrap; }
.state-dot { width: 7px; height: 7px; background: #92a49e; border-radius: 50%; flex: none; }
.stream-badge[data-status="live"] { color: #a5e1ba; }
.stream-badge[data-status="live"] .state-dot { background: #99db9c; }
.stream-badge[data-status="paused"], .stream-badge[data-status="archived"] { color: #e4c794; }
.stream-badge[data-status="paused"] .state-dot, .stream-badge[data-status="archived"] .state-dot { background: #d7b779; }
.head-lag { border-left: 1px solid var(--line-strong); padding-left: 7px; color: #a1b7ad; min-width: 36px; font: .92em var(--mono); font-variant-numeric: tabular-nums; }
.viewport { position: relative; isolation: isolate; min-height: 0; background: #072028; }
.city-scene { position: absolute; inset: 0; overflow: hidden; }
.hud { position: absolute; inset-inline: 16px; z-index: 8; display: flex; justify-content: space-between; pointer-events: none; }
.hud-bottom { bottom: 14px; align-items: end; }
.legend, .zoom-tools { background: #081416e8; border: 1px solid #62817b91; border-radius: 5px; color: #d5e6df; }
.legend { display: flex; gap: 14px; align-items: center; padding: 7px 10px; font-size: .77rem; }
.legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cube-marker .ui-icon { width: var(--cube-size, 12px); height: var(--cube-size, 12px); stroke: var(--cube-rim, #98e0c8); }
.cube-marker .cube-top { fill: var(--cube-top, #70c7ba99); }
.cube-marker .cube-left { fill: var(--cube-left, #70c7ba55); }
.cube-marker .cube-right { fill: var(--cube-right, #26787888); }
.legend-cube.focused, .cj-target.cube-marker[aria-pressed="true"] {
  --cube-rim: #f2d89b;
  --cube-top: #f0c87399;
  --cube-left: #d1a76575;
  --cube-right: #96733188;
}
.legend-link { width: 12px; height: 1px; background: #a5cdc1; }
.zoom-tools { display: inline-flex; align-items: center; flex: none; padding: 2px; pointer-events: auto; margin-left: auto; }
.zoom-tools button { width: 33px; height: 30px; border-radius: 3px; color: #d4e7dd; }
.zoom-tools button:hover { background: #304341; }
.zoom-tools .ui-icon { width: 16px; height: 16px; }
.zoom-tools>span, .viz-foot .pipe { border-left: 1px solid #3e5550; height: 18px; margin: 0 4px; }
.viz-foot {
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1fr) max-content;
  grid-template-areas: "actions city timeline fullscreen";
  column-gap: 8px;
  align-items: center;
  padding: 6px 15px 6px 9px;
  border-top: 1px solid var(--line-strong);
}
.viz-actions, .timeline { display: flex; align-items: center; gap: 4px; }
.viz-actions { grid-area: actions; min-height: 52px; }
.viz-city-controls { grid-area: city; display: flex; align-items: center; justify-content: space-between; gap: 4px 14px; }
.journey-actions { display: flex; flex: none; align-items: center; gap: 4px; }
.action { color: #c1d5ca; min-height: 31px; gap: 7px; padding: 0 8px; border-radius: 4px; white-space: nowrap; font-size: var(--text-control); font-weight: 500; }
.action .ui-icon { width: 16px; height: 16px; }
.action:hover, .action.resuming { background: #203336; color: #d4f5e6; }
.journey-restart { padding: 0; width: 32px; color: #9ab2a8; }
.soundtrack-toggle[data-playing="true"] { background: #203d3c; color: var(--bright); }
.timeline { grid-area: timeline; margin-left: auto; gap: 10px; min-width: 0; }
.timeline label { display: inline-flex; gap: 6px; align-items: center; color: var(--weak); font-size: .82rem; white-space: nowrap; }
.timeline label .ui-icon { width: 14px; height: 14px; }
.timeline input { appearance: none; width: clamp(55px, 9vw, 165px); min-width: 35px; height: 20px; background: transparent; cursor: pointer; }
.timeline input::-webkit-slider-runnable-track { border-radius: 4px; height: 3px; background: #3d5754; }
.timeline input::-moz-range-track { border-radius: 4px; height: 3px; background: #3d5754; }
.timeline input::-webkit-slider-thumb { appearance: none; margin-top: -4px; width: 9px; height: 11px; border-radius: 2px; background: var(--bright); border: 1px solid #dafff2; }
.timeline input::-moz-range-thumb { width: 8px; height: 10px; border-radius: 2px; background: var(--bright); border: 1px solid #dafff2; }
.timeline output { white-space: nowrap; color: #c4d9ce; font: .75rem var(--mono); font-variant-numeric: tabular-nums; }
.expand { grid-area: fullscreen; justify-self: end; border-left: 1px solid var(--line); border-radius: 0; padding-left: 14px; }
.viz-panel:fullscreen, .viz-panel.full-view { background: var(--bg); display: flex; flex-direction: column; width: 100%; height: 100%; border: 0; border-radius: 0; }
.viz-panel:fullscreen, .viz-panel.full-view { padding: env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px); }
.viz-panel.full-view { position: fixed; inset: 0; z-index: 60; height: 100dvh; }
.viz-panel:is(:fullscreen, .full-view) .viz-stage { flex: 1; min-height: 0; block-size: auto; }
.viz-panel:is(:fullscreen, .full-view) .viz-foot { flex: none; }

@media (max-width: 1420px) {
  .viz-foot {
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    grid-template-areas:
      "actions city city"
      "timeline timeline fullscreen";
  }
  .timeline { min-height: 44px; margin: 0; border-block-start: 1px solid var(--line); }
  .timeline input { flex: 1; width: auto; min-width: 24px; }
}

@media (max-width: 960px) {
  .viz-foot {
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-areas:
      "actions actions"
      "timeline fullscreen"
      "city city";
  }
  .viz-actions { flex-wrap: wrap; align-content: center; }
  .viz-city-controls {
    flex-wrap: wrap;
    min-height: 52px;
    padding-block: 2px;
    border-block-start: 1px solid var(--line);
  }
  .viz-city-controls .pipe { display: none; }
  .viz-panel:is(:fullscreen, .full-view) .viz-city-controls[hidden] {
    display: flex !important;
    visibility: hidden;
  }
  .viz-panel:is(:fullscreen, .full-view) .viz-city-controls[hidden] > [hidden] {
    display: flex !important;
  }
}

/* Numbers form a single instrument strip, with one datum per column. */
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 16px 0 clamp(23px, 3vw, 41px); padding: 4px 0; border-block: 1px solid var(--line); background: #0c1517; }
.metric { position: relative; padding: 11px clamp(14px, 1.75vw, 30px); min-width: 0; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric-label { display: flex; align-items: center; gap: 7px; color: #aabeb6; font-size: .83rem; font-weight: 500; }
.metric-label .ui-icon { width: 15px; height: 15px; color: #7da399; }
.metric-val { display: flex; align-items: baseline; gap: 6px; margin-top: 5px; font-size: clamp(1.48rem, 2.25vw, 2.35rem); line-height: 1.16; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: lining-nums tabular-nums; }
.metric-val small { color: var(--weak); font: .72rem var(--mono); letter-spacing: 0; }
.spark { position: absolute; right: clamp(12px, 1.4vw, 23px); bottom: 14px; width: clamp(30px, 4vw, 68px); height: 23px; }
.metric:nth-child(2) .spark { display: none; }

.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #0b1316; }
.card-heading, .heading-group { display: flex; align-items: center; }
.card-heading { justify-content: space-between; gap: 12px; min-height: 56px; padding: 11px 18px; border-bottom: 1px solid var(--line); background: #101a1c; }
.heading-group { gap: 9px; }
.section-icon { display: inline-flex; color: var(--teal); }
.section-icon .ui-icon { width: 18px; height: 18px; }
h2 { font-size: 1.125rem; letter-spacing: var(--tracking-heading); font-weight: 630; line-height: 1.25; }
.quiet-link { display: inline-flex; align-items: center; min-height: 30px; padding: 0 9px; font-size: .81rem; border: 1px solid #324844; color: #c1e4d5; border-radius: 4px; }
.quiet-link:hover, .paginate button:hover { background: #213431; color: var(--focus); }
.table-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.table-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
table { width: 100%; white-space: nowrap; border-collapse: collapse; text-align: left; font: .825rem/1.45 var(--mono); font-variant-numeric: tabular-nums; }
th, td { padding: .59rem 1rem; border-bottom: 1px solid #203033; }
th { font: 550 .8125rem/1.4 var(--sans); color: #a1b2aa; background: #0e181b; }
th:first-child, td:first-child { padding-left: 1.15rem; }
td { color: #c3d2cb; }
tr:last-child td { border-bottom: 0; }
tbody tr[data-hash] { cursor: pointer; }
tbody tr[data-hash]:hover, tbody tr:focus-within { background: #152525; }
.hash-cell { display: flex; align-items: center; gap: 9px; }
.mini-block { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 22px; height: 22px; color: #89b7a8; }
.mini-block .ui-icon { width: 17px; height: 17px; }
.hash-button { color: #a2d5bf; padding: 1px 0; font: inherit; text-align: left; }
.hash-button:hover { text-decoration: underline; }
.dt-secondary { color: #899e94; }
.chain-pill { display: inline-block; border-left: 2px solid #74b29a; color: #c0d9cc; padding: 0 7px; font: .79rem/1.35 var(--sans); }
.chain-pill.parallel { color: #a7b7b2; border-left-color: #536764; }
.row-chevron { text-align: right; width: 30px; color: #6d8980; }
.row-chevron .ui-icon { width: 13px; height: 13px; }
.empty { padding: 24px; text-align: center; color: var(--weak); font: .9rem var(--sans); }
.data-note { margin: 13px 0 0; font: .8rem/1.55 var(--sans); color: #93a8a1; overflow-wrap: anywhere; }
.count { font: .74rem/1.3 var(--mono); color: #c3dbcf; padding: 3px 6px; background: #1c2d2c; border-radius: 3px; }
.count:empty { display: none; }
.filter-row { display: flex; gap: 12px; padding: 14px 18px; align-items: center; justify-content: space-between; }
.filter { width: min(100%, 340px); display: flex; gap: 9px; align-items: center; border: 1px solid #354748; border-radius: 4px; padding: 0 10px; background: var(--inset); }
.filter .ui-icon { width: 15px; height: 15px; color: var(--weak); }
.filter input { width: 100%; min-width: 0; height: 35px; border: 0; color: var(--main); background: transparent; outline: 0; font-size: .86rem; }
.filter:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.filter input::placeholder { color: #9aaea5; }
.chain-filter { display: flex; align-items: center; gap: 8px; color: var(--weak); font-size: .83rem; }
.paginate { display: flex; justify-content: flex-end; align-items: center; gap: 9px; padding: 12px 18px; border-top: 1px solid var(--line); font: .74rem var(--mono); color: var(--weak); }
.paginate span:first-child { margin-right: auto; }
.paginate button { border: 1px solid var(--line-strong); border-radius: 4px; color: #c8d9cd; padding: 5px 9px; font: .83rem var(--sans); }
#network-view .metrics { margin-top: 0; }
.network-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; }
.source-links { padding: 19px; }
.source-links a { color: var(--bright); text-decoration: underline; text-underline-offset: 3px; }
.source-links p { color: var(--weak); margin: 5px 0 20px; line-height: 1.5; font-size: .89rem; }
.source-links p:last-child { margin-bottom: 0; }
.source-title { color: var(--main); }
.kv { margin: 0; padding: 5px 18px; }
.kv div { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv div:last-child { border-bottom: none; }
.kv dt { color: var(--weak); font-size: .87rem; }
.kv dd { margin: 0; color: var(--main); text-align: right; font: .8rem/1.45 var(--mono); overflow-wrap: anywhere; }
.footer { margin-top: 28px; color: #93a7a1; }
@font-face {
  font-family: "Caveat";
  src: url("./fonts/Caveat-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
.footer-credit {
  padding: clamp(12px, 3vw, 28px) clamp(8px, 2vw, 22px);
  border-block: 1px solid var(--line);
  background: radial-gradient(ellipse at center, #13282c 0, transparent 73%), var(--surface);
}
.footer-signature {
  display: grid;
  grid-template-columns: clamp(44px, 12vw, 130px) minmax(0, 1fr) clamp(44px, 12vw, 130px);
  align-items: center;
  gap: clamp(5px, 2.3vw, 24px);
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
}
.footer-brand-link { display: flex; align-items: center; justify-content: center; border-radius: 6px; }
.footer-brand-link svg { display: block; width: 100%; height: clamp(54px, 11vw, 122px); overflow: hidden; }
.footer-byline {
  display: grid;
  place-items: center;
  min-height: 44px;
  color: #d9f3e9;
  font: 600 clamp(1.38rem, 4.9vw, 3.4rem)/1.05 "Caveat", "Segoe Print", cursive;
  letter-spacing: -.025em;
}
.footer-byline:hover { color: var(--bright); text-decoration: underline; text-underline-offset: .12em; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 6px 18px; padding-block: 16px; font-size: .82rem; }
.footer-links a { white-space: nowrap; }
.footer-links a:hover { color: var(--focus); }
.guide { width: min(100% - 30px, 515px); max-height: 85dvh; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--main); background: var(--surface); padding: 24px; }
.guide::backdrop { background: #020809c9; }
.guide-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.guide-head h2 { font-size: 1.45rem; }
.guide p, .guide dd { color: var(--weak); font-size: .9rem; line-height: 1.55; }
.guide dt { margin-top: 14px; font-size: .94rem; font-weight: 650; }
.guide dd { margin: 3px 0 0; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 70; max-width: 90%; border: 1px solid var(--line-strong); border-radius: 5px; padding: 11px 16px; background: #142825; color: var(--main); font-size: .9rem; }

@media (min-width: 1650px) {
  .viz-stage { --scene-height: clamp(500px, 56vh, 780px); }
}
@media (max-width: 980px) {
  :root { --gutter: clamp(1rem, 2.65vw, 2rem); }
  .topinner { gap: 24px; }
  .timeline label { font-size: 0; gap: 0; }
  .metric-val { font-size: 1.66rem; }
  .spark { width: 30px; }
}
@media (max-width: 720px) {
  :root { --gutter: .85rem; }
  .topinner { min-height: 55px; gap: 20px; }
  .nav { gap: 13px; }
  .nav a { min-height: 42px; font-size: .87rem; }
  .nav .ui-icon { display: none; }
  .head-actions { gap: 5px; }
  .search-launch { width: 36px; justify-content: center; padding: 0; }
  .search-launch span, .search-launch kbd { display: none; }
  .brand img { width: 28px; height: 28px; }
  .brand-type { font-size: 1.45rem; }
  .page-head { padding: 20px 0 17px; gap: 14px; }
  .readout { flex-direction: column; align-items: flex-end; gap: 5px; }
  .head-clock { padding: 0; border: 0; }
  .viewer-bar { gap: 10px; padding-inline: 7px 9px; }
  .district-control { gap: 6px; padding-left: 10px; }
  .switcher button { padding-inline: 9px; }
  .viz-stage { --scene-height: clamp(355px, 51svh, 495px); }
  .viz-foot { padding: 3px 11px; }
  .viz-foot .expand { padding-left: 8px; border-left: 0; }
  .action.soundtrack-toggle { min-height: 44px; }
  .timeline { gap: 6px; }
  .timeline label { font-size: .77rem; gap: 4px; }
  .timeline input { flex: 1; min-width: 24px; width: auto; }
  .timeline output { font-size: .7rem; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 0; margin: 12px 0 21px; }
  .metric { padding: 11px 13px; }
  .metric:nth-child(3) { border-left: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .spark { width: 40px; right: 11px; }
  .metric-val { font-size: clamp(1.22rem, 5.5vw, 1.62rem); }
  .network-grid { grid-template-columns: 1fr; }
  .table-scroll table { min-width: 650px; }
  .card-heading { min-height: 49px; padding: 9px 13px; }
  td, th { padding: .53rem .8rem; }
  td:first-child, th:first-child { padding-left: .8rem; }
  .filter-row { padding: 12px 13px; flex-wrap: wrap; gap: 8px; }
  .chain-filter { margin-left: auto; }
}
@media (min-width: 531px) and (max-width: 650px) {
  .district-control { flex: 1; }
  .district-control label { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  .district-control select { width: 100%; }
}
@media (max-width: 530px) {
  :root { --gutter: .68rem; }
  .topinner { gap: 12px; }
  .brand { gap: 4px; }
  .nav { gap: 5px; }
  .nav a { padding-inline: 4px; font-size: .79rem; }
  .head-actions { gap: 2px; }
  .head-actions button { border: 0; background: transparent; width: 33px; min-height: 38px; }
  .search-launch .ui-icon, .help .ui-icon { width: 18px; height: 18px; }
  .page-head h1 { font-size: clamp(1.76rem, 7vw, 2.1rem); }
  .page-head p { max-width: 33ch; font-size: .84rem; margin-top: 5px; }
  .readout { display: none; }
  .viz-stage { --viewer-bar-height: 103px; }
  .viewer-bar { display: grid; grid-template-columns: minmax(0,1fr) auto; padding: 6px 8px; gap: 5px 6px; }
  .switcher { grid-column: 1; grid-row: 1; gap: 1px; justify-self: start; }
  .switcher button { min-height: 34px; padding-inline: 7px; gap: 4px; font-size: .79rem; }
  .switcher .ui-icon { width: 14px; height: 14px; }
  .stream-badge { grid-column: 2; grid-row: 1; gap: 5px; font-size: var(--text-small); }
  .head-lag { min-width: 0; padding-left: 5px; }
  .district-control { grid-column: 1 / -1; grid-row: 2; gap: 9px; padding: 5px 1px 0; border: 0; border-top: 1px solid var(--line); }
  .district-control select { flex: 1; height: 33px; }
  .district-control label { font-size: .78rem; color: #b5c8bc; }
  .hud { inset-inline: 8px; }
  .hud-bottom { bottom: 9px; }
  .legend { gap: 7px; padding: 5px 6px; font-size: .64rem; }
  .legend span { gap: 4px; }
  .legend-cube { --cube-size: 10px; }
  .legend-link { width: 8px; }
  .zoom-tools button { width: 27px; height: 29px; }
  .zoom-tools>span { margin: 0 1px; }
  .viz-foot { padding-inline: 6px; }
  .viz-actions, .journey-actions { gap: 1px; }
  .viz-actions .pipe { margin: 0 2px; }
  .action { min-height: 34px; gap: 4px; padding-inline: 5px; font-size: .8125rem; }
  .journey-restart { width: 28px; }
  .expand span { display: none; }
  .timeline { padding-inline: 3px; }
  .metric-label { font-size: .78rem; gap: 5px; }
  .metric-label .ui-icon { width: 13px; height: 13px; }
  .footer { margin-top: 20px; }
  .footer-links { gap: 4px 10px; font-size: .73rem; }
  .data-note { font-size: var(--text-small); }
  .paginate { padding-inline: 11px; gap: 6px; }
  .guide { padding: 18px; }
}
@media (max-width: 410px) {
  #flight-direction-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .topinner { display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-rows: 43px 32px; min-height: 0; gap: 0 8px; }
  .brand { grid-row: 1; grid-column: 1; justify-self: start; }
  .head-actions { grid-row: 1; grid-column: 2; }
  .head-actions .search-launch { width: auto; min-height: 30px; padding: 0 7px; gap: 6px; border: 1px solid var(--line); }
  .search-launch span { display: inline; font-size: .74rem; }
  .nav { grid-row: 2; grid-column: 1/-1; justify-content: space-between; gap: 6px; }
  .nav a { flex: 1; justify-content: center; gap: 5px; min-height: 32px; }
  .nav .ui-icon { display: inline-block; width: 13px; height: 13px; }
}
@media (max-width: 380px) {
  .switcher .ui-icon { display: none; }
  .legend { gap: 5px; }
}
@media (max-width: 360px) {
  .topinner { gap: 6px; }
  .nav { gap: 1px; }
  .brand-type { font-size: 1.25rem; }
  .brand img { width: 23px; height: 23px; }
  .page-head h1 { font-size: 1.65rem; }
  .head-actions button { width: 28px; }
  .head-lag { display: none; }
  .spark { width: 24px; }
  .filter { width: 100%; }
  .metric:nth-child(2) { padding-inline-end: 4px; }
  .metric-label { min-height: 2.5em; align-items: start; line-height: 1.25; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}

.footer-links button { font:inherit; color:inherit; padding:0; }
.footer-links button:hover { color:var(--focus); }
.art-dialog { width:min(640px,calc(100vw - 24px)); padding:clamp(14px,3vw,24px); }
.art-stage { display:grid; place-items:center; background:#070c0e; border:1px solid var(--line); }
#art-preview { width:100%; max-width:min(100%,58vh); background-repeat:no-repeat; }
.art-caption { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:12px 0; }
.art-caption h3 { margin:0; font-size:1rem; font-weight:600; text-wrap:balance; }
#art-position { white-space:nowrap; font:.75rem var(--mono); color:var(--weak); }
.art-tools { display:grid; grid-template-columns:auto 1fr auto; gap:7px; align-items:center; }
.art-tools button,.art-tools select { min-height:38px; border:1px solid var(--line-strong); background:var(--inset); color:var(--main); padding:4px 9px; font-size:.875rem; border-radius:4px; }
.art-tools select { min-width:0; width:100%; color-scheme:dark; }
.art-tools button:enabled:hover,.art-tools select:hover { border-color:var(--bright); }
.art-links { display:flex; gap:10px; flex-wrap:wrap; color:var(--weak); font-size:.84rem; margin-top:12px; }
.art-links a { color:var(--bright); text-decoration:underline; text-underline-offset:3px; }
.art-select-label { position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden; }
#art-dispatches { font-size:.82rem; margin-top:14px; color:var(--weak); }
#art-dispatches summary { cursor:pointer; }
#art-dispatches ul { padding-inline-start:1.2em; }
#art-dispatches a { color:var(--bright); text-decoration:underline; text-underline-offset:3px; }
