/* ============ the console's use of the design language ============ */
/* Ground, text, brand, state, tone, type, tracking and form all come from tokens.css, which this
   file reads and never redefines: it declares no colour, no size and no tracking of its own (a
   translucent shade is a token mixed toward transparent, and the two SVG data: URIs, which cannot
   read a custom property, repeat --fg-300 and --brand by value). The
   console takes the .dense density (index.html, body class), so every named step it uses is the
   console notch of the same scale the marketing surfaces take at their own. */

/* ============ the mono, self-hosted ============ */
/* tokens.css names JetBrains Mono first in --mono and asks it be self-hosted wherever a surface must
   work air-gapped: these are envor-portal's files (SIL OFL 1.1, fonts/OFL.txt). 500 has no face of
   its own and takes the nearest. */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/jetbrains-mono-normal-400.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/jetbrains-mono-normal-600.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/jetbrains-mono-normal-700.woff2") format("woff2");
}

/* ============ base ============ */
/* Mobile-first: base styles target a phone; the desktop shell is restored in min-width queries. */
* {
  box-sizing: border-box;
  margin: 0;
}
html {
  height: 100%;
}
/* The ground is flat. The design language's ramp descends from the page ground into panels, so a
   raised surface is lighter than the plane it sits on; a gradient underneath makes that
   relationship read differently in every corner of the screen. */
body {
  color: var(--fg-100);
  min-height: 100%;
  font: var(--fs-body) var(--mono);
  background: var(--ink-000);
}
a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
::selection {
  background: var(--brand);
  color: var(--ink-000);
}
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--line);
  border: 3px solid var(--ink-000);
  background-clip: padding-box;
}

/* ============ primitives ============ */
/* The eyebrow, defined once for every small uppercase label in the console: the primitive, a table
   head, a stat's caption, a field's label, a definition term, a direction marker. They differed
   only by a hair of tracking before, which read as drift rather than as distinction. */
.t-lbl,
th,
.kpi .lbl,
.nextline .lbl,
label.f,
.defs dt {
  font-size: var(--fs-nano);
  text-transform: uppercase;
  letter-spacing: var(--tr-label);
  color: var(--fg-400);
  font-weight: 600;
}
/* The verdict classes. Colour appears only where convergence has something to say, which is why
   there is no categorical hue left here: an event kind, an operation's lifecycle and a customer's
   own state name are all facts without a verdict, and they take the neutral ramp instead. */
.c-green {
  color: var(--brand);
} /* converged, confirmed, settled */
.c-live {
  color: var(--live);
} /* in flight: work happening now */
.c-amber {
  color: var(--held);
} /* a deferral holds this         */
.c-degraded {
  color: var(--degraded);
} /* partial, needs attention      */
.c-red {
  color: var(--fail);
} /* failed, halted, unreachable   */
.c-text {
  color: var(--fg-100);
} /* present: the near end of the neutral ramp */
.c-dim {
  color: var(--fg-300);
}
.c-faint {
  color: var(--fg-400);
}
.pad {
  padding: 14px 18px;
}
.pad-lg {
  padding: 28px 30px;
}
.stack {
  padding: 10px 18px;
}
.hr-t {
  border-top: 1px solid var(--ink-200);
}
/* Every row of fields in the console wraps and sits on one baseline; only the spacing and the
   frame around them is each one's own. */
.bar,
.fieldrow,
form.inline,
.fpbig,
.wayback {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
}
.bar,
.fieldrow {
  gap: 10px;
}
.fieldrow {
  padding: 8px 18px;
  border-bottom: 1px solid var(--ink-200);
}
.fieldrow:last-of-type {
  border-bottom: none;
}
.fieldrow button.danger {
  margin-left: auto;
} /* removals hang right, off the field cluster */
.hr-b {
  border-bottom: 1px solid var(--ink-200);
}
.gap-b {
  margin-bottom: 18px;
}
.wide {
  min-width: 320px;
}
/* The sub-display: a state name or a money value set at lead size. Mono is the display face, so
   it is closed up and tabular rather than merely enlarged. */
.fig {
  font-family: var(--font-display);
  font-size: var(--fs-lead);
  font-weight: 600;
  letter-spacing: var(--tr-figure);
  font-variant-numeric: tabular-nums;
}
.subcard {
  border: 1px solid var(--ink-200);
  margin: 10px 18px;
  padding-bottom: 8px;
}
.empty {
  padding: 28px 18px;
  color: var(--fg-400);
  font-size: var(--fs-body);
  font-family: var(--sans);
}
/* the quiet chrome button: transparent, outlined, dim until you touch it. The hamburger, the help
   toggle and both dismisses are the same object at different sizes. */
.menu-btn,
.help-btn,
.help-close,
.modal-close {
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg-300);
}
.menu-btn:hover,
.help-btn:hover,
.help-close:hover,
.modal-close:hover,
button:where(:not(:disabled)):hover {
  color: var(--fg-100);
  border-color: var(--fg-400);
  background: var(--ink-200);
}
.help-close,
.modal-close {
  width: 26px;
  height: 26px;
  font-size: var(--fs-lead);
  line-height: 1;
}

/* ============ chrome (mobile: off-canvas drawer over a scrim; wide: a fixed two-pane shell) ============ */
aside {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
  width: min(84vw, 280px);
  display: flex;
  flex-direction: column;
  background: var(--ink-050);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.22s ease;
}
body.nav-open aside {
  transform: translateX(0);
  box-shadow: 0 24px 60px color-mix(in srgb, var(--ink-000) 60%, transparent);
}
.scrim {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: color-mix(in srgb, var(--ink-000) 62%, transparent);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}
body.nav-open .scrim {
  opacity: 1;
  visibility: visible;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
  cursor: pointer;
}
.logo svg {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
.logo .word {
  font-size: var(--fs-head);
  font-weight: 700;
  color: var(--fg-000);
}
.logo .word small {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-nano);
}
.navlabel {
  padding: 16px 20px 7px;
  font-size: var(--fs-nano);
  letter-spacing: var(--tr-label);
}
.navitem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: var(--fg-300);
  font-size: var(--fs-body);
  cursor: pointer;
}
.navitem:hover {
  background: var(--ink-200);
  color: var(--fg-100);
}
.navitem.active {
  color: var(--fg-000);
  background: var(--ink-200);
  box-shadow: inset 2px 0 0 var(--brand);
}
.navitem .count {
  margin-left: auto;
  font-size: var(--fs-meta);
  color: var(--fg-400);
}

main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}
/* the hamburger toggles the drawer; hidden once the sidebar is fixed */
.menu-btn {
  display: inline-flex;
  width: 34px;
  height: 34px;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--ink-000);
  font-size: var(--fs-body);
  color: var(--fg-300);
}
.topbar .sep {
  color: var(--fg-400);
}
.topbar #crumbs {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar .crumb {
  cursor: pointer;
}
.topbar .crumb:hover {
  color: var(--fg-100);
}
.topbar .crumb.here {
  color: var(--fg-100);
  cursor: default;
}
#conn {
  font-size: var(--fs-meta);
  color: var(--fg-400);
  flex-shrink: 0;
  white-space: nowrap;
}
#clock {
  font-size: var(--fs-body);
  color: var(--fg-300);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
#conn::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: var(--r-full);
  background: var(--fail);
}
#conn.live::before {
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-dim);
}
.scroll {
  flex: 1 0 auto;
  padding: 16px 14px 40px;
}
.statusbar {
  display: none;
}

@media (min-width: 860px) {
  body {
    display: flex;
    height: 100%;
  }
  aside {
    position: static;
    transform: none;
    transition: none;
    width: 250px;
    flex-shrink: 0;
    height: 100vh;
    box-shadow: none;
  }
  .scrim,
  .menu-btn {
    display: none;
  }
  main {
    flex: 1;
    height: 100vh;
    overflow: hidden;
    min-height: 0;
  }
  .topbar {
    position: static;
    padding: 15px 32px;
    background: transparent;
  }
  .topbar #crumbs {
    flex: 0 1 auto;
  }
  #conn {
    margin-left: auto;
  }
  .scroll {
    flex: 1;
    overflow-y: auto;
    padding: 30px clamp(24px, 2.2vw, 56px) 56px;
  }
  .statusbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 9px 32px;
    border-top: 1px solid var(--line);
    font-size: var(--fs-meta);
    color: var(--fg-400);
    flex-shrink: 0;
  }
  .statusbar .mid {
    margin-left: auto;
  }
}

/* ============ contextual help (desktop-only retracting right bar; pushes content, never covers it) ============ */
.help-btn {
  display: none;
  width: 26px;
  height: 26px;
  border-radius: var(--r-0);
  font: 600 var(--fs-body) var(--mono);
}
body.help-open .help-btn {
  border-color: var(--brand);
  color: var(--brand);
}
aside.help {
  display: none;
}
.help-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--ink-050);
  z-index: 1;
}
.help-hd .t-lbl {
  flex: 1;
}
.help-body {
  padding: 16px 18px 40px;
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--fg-200);
}
.help-body h4 {
  color: var(--fg-100);
  font-size: var(--fs-body);
  font-weight: 600;
  margin: 16px 0 6px;
}
.help-body h4:first-child {
  margin-top: 0;
}
.help-body p {
  margin-bottom: 9px;
}
.help-body b {
  color: var(--fg-100);
  font-weight: 600;
}
.help-body i {
  color: var(--brand);
  font-style: normal;
}
@media (min-width: 860px) {
  .help-btn {
    display: inline-flex;
  }
  main {
    transition: padding-right 0.22s ease;
  }
  body.help-open main {
    padding-right: 340px;
  }
  aside.help {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 30;
    width: 340px;
    background: var(--ink-050);
    border-left: 1px solid var(--line);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.22s ease;
  }
  body.help-open aside.help {
    transform: translateX(0);
    box-shadow: -24px 0 60px color-mix(in srgb, var(--ink-000) 45%, transparent);
  }
}

/* ============ panel ============ */
.panel {
  background: var(--ink-150);
  margin-bottom: 14px;
  position: relative;
}
/* A panel head is structure, so it takes --line; the rows beneath it take --ink-200. Two weights
   of rule, one job each: the design language's console draws the same pair. */
.phd {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}
.phd .idx {
  font-size: var(--fs-nano);
  color: var(--fg-400);
  font-variant-numeric: tabular-nums;
}
.phd .ttl {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--fg-100);
  flex-shrink: 0;
}
.phd .sub {
  font-size: var(--fs-meta);
  color: var(--fg-400);
  margin-left: auto;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.phd > button {
  flex-shrink: 0;
  margin-left: 4px;
}
/* The crossing to an entity's other tier. Sits with the panel's own actions rather than in the
   body, because it moves you to another page rather than saying anything about this one. The
   subtitle's auto margin already pushes the tail of the header right, so this needs no margin. */
.phd-act {
  flex-shrink: 0;
  font: var(--fs-nano) var(--mono);
  letter-spacing: var(--tr-label);
  color: var(--fg-400);
  text-transform: uppercase;
}
.phd.bare {
  border: none;
  padding-bottom: 6px;
}
.note {
  padding: 12px 18px;
  border-top: 1px solid var(--ink-200);
  font-size: var(--fs-meta);
  color: var(--fg-200);
  line-height: 1.6;
  background: var(--ink-100);
}

/* ============ rows & table ============ */
/* A feed window scales with the glass rather than stopping at a fixed 340px and leaving the rest
   of the viewport empty. Its taller sibling already read in vh; both do now. */
.rows {
  max-height: min(52vh, 620px);
  overflow-y: auto;
}
.rows.tall {
  max-height: 60vh;
}
.row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--ink-200);
  font-size: var(--fs-body);
}
.row:last-child {
  border-bottom: none;
}
.row.click,
tr.click {
  cursor: pointer;
}
.row.click:hover,
tr.click:hover {
  background: var(--ink-200);
}
.row .t {
  color: var(--fg-400);
  font-size: var(--fs-meta);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.row .k {
  font-size: var(--fs-nano);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  font-weight: 600;
  flex-shrink: 0;
}
.row .end {
  margin-left: auto;
  font-size: var(--fs-meta);
  color: var(--fg-400);
  flex-shrink: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.row .end.ok {
  color: var(--brand);
}
.row .end.bad {
  color: var(--degraded);
}
/* a log row links its source objects: a resting underline marks the affordance, the brand on hover */
.row .what {
  min-width: 0;
}
/* feed rows read as a table: fixed time and kind columns, so every line's subject starts at the
   same x and the eye can walk a column; the verdict keeps the right edge */
.row.log {
  display: grid;
  grid-template-columns: 66px 128px minmax(0, 1fr) minmax(120px, auto) auto;
  align-items: baseline;
}
.row.log .k {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.row.log .st {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
.lk {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  text-decoration-color: var(--fg-400);
}
.lk:hover {
  color: var(--brand);
  text-decoration-color: var(--brand);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-body);
}
th {
  text-align: left;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 11px 18px;
  border-bottom: 1px solid var(--ink-200);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
tr:last-child td {
  border-bottom: none;
}
td .dim {
  color: var(--fg-300);
}
td .faint {
  color: var(--fg-400);
  font-size: var(--fs-meta);
}

/* ============ kpi (the labeled stat: cards, heroes): stacked on mobile, columns when wide ============ */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.split.c3 {
  grid-template-columns: 1fr;
}
.split > * + * {
  border-top: 1px solid var(--ink-200);
  padding-top: 14px;
}
.kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
/* the stat and its smaller twin on the card stacks: one display value, one quiet caption under
   it. This is tokens.css's .num primitive, spelled out because the markup carries no class. */
.kpi .val,
.nextline .nval {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--tr-figure);
  font-variant-numeric: tabular-nums;
}
.kpi .val {
  font-size: var(--fs-d-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  text-wrap: balance;
}
.kpi-lg .val {
  font-size: var(--fs-d);
  line-height: 0.94;
  margin: 2px 0 4px;
}
.kpi .val.none,
.nextline .nval.none {
  color: var(--fg-400);
}
.kpi .sub,
.nextline .nsub {
  font-size: var(--fs-meta);
  color: var(--fg-400);
  font-variant-numeric: tabular-nums;
}
.kpi .sub {
  line-height: 1.55;
}
/* the caption under a figure that is MOVING. A boundary still to come is not moving, so it keeps
   the neutral step: only work happening now takes the live one. */
.kpi .sub.when {
  color: var(--live);
}
/* The small multi-env card stacks: the current environmentState as the headline, the next change as
   one quiet labeled line beneath. The single-env status page keeps its side-by-side pair. */
/* NEXT and LEAVING have to land on one baseline across the board, so the caption above them
   reserves its two lines whether or not this tile's caption needs both. Anchoring the second line
   to the tile's floor instead would align its bottom and leave the labels ragged, and the label is
   the thing the eye walks across a row of tiles. */
.cstack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}
.cstack .hero {
  align-items: center;
}
.cstack .hero .sub {
  min-height: calc(2 * 1.55em);
}
.cstack .hero .val {
  font-size: var(--fs-d);
  line-height: 0.96;
}
/* The second line reads like the first: the label and the state it names hold a line of their own,
   and the detail follows underneath. Letting all three flow together wrapped them at whatever
   width the tile happened to be, so where the state name fell moved from tile to tile. */
.nextline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  column-gap: 6px;
  row-gap: 2px;
  border-top: 1px solid var(--ink-200);
  padding-top: 10px;
}
.nextline .nsub {
  flex-basis: 100%;
}
.nextline .nval {
  font-size: var(--fs-lead);
  overflow-wrap: anywhere;
}
.pad-lg .split {
  gap: 18px;
}
/* the hero panel is the same surface as any other: it earns its weight from size and air */
.panel.pad-lg {
  background: var(--ink-150);
}
@media (min-width: 560px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
  .split.c3 {
    grid-template-columns: 1fr 1fr;
  }
  .split > * + * {
    border-top: none;
    border-left: 1px solid var(--ink-200);
    padding-top: 0;
    padding-left: 14px;
  }
  .kpi-lg .val {
    font-size: var(--fs-d-lg);
  }
  .pad-lg .split {
    gap: 26px;
  }
  .pad-lg .split > * + * {
    padding-left: 26px;
  }
}
@media (min-width: 820px) {
  .split.c3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* ============ card ============ */
/* auto-fit, not auto-fill: a lone card fills the row instead of parking in a phantom track.
   The rules are the gaps, as they are on the wallboard's tile grid: the board's own ground shows
   through a 1px seam and no card carries a visible edge of its own. The 1px border is still there
   and still transparent, because it is what a wedge and a jam colour to ring the whole tile. */
.board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 288px), 1fr));
  gap: 1px;
  background: var(--line);
  margin-bottom: 22px;
}
.card {
  position: relative;
  border: 1px solid transparent;
  background: var(--ink-150);
  padding: 17px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
}
.card:hover {
  background: var(--ink-200);
}
/* A wedged environment outlines whole: it is not going to reach its target on its own, which is a
   fact about the environment rather than about any one line inside it. Colour alone carries it, on
   the tile's own 1px: a thicker ring would reflow the grid, and an outer shadow would sit proud of
   the border the strip is positioned to lie flush against (.strip, bottom:-1px). The mark and its
   tooltip carry the same fact, so nothing rests on colour by itself. */
.card.wedged,
.panel.wedged {
  border-color: var(--fail);
}
/* A jam is the same shape of fact, whole-environment rather than per-line, so it wears the same
   ring in the hold's own colour: both sub-states show the lock, and the ring is what says this one
   has a change behind it. Red wins where both apply (app.js, envRing), a wedge not being something
   that lifts on its own timer. */
.card.jammed,
.panel.jammed {
  border-color: var(--held);
}
/* The marks are 24px, so a tile carrying one stood 6px taller than a tile without and the row
   read ragged. The head reserves their height whether or not this tile has any. */
.hd {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}
.hd .name {
  font-size: var(--fs-head);
  font-weight: 600;
}
/* the hero's header: the page's subject gets its voice before its numbers */
.pad-lg .hd {
  margin-bottom: 22px;
}
.pad-lg .hd .name {
  font-size: var(--fs-lead);
}
.pad-lg .marks span {
  width: 26px;
  height: 26px;
}
/* schedule progress toward the next boundary, not motion: it stays quiet and never turns red */
.strip {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  background: var(--line-hi);
}
/* the rail: an in-flight transition's progress: a visible track with a fill, sitting on the
   container's bottom edge, so elapsed-of-expected reads as a gauge rather than a hairline */
.rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: var(--ink-100);
  border-radius: var(--r-1);
  overflow: hidden;
}
.pbar {
  width: 100%;
  min-width: 120px;
  max-width: 200px;
  height: 6px;
  background: var(--ink-100);
  border-radius: var(--r-1);
  overflow: hidden;
  position: relative;
  display: block;
}
.rail > i,
.pbar > i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background: var(--live);
  border-radius: var(--r-1);
}
.rail > i {
  box-shadow: 0 0 10px var(--live-glow);
}
.rail.over > i,
.pbar.over > i {
  background: var(--fail);
}
.rail.over > i {
  box-shadow: 0 0 10px color-mix(in srgb, var(--fail) 40%, transparent);
}
.plbl {
  font-size: var(--fs-nano);
  color: var(--fg-400);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  display: block;
  margin-top: 5px;
}

/* The transition corridor as a bullet meter: the declared [min,max] is the quiet range band
   (the track step of the same ramp), the adaptive estimate the labeled marker on it (hollow
   until samples back it), a declared settle floor a faint notch, and in flight the elapsed
   fill marches on the marker, overrunning in the failed step as the hero rail does. */
.corridor {
  position: relative;
  margin-top: 24px;
  max-width: 250px;
}
.corridor .cval {
  position: absolute;
  top: -16px;
  transform: translateX(-50%);
  font-size: var(--fs-meta);
  color: var(--fg-100);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.corridor .band {
  position: relative;
  height: 10px;
  background: var(--ink-100);
  border-radius: var(--r-1);
}
.corridor .band i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--live);
  opacity: 0.4;
  border-radius: var(--r-1) 0 0 var(--r-1);
}
.corridor.over .band i {
  background: var(--fail);
  opacity: 0.5;
}
.corridor .band u {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 3px;
  border-radius: var(--r-1);
  background: var(--live);
  transform: translateX(-50%);
  box-shadow: 0 0 8px var(--live-glow);
}
.corridor .band u.hollow {
  background: var(--ink-150);
  border: 1.5px solid var(--live);
  width: 6px;
  box-shadow: none;
}
/* The wake page's own tick: 2px with a dark halo, so it stays legible on the empty track and
   where it crosses a filled bar, which is exactly where it matters. */
.corridor .band b {
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: 2px;
  background: var(--fg-300);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink-000) 80%, transparent);
}
.corridor .band b.minn {
  top: -3px;
  bottom: -3px;
  background: var(--fg-100);
}
.corridor .band .lseg {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-right: 1px solid var(--line);
  background: repeating-linear-gradient(
    45deg,
    var(--ink-200) 0 4px,
    transparent 4px 8px
  );
}
.corridor .ends {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-nano);
  color: var(--fg-400);
  font-variant-numeric: tabular-nums;
  margin-top: 5px;
}
@media (min-width: 560px) {
  .split.tl {
    grid-template-columns: 3fr 1fr 1fr;
  }
}
.split.tl .corridor {
  max-width: 460px;
}

/* ============ the timeline scanner ============ */
/* The recorded past (solid), the walked future (washed), the seam at now; a transition is a
   striped stretch between held spans. The hover cursor scans; the readout speaks below. */
.scan-strip {
  position: relative;
  height: 34px;
  background: var(--ink-100);
  border-radius: var(--r-1);
  overflow: hidden;
  cursor: crosshair;
}
.scan-strip .sseg {
  position: absolute;
  top: 0;
  bottom: 0;
}
.scan-strip .sseg.moving::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    115deg,
    color-mix(in srgb, var(--ink-000) 45%, transparent) 0 5px,
    transparent 5px 9px
  );
}
.scan-strip .sseg.proj {
  opacity: 0.58;
}
.scan-strip .sseg.proj.mandated {
  box-shadow: inset 0 -3px 0 var(--fg-300);
}
.scan-strip .sseg.proj.deferred::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    color-mix(in srgb, var(--ink-000) 40%, transparent) 0 4px,
    transparent 4px 8px
  );
}
.scan-strip .snow {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--fg-000);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink-000) 85%, transparent);
}
.scan-cursor {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--fg-100);
  opacity: 0.7;
  display: none;
  pointer-events: none;
}
.scan-ticks {
  position: relative;
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-nano);
  color: var(--fg-400);
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
}
.scan-ticks .snow-lbl {
  position: absolute;
  left: 30%;
  transform: translateX(-50%);
  color: var(--fg-100);
}
.scan-read {
  margin-top: 7px;
  font-size: var(--fs-meta);
  color: var(--fg-300);
  min-height: 16px;
  font-variant-numeric: tabular-nums;
}
.scan-pin {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--brand);
  display: none;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink-000) 85%, transparent);
  pointer-events: none;
}
.scan-sel {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--brand-dim);
  border-left: 1px solid var(--brand);
  border-right: 1px solid var(--brand);
  display: none;
  pointer-events: none;
}
.scan-pinread {
  margin-top: 4px;
  font-size: var(--fs-meta);
  color: var(--fg-100);
  display: none;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}

/* ============ marks & badge ============ */
.marks {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.marks span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  cursor: default;
}
.marks svg {
  stroke: currentColor;
}
/* The state marker, as tokens.css defines it: a dot carries the colour and the word carries the
   meaning, with no capsule and no tint. The pill and its wash were doing the work a second time
   and in a second idiom, and a tinted capsule reads as a control you can press. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-size: var(--fs-nano);
  font-weight: 600;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--fg-300);
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: var(--r-full);
  background: currentColor;
  flex-shrink: 0;
}

/* ============ forms (mobile: fields fill their row; wide: they size to content and wrap) ============ */
form.inline {
  gap: 10px;
  padding: 14px 16px;
}
/* the group separator: related fields cluster between hairlines: grouping in form, not words */
.fsep {
  width: 1px;
  align-self: stretch;
  background: var(--line);
  margin: 0 6px;
}
@media (max-width: 719px) {
  .fsep {
    display: none;
  }
} /* stacked fields need no vertical rule */
label.f {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 100%;
}
label.f input:not([type="checkbox"]),
label.f select,
label.f textarea {
  width: 100%;
}

/* One declaration decides how every control speaks, so no user-agent default gets a vote and a
   control kind added later cannot drift off on its own. option and optgroup are named with the
   rest because a select and the list it drops must read as one control, and only some engines
   inherit into that list unasked. The longhands are spelled out rather than the font shorthand:
   weight, line-height and tracking are exactly what each engine decides differently per control
   kind, so each is stated instead of left to a shorthand's initial values. */
input,
select,
textarea,
button,
optgroup,
option {
  font-family: var(--mono);
  font-size: var(--fs-body);
  font-weight: 400;
  font-style: normal;
  line-height: normal;
  letter-spacing: normal;
  font-variant-numeric: tabular-nums;
}
input,
select,
textarea {
  background: var(--ink-100);
  border: 1px solid var(--line);
  color: var(--fg-100);
  min-width: 0;
}
input,
select {
  height: var(--ctl);
  padding: 0 9px;
}
/* prose, not a value: it grows down the page and keeps a reading line-height */
textarea {
  padding: 7px 9px;
  line-height: 1.6;
  resize: vertical;
}
option,
optgroup {
  background: var(--ink-200);
  color: var(--fg-100);
}
@media (min-width: 560px) {
  form.inline {
    padding: 14px 18px;
  }
  label.f {
    flex: 0 1 auto;
  }
  label.f input:not([type="checkbox"]),
  label.f select,
  label.f textarea {
    width: auto;
    min-width: 120px;
  }
}
input[type="number"] {
  padding-right: 2px;
} /* leave room for the native spinner */
/* Gecko dims placeholders to 54% opacity of its own accord, so the same colour reads lighter
   there than elsewhere; opacity:1 hands the shade back to --fg-400 alone. */
input::placeholder,
textarea::placeholder {
  color: var(--fg-400);
  opacity: 1;
}
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 26px;
  /* a data: URI cannot read a custom property: the chevron's stroke is --fg-300 by value */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%239ca3af' stroke-width='1.4'><path d='M3 4.5 6 7.5 9 4.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 9px center;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--fg-400);
}
/* A date or time field is the one control whose text the engine draws from its own shadow parts,
   and Blink's parts inherit nothing, so they are named here to keep the digits in the same voice
   as the field around them and the picker glyph visible against a dark one. Gecko exposes no
   equivalent hooks: its date fields keep native spacing, which is why a date reads a little wider
   there than here. */
::-webkit-datetime-edit,
::-webkit-datetime-edit-fields-wrapper,
::-webkit-datetime-edit-text,
::-webkit-datetime-edit-year-field,
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-minute-field {
  font: inherit;
  color: inherit;
}
::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.45;
  cursor: pointer;
}
::-webkit-calendar-picker-indicator:hover {
  opacity: 0.85;
}
button {
  background: var(--ink-200);
  border: 1px solid var(--line);
  color: var(--fg-100);
  height: var(--ctl);
  padding: 0 14px;
  cursor: pointer;
}
button.primary {
  border-color: var(--brand);
  color: var(--brand);
}
button.primary:where(:not(:disabled)):hover {
  background: var(--brand-dim);
  color: var(--brand-hi);
  border-color: var(--brand-hi);
}
button.danger {
  border-color: var(--fail);
  color: var(--fail);
}
button.danger:where(:not(:disabled)):hover {
  background: color-mix(in srgb, var(--fail) 12%, transparent);
}
/* a button that can't be used now: dimmed, and still hoverable, so its title can say why */
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
button.small {
  height: 24px;
  padding: 0 10px;
  font-size: var(--fs-meta);
}
.fieldrow button.small {
  height: var(--ctl);
} /* row controls share the line */
.checks {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 14px;
  color: var(--fg-300);
  font-size: var(--fs-body);
}
.checks.tight {
  padding-top: 0;
}
.checks.chips {
  gap: 4px;
}
.checks.chips button {
  color: var(--fg-400);
}
.checks.chips button.on {
  border-color: var(--brand);
  color: var(--brand);
}
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
  width: 16px;
  height: 16px;
  border: 1px solid var(--line);
  background: var(--ink-100);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
input[type="checkbox"]:hover {
  border-color: var(--fg-400);
}
input[type="checkbox"]:checked {
  border-color: var(--brand);
  /* a data: URI cannot read a custom property: the tick's stroke is --brand by value */
  background: var(--ink-100)
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='none' stroke='%2334d74a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M3.5 8.5 L6.5 11.5 L12.5 4.5'/></svg>")
    center no-repeat;
}
input[type="checkbox"]:focus-visible {
  outline: 1px solid var(--fg-400);
  outline-offset: 1px;
}
/* a checkbox and its words are one target, so the words drop the label eyebrow's case and tracking
   and sit on the box's own line */
label.f.f-check,
.wayback label.ck {
  display: flex;
  align-items: center;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}
label.f.f-check,
.wayback label.ck {
  gap: 8px;
  color: var(--fg-300);
  font-size: var(--fs-body);
}
label.f.f-check {
  flex-direction: row;
  height: var(--ctl);
  align-self: flex-end;
}

/* ============ cost (Epic 14) ============ */
.preview {
  margin: 12px 18px 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--ink-100);
  font-size: var(--fs-body);
  line-height: 1.7;
}
.preview.dim {
  color: var(--fg-400);
}
.preview .chipbar {
  margin-top: 8px;
}

/* the mandate span strip: pre-positioning / dwell / reverting, schematic widths, real labels */
.spanwrap {
  padding: 18px 18px 6px;
}
.spanstrip {
  display: flex;
  align-items: flex-end;
  gap: 4px;
}
.spanstrip .sseg {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.spanstrip .sseg .slabel {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sbar {
  height: 36px;
  border: 1px solid var(--line);
  position: relative;
}
.sbar.ramp {
  opacity: 0.9;
}
.spanstrip .sseg .ssub {
  font-size: var(--fs-nano);
  color: var(--fg-300);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.spanstrip .sseg .ssub.faint {
  color: var(--fg-400);
}
/* the now-hairline with its cap, on the week strips */
.rnow {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 1px;
  background: var(--fg-000);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink-000) 85%, transparent);
  z-index: 2;
  pointer-events: none;
}
.rnow::after {
  content: "now";
  position: absolute;
  top: -13px;
  text-transform: uppercase;
  font-size: var(--fs-nano);
  font-weight: 600;
  color: var(--fg-300);
  left: -16px;
  letter-spacing: var(--tr-label);
}
.spanwrap .rlegend {
  padding: 12px 0 4px;
} /* the strip has no day-line label gutter to indent past */

/* the editable key/value table (topic inputs): twin of the read-only outputs table */
.kvtable td {
  padding: 8px 18px;
}
.kvtable td input {
  width: 100%;
  min-width: 0;
}
.kvtable td.rt,
.kvtable th:last-child {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}

/* ============ messages ============ */
.msg {
  margin: 0 18px 14px;
  padding: 12px 14px;
  border: 1px solid var(--brand);
  color: var(--brand);
  font-size: var(--fs-body);
  word-break: break-all;
  background: var(--ink-100);
}
.msg.bad {
  border-color: var(--fail);
  color: var(--fail);
}
.secret {
  color: var(--degraded);
}

/* ============ week strips (env preview + schedule authoring) ============ */
.rline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 18px 5px;
}
.rline:first-of-type {
  margin-top: 16px;
}
.rlbl {
  width: 58px;
  font-size: var(--fs-nano);
  color: var(--fg-400);
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.rbar {
  flex: 1;
  display: flex;
  height: 20px;
  background: var(--ink-100);
  position: relative;
}
.rseg {
  position: relative;
  min-width: 1px;
}
.rseg:not(.rgap) {
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--fg-000) 10%, transparent);
}
/* the mandate marker is neutral: a driver standing in front of the law is not a verdict about
   the environment, and the hold beside it is the one exception that earns a hue. */
.rseg.mandated {
  box-shadow:
    inset 0 3px 0 var(--fg-300),
    inset 0 -2px 0 color-mix(in srgb, var(--fg-000) 10%, transparent);
}
.rseg.deferred {
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0 6px,
    color-mix(in srgb, var(--ink-000) 35%, transparent) 6px 12px
  );
}
.rseg.click {
  cursor: pointer;
}
.rseg.click:hover {
  filter: brightness(1.3);
}
/* undefined spans are textured, defined rest-states are flat: rest vs nothing reads in form, not shade */
.rgap {
  background: repeating-linear-gradient(
    45deg,
    transparent 0 5px,
    color-mix(in srgb, var(--fg-000) 5%, transparent) 5px 9px
  );
}
.rhours {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 18px 0;
}
.rhours .rlbl {
  visibility: hidden;
}
.rhours .ticks {
  flex: 1;
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-nano);
  color: var(--fg-400);
  font-variant-numeric: tabular-nums;
  padding-bottom: 10px;
}
.rlegend {
  display: flex;
  gap: 18px;
  padding: 10px 18px 16px 88px;
  font-size: var(--fs-nano);
  color: var(--fg-400);
  flex-wrap: wrap;
}
.rlegend .sw,
.pleg .sw {
  display: inline-block;
  width: 10px;
  height: 10px;
  vertical-align: -1px;
}
.rlegend .sw {
  margin-right: 5px;
}
.rlegend .sw.mandated {
  box-shadow: inset 0 3px 0 var(--fg-300);
}
.rlegend .sw.held {
  background-image: repeating-linear-gradient(
    45deg,
    var(--ink-200) 0 3px,
    var(--ink-100) 3px 6px
  );
}

/* ============ schedule pie ============ */
.pierow {
  display: flex;
  gap: 28px;
  align-items: center;
  padding: 14px 18px 6px;
  flex-wrap: wrap;
}
.pierow svg {
  flex-shrink: 0;
}
.pleg {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--fs-meta);
  color: var(--fg-300);
}
.pleg .sw {
  margin-right: 7px;
}
.pleg .end {
  color: var(--fg-400);
  margin-left: 8px;
}

/* ============ service graph ============ */
@keyframes march {
  to {
    stroke-dashoffset: -20;
  }
}
@keyframes softpulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}
.gwrap {
  padding: 16px 18px;
  overflow-x: auto;
}
.gwrap svg {
  display: block;
  margin-inline: auto;
} /* a small graph centers; a wide one scrolls from the left */
.gnode {
  cursor: pointer;
}
.gnode rect {
  fill: var(--ink-200);
  stroke: var(--line);
  stroke-width: 1;
}
.gnode:hover rect {
  stroke: var(--fg-400);
}
.gnode.inflight rect {
  stroke: var(--live);
  animation: softpulse 1.6s ease-in-out infinite;
}
.gnode.held rect {
  stroke: var(--held);
  stroke-dasharray: 5 4;
}
.gnode.blocked rect {
  stroke: var(--fg-400);
  stroke-dasharray: 2 3;
}
.gnode.halted rect {
  stroke: var(--fail);
  stroke-dasharray: 2 3;
}
/* Standing on the state the desired environmentState assigns it: the one status worth reading at a
   glance across the whole graph, so the ring and the rail carry a colour rather than only a word.
   The state word itself never does. It is the customer's own and holds no verdict, so Stopped reads
   the same here as it does on a node that is still moving. */
.gnode.settled rect {
  stroke: var(--brand);
}
/* The rail restates the node's status down its edge, so the graph stays scannable at a glance
   and does not rest on a 1px border color alone. */
.grail {
  fill: none;
}
.gnode.settled .grail {
  fill: var(--brand);
}
.gnode.inflight .grail {
  fill: var(--live);
}
.gnode.held .grail {
  fill: var(--held);
}
.gnode.blocked .grail {
  fill: var(--fg-400);
}
.gnode.halted .grail {
  fill: var(--fail);
}
.gname {
  fill: var(--fg-100);
  font: 600 var(--fs-body) var(--mono);
}
.gstate {
  fill: var(--fg-300);
  font: 500 var(--fs-head) var(--mono);
}
.gsub {
  fill: var(--fg-400);
  font: var(--fs-nano) var(--mono);
}
.gedge {
  fill: none;
  stroke: var(--fg-400);
  stroke-width: 1.4;
  opacity: 0.75;
}
.gedge.live {
  stroke: var(--live);
  stroke-width: 2;
  stroke-dasharray: 7 5;
  animation: march 0.8s linear infinite;
  opacity: 1;
}
.gedge.blocked {
  stroke: var(--fg-400);
  stroke-width: 2;
  stroke-dasharray: 2 4;
  opacity: 0.9;
}
/* The heads carry the direction. A marker cannot inherit the path's stroke portably, so each
   edge class has its own and they are colored to match here. */
.gahead path {
  fill: var(--fg-400);
  opacity: 0.75;
}
.gahead-live path {
  fill: var(--live);
}
.gahead-blocked path {
  fill: var(--fg-400);
}
.glegend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 12px 2px 2px;
}
.gl {
  color: var(--fg-400);
  font: var(--fs-nano) var(--mono);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.gl::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 1px solid currentColor;
}
.gl-settled {
  color: var(--brand);
}
.gl-inflight {
  color: var(--live);
}
.gl-held {
  color: var(--held);
}
.gl-blocked,
.gl-bystander {
  color: var(--fg-400);
}
.gnode.bystander {
  opacity: 0.5;
}
.gl-halted {
  color: var(--fail);
}

/* ============ the service's per-state authoring surface ============ */
.chipbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 14px 18px 0;
}
.chip {
  border: 1px solid var(--line);
  padding: 3px 12px;
  font-size: var(--fs-body);
  color: var(--fg-300);
  border-radius: var(--r-0);
}
.fnote {
  color: var(--fg-400);
  font-size: var(--fs-meta);
  align-self: center;
}
/* ---- the service state fan: focus and traverse ---- */
.fanstage {
  overflow-x: auto;
  padding: 18px 12px 22px;
}
.fancols {
  position: relative;
  display: grid;
  align-items: center;
  min-width: 640px;
  grid-template-columns:
    150px minmax(96px, 0.6fr) minmax(300px, 1.5fr) minmax(96px, 0.6fr)
    150px;
  grid-template-rows: auto auto;
}
.fancols > .fanlbl {
  grid-row: 1;
  text-align: center;
  margin-bottom: 12px;
  z-index: 2;
  position: relative;
}
.fancols > .fanlbl.in {
  grid-column: 1;
}
.fancols > .fanlbl.out {
  grid-column: 5;
}
.fanrail.in {
  grid-column: 1;
}
.fancentre {
  grid-column: 3;
}
.fanrail.out {
  grid-column: 5;
}
.fanrail,
.fancentre {
  grid-row: 2;
}
.fanrail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  position: relative;
  z-index: 2;
}
.fanempty {
  color: var(--fg-400);
  font-size: var(--fs-meta);
  font-family: var(--sans);
  padding: 6px 2px;
}
svg.fanwires {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
svg.fanwires path {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5;
}
svg.fanwires path.live {
  stroke: var(--fg-400);
}
svg.fanwires path.ghost {
  stroke-dasharray: 4 5;
  opacity: 0.55;
}
.fannode {
  position: relative;
  z-index: 2;
  background: var(--ink-200);
  border: 1px solid var(--line);
  padding: 7px 12px;
  font-size: var(--fs-head);
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}
.fannode:hover {
  border-color: var(--brand);
}
.fannode .nm {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fannode .chev {
  color: var(--fg-400);
  font-size: var(--fs-head);
}
.fannode:hover .chev {
  color: var(--brand);
}
.fannode.ghost {
  border-style: dashed;
  color: var(--fg-300);
}
.fannode.add {
  border-style: dashed;
  color: var(--fg-400);
  font: var(--fs-meta) var(--mono);
  justify-content: center;
}
.fannode.add:hover {
  color: var(--brand);
}
/* the in-rail's invisible twin of + state: both rails carry the same rows, so the i-th states
   align horizontally and the rails centre as equals */
.fannode.pad {
  visibility: hidden;
  pointer-events: none;
}
.fancentre {
  position: relative;
  z-index: 3;
  background: var(--ink-150);
  border: 1px solid var(--brand);
}
.fancentre .fchd {
  padding: 14px 16px 10px;
  text-align: center;
}
/* the state being authored: the customer's own word, so it is set in the display face and
   never coloured. Mono runs wide, so it steps down the scale. */
.fancentre .fcname {
  font-family: var(--font-display);
  font-size: var(--fs-d-sm);
  font-weight: 600;
  letter-spacing: var(--tr-display);
  line-height: 1;
  overflow-wrap: anywhere;
}
.fancentre .fcbody {
  border-top: 1px solid var(--ink-200);
  padding: 12px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.fancentre .fcrow {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.fancentre .fcsect {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.fancentre .note {
  margin: 0;
}
.fanchip {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -50%);
  cursor: pointer;
  background: var(--ink-200);
  border: 1px solid var(--line);
  width: 82px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font: var(--fs-nano) var(--mono);
  color: var(--fg-300);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
}
.fanchip:hover {
  border-color: var(--brand);
  color: var(--fg-100);
}
.fanchip.declare {
  color: var(--brand);
  border-color: var(--brand);
  border-style: dashed;
}
.fancentre .fcrow.del {
  justify-content: flex-end;
  margin-top: 2px;
}
.actions-r,
.modal .actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
/* the first-pair helper: an empty service starts from a pair, both directions declared at once */
.firstpair {
  padding: 18px 18px 22px;
}
.fpbig {
  gap: 12px;
  margin-top: 10px;
}
/* the two state names are values being authored, so they speak in the control voice like every
   other field; only their width is theirs, to give a state name room */
.fpbig input.fpst {
  width: 150px;
}
.fpbig .fpswap {
  color: var(--fg-400);
  font-size: var(--fs-lead);
  align-self: center;
  padding-top: 14px;
}
/* the pair modal's way-back block */
.wayback {
  margin-top: 14px;
  border-top: 1px solid var(--ink-200);
  padding-top: 12px;
  gap: 12px;
}

/* ============ modal ============ */
.overlay {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--ink-000) 62%, transparent);
  display: flex;
  padding: 14px;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.modal {
  background: var(--ink-150);
  border: 1px solid var(--line);
  width: min(520px, 100%);
  max-width: 100%;
  box-shadow: 0 18px 60px color-mix(in srgb, var(--ink-000) 50%, transparent);
}
.modal .pad {
  max-height: 76vh;
  overflow-y: auto;
}
.modal.wide {
  width: min(840px, 100%);
}
.modal.wide .pad {
  padding: 0;
} /* the rich forms carry their own row padding */
.modal .phd {
  border-bottom: 1px solid var(--line);
}
/* The dismiss sits in the header corner, matching the help drawer's; the action row is left to
   the commit alone, so nothing competes with it for the eye. Escape and the scrim also close. */
.modal-close {
  margin-left: 12px;
}
.modal .actions {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
}

/* ============ config detail ============ */
.defs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px 16px;
  padding: 14px 16px;
  font-size: var(--fs-body);
}
.defs dt {
  padding-top: 8px;
}
.defs dt:first-child {
  padding-top: 0;
}
.defs dd {
  word-break: break-word;
}
.kv {
  color: var(--fg-300);
  word-break: break-all;
}
/* A deleted entity's declaration, read-only: the panel's own inset, scrolling rather than wrapping. */
.declared {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: var(--fs-meta);
  color: var(--fg-300);
}
@media (min-width: 560px) {
  .defs {
    grid-template-columns: 170px 1fr;
    gap: 7px 16px;
    padding: 14px 18px;
  }
  .defs dt {
    padding-top: 2px;
  }
  .defs dt:first-child {
    padding-top: 2px;
  }
}

/* the settle-floor token in matrix cells */
.sfloor {
  color: var(--fg-400);
  font-size: var(--fs-nano);
  white-space: nowrap;
}

/* The plane is fluid: data and samples take the width, and only prose keeps a measure. A blanket
   cap on the page parked every table at the same column and left the rest of the glass empty,
   which is the one thing the wallboard and the waking page never do. */
.note,
.preview,
.empty,
.fnote {
  max-width: 88ch;
}

/* ============ responsive helpers ============ */
/* wide data tables scroll horizontally on a phone instead of forcing the page wide (wrapped by app.js) */
.tscroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 559px) {
  .pad-lg {
    padding: 20px 18px;
  }
  .tscroll > table {
    width: auto;
    min-width: 100%;
  }
  .tscroll th,
  .tscroll td {
    white-space: nowrap;
  }
}
