/* SRS Access — "daylight master control" design system (2026-07-10 rebuild).
 *
 * Ground-up visual identity for the redesign outline. Nothing here is carried
 * over from the previous portal — different faces, palette, and structure.
 * The world is the daylight master-control suite: brushed-aluminum faceplate
 * surfaces, recessed panel wells, silkscreened condensed labels, keycap state
 * language, one REC-red accent, patch-green ready states.
 *
 * Vocabulary:
 *   .frame / .rail / .deck      page chrome (public frame, portal patch-rail)
 *   .well                       recessed panel section (replaces "cards")
 *   .strip                      channel strip — a large horizontal action row
 *   .keycap / .k-*              console key state language (replaces lamps)
 *   .ledger                     data ledger (replaces filterable tables)
 *   .cue-sheet / .cue           the Inbox signature: numbered broadcast cues
 *   .sheet                      right slide-over decision/detail sheet
 *   .track                      wizard track view (progress rail + one step)
 *   .pipeline                   request stage pipeline
 */

/* ---- Faces ------------------------------------------------------------- */
@font-face {
  font-family: 'Plex Sans';
  src: url('/assets/fonts/plex-sans-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Plex Sans';
  src: url('/assets/fonts/plex-sans-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Plex Sans';
  src: url('/assets/fonts/plex-sans-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Plex Cond';
  src: url('/assets/fonts/plex-cond-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('/assets/fonts/plex-mono-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('/assets/fonts/plex-mono-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ---- Tokens ------------------------------------------------------------ */
:root {
  /* Console surfaces */
  --faceplate: #edefec;   /* brushed aluminum base */
  --faceplate-hi: #f6f7f5;/* raised edge highlight */
  --well: #e2e5e0;        /* recessed panel well */
  --well-deep: #d7dbd5;   /* deeper recess (ledger headers, rails) */
  --paper: #fbfcfa;       /* input/reading surfaces inside wells */

  /* Engraving */
  --ink: #14171a;         /* engineering ink */
  --ink-2: #4d545a;       /* engraved secondary */
  --ink-3: #7b8288;       /* etched hints */
  --line: #b9bfb8;        /* panel engraving line */
  --line-soft: #ccd1ca;

  /* Function colors — used for state, never decoration */
  --rec: #c2312b;         /* REC red: live, destructive, faults */
  --rec-deep: #9b241f;
  --patch: #1f6e5a;       /* patch green: ready/active */
  --cue: #9c6410;         /* cue amber: pending/standby */
  --off: #8b9190;         /* unlit key */

  --focus: #14509e;       /* keyboard focus ring only */

  --f-body: 'Plex Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --f-label: 'Plex Cond', 'Arial Narrow', 'Helvetica Neue Condensed', sans-serif;
  --f-data: 'Plex Mono', 'Cascadia Mono', Consolas, monospace;

  --r-key: 5px;           /* keycap radius */
  --r-well: 10px;         /* well radius */
  --shadow-key: 0 1px 0 rgba(20, 23, 26, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  --shadow-key-down: 0 0 0 rgba(20, 23, 26, 0.28), inset 0 1px 2px rgba(20, 23, 26, 0.22);
  --inset-well: inset 0 1px 3px rgba(20, 23, 26, 0.12), inset 0 0 0 1px var(--line-soft);
}

/* ---- Reset + base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    repeating-linear-gradient(90deg, rgba(20, 23, 26, 0.012) 0 1px, transparent 1px 7px),
    var(--faceplate);
  color: var(--ink);
  font: 400 15px/1.55 var(--f-body);
  min-height: 100vh;
}
h1, h2, h3, h4 { margin: 0 0 0.4em; font-weight: 600; line-height: 1.2; }
h1 { font-size: 1.7rem; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0.35em 0; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--rec); }
code, .data { font-family: var(--f-data); font-size: 0.88em; font-variant-numeric: tabular-nums; }
.dim { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.fine { font-size: 0.83rem; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
  padding: 8px 14px; z-index: 100; border-radius: 0 0 var(--r-key) 0;
}
.skip:focus { left: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- Silkscreen labels --------------------------------------------------- */
.label {
  font-family: var(--f-label); font-weight: 600; font-size: 0.74rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2);
}
.label-rule { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.label-rule::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---- Keycaps: the state language ---------------------------------------- */
.keycap {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--f-label); font-weight: 600; font-size: 0.7rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 2px 9px 3px; border-radius: var(--r-key);
  background: linear-gradient(var(--faceplate-hi), var(--well));
  border: 1px solid var(--line); box-shadow: var(--shadow-key);
  color: var(--ink-2); white-space: nowrap; vertical-align: middle;
}
.keycap::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--off); }
.k-ready { color: var(--patch); }
.k-ready::before { background: var(--patch); box-shadow: 0 0 5px rgba(31, 110, 90, 0.55); }
.k-standby { color: var(--cue); }
.k-standby::before { background: var(--cue); box-shadow: 0 0 5px rgba(156, 100, 16, 0.5); }
.k-fault { color: var(--rec); }
.k-fault::before { background: var(--rec); box-shadow: 0 0 6px rgba(194, 49, 43, 0.55); }
.k-off::before { background: var(--off); }
.k-view { color: var(--ink-3); }
.k-view::before { width: 9px; height: 5px; border-radius: 3px; background: transparent; border: 1px solid var(--ink-3); }
/* Provenance tags: etched, never lit (5.C) */
.etch {
  display: inline-block; font-family: var(--f-label); font-weight: 600;
  font-size: 0.66rem; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--ink-3); border: 1px dashed var(--line); border-radius: 3px;
  padding: 1px 7px; vertical-align: middle;
}

/* ---- Buttons: console keys ---------------------------------------------- */
.key {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 0.85rem/1 var(--f-body); letter-spacing: 0.01em;
  color: var(--ink); background: linear-gradient(var(--faceplate-hi), #e6e8e4);
  border: 1px solid var(--ink-2); border-radius: var(--r-key);
  box-shadow: var(--shadow-key); padding: 10px 18px; cursor: pointer;
  text-decoration: none; transition: transform 60ms ease, box-shadow 60ms ease;
}
.key:hover { background: linear-gradient(#fff, #eceeea); }
.key:active { transform: translateY(1px); box-shadow: var(--shadow-key-down); }
.key[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.key-rec {
  color: #fff; background: linear-gradient(#d24840, var(--rec));
  border-color: var(--rec-deep);
}
.key-rec:hover { background: linear-gradient(#da5850, var(--rec)); }
.key-quiet { border-color: var(--line); color: var(--ink-2); background: transparent; box-shadow: none; }
.key-quiet:hover { background: rgba(20, 23, 26, 0.05); }
.key-sm { padding: 6px 12px; font-size: 0.78rem; }
.key-inline { padding: 2px 8px; font-size: 0.76rem; border-radius: 4px; }

/* ---- Page frames --------------------------------------------------------- */
.frame { max-width: 1160px; margin: 0 auto; padding: 26px 28px 64px; }
.frame-narrow { max-width: 560px; }
.masthead { display: flex; align-items: baseline; gap: 14px; padding: 6px 2px 18px; }
.masthead .word {
  font-family: var(--f-label); font-weight: 600; font-size: 1.05rem;
  letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none; color: var(--ink);
}
.masthead .word b { color: var(--rec); font-weight: 600; }
.masthead .sub { font-size: 0.8rem; color: var(--ink-3); letter-spacing: 0.04em; }
.masthead .end { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* Public hero: silkscreened panel identity */
.panel-id { text-align: center; margin: 30px 0 34px; }
.panel-id .word {
  font-family: var(--f-label); font-weight: 600; font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  letter-spacing: 0.34em; text-transform: uppercase; text-indent: 0.34em;
}
.panel-id .word b { color: var(--rec); font-weight: 600; }
.panel-id .sub {
  margin-top: 6px; font-size: 0.86rem; color: var(--ink-2); letter-spacing: 0.08em;
}
.panel-id .engrave {
  margin: 18px auto 0; width: min(420px, 70%); height: 6px; border: 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--faceplate-hi);
}

/* ---- Wells --------------------------------------------------------------- */
.well {
  background: var(--well); border-radius: var(--r-well);
  box-shadow: var(--inset-well); padding: 20px 22px; margin: 0 0 18px;
}
.well-paper { background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-soft); }
.well > .label-rule:first-child { margin-top: -2px; }

/* ---- Channel strips (doors, choosers, self-service) ---------------------- */
.strip-set { display: flex; flex-direction: column; gap: 12px; margin: 20px 0; }
.strip {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 18px;
  background: linear-gradient(var(--faceplate-hi), #e8eae6);
  border: 1px solid var(--line); border-radius: var(--r-well);
  box-shadow: var(--shadow-key); padding: 18px 22px;
  text-decoration: none; color: var(--ink); cursor: pointer;
  transition: transform 60ms ease, box-shadow 60ms ease;
}
.strip:active { transform: translateY(1px); box-shadow: var(--shadow-key-down); }
.strip:hover .strip-go { background: var(--ink); color: #fff; }
.strip-port {
  width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #f3f4f1, var(--well-deep) 70%);
  box-shadow: inset 0 1px 3px rgba(20, 23, 26, 0.3), 0 1px 0 rgba(255, 255, 255, 0.7);
  display: flex; align-items: center; justify-content: center;
}
.strip-port::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); }
.strip:hover .strip-port::after { background: var(--rec); }
.strip-title { font-weight: 600; font-size: 1.05rem; display: block; }
.strip-desc { color: var(--ink-2); font-size: 0.88rem; display: block; margin-top: 2px; }
.strip-go {
  font-family: var(--f-label); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; border: 1px solid var(--ink-2); border-radius: var(--r-key);
  padding: 6px 12px; transition: background 80ms ease, color 80ms ease;
}

/* ---- Portal deck: patch rail + program area ------------------------------ */
.deck { display: grid; grid-template-columns: 216px 1fr; min-height: 100vh; }
.rail {
  background: var(--well-deep); box-shadow: var(--inset-well);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 18px;
  position: sticky; top: 0; max-height: 100vh; overflow-y: auto;
}
.rail .word {
  font-family: var(--f-label); font-weight: 600; font-size: 0.9rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink);
  text-decoration: none; padding: 0 8px;
}
.rail .word b { color: var(--rec); font-weight: 600; }
.rail-group { display: flex; flex-direction: column; gap: 1px; }
.rail-label {
  font-family: var(--f-label); font-weight: 600; font-size: 0.66rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3);
  padding: 0 8px; margin: 6px 0 4px;
}
.rail-jack {
  display: flex; align-items: center; gap: 9px; padding: 7px 8px;
  font-size: 0.9rem; color: var(--ink); text-decoration: none; border-radius: var(--r-key);
}
.rail-jack::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #f3f4f1, #b9bfb8 75%);
  box-shadow: inset 0 1px 1px rgba(20, 23, 26, 0.35);
}
.rail-jack:hover { background: rgba(255, 255, 255, 0.5); }
.rail-jack.live { background: var(--paper); font-weight: 600; box-shadow: 0 1px 0 rgba(255,255,255,.8), inset 0 0 0 1px var(--line-soft); }
.rail-jack.live::before { background: var(--rec); box-shadow: 0 0 5px rgba(194, 49, 43, 0.6); }
.rail-foot { margin-top: auto; padding: 10px 8px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.rail-foot .who { font-size: 0.8rem; color: var(--ink-2); overflow-wrap: anywhere; }
.rail-foot .who .data { font-weight: 500; color: var(--ink); }
.program { padding: 24px 30px 70px; min-width: 0; }
.program-head { margin: 0 0 20px; }
.program-head h1 { margin-bottom: 2px; }
.program-head .whatfor { color: var(--ink-2); font-size: 0.92rem; }
.rail-toggle { display: none; }

@media (max-width: 920px) {
  .deck { grid-template-columns: 1fr; }
  .rail {
    position: fixed; inset: 0 28% 0 0; z-index: 40; transform: translateX(-102%);
    transition: transform 150ms ease; box-shadow: 6px 0 22px rgba(20, 23, 26, 0.25);
  }
  .rail.open { transform: none; }
  .rail-toggle { display: inline-flex; }
  .program { padding: 18px 16px 60px; }
  .frame { padding: 18px 16px 48px; }
}

/* ---- The cue sheet (Inbox signature) ------------------------------------- */
.cue-sheet { counter-reset: cue; display: flex; flex-direction: column; gap: 0; }
.cue-part { margin: 0 0 22px; }
.cue-part-head {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px;
}
.cue-part-head .count { font-family: var(--f-data); font-size: 0.8rem; color: var(--ink-3); }
.cue {
  counter-increment: cue;
  display: grid; grid-template-columns: 52px 1fr auto; gap: 16px; align-items: center;
  background: var(--paper); border: 1px solid var(--line-soft); border-top: 0;
  padding: 12px 16px 12px 0; text-decoration: none; color: var(--ink);
}
.cue:first-of-type { border-top: 1px solid var(--line-soft); border-radius: var(--r-key) var(--r-key) 0 0; }
.cue:last-of-type { border-radius: 0 0 var(--r-key) var(--r-key); }
.cue:hover { background: #fff; }
.cue::before {
  content: counter(cue, decimal-leading-zero);
  font-family: var(--f-data); font-size: 0.85rem; color: var(--ink-3);
  text-align: center; border-right: 1px solid var(--line-soft); padding: 2px 0;
}
.cue-what { min-width: 0; }
.cue-who { font-weight: 600; }
.cue-why { color: var(--ink-2); font-size: 0.85rem; display: block; }
.cue-act { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.cue-act .fine { text-align: right; }
.allclear { text-align: center; padding: 44px 20px; }
.allclear .keycap { font-size: 0.8rem; padding: 6px 14px 7px; }
.allclear p { color: var(--ink-2); max-width: 46ch; margin: 10px auto 0; }

/* ---- Ledger: the data surface -------------------------------------------- */
.ledger-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.ledger-scan {
  flex: 0 1 340px; min-width: 220px; font: 400 0.9rem var(--f-body);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-key);
  padding: 8px 12px; box-shadow: inset 0 1px 2px rgba(20, 23, 26, 0.08);
}
.facets { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.facet {
  font-family: var(--f-label); font-weight: 600; font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-2); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer;
}
.facet[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.ledger-well {
  background: var(--paper); border-radius: var(--r-key);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  max-height: 62vh; overflow: auto;
}
table.ledger { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.ledger th {
  position: sticky; top: 0; z-index: 2; background: var(--well-deep);
  font-family: var(--f-label); font-weight: 600; font-size: 0.68rem;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-2);
  text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.ledger td { padding: 10px 14px; border-top: 1px solid var(--line-soft); vertical-align: top; }
.ledger tbody tr:hover { background: rgba(20, 23, 26, 0.025); }
.ledger .id2 .p { font-weight: 600; display: block; }
.ledger .id2 .s { color: var(--ink-2); font-size: 0.82rem; display: block; overflow-wrap: anywhere; }
.ledger-empty { padding: 30px 20px; text-align: center; color: var(--ink-2); }
.ledger-count { font-family: var(--f-data); font-size: 0.78rem; color: var(--ink-3); margin: 8px 2px; }
th .colsort { all: unset; cursor: pointer; display: inline-flex; gap: 5px; align-items: center; }
th .colsort:hover { color: var(--ink); }
th .colsort .dir { font-family: var(--f-data); }

/* ---- Slide-over sheet (decision desk / row detail) ------------------------ */
.sheet-scrim {
  position: fixed; inset: 0; background: rgba(20, 23, 26, 0.32); z-index: 60;
  display: flex; justify-content: flex-end;
}
.sheet {
  width: min(480px, 94vw); height: 100%; overflow-y: auto;
  background: var(--faceplate); box-shadow: -8px 0 30px rgba(20, 23, 26, 0.3);
  padding: 22px 24px 34px; animation: sheet-in 160ms ease;
  display: flex; flex-direction: column; gap: 14px;
}
@keyframes sheet-in { from { transform: translateX(30px); opacity: 0.4; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; }
.sheet-head h2 { margin: 0; }
.sheet-head .x { margin-left: auto; }
.sheet-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.sheet .field { margin: 8px 0; }

/* ---- Spec list (readouts) ------------------------------------------------ */
.spec { margin: 0; display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 4px 18px; }
.spec dt {
  font-family: var(--f-label); font-weight: 600; font-size: 0.68rem;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px;
}
.spec dd { margin: 0; overflow-wrap: anywhere; }

/* ---- Forms ---------------------------------------------------------------- */
.field { display: block; margin: 14px 0; }
.field > .fname {
  display: block; font-family: var(--f-label); font-weight: 600; font-size: 0.7rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 5px;
}
.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="number"], .field input[type="search"], .field select, .field textarea {
  width: 100%; font: 400 0.95rem var(--f-body); color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-key);
  padding: 10px 12px; box-shadow: inset 0 1px 2px rgba(20, 23, 26, 0.08);
}
.field textarea { resize: vertical; }
.field .fhint { display: block; font-size: 0.8rem; color: var(--ink-3); margin-top: 4px; }
.pwd { position: relative; display: block; }
.pwd input { padding-right: 64px; }
.pwd .peek {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-family: var(--f-label); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase;
  background: transparent; border: 1px solid var(--line); border-radius: 4px;
  color: var(--ink-2); padding: 3px 8px; cursor: pointer;
}
.optline { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 0.92rem; cursor: pointer; }
.optline input { accent-color: var(--rec); width: 15px; height: 15px; }
.opt-keys { display: flex; gap: 8px; flex-wrap: wrap; }
.opt-key { position: relative; }
.opt-key input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt-key span {
  display: inline-block; font: 600 0.82rem var(--f-body); padding: 8px 16px;
  background: linear-gradient(var(--faceplate-hi), #e6e8e4);
  border: 1px solid var(--line); border-radius: var(--r-key); box-shadow: var(--shadow-key);
}
.opt-key input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: var(--shadow-key-down); }
.opt-key input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Notices */
.notice { border-radius: var(--r-key); padding: 11px 14px; margin: 10px 0; font-size: 0.9rem; background: var(--paper); }
.notice-ok { box-shadow: inset 0 0 0 1px var(--patch), inset 4px 0 0 var(--patch); }
.notice-err { box-shadow: inset 0 0 0 1px var(--rec), inset 4px 0 0 var(--rec); }
.notice-wait { box-shadow: inset 0 0 0 1px var(--cue), inset 4px 0 0 var(--cue); }

/* Signals (toasts) */
#signal-tray, #signal-tray-alert { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 90; }
#signal-tray-alert { bottom: auto; top: 18px; }
.signal {
  background: var(--ink); color: #fff; border-radius: var(--r-key);
  padding: 11px 16px; font-size: 0.9rem; box-shadow: 0 4px 18px rgba(20, 23, 26, 0.35);
  display: flex; gap: 12px; align-items: center; max-width: 380px;
}
.signal.err { background: var(--rec-deep); }
.signal button { all: unset; cursor: pointer; font-weight: 600; opacity: 0.8; padding: 0 2px; }
.signal button:hover { opacity: 1; }

/* ---- Pipeline (request stages) -------------------------------------------- */
.pipeline { list-style: none; margin: 18px 0 22px; padding: 0; display: flex; overflow-x: auto; }
.pipe { flex: 1 1 0; min-width: 108px; position: relative; text-align: center; padding-top: 22px; }
.pipe::before {
  content: ""; position: absolute; top: 8px; left: calc(-50% + 9px); right: calc(50% + 9px);
  height: 3px; background: var(--line); border-radius: 2px;
}
.pipe:first-child::before { display: none; }
.pipe::after {
  content: ""; position: absolute; top: 2px; left: 50%; transform: translateX(-50%);
  width: 15px; height: 15px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fff, var(--well-deep) 75%);
  box-shadow: inset 0 1px 2px rgba(20, 23, 26, 0.3);
}
.pipe-done::before { background: var(--patch); }
.pipe-done::after { background: var(--patch); box-shadow: none; }
.pipe-now::after { background: var(--cue); box-shadow: 0 0 6px rgba(156, 100, 16, 0.6); }
.pipe-fault::after { background: var(--rec); box-shadow: 0 0 6px rgba(194, 49, 43, 0.6); }
.pipe-paper::after { background: repeating-linear-gradient(45deg, var(--paper) 0 3px, var(--well-deep) 3px 6px); }
.pipe .pname { font-family: var(--f-label); font-weight: 600; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; display: block; }
.pipe .pmeta { font-size: 0.74rem; color: var(--ink-3); display: block; margin-top: 2px; }

/* ---- Wizard track ----------------------------------------------------------- */
.track { display: grid; grid-template-columns: 190px 1fr; gap: 26px; align-items: start; }
.track-rail { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.track-rail li {
  position: relative; padding: 8px 0 18px 26px;
  font-size: 0.88rem; color: var(--ink-3);
}
.track-rail li::before {
  content: ""; position: absolute; left: 6px; top: 13px; width: 11px; height: 11px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fff, var(--well-deep) 75%);
  box-shadow: inset 0 1px 2px rgba(20, 23, 26, 0.3);
}
.track-rail li:not(:last-child)::after {
  content: ""; position: absolute; left: 11px; top: 26px; bottom: -2px; width: 1px; background: var(--line);
}
.track-rail li.done { color: var(--ink-2); }
.track-rail li.done::before { background: var(--patch); box-shadow: none; }
.track-rail li.now { color: var(--ink); font-weight: 600; }
.track-rail li.now::before { background: var(--cue); box-shadow: 0 0 5px rgba(156, 100, 16, 0.55); }
@media (max-width: 760px) {
  .track { grid-template-columns: 1fr; }
  .track-rail { flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .track-rail li { padding: 0 0 0 18px; }
  .track-rail li::after { display: none; }
  .track-rail li::before { top: 4px; left: 0; }
}

/* ---- Log tape (timelines) --------------------------------------------------- */
.tape { list-style: none; margin: 8px 0; padding: 0; }
.tape li { display: grid; grid-template-columns: 158px 1fr; gap: 14px; padding: 7px 0; border-top: 1px dotted var(--line-soft); }
.tape li:first-child { border-top: 0; }
.tape .t { font-family: var(--f-data); font-size: 0.78rem; color: var(--ink-3); padding-top: 2px; white-space: nowrap; }
.tape .e b { font-weight: 600; }
.tape .e .by { color: var(--ink-3); font-size: 0.82rem; }
@media (max-width: 620px) { .tape li { grid-template-columns: 1fr; gap: 2px; } }

/* ---- Meters (stat readouts) --------------------------------------------------- */
.meters { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.meter {
  background: var(--paper); border-radius: var(--r-key); box-shadow: inset 0 0 0 1px var(--line-soft);
  padding: 12px 18px 10px; min-width: 128px;
}
.meter .mv { font-family: var(--f-data); font-weight: 500; font-size: 1.5rem; display: block; line-height: 1.1; }
.meter .ml {
  font-family: var(--f-label); font-weight: 600; font-size: 0.64rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3);
}

/* ---- Tab keys ------------------------------------------------------------------ */
.tabkeys { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 12px; }
.tabkeys .key[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: var(--shadow-key-down); }

/* ---- Utility ------------------------------------------------------------------- */
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-end { justify-content: flex-end; }
.grow { flex: 1; }
.stack > * + * { margin-top: 10px; }
.mt { margin-top: 16px; }
.disc { margin: 8px 0; }
.disc > summary {
  cursor: pointer; font-family: var(--f-label); font-weight: 600; font-size: 0.7rem;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-3);
}
.disc[open] > summary { color: var(--ink-2); margin-bottom: 6px; }
.rawpane {
  font-family: var(--f-data); font-size: 0.78rem; background: var(--paper);
  border-radius: var(--r-key); box-shadow: inset 0 0 0 1px var(--line-soft);
  padding: 12px 14px; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere;
}
.qr-well { background: #fff; border-radius: var(--r-key); padding: 14px; display: inline-block; box-shadow: inset 0 0 0 1px var(--line-soft); }
.qr-well svg { display: block; width: 196px; height: 196px; }
.loading-strip {
  height: 5px; margin: 14px 0; border-radius: 3px; overflow: hidden;
  background: var(--well-deep); position: relative;
}
.loading-strip::after {
  content: ""; position: absolute; inset: 0; width: 34%;
  background: var(--ink-2); border-radius: 3px; animation: sweep 1.1s ease-in-out infinite alternate;
}
@keyframes sweep { from { transform: translateX(-10%); } to { transform: translateX(210%); } }
