/* Grid Explorer: the stylesheet every page shares (Stepper, Lab).
   Light, Swiss: one sans-serif from the system (no web font is fetched,
   but for the Lab's page when no API answers, and the Stepper's
   introduction and its section on how the replay works: see the end), a grid,
   hierarchy by size and weight, colour kept for data. The tokens are
   custom properties, here and nowhere else, so a page that wants another
   voice (the overview, later) changes them in one place.

   Built: `make web` copies this file beside each page (stepper/ge.css,
   lab/ge.css), so each page's directory is complete on its own. */

:root {
  /* Colour: ink for text and structure, grey for the quiet, two hues for
 data's verdicts only. */
  --ink: #1d1f23;
  --ink-2: #4a4f57;
  --ink-3: #6b717b;
  --rule: #d9dce1;
  --rule-2: #eceef1;
  --paper: #ffffff;
  --wash: #f6f7f8;
  --critical: #c62f25;
  --warning: #b97800;
  --safe: #4a4f57;
  --focus: #1d1f23;
  /* The landing page's one accent: the Stepper's replay badge, and the
 Lab's page when no API answers. */
  --accent: #c8102e;
  /* A device's state on the stepper's lanes: waiting on a deadline, any
 other state, final. Grey steps: state, not quantity. */
  --tone-waiting: #d3d7dd;
  --tone-other: #a5aab2;
  --tone-done: #4a4f57;

  /* Type: one family, a scale of sizes. */
  --font: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  /* IBM Plex, from the site's own fonts/: the Lab's page with no API, and
 the Stepper's introduction and its section on how the replay works. */
  --plex-sans: "Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --plex-mono: "Plex Mono", ui-monospace, Menlo, monospace;
  --type-xs: 11px;
  --type-s: 12px;
  --type-m: 13px;
  --type-base: 14px;
  --type-l: 15px;
  --type-lede: 17px;
  --type-xl: 18px;
  --type-2xl: 22px;
  --type-3xl: 24px;
  --type-4xl: 28px;
  --type-5xl: 32px;
  --type-title: 40px;

  /* Space. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --gutter: 32px;
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --type-title: 30px; }
}

/* Light, Swiss: one sans-serif from the system (no web font is fetched),
   a 12-column grid, hierarchy by size and weight, colour kept for data. */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: var(--type-base);
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
}

.ge-app { max-width: 1480px; margin: 0 auto; padding: 32px var(--gutter) 40px; }
.ge-app--waiting { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.ge-waiting { font-size: var(--type-xl); color: var(--ink-3); }
.ge-error-title { font-size: var(--type-3xl); font-weight: 700; }

.ge-header { border-top: 4px solid var(--ink); padding-top: 14px; margin-bottom: 28px; max-width: 980px; }
.ge-title { font-size: var(--type-title); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; margin-bottom: 10px; }
.ge-lede { font-size: var(--type-lede); color: var(--ink); max-width: 60em; }
.ge-model { font-size: var(--type-base); color: var(--ink-2); margin-top: 6px; max-width: 70em; }

/* The page's two columns. Not .ge-grid: that name once belonged to the
   external-grid symbol too, and its stroke reached every SVG text on the
   page through inheritance (review of 30 November, R4). Layout classes
   and the diagram's mark classes do not share names. */
.ge-layout {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(320px, 4fr);
  gap: 0 var(--gutter);
  align-items: start;
}
@media (max-width: 1100px) { .ge-layout { grid-template-columns: minmax(0, 1fr); } .ge-side { margin-top: 24px; } }

/* The figure column */
.ge-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--rule); margin-bottom: 12px; }
.ge-tab {
  font: inherit; font-size: var(--type-base); font-weight: 500; color: var(--ink-3);
  background: none; border: none; border-bottom: 3px solid transparent;
  padding: 8px 0; margin-right: 28px; margin-bottom: -1px; cursor: pointer;
}
.ge-tab--active { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }
.ge-diagram-box { width: 100%; }
.ge-diagram { display: block; width: 100%; height: auto; }
/* The legend is four drawings at their own size in CSS pixels, so its
   text is the size set here at every width; the row wraps. */
.ge-legend-box { width: 100%; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--rule-2);
  display: flex; flex-wrap: wrap; gap: 8px 28px; }
.ge-legend { display: block; overflow: visible; }
.ge-readout { min-height: 3em; margin-top: 14px; font-size: var(--type-l); max-width: 62em; }
.ge-note { margin-top: 10px; font-size: var(--type-s); color: var(--ink-3); max-width: 70em; }

/* The side column */
.ge-block { padding: 14px 0 18px; border-top: 1px solid var(--rule); }
.ge-block:first-child { border-top: 2px solid var(--ink); }
.ge-block-title { font-size: var(--type-s); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px; }
.ge-quiet { color: var(--ink-2); font-size: var(--type-m); }
.ge-problem { color: var(--critical); font-size: var(--type-m); padding: 10px 0; }
.ge-caveat { margin-top: 6px; }
#settings-rule { font-size: var(--type-s); }

.ge-slider { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.ge-slider-label { font-size: var(--type-m); color: var(--ink-2); }
.ge-slider input { width: 100%; accent-color: var(--ink); }
.ge-figure-number { font-size: var(--type-2xl); font-weight: 700; font-variant-numeric: tabular-nums; min-width: 2.6em; text-align: right; }

.ge-facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; margin-top: 12px; font-size: var(--type-m); }
.ge-facts dt { color: var(--ink-3); }
.ge-facts dd { text-align: right; font-variant-numeric: tabular-nums; }
.ge-facts .ge-facts-total { font-weight: 700; color: var(--ink); border-top: 1px solid var(--rule); padding-top: 3px; margin-top: 3px; }

.ge-switch { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.ge-switch-label { font-size: var(--type-m); color: var(--ink-2); margin-right: 4px; }
.ge-switch-option {
  font: inherit; font-size: var(--type-m); padding: 4px 10px; cursor: pointer;
  color: var(--ink-2); background: var(--paper); border: 1px solid var(--rule);
}
.ge-switch-option--on { color: var(--paper); background: var(--ink); border-color: var(--ink); }

.ge-counts { display: flex; gap: 22px; font-size: var(--type-base); margin-bottom: 6px; }
.ge-count strong { font-size: var(--type-4xl); font-weight: 700; font-variant-numeric: tabular-nums; margin-right: 2px; }
.ge-count--critical strong { color: var(--critical); }
.ge-count--warning strong { color: var(--warning); }

.ge-block--list { padding-bottom: 0; }
.ge-outages, .ge-events { list-style: none; max-height: 560px; overflow-y: auto; border-top: 1px solid var(--rule-2); }
.ge-outage {
  display: grid; grid-template-columns: 2em 1fr auto; gap: 0 10px;
  padding: 7px 4px 7px 0; border-bottom: 1px solid var(--rule-2); cursor: pointer;
  border-left: 3px solid transparent; padding-left: 6px;
}
.ge-outage-rank { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: var(--type-s); padding-top: 1px; }
.ge-outage-name { font-weight: 700; }
.ge-outage-ends { font-weight: 400; color: var(--ink-3); margin-left: 8px; font-size: var(--type-s); }
.ge-verdict { font-size: var(--type-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); padding-top: 2px; }
.ge-outage--critical .ge-verdict { color: var(--critical); }
.ge-outage--warning .ge-verdict { color: var(--warning); }
.ge-outage-reasons { grid-column: 2 / 4; font-size: var(--type-s); color: var(--ink-2); }
.ge-outage:hover, .ge-outage.is-focused { background: var(--wash); border-left-color: var(--focus); }
.ge-outage.is-affected { background: var(--wash); border-left-color: var(--ink-3); }
.ge-outage.is-selected { border-left-color: var(--focus); box-shadow: inset 0 0 0 1px var(--ink); }

.ge-run-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; margin-top: 12px; }
.ge-field { display: flex; flex-direction: column; gap: 4px; font-size: var(--type-s); color: var(--ink-2); }
.ge-field select { font: inherit; font-size: var(--type-base); color: var(--ink); padding: 4px 6px; border: 1px solid var(--rule); background: var(--paper); }
.ge-check { display: flex; align-items: center; gap: 6px; font-size: var(--type-m); padding-bottom: 6px; }
.ge-check input { accent-color: var(--ink); }
.ge-button {
  font: inherit; font-size: var(--type-base); font-weight: 700; padding: 6px 18px; cursor: pointer;
  color: var(--paper); background: var(--ink); border: 1px solid var(--ink);
}
.ge-button--quiet { font-weight: 500; font-size: var(--type-s); padding: 4px 8px; color: var(--ink); background: var(--paper); border-color: var(--rule); }

/* The relays' settings */
.ge-settings { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.ge-setting-group { border: none; border-top: 1px solid var(--rule-2); padding-top: 8px; display: grid; grid-template-columns: 1fr; gap: 4px; }
.ge-setting-title { font-size: var(--type-m); font-weight: 700; padding: 0 0 4px; }
.ge-setting { display: grid; grid-template-columns: 9.5em 5.2em 1.4em 1fr; align-items: baseline; gap: 6px; font-size: var(--type-m); color: var(--ink-2); }
.ge-setting-input { font: inherit; font-size: var(--type-base); color: var(--ink); width: 100%; padding: 2px 4px; border: 1px solid var(--rule); background: var(--paper); font-variant-numeric: tabular-nums; text-align: right; }
.ge-setting.is-changed .ge-setting-name { color: var(--ink); font-weight: 700; }
.ge-setting.is-changed .ge-setting-input { border-color: var(--ink); }
.ge-setting-default { color: var(--ink-3); font-size: var(--type-s); }
.ge-settings-foot { display: flex; align-items: center; gap: 12px; }

/* A run: the moment on the slider, then how the run ends, kept apart */
.ge-subtitle { font-size: var(--type-s); font-weight: 700; color: var(--ink-3); margin-bottom: 4px; }
.ge-moment { margin-top: 10px; }
.ge-ending { margin-top: 14px; padding: 10px 12px; background: var(--wash); border-left: 3px solid var(--ink); font-size: var(--type-m); }
.ge-ending .ge-subtitle { color: var(--ink); }

.ge-clock { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.ge-clock-time { font-size: var(--type-5xl); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.ge-clock-entry { color: var(--ink-3); font-size: var(--type-s); font-variant-numeric: tabular-nums; }
.ge-scrubber { width: 100%; accent-color: var(--ink); margin: 6px 0 8px; }
.ge-steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.ge-events { margin-top: 12px; max-height: 420px; }
.ge-event { display: grid; grid-template-columns: 5.2em 1fr; gap: 8px; padding: 5px 4px 5px 6px; border-bottom: 1px solid var(--rule-2); font-size: var(--type-s); cursor: pointer; border-left: 3px solid transparent; }
.ge-event-time { font-variant-numeric: tabular-nums; color: var(--ink-3); }
.ge-event.is-current { background: var(--wash); border-left-color: var(--focus); font-weight: 700; }
.ge-event.is-future { color: var(--ink-3); }

.ge-status { margin-top: 28px; padding-top: 10px; border-top: 1px solid var(--rule-2); font-size: var(--type-s); color: var(--ink-3); }

/* The diagram's marks. Colour carries data and is set on the element;
   what is here is structure, state and type. */
.ge-zone { fill: #f4f5f7; stroke: none; }
.ge-zone-label { font-size: var(--type-s); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; fill: #9aa0a8; }
.ge-halo { stroke: var(--focus); stroke-linecap: round; fill: none; }
.ge-halo--focused { stroke-opacity: 0.22; }
.ge-halo--affected { stroke-opacity: 0.12; }
.ge-branch { cursor: pointer; }
.ge-branch--dimmed, .ge-bus--dimmed { opacity: 0.25; }
.ge-line-id { font-size: var(--type-s); fill: #8a9099; paint-order: stroke; stroke: #ffffff; stroke-width: 3px; stroke-linejoin: round; }
.ge-branch--focused .ge-line-id, .ge-branch--affected .ge-line-id { fill: var(--ink); font-weight: 700; font-size: var(--type-base); }
.ge-breaker-open { fill: #ffffff; stroke: var(--ink); stroke-width: 1.6; }
.ge-tag-box { fill: #ffffff; stroke: var(--ink); stroke-width: 1; }
.ge-tag { font-size: var(--type-base); font-weight: 700; fill: var(--ink); }

.ge-bus { cursor: pointer; }
.ge-busbar { stroke: var(--ink); stroke-width: 1.3; }
.ge-busbar--dead { stroke: #a5aab2; stroke-dasharray: 3 2; }
.ge-bus-id { font-size: var(--type-l); font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: #ffffff; stroke-width: 3px; stroke-linejoin: round; }
.ge-bus-halo { fill: none; stroke: var(--focus); stroke-width: 2; }
.ge-bus-halo--affected { stroke-dasharray: 4 3; }
.ge-stub { stroke: var(--ink); stroke-width: 1.3; }
.ge-generator { fill: #ffffff; stroke: var(--ink); stroke-width: 1.4; }
.ge-generator-wave { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.ge-ext-grid { fill: #ffffff; stroke: var(--ink); stroke-width: 1.4; }
.ge-ext-grid-cross { stroke: var(--ink); stroke-width: 1; }
/* A bus under a voltage limit: state, drawn apart from the fill. */
.ge-limit-outline { fill: none; stroke: var(--ink); stroke-width: 3; }
.ge-limit-ring { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.ge-load-stem { stroke: var(--ink); stroke-width: 1.3; }
.ge-load-head { fill: var(--ink); stroke: var(--ink); stroke-width: 1; }
.ge-load--shed.ge-load-head { fill: #ffffff; }
.ge-load--lost.ge-load-stem, .ge-load--lost.ge-load-head { stroke: #a5aab2; stroke-dasharray: 2 2; }
.ge-load--lost.ge-load-head { fill: #ffffff; }

.ge-legend-title { font-size: var(--type-m); font-weight: 700; fill: var(--ink); }
.ge-legend-text { font-size: var(--type-m); fill: var(--ink-2); }
  
/* =========================================================================
   The masthead every page carries: the name and the three pages.
   ========================================================================= */
.ge-masthead {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2) var(--space-5);
  border-bottom: 1px solid var(--rule); padding-bottom: var(--space-2); margin-bottom: var(--space-5);
}
.ge-masthead-name { font-size: var(--type-base); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.ge-pages { display: flex; gap: var(--space-5); }
.ge-page-tab { font-size: var(--type-base); color: var(--ink-3); text-decoration: none; padding: var(--space-1) 0; border-bottom: 3px solid transparent; margin-bottom: -11px; }
.ge-page-tab:hover { color: var(--ink); }
.ge-page-tab--current { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }
@media (max-width: 640px) {
  .ge-masthead { justify-content: flex-start; }
  .ge-pages { gap: var(--space-4); }
  .ge-masthead-name { font-size: var(--type-s); }
}
/* The Stepper's badge: it is a replay of the demo. Present from the first
   render and only transparent, so it moves nothing when it shows. */
.ge-badge { margin: 0; font-size: var(--type-s); line-height: 1.4; color: var(--accent); animation: ge-badge-in 0.8s ease-out 1s both; }
.ge-badge strong { font-weight: 700; }
.ge-badge a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.ge-badge a:hover { text-decoration-thickness: 2px; }
@keyframes ge-badge-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ge-badge { animation: none; } }
@media (max-width: 640px) { .ge-badge { order: 3; flex-basis: 100%; } }
.st-absent a, .ge-model a { color: var(--ink); }

/* =========================================================================
   The Lab with nothing answering at /api (the hosted site): a page of the
   landing page's family, not an error. Its type (IBM Plex, from the site's
   own fonts/, loaded only when this page is shown), its one red, its
   numbered sections with a rule over each heading. The rest of the Lab is
   untouched by it.
   ========================================================================= */
@font-face { font-family: "Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/IBMPlexSans-Regular-Latin1.woff2") format("woff2"); }
@font-face { font-family: "Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/IBMPlexSans-Medium-Latin1.woff2") format("woff2"); }
@font-face { font-family: "Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/IBMPlexSans-SemiBold-Latin1.woff2") format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/IBMPlexMono-Regular-Latin1.woff2") format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/IBMPlexMono-Medium-Latin1.woff2") format("woff2"); }
@font-face { font-family: "Plex Sans"; font-weight: 200; font-style: normal; font-display: swap; src: url("../fonts/IBMPlexSans-ExtraLight-Latin1.woff2") format("woff2"); }
@font-face { font-family: "Plex Sans"; font-weight: 300; font-style: normal; font-display: swap; src: url("../fonts/IBMPlexSans-Light-Latin1.woff2") format("woff2"); }

.ge-away {
  --away-sans: "Plex Sans", var(--font);
  --away-mono: "Plex Mono", ui-monospace, Menlo, monospace;
  --b: 7px;
  font: 400 17px/calc(var(--b) * 4) var(--away-sans);
  font-kerning: normal;
  color: var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: calc(var(--b) * 6) var(--gutter);
  padding-top: calc(var(--b) * 3);
}
.ge-away a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ge-away a:hover { text-decoration-thickness: 2px; }
.ge-away a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ge-away p { margin: 0 0 calc(var(--b) * 3); max-width: 38em; }
.ge-away code { font-family: var(--away-mono); font-size: 0.88em; }

.ge-away-title { font-weight: 600; font-size: clamp(40px, 6vw, 72px); line-height: 0.98; letter-spacing: -0.035em; margin-left: -0.03em; max-width: 9em; }
.ge-away-rule { width: calc(var(--b) * 14); height: var(--b); background: var(--accent); border: 0; margin: calc(var(--b) * 4) 0 calc(var(--b) * 4); }
.ge-away .ge-away-claim { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.45; font-weight: 400; max-width: 30em; margin-bottom: calc(var(--b) * 4); }
.ge-away .ge-away-links { display: flex; flex-wrap: wrap; gap: calc(var(--b) * 2) calc(var(--b) * 4); align-items: baseline; margin: 0; }
.ge-away .ge-away-primary { color: var(--accent); font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.ge-away .ge-away-primary:hover { border-bottom-width: 4px; }
.ge-away .ge-away-quiet { color: var(--ink-2); }

/* The recording: a still in its place with reduced motion, and in print. */
.ge-away-loop { margin: 0; }
.ge-away-loop video, .ge-away-still { display: block; width: 100%; height: auto; aspect-ratio: 1280 / 630; background: var(--paper); border: 1px solid var(--rule); }
.ge-away-still { display: none; }
.ge-away-loop figcaption { margin-top: calc(var(--b) * 2); font-size: 15px; line-height: calc(var(--b) * 3); color: var(--ink-2); max-width: 38em; }
@media (prefers-reduced-motion: reduce) {
  .ge-away-loop video { display: none; }
  .ge-away-still { display: block; }
}
@media print {
  .ge-away-loop video { display: none; }
  .ge-away-still { display: block; }
}

/* The two sections, numbered in red as the landing page's are. */
.ge-away-section { display: grid; grid-template-columns: calc(var(--b) * 7) minmax(0, 1fr); align-content: start; }
.ge-away-section > :not(.ge-away-num) { grid-column: 2; }
.ge-away-num { grid-row: 1 / span 10; font: 500 14px/calc(var(--b) * 3) var(--away-mono); color: var(--accent); padding-top: calc(var(--b) * 2); border-top: 1px solid var(--ink); }
.ge-away-section h2 { margin: 0 0 calc(var(--b) * 3); font-size: clamp(24px, 2.2vw, 30px); line-height: calc(var(--b) * 5); font-weight: 600; letter-spacing: -0.02em; padding-top: calc(var(--b) * 2); border-top: 1px solid var(--ink); }
.ge-away-needs { margin: 0 0 calc(var(--b) * 3); padding: 0 0 0 1.1em; max-width: 38em; }
.ge-away-needs code { white-space: nowrap; }
.ge-away-commands { margin: 0 0 calc(var(--b) * 3); padding: calc(var(--b) * 2) calc(var(--b) * 3); background: var(--wash); font: 400 14px/calc(var(--b) * 3) var(--away-mono); overflow-x: auto; max-width: 100%; }
.ge-away-commands code { font-size: inherit; }

/* Wide: the words beside the recording; how to run it beside the replay. */
@media (min-width: 1000px) {
  .ge-away { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .ge-away-head { grid-column: 1 / span 5; }
  .ge-away-loop { grid-column: 6 / span 7; align-self: start; margin-top: calc(var(--b) * 1); }
  #lab-run { grid-column: 1 / span 7; }
  #lab-onward { grid-column: 8 / span 5; }
}
@media (max-width: 639px) {
  .ge-away { font-size: 16px; gap: calc(var(--b) * 5); }
  .ge-away-section { grid-template-columns: minmax(0, 1fr); }
  .ge-away-num { grid-row: auto; padding-top: calc(var(--b) * 2); margin-bottom: calc(var(--b) * -1); }
  .ge-away-section h2 { border-top: 0; padding-top: 0; }
  .ge-away-section > :not(.ge-away-num) { grid-column: 1; }
  .ge-away-commands { font-size: 12.5px; padding: var(--b) var(--gutter); margin-inline: calc(-1 * var(--gutter)); max-width: none; }
}

/* =========================================================================
   The Stepper
   ========================================================================= */
/* One thing at a time. Under the masthead, the transport bar and nothing
   else: the time, the event count, the five steps, the scrubber; it sticks
   to the top of the window while the rest scrolls. The run being shown is
   one quiet line at its right-hand end, with "Change run", which opens the
   four choices under the bar. Below it two columns: the network at this
   event (captioned by what just happened), then every event, on the left;
   the machine of the current event's device beside them, sticky and
   quieter. On a phone one column, the machine after the network. */
.st-app { --bar-h: 96px; }
.st-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.st-about-open { font: inherit; font-size: var(--type-s); color: var(--ink-2); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.st-about-open:hover { color: var(--ink); text-decoration-thickness: 2px; }
@media (max-width: 640px) {
  .ge-masthead .ge-pages { order: 1; }
  .st-app .ge-badge { flex-basis: auto; order: 3; }
  .st-about-open { order: 4; }
}

/* The transport bar */
.st-transport-bar {
  position: sticky; top: 0; z-index: 5; background: var(--paper);
  padding: var(--space-3) 0 var(--space-1); border-bottom: 1px solid var(--rule);
}
.st-transport-bar:focus { outline: none; }
.st-transport { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: var(--space-3) var(--space-6); }
.st-clock { display: flex; flex-direction: column; gap: 0; min-width: 7.5em; }
.st-clock .ge-clock-time { font-size: var(--type-5xl); line-height: 1.05; }
.st-buttons { display: flex; gap: var(--space-1); }
.st-step { font-size: var(--type-xl); min-width: 2.6em; padding: 8px 12px; }
.st-play { min-width: 6.5em; font-size: var(--type-xl); padding: 8px 18px; }
/* A mouse user sees no ring; a keyboard user does. */
.st-transport-bar button:focus:not(:focus-visible) { outline: none; }
.st-transport-bar .ge-scrubber { margin: var(--space-2) 0 var(--space-1); }

/* The run, quietly, and the way to change it */
.st-run { justify-self: end; display: flex; align-items: baseline; flex-wrap: wrap; justify-content: flex-end; gap: 2px var(--space-3); font-size: var(--type-s); color: var(--ink-3); text-align: right; }
.st-run-summary { font-variant-numeric: tabular-nums; }
.st-change { font: inherit; color: var(--ink-2); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.st-change:hover { color: var(--ink); text-decoration-thickness: 2px; }
.st-change--invite { color: var(--ink); font-weight: 700; font-size: var(--type-base); text-decoration-thickness: 2px; }
.st-chooser { padding: var(--space-3) 0 var(--space-2); margin-top: var(--space-2); border-top: 1px solid var(--rule-2); }

.st-controls { display: flex; flex-wrap: wrap; align-items: end; gap: var(--space-3) var(--space-5); }
.st-control { display: flex; flex-direction: column; gap: var(--space-1); }
.st-control-name { font-size: var(--type-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.st-control select { font: inherit; font-size: var(--type-m); color: var(--ink); padding: 3px 6px; border: 1px solid var(--rule); background: var(--paper); max-width: 100%; }
.st-choices { margin-bottom: 0; gap: 0; flex-wrap: wrap; }
.st-choices .ge-switch-option { margin-left: -1px; font-variant-numeric: tabular-nums; }
.st-choices .ge-switch-option:first-child { margin-left: 0; }
.st-back { align-self: end; }

/* The two columns. The machine's column is wide enough for its narrowest
   layout (the overcurrent relay top to bottom, 423 px), so its box never
   scrolls; the network takes the rest. */
.st-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 432px;
  gap: var(--space-5) var(--space-6);
  align-items: start;
  margin-top: var(--space-4);
}
.st-main { display: flex; flex-direction: column; gap: 72px; min-width: 0; }
.st-side { position: sticky; top: calc(var(--bar-h) + var(--space-4)); min-width: 0; }
@media (max-width: 1100px) {
  .st-stage { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .st-main, .st-side { display: contents; }
  .st-figure { order: 1; }
  .st-machine { order: 2; }
  .st-every { order: 3; }
}
@media (max-width: 640px) {
  .st-transport { grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2) var(--space-3); }
  .st-clock .ge-clock-time { font-size: var(--type-4xl); }
  .st-buttons { justify-self: end; }
  .st-step { font-size: var(--type-l); min-width: 2.3em; padding: 7px 8px; }
  .st-play { min-width: 5.2em; font-size: var(--type-l); padding: 7px 10px; }
  .st-run { grid-column: 1 / -1; justify-self: start; justify-content: flex-start; text-align: left; }
}

/* The network, captioned by what just happened, its totals under it. It
   fills its column where the window is tall enough, else it is as wide as
   the height left under the masthead, the bar, the caption and the totals
   (about 280 px at 1440 x 900) allows: the drawing is 1040 x 720. */
.st-now-headline { font-size: var(--type-xl); font-weight: 500; line-height: 1.3; margin-bottom: var(--space-2); min-height: 1.3em; }
.st-figure .ge-diagram { width: min(100%, max(520px, calc((100svh - 290px) * 1.4444))); margin: 0 auto 0 0; }
.st-totals { font-size: var(--type-s); color: var(--ink-3); font-variant-numeric: tabular-nums; margin-top: var(--space-1); }
.st-figure-note { margin-top: var(--space-2); }

/* Disclosures: the network's key; the machine's key and how it is drawn. */
.st-more { margin-top: var(--space-3); }
.st-more > summary { cursor: pointer; font-size: var(--type-s); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); width: fit-content; }
.st-more > summary:hover { color: var(--ink); }
.st-more[open] > summary { margin-bottom: var(--space-2); }
.st-more .ge-legend-box { margin-top: 0; }

/* Every event: the lanes, then the list, the current event opened out. */
.st-lanes-box { width: 100%; margin-top: var(--space-1); }
.st-lanes { display: block; width: 100%; height: auto; }
.st-lanes-key { margin-top: var(--space-2); }

.st-tick { stroke: var(--ink-3); stroke-width: 1; }
.st-tick-label { font-size: var(--type-s); fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.st-axis-rule { stroke: var(--rule); stroke-width: 1; }
.st-lane { cursor: pointer; }
.st-lane-hit { fill: transparent; }
.st-lane:hover .st-lane-hit { fill: var(--wash); }
.st-lane--selected .st-lane-hit { fill: var(--wash); }
.st-lane-label { font-size: var(--type-m); fill: var(--ink-2); }
.st-lane--selected .st-lane-label { fill: var(--ink); font-weight: 700; }
.st-span-rule { stroke: var(--ink-3); stroke-width: 1; }
.st-span--waiting .st-span-bar { fill: var(--tone-waiting); }
.st-span--other .st-span-bar { fill: var(--tone-other); }
.st-span--done .st-span-bar { fill: var(--tone-done); }
.st-span-label { font-size: var(--type-s); fill: var(--ink); }
.st-span--done .st-span-label { fill: var(--paper); }
.st-move { stroke: var(--ink); stroke-width: 1.5; }
.st-future { fill: var(--paper); fill-opacity: 0.6; pointer-events: none; }
.st-cursor { stroke: var(--ink); stroke-width: 1.5; pointer-events: none; }
.st-current-ring { fill: var(--paper); stroke: var(--ink); stroke-width: 2.5; pointer-events: none; }
.st-events-list { max-height: none; overflow: visible; margin-top: var(--space-5); }
.st-events-list .ge-event { scroll-margin-top: calc(var(--bar-h) + var(--space-4)); }
.st-events-list .ge-event.is-current { font-weight: 400; padding-top: var(--space-2); padding-bottom: var(--space-3); }
.st-events-list .ge-event.is-current .ge-event-text { font-weight: 700; font-size: var(--type-base); }
.st-now-reasons { grid-column: 2; list-style: none; display: flex; flex-direction: column; gap: var(--space-1); font-size: var(--type-m); color: var(--ink-2); margin-top: var(--space-1); }
.st-now-reasons li { padding-left: var(--space-3); border-left: 2px solid var(--rule); }
.st-now-reasons .st-ending { color: var(--ink); border-left-color: var(--ink); }

/* The machine: beside the network, quieter (its greys a step lighter,
   `quietStyle`), drawn at its own size, never scaled: its labels are 12 or
   13 px and its state names 14 or 15 px. Where the box is narrower than the
   drawing (a phone), the box scrolls sideways. */
.st-machine { border-top: 1px solid var(--rule); padding-top: var(--space-3); }
.st-machine .ge-block-title { color: var(--ink-2); margin-bottom: var(--space-1); }
.st-machine-mode { font-size: var(--type-s); }
.st-machine-box { width: 100%; margin: var(--space-3) 0 var(--space-2); }
/* Only where the column is narrower than the drawing (one column, under
   1100 px) may the box scroll sideways. */
@media (max-width: 1100px) { .st-machine-box { overflow-x: auto; } }
.gbm-machine { display: block; max-width: none; margin: 0 auto; }
.st-machine-now { font-size: var(--type-m); color: var(--ink-2); }
.st-machine-key { width: 100%; margin: var(--space-2) 0; }
.gbm-key { display: block; }

/* The opening panel: a native <dialog>, in the light voice of #how. */
.st-panel {
  width: min(600px, calc(100vw - 2 * var(--gutter))); max-height: calc(100svh - 48px);
  margin: auto; padding: 0; border: 0; background: var(--paper); color: var(--ink);
  box-shadow: 0 24px 64px rgba(20, 22, 26, 0.22);
}
.st-panel::backdrop { background: rgba(246, 247, 248, 0.82); }
.st-panel-body { position: relative; padding: 40px 44px 32px; border-top: 4px solid var(--ink); }
.st-panel-close {
  position: absolute; top: 10px; right: 12px; width: 40px; height: 40px;
  font: 300 28px/1 var(--plex-sans); color: var(--ink-2); background: none; border: 0; cursor: pointer;
}
.st-panel-close:hover { color: var(--ink); }
.st-panel-close:focus-visible, .st-panel-start:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.st-panel-name { font: 500 13px/20px var(--plex-sans); letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: var(--space-4); }
.st-about { font: 300 20px/30px var(--plex-sans); margin-bottom: var(--space-4); }
.st-panel-vary { font: 400 15px/23px var(--plex-sans); color: var(--ink-2); }
.st-panel-foot { margin-top: var(--space-6); min-height: 48px; display: flex; align-items: center; }
.st-panel-loading { font: 400 15px/24px var(--plex-sans); color: var(--ink-3); animation: st-pulse 1.4s ease-in-out infinite; }
@keyframes st-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .st-panel-loading { animation: none; } }
.st-panel-start { font: 500 18px/1 var(--plex-sans); padding: 14px 40px; }
@media (max-width: 640px) {
  .st-panel-body { padding: 32px 22px 24px; }
  .st-about { font-size: 18px; line-height: 27px; }
}

.st-absent { border-top: 4px solid var(--ink); padding-top: var(--space-3); max-width: 60em; display: flex; flex-direction: column; gap: var(--space-3); font-size: var(--type-l); }
.st-absent-title { font-size: var(--type-3xl); font-weight: 700; }

/* =========================================================================
   The Stepper's section on how the replay works (`#how`, static HTML after
   the app in stepper/index.html). The light voice of the Glassbox mock:
   IBM Plex Sans Light on white, small tracked capitals for the headings,
   numbers in Plex Mono, hairlines; red only for the one link that leaves
   for the demo. Everything is scoped to `.rl-how`, so the app above it and
   the Lab, which load this file too, are untouched. The architecture
   drawing keeps the landing page's marks (`.arch`, as in landing.css).
   ========================================================================= */
.rl-how {
  --b: 7px;
  --rl-hair: #d6d6d3;
  --rl-grey: #5c5c5c;
  --rl-wash: #f3f3f1;
  max-width: 1480px; margin: calc(var(--b) * 10) auto 0; padding: 0 var(--gutter) calc(var(--b) * 12);
  font: 300 17px/calc(var(--b) * 4) var(--plex-sans); font-kerning: normal; color: #111111;
}
.rl-how a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.rl-how a:hover { text-decoration-thickness: 2px; }
.rl-how a:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
.rl-how p { margin: 0 0 calc(var(--b) * 3); max-width: 38em; }
.rl-how code { font-family: var(--plex-mono); font-size: 0.86em; font-weight: 400; }
.rl-how b { font-weight: 500; }

.rl-head { border-top: 4px solid var(--ink); padding-top: calc(var(--b) * 3); }
.rl-over { font: 400 12px/calc(var(--b) * 3) var(--plex-sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--rl-grey); margin-bottom: calc(var(--b) * 2) !important; }
.rl-how h2 { font-weight: 200; font-size: clamp(40px, 6vw, 64px); line-height: 1.05; letter-spacing: 0.005em; margin: 0 0 calc(var(--b) * 4) -0.03em; }
.rl-claim { font-size: clamp(19px, 1.7vw, 23px); line-height: 1.45; font-weight: 300; max-width: 30em !important; }
.rl-links { display: flex; flex-wrap: wrap; gap: var(--b) calc(var(--b) * 4); align-items: baseline; font-weight: 400; }
.rl-links a:first-child { color: var(--accent); }

.rl-how section { display: grid; grid-template-columns: minmax(0, 1fr); padding-top: calc(var(--b) * 9); }
.rl-num { font: 300 12px/calc(var(--b) * 3) var(--plex-mono); letter-spacing: 0.1em; color: var(--rl-grey); padding-top: calc(var(--b) * 2); border-top: 1px solid var(--rl-hair); }
.rl-how h3 { margin: 0 0 calc(var(--b) * 3); padding-top: calc(var(--b) * 2); border-top: 1px solid var(--rl-hair); font: 500 13px/calc(var(--b) * 3) var(--plex-sans); letter-spacing: 0.2em; text-transform: uppercase; }
@media (min-width: 640px) {
  .rl-how section { grid-template-columns: calc(var(--b) * 9) minmax(0, 1fr); max-width: calc(var(--b) * 9 + 960px); }
  .rl-num { grid-row: 1 / span 30; }
  .rl-how section > :not(.rl-num) { grid-column: 2; }
}
@media (max-width: 639px) {
  .rl-how { font-size: 16px; }
  .rl-num { border-top: 0; padding-top: 0; }
  .rl-how h3 { border-top: 0; padding-top: 0; }
  .rl-how section { border-top: 1px solid var(--rl-hair); margin-top: calc(var(--b) * 6); padding-top: calc(var(--b) * 2); }
}

.rl-list { margin: 0 0 calc(var(--b) * 3); padding: 0 0 0 1.1em; max-width: 38em; }
.rl-notes { margin: 0 0 calc(var(--b) * 3); padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(15em, 1fr)); gap: 0 calc(var(--b) * 4); }
.rl-notes li { padding: calc(var(--b) * 2) 0 var(--b); border-top: 1px solid var(--rl-hair); }
.rl-notes b { display: block; }
.rl-notes p { margin: 0; font-size: 15px; line-height: calc(var(--b) * 3); }
.rl-aside { color: var(--rl-grey); font-size: 15px; line-height: calc(var(--b) * 3); }
.rl-still { margin: var(--b) 0 calc(var(--b) * 3); max-width: 600px; }
.rl-still img { display: block; width: 100%; height: auto; border: 1px solid var(--rl-hair); }
.rl-how figcaption { margin-top: calc(var(--b) * 2); font-size: 15px; line-height: calc(var(--b) * 3); color: var(--rl-grey); max-width: 38em; }
.rl-foot { margin-top: calc(var(--b) * 6) !important; padding-top: calc(var(--b) * 2); border-top: 1px solid var(--rl-hair); font: 400 11px/21px var(--plex-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--rl-grey); max-width: none !important; }

/* the architecture drawing: the landing page's marks, at the light weights */
.rl-how .arch { container-type: inline-size; margin: calc(var(--b) * 2) 0 calc(var(--b) * 3); }
.rl-how .arch svg { display: block; width: 100%; height: auto; }
.rl-how .arch .narrow { max-width: 420px; }
.rl-how .arch .wide { display: none; }
@container (min-width: 580px) {
  .rl-how .arch .wide { display: block; }
  .rl-how .arch .narrow { display: none; }
}
.rl-how .arch text { font-family: var(--plex-sans); fill: #111111; }
.rl-how .arch .t { font-size: 15px; font-weight: 500; }
.rl-how .arch .s { font-family: var(--plex-mono); font-size: 12.5px; fill: var(--rl-grey); }
.rl-how .arch .l { font-family: var(--plex-mono); font-size: 12.5px; font-weight: 500; }
.rl-how .arch .zone { fill: var(--rl-wash); }
.rl-how .arch .box { fill: #ffffff; stroke: #111111; stroke-width: 1; }
.rl-how .arch .box.key { stroke-width: 2; }
.rl-how .arch .line { fill: none; stroke: #111111; stroke-width: 1; }
.rl-how .arch .check { fill: none; stroke: #111111; stroke-width: 1; stroke-dasharray: 5 4; }
.rl-how .arch .head-fill { fill: #111111; }
