/*
 * site.css — 2026 revamp shared components.
 *
 * Ported from docs/design/prototype-d.html. Legacy --cobalt* tokens were
 * renamed to --accent* and the .cob hero-highlight class to .accent while
 * porting; the prototype's .proto-tag bar is intentionally excluded.
 * Requires tokens.css to be linked FIRST (every rule reads its var()s).
 *
 * Component semantics are load-bearing (design-decisions.md § Component
 * language): accent monogram = vault, muted monogram = support system,
 * filled chip = live, outlined chip = building/planned, dashed + no hover =
 * planned. Don't repurpose them.
 */

/* ------------------------------------------------------------------ *
 * Self-hosted Jost (display face) — three static weights, no CDN.
 * ------------------------------------------------------------------ */
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Jost-400.woff2") format("woff2");
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/Jost-500.woff2") format("woff2");
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/Jost-600.woff2") format("woff2");
}

/* ------------------------------------------------------------------ *
 * Base
 * ------------------------------------------------------------------ */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.65;
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ------------------------------------------------------------------ *
 * Frame + masthead
 * ------------------------------------------------------------------ */
.frame {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 22px 80px;
}

header.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding: 24px 0;
}
.mark {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
}
nav.idx {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
nav.idx a {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
nav.idx a:hover {
  color: var(--accent);
}

/* ------------------------------------------------------------------ *
 * Nameplate + readout
 * ------------------------------------------------------------------ */
.nameplate {
  border-top: 1px solid var(--ink);
  padding: 56px 0 52px;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 36px;
  align-items: end;
}
.nameplate h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(46px, 9vw, 88px);
  line-height: 1;
  letter-spacing: 0.005em;
  margin: 0 0 22px;
}
.nameplate h1 .accent {
  color: var(--accent);
}
.nameplate .tagline {
  margin: 0;
  max-width: 46ch;
  font-size: 18px;
}
.readout {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  border-top: 1px solid var(--line);
}
.readout .row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--line);
}
.readout .k {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.readout .v {
  text-align: right;
}
/*
 * .fig-note — the dated provenance line that goes AS THE LAST CHILD OF a hero
 * .readout, not as a sibling after it. The placement is load-bearing: .readout
 * carries role="group", so a note inside it is announced together with the
 * figures it vouches for; moved outside, the date becomes an orphan sentence
 * that a screen-reader user meets with no idea what it refers to.
 *
 * Every figure above it was produced by a command run on that date, which is
 * what makes the number permanently true rather than true-for-a-week. The
 * corollary is a rule, not a nicety: CHANGE A FIGURE, CHANGE THE DATE, IN THE
 * SAME COMMIT. A stale undated number is merely old; a stale DATED number lies
 * about its own audit trail, which is worse than what the date was added to fix.
 *
 * Not .hint: that is scoped under .sec-head / .sub-head and carries a
 * section-label voice. .fig-note joins .hint as the site's "small muted mono"
 * caption voice — if a fourth of these appears, fold them rather than add one.
 */
.fig-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  margin: 10px 0 0;
}

/* ------------------------------------------------------------------ *
 * Section head
 * ------------------------------------------------------------------ */
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px solid var(--ink);
  margin-top: 56px;
}
/*
 * h1 is accepted here alongside h2 so a page with no hero (archive.html) can
 * still carry a top-level heading without inventing a second visual style.
 */
.sec-head h1,
.sec-head h2 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 14px;
  margin: 0;
}
.sec-head .hint {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}

/* ------------------------------------------------------------------ *
 * Fleet — unit plates, chips, specs
 * ------------------------------------------------------------------ */
.fleet {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 10px;
}
.unit {
  background: var(--plate);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  transition:
    background 160ms ease,
    border-color 160ms ease;
}
.unit-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 22px 0;
}
/*
 * .mono-mark — the project monogram. Its COLOUR is load-bearing: accent = a
 * vault, muted = a support system (design-decisions.md § Component language).
 * The base rule carries the shared look and the accent default; each context
 * sets only the size, and the support variants (.unit.compact for the homepage,
 * .proj-head.support for a roadshow page) override the colour. Keep it this way
 * — a second place declaring the accent is a second place to get it wrong.
 */
.mono-mark {
  font-family: var(--display);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.01em;
  color: var(--accent);
}
.mono-mark small {
  font-size: 0.55em;
  vertical-align: 10px;
  letter-spacing: 0;
}
.unit .mono-mark {
  font-size: clamp(48px, 7vw, 68px);
}
.chip {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 2px;
  white-space: nowrap;
  margin-top: 4px;
}
.chip.run {
  background: var(--accent-soft);
  color: var(--accent);
}
.chip.build {
  border: 1px solid var(--line);
  color: var(--muted);
}
.unit h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 14px;
  margin: 14px 22px 6px;
}
.unit .blurb {
  margin: 0 22px 16px;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
}
.specs {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  border-top: 1px solid var(--line);
}
.specs .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 22px;
  border-bottom: 1px solid var(--line);
}
.specs .row:last-child {
  border-bottom: none;
}
.specs .k {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
@media (hover: hover) {
  .unit:hover {
    background: var(--accent);
    border-color: var(--accent);
  }
  .unit:hover .mono-mark,
  .unit:hover h3,
  .unit:hover .specs .v {
    color: var(--on-accent);
  }
  .unit:hover .blurb,
  .unit:hover .specs .k {
    color: color-mix(in srgb, var(--on-accent) 78%, var(--accent));
  }
  .unit:hover .chip.run {
    background: color-mix(in srgb, var(--on-accent) 20%, var(--accent));
    color: var(--on-accent);
  }
  .unit:hover .chip.build {
    border-color: color-mix(in srgb, var(--on-accent) 45%, var(--accent));
    color: var(--on-accent);
  }
  .unit:hover .specs,
  .unit:hover .specs .row {
    border-color: color-mix(in srgb, var(--on-accent) 30%, var(--accent));
  }
}

/* ------------------------------------------------------------------ *
 * Support sub-tier — compact + planned variants
 * ------------------------------------------------------------------ */
.sub-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  margin-top: 36px;
}
.sub-head h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
  margin: 0;
  color: var(--muted);
}
.sub-head .hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.fleet.support {
  grid-template-columns: 1fr 1fr 1fr;
}
.unit.compact .mono-mark {
  font-size: clamp(38px, 5vw, 48px);
  color: var(--muted);
}
.unit.compact .blurb {
  font-size: 13.5px;
}
.unit.planned {
  border-style: dashed;
  background: transparent;
  cursor: default;
}
/*
 * .static — a support card with no destination yet (e.g. homeAssistant,
 * networkMonitor). Unlike .planned it keeps the default solid --line border and
 * --plate background; it only suppresses the hover-invert so a non-link card
 * never reads as clickable. Reusable by roadshow pages 4.5–4.9. Built as a clean
 * on/off switch: to promote a card to a link, drop .static and swap the <div>
 * for an <a href> — the standard .unit:hover invert returns with no CSS changes.
 */
.unit.static {
  cursor: default;
}
@media (hover: hover) {
  .unit.compact:hover .mono-mark {
    color: var(--on-accent);
  }
  .unit.planned:hover {
    background: transparent;
    border-color: var(--line);
  }
  /* .static keeps its solid plate on hover (the one reset that differs from
     .planned's transparent look); every other reset below is shared. */
  .unit.static:hover {
    background: var(--plate);
    border-color: var(--line);
  }
  /* A .static card may carry a run chip (homeAssistant); .planned never does,
     so this run-chip reset is static-only. */
  .unit.static:hover .chip.run {
    background: var(--accent-soft);
    color: var(--accent);
  }
  .unit.planned:hover .mono-mark,
  .unit.static:hover .mono-mark {
    color: var(--muted);
  }
  .unit.planned:hover h3,
  .unit.static:hover h3 {
    color: var(--ink);
  }
  .unit.planned:hover .blurb,
  .unit.static:hover .blurb {
    color: var(--muted);
  }
  .unit.planned:hover .chip.build,
  .unit.static:hover .chip.build {
    border-color: var(--line);
    color: var(--muted);
  }
  .unit.planned:hover .specs,
  .unit.planned:hover .specs .row,
  .unit.static:hover .specs,
  .unit.static:hover .specs .row {
    border-color: var(--line);
  }
  .unit.planned:hover .specs .k,
  .unit.static:hover .specs .k {
    color: var(--muted);
  }
  .unit.planned:hover .specs .v,
  .unit.static:hover .specs .v {
    color: var(--ink);
  }
}

/* ------------------------------------------------------------------ *
 * The System — machine diagram + bus
 * ------------------------------------------------------------------ */
.machines {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 10px;
}
.machine {
  background: var(--plate);
  border: 1px solid var(--line);
  padding: 18px 18px 16px;
}
.machine .m-name {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 13px;
}
.machine .m-role {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 8px;
  line-height: 1.6;
}
.machine.hot {
  border-color: var(--accent);
}
.machine.hot .m-name {
  color: var(--accent);
}
.bus {
  margin-top: 16px;
  border-top: 2px solid var(--accent);
  padding-top: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.sys-footnote {
  margin: 18px 0 0;
  font-size: 15px;
  color: var(--muted);
  max-width: 68ch;
}

/* ------------------------------------------------------------------ *
 * The Operator — two-column + links list
 * ------------------------------------------------------------------ */
.two-col {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  padding-top: 10px;
}
.two-col p {
  margin: 0 0 14px;
  max-width: 58ch;
}
.links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.links li {
  border-bottom: 1px solid var(--line);
}
.links a,
.links span.plain {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding: 13px 2px;
}
.links a:hover {
  color: var(--accent);
}
.links .where {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--muted);
  align-self: center;
}

/* ------------------------------------------------------------------ *
 * Archive list — archive.html
 *
 * Deliberately plain, and deliberately NOT a .unit. The fleet's monogram and
 * chip semantics are load-bearing (see the header note); spending them on
 * retired pages would dilute what they mean on the homepage. A row is just a
 * name, one line of context, and a year — quieter than anything in the fleet.
 * ------------------------------------------------------------------ */
.arch-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.arch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 5px 20px;
  padding: 15px 2px;
  border-bottom: 1px solid var(--line);
}
.arch-row .name {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
}
.arch-row .name:hover {
  color: var(--accent);
}
.arch-row .year {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  color: var(--muted);
}
.arch-row .note {
  grid-column: 1 / -1;
  margin: 0;
  max-width: 62ch;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}

/* ------------------------------------------------------------------ *
 * Roadshow pages — projects/<name>/index.html (4.5 defines the template)
 *
 * Four components the homepage could not express: a project hero, running
 * body copy, a screenshot plate, and the sibling-links strip. Everything
 * else on a roadshow page is reused unchanged (.frame, header.top, nav.idx,
 * .sec-head, .readout, .chip, footer.base).
 *
 * The hero reuses the base .mono-mark and sets only its size. A roadshow page
 * for a SUPPORT SYSTEM rather than a vault (the agents page, 4.9) adds
 * .proj-head.support, which mutes the monogram exactly as .unit.compact does on
 * the homepage. Accent means "vault" everywhere — don't spend it on a non-vault.
 * ------------------------------------------------------------------ */
.proj-head {
  border-top: 1px solid var(--ink);
  padding: 48px 0 44px;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 36px;
  align-items: end;
}
.proj-head .ident {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.proj-head .mono-mark {
  font-size: clamp(56px, 8vw, 76px);
}
.proj-head.support .mono-mark {
  color: var(--muted);
}
/*
 * h2 is accepted alongside h1 so the styleguide can demo the hero without a
 * second <h1> on the page — same reason .sec-head accepts both.
 */
.proj-head h1,
.proj-head h2 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 20px;
  margin: 0;
}
.proj-head .summary {
  margin: 0;
  max-width: 46ch;
  font-size: 18px;
}

/*
 * .copy — running body text. Nothing in site.css carried the doc's ~62ch
 * measure before this (.sys-footnote is 68ch, but it is a footnote voice).
 */
.copy {
  margin: 0 0 16px;
  max-width: 62ch;
}
.copy:last-child {
  margin-bottom: 0;
}
/* Prose following a spec block needs air. Lives here, not as an inline style on
   the page — the roadshow page is a template and inline styles propagate.
   .pipeline gets a larger gap than .readout: the rail's last row is a bare stage
   with no bottom rule, so prose set 18px under it reads as part of the diagram. */
.readout + .copy {
  margin-top: 18px;
}
.pipeline + .copy {
  margin-top: 26px;
}
.copy ul {
  margin: 0;
  padding-left: 20px;
}
.copy li {
  margin-bottom: 4px;
}

/*
 * figure.shot — screenshot plate. Square corners, 1px --line, no shadow or
 * radius, matching every other plate on the site. The "demo data" note lives
 * in the figcaption as mono/muted text and is deliberately NOT a .chip: chips
 * encode state (filled = live, outlined = building) and spending one here
 * would dilute a load-bearing signal.
 */
figure.shot {
  margin: 0 0 26px;
  background: var(--plate);
  border: 1px solid var(--line);
}
/* The image links to the full-size file: at phone width a 1440px app UI scales
   down to ~24% and the numbers become unreadable, so a tap has to open it.
   JPEG for anything photographic, PNG for flat UI and plot output — PNG cannot
   compress a photograph (4.7 shipped 3.99 MB as PNG, 1.1 MB as JPEG). */
figure.shot a {
  display: block;
}
figure.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--line);
}
figure.shot figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px 18px;
  flex-wrap: wrap;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
}
figure.shot .demo {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/*
 * pre.code — a plate holding real source, verbatim. Introduced by bambuVault
 * (4.8), the one project whose thesis is that the code IS the artifact: a single
 * quoted line proves that better than a paragraph describing it. Use it
 * sparingly — a portfolio page that turns into a code listing has lost the plot.
 *
 * Deliberately NOT a terminal: no syntax colouring, no black background, no
 * traffic-light chrome. design-decisions.md § Anti-AI-slop bans
 * "acid-green-on-black terminal themes" by name, and colouring tokens would
 * spend visual weight on decoration. It is the same plate as figure.shot, set in
 * --mono, and it inherits the light/dark tokens like everything else.
 *
 * overflow-x is load-bearing: a long source line must scroll INSIDE the plate.
 * Without it a 90-character line widens the whole page at ~390px, and the body
 * — not the plate — is what scrolls sideways.
 */
pre.code {
  margin: 0 0 26px;
  padding: 14px 16px;
  background: var(--plate);
  border: 1px solid var(--line);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink);
}
pre.code code {
  font: inherit;
  color: inherit;
}
/* Inline <code> in running prose. Without this rule the element falls back to
   the UA default `monospace` (a Courier face), so an identifier quoted mid-
   sentence renders in a DIFFERENT typeface from the pre.code plate beside it.
   0.92em because --mono runs optically larger than the body face at the same
   nominal size. */
code {
  font-family: var(--mono);
  font-size: 0.92em;
}

/*
 * .pipeline — the flow rail on the agents page (4.9). Hand-written HTML/CSS,
 * deliberately NOT an SVG or an image: the stage names, the commands and the
 * gate sentences are real text, so they stack at 390px, take the light/dark
 * tokens like everything else, and stay selectable and screen-readable. An SVG
 * diagram does none of that.
 *
 * The rail is the container's left border; each row hangs a marker on it.
 * STAGE markers are hollow --line squares; GATE markers are filled accent
 * diamonds, and the gate row also carries an accent-soft plate and an accent
 * label — the gates are the argument the diagram makes, so they must not read
 * as just another step.
 *
 * MARKER OFFSETS (the fragile numbers here — read before you touch them). The
 * two axes work differently; don't treat them alike.
 *
 * HORIZONTAL (`left`) IS DERIVED, and must be recomputed if you change the
 * container padding, the marker size, or the gate's border. An absolutely-
 * positioned marker is offset from its parent row's PADDING box. A .stage has
 * no padding or border, so its padding box starts at the container's content
 * edge and the rail sits at -29px..-28px behind it (28px padding + the 1px
 * border) — centre -28.5px. The global `box-sizing: border-box` makes the 9px
 * marker 9px wide in total, so centring it means left: -33px. A .gate is a
 * plate with a 1px border, which pushes its padding box 1px right — hence
 * -34px, exactly 1px further out.
 *
 * VERTICAL (`top`) IS TUNED, NOT DERIVED. 6px on a stage and 13px on a gate
 * centre each marker against the cap-height of its row's FIRST LINE, which
 * depends on that line's font-size and line-height as well as the plate's
 * padding — so there is no clean formula to re-run. If you change the padding,
 * the type, or the marker size, re-eyeball these two values at 390px; do not
 * try to recompute them from the gate's 9px top padding (6 → 13 is +7, not +9,
 * and chasing that arithmetic drops the diamond off the gate's first line).
 */
/*
 * .pipeline is a <ul role="list"> of 13 <li> rows. A <ul>, not an <ol>: an <ol>
 * would number all 13 rows, so list-item 3 would announce "3" while its visible
 * label reads "Gate 1". A <ul> gives a screen reader count and position with no
 * competing numbers.
 *
 * BOTH explicit ARIA roles here are load-bearing, and they defend against the
 * SAME WebKit behaviour at two levels:
 *
 *   role="list"     on the <ul>  — Safari/VoiceOver drops list semantics from a
 *                                  list whose list-style is none, which is
 *                                  exactly what .pipeline sets below.
 *   role="listitem" on the gates — .pipeline .gate sets display: flex further
 *                                  down, and a list item whose computed display
 *                                  is not list-item can lose its item semantics
 *                                  the same way. Five of the thirteen rows are
 *                                  gates, so without the role a screen reader
 *                                  can announce "list, 8 items" and skip exactly
 *                                  the rows that carry this diagram's argument.
 *
 * The .stage rows need no such role: they keep display: list-item and put their
 * flex on an inner .st-head instead. If you ever give .stage a display of its
 * own, it needs role="listitem" too.
 */
.pipeline {
  margin: 10px 0 0;
  padding-left: 28px;
  border-left: 1px solid var(--line);
  list-style: none;
}
.pipeline .stage,
.pipeline .gate {
  position: relative;
}
.pipeline .stage {
  padding-bottom: 22px;
}
.pipeline .stage:last-child {
  padding-bottom: 0;
}
.pipeline .stage::before,
.pipeline .gate::before {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  background: var(--ground);
  border: 1px solid var(--line);
}
.pipeline .stage::before {
  left: -33px;
  top: 6px;
}
/*
 * The gate marker: a filled accent diamond, not a hollow tick. The gates are
 * the argument the rail makes, so they get the accent and the stages don't.
 * `left` is derived (1px further out than a stage — the plate's own border);
 * `top` is eyeballed against the label's first line. See the note above.
 */
.pipeline .gate::before {
  left: -34px;
  top: 13px;
  background: var(--accent);
  border-color: var(--accent);
  transform: rotate(45deg);
}
.pipeline .st-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 12px;
}
.pipeline .st-n {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  color: var(--muted);
}
.pipeline .st-name {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 13px;
}
/* Sized explicitly: the bare `code` rule is 0.92em of the 16.5px body, which
   would set the command LARGER than the stage name beside it. */
.pipeline .st-cmd {
  font-size: 12px;
  color: var(--muted);
}
.pipeline .st-note {
  margin: 6px 0 0;
  max-width: 60ch;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}
.pipeline .gate {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 10px;
  margin-bottom: 22px;
  padding: 9px 12px;
  background: var(--accent-soft);
  border: 1px solid var(--line);
}
.pipeline .gt-n {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.pipeline .gt-note {
  margin: 0;
  max-width: 58ch;
  font-size: 15px;
  line-height: 1.6;
}

/*
 * .skill-index — the seventeen skills, as stacked rows. Never a table: a
 * three-column table of commands and descriptions is unreadable at 390px and
 * the horizontal scroll would land on the <body>. Each row is a command, what
 * it does, and (for the ten a human types) when to reach for it — the last of
 * those is muted mono, because it is a lookup aid rather than prose.
 *
 * Grouped by role under the existing .sub-head. The grouping is the point: the
 * seven "never typed" rows carry no reach-for-it line at all, and the absence
 * is the signal.
 */
.skill-index {
  margin: 10px 0 0;
  border-top: 1px solid var(--line);
}
.skill-index .sk {
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
}
.skill-index .sk-cmd {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.skill-index .sk-what {
  margin: 7px 0 0;
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.6;
}
.skill-index .sk-when {
  margin: 7px 0 0;
  max-width: 62ch;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
}

/*
 * .next-fleet — the sibling strip above the footer. A visitor who read a whole
 * project page is the most engaged one the site gets; a dead end wastes them.
 * Carries the standard hover-invert so it reads as interactive.
 */
/* auto-fit, not repeat(3): a slimmer page may carry only two sibling links, and
   a hardcoded third column would leave a visible hole. Two or three both fill
   the row. */
.next-fleet {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 10px;
}
.nf-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  background: var(--plate);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition:
    background 160ms ease,
    border-color 160ms ease;
}
.nf-link .nf-name {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 13px;
}
.nf-link .nf-note {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--muted);
}
@media (hover: hover) {
  .nf-link:hover {
    background: var(--accent);
    border-color: var(--accent);
  }
  .nf-link:hover .nf-name {
    color: var(--on-accent);
  }
  .nf-link:hover .nf-note {
    color: color-mix(in srgb, var(--on-accent) 78%, var(--accent));
  }
}

/* ------------------------------------------------------------------ *
 * Footer
 * ------------------------------------------------------------------ */
footer.base {
  margin-top: 72px;
  border-top: 1px solid var(--ink);
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}

/* ------------------------------------------------------------------ *
 * Responsive — collapse to single column on phones
 * ------------------------------------------------------------------ */
@media (max-width: 760px) {
  .nameplate {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 42px 0 44px;
  }
  .fleet,
  .fleet.support {
    grid-template-columns: 1fr;
  }
  .machines {
    grid-template-columns: 1fr 1fr;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .proj-head {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 36px 0 38px;
  }
  .next-fleet {
    grid-template-columns: 1fr;
  }
}
