/* ============================================================
   VOLTLINE / FLEET CONSOLE
   Direction: Terminal
   ============================================================ */

/* Departure Mono (SIL OFL), vendored: the origin serves no CORS header.
   Display layer only. It ships one weight, so JetBrains Mono carries the
   data grid where 500/700 are needed. Falls back silently if absent. */
@font-face {
  font-family: "Departure Mono";
  src: url("fonts/DepartureMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---- surface ---- */
  --bg:          #0c0e10;
  --panel:       #20242a;
  --panel-sunk:  #16191d;
  --raise:       #2a2f36;

  /* ---- ink ---- */
  --bone:        #e6e4dd;   /* 15.7:1 on bg  | 12.6:1 on panel */
  --grey:        #8a9299;   /*  6.14:1 on bg |  4.94:1 on panel */
  --grey-hi:     #a3aab0;   /* only tone allowed on --raise */
  --ink-invert:  #0c0e10;   /* text on amber fill, 10.9:1 */

  /* ---- accent (one, and only one) ---- */
  --amber:       #ffb347;
  --amber-soft:  rgba(255, 179, 71, 0.12);
  --amber-line:  rgba(255, 179, 71, 0.34);
  --amber-glow:  rgba(255, 179, 71, 0.07);

  /* ---- structure ---- */
  --line:        #2f353c;
  --line-soft:   #23282e;
  --line-hair:   rgba(230, 228, 221, 0.06);

  /* ---- type ---- */
  --font-display: "Departure Mono", "JetBrains Mono", ui-monospace, monospace;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-prose:   "Inter", system-ui, sans-serif;

  --fs-nano:  9px;
  --fs-micro: 10px;
  --fs-xs:    11px;
  --fs-sm:    12px;
  --fs-base:  13px;
  --fs-md:    15px;
  --fs-lg:    19px;
  --fs-xl:    26px;
  --fs-xxl:   38px;

  --lh-tight: 1.15;
  --lh-data:  1.3;
  --lh-prose: 1.6;

  --tr-wide:  0.14em;
  --tr-mega:  0.24em;

  /* ---- space ---- */
  --s0: 2px;
  --s1: 4px;
  --s2: 6px;
  --s3: 10px;
  --s4: 14px;
  --s5: 20px;
  --s6: 28px;
  --s7: 40px;
  --s8: 60px;

  /* ---- geometry ---- */
  --r-sm: 2px;
  --r-md: 3px;
  --row-h: 40px;
  --bar-h: 46px;
  --shell: 1560px;

  /* ---- motion ---- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 90ms;
  --med:  180ms;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  line-height: var(--lh-data);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; background: none; border: none; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }

/* ---- focus: never invisible ---- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

::selection { background: var(--amber); color: var(--ink-invert); }

/* visually hidden, still announced */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--raise); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: #3a4048; }

/* ============================================================
   SIGNATURE: SCANLINES + SWEEP
   ============================================================ */
.crt {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
}
.crt::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(230, 228, 221, 0.022) 0px,
    rgba(230, 228, 221, 0.022) 1px,
    transparent 1px,
    transparent 3px
  );
}
.crt::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 220px;
  top: -220px;
  background: linear-gradient(180deg, transparent, var(--amber-glow) 55%, transparent);
  animation: sweep 9s linear infinite;
}
@keyframes sweep {
  0%   { transform: translateY(0); }
  100% { transform: translateY(calc(100vh + 220px)); }
}

/* ============================================================
   COMMAND BAR
   ============================================================ */
.cmdbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: stretch;
  gap: 0;
  height: var(--bar-h);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding-right: var(--s3);
}
.cmdbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--amber-line), transparent 42%);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 0 var(--s5) 0 var(--s4);
  border-right: 1px solid var(--line);
  flex-shrink: 0;
}
.brand__mark {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  letter-spacing: var(--tr-wide);
  color: var(--bone);
}
.brand__mark b { color: var(--amber); font-weight: 400; }
.brand__ver {
  font-size: var(--fs-nano);
  letter-spacing: var(--tr-wide);
  color: var(--grey);
  border: 1px solid var(--line);
  padding: 1px 4px;
  border-radius: var(--r-sm);
}

.cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: var(--amber);
  vertical-align: -2px;
  animation: blink 1.05s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.cmdnav {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
}
.cmdnav a {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 0 var(--s4);
  font-size: var(--fs-xs);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--grey);
  border-right: 1px solid var(--line-soft);
  transition: color var(--fast), background var(--fast);
}
.cmdnav a:hover { color: var(--bone); background: var(--panel-sunk); }
.cmdnav a[aria-current="page"] {
  color: var(--bone);
  background: var(--panel-sunk);
  box-shadow: inset 0 -2px 0 var(--amber);
}

/* availability probe lives in the bar, not a hero */
.probe {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 0 var(--s4);
  border-right: 1px solid var(--line-soft);
  flex: 1;
  min-width: 0;
}
.probe__lbl {
  font-size: var(--fs-nano);
  letter-spacing: var(--tr-wide);
  color: var(--grey);
  text-transform: uppercase;
  flex-shrink: 0;
}
.probe input[type="date"] {
  background: var(--panel-sunk);
  border: 1px solid var(--line);
  color: var(--bone);
  font-size: var(--fs-xs);
  padding: 4px var(--s2);
  border-radius: var(--r-sm);
  min-width: 0;
  width: 128px;
}
.probe input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(0.45);
  cursor: pointer;
}
.probe__dash { color: var(--grey); font-size: var(--fs-xs); }

.bar-right {
  display: flex;
  align-items: center;
  gap: var(--s4);
  margin-left: auto;
  padding-left: var(--s4);
  flex-shrink: 0;
}
.clock {
  font-size: var(--fs-xs);
  color: var(--grey);
  letter-spacing: 0.04em;
}
.clock b { color: var(--bone); font-weight: 400; }

.live {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--fs-nano);
  letter-spacing: var(--tr-wide);
  color: var(--amber);
  border: 1px solid var(--amber-line);
  background: var(--amber-soft);
  padding: 3px var(--s2);
  border-radius: var(--r-sm);
}

/* ============================================================
   DOTS
   ============================================================ */
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.dot--live { background: var(--amber); animation: pulse 1.9s ease-in-out infinite; }
.dot--low  { background: transparent; box-shadow: inset 0 0 0 1.5px var(--amber); }
.dot--out  { background: transparent; box-shadow: inset 0 0 0 1.5px var(--grey); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 179, 71, 0.45); }
  70%      { box-shadow: 0 0 0 5px rgba(255, 179, 71, 0); }
}

/* ============================================================
   TICKER STRIP
   ============================================================ */
.strip {
  display: flex;
  align-items: center;
  gap: var(--s5);
  height: 30px;
  padding: 0 var(--s4);
  background: var(--panel-sunk);
  border-bottom: 1px solid var(--line-soft);
  font-size: var(--fs-micro);
  letter-spacing: 0.06em;
  color: var(--grey);
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.strip::-webkit-scrollbar { display: none; }
.strip b { color: var(--bone); font-weight: 400; }
.strip .amber { color: var(--amber); }
.strip__sep { color: var(--line); }

/* ============================================================
   SHELL
   ============================================================ */
.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--s4);
}

/* home console: filter rail + fleet grid */
.console {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 0;
  border-left: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  min-height: calc(100vh - var(--bar-h) - 30px);
}

/* ---- filter rail ---- */
.rail {
  border-right: 1px solid var(--line-soft);
  padding: var(--s5) var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s5);
}
.rail__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s2);
}
.eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-mega);
  text-transform: uppercase;
  color: var(--grey);
}
.eyebrow--amber { color: var(--amber); }

.fgroup { display: flex; flex-direction: column; gap: var(--s2); }
.fgroup__lbl {
  font-size: var(--fs-nano);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: var(--s1);
}

.search {
  display: flex;
  align-items: center;
  gap: var(--s2);
  background: var(--panel-sunk);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 0 var(--s2) 0 var(--s3);
  transition: border-color var(--fast);
}
.search:focus-within { border-color: var(--amber-line); }
.search input {
  flex: 1;
  min-width: 0;
  padding: 7px 0;
  font-size: var(--fs-sm);
  color: var(--bone);
}
.search input::placeholder { color: var(--grey); }

kbd {
  font-family: var(--font-mono);
  font-size: var(--fs-nano);
  line-height: 1;
  color: var(--grey-hi); /* --grey fails AA on --raise */
  background: var(--raise);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: var(--r-sm);
  padding: 3px 4px;
  min-width: 16px;
  text-align: center;
  flex-shrink: 0;
}

/* segmented radios */
.seg {
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.seg label {
  flex: 1;
  text-align: center;
  font-size: var(--fs-micro);
  letter-spacing: 0.06em;
  padding: 6px var(--s1);
  color: var(--grey);
  cursor: pointer;
  border-right: 1px solid var(--line);
  transition: background var(--fast), color var(--fast);
  white-space: nowrap;
}
.seg label:last-child { border-right: none; }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg label:hover { color: var(--bone); background: var(--panel-sunk); }
.seg label:has(input:checked) { background: var(--amber); color: var(--ink-invert); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--amber); outline-offset: -2px; }

/* checkbox row */
.chk {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 5px 0;
  font-size: var(--fs-sm);
  color: var(--bone);
  cursor: pointer;
}
.chk input { position: absolute; opacity: 0; width: 0; height: 0; }
.chk__box {
  width: 13px;
  height: 13px;
  border: 1px solid var(--line);
  border-radius: 1px;
  background: var(--panel-sunk);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all var(--fast);
}
.chk__box::after {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--ink-invert);
  transform: scale(0);
  transition: transform var(--fast) var(--ease);
}
.chk input:checked + .chk__box,
.addon input:checked + .chk__box { background: var(--amber); border-color: var(--amber); }
.chk input:checked + .chk__box::after,
.addon input:checked + .chk__box::after { transform: scale(1); }
.chk input:focus-visible + .chk__box,
.addon input:focus-visible + .chk__box { outline: 2px solid var(--amber); outline-offset: 2px; }
.chk:hover .chk__box,
.addon:hover .chk__box { border-color: var(--grey); }

/* range slider */
.slider { display: flex; flex-direction: column; gap: var(--s2); }
.slider__val {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--grey);
}
.slider__val b { color: var(--amber); font-weight: 400; }
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: var(--line);
  border-radius: 0;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 16px;
  background: var(--amber);
  border-radius: 1px;
  cursor: grab;
}
input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 16px;
  background: var(--amber);
  border: none;
  border-radius: 1px;
}
input[type="range"]:focus-visible { outline: 2px solid var(--amber); outline-offset: 6px; }

.rail__reset {
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  color: var(--grey);
  text-transform: uppercase;
  border-bottom: 1px dotted var(--line);
  align-self: flex-start;
  transition: color var(--fast);
}
.rail__reset:hover { color: var(--amber); border-bottom-color: var(--amber-line); }

.rail__foot {
  margin-top: auto;
  padding-top: var(--s5);
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.keyrow {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--fs-micro);
  color: var(--grey);
}
.keyrow kbd { margin-right: 1px; }

/* ============================================================
   FLEET PANE
   ============================================================ */
.fleet { display: flex; flex-direction: column; min-width: 0; }

.fleet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  padding: var(--s4) var(--s4);
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.fleet__title {
  display: flex;
  align-items: baseline;
  gap: var(--s3);
}
.fleet__title h1 {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 400;
  letter-spacing: var(--tr-wide);
  color: var(--bone);
  line-height: var(--lh-tight);
}
.fleet__count {
  font-size: var(--fs-xs);
  color: var(--grey);
}
.fleet__count b { color: var(--amber); font-weight: 400; }

.probe-out { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-xs); }
.probe-out .ok { color: var(--amber); }
.probe-out .muted { color: var(--grey); }

/* ---- the table ---- */
/* No overflow here at desktop width: `overflow-x:auto` would make this a
   scroll container and the sticky thead would resolve against it, dropping
   the header 76px down over the first rows. Horizontal scroll is switched
   on only in the narrow media query, where the header goes static. */
.tablewrap { overflow-x: visible; }
.grid { min-width: 940px; font-size: var(--fs-sm); }

.grid thead th {
  position: sticky;
  top: calc(var(--bar-h) + 30px);
  z-index: 20;
  background: var(--bg);
  text-align: left;
  font-weight: 400;
  font-size: var(--fs-nano);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--grey);
  border-bottom: 1px solid var(--line);
  padding: 0;
  height: 28px;
  white-space: nowrap;
}
.grid thead th button {
  display: flex;
  align-items: center;
  gap: var(--s1);
  width: 100%;
  height: 28px;
  padding: 0 var(--s3);
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  transition: color var(--fast);
}
.grid thead th button:hover { color: var(--bone); }
.grid thead th .arrow { opacity: 0; color: var(--amber); }
.grid thead th[aria-sort] button { color: var(--bone); }
.grid thead th[aria-sort] .arrow { opacity: 1; }
.grid thead th[aria-sort="descending"] .arrow { transform: rotate(180deg); }
.grid thead th:not(:has(button)) { padding: 0 var(--s3); }

.grid tbody td {
  border-bottom: 1px solid var(--line-hair);
  padding: 0 var(--s3);
  height: var(--row-h);
  vertical-align: middle;
  white-space: nowrap;
}
.row { transition: background var(--fast); }
.row:nth-child(4n + 1) { background: rgba(230, 228, 221, 0.012); }
.row:hover { background: var(--panel-sunk); }
.row.is-cursor { background: var(--panel); box-shadow: inset 3px 0 0 var(--amber); }
.row.is-out { color: var(--grey); }

.c-status { width: 104px; }
.status {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--fs-nano);
  letter-spacing: var(--tr-wide);
}
.status--ready { color: var(--amber); }
.status--low   { color: var(--amber); }
.status--out   { color: var(--grey); }

.c-unit { width: 210px; }
.unit { display: flex; flex-direction: column; gap: 1px; line-height: 1.25; }
.unit__id {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  letter-spacing: 0.08em;
  color: var(--bone);
}
.unit__name { font-size: var(--fs-micro); color: var(--grey); }

.num { color: var(--bone); }
.num small { color: var(--grey); font-size: var(--fs-micro); margin-left: 2px; }

.c-rate { text-align: right; width: 118px; }
.rate {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  color: var(--bone);
  letter-spacing: 0.02em;
}
.rate small {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--grey);
  letter-spacing: 0;
}

.c-act { width: 158px; text-align: right; }
.c-exp { width: 40px; }

.expand {
  font-size: var(--fs-xs);
  color: var(--grey);
  padding: 4px 2px;
  transition: color var(--fast);
  letter-spacing: -0.05em;
}
.expand:hover { color: var(--amber); }

/* reserve button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  height: 26px;
  padding: 0 var(--s3);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--bone);
  background: var(--raise);
  transition: background var(--fast), border-color var(--fast), color var(--fast);
}
.btn:hover { border-color: var(--grey); }
.btn kbd { background: transparent; border-color: var(--line); }

.btn--amber {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink-invert);
  font-weight: 500;
}
.btn--amber:hover { background: #ffc366; border-color: #ffc366; }
.btn--amber kbd {
  color: var(--ink-invert);
  background: rgba(12, 14, 16, 0.14);
  border-color: rgba(12, 14, 16, 0.28);
}
.btn--ghost { background: transparent; color: var(--grey); }
.btn--ghost:hover { color: var(--bone); border-color: var(--grey); }
.btn[disabled], .btn[aria-disabled="true"] {
  background: transparent;
  border-color: var(--line-soft);
  color: var(--grey);
  cursor: not-allowed;
}
.btn--lg { height: 40px; font-size: var(--fs-xs); width: 100%; }

/* ---- expandable detail row ---- */
/* outweighs `.grid tbody td` so the spec grid runs full bleed */
.grid tbody .detail td {
  padding: 0;
  height: auto;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.detail[hidden] { display: none; }
.spec {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border-top: 1px solid var(--line-soft);
}
.spec__cell { background: var(--panel); padding: var(--s3) var(--s4); white-space: normal; }
.spec__k {
  font-size: var(--fs-nano);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 3px;
}
.spec__v { font-size: var(--fs-sm); color: var(--bone); }
.spec__v.amber { color: var(--amber); }

/* ---- swap states ---- */
.skel { display: none; }
.is-loading .skel { display: table-row-group; }
.is-loading .rows { display: none; }
.skel td { border-bottom: 1px solid var(--line-hair); height: var(--row-h); padding: 0 var(--s3); }
.skel-bar {
  height: 9px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--panel) 0%, var(--raise) 50%, var(--panel) 100%);
  background-size: 300% 100%;
  animation: shimmer 1.15s linear infinite;
}
@keyframes shimmer {
  0%   { background-position: 150% 0; }
  100% { background-position: -150% 0; }
}

.empty {
  white-space: normal; /* td sets nowrap; the hint has to wrap */
  padding: var(--s8) var(--s5);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
}
.empty__mark {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  color: var(--amber);
  letter-spacing: var(--tr-wide);
}
.empty__msg { font-size: var(--fs-sm); color: var(--bone); }
.empty__hint { font-size: var(--fs-xs); color: var(--grey); max-width: 44ch; line-height: var(--lh-prose); }

/* ============================================================
   HOW IT WORKS (a real sequence, so it gets numbers)
   ============================================================ */
.proc {
  border-top: 1px solid var(--line);
  padding: var(--s6) var(--s4) var(--s7);
}
.proc__head { display: flex; align-items: baseline; gap: var(--s3); margin-bottom: var(--s5); }
.proc__head h2 {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 400;
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
}
.log { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.log__step {
  background: var(--bg);
  padding: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  position: relative;
  transition: background var(--fast);
}
.log__step:hover { background: var(--panel-sunk); }
.log__n {
  font-family: var(--font-display);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-wide);
  color: var(--amber);
}
.log__t { font-size: var(--fs-sm); color: var(--bone); letter-spacing: 0.04em; text-transform: uppercase; }
.log__d {
  font-family: var(--font-prose);
  font-size: var(--fs-sm);
  line-height: var(--lh-prose);
  color: var(--grey);
}

/* ============================================================
   FOOTER
   ============================================================ */
.foot {
  border-top: 1px solid var(--line);
  background: var(--panel-sunk);
}
.foot__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--s5);
  padding: var(--s6) var(--s4);
  max-width: var(--shell);
  margin: 0 auto;
}
.foot__col { display: flex; flex-direction: column; gap: var(--s2); }
.foot__lbl {
  font-size: var(--fs-nano);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: var(--s1);
}
.foot__line { font-size: var(--fs-sm); color: var(--bone); }
.foot__line--dim { font-size: var(--fs-xs); color: var(--grey); }
.foot a.foot__line:hover { color: var(--amber); }
.foot__prose {
  font-family: var(--font-prose);
  font-size: var(--fs-sm);
  line-height: var(--lh-prose);
  color: var(--grey);
  max-width: 40ch;
}
.foot__bar {
  border-top: 1px solid var(--line-soft);
  padding: var(--s3) var(--s4);
  max-width: var(--shell);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
  font-size: var(--fs-micro);
  letter-spacing: 0.06em;
  color: var(--grey);
  flex-wrap: wrap;
}

/* ============================================================
   BOOKING: TWO-PANE CONSOLE
   ============================================================ */
.book {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  border-left: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  min-height: calc(100vh - var(--bar-h) - 30px);
}
.pane-form { border-right: 1px solid var(--line-soft); }
.pane-sum { background: var(--panel-sunk); }

.sec { border-bottom: 1px solid var(--line-soft); padding: var(--s5) var(--s5) var(--s6); }
.sec__head { display: flex; align-items: baseline; gap: var(--s3); margin-bottom: var(--s5); }
.sec__n {
  font-family: var(--font-display);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-wide);
  color: var(--amber);
  border: 1px solid var(--amber-line);
  background: var(--amber-soft);
  padding: 2px 5px;
  border-radius: var(--r-sm);
}
.sec__head h2 {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 400;
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--bone);
}
.sec__note { margin-left: auto; font-size: var(--fs-micro); color: var(--grey); letter-spacing: 0.06em; }

.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.field { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field > label {
  font-size: var(--fs-nano);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--grey);
  display: flex;
  gap: var(--s2);
  align-items: center;
}
.field > label .req { color: var(--amber); }

.input {
  background: var(--panel-sunk);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px var(--s3);
  font-size: var(--fs-base);
  color: var(--bone);
  width: 100%;
  transition: border-color var(--fast), background var(--fast);
}
.pane-form .input { background: var(--bg); }
.input::placeholder { color: var(--grey); }
.input:hover { border-color: var(--grey); }
.input:focus { border-color: var(--amber); outline: none; box-shadow: 0 0 0 3px var(--amber-soft); }
.input[aria-invalid="true"] { border-color: var(--amber); background: var(--amber-soft); }
.input::-webkit-calendar-picker-indicator { filter: invert(1) opacity(0.45); cursor: pointer; }
select.input { appearance: none; cursor: pointer; padding-right: var(--s6); }

.hint { font-size: var(--fs-micro); color: var(--grey); }
.err { font-size: var(--fs-micro); color: var(--amber); display: none; }
.field.has-err .err { display: block; }

/* unit picker */
.units { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.unitcard { position: relative; cursor: pointer; }
.unitcard input { position: absolute; opacity: 0; width: 0; height: 0; }
.unitcard__box {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg);
  padding: var(--s3);
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  transition: border-color var(--fast), background var(--fast);
  height: 100%;
}
.unitcard:hover .unitcard__box { border-color: var(--grey); }
.unitcard input:checked + .unitcard__box {
  border-color: var(--amber);
  background: linear-gradient(180deg, var(--amber-soft), transparent 70%);
}
.unitcard input:focus-visible + .unitcard__box { outline: 2px solid var(--amber); outline-offset: 2px; }
.unitcard__id { font-family: var(--font-display); font-size: var(--fs-sm); letter-spacing: 0.08em; color: var(--bone); }
.unitcard__meta { font-size: var(--fs-micro); color: var(--grey); }
.unitcard__rate { font-size: var(--fs-sm); color: var(--amber); margin-top: auto; padding-top: var(--s2); }

/* addons */
.addons { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.addon {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background var(--fast);
}
.addon:last-child { border-bottom: none; }
.addon:hover { background: var(--panel-sunk); }
.addon:has(input:checked) { background: var(--amber-soft); }
.addon input { position: absolute; opacity: 0; width: 0; height: 0; }
.addon__txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.addon__name { font-size: var(--fs-sm); color: var(--bone); }
.addon__desc {
  font-family: var(--font-prose);
  font-size: var(--fs-xs);
  color: var(--grey);
  line-height: 1.45;
}
.addon__price { margin-left: auto; text-align: right; flex-shrink: 0; }
.addon__amt { font-size: var(--fs-sm); color: var(--bone); }
.addon__unit { font-size: var(--fs-nano); color: var(--grey); letter-spacing: 0.06em; }
.addon kbd { margin-left: var(--s2); flex-shrink: 0; }

/* ---- summary pane ---- */
.sum {
  position: sticky;
  top: calc(var(--bar-h) + 30px);
  padding: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  max-height: calc(100vh - var(--bar-h) - 30px);
  overflow-y: auto;
}
.sum__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--line);
}
.sum__head h2 {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 400;
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--bone);
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--panel);
  padding: var(--s4);
}
.card--unit { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.card--unit .unit__id { font-size: var(--fs-base); }
/* only --grey-hi is legible on --panel-adjacent raised fills */
.card--unit .unit__name,
.card .dim { color: var(--grey-hi); font-size: var(--fs-micro); }

.dates { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s3); }
.dates__d { display: flex; flex-direction: column; gap: 2px; }
.dates__k { font-size: var(--fs-nano); letter-spacing: var(--tr-wide); text-transform: uppercase; color: var(--grey-hi); }
.dates__v { font-size: var(--fs-sm); color: var(--bone); }
.dates__span {
  font-size: var(--fs-micro);
  color: var(--amber);
  border: 1px solid var(--amber-line);
  border-radius: var(--r-sm);
  padding: 2px 5px;
  white-space: nowrap;
}

.lines { display: flex; flex-direction: column; }
.line {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  padding: 7px 0;
  font-size: var(--fs-sm);
  border-bottom: 1px solid var(--line-hair);
}
.line__k { color: var(--bone); white-space: nowrap; }
.line__q { color: var(--grey); font-size: var(--fs-micro); }
.line__fill { flex: 1; border-bottom: 1px dotted var(--line); transform: translateY(-3px); }
.line__v { color: var(--bone); white-space: nowrap; }
.line--sub .line__k, .line--sub .line__v { color: var(--grey); }
.line--none { color: var(--grey); font-size: var(--fs-xs); padding: 7px 0; }

.total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  padding-top: var(--s4);
  margin-top: var(--s1);
  border-top: 1px solid var(--amber-line);
}
.total__k {
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--grey);
}
.total__v {
  font-family: var(--font-display);
  font-size: var(--fs-xxl);
  line-height: 1;
  color: var(--amber);
  letter-spacing: 0.01em;
}
.total__v.is-flash { animation: flash var(--med) var(--ease); }
@keyframes flash {
  0% { transform: translateY(-2px); opacity: 0.4; }
  100% { transform: none; opacity: 1; }
}

.paynote {
  font-family: var(--font-prose);
  font-size: var(--fs-xs);
  line-height: var(--lh-prose);
  color: var(--grey);
}
.paynote b { color: var(--bone); font-weight: 500; }

/* error + confirm blocks in swapped region */
.alert {
  border: 1px solid var(--amber-line);
  background: var(--amber-soft);
  border-radius: var(--r-sm);
  padding: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.alert__t {
  font-size: var(--fs-xs);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--amber);
}
.alert ul { display: flex; flex-direction: column; gap: var(--s1); }
.alert li { font-size: var(--fs-sm); color: var(--bone); }
.alert li::before { content: "> "; color: var(--amber); }

.confirm { display: flex; flex-direction: column; gap: var(--s4); text-align: left; }
.confirm__code {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  color: var(--amber);
  letter-spacing: var(--tr-wide);
}
.confirm__row { font-size: var(--fs-sm); color: var(--bone); }

.spin {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s6) 0;
  font-size: var(--fs-sm);
  color: var(--grey);
  justify-content: center;
}
.spin__dot { width: 5px; height: 5px; background: var(--amber); border-radius: 50%; animation: bounce 0.9s ease-in-out infinite; }
.spin__dot:nth-child(2) { animation-delay: 0.12s; }
.spin__dot:nth-child(3) { animation-delay: 0.24s; }
@keyframes bounce { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

.htmx-request .btn--submit { opacity: 0.55; pointer-events: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Below this the grid overflows its column, so it becomes the scroll
   container and the header can no longer stick to the viewport. */
@media (max-width: 1240px) {
  .tablewrap { overflow-x: auto; }
  .grid thead th { position: static; }
}

@media (max-width: 1180px) {
  .book { grid-template-columns: minmax(0, 1fr) 340px; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
  .probe { display: none; }
  .console { grid-template-columns: 1fr; }
  .rail {
    border-right: none;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--s4);
    padding: var(--s4);
  }
  .rail__head { width: 100%; }
  .fgroup { flex: 1 1 190px; }
  .rail__foot { display: none; }
  .log { grid-template-columns: repeat(2, 1fr); }
  .book { grid-template-columns: 1fr; }
  .pane-form { border-right: none; }
  .pane-sum { border-top: 1px solid var(--line); }
  .sum { position: static; max-height: none; }
}

@media (max-width: 620px) {
  .cmdbar { height: auto; flex-wrap: wrap; padding: 0; }
  /* brand and status share row one, nav takes row two */
  .brand { flex: 1 1 auto; height: var(--bar-h); border-right: none; border-bottom: 1px solid var(--line-soft); }
  .bar-right { order: -1; height: var(--bar-h); padding-right: var(--s4); border-bottom: 1px solid var(--line-soft); }
  .cmdnav { width: 100%; }
  .cmdnav a { flex: 1; justify-content: center; }
  .cmdnav a:last-child { border-right: none; }
  .shell { padding: 0; }
  .console, .book { border-left: none; border-right: none; }
  .fields { grid-template-columns: 1fr; }
  .units { grid-template-columns: 1fr; }
  .log { grid-template-columns: 1fr; }
  .foot__grid { grid-template-columns: 1fr; }
  .sec { padding: var(--s5) var(--s4); }
  .sum { padding: var(--s4); }
  .clock { display: none; }
  .total__v { font-size: var(--fs-xl); }
}

@media (max-width: 380px) {
  .fleet__head { padding: var(--s3); }
  .rail { padding: var(--s3); }
  .brand { padding: 0 var(--s3); }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .crt::after { display: none; }
  .cursor { opacity: 1; }
  .dot--live { box-shadow: 0 0 0 3px rgba(255, 179, 71, 0.18); }
  .spin__dot { opacity: 1; }
  .skel-bar { background: var(--raise); }
}
