/* ============================================================
   ATHEMA — CONTROL ROOM
   Industrial terminal / Swiss-brutalist ops console.
   Braun instrument panel × NASA mission control × SBB timetable.
   ============================================================ */

:root {
  --bg: #0c0e10;
  --panel: #111417;
  --panel-2: #15191d;
  --line: #232930;
  --line-2: #303840;
  --ink: #e7e5df;
  --muted: #9aa3ab;
  --dim: #5c666f;
  --amber: #e8a33d;
  --amber-hi: #f5b854;
  --amber-ink: #171006;
  --amber-dim: rgba(232, 163, 61, 0.12);
  --green: #55c274;
  --green-dim: rgba(85, 194, 116, 0.12);
  --red: #e05252;
  --red-dim: rgba(224, 82, 82, 0.12);
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --grot: "Archivo", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --max: 1240px;
  --gutter: 32px;
}

* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--grot);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
::selection { background: var(--amber); color: var(--amber-ink); }

a { color: inherit; }
b { font-weight: 650; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
.ok { color: var(--green); }
.bad { color: var(--red); }
.hold { color: var(--amber); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- lamps ---------- */
.lamp {
  display: inline-block; width: 8px; height: 8px; flex: none;
  background: var(--dim); border-radius: 1px; vertical-align: middle;
}
.lamp-green { background: var(--green); box-shadow: 0 0 6px rgba(85,194,116,.55); }
.lamp-amber { background: var(--amber); box-shadow: 0 0 6px rgba(232,163,61,.55); }
.lamp-red { background: var(--red); }
.blink { animation: blink 1.8s ease-in-out infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- panels & corner ticks ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  position: relative;
}
.ticks::before, .ticks::after {
  content: ""; position: absolute; width: 9px; height: 9px; pointer-events: none;
}
.ticks::before { top: -1px; left: -1px; border-top: 2px solid var(--line-2); border-left: 2px solid var(--line-2); }
.ticks::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--line-2); border-right: 2px solid var(--line-2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 600;
  letter-spacing: .12em; text-decoration: none; cursor: pointer;
  padding: 15px 24px; border: 1px solid transparent;
  transition: background .15s linear, border-color .15s linear, color .15s linear;
  white-space: nowrap;
}
.btn-amber { background: var(--amber); color: var(--amber-ink); }
.btn-amber:hover { background: var(--amber-hi); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-sm { padding: 9px 16px; font-size: 11px; }
.btn-lg { padding: 18px 32px; font-size: 13.5px; }
.btn-block { width: 100%; justify-content: center; margin-top: 14px; }

/* ---------- type ---------- */
.kicker {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: .22em; color: var(--amber); margin: 0 0 26px;
  text-transform: uppercase;
}
.h2 {
  font-family: var(--grot); font-weight: 780; font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.04; letter-spacing: -0.02em; margin: 0 0 18px;
}
.body { font-size: 15.5px; line-height: 1.65; color: var(--muted); max-width: 560px; margin: 0 0 18px; font-weight: 450; }

/* ---------- section rules ---------- */
.section { padding: 104px 0 0; }
.rule-head {
  display: flex; align-items: center; gap: 14px; margin-bottom: 44px;
}
.rule-no {
  font-size: 12px; font-weight: 600; color: var(--amber);
  border: 1px solid var(--line-2); padding: 5px 9px; letter-spacing: .1em;
}
.rule-label { font-size: 11px; font-weight: 600; letter-spacing: .26em; color: var(--muted); }
.rule-line { flex: 1; height: 1px; background: var(--line); }
.rule-head-hero { margin-bottom: 18px; }

/* ---------- reveal ----------
   Deliberately none. A control room's panels don't fade in —
   they are simply on. (Also keeps full-page rendering robust.) */

/* ============================================================
   MASTHEAD
   ============================================================ */
.mast {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  height: 58px; padding: 0 var(--gutter);
  background: rgba(12,14,16,.9);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.mast-brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); }
.seal { color: var(--amber); align-self: center; }
.mast-word { font-family: var(--grot); font-weight: 800; font-size: 15px; letter-spacing: .3em; padding-left: .1em; }
.mast-sub { font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em; color: var(--dim); }
.mast-nav { display: flex; gap: 22px; margin-left: auto; }
.mast-nav a {
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .14em;
  color: var(--muted); text-decoration: none; padding: 6px 0;
}
.mast-nav a:hover { color: var(--ink); }
.mast-right { display: flex; align-items: center; gap: 18px; }
.mast-clock { font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.mast-shift {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .16em; color: var(--green);
}

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 62px 0 0; }
.hero-h1 {
  font-family: var(--grot); font-weight: 830;
  font-size: clamp(40px, 5.6vw, 70px);
  line-height: 1.0; letter-spacing: -0.028em;
  margin: 0 0 28px;
}
.hero-sub-row {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 48px; align-items: start; margin-bottom: 42px;
}
.hero-sub { font-size: 16.5px; line-height: 1.65; color: var(--muted); margin: 0; max-width: 620px; font-weight: 450; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; align-content: start; }
.hero-fine { width: 100%; text-align: right; font-size: 10px; letter-spacing: .14em; color: var(--dim); margin: 4px 0 0; }

/* ============================================================
   RUN BOARD
   ============================================================ */
.board { margin-bottom: 14px; }
.board-head {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 13px 18px; border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.board-title { display: flex; align-items: baseline; gap: 14px; }
.board-name { font-family: var(--grot); font-weight: 750; font-size: 13.5px; letter-spacing: .22em; }
.board-id { font-size: 11px; color: var(--dim); letter-spacing: .04em; }
.board-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sim-tag {
  font-size: 9.5px; letter-spacing: .12em; color: var(--dim);
  border: 1px dashed var(--line-2); padding: 4px 8px;
}
.replay {
  font-size: 10px; letter-spacing: .12em; color: var(--muted);
  background: none; border: 1px solid var(--line-2); padding: 5px 10px; cursor: pointer;
}
.replay:hover { color: var(--ink); border-color: var(--muted); }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .12em;
  padding: 6px 12px; border: 1px solid var(--line-2);
}
.status-pill[data-state="running"] { color: var(--amber); border-color: rgba(232,163,61,.5); }
.status-pill[data-state="running"] .lamp { background: var(--amber); animation: blink 1.4s ease-in-out infinite; }
.status-pill[data-state="holding"] { color: var(--amber); border-color: rgba(232,163,61,.5); }
.status-pill[data-state="holding"] .lamp { background: var(--amber); animation: blink 2.2s ease-in-out infinite; }
.status-pill[data-state="shipped"] { color: var(--green); border-color: rgba(85,194,116,.5); }
.status-pill[data-state="shipped"] .lamp { background: var(--green); animation: none; }

/* stage rail */
.rail { padding: 20px 18px 16px; border-bottom: 1px solid var(--line); position: relative; }
.rail-line {
  position: absolute; left: 30px; right: 30px; top: 27px; height: 2px;
  background: var(--line);
}
.rail-fill {
  height: 100%; background: var(--green); width: 0%;
  transition: width .7s cubic-bezier(.3,.7,.2,1);
}
.rail-stages {
  list-style: none; margin: 0; padding: 0;
  display: flex; justify-content: space-between; position: relative;
}
.stage { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.stage-lamp {
  width: 14px; height: 14px; border: 1.5px solid var(--line-2);
  background: var(--bg); transition: background .3s linear, border-color .3s linear, box-shadow .3s linear;
}
.stage span {
  font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: .1em;
  color: var(--dim); transition: color .3s linear; white-space: nowrap;
}
.stage[data-state="active"] .stage-lamp { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 10px rgba(232,163,61,.6); animation: pulse 1.9s ease-out infinite; }
.stage[data-state="active"] span { color: var(--amber); }
.stage[data-state="done"] .stage-lamp { background: var(--green); border-color: var(--green); }
.stage[data-state="done"] span { color: var(--muted); }
.stage[data-state="hold"] .stage-lamp { background: var(--bg); border-color: var(--amber); box-shadow: 0 0 10px rgba(232,163,61,.35); animation: pulse 2.4s ease-out infinite; }
.stage[data-state="hold"] span { color: var(--amber); }
@keyframes pulse {
  0% { outline: 0 solid rgba(232,163,61,.4); outline-offset: 0; }
  70% { outline: 6px solid rgba(232,163,61,0); outline-offset: 4px; }
  100% { outline: 0 solid rgba(232,163,61,0); outline-offset: 0; }
}

/* board body */
.board-body {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
}
.log-wrap { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.log-head {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 18px; font-size: 9.5px; letter-spacing: .16em; color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.log {
  padding: 12px 6px 14px 10px; height: 478px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.ev {
  display: flex; gap: 12px; padding: 5px 8px;
  font-family: var(--mono); font-size: 12.3px; line-height: 1.5;
}
.ev-t { flex: none; width: 64px; color: var(--dim); font-variant-numeric: tabular-nums; }
.ev-k { flex: none; width: 88px; font-weight: 500; letter-spacing: .02em; }
.k-run { color: var(--ink); }
.k-start { color: var(--amber); }
.k-done { color: var(--green); }
.k-info { color: var(--dim); }
.k-gate { color: var(--amber); }
.k-merge { color: var(--amber); }
.ev-m { color: var(--muted); min-width: 0; }
.ev.ev-live { background: var(--amber-dim); }
.ev.ev-live .ev-m { color: var(--ink); }
.caret {
  display: inline-block; width: 7px; height: 13px; background: var(--amber);
  vertical-align: -2px; margin-left: 3px; animation: blink 1s step-end infinite;
}

/* instruments */
.instruments { display: flex; flex-direction: column; }
.inst { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.instruments > .inst:last-child, .instruments > .inst-pr { border-bottom: none; }
.inst-label {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 9.5px; font-weight: 600; letter-spacing: .18em; color: var(--muted);
  margin-bottom: 8px;
}
.inst-big { font-size: 30px; font-weight: 600; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.inst-unit { font-size: 13px; color: var(--dim); margin-left: 4px; }
.inst-mid { font-size: 21px; font-weight: 600; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.inst-note { font-size: 9.5px; letter-spacing: .1em; color: var(--dim); margin-top: 7px; }
.inst-duo { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.inst-duo .inst { border-bottom: none; }
.inst-duo .inst:first-child { border-right: 1px solid var(--line); }

/* gate instrument */
.gate-rows { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.gate-row {
  display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .08em; color: var(--muted);
}
.gate-val { color: var(--ink); font-weight: 600; }
.inst-gate[data-state="idle"] .gate-val { color: var(--dim); }
.gate-verdict {
  font-size: 10.5px; font-weight: 600; letter-spacing: .12em;
  padding: 6px 9px; text-align: center;
}
.inst-gate[data-state="idle"] .gate-verdict { background: var(--panel-2); color: var(--dim); }
.inst-gate[data-state="checking"] .gate-verdict { background: var(--amber-dim); color: var(--amber); }
.inst-gate[data-state="pass"] .gate-verdict { background: var(--green-dim); color: var(--green); }

/* e2e capture */
.inst-shot[data-state="idle"] .shot { opacity: .18; filter: grayscale(1); }
.shot { border: 1px solid var(--line-2); background: #f2efe7; color: #23201a; transition: opacity .5s linear, filter .5s linear; }
.shot-bar {
  display: flex; align-items: center; gap: 5px; padding: 6px 9px;
  background: #e6e2d6; border-bottom: 1px solid #d5d0c0;
}
.shot-bar i { width: 7px; height: 7px; border-radius: 50%; background: #c9c3b1; }
.shot-url { font-size: 9px; color: #8a8271; margin-left: 6px; letter-spacing: .04em; }
.shot-body { padding: 10px 12px 12px; }
.shot-row {
  display: flex; justify-content: space-between; font-size: 11px; padding-bottom: 7px;
  border-bottom: 1px solid #dcd7c8;
}
.shot-field { display: flex; gap: 6px; margin: 9px 0 7px; }
.shot-input {
  flex: 1; font-size: 10.5px; padding: 6px 8px; border: 1px solid #b3543a; background: #fbf9f3; color: #23201a;
}
.shot-apply {
  font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .08em;
  display: flex; align-items: center; padding: 0 10px; background: #b3543a; color: #f8f4ea;
}
.shot-ok { font-size: 9.5px; color: #4c7a48; margin-bottom: 8px; }
.shot-total {
  display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 700;
  padding-top: 7px; border-top: 1px solid #dcd7c8;
}

/* PR instrument */
.inst-pr { background: var(--panel-2); }
.pr-line { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.pr-id { font-weight: 600; color: var(--ink); }
.pr-diff { font-size: 12px; color: var(--muted); }
.pr-sub { font-size: 10px; letter-spacing: .08em; color: var(--amber); margin-top: 6px; }
.inst-pr[data-state="idle"] .pr-id, .inst-pr[data-state="idle"] .pr-diff { color: var(--dim); }
.inst-pr[data-state="idle"] .pr-sub { color: var(--dim); }
.inst-pr[data-state="idle"] .btn { opacity: .25; pointer-events: none; }
.pr-merged {
  margin-top: 12px; font-size: 10.5px; font-weight: 600; letter-spacing: .14em;
  color: var(--green); background: var(--green-dim); padding: 8px 10px; text-align: center;
}
.inst-pr[data-state="merged"] .btn { display: none; }
.inst-pr[data-state="merged"] .pr-sub { color: var(--dim); }

/* board foot */
.board-foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 11px 18px; border-top: 1px solid var(--line);
  font-size: 10px; letter-spacing: .1em; color: var(--muted);
}
.board-caption {
  font-size: 9.5px; letter-spacing: .14em; color: var(--dim);
  margin: 0 0 0 2px; line-height: 1.7;
}

/* ============================================================
   02 — THE CONDITION
   ============================================================ */
.cond-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 56px; align-items: start;
}
.cond-left { position: sticky; top: 96px; }
.cond-table .tt-head {
  display: grid; grid-template-columns: 150px 1fr 92px; gap: 18px;
  padding: 12px 20px; font-size: 9.5px; font-weight: 600; letter-spacing: .18em; color: var(--dim);
  border-bottom: 1px solid var(--line);
}
.tt-row {
  display: grid; grid-template-columns: 150px 1fr 92px; gap: 18px;
  padding: 17px 20px; border-bottom: 1px solid var(--line); align-items: baseline;
}
.tt-row:last-child { border-bottom: none; }
.tt-src { font-size: 10.5px; color: var(--dim); letter-spacing: .04em; line-height: 1.6; }
.tt-quote { font-family: var(--mono); font-style: italic; font-size: 13.5px; line-height: 1.6; color: var(--ink); }
.tt-tag { font-size: 9px; font-weight: 600; letter-spacing: .14em; color: var(--amber); text-align: right; }
.cond-close {
  font-size: clamp(19px, 2vw, 24px); font-weight: 640; letter-spacing: -0.01em;
  color: var(--muted); margin: 40px 0 0; padding-top: 22px;
  border-top: 1px solid var(--line);
}
.cond-close b { color: var(--ink); font-weight: 760; }

/* ============================================================
   03 — MECHANISM
   ============================================================ */
.mech-intro { margin-bottom: 44px; }
.mech-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
}
.mech { padding: 22px 22px 24px; display: flex; flex-direction: column; }
.mech-no { font-size: 11px; font-weight: 600; color: var(--amber); letter-spacing: .1em; margin-bottom: 14px; }
.mech-h {
  font-family: var(--grot); font-weight: 760; font-size: 16px; letter-spacing: .06em;
  margin: 0 0 18px;
}
.mech-fig { margin-bottom: 18px; min-height: 108px; display: flex; flex-direction: column; justify-content: center; }
.mech-p { font-size: 13.5px; line-height: 1.65; color: var(--muted); margin: 0; }

/* fig 01 — modules */
.fig-harden { gap: 5px; }
.mod {
  display: flex; align-items: center; gap: 9px; font-size: 10px; letter-spacing: .1em;
  color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); padding: 6px 10px;
}
.mod-st { margin-left: auto; color: var(--green); font-size: 8.5px; letter-spacing: .12em; }

/* fig 02 — venn */
.venn { width: 100%; height: auto; }
.v-a { fill: transparent; stroke: var(--dim); stroke-width: 1; stroke-dasharray: 3 3; }
.v-b { fill: rgba(224,82,82,.05); stroke: var(--muted); stroke-width: 1; }
.v-x { fill: rgba(232,163,61,.14); stroke: none; }
.v-t { font-family: var(--mono); font-size: 9px; fill: var(--muted); letter-spacing: .08em; }
.v-sm { font-size: 7.5px; opacity: .85; }
.v-amber { fill: var(--amber); }
.v-red { fill: var(--red); }

/* fig 03 — PR stamp */
.prfig {
  position: relative; border: 1px solid var(--line-2); background: var(--panel-2);
  padding: 14px 84px 16px 14px; display: flex; flex-direction: column; gap: 8px;
  min-height: 92px; justify-content: center;
}
.prfig-id { font-size: 12px; font-weight: 600; color: var(--ink); }
.prfig-guard { font-size: 9px; letter-spacing: .06em; color: var(--red); }
.prfig-stamp {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%) rotate(-8deg);
  font-size: 8.5px; font-weight: 600; letter-spacing: .14em; color: var(--amber); text-align: center;
  border: 1.5px solid var(--amber); border-radius: 50%; width: 62px; height: 62px;
  display: flex; align-items: center; justify-content: center; line-height: 1.5;
  opacity: .9;
}

/* fig 04 — mini ladder */
.miniladder { display: flex; gap: 3px; }
.ml-seg {
  flex: 1; text-align: center; font-size: 9.5px; font-weight: 600; letter-spacing: .06em;
  padding: 9px 0; border: 1px solid var(--line-2); color: var(--dim);
}
.ml-seg[data-on] { background: var(--amber-dim); border-color: var(--amber); color: var(--amber); }
.ml-note { font-size: 8.5px; letter-spacing: .12em; color: var(--dim); margin-top: 8px; text-align: center; }

/* ============================================================
   04 — THE GATE
   ============================================================ */
.gate-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 56px; align-items: start;
}
.verdict-table { margin: 26px 0; }
.vt-row {
  display: flex; justify-content: space-between; gap: 18px; align-items: center;
  padding: 15px 20px; border-bottom: 1px solid var(--line);
  font-size: 11.5px; letter-spacing: .04em;
}
.vt-row:last-child { border-bottom: none; }
.vt-expr { color: var(--ink); }
.vt-out { font-weight: 600; letter-spacing: .1em; font-size: 10.5px; color: var(--muted); text-align: right; }
.vt-red { color: var(--red); }
.vt-amber { color: var(--amber); }
.vt-loop { background: var(--panel-2); }

.debt { padding: 0; }
.debt-head {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 20px; border-bottom: 1px solid var(--line);
  font-size: 9.5px; letter-spacing: .16em;
}
.debt-kind { color: var(--amber); font-weight: 600; }
.debt-title {
  font-family: var(--grot); font-weight: 740; font-size: 21px; letter-spacing: -0.01em;
  padding: 18px 20px 4px;
}
.debt-body { padding: 12px 20px 4px; display: flex; flex-direction: column; gap: 9px; }
.debt-item { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.debt-note {
  font-size: 13.5px; line-height: 1.6; color: var(--muted); font-style: italic;
  padding: 10px 20px 6px; margin: 0;
}
.debt-foot {
  padding: 12px 20px 16px; font-size: 9.5px; letter-spacing: .16em; color: var(--dim);
}
.gate-caption { font-size: 9.5px; letter-spacing: .12em; color: var(--dim); margin: 12px 0 0 2px; line-height: 1.7; }
.guard-card { margin-top: 14px; }
.guard-kind { color: var(--red); }
.guard-rows { padding: 14px 20px 2px; display: flex; flex-direction: column; }
.guard-row {
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
  font-size: 11.5px; color: var(--muted); padding: 7px 0;
  border-bottom: 1px dashed var(--line);
}
.guard-row:last-child { border-bottom: none; }
.guard-row .bad, .guard-row .ok { font-weight: 600; font-size: 10px; letter-spacing: .14em; }

/* ============================================================
   05 — INSTRUMENTATION
   ============================================================ */
.inst-intro { margin-bottom: 44px; }
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dash { padding: 20px 22px 22px; }
.dash-ladder { grid-column: span 3; }
.dash-note { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 14px 0 0; }

.ladder { margin-top: 18px; }
.ladder-track { position: relative; height: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.ladder-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(232,163,61,.25), var(--amber)); }
.ladder-needle {
  position: absolute; top: -7px; bottom: -7px; width: 2px; background: var(--ink);
}
.ladder-needle .mono {
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  font-size: 10px; font-weight: 600; color: var(--ink); letter-spacing: .08em;
}
.ladder-ticks { display: flex; margin-top: 12px; }
.ladder-ticks span {
  flex: 1; font-size: 10px; font-weight: 600; letter-spacing: .08em; color: var(--dim);
  display: flex; flex-direction: column; gap: 3px;
}
.ladder-ticks span em { font-style: normal; font-size: 8.5px; font-weight: 500; letter-spacing: .1em; color: var(--dim); }
.ladder-ticks span[data-on] { color: var(--amber); }
.ladder-ticks span[data-on] em { color: var(--muted); }

.meter { margin-top: 18px; }
.meter-track { position: relative; height: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.meter-fill { position: absolute; inset: 0 auto 0 0; background: rgba(232,163,61,.35); }
.meter-needle { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--amber); }
.meter-read { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; }
.meter-big { font-size: 24px; font-weight: 600; color: var(--ink); }
.meter-read .ok { font-size: 10px; letter-spacing: .12em; font-weight: 600; }

.ledger { margin-top: 14px; display: flex; flex-direction: column; }
.ledger-row {
  display: flex; justify-content: space-between; gap: 14px;
  font-size: 11.5px; color: var(--muted); padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.ledger-row span:last-child { color: var(--ink); font-weight: 500; }
.ledger-row:last-child { border-bottom: none; }

.needs { display: flex; align-items: baseline; gap: 16px; margin-top: 14px; }
.needs-big { font-size: 44px; font-weight: 600; color: var(--amber); line-height: 1; }
.needs-what { font-size: 11px; color: var(--muted); letter-spacing: .04em; }

/* ============================================================
   06 — ECONOMICS
   ============================================================ */
.econ-intro { margin-bottom: 44px; }
.econ-intro .body { max-width: 680px; }
.price-table { }
.pt-head {
  display: grid; grid-template-columns: 150px 130px 230px 1fr 40px; gap: 20px;
  padding: 13px 24px; font-size: 9.5px; font-weight: 600; letter-spacing: .18em; color: var(--dim);
  border-bottom: 1px solid var(--line);
}
.pt-row {
  display: grid; grid-template-columns: 150px 130px 230px 1fr 40px; gap: 20px; align-items: baseline;
  padding: 24px; border-bottom: 1px solid var(--line); text-decoration: none;
  transition: background .15s linear;
}
.pt-row:last-child { border-bottom: none; }
a.pt-row:hover { background: var(--panel-2); }
a.pt-row:hover .pt-go { color: var(--amber); }
.pt-name {
  font-family: var(--grot); font-weight: 780; font-size: 19px; letter-spacing: .08em;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.pt-mark {
  font-size: 8.5px; font-weight: 600; letter-spacing: .14em; color: var(--amber-ink);
  background: var(--amber); padding: 3px 7px; font-style: normal;
}
.pt-price { font-size: 21px; font-weight: 600; color: var(--ink); }
.pt-price em { font-style: normal; font-size: 11px; color: var(--dim); margin-left: 2px; }
.pt-budget { font-size: 10.5px; letter-spacing: .1em; color: var(--muted); }
.pt-feat { font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.pt-go { font-size: 16px; color: var(--dim); text-align: right; transition: color .15s linear; }
.pt-row-hi { background: rgba(232,163,61,.04); }
.price-fine { font-size: 9.5px; letter-spacing: .14em; color: var(--dim); margin: 14px 0 0 2px; line-height: 1.8; }

/* ============================================================
   07 — CONNECT
   ============================================================ */
.section-connect { padding-bottom: 110px; }
.connect-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 56px; align-items: start;
}
.connect-grid .btn-lg { margin: 10px 0 14px; }
.connect-grid .hero-fine { text-align: left; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; counter-reset: step; }
.step { padding: 20px 24px 22px; }
.step-no { font-size: 10px; font-weight: 600; letter-spacing: .18em; color: var(--amber); }
.step-h { font-family: var(--grot); font-weight: 750; font-size: 17px; margin: 8px 0 8px; letter-spacing: .01em; }

/* ============================================================
   FOOTER
   ============================================================ */
.foot { border-top: 1px solid var(--line); padding: 34px 0 40px; }
.foot-grid { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: baseline; gap: 10px; }
.foot-brand .seal { align-self: center; }
.foot-tag { font-size: 9px; letter-spacing: .2em; color: var(--dim); }
.foot-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-nav a { font-size: 10px; letter-spacing: .14em; color: var(--muted); text-decoration: none; }
.foot-nav a:hover { color: var(--ink); }
.foot-fine { margin-top: 26px; font-size: 9px; letter-spacing: .1em; color: var(--dim); line-height: 1.9; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .mech-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-ladder { grid-column: span 2; }
  .pt-head { display: none; }
  .pt-row { grid-template-columns: 130px 1fr 40px; grid-template-rows: auto auto; row-gap: 8px; }
  .pt-budget { grid-column: 2; }
  .pt-feat { grid-column: 1 / -1; }
  .pt-go { grid-row: 1; grid-column: 3; }
}
@media (max-width: 920px) {
  .mast-nav, .mast-clock { display: none; }
  .hero-sub-row { grid-template-columns: 1fr; gap: 26px; }
  .hero-ctas { justify-content: flex-start; }
  .hero-fine { text-align: left; }
  .board-body { grid-template-columns: 1fr; }
  .log-wrap { border-right: none; border-bottom: 1px solid var(--line); }
  .log { height: 380px; }
  .rail { overflow-x: auto; }
  .rail-stages { min-width: 640px; }
  .rail-line { min-width: 0; }
  .cond-grid, .gate-grid, .connect-grid { grid-template-columns: 1fr; gap: 34px; }
  .cond-left { position: static; }
  .instruments { display: grid; grid-template-columns: 1fr 1fr; }
  .inst-shot { grid-row: span 2; border-left: 1px solid var(--line); }
  .inst-duo { grid-column: span 2; }
  .inst-pr { grid-column: span 2; }
}
@media (max-width: 700px) {
  .hero-br { display: none; }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .hero { padding-top: 48px; }
  .hero-h1 { font-size: clamp(31px, 9.4vw, 42px); letter-spacing: -0.02em; }
  .section { padding-top: 72px; }
  .mast { gap: 10px; padding: 0 14px; height: 52px; }
  .mast-sub { display: none; }
  .mast-word { font-size: 13px; letter-spacing: .22em; }
  .mast-right { gap: 10px; margin-left: auto; }
  .mast-shift { font-size: 9px; letter-spacing: .1em; }
  .btn-sm { padding: 8px 10px; font-size: 9px; letter-spacing: .08em; }
  .cond-table .tt-head { display: none; }
  .tt-row { grid-template-columns: 1fr; gap: 8px; }
  .tt-tag { text-align: left; }
  .instruments { grid-template-columns: 1fr; }
  .inst-shot { grid-row: auto; border-left: none; }
  .inst-duo, .inst-pr { grid-column: auto; }
  .mech-grid { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-ladder { grid-column: auto; }
  .ladder-ticks span em { display: none; }
  .pt-row { grid-template-columns: 1fr; }
  .pt-budget, .pt-feat { grid-column: auto; }
  .pt-go { display: none; }
  .board-foot { flex-direction: column; gap: 6px; }
  .ev-k { width: 74px; font-size: 11px; }
  .ev-t { width: 56px; font-size: 11px; }
  .ev { font-size: 11.5px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .blink, .status-pill .lamp, .stage-lamp { animation: none !important; }
  .js [data-rev] { opacity: 1; transform: none; }
}
