/* best-bot console: Nether Highway. Obsidian shell, portal light only for live
   state; colour owns whole fields. One sans (Overpass, Highway Gothic's open
   descendant) for everything; Overpass Mono only for literal command output. */

@font-face {
  font-family: "Overpass";
  src: url("fonts/overpass-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Overpass Mono";
  src: url("fonts/overpass-mono-var.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --obsidian: #120e18;
  --obsidian-2: #17121f;
  --basalt: #2b2733;
  --basalt-2: #36313f;
  --basalt-3: #474153;
  --ash: #e9e4f0;
  --ash-2: #bdb4cc;
  --ash-3: #8d849d;
  --portal: #9b5cff;
  --portal-ink: #c9a8ff;
  --soul: #4fd6e0;
  --glow: #f2b24c;
  --rack: #c2413a;
  --rack-ink: #ff8f86;
  /* Shell surfaces between obsidian and basalt. */
  --rail-top: #1a1325;
  --seam: #241d2f;
  --edge-hover: #4a4358;
  --dialog: #1a1523;
  --dialog-edge: #3c3249;

  /* State fields: colour owns the whole field, readable across the room. */
  --field-online: #0f3e44;
  --field-offline: #571d1a;
  --field-warn: #523b0e;
  --field-live: #3b2366;
  /* Secondary ink tinted from each field's own hue (all >= 4.5:1 on it). */
  --ink-online: #9fdfe4;
  --ink-offline: #ffb4ad;
  --ink-warn: #ffd88f;
  --ink-live: #d8c2ff;

  --r: 6px;
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --rail: 232px;
  --side: 320px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  font: 400 15px/1.45 "Overpass", system-ui, sans-serif;
  font-feature-settings: "tnum" 1;
  color: var(--ash);
  background: var(--obsidian);
  accent-color: var(--portal);
  caret-color: var(--portal);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--obsidian); }
::selection { background: color-mix(in oklab, var(--portal) 55%, transparent); color: #fff; }
:focus-visible { outline: 2px solid var(--portal); outline-offset: 2px; border-radius: 4px; }
* { scrollbar-color: var(--basalt-3) transparent; scrollbar-width: thin; }
a { color: var(--ash); text-decoration-color: var(--ash-3); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ash); }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0; }
.mono { font-feature-settings: "tnum" 1, "zero" 1; }
.dim { color: var(--ash-2); }
.faint { color: var(--ash-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- controls ---------- */
button, .btn {
  font: 600 0.9rem/1 "Overpass", sans-serif;
  color: var(--ash);
  background: var(--basalt-2);
  border: 1px solid var(--basalt-3);
  border-radius: var(--r);
  padding: 9px 14px 8px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: var(--s2);
  text-decoration: none;
  transition: background 160ms var(--ease), border-color 160ms var(--ease), transform 120ms var(--ease);
}
button:hover, .btn:hover { background: var(--basalt-3); }
button:active, .btn:active { transform: translateY(1px); }
button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
button.primary, .btn.primary { background: var(--ash); border-color: var(--ash); color: var(--obsidian); }
button.primary:hover, .btn.primary:hover { background: #fff; }
button.quiet { background: transparent; border-color: transparent; color: var(--ash-2); }
button.quiet:hover { background: var(--basalt-2); color: var(--ash); }

input, select {
  font: 400 0.95rem/1.2 "Overpass", sans-serif;
  color: var(--ash);
  background: var(--obsidian-2);
  border: 1px solid var(--basalt-3);
  border-radius: var(--r);
  padding: 9px 12px 8px;
  min-width: 0;
}
input::placeholder { color: var(--ash-3); }
input:hover, select:hover { border-color: var(--edge-hover); }
input:focus-visible, select:focus-visible { outline: 2px solid var(--portal); outline-offset: 0; border-color: var(--portal); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font: 700 0.72rem/1 "Overpass", sans-serif; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 5px 7px 4px; border-radius: 3px;
  background: var(--basalt-2); color: var(--ash-2);
}
.chip.live { background: var(--field-live); color: var(--ink-live); }
.chip.ok { background: var(--field-online); color: var(--ink-online); }
.chip.bad { background: var(--field-offline); color: var(--ink-offline); }
.chip.warn { background: var(--field-warn); color: var(--ink-warn); }
.chip.off { color: var(--ash-3); text-decoration: line-through; }

.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--rail) 1fr; grid-template-rows: auto 1fr; min-height: 100vh; }
.shell > .rail { grid-row: 1 / span 2; }
.shell > .main { grid-row: 1 / span 2; }
.rail {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: var(--s5);
  padding: var(--s5) var(--s3);
  background: linear-gradient(180deg, var(--rail-top), var(--obsidian) 70%);
  border-right: 1px solid var(--seam);
}
.brand { display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s2); font-weight: 800; font-size: 1.1rem; letter-spacing: -0.02em; }
.brand-mark { width: 22px; height: 22px; border-radius: 3px; background: var(--ash); box-shadow: inset 0 0 0 5px var(--ash), inset 0 0 0 8px var(--obsidian); flex: none; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: var(--s3);
  padding: 10px var(--s3) 9px; border-radius: var(--r);
  color: var(--ash-2); text-decoration: none; font-weight: 600;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}
.nav a:hover { background: var(--basalt); color: var(--ash); }
.nav a[aria-current="page"] { background: var(--field-live); color: #fff; }
.nav a[aria-current="page"] .icon { color: var(--portal-ink); }
.nav .num { font: 700 0.72rem/1 "Overpass", sans-serif; min-width: 20px; padding: 4px 5px 3px; border-radius: 3px; text-align: center; background: var(--basalt-2); color: var(--ash-2); }
.nav a[aria-current="page"] .num { background: var(--portal); color: #160b26; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--s3); padding: 0 var(--s2); }
.who { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.who .id { min-width: 0; flex: 1; }
.who img, .who .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--basalt-2); flex: none; }
.who .name { font-weight: 700; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .role { font-size: 0.75rem; color: var(--ash-3); text-transform: capitalize; }
.palette-hint { display: flex; justify-content: space-between; align-items: center; width: 100%; color: var(--ash-2); white-space: nowrap; padding-left: var(--s2); padding-right: var(--s2); }
.palette-icon { display: none; }
kbd { font: 700 0.72rem/1 "Overpass", sans-serif; padding: 4px 6px 3px; border-radius: 4px; background: var(--basalt-2); border: 1px solid var(--basalt-3); color: var(--ash-2); }
.conn { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--ash-3); }
.conn .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ash-3); }
.conn.up .dot { background: var(--portal); }
.conn.down .dot { background: var(--rack); }

.main { min-width: 0; padding: var(--s6) var(--s6) var(--s7); display: flex; flex-direction: column; gap: var(--s5); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.page-head p { margin-top: 6px; }

/* ---------- attention plate (the one reversed element per screen) ---------- */
.plate {
  display: flex; align-items: center; gap: var(--s4);
  padding: var(--s4) var(--s5);
  border-radius: var(--r);
  background: var(--ash); color: var(--obsidian);
  box-shadow: 0 12px 32px -18px rgba(0, 0, 0, 0.9);
}
.plate .icon { width: 22px; height: 22px; stroke-width: 2.2; }
.plate strong { font-size: 1.05rem; }
.plate.bad { background: var(--rack); color: #fff; }
.plate.warn { background: var(--glow); color: #2a1a00; }
.plate.calm { background: transparent; color: var(--ash-2); box-shadow: none; padding: 0; }
.plate .grow { flex: 1; min-width: 0; }

/* ---------- fleet: waystations ---------- */
.fleet-layout { display: grid; grid-template-columns: 1fr var(--side); gap: var(--s5); align-items: start; }
.waystations { display: flex; flex-direction: column; gap: var(--s2); }
.station {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(170px, 1fr) minmax(240px, 1.5fr) minmax(120px, 0.6fr);
  align-items: center; gap: var(--s4);
  padding: var(--s4) var(--s5);
  border-radius: var(--r);
  background: var(--field-offline);
  transition: background 300ms var(--ease);
}
.station.online { background: var(--field-online); }
.station.hurt { background: var(--field-warn); }
.station { --ink: var(--ink-offline); }
.station.online { --ink: var(--ink-online); }
.station.hurt { --ink: var(--ink-warn); }
.station .dim, .station .doing { color: var(--ink); }
.station .who-line { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.station .name-row { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.station .who-line h3 { font-size: 1.1rem; }
.station .who-line .dim { font-size: 0.82rem; }
.station .doing { margin-top: 5px; font-size: 0.86rem; color: var(--ash-2); }
.station .doing b { color: var(--ash); font-weight: 600; }
.marker {
  display: inline-flex; align-items: baseline; gap: var(--s4);
  padding: 8px 12px 6px; border-radius: 3px;
  background: color-mix(in oklab, var(--obsidian) 62%, transparent);
  font: 700 1.3rem/1 "Overpass", sans-serif; font-feature-settings: "tnum" 1;
  color: #fff; letter-spacing: -0.01em;
}
.marker b { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; color: var(--ink); margin-right: 5px; }
.marker.none { font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.vitals { display: flex; gap: var(--s4); font-size: 0.9rem; }
.vitals span { display: inline-flex; align-items: center; gap: 6px; }
.vitals .low { color: var(--ink-warn); font-weight: 800; }
.mods { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.mods .chip { background: color-mix(in oklab, var(--obsidian) 50%, transparent); color: var(--ink); }

/* the signature move: portal light sweeps a field when its live data changes */
.sheen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 0%, rgba(155, 92, 255, 0) 30%, rgba(155, 92, 255, 0.32) 50%, rgba(201, 168, 255, 0.12) 56%, transparent 72%);
  transform: translateX(-100%);
  animation: portal 900ms var(--ease) forwards;
}
@keyframes portal { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  .sheen::after { animation: none; transform: none; background: rgba(155, 92, 255, 0.12); }
}

/* ---------- side rail: departures ---------- */
.side { position: sticky; top: var(--s6); display: flex; flex-direction: column; gap: var(--s3); }
.side-panel { background: var(--basalt); border-radius: var(--r); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.side-panel h2 { font-size: 0.95rem; display: flex; justify-content: space-between; align-items: baseline; }
.departures { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.departures li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: var(--s3); padding: 10px 0 9px; border-top: 1px solid var(--basalt-2); }
.departures .pos { font-weight: 800; color: var(--ash-3); font-feature-settings: "tnum" 1; }
.departures li.serving { color: #fff; }
.departures li.serving .pos { color: var(--ink-live); }
.departures .board-empty { grid-template-columns: 34px 1fr; color: var(--ash-3); }

/* ---------- events ---------- */
.filters { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.filters input[type="search"] { flex: 1 1 260px; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-radius: var(--r); background: var(--basalt); overflow: hidden; }
.timeline li { position: relative; overflow: hidden; display: grid; grid-template-columns: 92px 120px 1fr; gap: var(--s4); padding: 12px var(--s4) 11px; border-top: 1px solid color-mix(in oklab, var(--obsidian) 40%, transparent); --ink: var(--ash-2); }
.timeline li.ok { background: var(--field-online); --ink: var(--ink-online); }
.timeline li.bad { background: var(--field-offline); --ink: var(--ink-offline); }
.timeline li.warn { background: var(--field-warn); --ink: var(--ink-warn); }
.timeline li .when, .timeline li dt, .timeline li dd { color: var(--ink); }
.timeline li:first-child { border-top: 0; }
.timeline .when { font-size: 0.82rem; white-space: nowrap; }
.timeline .bot { font-weight: 700; font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; }
.timeline .title { font-weight: 600; }
.timeline dl { display: flex; flex-wrap: wrap; gap: 2px var(--s4); margin: 4px 0 0; font-size: 0.85rem; }
.timeline dt { color: var(--ash-3); }
.timeline dd { margin: 0 0 0 4px; color: var(--ash-2); }
.timeline .pair { display: inline-flex; }
.empty { padding: var(--s6); text-align: center; color: var(--ash-2); display: flex; flex-direction: column; gap: var(--s2); align-items: center; }
.skeleton { height: 46px; border-radius: var(--r); background: linear-gradient(90deg, var(--basalt) 0%, var(--basalt-2) 50%, var(--basalt) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- tables ---------- */
table.grid { width: 100%; border-collapse: collapse; background: var(--basalt); border-radius: var(--r); overflow: hidden; font-size: 0.9rem; }
table.grid th { text-align: left; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ash-3); font-weight: 700; padding: 12px var(--s4) 10px; background: var(--basalt-2); }
table.grid td { padding: 11px var(--s4) 10px; border-top: 1px solid var(--basalt-2); vertical-align: top; }
table.grid tr.fail td { background: color-mix(in oklab, var(--rack) 10%, var(--basalt)); }

/* ---------- audit ---------- */
table.grid .nowrap { white-space: nowrap; }
table.grid .sub { font-size: 0.8rem; color: var(--ash-3); text-transform: capitalize; }
table.grid .detail { font-size: 0.85rem; }

/* ---------- stock ---------- */
.head-actions { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.actions { display: flex; gap: 2px; }
.action-reply { display: flex; align-items: flex-start; gap: var(--s2); width: 100%; }
.action-reply .reply { flex: 1; }
.err { color: var(--rack-ink); }
.facets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: calc(-1 * var(--s3)); }
.facet { padding: 7px 10px 6px; font-weight: 600; font-size: 0.85rem; background: var(--basalt); border-color: transparent; color: var(--ash-2); border-radius: 3px; }
.facet .n { font-weight: 700; font-size: 0.75rem; color: var(--ash-3); }
.facet[aria-pressed="true"] { background: var(--field-live); color: #fff; }
.facet[aria-pressed="true"] .n { color: var(--ink-live); }
.facet.warn[aria-pressed="true"] { background: var(--field-warn); }
.facet.warn[aria-pressed="true"] .n { color: var(--ink-warn); }
table.grid th.num, table.grid td.num { text-align: right; }
table.stock tbody tr { cursor: pointer; transition: background 160ms var(--ease); --ink: var(--ash-3); }
table.stock tbody tr:hover td { background: var(--basalt-2); }
table.stock tbody tr.warn td { background: var(--field-warn); --ink: var(--ink-warn); }
table.stock tbody tr.bad td { background: var(--field-offline); --ink: var(--ink-offline); }
table.stock tbody tr.selected td { background: var(--field-live); --ink: var(--ink-live); }
table.stock td { vertical-align: middle; }
table.stock .count { font-weight: 700; font-size: 1rem; white-space: nowrap; }
table.stock .count .chip { margin-left: var(--s2); vertical-align: 1px; }
table.stock .sig, .drawer .sig { font-size: 0.78rem; color: var(--ink, var(--ash-3)); overflow-wrap: anywhere; }
table.stock td.c-last { color: var(--ink); white-space: nowrap; font-size: 0.85rem; }
table.stock .c-cat .chip { background: color-mix(in oklab, var(--obsidian) 45%, transparent); }
button.link { background: none; border: 0; padding: 0; font: 600 0.95rem/1.3 "Overpass", sans-serif; color: var(--ash); text-align: left; }
button.link:hover { background: none; text-decoration: underline; text-decoration-color: var(--ash-3); text-underline-offset: 3px; }

/* drawer: the item's own sign */
.scrim { position: fixed; inset: 0; z-index: 9; background: rgba(8, 5, 12, 0.5); animation: fade 160ms var(--ease); }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; z-index: 10; top: 0; right: 0; bottom: 0; width: min(480px, 100vw);
  overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: var(--s4);
  padding: var(--s5); background: var(--obsidian-2); border-left: 1px solid var(--seam);
  box-shadow: -28px 0 70px -30px rgba(0, 0, 0, 0.95);
  animation: slide 220ms var(--ease);
}
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .drawer, .scrim { animation: none; } }
.drawer-head { display: flex; align-items: flex-start; gap: var(--s3); }
.drawer-head .grow { flex: 1; min-width: 0; }
.drawer-head h2 { font-size: 1.35rem; }
.total-field { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); padding: var(--s4); border-radius: var(--r); background: var(--field-online); --ink: var(--ink-online); }
.total-field.warn { background: var(--field-warn); --ink: var(--ink-warn); }
.total-field.bad { background: var(--field-offline); --ink: var(--ink-offline); }
.total-field .marker { font-size: 1.7rem; }
.total-field .meta { display: flex; flex-direction: column; gap: 2px; font-size: 0.86rem; color: var(--ink); }
.forecast { font-weight: 600; }
.forecast.bad { color: var(--rack-ink); }
.forecast.warn { color: var(--ink-warn); }
.forecast.ok { color: var(--ink-online); }
.sect { display: flex; flex-direction: column; gap: var(--s2); padding-top: var(--s4); border-top: 1px solid var(--basalt); }
.sect h3 { font-size: 0.95rem; }
.sect .row { display: flex; gap: var(--s2); }
.sect .row input { width: 120px; }
.chart { display: block; width: 100%; height: 150px; background: var(--basalt); border-radius: var(--r); }
.chart.flows { height: 90px; margin-top: var(--s2); }
.chart .area { fill: color-mix(in oklab, var(--ash) 12%, transparent); }
.chart .line { fill: none; stroke: var(--ash); stroke-width: 2; }
.chart .thr { stroke: var(--glow); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart .base { stroke: var(--basalt-3); stroke-width: 1; }
.chart .in { fill: var(--ink-online); }
.chart .out { fill: var(--ink-offline); }
.axis { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--ash-3); margin-top: 4px; }
.axis.legend .in { color: var(--ink-online); }
.axis.legend .out { color: var(--ink-offline); }
.shulker { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; }
.shulker li { aspect-ratio: 1; min-width: 0; position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 3px 4px; border-radius: 3px; background: var(--basalt-2); overflow: hidden; }
.shulker .nm { font-size: 0.68rem; font-weight: 700; line-height: 1; color: var(--ash-3); white-space: nowrap; }
.shulker .ct { align-self: flex-end; font-weight: 800; font-size: 0.8rem; }
.shulker li.emptyslot { background: var(--basalt); }
.locs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.locs li { display: flex; align-items: center; gap: var(--s3); padding: 6px; border-radius: var(--r); background: var(--basalt); --ink: var(--ash-3); }
.locs li.full { --ink: var(--ash-3); }
.locs .ct { margin-left: auto; font-weight: 700; }
.marker.small { font-size: 0.9rem; padding: 5px 8px 4px; gap: var(--s2); }
.marker.small b { font-size: 0.65rem; margin-right: 3px; }
.guide { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.skeleton.tall { height: 160px; }
.contents { list-style: none; margin: var(--s2) 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 0.88rem; }
.contents li { display: flex; align-items: baseline; gap: var(--s3); }
.contents .code { min-width: 34px; font-weight: 700; font-size: 0.75rem; color: var(--ash-3); }
.contents .grow { flex: 1; min-width: 0; }
.sep { margin: 0 0.45em; color: var(--ash-3); }

/* ---------- kits ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--basalt); margin-top: calc(-1 * var(--s2)); }
.tabs a { padding: 9px var(--s3) 8px; color: var(--ash-2); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ash); }
.tabs a[aria-current="page"] { color: #fff; border-bottom-color: var(--portal); }
.kits-layout { display: grid; grid-template-columns: 1fr var(--side); gap: var(--s5); align-items: start; }
.kits-main { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); }
.figure { display: flex; flex-direction: column; gap: 4px; padding: var(--s4); border-radius: var(--r); background: var(--basalt); --ink: var(--ash-3); min-width: 0; }
.figure.ok { background: var(--field-online); --ink: var(--ink-online); }
.figure.bad { background: var(--field-offline); --ink: var(--ink-offline); }
.figure.warn { background: var(--field-warn); --ink: var(--ink-warn); }
.figure.live { background: var(--field-live); --ink: var(--ink-live); }
.figure .n { font-weight: 800; font-size: 1.7rem; line-height: 1.1; letter-spacing: -0.01em; color: #fff; }
.figure .n.small { font-size: 1.1rem; }
.figure .l { font-size: 0.82rem; color: var(--ink); overflow-wrap: anywhere; }
.panel { background: var(--basalt); border-radius: var(--r); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.panel h2 { font-size: 0.95rem; }
.panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.panel .chart { background: var(--obsidian-2); }
.chart.days { height: 120px; }
.tally { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.tally li { position: relative; display: flex; align-items: center; gap: var(--s3); padding: 6px var(--s2) 5px; border-radius: 3px; overflow: hidden; font-size: 0.9rem; }
.tally .bar { position: absolute; inset: 0 auto 0 0; background: var(--basalt-2); z-index: 0; }
.tally.bad .bar { background: var(--field-offline); }
.tally li > :not(.bar) { position: relative; }
.tally .lbl, .tally a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tally b { font-weight: 700; }
.queue li { grid-template-columns: 34px 1fr auto; }
.queue .grow { min-width: 0; }
.queue .grow a { font-weight: 700; text-decoration: none; }
.queue .grow .faint { font-size: 0.8rem; }
.queue .acts { display: flex; gap: 2px; }
.queue .acts button { padding: 6px 8px 5px; font-size: 0.82rem; }
.keys { display: flex; gap: var(--s4); font-size: 0.8rem; color: var(--ash-2); }
.key { display: inline-flex; align-items: center; gap: 6px; }
.key::before { content: ""; width: 10px; height: 10px; border-radius: 2px; }
.key.in::before { background: var(--ink-online); }
.key.out::before { background: var(--ink-offline); }
.side-panel h2 .faint { font-weight: 600; font-size: 0.8rem; }
.count-line { font-size: 0.85rem; margin-bottom: calc(-1 * var(--s3)); }

/* the ledger: one row per request, the outcome owns the field */
.ledger { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-radius: var(--r); overflow: hidden; background: var(--basalt); }
.delivery { --ink: var(--ash-3); border-top: 1px solid color-mix(in oklab, var(--obsidian) 40%, transparent); }
.delivery:first-child { border-top: 0; }
.delivery.ok { background: var(--field-online); --ink: var(--ink-online); }
.delivery.bad { background: var(--field-offline); --ink: var(--ink-offline); }
.delivery.warn { background: var(--field-warn); --ink: var(--ink-warn); }
.delivery.live { background: var(--field-live); --ink: var(--ink-live); }
.delivery .row {
  width: 100%; display: grid; grid-template-columns: 92px minmax(90px, 1fr) minmax(70px, 0.7fr) 120px minmax(0, 2fr) 90px;
  align-items: center; gap: var(--s3); padding: 11px var(--s4) 10px; background: transparent; border: 0; border-radius: 0;
  text-align: left; font: inherit; color: var(--ash); cursor: pointer;
}
.delivery .row:hover { background: color-mix(in oklab, var(--ash) 5%, transparent); }
.delivery .row:active { transform: none; }
.delivery .when, .delivery .bot, .delivery .detail { color: var(--ink); font-size: 0.85rem; }
.delivery .who { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.delivery .kit { font-weight: 600; }
.delivery .chip { background: color-mix(in oklab, var(--obsidian) 50%, transparent); color: var(--ink); }
.delivery .detail { display: flex; flex-wrap: wrap; gap: 2px var(--s3); min-width: 0; }
.delivery .reason { overflow-wrap: anywhere; }
.delivery .bot { text-align: right; }
.timeline-box { padding: 0 var(--s4) var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.steps { list-style: none; margin: 0; padding: var(--s3) var(--s4); border-radius: var(--r); background: color-mix(in oklab, var(--obsidian) 55%, transparent); display: flex; flex-direction: column; gap: 6px; }
.steps li { display: grid; grid-template-columns: 110px 1fr; gap: var(--s3); font-size: 0.9rem; }
.steps .t { color: var(--ink); font-weight: 700; }
.timeline-box .facts { display: flex; flex-wrap: wrap; gap: 4px var(--s4); font-size: 0.85rem; color: var(--ink); }
.timeline-box .facts a { color: var(--ash); }
table.grid.compact { font-size: 0.85rem; background: color-mix(in oklab, var(--obsidian) 55%, transparent); }
table.grid.compact th { background: transparent; }
table.grid.compact td { border-top-color: color-mix(in oklab, var(--obsidian) 40%, transparent); }

/* catalog */
.kit-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s2); }
.kit-card { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4) var(--s5); border-radius: var(--r); background: var(--field-online); --ink: var(--ink-online); }
.kit-card.warn { background: var(--field-warn); --ink: var(--ink-warn); }
.kit-card.bad { background: var(--field-offline); --ink: var(--ink-offline); }
.kit-card.off { background: var(--basalt); --ink: var(--ash-3); }
.kit-card .top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); }
.kit-card h2 { font-size: 1.2rem; }
.kit-card .chip { background: color-mix(in oklab, var(--obsidian) 50%, transparent); color: var(--ink); }
.kit-card .desc { color: var(--ash-2); }
.kit-card .meta { font-size: 0.86rem; color: var(--ink); }
.kit-card .meta b { color: #fff; }
.kit-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.kit-items li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding: 5px 8px 4px; border-radius: 3px; background: color-mix(in oklab, var(--obsidian) 40%, transparent); font-size: 0.9rem; }
.kit-items .have { color: var(--ink); font-size: 0.82rem; white-space: nowrap; }
.kit-items li.short .have { color: var(--ink-offline); font-weight: 700; }
.editor { border: 1px solid var(--basalt-3); }
.editor-head { display: flex; justify-content: space-between; align-items: center; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 700; font-size: 0.9rem; }
.item-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.item-rows li { display: flex; gap: var(--s2); }
.item-rows input[type="text"] { flex: 1; }
.item-rows input.count { width: 90px; }
.checks { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.checks label { display: inline-flex; align-items: center; gap: 6px; }
.editor .row { display: flex; gap: var(--s2); flex-wrap: wrap; }
button.danger { background: var(--field-offline); border-color: var(--field-offline); color: var(--ink-offline); }
button.danger:hover { background: var(--rack); color: #fff; }

/* player */
.flags { margin: 4px 0 0; padding-left: 18px; }
.weeks { list-style: none; margin: 0; padding: 0; height: 110px; display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; }
.weeks li { height: 100%; display: flex; align-items: flex-end; background: var(--obsidian-2); border-radius: 3px; overflow: hidden; }
.weeks .bar { width: 100%; background: var(--ink-online); min-height: 2px; }

/* ---------- map ---------- */
.map-page { display: grid; grid-template-columns: 1fr var(--side); gap: var(--s4); height: calc(100vh - var(--s6) - var(--s7)); min-height: 520px; }
.map-view { position: relative; overflow: hidden; border-radius: var(--r); background: var(--obsidian-2); touch-action: none; cursor: grab; user-select: none; }
.map-view:active { cursor: grabbing; }
.map-view.drawing { cursor: crosshair; }
.map-view .tiles, .map-view .overlay { position: absolute; inset: 0; pointer-events: none; }
.map-view .tiles img { position: absolute; image-rendering: pixelated; }
.overlay text { font: 700 11px "Overpass", sans-serif; fill: #fff; paint-order: stroke; stroke: rgba(8, 5, 12, 0.85); stroke-width: 3px; }
.overlay .area { fill: none; stroke: var(--ash); stroke-width: 2; stroke-dasharray: 8 5; }
.overlay .draft { fill: color-mix(in oklab, var(--portal) 14%, transparent); stroke: var(--portal); stroke-width: 2; }
.overlay .col-plan { fill: none; stroke: var(--portal-ink); stroke-width: 1; }
.overlay .col-free { fill: none; stroke: color-mix(in oklab, var(--ash) 45%, transparent); stroke-width: 1; }
.overlay .tower { fill: var(--ink-online); stroke: var(--field-online); stroke-width: 1; }
.overlay .tower.full { fill: var(--ink-warn); }
.overlay .tower.selected { fill: var(--portal-ink); stroke: #fff; stroke-width: 2; }
.overlay .blocked { stroke: var(--rack); stroke-width: 2; }
.overlay .pt rect { stroke: #120e18; stroke-width: 1.5; }
.overlay .dump rect { fill: var(--glow); }
.overlay .mats rect { fill: var(--ash); }
.overlay .drop { fill: var(--ink-online); fill-opacity: 0.55; }
.overlay .home { fill: none; stroke: var(--ash); stroke-width: 2; }
.overlay .bot-dot circle { fill: var(--ink-online); stroke: #120e18; stroke-width: 2; }
.overlay .bot-dot.off circle { fill: var(--ink-offline); }
.overlay .marker-pin circle { stroke: #120e18; stroke-width: 2; fill: var(--ash); }
.overlay .marker-pin.portal circle { fill: var(--portal-ink); }
.overlay .marker-pin.danger circle { fill: var(--rack); }
.overlay .marker-pin.note circle { fill: var(--glow); }
.map-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2); color: var(--ash-2); text-align: center; padding: var(--s5); pointer-events: none; }
.map-hud { position: absolute; left: var(--s3); bottom: var(--s3); display: flex; align-items: flex-end; gap: var(--s2); }
.map-hud .zoom { display: flex; flex-direction: column; gap: 2px; }
.map-hud .zoom button { width: 34px; height: 34px; justify-content: center; padding: 0; font-size: 1.1rem; background: var(--basalt); }
.map-hud .marker { background: color-mix(in oklab, var(--obsidian) 80%, transparent); --ink: var(--ash-3); }
.map-side { display: flex; flex-direction: column; gap: var(--s2); overflow-y: auto; min-height: 0; }
.seg { display: flex; gap: 2px; }
.seg.wrap { flex-wrap: wrap; }
.seg button { padding: 7px 10px 6px; font-size: 0.85rem; background: var(--basalt-2); border-color: transparent; }
.seg button[aria-pressed="true"] { background: var(--field-live); color: #fff; }
.checks.col { flex-direction: column; gap: 4px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 4px var(--s3); margin: 0; font-size: 0.9rem; }
.kv dt { color: var(--ash-2); }
.kv dd { margin: 0; font-weight: 700; text-align: right; }
.panel .row { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: flex-end; }
.panel .row .field input { width: 100px; }
.tower-chests { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto; }
.tower-chests li { display: grid; grid-template-columns: 44px 1fr auto; gap: var(--s2); padding: 5px 8px 4px; border-radius: 3px; background: var(--obsidian-2); font-size: 0.86rem; }
.tower-chests li.full { background: var(--field-warn); }
.tower-chests .y { color: var(--ash-3); }
.tower-chests a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 0.88rem; }
.map-list li { display: flex; align-items: center; gap: var(--s2); }
.map-list li.off button.link { color: var(--ash-3); }
.map-list .faint { margin-left: auto; font-size: 0.8rem; }
.map-list .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ash); flex: none; }
.map-list .dot.portal { background: var(--portal-ink); }
.map-list .dot.danger { background: var(--rack); }
.map-list .dot.note { background: var(--glow); }
.map-list button.quiet { padding: 4px 6px; font-size: 0.78rem; }
button.link:disabled { color: var(--ash-3); text-decoration: none; cursor: default; opacity: 1; }

/* ---------- bot cockpit ---------- */
a.station-link { color: inherit; text-decoration: none; }
a.station-link:hover { text-decoration: underline; text-decoration-color: var(--ink); }
.inv { display: flex; gap: var(--s3); align-items: flex-start; }
.inv-armor, .inv-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.inv-armor { grid-template-columns: 36px; }
.inv-grid { grid-template-columns: repeat(9, 36px); }
.inv-grid.hotbar { margin-top: var(--s2); }
.slot { position: relative; width: 36px; height: 36px; border-radius: 3px; background: var(--basalt-2); display: flex; align-items: flex-start; justify-content: flex-start; padding: 3px; overflow: hidden; }
.slot.empty { background: var(--obsidian-2); }
.slot.ench { box-shadow: inset 0 0 0 1px var(--portal-ink); }
.slot.selected { outline: 2px solid var(--ash); outline-offset: 0; }
.slot .nm { font-size: 0.66rem; font-weight: 700; color: var(--ash-2); line-height: 1; }
.slot .ct { position: absolute; right: 3px; bottom: 2px; font-weight: 800; font-size: 0.78rem; }
.slot .wear { position: absolute; left: 3px; right: 3px; bottom: 1px; height: 2px; background: var(--glow); }
.slot .wear.bad { background: var(--rack); }
.settings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.settings li { display: flex; align-items: center; gap: var(--s3); font-size: 0.88rem; }
.settings .k { font-weight: 700; }
.settings code { margin-left: auto; color: var(--ash-2); background: var(--obsidian-2); padding: 2px 6px; border-radius: 3px; }
.module-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s2); }
.module-card { display: flex; flex-direction: column; gap: 6px; padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--field-online); --ink: var(--ink-online); }
.module-card.off { background: var(--obsidian-2); --ink: var(--ash-3); }
.module-card .top { display: flex; justify-content: space-between; align-items: center; }
.module-card .dim { color: var(--ink); font-size: 0.85rem; }
.cmds { display: flex; flex-wrap: wrap; gap: 4px; }
button.chip-btn { padding: 4px 7px 3px; font-size: 0.78rem; font-weight: 700; border-radius: 3px; background: color-mix(in oklab, var(--obsidian) 50%, transparent); border-color: transparent; color: var(--ink, var(--ash-2)); }
button.chip-btn:hover { background: var(--obsidian); color: #fff; }
.cmd-args input { flex: 1; min-width: 160px; }
.log { list-style: none; margin: 0; padding: var(--s2) var(--s3); border-radius: var(--r); background: var(--obsidian); max-height: 360px; overflow-y: auto; font: 400 0.8rem/1.5 "Overpass Mono", monospace; display: flex; flex-direction: column; }
.log li { display: grid; grid-template-columns: 80px 46px 1fr; gap: var(--s2); color: var(--ash-2); }
.log .t, .log .lv { color: var(--ash-3); }
.log li.warn .lv, .log li.warn .m { color: var(--ink-warn); }
.log li.error .lv, .log li.error .m { color: var(--ink-offline); }
.log .m { overflow-wrap: anywhere; }

/* ---------- ops ---------- */
.uptime { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.uptime li { display: grid; grid-template-columns: 120px 1fr 52px 210px; align-items: center; gap: var(--s3); font-size: 0.9rem; }
.uptime a { font-weight: 700; text-decoration: none; }
.uptime .track { height: 10px; border-radius: 3px; background: var(--obsidian-2); overflow: hidden; }
.uptime .fill { display: block; height: 100%; background: var(--ink-online); }
.uptime .fill.warn { background: var(--ink-warn); }
.uptime .fill.bad { background: var(--ink-offline); }
.uptime b { text-align: right; }
.rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rules li { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--basalt); }
.rules li.off { opacity: 0.65; }
.rules .grow { flex: 1; min-width: 0; }
.logins { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s2); }
.login-card { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4) var(--s5); border-radius: var(--r); background: var(--field-warn); --ink: var(--ink-warn); }
.login-card .code { font: 800 2rem/1 "Overpass Mono", monospace; letter-spacing: 0.12em; padding: var(--s3); border-radius: var(--r); background: var(--obsidian); color: #fff; text-align: center; }
.login-card .faint { color: var(--ink); }
.toasts { position: fixed; z-index: 30; right: var(--s4); top: var(--s4); display: flex; flex-direction: column; gap: var(--s2); width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--glow); color: #2a1a00; box-shadow: 0 12px 32px -18px rgba(0, 0, 0, 0.9); animation: rise 180ms var(--ease); }
.toast p { font-size: 0.85rem; }
.toast button.quiet { color: #2a1a00; padding: 4px; }
.toast .grow { flex: 1; min-width: 0; }

/* ---------- wall display ---------- */
.wall { position: fixed; inset: 0; z-index: 20; overflow: auto; background: var(--obsidian); padding: var(--s6); display: flex; flex-direction: column; gap: var(--s5); font-size: 1.15rem; }
.wall header { display: flex; justify-content: space-between; align-items: center; }
.wall header .brand { font-size: 1.5rem; }
.wall .conn { font-size: 1rem; }
.wall-fleet { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s3); }
.wall-bot { padding: var(--s5); border-radius: var(--r); background: var(--field-online); --ink: var(--ink-online); display: flex; flex-direction: column; gap: var(--s2); }
.wall-bot.warn { background: var(--field-warn); --ink: var(--ink-warn); }
.wall-bot.bad { background: var(--field-offline); --ink: var(--ink-offline); }
.wall-bot h2 { font-size: 2rem; }
.wall-bot p { color: var(--ink); font-size: 1.2rem; }
.wall-bot .marker { align-self: flex-start; }
.wall-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
.wall-cols h2 { font-size: 1.3rem; margin-bottom: var(--s3); }
.wall-queue, .wall-events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wall-queue li { display: flex; gap: var(--s4); padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--basalt); }
.wall-queue li.serving { background: var(--field-live); }
.wall-queue b { min-width: 48px; color: var(--ash-3); }
.wall-events li { display: grid; grid-template-columns: 120px 1fr; gap: var(--s3); color: var(--ash-2); }
.wall-events li.alert { color: var(--glow); font-weight: 700; }
.wall-events .t { color: var(--ash-3); }

/* ---------- command palette ---------- */
dialog.palette {
  width: min(640px, calc(100vw - 32px)); max-height: min(560px, 80vh);
  padding: 0; border: 1px solid var(--dialog-edge); border-radius: 10px;
  background: var(--dialog); color: var(--ash);
  box-shadow: 0 28px 70px -24px rgba(0, 0, 0, 0.95);
}
dialog.palette::backdrop { background: rgba(8, 5, 12, 0.62); backdrop-filter: blur(2px); }
dialog.palette[open] { animation: rise 180ms var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(6px) scale(0.99); } }
.palette-input { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); border-bottom: 1px solid var(--basalt-2); }
.palette-input input { flex: 1; background: transparent; border: 0; font-size: 1.05rem; padding: 4px 0; }
.palette-input input:focus-visible { outline: none; }
.palette-list { list-style: none; margin: 0; padding: var(--s2); overflow: auto; max-height: 380px; }
.palette-list li button { width: 100%; justify-content: space-between; background: transparent; border: 0; padding: 10px var(--s3) 9px; font-weight: 500; color: var(--ash-2); }
.palette-list li button .k { font-size: 0.72rem; color: var(--ash-3); text-transform: uppercase; letter-spacing: 0.06em; }
.palette-list li button[aria-selected="true"] { background: var(--field-live); color: #fff; }
.palette-run { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.palette-run .row { display: flex; gap: var(--s2); }
.palette-run .row input { flex: 1; }
.palette-run-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.palette-run .err { font-size: 0.9rem; }
.reply { margin: 0; padding: var(--s3); border-radius: var(--r); background: var(--obsidian); font: 400 0.85rem/1.5 "Overpass Mono", monospace; white-space: pre-wrap; color: var(--ash-2); }

/* ---------- sign-in ---------- */
.gate { min-height: 100vh; display: grid; place-items: center; padding: var(--s5); background: var(--obsidian); }
.gate-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: var(--s4); padding: var(--s6); border-radius: 12px; background: var(--basalt); box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9); }
.gate-card .brand { padding: 0; font-size: 1.4rem; }
.gate-card .error { padding: var(--s3); border-radius: var(--r); background: var(--field-offline); color: var(--rack-ink); font-size: 0.9rem; }
.gate-card button { justify-content: center; padding: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .fleet-layout, .kits-layout { grid-template-columns: 1fr; }
  .map-page { grid-template-columns: 1fr; height: auto; }
  .map-view { height: 70vh; }
  .wall-cols { grid-template-columns: 1fr; }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .delivery .row { grid-template-columns: 80px minmax(80px, 1fr) minmax(60px, 0.7fr) 110px minmax(0, 1.5fr); }
  .delivery .bot { display: none; }
  .side { position: static; }
  .station { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  :root { --rail: 0px; }
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .shell > .rail { grid-row: 1; }
  .shell > .main { grid-row: 2; }
  .rail { position: sticky; top: 0; z-index: 5; height: auto; flex-direction: row; align-items: center; gap: var(--s2); padding: var(--s2); border-right: 0; border-bottom: 1px solid var(--seam); overflow-x: auto; }
  .brand span:not(.brand-mark) { display: none; }
  .nav { flex-direction: row; }
  .nav a { grid-template-columns: 18px auto; padding: 6px 5px; }
  .rail { gap: 2px; }
  .nav { gap: 0; }
  .conn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .rail-foot { gap: 2px; }
  .rail-foot button.quiet { padding: 6px; }
  .nav a .label { display: none; }
  .rail-foot { margin: 0 0 0 auto; flex-direction: row; padding: 0; }
  .who .name, .who .role, .who img, .who .avatar, .palette-hint { display: none; }
  .palette-icon { display: inline-flex; }
  .main { padding: var(--s4) var(--s3) var(--s6); }
  .station { grid-template-columns: 1fr; gap: var(--s2); padding: var(--s3) var(--s4); }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .filters input[type="search"] { flex: 1 1 100%; }
  .filters select { flex: 1 1 calc(50% - var(--s2)); }
  .nav .num { display: none; }
  table.stock .c-cat, table.stock .c-chests, table.stock .c-last { display: none; }
  .drawer { padding: var(--s4); }
  .panels { grid-template-columns: 1fr; }
  .inv-grid { grid-template-columns: repeat(9, minmax(0, 1fr)); }
  .inv { flex-direction: column; }
  .inv > div { width: 100%; }
  .inv-armor { grid-template-columns: repeat(5, 36px); }
  .slot { width: auto; aspect-ratio: 1; height: auto; }
  .uptime li { grid-template-columns: 90px 1fr 44px; }
  .uptime li .faint { display: none; }
  .log li { grid-template-columns: 1fr; gap: 0; }
  .wall { padding: var(--s4); }
  .delivery .row { grid-template-columns: 1fr auto; gap: 2px var(--s3); }
  .delivery .when { grid-column: 2; grid-row: 1; text-align: right; }
  .delivery .who, .delivery .kit { grid-column: 1; }
  .delivery .state { grid-column: 2; grid-row: 2; justify-self: end; }
  .delivery .detail { grid-column: 1 / -1; }
  .steps li { grid-template-columns: 80px 1fr; }
  .tabs { overflow-x: auto; }
  .head-actions { width: 100%; }
}
