/* Ariadne. Trust blue on black.
   The home page is a transcript: a numbered rail down the left, real output on
   the right. The surface pages are evidence: a header that states what was used
   and what it returned, then the output that proves it.
   Terminal blocks are the main object everywhere. Prose is annotation. */

:root {
  --ink: #06070a;
  --ink-2: #0a0d13;
  --ink-3: #0e131c;
  --line: #1a202c;
  --line-2: #28313f;

  --blue: #2f6bff;
  --blue-hi: #6d97ff;
  --blue-dim: #16307a;

  --paper: #e9edf6;
  --muted: #808ca3;
  --muted-2: #58637a;

  --alarm: #ff5a4d;
  --pos: #35c88a;

  --serif: "Instrument Serif", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --gutter: clamp(18px, 4.5vw, 72px);
  --rail: 84px;
  --wide: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  /* a faint engineering grid, like squared paper under glass */
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: 34px 34px;
}

code, pre { font-family: var(--mono); }
b { font-weight: 600; }
::selection { background: var(--blue); color: #fff; }
a { color: var(--blue-hi); text-decoration: none; }
a:hover { color: #fff; }

.label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 18px var(--gutter);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  background: rgba(6, 7, 10, 0.92);
  backdrop-filter: blur(8px);
  z-index: 5;
}

.wordmark {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.34em;
  font-size: 13px;
  color: var(--paper);
}
a.wordmark:hover { color: var(--blue-hi); }

.topbar nav { display: flex; gap: 20px; flex-wrap: wrap; }
.topbar nav a { font-family: var(--mono); font-size: 12.5px; color: var(--muted-2); }
.topbar nav a:hover { color: var(--blue-hi); }
.topbar nav a.here { color: var(--paper); }

/* ---------- preamble ---------- */

.preamble {
  padding: clamp(44px, 6vw, 76px) var(--gutter) clamp(30px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}

.preamble h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.05;
  margin: 0 0 18px;
}

.preamble p {
  color: var(--muted);
  max-width: 68ch;
  margin: 0 0 30px;
  font-size: clamp(15px, 1.25vw, 17px);
}

.env { margin: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.env > div { display: grid; grid-template-columns: 132px 1fr; background: var(--ink-2); }
.env dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding: 12px 16px;
}
.env dd { margin: 0; padding: 12px 16px; font-size: 13.5px; color: var(--muted); }

/* ---------- a step ---------- */

.step {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
  /* the top bar is sticky, so an anchor jump would land under it */
  scroll-margin-top: 72px;
}

.rail { position: relative; padding-top: 42px; }

.rail .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--paper);
  background: var(--ink-3);
  border: 1px solid var(--line-2);
  border-radius: 2px;
}

/* the line starts under the number, never through it */
.rail .tick {
  position: absolute;
  left: 15px;
  top: 80px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.rail .tick.fire { background: linear-gradient(180deg, var(--alarm), var(--line) 45%); }
.step.alarm .rail .num { border-color: var(--alarm); color: var(--alarm); }

.body { padding: 40px 0 clamp(44px, 5vw, 70px); min-width: 0; }

.step h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.7vw, 34px);
  line-height: 1.15;
  margin: 0 0 12px;
}

.note {
  color: var(--muted);
  font-size: 14.5px;
  max-width: 66ch;
  margin: 0 0 20px;
}
.note.tight { margin: 20px 0 10px; }

.note code, .readout code, .lede code, td code, li code {
  color: var(--blue-hi);
  font-size: 13px;
  background: rgba(47, 107, 255, 0.09);
  padding: 1px 5px;
  border-radius: 2px;
  overflow-wrap: anywhere;
}

/* ---------- terminal ---------- */

.term {
  margin: 0;
  padding: 18px 20px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-left: 2px solid var(--line-2);
  border-radius: 3px;
  font-size: 12.5px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre;
  color: #b9c3d6;
}

.term .cmd {
  display: block;
  color: var(--paper);
  margin-bottom: 12px;
}
.term .cmd::before { content: "$ "; color: var(--blue); }

.term .hit { color: var(--alarm); }
.term .dim { color: var(--muted-2); }
.term .ok { color: var(--pos); }

.step.alarm .term { border-left-color: var(--alarm); }

.diff .fileline { display: block; color: var(--muted-2); margin-bottom: 12px; }
.diff .ctx { display: block; color: var(--muted-2); }
.diff .add { display: block; color: var(--blue-hi); }

.readout {
  margin: 20px 0 0;
  padding-left: 18px;
  border-left: 2px solid var(--blue-dim);
  color: var(--muted);
  font-size: 14.5px;
  max-width: 64ch;
}
.readout b { color: var(--paper); }
.readout b.pos { color: var(--pos); }

/* the link from a step to the page that proves it */
.proof {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--blue-hi);
  border: 1px solid var(--line-2);
  border-radius: 2px;
  padding: 7px 12px;
}
.proof:hover { border-color: var(--blue); background: rgba(47, 107, 255, 0.08); }
.proof::after { content: "\2192"; }

/* ---------- surface pages ---------- */

.pagehead {
  padding: clamp(40px, 5.5vw, 68px) var(--gutter) clamp(26px, 3.5vw, 40px);
  border-bottom: 1px solid var(--line);
}
.pagehead h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.06;
  margin: 10px 0 16px;
}
.lede { color: var(--muted); max-width: 70ch; margin: 0; font-size: clamp(15px, 1.2vw, 16.5px); }

.status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}
.status li { font-family: var(--mono); font-size: 12px; color: var(--muted-2); }
.status b { color: var(--paper); font-weight: 500; }
.status .live { color: var(--pos); }

.block {
  padding: clamp(38px, 5vw, 62px) var(--gutter);
  border-bottom: 1px solid var(--line);
  max-width: var(--wide);
}
.block h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(23px, 2.6vw, 32px);
  margin: 0 0 14px;
  line-height: 1.15;
}
.block h3 {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--paper);
  margin: 30px 0 10px;
}

/* ---------- cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 26px 0 0;
}
.card { background: var(--ink-2); padding: 22px; min-width: 0; }
.card:hover { background: var(--ink-3); }
.card h3 { margin: 10px 0 8px; font-family: var(--serif); font-size: 21px; letter-spacing: 0; }
.card p { color: var(--muted); font-size: 13.5px; margin: 0; }
.card .metric { font-family: var(--mono); font-size: 12px; color: var(--blue-hi); margin-top: 12px; display: block; }
a.card { display: block; color: inherit; }
a.card:hover h3 { color: var(--blue-hi); }

/* ---------- tables ---------- */

.table-scroll { overflow-x: auto; margin: 24px 0; }

table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 13.5px; }

th {
  text-align: left;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 500;
  padding: 0 16px 10px 0;
  border-bottom: 1px solid var(--line-2);
}

td {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  vertical-align: top;
}

td code { color: var(--paper); font-family: var(--mono); font-size: 13px; background: none; padding: 0; }
td.v { font-family: var(--mono); color: var(--paper); white-space: nowrap; }
td.p { font-family: var(--mono); color: var(--blue-hi); font-size: 12px; letter-spacing: 0.08em; }
td.n { font-family: var(--mono); color: var(--muted-2); font-size: 12px; letter-spacing: 0.08em; }
td.a { font-family: var(--mono); color: var(--alarm); font-size: 12px; letter-spacing: 0.08em; }

/* ---------- lists ---------- */

.split {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px 40px;
}
.split li {
  color: var(--muted);
  font-size: 14.5px;
  border-top: 1px solid var(--line-2);
  padding-top: 14px;
}
.split li b { color: var(--paper); display: block; margin-bottom: 4px; }

.appendix, .caveats {
  padding: clamp(48px, 6vw, 80px) var(--gutter);
  border-bottom: 1px solid var(--line);
}
.appendix h2, .caveats h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 3vw, 38px);
  margin: 0 0 16px;
}
.caveats ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px 40px;
}
.caveats li {
  color: var(--muted);
  font-size: 14.5px;
  border-top: 1px solid var(--line-2);
  padding-top: 14px;
}
.caveats li b { color: var(--paper); }
.caveats code { font-family: var(--mono); font-size: 13px; color: var(--blue-hi); overflow-wrap: anywhere; }

.cite { color: var(--muted-2); font-size: 12.5px; margin-top: 10px; }
.cite a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-2); }
.cite a:hover { color: var(--blue-hi); }

/* ---------- footer ---------- */

footer {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 28px;
  padding: clamp(40px, 5vw, 68px) var(--gutter);
  background: var(--ink-2);
}

.foot-main p {
  color: var(--muted-2);
  font-size: 13.5px;
  max-width: 50ch;
  margin: 14px 0 0;
}

.foot-links { display: flex; flex-direction: column; gap: 9px; align-items: flex-start; }
.foot-links a { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }

/* ---------- landing: asymmetric hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(48px, 7vw, 96px) var(--gutter) clamp(40px, 5vw, 64px);
  align-items: start;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  /* deliberately much larger than anything else on the page */
  font-size: clamp(38px, 6.2vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.015em;
  margin: 14px 0 22px;
}
.hero h1 em { font-style: italic; color: var(--blue-hi); }

.hero .stand {
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 18px);
  max-width: 54ch;
  margin: 0 0 30px;
}
.hero .stand b { color: var(--paper); font-weight: 500; }

.ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  padding: 13px 20px;
  border-radius: 2px;
  border: 1px solid var(--line-2);
  color: var(--paper);
}
.cta::after { content: "\2192"; color: var(--blue-hi); }
.cta:hover { border-color: var(--blue); background: rgba(47, 107, 255, 0.09); color: #fff; }
.cta.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.cta.primary::after { color: #fff; }
.cta.primary:hover { background: #4c81ff; border-color: #4c81ff; }

/* the live panel, right hand column */
.panel {
  border: 1px solid var(--line);
  background: var(--ink-2);
  border-radius: 3px;
  overflow: hidden;
}
.panel .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--pos);
  box-shadow: 0 0 0 3px rgba(53, 200, 138, 0.16);
  display: inline-block;
}
.panel .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.panel .row:last-of-type { border-bottom: 0; }
.panel .row b { font-family: var(--mono); color: var(--paper); font-weight: 500; font-size: 12.5px; }
.panel .go {
  display: block;
  padding: 13px 16px;
  border-top: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 12px;
  background: rgba(47, 107, 255, 0.07);
}
.panel .go:hover { background: rgba(47, 107, 255, 0.16); }
.panel .creds { padding: 10px 16px; font-family: var(--mono); font-size: 11px; color: var(--muted-2); }

/* ---------- landing: full bleed band ---------- */

.band {
  background: #0b0f18;
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  padding: clamp(34px, 4.5vw, 56px) var(--gutter);
}
.band .quote {
  font-family: var(--serif);
  font-size: clamp(22px, 3.2vw, 40px);
  line-height: 1.12;
  color: var(--paper);
  max-width: 22ch;
  margin: 0;
}
.band .inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: end;
}
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--line); }
.figs div { background: #0b0f18; padding: 14px 16px 14px 0; }
.figs .n { font-family: var(--serif); font-size: clamp(26px, 3vw, 38px); display: block; line-height: 1.05; }
.figs .n.up { color: var(--pos); }
.figs .n.bad { color: var(--alarm); }
.figs .l {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* ---------- landing: alternating 60/40 rows ---------- */

.row-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(24px, 4.5vw, 60px);
  align-items: center;
  padding: clamp(40px, 5.5vw, 76px) var(--gutter);
  border-bottom: 1px solid var(--line);
}
/* every second one flips, so the page never settles into a rhythm */
.row-2.flip { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.row-2.flip .copy { order: 2; }
.row-2.flip .show { order: 1; }

.row-2 h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.12;
  margin: 10px 0 12px;
}
.row-2 p { color: var(--muted); font-size: 14.5px; margin: 0 0 16px; max-width: 46ch; }
.row-2 .accent { display: block; width: 34px; height: 2px; background: var(--blue); margin-bottom: 16px; }
.row-2.alarm-row .accent { background: var(--alarm); }

/* ---------- landing: regimes ---------- */

.regimes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 26px;
}
.regime { background: var(--ink-2); padding: 20px; border-top: 2px solid var(--line-2); }
.regime.hit { border-top-color: var(--alarm); }
.regime h3 { font-family: var(--mono); font-size: 12.5px; color: var(--paper); margin: 0 0 8px; letter-spacing: 0.02em; }
.regime p { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.regime .v { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; color: var(--muted-2); }
.regime.hit .v { color: var(--alarm); }

/* ---------- responsive ---------- */

@media (max-width: 940px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .band .inner { grid-template-columns: minmax(0, 1fr); }
  .row-2, .row-2.flip { grid-template-columns: minmax(0, 1fr); }
  .row-2.flip .copy, .row-2.flip .show { order: 0; }
}

@media (max-width: 820px) {
  :root { --rail: 44px; }
  .rail { padding-top: 32px; }
  .rail .tick { top: 68px; left: 15px; }
  .body { padding-top: 30px; }
  .env > div { grid-template-columns: minmax(0, 1fr); }
  .env dt { padding-bottom: 0; }
  .env dd { padding-top: 4px; }
  footer { grid-template-columns: minmax(0, 1fr); }
  .term { font-size: 11.5px; }
}

@media (max-width: 480px) {
  .step { grid-template-columns: minmax(0, 1fr); }
  .rail { padding: 26px 0 0; display: flex; align-items: center; gap: 10px; }
  .rail .tick { position: static; width: 100%; height: 1px; top: auto; }
  .body { padding-top: 14px; }
}

/* ==========================================================================
   THE DEMO STEPPER
   This page is an application, not an essay, so it deliberately does not
   reuse the editorial rhythm above. Chrome bar, step rail, one panel at a
   time. Everything in it is real recorded output.
   ========================================================================== */

.replay {
  display: flex;
  align-items: baseline;
  gap: 10px 16px;
  flex-wrap: wrap;
  padding: 11px var(--gutter);
  background: rgba(47, 107, 255, 0.07);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}
.replay b { color: var(--blue-hi); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; font-size: 10.5px; }
.replay span { overflow-wrap: anywhere; }

/* ---------- app chrome ---------- */

.chrome {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}
.chrome div { background: var(--ink-2); padding: 13px var(--gutter); min-width: 0; }
.chrome dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 5px;
}
.chrome dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--paper);
  overflow-wrap: anywhere;
}
.chrome dd.fire { color: var(--alarm); }
.chrome dd.live { color: var(--pos); }

/* ---------- the step rail ---------- */

.stepper {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding: 0 var(--gutter);
  background: var(--ink-2);
  scrollbar-width: thin;
}

.stepbtn {
  appearance: none;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 15px 22px 13px 0;
  margin-right: 22px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted-2);
  cursor: pointer;
  white-space: nowrap;
}
.stepbtn .n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  font-size: 11px;
  flex: 0 0 auto;
}
.stepbtn:hover { color: var(--paper); }
.stepbtn[aria-selected="true"] { color: var(--paper); border-bottom-color: var(--blue); }
.stepbtn[aria-selected="true"] .n { border-color: var(--blue); color: var(--blue-hi); }
.stepbtn.done .n { border-color: var(--line-2); color: var(--muted); }
.stepbtn.fires[aria-selected="true"] { border-bottom-color: var(--alarm); }
.stepbtn.fires[aria-selected="true"] .n { border-color: var(--alarm); color: var(--alarm); }

/* ---------- the stage ---------- */

.stage { padding: clamp(30px, 4.5vw, 54px) var(--gutter) clamp(36px, 5vw, 64px); }
.scene { display: none; max-width: var(--wide); }
.scene.on { display: block; }

.scene > .label { display: block; margin-bottom: 10px; }
.scene h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(25px, 3.2vw, 40px);
  line-height: 1.1;
  margin: 0 0 14px;
}
.scene > p {
  color: var(--muted);
  font-size: 14.5px;
  max-width: 68ch;
  margin: 0 0 24px;
}
.scene > p b { color: var(--paper); font-weight: 500; }

/* ---------- a panel inside a scene ---------- */

.dpanel {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--ink-2);
  margin: 0 0 20px;
  overflow: hidden;
}
.dpanel > .ph {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 18px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--ink-3);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.dpanel > .ph b { color: var(--paper); font-weight: 500; letter-spacing: 0.06em; }
.dpanel > .ph .fire { color: var(--alarm); }
.dpanel > .ph .ok { color: var(--pos); }
.dpanel > .pb { padding: 18px; }
.dpanel > .pb .term { margin: 0; }
.dpanel > .pb > p { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; max-width: 66ch; }
.dpanel > .pb > p:last-child { margin-bottom: 0; }

/* ---------- connect modes ---------- */

.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 1px; background: var(--line); }
.mode { background: var(--ink-2); padding: 18px; min-width: 0; border-top: 2px solid var(--line); }
.mode.on { border-top-color: var(--blue); background: var(--ink-3); }
.mode h3 { font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--paper); margin: 0 0 4px; }
.mode .st {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.mode.on .st { color: var(--blue-hi); }
.mode p { color: var(--muted); font-size: 13px; margin: 10px 0 0; }

/* ---------- run history ---------- */

.runs { display: grid; gap: 1px; background: var(--line); }
.runrow {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 88px 96px;
  gap: 14px;
  align-items: baseline;
  background: var(--ink-2);
  padding: 12px 18px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}
.runrow .when { color: var(--muted-2); font-size: 11.5px; }
.runrow .what { color: var(--paper); overflow-wrap: anywhere; }
.runrow .what em { font-style: normal; color: var(--muted); }
.runrow .acc { white-space: nowrap; }
.runrow .verdict { text-align: right; white-space: nowrap; color: var(--muted-2); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.runrow.fires { background: var(--ink-3); }
.runrow.fires .verdict { color: var(--alarm); }
.runrow.fires .what { color: var(--paper); }

/* ---------- measurement gauges ---------- */

.gauges { display: grid; gap: 1px; background: var(--line); }
.gauge { background: var(--ink-2); padding: 13px 18px; min-width: 0; }
.gauge .top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12.5px;
  margin-bottom: 9px;
}
.gauge .who { color: var(--paper); overflow-wrap: anywhere; }
.gauge .who em { font-style: normal; color: var(--muted-2); }
.gauge .mv { color: var(--muted-2); white-space: nowrap; font-size: 11.5px; }
.gauge.fires .mv { color: var(--alarm); }

.bar { position: relative; height: 8px; background: var(--ink); border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.bar .was { position: absolute; inset: 0 auto 0 0; background: var(--line-2); }
.bar .now { position: absolute; inset: 0 auto 0 0; background: var(--blue-dim); }
.gauge.fires .bar .now { background: var(--alarm); opacity: 0.85; }
.gauge .scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted-2);
  margin-top: 6px;
  letter-spacing: 0.08em;
}

/* ---------- the chain ---------- */

.chain { list-style: none; margin: 0; padding: 0; }
.chain li {
  position: relative;
  padding: 0 0 20px 26px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--paper);
  overflow-wrap: anywhere;
}
.chain li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--ink);
}
.chain li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 15px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.chain li:last-child { padding-bottom: 0; }
.chain li:last-child::after { display: none; }
.chain li .via { display: block; color: var(--muted-2); font-size: 11px; margin-top: 3px; letter-spacing: 0.04em; }
.chain li.origin::before { border-color: var(--alarm); background: var(--alarm); }
.chain li.target::before { border-color: var(--blue); background: var(--blue); }

/* ---------- incidents ---------- */

.incs { display: grid; gap: 1px; background: var(--line); }
.inc { background: var(--ink-2); padding: 14px 18px; display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 14px; align-items: baseline; }
.inc .pri {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted-2);
  border: 1px solid var(--line-2);
  border-radius: 2px;
  padding: 3px 0;
  text-align: center;
}
.inc .pri.critical { color: var(--alarm); border-color: rgba(255, 90, 77, 0.45); }
.inc .pri.high { color: #ffab4d; border-color: rgba(255, 171, 77, 0.4); }
.inc .t { font-size: 13.5px; color: var(--paper); overflow-wrap: anywhere; }
.inc .u { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted-2); margin-top: 4px; overflow-wrap: anywhere; }

/* ---------- step nav ---------- */

.navbtns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.navbtn {
  appearance: none;
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 12px 20px;
  border-radius: 2px;
  border: 1px solid var(--line-2);
  background: none;
  color: var(--paper);
  cursor: pointer;
}
.navbtn:hover { border-color: var(--blue); background: rgba(47, 107, 255, 0.09); }
.navbtn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.navbtn.primary:hover { background: #4c81ff; border-color: #4c81ff; }
.navbtn[disabled] { opacity: 0.32; cursor: default; }
.navbtn[disabled]:hover { border-color: var(--line-2); background: none; }
.navbtns .of { font-family: var(--mono); font-size: 11.5px; color: var(--muted-2); margin-left: auto; }

.nextup {
  border: 1px dashed var(--line-2);
  border-radius: 3px;
  padding: 18px;
  background: rgba(47, 107, 255, 0.03);
}
.nextup h3 { font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--paper); margin: 0 0 8px; }
.nextup p { color: var(--muted); font-size: 13.5px; margin: 0 0 12px; max-width: 64ch; }
.nextup p:last-child { margin-bottom: 0; }
.nextup .jur { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.nextup .jur span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 5px 10px;
}

@media (max-width: 700px) {
  .runrow { grid-template-columns: minmax(0, 1fr) 92px; row-gap: 5px; }
  .runrow .when { grid-column: 1 / -1; }
  .runrow .acc { text-align: right; }
  .runrow .verdict { grid-column: 1 / -1; text-align: left; }
  .inc { grid-template-columns: minmax(0, 1fr); }
  .inc .pri { justify-self: start; padding: 3px 10px; }
  .stage { padding-left: var(--gutter); padding-right: var(--gutter); }
}
