:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --rail: #101317;
  --panel: #161a1f;
  --panel-2: #1c2128;
  --stage: #070809;
  --line: #2a3038;
  --text: #e8eaed;
  --muted: #9aa3ad;
  --faint: #6b7280;
  --danger: #c4543a;
  --live: #c4543a;
  font: 14px/1.45 system-ui, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

/* A row is display:flex, and that wins over the browser's hidden rule.
   Force hidden so a viewer does not see the wall grid, Record, or any
   other control the page has marked hidden. */
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button, input, select, textarea { font: inherit; }

.shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: relative;
  background: var(--rail);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 1rem 0.75rem 0.9rem;
}

.brand {
  display: grid;
  gap: 0.15rem;
  text-decoration: none;
  color: inherit;
  padding: 0.25rem 1.8rem 0.95rem 0.7rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.mark {
  letter-spacing: 0.16em;
  font-weight: 650;
  font-size: 0.92rem;
}

.product {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

nav { display: grid; gap: 0.15rem; }

nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.58rem 0.75rem;
  border-left: 2px solid transparent;
}

nav a:hover { color: var(--text); }

nav a[aria-current="page"] {
  color: var(--text);
  background: var(--panel);
  border-left-color: var(--text);
}

.rail .quiet { margin-top: auto; width: 100%; }

.workspace { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  min-height: 4.4rem;
  padding: 0.45rem 1rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.logo {
  height: 56px;
  width: auto;
  max-width: min(280px, 70vw);
  display: block;
  pointer-events: none;
}

body.hub .shell { display: block; }

body.hub .topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: 0.15rem 0.75rem;
  min-height: 0;
  padding: 0.45rem 1rem 0.15rem;
}

body.hub .airframe { grid-column: 1; grid-row: 1; justify-self: start; }
body.hub .logo { grid-column: 2; grid-row: 1; }
body.hub #logout { grid-column: 3; grid-row: 1; justify-self: end; width: auto; margin: 0; }
body.hub .airframe[hidden],
body.hub #logout[hidden] { display: none !important; }

body.hub .top-links {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.15rem 0.35rem;
  width: 100%;
}

body.pop .top-links,
body.locked .top-links { display: none; }

body.hub .airframe {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.hub .airframe select {
  width: auto;
  min-width: 5.5rem;
  max-width: 14rem;
  padding: 0.28rem 0.45rem;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
}

.grants { display: flex; flex-wrap: wrap; gap: 0.35rem 0.8rem; }
.grants label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.85rem;
}

body.hub .topbar nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  gap: 0.05rem;
}

body.hub .topbar nav a {
  border-left-color: transparent;
  border-bottom: 2px solid transparent;
  padding: 0.38rem 0.7rem;
}

body.hub .topbar nav a[aria-current="page"] {
  background: transparent;
  border-left-color: transparent;
  border-bottom-color: var(--text);
}

body.hub .top-links > .quiet {
  margin: 0 0 0 0.35rem;
  width: auto;
}

main { padding: 1.15rem 1.15rem 2rem; min-width: 0; flex: 1 1 auto; }

body.hub p:empty { display: none; }

body.hub:not(.locked):not(.pop) main { padding-top: calc(1.15rem + 1em); }

body.hub:not(.locked):not(.pop) main > :first-child { margin-top: 0; }

body.locked main { display: grid; place-items: center; align-content: center; }
body.locked main > * { width: min(100%, 26rem); }

h1 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

h2 { margin: 0; }

.lede, .note { color: var(--muted); }
.lede { margin: 0 0 1rem; max-width: 68ch; }

.card, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
}

.card { padding: 1.25rem 1.3rem 1.1rem; }

.panel > h2, .panel-title {
  margin: 0;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pad { padding: 0.85rem 0.9rem 1rem; }

form.stack, fieldset {
  display: grid;
  gap: 0.15rem;
  border: 1px solid var(--line);
  margin: 0 0 0.85rem;
  padding: 0.35rem 0.95rem 0.95rem;
  background: var(--panel);
}

form.stack { border: 0; background: transparent; padding: 0; }

legend {
  padding: 0 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

label {
  display: grid;
  gap: 0.28rem;
  margin: 0.5rem 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

input, select, textarea {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 0.48rem 0.6rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
}

textarea { min-height: 7rem; }

input[type="checkbox"] { width: 1rem; height: 1rem; justify-self: start; }

button {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 0.48rem 0.85rem;
  cursor: pointer;
  width: fit-content;
  font-weight: 550;
}

button:disabled { opacity: 0.55; cursor: default; }

button.pressed {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

button.quiet {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  font-weight: 550;
}

a.quiet {
  display: inline-block;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0.48rem 0.85rem;
  cursor: pointer;
  width: fit-content;
  font: inherit;
  font-weight: 550;
  text-decoration: none;
}

.file-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

.storage { margin: 0.9rem 0.9rem 0.2rem; }
.storage .note { margin: 0 0 0.4rem; }
.storage-track {
  height: 0.55rem;
  background: var(--bg);
  border: 1px solid var(--line);
}
.storage-used { height: 100%; background: var(--text); }
.storage-used.tight { background: var(--danger); }

button.danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  font-weight: 550;
}

.row { display: flex; gap: 0.6rem; align-items: end; flex-wrap: wrap; }
.row label { flex: 1 1 12rem; }
.cam-line {
  display: grid;
  grid-template-columns: 12rem 12rem 6.5rem 6.5rem 5rem;
  align-items: center;
  column-gap: 0.75rem;
  margin: 0.35rem 0;
}
.cam-line button { width: 100%; }
.cam-name, .cam-size { overflow-wrap: anywhere; }
.cam-size { color: var(--muted); }
.log-pop {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 0.9rem 1rem 1rem;
  width: min(40rem, calc(100vw - 2rem));
  max-height: min(32rem, calc(100vh - 2rem));
}
.log-pop::backdrop { background: rgba(0, 0, 0, 0.55); }
.log-pop .log-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}
.log-pop pre {
  margin: 0.6rem 0 0;
  padding: 0.6rem;
  background: var(--stage);
  border: 1px solid var(--line);
  max-height: 22rem;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace;
}
.scan-port { flex: 0 1 9rem; margin: 0; }

.board {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 300px;
  gap: 0.8rem;
  align-items: start;
}

.stage-wrap { background: var(--stage); }
.stage {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  position: relative;
  background: var(--stage);
  border-bottom: 1px solid var(--line);
}

.stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.empty-label {
  color: var(--faint);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.empty-label.address {
  letter-spacing: 0;
  text-transform: none;
  overflow-wrap: anywhere;
  padding: 0 0.75rem;
  text-align: center;
}

.toolbar {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  padding: 0.65rem 0.85rem;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.toolbar .grow { margin-right: auto; color: var(--text); }

button.source-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  color: var(--text);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0.72rem 0.85rem;
  text-align: left;
  font-weight: 550;
}

button.source-item.active {
  background: var(--panel-2);
  box-shadow: inset 2px 0 0 var(--text);
}

.slot, .empty-row {
  margin: 0;
  padding: 0.9rem;
  color: var(--faint);
}

.chip {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chip.live { color: var(--live); }
.chip.live::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: var(--live);
}

.dest { padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); }
.dest-head { display: flex; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.3rem; }
.dest-name { color: var(--text); }
.dest-kind { color: var(--faint); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }

.url {
  display: block;
  color: var(--text);
  word-break: break-all;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.78rem;
}

.ok { color: var(--text); }
.bad { color: var(--danger); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; align-items: start; }
.split.agents { grid-template-columns: minmax(16rem, 1fr) minmax(0, 2fr); }
.agent-card { padding: 0.85rem 1rem 1rem; border-top: 1px solid var(--line); }
.agent-head { display: flex; flex-wrap: wrap; gap: 0.55rem 1rem; align-items: center; }
.agent-head label { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; }
.agent-cam { margin-top: 0.45rem; }

table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

td.dest-path { overflow-wrap: anywhere; }
th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.secret {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 0.75rem 0.85rem;
  margin: 0.6rem 0.9rem;
  word-break: break-all;
  font-family: ui-monospace, Consolas, monospace;
}

.error { color: var(--danger); min-height: 1.2em; }

body.pop .shell { grid-template-columns: 1fr; }
body.pop .rail { display: none; }
body.pop main { padding: 0.6rem 0.6rem 0.4rem; }

.route-help { margin: 0 0 0.75rem; }

.route-frame { position: relative; }

.canvas-tools {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  max-width: calc(100% - 1.1rem);
  pointer-events: none;
}

.canvas-tools > * { pointer-events: auto; }

.canvas-tools .add-panel {
  margin: 0;
  width: min(32rem, 100%);
  max-height: min(70vh, 36rem);
  overflow: auto;
}

.wall {
  display: grid;
  gap: 0.6rem;
  align-items: start;
  width: 100%;
  min-width: 0;
}

/* A fixed count keeps its columns and shares the window. A 420px floor
   made 6, 9, and 16 scroll sideways. Auto still prefers about 420px and
   wraps to another row when the window is narrower than that. The wall
   page also shares the height under the top bar. A 16:9 tile at the full
   window width was taller than that space, so the bar covered the picture. */
.wall[data-count="auto"] { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.wall[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
.wall[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wall[data-count="6"],
.wall[data-count="9"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wall[data-count="16"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.wall.is-focus {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 2.6fr) minmax(0, 0.85fr);
  align-items: stretch;
}

.wall.is-focus .cell.focus { align-self: center; }

.wall.is-focus .cell.focus .stage { min-height: min(62vh, 720px); }

/* The shell has to take the window height. A percentage on the workspace
   does not resolve while the shell's height is auto, and the picture is
   position:absolute, so the tile then collapses to nothing. */
body.hub.wall-fit {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

body.hub.wall-fit .shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

body.hub.wall-fit .workspace {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  overflow: hidden;
}

body.hub.wall-fit main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0.75rem;
}

body.hub.wall-fit .wall {
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
  align-content: stretch;
  grid-auto-rows: minmax(0, 1fr);
}

body.hub.wall-fit .wall:not(.is-focus)[data-count="1"] { grid-template-rows: minmax(0, 1fr); }
body.hub.wall-fit .wall:not(.is-focus)[data-count="4"],
body.hub.wall-fit .wall:not(.is-focus)[data-count="6"] { grid-template-rows: repeat(2, minmax(0, 1fr)); }
body.hub.wall-fit .wall:not(.is-focus)[data-count="9"] { grid-template-rows: repeat(3, minmax(0, 1fr)); }
body.hub.wall-fit .wall:not(.is-focus)[data-count="16"] { grid-template-rows: repeat(4, minmax(0, 1fr)); }

body.hub.wall-fit .cell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

body.hub.wall-fit .wall.is-focus .cell.focus { align-self: stretch; }

body.hub.wall-fit .cell .stage,
body.hub.wall-fit .wall.is-focus .cell.focus .stage {
  aspect-ratio: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.cell[data-path] { cursor: grab; touch-action: none; user-select: none; }
.wall.is-focus .cell[data-path] { cursor: default; touch-action: auto; }
.cell-head button { cursor: pointer; }

.cell.lifting {
  position: fixed;
  z-index: 6;
  pointer-events: none;
  margin: 0;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.cell.slot {
  background: transparent;
  border: 1px dashed var(--line);
}

.cell, .link-card {
  background: var(--panel);
  border: 1px solid var(--line);
  min-width: 0;
}

.cell-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.55rem;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.cell-name { margin-right: auto; min-width: 0; }
.cell .cell-name { display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; min-width: 0; overflow-wrap: anywhere; }
.cell-call { color: var(--muted); font-size: 0.72rem; line-height: 1.2; }

.pop-wrap .stage { aspect-ratio: auto; height: calc(100vh - 8.5rem); }

.board-wrap { position: relative; }

.link-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4.5rem;
}

.column { display: grid; gap: 0.7rem; }

.card-picture {
  aspect-ratio: 16 / 9;
  background: #000;
  position: relative;
  display: grid;
  place-items: center;
}

.card-picture video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.addresses { display: grid; gap: 0.15rem; margin: 0.35rem 0 0.5rem; }

button.port {
  width: 0.72rem;
  height: 0.72rem;
  min-width: 0.72rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--muted);
  background: var(--bg);
  flex: 0 0 auto;
}

button.port.source { cursor: grab; }

.wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}

.wires path.hit {
  fill: none;
  stroke: transparent;
  stroke-width: 14;
  pointer-events: stroke;
  cursor: pointer;
}

.wires path.wire {
  fill: none;
  stroke: #c4543a;
  stroke-width: 1.5;
  pointer-events: none;
}

.wires path.wire.hot { stroke-width: 3.5; }

@media (max-width: 1100px) {
  .board, .split, .split.agents, .link-board { grid-template-columns: 1fr; }
  .link-board { gap: 0.8rem; }
}

.counts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.6rem;
  margin: 0 0 1rem;
}

.count-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 0.85rem 0.9rem;
}

.count-card strong {
  display: block;
  font-size: 1.55rem;
  font-weight: 600;
}

.count-card span {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.url-line {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  margin: 0.35rem 0;
}

.section-break {
  margin: 1.75rem 0 1.25rem;
  border: 0;
  border-top: 1px solid var(--line);
  height: 0;
}

.config-row {
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid var(--line);
}

.config-row label { margin: 0.3rem 0; }

.add-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 0.85rem 0.9rem;
  margin-bottom: 0.75rem;
}

.route-stage {
  overflow: auto;
  background: var(--stage);
  border: 1px solid var(--line);
  min-height: 70vh;
}

.route-canvas {
  position: relative;
  min-height: 70vh;
  min-width: 100%;
}

.route-card {
  position: absolute;
  width: 220px;
  background: var(--panel);
  border: 1px solid var(--line);
  z-index: 1;
  user-select: none;
  overflow: hidden;
}

.route-card .note { overflow-wrap: anywhere; }

.route-card .cell-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  min-width: 1.7rem;
  padding: 0;
}

.copy-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.copy-value {
  flex: 1;
  overflow-wrap: anywhere;
  font-size: 0.8rem;
}

.copy-icon { position: relative; display: inline-grid; }

.copied {
  position: absolute;
  right: 0;
  bottom: 1.7rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 0.12rem 0.4rem;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 3;
}

.copied[hidden] { display: none; }

.disconnect-prompt {
  position: fixed;
  z-index: 7;
  display: grid;
  gap: 0.3rem;
  min-width: 10rem;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 0.45rem;
}

.record-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.route-card input,
.route-card textarea,
.route-card select { user-select: text; }

.route-card .pad { padding: 0.55rem 0.65rem 0.7rem; }
.route-card label { margin: 0.3rem 0; }
.route-card details { margin-top: 0.35rem; }
.route-card summary { cursor: pointer; color: var(--muted); }

.map-frame { position: relative; }

.map-empty {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  z-index: 2;
  max-width: min(28rem, calc(100% - 1.6rem));
  margin: 0;
  padding: 0.45rem 0.6rem;
  background: var(--panel);
  border: 1px solid var(--line);
}

.map-empty[hidden] { display: none; }

.map {
  width: 100%;
  height: min(72vh, 820px);
  background: #0b0d10;
  display: block;
  cursor: grab;
  border: 1px solid var(--line);
  touch-action: none;
}

button.map-pop {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  background: var(--panel);
  color: var(--text);
}

.map-preview {
  position: fixed;
  z-index: 6;
  width: 320px;
  background: var(--panel);
  border: 1px solid var(--line);
  pointer-events: none;
}

.map-preview[hidden] { display: none; }

.map-preview .cell-name { display: block; padding: 0.3rem 0.45rem; }

.player {
  width: min(100%, 960px);
  background: #000;
  margin-top: 0.6rem;
}

@media (max-width: 720px) {
  body.hub .topbar { grid-template-columns: minmax(0, 1fr) auto; }
  body.hub .logo { grid-column: 1 / -1; grid-row: 1; }
  body.hub .airframe { grid-column: 1; grid-row: 2; }
  body.hub #logout { grid-column: 2; grid-row: 2; }
  body.hub .top-links { grid-row: 3; }
  .shell { grid-template-columns: 1fr; }
  .rail { border-right: 0; border-bottom: 1px solid var(--line); }
  nav { grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); }
  .rail .quiet { margin-top: 0.8rem; }
  .counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .url-line { grid-template-columns: 1fr; }
}
