/* app.css — the RateRoutine interface system.
   Theme 5 "Current Line" (#120), built out to a full system in #171.
   Spec: docs/designs/2026-08-28-interface-design-system.md

   Layering. Type, space, radius and measure run primitive -> semantic ->
   component. COLOUR RUNS TWO LAYERS, deliberately: the ratified role is
   declared at its literal hex and component tokens alias it. It is not
   `--ink: var(--green-black-900)`, because tests/unit/palette-contrast.test.js
   asserts `declared.get('--ink') === '#172A2B'` and that guard is worth more
   than the diagram — it is the thing that caught `button:hover { opacity: 0.9 }`
   silently dropping a 4.71:1 label to 3.95:1. A primitive layer over values
   that are ratified and must not change buys nothing anyway.

   The palette is ratified and the contrast rules are binding
   (docs/repo-constraints.md). Four of those rules constrain THIS FILE's shape
   rather than its colours, and breaking any of them fails the suite:
     - one :root block at the TOP LEVEL only. The raw-hex scanner strips the
       first :root and the dark block's :root, then reads everything left as
       "outside"; a third would have its hexes reported as unmeasured;
     - every :root statement is a custom property — a `color-scheme:` line in
       there fails the declaration parse, which is why it sits on `html` below;
     - no `opacity` outside :root, ever;
     - no raw hex outside :root except #fff.

   Two themes, and the dark one is ratified (#308 —
   docs/designs/2026-09-05-dark-palette-ratification.md). Read that before
   changing a dark value: three of the eight binding rules do not survive
   inversion unchanged, and the dark block is bound at its literal hexes by
   the same guard that binds light. In particular `-hover` means DARKER in
   light and LIGHTER in dark; what is invariant, and what the guard actually
   asserts, is that a state change never SPENDS contrast. */

/* ══ Typeface ═════════════════════════════════════════════════════════════
   Self-hosted, never a CDN. The app runs a strict CSP with no external font
   origin, the content plane is cached and crawler-facing, and a third-party
   font request on a public page is a tracking surface nobody asked for.

   Outfit (#309) is the text face; IBM Plex Mono stays. Both are SIL OFL, so
   there is no purchase -- which is what
   docs/designs/2026-08-28-interface-design-system.md §6 was actually ruling
   out when it said "the system font stack stays". Nothing tests font-family;
   that line was a scope note from a phase that had no budget for type, not a
   ratified constraint like the palette.

   OUTFIT IS SHIPPED AS ONE VARIABLE FILE PER SUBSET, not as one file per
   weight. Google's own CSS API serves the same woff2 for 400, 500, 600 and
   700 because Outfit has no static masters, so the per-weight naming Plex
   uses would have vendored the identical 32KB three times and made the
   browser choose one of three identical caches. Two files carry the whole
   100-900 axis: 32KB latin, 15KB latin-ext. `--var-` sits in the weight slot
   of the existing <family>-<style>-<weight>-<subset> name so the convention
   still reads.

   Only latin and latin-ext are shipped. Google serves cyrillic, greek and
   vietnamese too, and this product is US sales tax.

   Plex Mono is here for one job: every rate, count, date and identifier on a
   screen a customer files as evidence. `font-variant-numeric: tabular-nums`
   fixes advance width; a mono face also fixes the SHAPE, so a column of rates
   reads as a column rather than as a list that happens to be numbers. Rates,
   counts and identifiers stay mono; Outfit never sets a figure a customer
   checks against an official source. */

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/outfit-normal-var-latin-ext.0f53d1c03b39.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/outfit-normal-var-latin.6c18d579fd87.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/plexmono-normal-400-latin-ext.6bc0f226a5b7.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/plexmono-normal-400-latin.08949f728dc5.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/static/fonts/plexmono-normal-600-latin-ext.32057cf50dd1.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/static/fonts/plexmono-normal-600-latin.0d1f0b8d0722.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ── Ratified roles — Theme 5 (#120) ─────────────────────────────────
     Literal hex, not aliases. See the layering note above. */

  /* `color-scheme` is NOT declared here, and the reason is a parse rule rather
     than a palette one: every statement in this block must be a custom-property
     declaration or the guard rejects it. It sits on `html` below — the same
     element, a different selector.

     The history is worth keeping, because both directions have now been wrong.
     This file once declared `color-scheme: light dark` with NO dark palette
     behind it, so a dark-mode browser painted dark chrome behind colours
     defined for light surfaces and every ratified ratio was measured against a
     surface the visitor never saw. The declaration was removed rather than a
     palette invented, because #120 ratified none and inventing one unattended
     is a design decision, not a cleanup.

     #308 made that decision deliberately and measured it. The palette now
     exists, so the declaration comes back — and the mirror failure is now the
     live hazard: shipping a dark block and NOT advertising it leaves form
     controls, scrollbars and the canvas painted light inside a dark page. The
     guard asserts both halves. */

  /* ── Typeface ──────────────────────────────────────────────────────────
     A stack, not a single name: `font-display: swap` paints the fallback
     first, so the fallback must be metrically close enough that the swap does
     not reflow a table.

     Outfit is geometric with a LARGE x-height, and that combination is the
     trap here. The obvious geometric fallbacks -- Futura, Century Gothic,
     Avant Garde -- are geometric with a SMALL x-height and much wider
     advances, so matching the skeleton would have cost a visible reflow on
     every label in the app. The stack matches the METRICS instead and lets
     the skeleton change: Segoe UI on Windows, SF via system-ui on Apple,
     Roboto via sans-serif on Android, all close enough in advance width that
     a swapped heading stays on its line. The figures a customer checks are
     mono either way, which is where a reflow would actually cost something. */
  --font-sans: 'Outfit', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  /* Text and structure */
  --ink: #172A2B;      /* headings, body, nav, wordmark — 14.97 on white */
  --muted: #617072;    /* secondary copy — 5.16 on white, 4.70 on paper */
  --divider: #D5DEDB;  /* rules, table lines, quiet boundaries */

  /* Surfaces */
  --paper: #F2F5F3;    /* page background */
  --surface: #FFFFFF;  /* work surfaces and reports */
  --soft: #DDF0EC;     /* verified and informational backgrounds */

  /* Brand colour, as FILLS. The brand teal (#168F8A) and coral (#ED5347) are
     the identity but not what a control is painted with: they are 3.94 and
     3.54 against white, so neither can carry a white label and — per rule 1 —
     neither is ever body text. These are the darkened fills that clear AA,
     and their -hover pairs darken further so a state change never spends
     contrast. */
  --primary: #0F6E6A;        /* white label at 6.07 */
  --primary-hover: #0C5B58;  /* white label at 7.92 */
  --urgent: #C9473C;         /* white label at 4.72 */
  --urgent-hover: #A93A31;   /* white label at 6.29 */

  /* Secondary data and links. Links are body text, so rule 1 puts them here
     rather than on the brand teal. */
  --deep: #244F62;     /* 8.86 on white */
  /* rateroutine-500: a link already opened. 8.17 on white, 7.44 on paper, 6.90 on
     soft; 25.0 CIEDE2000 from --deep, so it differs by hue, not lightness. */
  --link-visited: #6A3F73;

  /* Signal yellow is a fill only, never a foreground: 1.72 on white. Ink on
     it is 8.68, which is the one sanctioned pairing (rule 3). */
  --signal: #F5BC4B;

  /* The foreground for any brand fill — exactly the pairing rule 2 measures.
     Named so it stops being a bare #fff sitting in a rule. It INVERTS in dark:
     the fills lighten there (a dark fill reaches only 2.52 against a dark card,
     under the 3:1 a component boundary needs), so the label goes dark. */
  --on-fill: #FFFFFF;

  /* The one foreground signal yellow ever carries, and the only role here that
     is pinned across both themes. It cannot be `var(--ink)`: .flash paints ink
     on signal, and when --ink flips light for dark mode that pairing drops to
     1.48 — the app's only flash message, unreadable, with a 30-second life and
     nothing that brings it back. Ink on signal is 8.68 and is the single
     pairing rule 3 sanctions, in both themes. */
  --on-signal: #172A2B;

  /* ── Primitive: type ──────────────────────────────────────────────────
     16px base, 1.200 minor third. A conservative ratio on purpose: this is
     finance and accounting work and §6 asks for calm. */
  --size-100: 0.833rem;  /* 13.3px */
  --size-200: 1rem;      /* 16px   */
  --size-300: 1.2rem;    /* 19.2px */
  --size-400: 1.44rem;   /* 23px   */
  --size-500: 1.728rem;  /* 27.6px */

  /* ── Primitive: space ─────────────────────────────────────────────────
     4px base. Absorbs the nine ad-hoc values this file used to carry
     (0.3 0.4 0.5 0.6 0.75 0.9 1.25 1.5 3rem), which had nothing relating
     them to each other. */
  --space-0: 0rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;

  /* ── Primitive: line and edge ─────────────────────────────────────── */
  --radius-1: 4px;   /* controls */
  --radius-2: 8px;   /* cards, heroes */
  --border-1: 1px;   /* rules and control boundaries */
  --border-3: 3px;   /* status markers */
  --border-4: 4px;   /* hero state bars */

  /* ── Semantic: type ─────────────────────────────────────────────────── */
  --text-h1: var(--size-500);
  --text-h2: var(--size-400);
  --text-h3: var(--size-300);
  --text-h4: var(--size-200);
  --text-body: var(--size-200);
  --text-small: var(--size-100);
  --leading-body: 1.5;
  --leading-heading: 1.25;

  /* ── Semantic: measure ────────────────────────────────────────────────
     Two, because this app has two kinds of screen. v1 §E calls the Locations
     screen "a dense table — this is an app, not a card gallery" and calls the
     product desktop-primary; one 32rem column served neither. */
  --measure-prose: 34rem;  /* auth, onboarding, forms, running text */
  --measure-app: 72rem;    /* screens whose primary object is a table */

  /* ── Component ────────────────────────────────────────────────────────
     Aliases, so a control can be restyled without touching the palette. */
  --btn-bg: var(--primary);
  --btn-bg-hover: var(--primary-hover);
  --btn-fg: var(--on-fill);
  --btn-bg-danger: var(--urgent);
  --btn-bg-danger-hover: var(--urgent-hover);
  /* --surface, NOT --divider. A disabled control used to be filled with the
     edge role, which is the role-as-surface bug the #309 guard in
     tests/unit/palette-contrast.test.js now refuses: --divider's value is
     chosen to sit against a surface, so as a fill it inverts the wrong way and
     in dark it is a mid-slate slab. Outlined instead, with the label at --muted
     (5.16 light, 5.86 dark — better than the 3.76/2.57 the fill gave) and a
     strike through it, so "cannot act on this" survives a monochrome print. */
  --btn-bg-disabled: var(--surface);
  --btn-fg-disabled: var(--muted);

  --field-bg: var(--surface);
  --field-fg: var(--ink);
  --field-border: var(--muted);
  --field-border-focus: var(--primary);

  --card-bg: var(--surface);
  --card-border: var(--divider);

  --table-rule: var(--divider);
  --table-head-fg: var(--ink);

  --status-attention: var(--signal);  /* stale, unverified, unresolved */
  --status-ok: var(--primary);        /* achieved, verified */
  --status-alarm: var(--urgent);      /* blind, retracted, exception */

  /* Upcoming (rooftop-first plan, review DR10): a change the customer finished early that is
     not yet in force. Its own pair rather than a reuse of the button fill, so round 3 can
     re-point one token if the stamp reads as "selected" beside a pressed filter button.
     Aliases only, so the dark block follows the inversion without a line of its own. */
  --status-upcoming: var(--primary);
  --on-status-upcoming: var(--on-fill);

  /* The blind-state banner, which is the one component that does NOT take the
     ordinary urgent fill in dark. v1 §E wants the safety empties to be visual
     opposites and the blind banner to be loud; lightening --urgent the way
     every other fill lightens gives a pale salmon that passes every ratio and
     reads softer than the all-clear panel beside it. Dark uses the ratified
     brand coral as a FILL instead — which rule 1 has always allowed and which
     LIGHT mode cannot use, because white on it is 3.54.

     Reaching for a darker, angrier red is the obvious instinct and it is
     measurably backwards: #A32E23 separates from the dark page at 2.58, quieter
     than the salmon it was meant to improve on. Loudness here is separation
     from the page, not saturation. */
  --alarm-bg: var(--urgent);
  --alarm-fg: var(--on-fill);

  /* ── Component: the register, the shell and the marks (#309) ──────────
     Everything below this line is ADDED. No ratified role is redeclared, and
     nothing here is a colour of its own: every value is either geometry or an
     alias onto a role, so it follows the inversion by itself and the dark
     block stays exactly as short as #308 ratified it. */

  /* The rail's own width. The docked breakpoint is derived from it and
     --measure-app rather than picked: see `.app-shell`'s media query, which
     spells the sum out as a calc() instead of hiding it in a round number. */
  --dock-w: 15.5rem;

  /* The brand mark's rendered height, and the one number the /home pre-roll
     placeholder is scaled from. The wordmark SVG and the animation share the
     coordinate space the mark is cut out of (viewBox 0 0 8919 1193.14, mark at
     x+27 y+69, 1080 units tall), so every offset below is that space divided by
     1080 and multiplied by this. Change it and the placeholder still lands on
     the animation's first frame. */
  --logo-h: 26px;

  /* Tracking. The wide one is the console's signature — mono, caps, on every
     section head and every small label, which is most of what makes /home and
     the board read as one machine. The tight one is display type only. */
  --track-label: 0.16em;
  --track-close: -0.02em;

  --text-label: 0.7rem;   /* tracked mono caps: heads, stamps, column heads */
  --text-micro: 0.75rem;  /* printed references only (round 3, R13; rateroutine-487) */

  /* Display. /home is allowed a voice the board is not; the board's largest
     object is a figure, never a sentence. */
  --size-headline: clamp(2.4rem, 5.2vw, 3.6rem);
  --size-statement: clamp(1.5rem, 2.8vw, 2.1rem);
  --figure-size: clamp(1.6rem, 3vw, 2.1rem);

  /* Two rule weights, deliberately. The ink rule is structure — it opens a
     statement and closes a total; the hairline divides rows inside one. A
     single weight makes a register read as a grid of equal lines, which is the
     "six horizontal rules in 300px" the first competition's judge marked down. */
  --rule-hair: var(--border-1) solid var(--divider);
  --rule-ink: 2px solid var(--ink);

  /* The five marks. Shape first, then the word beside it, then the fill —
     colour is the third carrier and never the only one (rule 6). Drawn rather
     than set as characters: only latin and latin-ext are vendored and the
     geometric glyphs are in neither, so a character vocabulary would fall back
     to whatever face the operating system offers and the key on /home would
     stop matching the marks on the board. */
  --mark-dim: 0.7rem;
  --mark-line: var(--ink);
  --mark-fill-open: var(--signal);
  --mark-fill-ok: var(--primary);
  --mark-fill-alarm: var(--alarm-bg);
  --mark-fill-none: var(--muted);

  /* The channel the marks sit in, so a marked row and an unmarked one put
     their first character at the same x. */
  --key-channel: 2.25rem;

  --measure-say: 36rem;  /* running prose on a screen that is not prose */
  --measure-auth: 26rem; /* the auth card, and the flash that lines up with it (FORGE-384) */
}

/* Both palettes exist, so both are advertised. This cannot live in :root (see
   the note in there); `html` is the same element and passes the parse rule. */
html {
  color-scheme: light dark;
}

/* FORGE-677 (FORGE-676 9.1): a fragment landing (#l-…, #failures) clears the pinned notice stack.
   app.js measures the stack into --pinned-height, 0px while it is not sticky; with no script, or
   no stack, the fallback is 0px and landings are as they were. The stack's box holds the
   message's bottom margin, so a landed row keeps that gap below the message. A margin on the
   target, not scroll-padding on the root: root padding also moves the page whenever a control
   inside the sticky stack takes focus (found by B3, a 450 px jump on focusing Dismiss). The
   board's rows add the figure strip below (.rr:target). */
:target {
  scroll-margin-top: var(--pinned-height, 0px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  color: var(--ink);
  background: var(--paper);
  line-height: var(--leading-body);
}

/* ── Type scale ───────────────────────────────────────────────────────────
   h1 was 1.4rem (22.4px) with no h2 rule at all, so h2 took the UA default
   24px and every page rendered its h1 SMALLER than the h2s beneath it — 38 h2
   sites across five page modules. The scale is declared end to end so the
   hierarchy cannot invert again. */

h1, h2, h3, h4 {
  line-height: var(--leading-heading);
  margin: var(--space-5) 0 var(--space-3);
}

h1 {
  font-size: var(--text-h1);
  margin-top: var(--space-0);
}

h2 {
  font-size: var(--text-h2);
}

h3 {
  font-size: var(--text-h3);
}

h4 {
  font-size: var(--text-h4);
}

/* ── Layout ─────────────────────────────────────────────────────────────── */

main {
  max-width: var(--measure-app);
  margin: 0 auto;
  padding: var(--space-5) var(--space-4) var(--space-7);
  /* FORGE-677: room at the foot for the pinned stack (app.js; 0px with no script or no stack),
     so the last row on the page can land clear of it (B1 found the marked row, sorted last,
     24 px under the stack at 390 px). */
  padding-bottom: calc(var(--space-7) + var(--pinned-room, 0px));
}

/* Running text does not stretch to the app measure just because a table on
   the same screen needs it. */
main > p,
main > ul,
main > ol,
main > form {
  max-width: var(--measure-prose);
}

/* FORGE-753 (design docs/designs/2026-11-29-1078-page-width.md 3.1, 3.2): two panes on a desktop
   screen, for a page that holds two kinds of content. The first takes the reading measure and the
   second the rest of main, which is never wider than the measure either. A pane never holds a table.
   The pane carries the measure at every width, so a block that leaves `main > p` and friends by being
   wrapped keeps it, and a form nested in a <section> is held to it too. Below 64rem a pane is a plain
   block, so the page is the one column it was. The panes' first lines share a top: each pane's first
   child gives up its top margin, and .panes takes an h2's. */
.pane {
  max-width: var(--measure-prose);
}

@media (min-width: 64rem) {
  .panes {
    display: grid;
    grid-template-columns: minmax(0, var(--measure-prose)) minmax(0, 1fr);
    gap: 0 var(--space-6);
    align-items: start;
    margin-top: var(--space-5);
  }

  .pane {
    min-width: 0;
  }

  .pane > :first-child,
  .pane > :first-child > :is(h2, h3):first-child {
    margin-top: 0;
  }
}

/* ── The masthead (#309, A-H01) ───────────────────────────────────────────
   Instrument's top nav. The brand sits left with `margin-right: auto`, the
   wayfinding runs right, and the identity block closes it — which is the shape
   the signed-out and signed-in navs already had, so neither needs a second
   container.

   Top padding is not decoration. On /home this bar holds the wordmark-collapse
   animation, whose tittle arc overflows UPWARD by 0.7x the mark's height and
   takes no part in layout. --space-5 clears --logo-h * 0.7 with room to spare;
   drop it and the arc is clipped by the top of the viewport. */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding: var(--space-5) var(--space-4) var(--space-3);
  border-bottom: var(--border-1) solid var(--divider);
  background: var(--surface);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
}

/* The logo slot. `position: relative` and an explicit box, because the
   animation appends an absolutely positioned canvas into this element and
   sizes it from --logo-h; giving the slot the same box from the stylesheet is
   what stops the header moving when the script arrives. The width is the
   RESTING WORDMARK's, 8863.70 units at --logo-h/1080 per unit, so the slot the
   server renders and the slot the library computes are the same slot. */
.nav-mark {
  position: relative;
  display: inline-block;
  flex: none;
  width: calc(0.902778 * var(--logo-h));
  height: var(--logo-h);
}

.nav-mark-img {
  display: block;
  height: var(--logo-h);
  width: auto;
}

/* ── /home's pre-roll placeholder ─────────────────────────────────────────
   The light wordmark, at the animation's frame 0, in the exact box the canvas
   will occupy. Every number here is the shared coordinate space divided by the
   mark's 1080 units:

     slot width   8863.70 / 1080 = 8.207130   (LOGO.w — the resting wordmark)
     slot height     1083 / 1080 = 1.002778   (LOGO.h — cap line to baseline)
     image width     8919 / 1080 = 8.258333   (the SVG's whole viewBox)
     image height 1193.14 / 1080 = 1.104759
     image left       -27 / 1080 = -0.025     (LOGO.x, back to the viewBox origin)
     image top      -69.1 / 1080 = -0.063981  (LOGO.y, the cap line)

   Nothing here is eyeballed. If the placeholder and the first frame disagree,
   one of these six numbers is wrong, not the canvas. */
.nav-mark-preroll {
  width: calc(8.207130 * var(--logo-h));
  height: calc(1.002778 * var(--logo-h));
}

.nav-preroll {
  position: absolute;
  left: calc(-0.025 * var(--logo-h));
  top: calc(-0.063981 * var(--logo-h));
  width: calc(8.258333 * var(--logo-h));
  height: calc(1.104759 * var(--logo-h));
  max-width: none;
}

/* With no JavaScript /home shows the wordmark and stops, which is a complete
   page and is what a crawler sees. The mark is the END of the run, so it is
   hidden while the pre-roll is in the document (which also keeps its name
   from being read twice); static/home-logo.js hands it back when the run
   finishes. Round 2 removed the text wordmark that used to sit beside it. */
.nav-mark-preroll .nav-mark-img {
  visibility: hidden;
}

/* FORGE-385: on /home the slot stays the pre-roll's box after the run. When
   settle() sheds .nav-mark-preroll the slot used to drop to the mark's 23px,
   and below about 538px that let the links jump up beside the mark and the
   page under the nav rise 40px, about 7s after load. With the box one size
   for the life of the page, nothing in the bar has room to move into, at any
   width and with any nav (signed in too). The mark sits at the box's left
   edge. The value is .nav-mark-preroll's width, and nav.test.js pins the two
   equal. */
.nav-home .nav-mark {
  min-width: calc(8.207130 * var(--logo-h));
}

.nav-slot {
  color: var(--muted);
  font-size: var(--text-small);
}

/* ── Wayfinding (#194, and the public half from #309) ─────────────────────
   The nav carried a wordmark and an email and nothing else. Signed in, that
   left /settings and /coverage — real, working routes — reachable only by
   typing the URL. Signed out it left /pricing, /rates and /lookup reachable
   only through body copy, on the page the content plane exists to rank.

   Which list appears is decided in html.js against the same role rank the
   routes use, never here: CSS can only hide a link, and a hidden link is still
   in the document for anything reading it. */

.nav-links,
.nav-public {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
}

/* Tracked mono caps, the same label idiom as every section head on both
   screens. The underline is a border rather than a text-decoration so the
   current-page marker and the hover marker are the same object at two
   weights. */
.nav-link {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: var(--border-3) solid transparent;
}

.nav-link:hover {
  color: var(--ink);
  border-bottom-color: var(--divider);
}

/* FORGE-384. The public list and its button run right on a wide bar, and the button is a sibling
   after the list so a phone can give it the brand's row (design review, phone board A). Each
   link is at least a 24 px target (design 11B); the button is the system's 44 px. */
.nav > .nav-public {
  margin-left: auto;
}

.nav-public .nav-link,
.nav-cta-current {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
}

/* The page a public item names (design 3A). Hung off aria-current like .rail-link's, and an
   edge rather than a fill, on the border .nav-link already reserves. */
.nav-link[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--primary);
}

/* Start free snapshot: the primary fill in the nav's own mono label (button board A). Its states
   are .btn-primary's (design 10A); focus takes the site-wide ring. */
.nav-cta {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 var(--space-3);
  border: var(--border-1) solid var(--btn-bg);
  border-radius: var(--radius-1);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.nav-cta:hover {
  background: var(--btn-bg-hover);
  border-color: var(--btn-bg-hover);
  color: var(--btn-fg);
}

/* On a phone: the brand and the button, then one row of four links. On /home the held logo slot
   leaves no room beside it, so the button takes a row of its own there (design 13A). */
@media (max-width: 40rem) {
  .nav > :is(.nav-cta, .nav-cta-current) {
    order: 2;
    margin-left: auto;
  }

  .nav > .nav-public {
    order: 3;
    flex-basis: 100%;
    margin-left: 0;
    justify-content: space-between;
    gap: var(--space-3);
  }
}

/* The signed-in bar's Help link: the .nav-link idiom, kept out of the list so
   the list stays the role's destinations. The target is 44px tall. */
.nav-help {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border-bottom: var(--border-3) solid transparent;
}

.nav-help:hover {
  color: var(--ink);
  border-bottom-color: var(--divider);
}

/* FORGE-520. `.nav`'s `align-items: center` centres boxes, not text, and the
   Help link is a 44px box of descender-free caps over a 3px transparent
   border: centring it set its letters above the email's and the Log out
   label's. The identity items share a baseline instead, while the brand keeps
   the centring. The Help link is the tallest of them, so the line keeps its
   height and the brand does not move. The destination list joins them: on a
   top-bar page with an org (/help, /onboarding, the /staff pages) it shares the line,
   and centred it set its caps 3.91px low; the list's first line carries its
   baseline. Scoped to the bar because the org picker on /orgs wears .nav-slot
   too, inside a form. */
.nav > .nav-links,
.nav > .nav-help,
.nav > .nav-slot,
.nav > .nav-logout {
  align-self: baseline;
}

/* The one control in the nav, and it is destructive-adjacent: quiet by
   default so it does not compete with the page's primary action, and darker
   on interaction. --deep is 8.86 on --surface and --ink is 14.97, so the
   state change RAISES contrast — the rule the palette test enforces by
   refusing `opacity` anywhere in this file. */
.nav-logout button {
  padding: var(--space-1) var(--space-2);
  background: transparent;
  border-color: var(--divider);
  color: var(--deep);
  font-size: var(--text-small);
}

.nav-logout button:hover {
  background: transparent;
  border-color: var(--muted);
  color: var(--ink);
}

/* ── The wordmark at the foot of every screen (#309) ──────────────────────
   One duotone file in both themes (round 2), an <img> rather than a CSS
   background because a background cannot carry alt text and this is the
   product's name.

   Print drops it: `prefers-color-scheme` follows the visitor's operating system
   when they print, so a dark-mode visitor would file signal yellow on white
   paper at 1.57. The board's statement footer carries the name as text, which
   is what a filed page actually needs. */
.page-foot {
  max-width: var(--measure-app);
  margin: 0 auto;
  padding: var(--space-6) var(--space-4) var(--space-7);
  border-top: var(--border-1) solid var(--divider);
}

.page-foot-mark {
  display: block;
  height: 1.4rem;
  width: auto;
}

/* #196 part 3. The flash is a one-shot: html.js consumes the cookie on read
   and it carries a 30-second life, so a message missed once cannot be re-shown
   — there is no history and no re-request that brings it back. It renders once
   between the nav and <main>, and the staff queue's eleven in-table forms all
   redirect back to the same long page, so the confirmation for the row you
   just acted on could land above a fold you are not looking at. Sticky, so it
   stays reachable for as long as it exists.

   `top: 0` and not the nav's height: the nav is not sticky, so there is no
   fixed strip to clear — the flash pins to the viewport once the nav has
   scrolled past it. z-index because a later card with its own stacking context
   would otherwise paint over it.

   FORGE-677: the shell's message now pins as part of the stack below (.pinned), and this rule
   stays for the in-page error lines that wear the class (design 2.5). */
.flash {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: var(--space-3) var(--space-4);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-1);
  background: var(--signal);
  /* --on-signal, not --ink: --ink flips light in dark mode and this pairing
     would drop to 1.48. The one message the app cannot afford to lose. */
  color: var(--on-signal);
}

/* FORGE-677 (design docs/designs/2026-11-25-930-dismiss-pinned-message.md; ruling Q1 (a)). The
   shell's notices, in one stack: the staff banner, the maintenance and entitlement banners, and
   the message. It sticks while it holds the staff banner or a message that has not been
   dismissed, so the message pins directly under the banner at any banner height, and a message
   stays reachable until the person dismisses it (FORGE-282). flow-root keeps the children's
   margins inside the stack, so the height app.js measures into --pinned-height is the whole box.
   z-index above the board's figure strip (2), below the rail overlay (30) and the recorder (40).
   Never more than 60% of the screen (outside review C1): a staff banner with many sibling orgs on
   a short phone screen scrolls inside the stack rather than covering the page. */
.pinned {
  display: flow-root;
}

.pinned:has(> .impersonation-banner),
.pinned:has(> .flash:not([hidden])) {
  position: sticky;
  top: 0;
  z-index: 10;
  max-height: 60vh;
  overflow-y: auto;
  /* The page colour behind the gaps between and around the notices, so the page does not show
     through them as it scrolls under the stack. */
  background: var(--paper);
}

/* Inside the stack the message does not stick on its own; the stack does. */
.pinned > .flash {
  position: static;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

/* `display: flex` above would otherwise beat the `hidden` attribute a Dismiss sets. */
.pinned > .flash[hidden] {
  display: none;
}

.flash-text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  align-self: center;
}

/* D1, D2: "Dismiss", its visible label its name. Drawn in the message's own signal pair, ink on
   the signal fill, so no new colour pairing: the label, the outline and the focus ring all read
   8.68:1 in both themes. The app's filled button would not: its dark-theme fill and focus ring are
   1.30:1 against the signal fill (the contrast check, design 10.3 E). Hover keeps the pair, which
   is the only one pinned against --signal, and thickens the outline and underlines the label
   instead: --on-signal is a text role, never a surface (#309), and nothing is faded. At least
   44 px tall. */
.flash-dismiss {
  flex: 0 0 auto;
  min-height: 2.75rem;
  background: transparent;
  border-color: currentColor;
  color: inherit;
}

.flash-dismiss:hover {
  background: transparent;
  border-color: currentColor;
  box-shadow: inset 0 0 0 var(--border-1) currentColor;
  text-decoration: underline;
}

.flash-dismiss:focus-visible {
  outline-color: var(--on-signal);
}

/* After a Dismiss with no landed row on screen, app.js focuses <main> (tabindex -1) so the next
   Tab starts in the page and not at the top. <main> is not a control, and the browser's own ring
   around the whole of it reads as a fault (the render after Dismiss on the board). */
main[tabindex="-1"]:focus {
  outline: none;
}

/* FORGE-692: a link in the message (the waitlist's covered line carries one) takes the message's
   ink, as the entitlement banner's does: dark --deep is 1.14:1 on --signal. */
.flash a {
  color: inherit;
  text-decoration: underline;
}

/* FORGE-692: a focus ring on a signal fill is drawn in the fill's ink, 8.68:1 in both themes. The
   app's ring is --primary, 1.30:1 against --signal in dark. The maintenance line holds no control. */
.flash :focus-visible,
.entitlement-banner :focus-visible,
.impersonation-banner :focus-visible,
.help-recording-bar :focus-visible {
  outline-color: var(--on-signal);
}

/* #354 (FORGE-409) P21: the grace and lapsed line, directly above the flash. The flash's token
   pair, for the same reason as above; not sticky — it is standing state, not a one-shot
   message. Its billing link inherits the pair rather than taking the link colour, which is
   not pinned against --signal. */
.entitlement-banner {
  margin: var(--space-3) var(--space-4);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-1);
  background: var(--signal);
  color: var(--on-signal);
}

.entitlement-banner a {
  color: inherit;
  text-decoration: underline;
}

/* FORGE-545 D3: the maintenance line, in the entitlement banner's slot and token pair. */
.maintenance-banner {
  margin: var(--space-3) var(--space-4);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-1);
  background: var(--signal);
  color: var(--on-signal);
}

/* FORGE-421 Run 2 (§11.4): the staff banner while working inside a customer org. The sanctioned
   signal pairing, sticky so it stays on screen, and above every other banner. No script.
   FORGE-677: it sticks as the head of the pinned stack (.pinned), not on its own, so the message
   below it is never under it. */
.impersonation-banner {
  margin: var(--space-3) var(--space-4);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-1);
  background: var(--signal);
  color: var(--on-signal);
}

.impersonation-banner-line {
  margin: 0 0 var(--space-2);
}

/* The banner declares its own ink, so bare element rules must not repaint text inside it. */
.impersonation-banner p,
.impersonation-banner label,
.impersonation-banner strong {
  color: inherit;
}

.impersonation-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.impersonation-banner-actions a {
  color: inherit;
  text-decoration: underline;
}

.impersonation-banner-form {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin: 0;
}

.impersonation-banner-form label {
  display: inline-flex;
  gap: var(--space-2);
  align-items: center;
  margin: 0;
}

/* FORGE-692: the banner's buttons (Switch role, Switch to, Exit) take Dismiss's treatment above.
   The app's filled button and its ring measure 1.30:1 against --signal in dark; drawn transparent
   in the banner's ink, the outline, the label and the ring read 8.68:1 in both themes. Hover keeps
   the pair and thickens the outline and underlines the label instead: --on-signal is a text role,
   never a surface (FORGE-364). The role select keeps its field fill, which is its own text's
   ground, and takes the ink as its edge: its --muted edge was 2.99:1 against --signal in light. */
.impersonation-banner button {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}

.impersonation-banner button:hover {
  background: transparent;
  border-color: currentColor;
  box-shadow: inset 0 0 0 var(--border-1) currentColor;
  text-decoration: underline;
}

.impersonation-banner select {
  border-color: var(--on-signal);
}

/* FORGE-545 D2: the failure and maintenance page. It renders with no nav, so its main sits
   alone on the page; it inherits main's measure and only adds space above. */
.maintenance-page {
  margin-top: var(--space-6);
}

/* ── Forms and controls ─────────────────────────────────────────────────── */

form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

label {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--text-small);
}

label small {
  color: var(--muted);
  font-weight: normal;
}

/* The column above was written for stacked text-input labels, and a checkbox
   is not one: it put every checkbox on its own row with its text below,
   reading as an orphaned unlabelled box above an unrelated caption. Six sites
   — onboarding.js's groups form, board.js's coverage detail and the two
   settings reminders, billing.js's annual toggle and location picker — not
   only the one the design pass screenshotted.

   This is the SAME failure `form.inline` below already carries a comment
   about: one generic flex rule swallowing a control that needed a row. The
   override was written for forms and never for labels.

   The markup is already correct — onboarding.js:221 wraps input and text in
   one <label>, so screen-reader association held throughout and only the
   visual grouping was broken. Hence a CSS-only fix: `:has()` selects the
   label that contains the box rather than asking five page modules to add a
   class. */
label:has(> input[type="checkbox"]),
label:has(> input[type="radio"]) {
  flex-direction: row;
  align-items: center;
  gap: var(--space-2);
}

/* `.inline` is on 11 in-table action forms across staff.js and board.js, and
   was never defined — so `form { flex-direction: column }` above applied to all
   of them and every Approve/Reject/Enable control stacked vertically inside its
   table cell. */
form.inline,
form.step-form,
form.verify-form,
form.dismiss-form {
  flex-direction: row;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* #196 part 4. The per-group blocks on /onboarding/groups are the one
   card-shaped container in the app still wearing UA styling: a 2px inset ridge
   in a system colour, sitting on a screen whose other cards (.cluster-card,
   .coverage-row) are --card-border at --radius-2 on --card-bg. Same treatment,
   so a group reads as one of the app's cards and not as a browser default that
   nobody got to.

   The flex column replaces `form`'s gap, which stops at the fieldset boundary:
   the two labels inside are block-level flex containers and would otherwise
   stack flush against each other. */
fieldset {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-4);
  border: var(--border-1) solid var(--card-border);
  border-radius: var(--radius-2);
  background: var(--card-bg);
}

/* The group's name, and the same weight a .cluster-card summary carries. */
legend {
  padding: 0 var(--space-2);
  font-size: var(--text-h4);
  font-weight: 600;
  color: var(--ink);
}

/* The browser's own surfaces follow the palette (#309 design review DR5). Left
   alone, selected text is the browser's blue on a teal-and-yellow statement that
   people copy figures out of, and the caret is the UA's colour. Both are tokens,
   so palette-contrast.test.js measures them in both themes like any other pair:
   --ink on --soft is 12.66 in light. */
::selection {
  background: var(--soft);
  color: var(--ink);
}

input,
textarea {
  caret-color: var(--primary);
}

input {
  font: inherit;
  padding: var(--space-2);
  /* --muted (5.16:1 on white), not --divider (1.37:1). WCAG 1.4.11 wants 3:1
     for the visual boundary of a user-interface component, and this hairline is
     the only thing that says an input is here: the field's own --surface fill is
     1.05:1 against the page. --divider stays for decorative rules, which are
     exempt. */
  border: var(--border-1) solid var(--field-border);
  border-radius: var(--radius-1);
  background: var(--field-bg);
  color: var(--field-fg);
}

input:focus-visible {
  outline: var(--border-3) solid var(--field-border-focus);
  outline-offset: 1px;
}

/* A select is a field like the input beside it (round 3, R7). Left to the browser it rendered
   19px tall and grey beside 38px fields in the Review panel's verify form. */
select {
  font: inherit;
  padding: var(--space-2);
  border: var(--border-1) solid var(--field-border);
  border-radius: var(--radius-1);
  background: var(--field-bg);
  color: var(--field-fg);
}

select:focus-visible {
  outline: var(--border-3) solid var(--field-border-focus);
  outline-offset: 1px;
}

/* #196 part 2. /onboarding/import is the single screen where a customer hands
   the product their roster, and the control they click there was whatever the
   operating system draws — grey Chromium chrome sitting inside a stylesheet
   that had opinions about everything else on the page.

   The `input` rule above cannot reach it: the button inside a file input is a
   shadow pseudo-element, so it takes the app's button treatment only if it is
   named. Same tokens as `button` rather than a lookalike, because it IS a
   button and nothing on the page tells the customer this one was drawn by the
   browser. The field's own padding drops to --space-1 so the pseudo-button's
   padding sets the control's height instead of stacking on top of it. */
input[type="file"] {
  padding: var(--space-1);
}

/* ── FORGE-611: Choose File is the quiet button ───────────────────────────
   It used to take the primary tokens (#196), and on /onboarding/import it competed with the
   page's one real action, "Check". It is picking a file, a side step, so it wears .btn-quiet's
   tokens: the surface fill, the divider edge and ink. Still named here, so it never falls back to
   the browser's grey; and its hover shows through the edge alone, never faded (§5.3). */
input[type="file"]::file-selector-button {
  font: inherit;
  margin-right: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border: var(--border-1) solid;
  border-color: var(--divider);
  border-radius: var(--radius-1);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
  background: var(--surface);
  border-color: var(--primary);
}
/* ── end FORGE-611 */

button {
  font: inherit;
  padding: var(--space-2) var(--space-3);
  border: var(--border-1) solid var(--btn-bg);
  border-radius: var(--radius-1);
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  width: fit-content;
}

/* Darker on hover, never faded. `opacity: 0.9` used to live here: it
   composites the whole control over the page background and takes a 4.71:1
   label to 3.95:1 — failing AA the moment a pointer touches it, with every
   token still reading as compliant. The palette test refuses any opacity
   declaration in this file for that reason. */
button:hover {
  background: var(--btn-bg-hover);
  border-color: var(--btn-bg-hover);
}

/* WCAG 1.4.3 exempts an inactive component's label from the contrast minimum.
   The exemption is not taken here anyway: the label clears AA, and the state is
   carried by the strike and the cursor as well as by the colour. */
button[disabled] {
  background: var(--btn-bg-disabled);
  border-color: var(--divider);
  color: var(--btn-fg-disabled);
  text-decoration: line-through;
  cursor: not-allowed;
}

/* A defined variant with no use site yet: board.js's Dismiss is the
   destructive control, but wiring the class onto it is a markup change and
   #171 makes none. Defined ahead of use for the same reason --urgent itself
   was — so the phase that does emit one reaches for a measured value instead
   of picking a red. */
button.danger {
  background: var(--btn-bg-danger);
  border-color: var(--btn-bg-danger);
}

button.danger:hover {
  background: var(--btn-bg-danger-hover);
  border-color: var(--btn-bg-danger-hover);
}

a {
  color: var(--deep);
}

/* rateroutine-500. A link the reader has already opened. :where() adds no
   weight, so this weighs exactly what `a` does and wins over it only by coming
   after it: every link a class or a context colours (nav, rail, button-like
   links, banners) keeps its colour when visited. Plain a:visited would beat
   all of them and paint a plum label on a teal fill. Colour only, which is all
   a browser applies from :visited; the underline is untouched. */
a:where(:visited) {
  color: var(--link-visited);
}

/* #196 part 1, landed alongside #194's nav because that nav is a list of
   links. `input` already had the deliberate --field-border-focus treatment
   above; button and a fell through to the UA's `outline-style: auto`, so the
   app's primary wayfinding would have shipped with no focus ring a keyboard
   user can rely on. Same token and same width as the input rule — one focus
   idiom, not two — at a wider offset so a filled button's own border does not
   swallow it.

   rateroutine-504: an overflowing `.scroll` box is keyboard-focusable in
   Chrome whether or not it asks to be, and the article's changes table makes
   it a named region with tabindex 0. It takes this ring rather than the UA's
   black one. */
button:focus-visible,
a:focus-visible,
.scroll:focus-visible {
  outline: var(--border-3) solid var(--field-border-focus);
  outline-offset: 2px;
}

p small,
p {
  color: var(--muted);
}

/* ── Auth (FORGE-384) ─────────────────────────────────────────────────────
   Every auth screen is one card (owner mark M6): the hairline edge and ink top rule of the
   outcome cards, at --measure-auth, centred. Its way-out links group under a hairline in small
   text (M8), each a 24 px target (design 12A). A second action on a screen is .btn-quiet (M7).
   The flash renders outside <main>, so it is sized to the card's width at every viewport (R4)
   and, when it shows, the card closes up under it (design 7A). */
.auth-card {
  max-width: var(--measure-auth);
  margin: var(--space-7) auto var(--space-6);
  padding: var(--space-6);
  background: var(--surface);
  color: var(--ink);
  border: var(--rule-hair);
  border-top: var(--rule-ink);
}

.auth-card > h1:first-child {
  margin-top: 0;
}

.auth-card form {
  display: grid;
  gap: var(--space-4);
}

.auth-card form > button {
  justify-self: start;
}

.auth-card label small {
  display: block;
  margin-top: var(--space-1);
  color: var(--muted);
}

.auth-card h2 {
  margin-top: var(--space-6);
}

.auth-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: var(--rule-hair);
  font-size: var(--text-small);
}

.auth-links p {
  margin: 0;
}

.auth-links a {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
}

@media (max-width: 40rem) {
  .auth-card {
    margin-top: var(--space-5);
    padding: var(--space-5);
  }
}

/* FORGE-677: the message sits in the pinned stack, which keeps the message's own side margins, so
   the stack is the auth measure plus those margins and the message inside it is the card's width. */
body:has(.auth-card) > .pinned {
  width: min(calc(var(--measure-auth) + 2 * var(--space-4)), 100%);
  margin-inline: auto;
}

body:has(> .pinned) main:has(> .auth-card) {
  padding-top: 0;
}

body:has(> .pinned) .auth-card {
  margin-top: 0;
}

/* ── Tables ───────────────────────────────────────────────────────────────
   Five page modules render tables and none of them had a rule. --divider's own
   comment claimed it covered "table lines" while having zero table use sites;
   this is where it earns that. */

table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-4) 0;
}

th {
  text-align: left;
  color: var(--table-head-fg);
  font-size: var(--text-small);
  border-bottom: var(--border-1) solid var(--table-rule);
}

td {
  border-bottom: var(--border-1) solid var(--table-rule);
}

th,
td {
  padding: var(--space-2) var(--space-3);
  vertical-align: top;
}

/* Below the app measure a wide table scrolls inside itself instead of
   scrolling the page body. The 9-column staff Sources table and the 7-column
   Change events table both used to push the whole document sideways. Above
   this width it stays a real table — v1 §E is desktop-primary and asks for no
   separate mobile design, only that narrow widths stay usable. */
@media (max-width: 72rem) {
  /* `.reg` is excluded, and the exclusion is the point of `table-layout: fixed`
     on it: the register's step columns have to land on the same x in every
     cluster on the page, and `display: block` throws the table formatting
     context away along with the column widths. It scrolls inside its own
     `.scroll` wrapper instead, which is the same behaviour by a different
     mechanism. `.rb-rates` is excluded for the same reason (rateroutine-329): every
     rooftop's rate table shares one column template so its columns line up down
     /rooftops, and it scrolls inside its own `.scroll` box. `.staff-tickets-table` (FORGE-516,
     design review 8A) keeps its table layout too, so its two sticky columns stick inside its
     `.scroll` box. `.staff-stack` (FORGE-575) is a work list: it stacks into records below
     40rem and is a plain table inside its own `.scroll` box above that. `.loc-stack` (FORGE-682)
     is the same for the two Locations tables. */
  table:not(.reg):not(.article-changes):not(.rb-rates):not(.staff-tickets-table):not(.staff-stack):not(.loc-stack) {
    display: block;
    overflow-x: auto;

    /* #195 part 3. That scroll was real and invisible. At 375px the Locations
       table measures 475px against a 343px viewport, so the per-row "Check
       now" button — the only action on the screen — sits past the right edge,
       and an overlay scrollbar shows nothing until a finger is already
       dragging. The row reads as complete.

       Four gradients in two pairs. The `local` covers are anchored to the
       scrolled CONTENT; the `scroll` shadows are anchored to the ELEMENT. At
       rest a cover sits exactly over its shadow and nothing shows; scroll away
       from an edge and that cover travels with the content, uncovering the
       shadow behind it. So a cue appears only on a side that genuinely has
       more table — where one static fade would claim overflow on both edges of
       a table that fits, which is the same lie as no cue at all.

       --paper is what the table sits on and --divider is the quiet-boundary
       role; no new colour and no new token. */
    background-image:
      linear-gradient(to right, var(--paper) 50%, transparent),
      linear-gradient(to left, var(--paper) 50%, transparent),
      linear-gradient(to right, var(--divider), transparent),
      linear-gradient(to left, var(--divider), transparent);
    background-position: left center, right center, left center, right center;
    background-repeat: no-repeat;
    background-size:
      var(--space-5) 100%, var(--space-5) 100%,
      var(--space-2) 100%, var(--space-2) 100%;
    background-attachment: local, local, scroll, scroll;
  }
}

/* ── Status ───────────────────────────────────────────────────────────────
   `.amber` is the app's only status hook — unresolved locations, stale
   sources, blind sources, unverified cadences, retracted change events — and
   it painted nothing, so all five rendered identically to healthy rows. That
   is worse than no hook, because it reads as handled.

   It is a marker PLUS the text label each site already renders, never a fill
   carrying the meaning on its own: Theme 5 §6 and v1 §E both require that
   colour is never the only status indicator, and rule 3 bars signal yellow as
   a foreground on any light surface. It lands on <tr>, <p> and <li>, so the
   left border needs the border-collapse set above to render on a row. */

.amber {
  border-left: var(--border-3) solid var(--status-attention);
  padding-left: var(--space-2);
}

/* The `p { color: var(--muted) }` protection rule for containers that declare
   their own foreground lives with the register block below, where the rest of
   those containers are. */

/* ── Onboarding milestones (v1 §E first-run dashboard) ────────────────────
   Data ready -> Resolved -> Baseline ready -> Monitoring on. The marker
   duplicates the ✓/· glyph the row already renders, so the state survives
   monochrome. */

.milestone-done,
.milestone-pending {
  list-style: none;
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-2);
  border-left: var(--border-3) solid var(--card-border);
  background: var(--card-bg);
}

.milestone-done {
  border-left-color: var(--status-ok);
}

.milestone-pending {
  border-left-color: var(--status-attention);
}

/* ── Filters, coverage, staff ─────────────────────────────────────────── */

/* Bound to the trust-line numbers (§E). */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--text-small);
}

/* rateroutine-500: filter chrome, not a destination. Every pill gets visited in
   normal use, so the visited colour would mark nothing; it keeps --deep. */
.filter-pills a {
  color: var(--deep);
}

/* #195 part 2. Three pills that looked identical whether or not you were
   standing on one, so the filtered table and the unfiltered one were told
   apart only by the address bar. Weight and an underline, not a colour swap:
   the state has to survive monochrome like every other state here, and the
   link keeps --deep so it still reads as a link.

   Hung off aria-current rather than a class so the announced state and the
   painted state are the same fact. A class would let one be right while the
   other is stale. */
.filter-pills a[aria-current="page"] {
  font-weight: 600;
  text-decoration: underline;
}

/* FORGE-684. The dots between the Locations pills. They were bare `·` text between the links,
   so each was a flex item of its own, and a wrapped row left one alone at the end of a line or
   the start of the next. Each pill after the first now draws its own dot, centred in the gap to
   its left, with alternative text "" so it is not read. The gap is the old gap, the dot's width
   and the old gap again, which is the spacing the text dots made, so the one-line desktop row is
   unchanged: pixel for pixel at 1280px. Outfit's · advances 0.13em; --pill-dot is 0.1302em
   because Chromium rounds a text box's width up to a 64th of a pixel and a length down, and
   0.1302em lands on the same 64th at the row's size.

   A pill that starts a line has its dot outside the row's left edge, where the clip hides it; the
   clip stops 0.5rem out, past the focus ring (3px at 2px offset) and short of the dot, 0.75rem
   out. A line's last pill draws no dot after it, so no line ends on one. On a phone, where each
   pill is a 44px target, the dot is centred on the pill's line rather than sitting at its top.

   The <p> is the Locations rows (the monitored and the prospect table). The staff presets share
   .filter-pills on a <nav> and have no dots. */
p.filter-pills {
  --pill-dot: 0.1302em;
  column-gap: calc(var(--space-3) * 2 + var(--pill-dot));
  clip-path: inset(-1rem -1rem -1rem calc(-1 * var(--space-2)));
}

p.filter-pills a {
  position: relative;
}

p.filter-pills a + a::before {
  content: "·";
  content: "·" / "";
  position: absolute;
  right: calc(100% + var(--space-3));
  width: var(--pill-dot);
  text-align: center;
  color: var(--muted);
  font-weight: 400;
  pointer-events: none;
}

/* #251 (FORGE-320). The monitoring cadence, stated where the per-row "Check now"
   button used to be. Quiet by design: it is a standing fact about the whole
   table rather than an action, so it sits between the filters and the table at
   the same weight as the trust line, and never competes with a data row. */
.cadence {
  font-size: var(--text-small);
  color: var(--muted);
  margin-top: var(--space-2);
  margin-bottom: var(--space-4);
}

/* The answer a filter gives when it matches nothing — quieter than a data row,
   because it is not one, and centred so it is not mistaken for a first record.
   An empty findings list is what this product is for; it must not render as a
   table that failed to load. */
.empty-row td {
  padding: var(--space-5) var(--space-3);
  color: var(--muted);
  text-align: center;
}

.coverage-row {
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  border: var(--border-1) solid var(--card-border);
  border-radius: var(--radius-2);
  background: var(--card-bg);
}

/* ── Early agent alerts (#253 / FORGE-322) ────────────────────────────────
   Two surfaces for one opt-in feature: the /settings fieldset that turns it on,
   and the board section listing what an agent has read but nobody has confirmed.

   The board section is deliberately styled AWAY from `.cluster-card`. A cluster
   card is a finding that passed the review gate against an official file; this is
   an LLM's reading of a press release. #249 (FORGE-319) asked for an indicator
   telling the two apart, and the eng review answered it by separation — different
   objects, different sections, different treatments — so they cannot converge
   however the styling later drifts.

   It carries `.amber`'s reasoning without reusing the class: the meaning is in
   the heading and body copy ("An agent can be wrong"), never in the colour alone
   (Theme 5 §6, v1 §E — colour is never the only status indicator). */

.agent-announcements {
  margin-top: var(--space-5);
  padding: var(--space-4);
  border: var(--border-1) dashed var(--card-border);
  border-radius: var(--radius-2);
  background: var(--card-bg);
}

.agent-announcements > h2 {
  margin-top: 0;
}

.agent-announcements ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.agent-announcements li {
  border-left: var(--border-3) solid var(--status-attention);
  padding-left: var(--space-2);
}

/* #261 (FORGE-327) T2 — the per-row overdue marker.

   It gets NO new colour token and no badge, deliberately. The marker is a statement about the
   state of the CHECK, never the state of the rate (design D7), and a coloured chip is exactly
   the treatment that would read as "this rate is now wrong" — the mode:'active' claim the
   announcements/findings separation exists to prevent. The words carry the meaning, as they do
   for the section itself above; the only visual job here is to separate the marker from the
   claim it qualifies. */

.agent-announcement-overdue {
  margin: var(--space-2) 0 0;
  font-size: 0.9375rem;
}

.agent-alerts {
  margin: var(--space-4) 0;
  padding: var(--space-4);
  border: var(--border-1) solid var(--card-border);
  border-radius: var(--radius-2);
}

.ack-record {
  color: var(--muted);
  font-size: 0.875rem;
}

/* FORGE-433. The "Lead with" choice: framed like the agent-alerts block above it, so a radio pair
   reads as one decision rather than two loose checkboxes. The count line under it is quiet. */
.location-identifier {
  margin: var(--space-4) 0;
  padding: var(--space-4);
  border: var(--border-1) solid var(--card-border);
  border-radius: var(--radius-2);
}

.location-identifier .field-note {
  color: var(--muted);
  font-size: 0.875rem;
}

/* FORGE-433. The one-time onboarding offer to lead with the store number: set apart from the
   milestones and the import counts it sits among, as the settings block is. */
.identifier-offer {
  margin: var(--space-4) 0;
  padding: var(--space-4);
  border: var(--border-1) solid var(--card-border);
  border-radius: var(--radius-2);
}

/* FORGE-527. The /settings calendar subscribe URL carries a long token, and on a phone its
   <code> ran past the column and scrolled the whole page sideways. It may break anywhere; at a
   desktop width it fits, so nothing there changes. */
.calendar-url {
  overflow-wrap: anywhere;
}

/* FORGE-528. Staff pages print long unbroken values in <code>: a CPI response's sha256 (64
   characters, no break opportunity) and a ticket's page path and element path (customer-sent, up
   to 500 characters). On a phone they ran past the column and scrolled the page sideways. They
   may break anywhere. */
.staff-long-value {
  overflow-wrap: anywhere;
}


/* ── The dark palette (#308) ───────────────────────────────────────────────
   Ratified, measured, and bound by tests/unit/palette-contrast.test.js at these
   literal hexes exactly as the light table is bound. The decision doc is
   docs/designs/2026-09-05-dark-palette-ratification.md; read it before changing
   a value here, because four of these are decisions rather than derivations.

   Only ROLES are redeclared. Every component token above aliases a role, so the
   whole component layer follows without being restated — the two exceptions are
   --on-signal, which is pinned across both themes on purpose, and --alarm-bg,
   which deliberately stops tracking --urgent here.

   The surface ladder inverts: in light, cards sit ABOVE the page (white on
   paper); in dark the page is darkest and cards lift off it. Both of a card's
   separation cues are set deliberately high — the first attempt measured HIGHER
   than light on both (fill 1.19 vs 1.11, border 1.48 vs 1.37) and rendered
   visibly worse, borders gone and panels reading as floating tone blocks. Ratio
   parity is not perceptual parity; these were raised until a rendered specimen
   showed defined cards again, and the guard asserts the raised minimums. */

@media (prefers-color-scheme: dark) {
  :root {
    /* Text and structure */
    --ink: #E7EFED;      /* 15.58 on the page, 11.38 on a card */
    --muted: #9CB0B0;    /* 8.02 on the page, 5.86 on a card */
    --divider: #4C6A6E;  /* 2.28 against a card — a definite edge, see above */

    /* Surfaces — page darkest, cards lift */
    --paper: #0D1718;
    --surface: #1D3336;  /* 1.37 off the page */
    --soft: #123B39;     /* verified and informational */

    /* Brand fills LIGHTEN here, and --on-fill inverts to match. Keeping the
       light fills was measured and fails: --primary #0F6E6A reaches only 2.52
       against a dark card, under the 3:1 WCAG 1.4.11 wants for a component
       boundary — and buttons sit on cards throughout the board. So -hover
       lightens further, and contrast still RISES on interaction. */
    --primary: #3EBFB6;        /* dark label at 8.12 */
    --primary-hover: #5AD3CA;  /* dark label at 10.10 */
    --urgent: #E8776B;         /* dark label at 6.34 */
    --urgent-hover: #F09186;   /* dark label at 7.92 */

    --deep: #8FC0D6;     /* links — 9.26 on the page. The light #244F62 is 2.06 here. */
    --link-visited: #CDA6DD;  /* 8.76 on the page, 6.39 on a card, 5.90 on soft; 25.8 ΔE from --deep */

    /* Unchanged. Signal yellow is a fill in both themes and reads on either. */
    --signal: #F5BC4B;

    --on-fill: #0A1718;

    /* The blind banner keeps the brand coral, which light mode cannot use as a
       fill. 5.16 for its dark label, 5.14 against the page — 3.5x the all-clear
       panel's 1.48, which is what "loud banner" has to mean here. */
    --alarm-bg: #ED5347;
  }
}

/* ══ THE ASSEMBLED INTERFACE (#309) ═══════════════════════════════════════
   docs/designs/2026-09-08-selection-round-1.md, built from the five entries
   the competition produced rather than re-authored from memory.

     /home   A (Instrument) hero and status key, E (Signal) procedure run,
             C (Dispatch) section heads, A's claim band, D (Almanac) tier
             table and colophon. "Who built it" is cut. The CTA band is on
             --surface, NOT on --ink: see homeBody()'s note in content.js and
             the #309 guard in tests/unit/palette-contrast.test.js.
     board   B (Ledger) register — ruled both ways, printed references, columns
             aligned across clusters, the accountant's footing, the statement
             and work split — inside C's docked rail.

   One vocabulary across both screens, on purpose. The marks, the tracked mono
   labels, the two rule weights and the tabular figures are the same objects on
   the marketing page and in the console, because a direction that only survives
   on one of them is a screen and not a system. */

/* ── The shell and the rail ───────────────────────────────────────────────
   TWO STATES, AND THE BREAKPOINT IS DERIVED.

     wide enough for the rail AND the full register  ->  open, docked
     anything narrower, laptop or phone              ->  a button on a bar that
                                                         opens a left overlay,
                                                         with the brand on the bar

   The docking width is not a round number: it is `--dock-w` plus `--measure-app`
   plus the two --space-4 gutters `main` already spends, written as a calc() so
   the sum is visible in the file. Below it the register would be squeezed by
   chrome, which is the one thing a dense screen must not spend width on.
   Custom properties are not readable inside a media query, so the three terms
   are literals here and have to track the tokens: 15.5rem + 72rem + 2rem.

   The control is a native <details>. The CSP is `script-src 'self'` with no
   'unsafe-inline', so a disclosure is the only toggle available that costs no
   script, and <summary> is focusable with Enter/Space handling of its own.

   The open state is never carried by `opacity` — banned across this file
   because a faded control composites its way under AA, and because a rail that
   is invisible but still in the document is a focus trap a keyboard user falls
   into with nothing on screen to explain where they are. */

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.app-work {
  min-width: 0;
}

.app-rail {
  background: var(--surface);
  color: var(--ink);
  border-bottom: var(--border-1) solid var(--divider);
}

.rail-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: fit-content;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--deep);
  cursor: pointer;
  list-style: none;
}

/* The UA's disclosure triangle, removed in both engines' spellings. The bars
   below are the affordance, and the word beside them is what a screen reader
   and a voice-control user actually have. */
.rail-toggle::-webkit-details-marker {
  display: none;
}

.rail-toggle:hover {
  color: var(--ink);
}

.rail-toggle:focus-visible {
  outline: var(--border-3) solid var(--field-border-focus);
  outline-offset: 2px;
}

.rail-toggle-text {
  line-height: 1;
}

/* Three rules, drawn with borders rather than filled boxes: --divider and
   --muted are edge roles, and a rule is what an edge role is for. */
.rail-toggle-bars {
  position: relative;
  flex: none;
  width: 1rem;
  height: 0.7rem;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.rail-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% - 1px);
  border-top: 2px solid currentColor;
}

.rail-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: var(--space-4);
  border-top: var(--border-1) solid var(--divider);
}

.rail-nav {
  min-width: 0;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rail-link {
  display: block;
  padding: var(--space-2) var(--space-3);
  margin-left: calc(var(--space-3) * -1);
  color: var(--ink);
  text-decoration: none;
  border-left: var(--border-3) solid transparent;
}

/* Contrast rises under the pointer, and the marker is an edge rather than a
   fill so the row does not become a fourth surface. */
.rail-link:hover {
  border-left-color: var(--primary);
  color: var(--ink);
}

/* Hung off aria-current rather than a class, so the announced state and the
   painted state are the same fact. A class would let one be right while the
   other went stale. Weight and an edge, never a fill: the marker has to survive
   a monochrome print like every other state here. */
.rail-link[aria-current="page"] {
  border-left-color: var(--primary);
  font-weight: 600;
}

/* The Help link sits between the destinations and the identity block, outside
   the list: it is a way to reach us, not a screen. It reuses .rail-link, so the
   edge marker and the contrast change are the rail's own; the row only needs
   the 44px target. */
.rail-help {
  margin: 0;
}

.rail-help .rail-link {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
}

.rail-foot {
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: var(--border-1) solid var(--divider);
}

.rail-who {
  margin: 0 0 var(--space-3);
  font-size: var(--text-small);
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* Below the dock: ONE behaviour, phone and laptop alike (#309 round 2, step 5).
   The rail is a button on a bar, and what it opens is a left overlay: not part
   of the layout at all, scrolling on its own, and existing only while the
   disclosure is open, which keeps it out of the tab order the rest of the time.

   Round 2 removed the strip this used to be between 48rem and the dock. Its
   reason ("a vertical panel here costs 400px of chrome above the register")
   held for a panel in the document flow, not for an overlay; and at 1280 and
   1366 the closed bar showed only MENU, with no brand, account or sign-out.

   So the closed bar carries the brand, as a link BESIDE the <details> (a link
   inside <summary> is invalid HTML). It shares the bar's grid cell rather than
   taking a row of its own, and the panel's own brand hides here, so exactly one
   brand displays in every state; the dock query below swaps them back. */
@media (max-width: 89.49rem) {
  .app-rail,
  .rail-bar-brand {
    grid-row: 1;
    grid-column: 1;
  }

  .app-work {
    grid-row: 2;
  }

  .rail-bar-brand {
    justify-self: end;
    align-self: center;
    margin-right: var(--space-4);
  }

  .rail-panel .nav-brand {
    display: none;
  }

  .app-rail[open] .rail-panel {
    position: fixed;
    top: 3.1rem;
    left: 0;
    bottom: 0;
    z-index: 30;
    width: min(20rem, 86vw);
    overflow-y: auto;
    background: var(--surface);
    color: var(--ink);
    border-right: var(--border-1) solid var(--divider);
  }
}

/* Docked: --dock-w + --measure-app + main's own gutters. */
@media (min-width: calc(15.5rem + 72rem + 2rem)) {
  .app-shell {
    grid-template-columns: var(--dock-w) minmax(0, 1fr);
  }

  /* Two elements rather than one, and the split is load-bearing: the COLUMN
     runs the full height of the document so its fill reaches the footer, and
     the PANEL inside it is what sticks. A sticky box is only as tall as itself,
     so making the rail itself sticky leaves the column ending two thirds of the
     way down the page with a visible seam under it. */
  .app-rail {
    border-bottom: 0;
    border-right: var(--border-1) solid var(--divider);
  }

  .rail-toggle,
  .rail-bar-brand {
    display: none;
  }

  /* The panel is shown whatever the disclosure's own state is. Without this a
     rail the visitor closed at a narrow width stays closed when the window
     widens, and the control that would reopen it has just been hidden — the
     one genuinely unrecoverable state this pattern has. Both engines' hiding
     mechanisms are named: the shadow slot, through ::details-content, and the
     older `details:not([open]) > *:not(summary)` rule.

     The slot is also the sticky panel's containing block, so it takes the full
     height of the <details> the grid stretches to the page (FORGE-519). Sized
     `auto`, it shrank to the panel's own 100vh and left the panel no room to
     stick: the rail scrolled off with the page. Docked, the summary is hidden,
     so 100% is the whole column and nothing overflows it. */
  .app-rail::details-content {
    content-visibility: visible;
    block-size: 100%;
  }

  .app-rail:not([open]) > .rail-panel {
    display: flex;
  }

  .rail-panel {
    position: sticky;
    top: 0;
    min-height: 100vh;
    border-top: 0;
    padding-top: var(--space-5);
  }
}

/* ── The seven marks ──────────────────────────────────────────────────────
   Shape is the first carrier of a state, the word beside it is the second, and
   the fill is the third — never the only one (rule 6). These screens are
   printed and filed as evidence by people who are liable for being wrong.

     diamond  alarm — a source went quiet, or the source contradicts
     square   open — a rate moved and nobody has verified it
     disc     settled — verified, or every step closed
     ring     pending — announced or unresolved; nobody has established it
     ◍        upcoming — done early, and waiting on its date (a ring hatched in teal)
     ⊘        dismissed — someone ruled it out (a ring struck through once)
     bar      not required — this step does not apply to this rooftop

   Drawn in CSS. The vendored subsets are latin and latin-ext only, so a
   character vocabulary would fall back to whatever face the operating system
   offers and the key on /home would stop matching the marks on the board. */

.mark {
  display: inline-block;
  flex: none;
  width: var(--mark-dim);
  height: var(--mark-dim);
  border: var(--border-1) solid var(--mark-line);
  background: var(--paper);
}

.mark-open {
  background: var(--mark-fill-open);
}

.mark-ok {
  border-radius: 50%;
  background: var(--mark-fill-ok);
}

.mark-alarm {
  transform: rotate(45deg);
  background: var(--mark-fill-alarm);
}

/* Hollow on purpose: "nobody has established this yet" should look like a gap
   in the reading, not like a filled state of its own. */
.mark-pending {
  border-radius: 50%;
  background: transparent;
}

/* A rule, so it is drawn as one. --muted is an edge role and a border is what
   an edge role paints; as a `background` it would be a text role used as a
   surface, which the #309 guard refuses. */
.mark-none {
  height: 0;
  width: calc(var(--mark-dim) + 0.35rem);
  margin-top: calc(var(--mark-dim) / 2);
  border: 0;
  border-top: 2px solid var(--mark-fill-none);
  background: transparent;
}

/* ◍ Upcoming. The ring and its vertical hatch are both the upcoming teal, a fill role, so the
   mark reads as "settled, not yet" beside the solid disc of Verified. */
.mark-upcoming {
  border-radius: 50%;
  border-color: var(--status-upcoming);
  background: repeating-linear-gradient(90deg, var(--status-upcoming) 0 1px, transparent 1px 3px);
}

/* Inside its own stamp (a rooftop page, round 3, R14) the teal would vanish into the teal fill,
   so the ring and hatch take the stamp's on-fill colour. */
.stamp-upcoming .mark-upcoming {
  border-color: var(--on-status-upcoming);
  background: repeating-linear-gradient(90deg, var(--on-status-upcoming) 0 1px, transparent 1px 3px);
}

/* ⊘ Dismissed. Hollow like pending, and struck once: the rule is a border on the pseudo-
   element, because --mark-line is an edge role and a border is what an edge role paints. */
.mark-dismissed {
  position: relative;
  border-radius: 50%;
  background: transparent;
}

.mark-dismissed::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -1px;
  right: -1px;
  border-top: var(--border-1) solid var(--mark-line);
  transform: rotate(-45deg);
}

/* Screen-reader text. `clip-path`, never `opacity`. */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── The section head, on both screens ────────────────────────────────────
   C's treatment: a tracked mono small-caps label with a rule running from it to
   the right edge. One label idiom for the whole product — it marks a section on
   /home and a division of the register on the board — which is most of what
   makes the marketing page read as the same machine as the console. */

.section-head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-6) 0 var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink);
}

.section-head::after {
  content: "";
  flex: 1;
  border-top: var(--rule-hair);
}

.section {
  margin-top: var(--space-7);
}

/* An empty section on a rooftop page is one line (round 3, R12): its heading and its message
   side by side over a hairline, so nothing present does not take a section's full height. */
.section-empty {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: var(--rule-hair);
}

.section-empty .section-head {
  margin: 0;
}

.section-empty .section-head::after {
  content: none;
}

.section-empty .rb-empty {
  margin: 0;
  padding: 0;
  font-size: var(--text-small);
}

/* ══ /home ════════════════════════════════════════════════════════════════ */

/* The hero and the key beside it. The shipped page ran one narrow column and
   left the right half of the viewport empty; the key is what fills it, and it
   earns the space because "what will this thing tell me" is the question a
   stranger has to have answered before the price means anything. */

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--space-7);
  align-items: start;
  padding: var(--space-6) 0 var(--space-7);
}

.home-hero-say {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
}

.home-title {
  margin: 0 0 var(--space-5);
  font-size: var(--size-headline);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: var(--track-close);
  text-wrap: balance;
}

.home-lede {
  margin: 0;
  max-width: var(--measure-say);
  font-size: var(--text-h3);
  line-height: 1.45;
  color: var(--ink);
}

.home-actions {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin: var(--space-6) 0 0;
  max-width: none;
}

.home-actions-note {
  max-width: 22rem;
  font-size: var(--text-small);
  color: var(--muted);
}

.home-audience {
  margin: var(--space-5) 0 0;
  max-width: var(--measure-say);
  font-size: var(--text-small);
  line-height: 1.6;
  color: var(--muted);
}

/* A link that acts as the page's one filled control. One filled thing per
   decision: if every control is filled, none of them reads as the action. */
.btn-primary {
  display: inline-block;
  padding: var(--space-3) var(--space-5);
  border: var(--border-1) solid var(--btn-bg);
  border-radius: var(--radius-1);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--btn-bg-hover);
  border-color: var(--btn-bg-hover);
  color: var(--btn-fg);
}

/* The key. Not a screenshot and not a mockup: the same five marks the register
   draws, shown before anyone signs in, with the product's own words. */
.reading {
  padding: var(--space-5);
  background: var(--surface);
  border: var(--border-1) solid var(--divider);
  border-top: var(--border-4) solid var(--primary);
}

.reading-title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
}

.reading-note {
  margin: var(--space-2) 0 var(--space-5);
  font-size: var(--text-small);
  line-height: 1.55;
  color: var(--muted);
}

/* The axis. A hairline the marks sit ON, so they read as readings on a scale
   rather than as bullets that happen to be shapes. */
.reading-list {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
}

.reading-list::before {
  content: "";
  position: absolute;
  top: 0.6rem;
  bottom: 0.6rem;
  left: calc(var(--key-channel) / 2);
  border-left: var(--border-1) solid var(--muted);
}

.reading-row {
  display: grid;
  grid-template-columns: var(--key-channel) minmax(0, 1fr);
  align-items: start;
  padding: var(--space-3) 0;
  border-top: var(--rule-hair);
}

.reading-row:first-child {
  border-top: 0;
}

.reading-chan {
  display: flex;
  justify-content: center;
  padding-top: 0.3rem;
}

.reading-body {
  min-width: 0;
}

.reading-word {
  display: block;
  font-weight: 600;
  letter-spacing: var(--track-close);
}

.reading-gloss {
  display: block;
  margin-top: 2px;
  font-size: var(--text-small);
  line-height: 1.5;
  color: var(--muted);
}

.home-section {
  margin-top: var(--space-7);
}

/* ── The procedure (E-H05) ────────────────────────────────────────────────
   Signal's four steps as a horizontal run with numbered nodes on a rule. The
   order IS the product — detect, review, verify, track — so the run reads left
   to right as one line rather than as four cards that happen to be adjacent. */

.run {
  position: relative;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-5);
  margin: var(--space-6) 0 0;
  padding: 0;
}

.run::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(0.4rem - 1px);
  border-top: var(--border-3) solid var(--divider);
}

.run-step {
  position: relative;
  padding-top: var(--space-6);
}

.run-node {
  position: absolute;
  top: 0;
  left: 0;
  width: 0.8rem;
  height: 0.8rem;
  border: var(--border-3) solid var(--primary);
  background: var(--paper);
}

.run-num {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-small);
  letter-spacing: var(--track-label);
  color: var(--muted);
}

.run-verb {
  margin: var(--space-1) 0 var(--space-2);
  font-size: var(--text-h3);
  letter-spacing: var(--track-close);
}

.run-text {
  margin: 0;
  font-size: var(--text-small);
  line-height: 1.55;
}

/* ── Two outcomes, and no third: C's two cards (round 2, step 6) ───────────
   One card per outcome, each a mark, a tracked mono word and one sentence: the
   `ok` and `open` marks the reading key uses a screen higher up, so the two
   outcomes read the same way on /home as on the board. On --surface with the
   hairline edge and the ink top rule, so nothing new enters the palette. The
   shared sentence sits beneath them once, as a note. They replace the claim
   band, whose viewport bleed goes with it; they stack on a phone. */

.outcomes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.outcome {
  padding: var(--space-5);
  background: var(--surface);
  color: var(--ink);
  border: var(--border-1) solid var(--divider);
  border-top: var(--rule-ink);
}

.outcome-word {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.outcome-text {
  margin: var(--space-3) 0 0;
  font-size: var(--text-body);
  line-height: 1.45;
}

.outcome-note {
  margin: var(--space-4) 0 0;
  max-width: 46rem;
  font-size: var(--text-small);
  color: var(--muted);
}

/* ── Pricing (D-H07, D-H08) ───────────────────────────────────────────────
   A rate table, which is what a reference work is for. A real <table> because
   the crawler reads this page, and the figures come from core/pricing.js
   rather than being restated. */

.tiers-wrap {
  overflow-x: auto;
}

.tiers {
  width: 100%;
  max-width: 34rem;
  margin: 0;
  border-collapse: collapse;
  background: var(--surface);
  color: var(--ink);
  border: var(--border-1) solid var(--card-border);
}

.tiers-caption {
  caption-side: top;
  text-align: left;
  padding-bottom: var(--space-3);
  max-width: var(--measure-say);
  font-size: var(--text-small);
  line-height: 1.5;
  color: var(--muted);
}

.tiers-head,
.pricing-rates thead th {
  padding: var(--space-3) var(--space-4);
  border-bottom: var(--rule-ink);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
}

.tiers-head-figure,
.tiers-figure,
.pricing-rates thead th + th,
.pricing-rates td {
  text-align: right;
}

.tiers-band,
.pricing-rates tbody th {
  padding: var(--space-3) var(--space-4);
  border-top: var(--rule-hair);
  border-bottom: 0;
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--ink);
}

.tiers-figure,
.pricing-rates td {
  padding: var(--space-3) var(--space-4);
  border-top: var(--rule-hair);
  border-bottom: 0;
  font-family: var(--font-mono);
  font-size: var(--text-h3);
  font-weight: 600;
  letter-spacing: var(--track-close);
  color: var(--ink);
}

.tiers-note {
  margin: var(--space-4) 0 0;
  max-width: var(--measure-say);
  color: var(--ink);
}

/* ── /home's GA sections (FORGE-419) ──────────────────────────────────────
   Plain semantic markup in the page's existing idioms (plan P11): FORGE-384's
   visual pass restyles later. A section's prose sits at the reading measure;
   its sources and caveats sit beneath it as small print. The miss-cost table
   reuses the tiers table above. The two pay modes and the three proof blocks
   are cards on --surface with the hairline edge and the ink top rule, exactly
   as .outcome is, so nothing new enters the palette. Both stack on a phone. */

.home-say {
  margin: var(--space-5) 0 0;
  max-width: var(--measure-say);
  line-height: 1.55;
  color: var(--ink);
}

/* /pricing (FORGE-419 Run 3) reuses the two pay-mode cards below. Its lede sits at the reading
   measure like .home-say; the five promises are a plain list at the same measure. */
.pricing-lede {
  margin: var(--space-4) 0 var(--space-5);
  max-width: var(--measure-say);
  font-size: var(--text-body);
  line-height: 1.55;
  color: var(--ink);
}

.price-promises {
  max-width: var(--measure-say);
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1.5;
  border-bottom: var(--rule-hair);
}

/* FORGE-384 (M5): the five promises are a ruled register, a hairline above each row. */
.price-promises li {
  padding: var(--space-3) 0;
  border-top: var(--rule-hair);
}

/* FORGE-384. The sheet's columns take /pricing's prose out of `main > p`, so the reading measure
   is restated here (R1). */
.pricing-plan > p,
.pricing-side > p {
  max-width: var(--measure-say);
}

/* M2: each card leads with its first-location price, set as a figure. */
.plan-mode-figure {
  display: block;
  margin-bottom: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-h2);
  font-weight: 600;
  letter-spacing: var(--track-close);
  line-height: 1.1;
}

/* The 1/3/5 table's row heads stay one line at 34rem ("3 locations" wrapped in the mock). */
.pricing-rates tbody th {
  white-space: nowrap;
}

/* M4: the free audit is /home's CTA band on one column ... */
main .pricing-audit {
  margin-top: var(--space-6);
  padding: var(--space-5) 0;
}

main .pricing-audit .cta-title {
  font-size: var(--text-h2);
}

/* ... and from 64rem a card at the top of a side column (M1, P-B). 64rem holds the two cards
   (29rem), the 3rem gap and the 22rem column with room to spare. The selectors outrank the
   base rules above (C1), and the side title steps down so the prices anchor (design 4A). */
@media (min-width: 64rem) {
  .pricing-sheet {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22rem;
    gap: var(--space-7);
    align-items: start;
  }

  .pricing-side .pricing-audit {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
    margin-top: var(--space-5);
    padding: var(--space-5);
    border: var(--rule-hair);
    border-top: var(--rule-ink);
  }

  .pricing-side .pricing-audit .cta-title {
    font-size: var(--text-h3);
  }
}

/* On a phone the 1/3/5 table's .tiers padding needs 337 px against a 326 px box at 360 px
   (measured in Chromium). The cells pad --space-2 a side there, as the miss-cost table's phone
   rule tightens its own (FORGE-564); the figures keep their size. */
@media (max-width: 40rem) {
  .pricing-rates thead th,
  .pricing-rates tbody th,
  .pricing-rates td {
    padding-left: var(--space-2);
    padding-right: var(--space-2);
  }
}

.home-footnote {
  margin: var(--space-4) 0 0;
  max-width: var(--measure-say);
  font-size: var(--text-small);
  line-height: 1.5;
  color: var(--muted);
}

.miss-form {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-4) 0 var(--space-5);
}

.miss-form-label {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-small);
  color: var(--muted);
}

.miss-table {
  max-width: 46rem;
}

/* FORGE-564: on a phone the four columns fit from 360 px up at the default figure, and from
   390 px up at the form's $500,000 cap, where the figures are widest; below that the table
   scrolls, with the multiple reachable (docs/designs/2026-11-06-687-miss-table-phone.md). The
   .tiers padding and figure size would
   need 484 px. This tightens both, and puts row 1's " the subscription" on its own line, small
   and in sans, where "subscription" no longer sets the column's width. The table then needs
   324 px in Linux Chromium and 314 px on Windows, against a 328 px box at 360 px. The row ends
   pad 4 px like every other cell: 8 px left Linux 4 px short at 360 px (owner D4). The heads
   keep --track-label. Below 360 px the table still scrolls, by its own overflow-x below 72rem.
   Nothing here applies above 40rem, and .miss-note has no rule outside this block, so desktop
   renders the note inline as before. */
@media (max-width: 40rem) {
  .miss-table .tiers-head,
  .miss-table .tiers-band,
  .miss-table .tiers-figure {
    padding-left: var(--space-1);
    padding-right: var(--space-1);
  }

  .miss-table .tiers-figure {
    font-size: var(--text-body);
  }

  .miss-table .miss-note {
    display: block;
    font-family: var(--font-sans);
    font-size: var(--text-small);
    font-weight: 400;
    letter-spacing: normal;
    color: var(--muted);
  }
}

.plan-modes,
.proof-blocks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.plan-mode,
.proof-block {
  padding: var(--space-5);
  background: var(--surface);
  color: var(--ink);
  border: var(--border-1) solid var(--divider);
  border-top: var(--rule-ink);
}

.plan-mode-name,
.proof-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.plan-badge {
  padding: 0 var(--space-2);
  border: var(--border-1) solid var(--divider);
  color: var(--muted);
  text-transform: none;
  letter-spacing: normal;
}

.plan-mode-text,
.proof-text {
  margin: var(--space-3) 0 0;
  font-size: var(--text-body);
  line-height: 1.45;
}

/* ── The call to action ───────────────────────────────────────────────────
   A-H09 kept, its treatment dropped. The entry painted this band
   `background: var(--ink); color: var(--paper)` — a text role as a surface and
   a page role as text. Both invert in dark, so the band became a near-white
   full-bleed slab across the bottom of a dark page: louder than the blind
   banner, on a marketing page. A hairline rule and the sanctioned --primary
   fill on the button is the same emphasis without inventing a fourth surface,
   and the guard in tests/unit/palette-contrast.test.js now refuses the
   original in either theme. */

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin-top: var(--space-7);
  padding: var(--space-6) 0;
  border-top: var(--rule-ink);
  background: var(--surface);
  color: var(--ink);
}

.cta-say {
  max-width: 34rem;
}

.cta-title {
  margin: 0;
  font-size: var(--text-h1);
  font-weight: 600;
  letter-spacing: var(--track-close);
  line-height: 1.15;
}

.cta-note {
  margin: var(--space-2) 0 0;
  font-size: var(--text-small);
  color: var(--muted);
}

/* ── The colophon (D-H09) ─────────────────────────────────────────────────
   The position statement is not fine print to be designed away: "detects and
   organises, never auto-applied, not tax advice" IS the product's claim, so it
   gets the foot of the page under a heavy rule, at reading size, with the links
   beneath it rather than above. */

.colophon {
  margin-top: var(--space-7);
  padding-top: var(--space-4);
  border-top: var(--rule-ink);
}

.colophon-note {
  margin: 0;
  max-width: var(--measure-say);
  color: var(--ink);
}

.colophon-links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-5);
  margin: var(--space-4) 0 0;
  max-width: none;
}

.colophon-link {
  color: var(--deep);
}

@media (max-width: 60rem) {
  .home-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
  }

  .run {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-6) var(--space-5);
  }

  .run::before {
    display: none;
  }
}

@media (max-width: 40rem) {
  .run {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ══ The board, as a register ═════════════════════════════════════════════ */

/* ── The statement masthead ───────────────────────────────────────────────
   What this document is, and as of when. The dateline is a definition list
   because that is what it is: three terms and their values, on the day the
   statement was drawn. */

.statement-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-6);
  align-items: start;
  padding-bottom: var(--space-5);
}

.statement-title {
  min-width: 0;
}

/* The heading and the view toggle share a row (round 4, M2), spaced and with nothing drawn
   between them. Where the row runs out of width, the toggle wraps under the heading. */
.title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-5);
}

.statement-title h1 {
  margin: 0;
  letter-spacing: var(--track-close);
}

.statement-kicker {
  margin: 0 0 var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The standing fact about the whole screen: quiet, and never competing with a
   data row. It keeps the prose measure while the page around it does not. */
.page-sub {
  margin: var(--space-3) 0 0;
  max-width: var(--measure-prose);
  font-size: var(--text-small);
  color: var(--muted);
}

.statement-meta {
  margin: 0;
  min-width: 15rem;
  padding-left: var(--space-5);
  border-left: var(--rule-hair);
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  padding: var(--space-2) 0;
  border-bottom: var(--rule-hair);
}

.meta-label {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
}

.meta-value {
  margin: 0;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-small);
  color: var(--ink);
}

/* ── The four standing figures, footed ────────────────────────────────────
   The accountant's footing: a single rule above the total, a double rule
   below it, so the row reads as a CLOSED summary rather than as four widgets.
   These used to be bordered cards, which read as filter pills.

   STICKY, and this strip rather than the whole masthead. The selection is
   explicit that these four figures must not live only in the rail, because a
   readout in a collapsible rail disappears exactly when the screen is small
   enough to need it. Sticking the title and the dateline with them would cost
   a third of a laptop viewport to keep three words that are read once; the
   figures are the sentence the board exists to say, so the figures are what
   stays. Below the phone breakpoint nothing sticks: a header that deep on a
   phone is worse than scrolling to it. */

/* FORGE-677: below the pinned stack while it sticks (app.js measures it; 0px otherwise), so the
   strip no longer paints over the message. */
.figures {
  position: sticky;
  top: var(--pinned-height, 0px);
  z-index: 2;
  margin: 0 0 var(--space-6);
  background: var(--paper);
}

.figures-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* FORGE-623 (R2, ruled A; amended 2026-11-20): the fifth figure, "No rate confirmed", shows only
   when above zero. The row then holds five equal columns on desktop and tablet, so no figure
   wraps onto a row of its own; a phone wraps them 3 + 2 (its strip is not sticky). */
.figures-row-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.rule-single {
  height: 0;
  border-top: var(--rule-ink);
}

.rule-double {
  height: 3px;
  border-top: var(--rule-ink);
  border-bottom: var(--rule-ink);
}

.figure {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-5);
  color: var(--ink);
  text-decoration: none;
  border-left: var(--rule-hair);
}

.figure:first-child {
  padding-left: 0;
  border-left: 0;
}

.figure:hover {
  color: var(--ink);
  background: var(--soft);
}

.figure-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--figure-size);
  font-weight: 600;
  line-height: 1;
  letter-spacing: var(--track-close);
}

.figure-label {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
}

/* FORGE-623 (owner ruling 2026-11-20): the date in "Checked 2026-11" stays whole, so a narrow
   column wraps the label before the date, never at its hyphen. */
.figure-date {
  white-space: nowrap;
}

/* The word in .figure-label carries the meaning; the underline only sorts the
   row at a glance, so a monochrome print loses nothing. */
.figure-ok .figure-value {
  box-shadow: inset 0 -3px 0 0 var(--status-ok);
}

.figure-flagged .figure-value {
  box-shadow: inset 0 -3px 0 0 var(--status-attention);
}

/* ── Stamps: word, shape and fill ─────────────────────────────────────────
   Three independent carriers, so the state survives a monochrome print and a
   colour-blind reader. */

.stamp {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 3px var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-small);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  border: var(--border-1) solid var(--divider);
}

.stamp-ok {
  background: var(--soft);
  color: var(--ink);
  border-color: var(--primary);
}

.stamp-open {
  background: var(--signal);
  /* --on-signal, never --ink: --ink flips light in dark mode and this pairing
     would drop to 1.48. */
  color: var(--on-signal);
  border-color: var(--signal);
}

.stamp-alarm {
  background: var(--alarm-bg);
  color: var(--alarm-fg);
  border-color: var(--alarm-bg);
}

.stamp-quiet {
  background: var(--surface);
  color: var(--muted);
  border-color: var(--divider);
}

.stamp-upcoming {
  background: var(--status-upcoming);
  color: var(--on-status-upcoming);
  border-color: var(--status-upcoming);
}

/* On the alarm field an alarm stamp would vanish into its own banner, so it
   takes the hazard pairing instead: ink on signal yellow, 8.68 in both themes,
   which is the one pairing rule 3 sanctions. */
.hero-blind .stamp-alarm {
  background: var(--signal);
  color: var(--on-signal);
  border-color: var(--on-signal);
}

/* ── Step chips: read-only state inside the register ──────────────────────
   Fill, border style, strike and shape all differ, so the three states are
   still three states in a photocopy. */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 2px var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-small);
  border: var(--border-1) solid var(--divider);
}

.chip-done {
  background: var(--soft);
  color: var(--ink);
  border-color: var(--primary);
}

.chip-pending {
  color: var(--ink);
  border-color: var(--divider);
  box-shadow: inset 3px 0 0 0 var(--signal);
}

.chip-nr {
  color: var(--ink);
  border-style: dashed;
  text-decoration: line-through;
}

/* ── The three board states ───────────────────────────────────────────────
   §E requires the safety empties to be visual opposites: the all-clear is
   affirmative, and blind is a loud warning, never a calm empty. Fill, rail
   weight, stamp and heading all differ between the three, so they are told
   apart at arm's length and in greyscale. */

.hero {
  margin-bottom: var(--space-6);
  padding: var(--space-5);
  border: var(--rule-hair);
}

.hero-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
}

.hero-title {
  margin: 0;
  font-size: var(--text-h2);
  letter-spacing: var(--track-close);
}

/* Work to do: the surface panel with the signal side bar the design system gives a hero. Round 3's
   R9 made it a slim band of chips; the round-3 reconciliation (A8, eng review D2) brought the
   panel back with the boxed count buttons. R9's "Needs a decision" stamp stays retired: the title
   says the open count once. */
.hero-open {
  background: var(--surface);
  border-left: var(--border-4) solid var(--signal);
}

/* Affirmative. --soft's use site, which activates two repo-constraints rules:
   rule 4 (coral on soft is 2.99 — refused at any size) and rule 5 (--muted on
   soft is 4.36 — misses AA). Hence ink, and no coral anywhere in here. */
.hero-clean {
  background: var(--soft);
  color: var(--ink);
  border-color: var(--primary);
  border-left-width: var(--border-4);
}

/* Checking (FORGE-383 R6): no open findings, and this period's check has not covered every
   rooftop yet. Unfinished, not wrong, so it is a quiet panel on the surface with the hairline
   rule and no stamp: never the affirmative fill, and never a signal bar. */
.hero-checking {
  background: var(--surface);
  color: var(--ink);
}

/* The blind state preempts everything (§E: "loud banner"), and it is the only
   fully filled block on the board. --alarm-bg rather than --status-alarm: in
   light the two are the same value, and in dark they deliberately part company
   so this banner stays the loudest object on the page — where loudness is
   separation from the page rather than saturation (#308, R2). */
.hero-blind {
  background: var(--alarm-bg);
  color: var(--alarm-fg);
  border-color: var(--alarm-bg);
  border-left-width: var(--border-4);
}

.hero-blind a {
  color: var(--alarm-fg);
}

/* Changes ahead (#358): a stated date still to come. A quiet panel on the surface with the
   hairline rule, no signal bar: it is information, not a decision, so it never competes with
   the open-work hero above it. Text stays on the page's own ink. */
.hero-ahead {
  background: var(--surface);
  color: var(--ink);
}

.hero-note {
  margin: var(--space-4) 0 0;
  max-width: 52rem;
}

/* FORGE-621 G3: the count line is a panel holding one note, so the note takes no top margin. */
.hero > .hero-note:first-child {
  margin-top: 0;
}

.hero-list {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
}

.hero-item {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3) 0;
  border-top: var(--border-1) solid currentColor;
}

.hero-key {
  min-width: 4rem;
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-detail {
  flex: 1 1 20rem;
}

/* The three count buttons (rooftop-first plan, P5 and review DR8). Off, an ink-on-surface
   button with a divider edge; on, the button fill, so a pressed filter reads as pressed in
   both themes. The rooftop count sits on the smaller line and inherits the button's
   foreground, so it clears AA on the fill as well as off it. */
.counts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-5);
}

/* Boxed and centred, as the spec says (spec:104-105; reconciliation A8, eng review D10): the figure,
   then its label, then the rooftop count, stacked on the button's centre line. */
.count {
  display: grid;
  justify-items: center;
  row-gap: var(--space-1);
  text-align: center;
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  color: var(--ink);
  border: var(--border-1) solid var(--divider);
  text-decoration: none;
}

.count:hover {
  border-color: var(--primary);
}

.count[aria-current="true"] {
  background: var(--btn-bg);
  color: var(--btn-fg);
  border-color: var(--btn-bg);
}

.count-figure {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-h2);
  font-weight: 600;
  line-height: 1;
}

.count-label {
  font-size: var(--text-small);
}

.count-sub {
  font-size: var(--text-small);
}

/* ── The guided journey (#376 (FORGE-431), plan runs 3 and 4) ───────────────
   The queue and the one-rooftop stepper: a third view of the board, so it wears the board's
   own vocabulary and no card chrome (no shadow, no radius, hairlines only). Every colour is a
   ratified token, so the dark palette carries it with no pair of its own: ink, muted and deep
   for text, surface and divider for edges, and the button fill with its label for the
   controls. Never reuses .rr-*, so static/board.js's selectors do not see it. */
.jrn-queue,
.jrn-stepper {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

.jrn-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--rule-hair);
}

.jrn-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: var(--rule-hair);
}

.jrn-body {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}

.jrn-place,
.jrn-line {
  margin: 0;
  color: var(--ink);
}

.jrn-line {
  font-size: var(--text-small);
}

.jrn-label {
  font-weight: 600;
  color: var(--ink);
}

.jrn-city {
  font-size: var(--text-small);
  color: var(--muted);
}

.jrn-title {
  margin: 0;
  font-size: var(--text-h3);
}

.jrn-sep {
  color: var(--muted);
}

.jrn-ahead {
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.jrn-days {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* Start, Prepare and Continue are links drawn as the button fill: nothing is recorded by
   following one, so they are anchors, and the fill darkens on hover rather than fading. */
.jrn-go,
.jrn-continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-height: 36px;
  padding: 0 var(--space-4);
  font: inherit;
  font-size: var(--text-small);
  font-weight: 600;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: var(--border-1) solid var(--btn-bg);
  text-decoration: none;
}

.jrn-go:hover,
.jrn-continue:hover {
  background: var(--btn-bg-hover);
  border-color: var(--btn-bg-hover);
}

/* A bare <p> rule would repaint text inside the fill (the palette guard's cross-rule check). */
.jrn-go p,
.jrn-continue p {
  color: inherit;
}

.jrn-continue {
  width: fit-content;
}

.jrn-step-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.jrn-step {
  display: grid;
  gap: var(--space-3);
  padding-top: var(--space-3);
  border-top: var(--rule-hair);
}

.jrn-responsible,
.jrn-note {
  margin: 0;
  font-size: var(--text-small);
  color: var(--ink);
}

.jrn-back {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 36px;
  font-size: var(--text-small);
  color: var(--deep);
}

/* FORGE-582: the one line under the stepper that says what the board holds and links back to
   it. Quiet by design: the step above it is the page; this is the way back to the board. */
.jrn-board-line {
  max-width: none;
  margin: 0 0 var(--space-4);
  padding-top: var(--space-3);
  border-top: var(--rule-hair);
  font-size: var(--text-small);
  color: var(--muted);
}

.jrn-board-line a {
  color: var(--deep);
}

/* FORGE-586: Step 4's configured-rate offer is a .cc-form, a flex column whose `align-items: end`
   hung it on the right edge under the step buttons. It belongs to the step, so it starts on the
   buttons' left edge. Two classes, because .cc-form comes later in this sheet and a lone
   .jrn-offer would lose to it. Its lines drop the browser's paragraph margins and take the step
   form's gap, so the offer reads as one block with the step above it. */
.jrn-step .jrn-offer {
  align-items: start;
  gap: var(--space-2);
}

.jrn-offer p {
  margin: 0;
}

/* ── A finding, as an entry in the register ───────────────────────────────
   The ink rule opens an entry; the hairlines divide the rows inside it. Two
   weights, deliberately: one weight everywhere makes a register read as a grid
   of equal lines, which is the "six horizontal rules in 300px" the first
   competition's judge marked down. */

.cluster-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entry {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: var(--rule-ink);
}

.entry:first-child {
  margin-top: var(--space-4);
  padding-top: 0;
  border-top: 0;
}

.entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-3) var(--space-4);
  padding-bottom: var(--space-4);
}

.entry-title {
  margin: 0;
  font-size: var(--text-h3);
}

/* What the jurisdiction is, under its name (round 3, R10): "City, CO". */
.entry-scope {
  font-size: var(--text-small);
  color: var(--muted);
}

.entry-rates {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* A figure is mono with tabular numerals wherever it sits (round 3, R13), so a column of rates
   lines up and a rate in a sentence still reads as a figure. */
.rate {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-body);
}

.rate-was {
  color: var(--muted);
  text-decoration: line-through;
}

.rate-now {
  font-weight: 600;
  color: var(--ink);
}

/* Drawn rather than set as an arrow character, for the same reason the marks
   are: the vendored subsets do not carry one. */
.rate-arrow {
  display: inline-block;
  width: 1.1rem;
  height: 0.5rem;
  border-bottom: var(--border-1) solid var(--muted);
  border-right: var(--border-1) solid var(--muted);
  transform: skewX(45deg) translateY(-0.15rem);
}

/* The move is the figure that matters, so it is the only one in a box. */
.delta {
  padding: 1px var(--space-2);
  border: var(--rule-hair);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-small);
  color: var(--deep);
}

.entry-when {
  margin-left: auto;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-small);
  color: var(--muted);
}

/* ── The register itself ──────────────────────────────────────────────────
   Ruled in both directions. The column rules are what make this ledger paper
   rather than a list with lines in it, and `table-layout: fixed` is what puts
   the three step columns on the SAME x in every cluster on the page — three
   registers that each sized themselves would put the same three columns in
   three different places, and a ledger's whole claim is that you can read down
   a column. */

/* The register scrolls inside itself rather than pushing the page sideways,
   and it says so on the side that actually scrolls.

   Four gradients in two pairs, the same construction the app's other wide
   tables use. The `local` covers are anchored to the scrolled CONTENT; the
   `scroll` shadows are anchored to the ELEMENT. At rest a cover sits exactly
   over its shadow and nothing shows; scroll away from an edge and the cover
   travels with the content, uncovering the shadow behind it. So a cue appears
   only on a side that genuinely has more register — a single static fade would
   claim overflow on both edges of a table that fits, which is the same lie as
   no cue at all. The defect it prevents is documented: at 375px a seven-column
   table measured 475px against a 343px viewport with an overlay scrollbar that
   showed nothing until a finger was already dragging, so the row read as
   complete. */
.scroll {
  overflow-x: auto;
  background-image:
    linear-gradient(to right, var(--paper) 50%, transparent),
    linear-gradient(to left, var(--paper) 50%, transparent),
    linear-gradient(to right, var(--divider), transparent),
    linear-gradient(to left, var(--divider), transparent);
  background-position: left center, right center, left center, right center;
  background-repeat: no-repeat;
  background-size:
    var(--space-5) 100%, var(--space-5) 100%,
    var(--space-2) 100%, var(--space-2) 100%;
  background-attachment: local, local, scroll, scroll;
}

/* ── A published roundup (rateroutine-492, design review 2026-10-10) ──────
   The article's own column (3A): `main > p` sets the reading width only for
   direct children, and the body sits one level down, so it carries the measure
   itself. Its prose is --ink, not the --muted every other `p` takes: it is the
   page's content, not a caption to a table. Existing tokens only. */
.article-body {
  max-width: var(--measure-prose);
}

.article-body p,
.article-body li {
  color: var(--ink);
}

/* The closing note is the page's one disclaimer: --ink, never --muted on a
   --soft callout (4.36:1, which fails). */
.article-note {
  color: var(--ink);
}

.article-context {
  margin-bottom: var(--space-2);
  font-size: var(--text-small);
}

/* A model-written title can be one long unbroken string. */
.article-title {
  overflow-wrap: anywhere;
  text-wrap: balance;
}

/* The changes table keeps its table semantics at every width: it is excluded
   from the small-screen `display: block` below, as `.reg` is, and scrolls in
   its own `.scroll` wrapper instead (3C). Its caption is a `<p>` above the
   wrapper, not a `<caption>` inside it (rateroutine-504): a caption is laid
   out at the table's width and was cut mid-sentence at 320px. Outside the
   wrapper it sits on --paper with no scroll shadow under it. */
.article-changes {
  width: 100%;
}

/* rateroutine-504 D2: at 200% zoom "2026-10-01" broke as "2026-10-" / "01". */
.article-date {
  white-space: nowrap;
}

/* rateroutine-504 D1: a jurisdiction name is the row's content, not a column
   label, so it does not take the tracked caps the late `th` rule gives every
   head ("METROPOLITAN" in caps set the column's minimum). It may break
   anywhere as a last resort, as `.article-title` may: the name is fed by a
   scrape and can be one long word, and a broken word beats a rate off-screen. */
.article-changes th[scope="row"] {
  text-align: left;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  overflow-wrap: anywhere;
}

/* rateroutine-504 D1: at 320px the three columns at --space-3 a side still
   measured 306px in a 288px box. At phone widths the cells take --space-2,
   the outer edges drop their outside padding (no vertical rules, so the text
   lines up with the caption and the row rules instead of floating inside
   them), and the column heads drop their tracking: "JURISDICTION" in tracked
   caps was the first column's minimum. */
@media (max-width: 40rem) {
  .article-changes th,
  .article-changes td {
    padding-inline: var(--space-2);
  }

  .article-changes th:first-child,
  .article-changes td:first-child {
    padding-left: 0;
  }

  .article-changes th:last-child,
  .article-changes td:last-child {
    padding-right: 0;
  }

  .article-changes thead th {
    letter-spacing: normal;
  }
}

/* "none on file" is not a figure that was struck out, so it is not drawn as one. */
.rate-none {
  color: var(--muted);
}

/* 56rem, not 48: the three step columns carry the product's own step names, and
   at 48rem `table-layout: fixed` squeezed "Spreadsheet of record" into a cell
   narrower than the words. Sized so the heads fit rather than sized to fit a
   viewport — a register whose column heads overlap has stopped being one. */
.reg {
  width: 100%;
  min-width: 56rem;
  margin: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: var(--text-small);
}

/* The caption carries its own ground, which the rest of the register does not need.
   It sits inside `.scroll`, whose scroll-shadow is a background-IMAGE of four
   gradients, two of them --divider. A background-image is not a background-color,
   so palette-contrast.test.js's "a text role is never a surface" guard cannot see
   it, and a contrast detector reading the caption's first glyphs composites them
   over the shadow: that is #328's 3.8:1, #617072 on #d5dedb, which is --muted on
   --divider. No element there is --divider-filled; the gradient is.

   --paper, because nothing between `body` and the caption paints: neither .section
   nor .cluster-list nor .entry declares a background. Naming it rather than
   inheriting it is what keeps the shadow out from under the text. */
.reg-caption {
  caption-side: top;
  text-align: left;
  padding-bottom: var(--space-2);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
}

.th {
  padding: var(--space-2) var(--space-3);
  border-bottom: var(--rule-ink);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 400;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
}

.th-ref {
  width: 6.5rem;
}

.th-name {
  width: 15rem;
}

.th-closed {
  width: 6rem;
}

.td {
  padding: var(--space-3);
  vertical-align: middle;
  border-bottom: var(--rule-hair);
}

/* The column rules. */
.th + .th,
.td + .td {
  border-left: var(--rule-hair);
}

.td-ref,
.td-step {
  white-space: nowrap;
}

.td-name {
  font-weight: 600;
}

.td-closed {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.of {
  padding: 0 1px;
  color: var(--muted);
}

/* The reading finger. The row tints and the muted cells inside it come back to
   the row's own colour, because --muted on --soft is 4.36 in light and that is
   precisely the bleed rule 5 exists to forbid. */
.tr:hover {
  background: var(--soft);
  color: var(--ink);
}

.tr:hover .ref,
.tr:hover .of {
  color: inherit;
}

/* ── The reference column ─────────────────────────────────────────────────
   Every entry is addressed — CL-7K3-M9Q-TXS, F-…, L-… — in a fixed mono gutter,
   so a printed page can be cited down a phone line. rateroutine-487: a random
   printed reference, no longer a folio of the row's integer key. */

.ref {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* The copy control (R10, R12): in the drawer, on the rooftop page and in the staff
   result only. Rendered hidden; app.js shows it where a clipboard exists. */
.ref-copy {
  margin-left: var(--space-2);
  padding: 0 var(--space-2);
  font-size: var(--text-small);
  line-height: 1.6;
}

.ref-copied {
  margin-left: var(--space-2);
  font-size: var(--text-small);
  color: var(--muted);
}

.work-refs {
  margin: 0 0 var(--space-2);
}

/* The staff reference search (rateroutine-487, plan D9): one box, then its one answer. */
.staff-ref-search {
  margin: var(--space-3) 0;
}

.staff-ref-outcome {
  margin: var(--space-3) 0;
}

/* The staff email log (FORGE-500, plan §5): one table for one-offs and broadcasts, a message's
   facts, and its two parts. The HTML part is a sandboxed srcdoc frame of a fixed height: the
   page's own policy strips the email's inline styles, so what shows is structure and words. */
.staff-email-broadcast td {
  background: var(--card-bg);
}

.staff-email-muted {
  color: var(--muted);
}

.staff-email-note {
  margin: var(--space-3) 0;
  color: var(--muted);
}

.staff-email-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-1) var(--space-4);
  margin: var(--space-3) 0 var(--space-4);
}

.staff-email-tabs {
  display: flex;
  gap: var(--space-4);
  margin: var(--space-4) 0 var(--space-2);
}

.staff-email-text {
  padding: var(--space-3);
  border: var(--rule-hair);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* FORGE-417: what Resend reported for one message, oldest first, one line each. */
.staff-email-events {
  margin: var(--space-2) 0 var(--space-3);
  padding-left: var(--space-4);
}

.staff-email-frame {
  display: block;
  width: 100%;
  height: 32rem;
  border: var(--rule-hair);
  background: var(--surface);
}

/* The staff ticket console (FORGE-516; 3A: no new tokens): the action bar, the soft-lock banner
   and the screenshot. The list and its filters are the shared staff table and filter bar
   (FORGE-575), whose old per-page rules are gone. 8A: under 60rem the
   list scrolls sideways inside its `.scroll` box with reference and summary held in place, so
   the page itself never scrolls sideways. */
.staff-tickets-table {
  margin: 0;
}

/* FORGE-707: the action bar and the lock banner gave way to the action groups and a caution
   notice (the FORGE-707 block at the end of the staff section). */

/* The mailto close's "Open the resolution email": the one prominent link on a closed ticket. */
.staff-tickets-resolution {
  margin: var(--space-3) 0;
  font-size: var(--text-h3);
}

.staff-tickets-shot {
  display: block;
  max-width: 100%;
  height: auto;
  border: var(--rule-hair);
}

@media (max-width: 60rem) {
  /* Only Reference sticks: both columns together (22rem) outrun a 343px phone scroller and
     leave the other columns unreachable. Summary scrolls with them. */
  .staff-tickets-ref {
    position: sticky;
    z-index: 1;
    background: var(--paper);
    left: 0;
    box-sizing: border-box;
    min-width: 10rem;
    max-width: 10rem;
  }

  .staff-tickets-summary {
    min-width: 12rem;
  }
}

/* ── The work drawer ──────────────────────────────────────────────────────
   Every control on this page lives in here, and @media print takes it away.
   The register above is the document; this is the desk it sits on, and a
   statement does not have buttons on it. */

.work {
  margin-top: var(--space-4);
  border-top: var(--rule-hair);
}

.work-summary {
  padding: var(--space-3) 0;
  font-family: var(--font-mono);
  font-size: var(--text-small);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--deep);
  cursor: pointer;
  list-style: none;
}

.work-summary::-webkit-details-marker {
  display: none;
}

.work-summary::before {
  content: "+ ";
}

.work[open] .work-summary::before {
  content: "- ";
}

/* The keyboard triage in static/board.js moves this marker with j/k. It has to
   be a border rather than a fill: the drawer is the focus target, and painting
   it would make the page's quietest object its loudest. */
.kbd-focused {
  border-top-color: var(--primary);
  box-shadow: inset 3px 0 0 0 var(--primary);
}

.work-body {
  display: grid;
  gap: var(--space-5);
  padding: var(--space-4) 0 var(--space-5);
}

.work-row {
  display: grid;
  gap: var(--space-3);
  padding-left: var(--space-4);
  border-left: var(--border-3) solid var(--divider);
}

.work-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-3);
  margin: 0;
  font-weight: 600;
  color: var(--ink);
}

.work-steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* The secondary register: outlined in the hairline, not filled. One filled
   control per decision — twelve rooftops render dozens of step controls and
   one primary action, and if every control is filled none of them reads as
   the action. */
.btn-step {
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  border-color: var(--divider);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--text-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.btn-step:hover {
  background: var(--soft);
  border-color: var(--primary);
  color: var(--ink);
}

/* Round 3, R7: a change's steps are one form. One "Also mark done for" row of ticks, then the
   step buttons on one row, each posting to its own step. */
.steps-form {
  display: grid;
  gap: var(--space-3);
  justify-items: start;
}

.also-done {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-size: var(--text-small);
}

.also-done legend {
  float: left;
  margin-right: var(--space-2);
  padding: 0;
  font-size: var(--text-small);
  font-weight: 600;
}

/* Dismiss is last and least prominent (round 3, R7): a closed disclosure in plain small text,
   and inside it an outline button, never the filled danger button. */
.rr-dismiss {
  margin-top: var(--space-2);
}

.rr-dismiss > summary {
  font-size: var(--text-small);
  color: var(--ink);
  text-decoration: underline;
  cursor: pointer;
}

.btn-quiet {
  background: var(--surface);
  border-color: var(--divider);
  color: var(--ink);
}

/* Hover shows through the edge alone. The background is restated because the bare
   `button:hover` (0,1,1) outranks `.btn-quiet` (0,1,0) and would otherwise fill the button with
   --btn-bg-hover behind ink text (FORGE-685). */
.btn-quiet:hover {
  background: var(--surface);
  border-color: var(--primary);
}

.verify-form {
  display: grid;
  gap: var(--space-4);
  padding-top: var(--space-4);
  border-top: var(--rule-hair);
  justify-items: start;
}

.verify-head {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-small);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.verify-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--space-4);
  width: 100%;
}

/* ── The empty register, which is an affirmative and not a blank ──────────
   An empty board is the product working. It used to render as the bare
   sentence "No open findings." where a list of entries would be, which reads
   as a fetch that failed. */

.empty-state {
  padding: var(--space-5);
  background: var(--card-bg);
  border: var(--rule-hair);
  border-left: var(--border-4) solid var(--primary);
}

.empty-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
}

.empty-title {
  margin: 0;
  font-size: var(--text-h3);
}

.empty-body {
  margin: var(--space-4) 0 0;
  max-width: 50rem;
}

.empty-state-note {
  margin: var(--space-3) 0 0;
  font-size: var(--text-small);
  color: var(--muted);
}

/* FORGE-606: /monitoring-off is the empty-state panel with a quiet edge. On the board the --primary
   edge means "settled", and an organization whose monitoring is off is not. The h1 keeps the page
   size: it is the page's only heading, not a block title. */
.empty-state-off {
  border-left-color: var(--divider);
}

.empty-state-off .empty-head h1 {
  margin: 0;
}

.empty-org {
  font-size: var(--text-small);
  color: var(--muted);
}

@media (max-width: 40rem) {
  /* At phone width the head stacks: the stamp above the heading, the organization's name below. */
  .empty-state-off .empty-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Notices and the agent intake ─────────────────────────────────────────
   Unreviewed machine output inside a compliance product. Making it look calm
   would be the design lying, so it gets a labelled panel of its own rather
   than a paragraph in the flow. */

.notice {
  padding: var(--space-4);
  border: var(--rule-hair);
}

.notice-warn {
  background: var(--soft);
  color: var(--ink);
  border-left: var(--border-4) solid var(--signal);
}

.notice-label {
  margin: 0 0 var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
}

.notice-text {
  margin: 0;
  max-width: 52rem;
}

.intake {
  list-style: none;
  margin: var(--space-5) 0 0;
  padding: 0;
}

.intake-item {
  padding: var(--space-4) 0;
  border-top: var(--rule-hair);
}

.intake-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
  margin: 0;
  color: var(--ink);
}

.intake-juris {
  font-weight: 600;
}

.intake-when {
  font-family: var(--font-mono);
  font-size: var(--text-small);
  color: var(--muted);
}

.intake-source {
  margin: var(--space-2) 0 0;
  font-size: var(--text-small);
}

/* ── The statement footer ─────────────────────────────────────────────────
   The position statement and a text wordmark with the date. Text, not the SVG
   the rest of the product uses, because this is the half that prints: a filed
   page needs to say what it is and when it was drawn. */

/* A hairline, not an ink rule (round 3, R16): opening rules and totals keep the ink, and a
   boundary inside the statement does not compete with them. */
.statement-foot {
  margin-top: var(--space-7);
  padding-top: var(--space-4);
  border-top: var(--rule-hair);
}

.statement-mark {
  margin: var(--space-4) 0 0;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
}

.statement-sep {
  padding: 0 var(--space-2);
}

/* A container that sets its own foreground must keep it, and `p { color:
   var(--muted) }` above does not respect that: a bare element rule beats
   inheritance, so every <p> inside a filled block is repainted --muted
   regardless of what the block decided.

   That was not cosmetic when it shipped. The blind banner's body is a bare <p>
   inside `role="alert"`, so the product's loudest message composited --muted on
   --urgent at 1.09:1 in light. .hero-clean was the same bug at 4.36 on --soft —
   the exact pairing rule 5 forbids, in --soft's only use site, while the design
   doc stated that text was --ink at 12.66.

   Some of the containers below never contain a <p> today. They are listed
   anyway, because the guard in tests/unit/palette-contrast.test.js is
   deliberately blind to nesting: reasoning about which container "could not"
   hold a paragraph is exactly how the original bug survived two reviews. */
.hero-clean p,
.hero-clean p small,
.hero-blind p,
.hero-blind p small,
.flash p,
.flash p small,
.entitlement-banner p,
.maintenance-banner p,
.outcome p,
.notice-warn p,
.stamp-ok p,
.stamp-open p,
.stamp-alarm p,
.stamp-upcoming p,
.count[aria-current="true"] p,
.seg[aria-current="page"] p,
.show-chip:has(input:checked) p,
.chip-done p,
.btn-primary p,
.btn-primary:hover p,
.nav-cta p,
.nav-cta:hover p,
.btn-step:hover p,
.figure:hover p,
.hero-blind .stamp-alarm p,
.tr:hover p {
  color: inherit;
}

/* ══ THE ROOFTOP VIEW (rooftop-first plan, run 6) ══════════════════════════
   One register line per rooftop, read status, rooftop, rate first. Not a card: no radius,
   no shadow, no fill, only the hairline under each row, so a hundred rooftops read down the
   page the way a hundred register lines do.

   THE ROW IS ONE LINK WITHOUT SCRIPT. The name's ::after stretches over the whole row, so
   anywhere on it opens the rooftop. static/board.js wires a row that has a Review (.rr-wired,
   round 3, R4): the stretch goes and a row click opens Review instead. Review is a native <details> placed on the row's second grid line, full
   width; its summary is lifted into the row's last column, and it and the open body sit above
   the stretched link, so neither a click on Review nor one inside its forms ever navigates. */

/* THE SEGMENTED CONTROL (round 3, R2 and R3). Joined segments in the count buttons'
   vocabulary: surface and a divider edge at rest, the button fill when on. The on state is
   read from aria-current (every segment is a link that navigates; reconciliation A1), so
   the fill never carries the state alone. Shared by the board's view toggle and the Rooftops
   state filter. */
.view-toggle,
.seg-group {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
}

.seg {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin: 0;
  padding: 0 var(--space-4);
  font: inherit;
  font-size: var(--text-small);
  font-weight: 500;
  line-height: 1;
  background: var(--surface);
  color: var(--ink);
  border: var(--border-1) solid var(--divider);
  border-radius: 0;
  text-decoration: none;
  cursor: pointer;
}

.seg + .seg {
  margin-left: calc(-1 * var(--border-1));
}

.seg:hover {
  position: relative;
  border-color: var(--primary);
}

.seg[aria-current="page"] {
  position: relative;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border-color: var(--btn-bg);
}

.filter-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3) 0;
  font-size: var(--text-small);
  border-bottom: var(--rule-ink);
}

.filter-what {
  color: var(--ink);
}

.filter-notice {
  flex: 1 1 24rem;
  color: var(--ink);
}

/* A control, not a destination: it keeps --deep when visited (rateroutine-500). */
.close-all {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--text-small);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--deep);
}

/* ── Board aids: the two disclosures that explain the list ─────────────────
   The keyboard legend (#325 (FORGE-388)) and the status key (#327 (FORGE-390)).
   Both sit above the list, shut, and cost one line until someone wants them —
   round 3's R9 was taking density OUT of this screen, and an aid that arrives as
   a panel spends what that bought. No radius, no shadow, no resting fill.

   `.board-aid` carries the summary chrome for both. app.css already repeats that
   shape three times (.rr-dismiss, .rr-again, .rr-add-source); two more copies
   would make five. Those three are deliberately NOT folded in here: they are
   signed off in rounds 3 and 4 and re-proving them is a cleanup of its own.

   Each aid class still owns a rule below. A class the pages emit with no rule of
   its own fails the every-class-has-a-rule guard — that is round 4's D7, where a
   .juris wrapper failed for exactly this reason. */
.board-aids {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-3) var(--space-5);
  margin-top: var(--space-5);
}

.board-aid {
  max-width: var(--measure-app);
}

.board-aid > summary {
  font-family: var(--font-mono);
  font-size: var(--text-small);
  letter-spacing: 0.08em;
  color: var(--ink);
  text-decoration: underline;
  cursor: pointer;
}

.kbd-legend {
  margin: 0;
}

/* The same two-column definition list as the status key: term, then what it does.
   A <kbd> is the element the content actually is, so it needs a rule of its own —
   the UA draws it in whatever monospace the OS offers, at a size the rest of the
   sheet never uses. */
.kbd-list {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--space-2) var(--space-4);
  margin: var(--space-3) 0 0;
}

.kbd-term {
  margin: 0;
}

.kbd-does {
  margin: 0;
  font-size: var(--text-small);
  color: var(--muted);
}

.kbd {
  display: inline-block;
  padding: 0 var(--space-1);
  border: var(--border-1) solid var(--divider);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  color: var(--ink);
  white-space: nowrap;
}

.status-key {
  margin: 0;
}

.status-key-group {
  margin-top: var(--space-3);
}

.status-key-head {
  margin: 0 0 var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
}

/* A definition list, not a table: the pairing is the content, and it reads in a
   screen reader whether the disclosure is open or shut. #327 rules out a title=
   tooltip for the same reason — unreachable on touch, unreliable in AT. */
.status-key-list {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--space-2) var(--space-4);
  margin: 0;
}

.status-key-term {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}

.status-key-def {
  margin: 0;
  font-size: var(--text-small);
  color: var(--muted);
}

.rr-empty {
  margin: 0;
  padding: var(--space-5) 0;
  color: var(--ink);
}

.rr-list {
  display: grid;
}

.rr {
  position: relative;
  /* A row opened by its fragment (/?open=X#r-X) lands below the sticky figures strip, not
     under it (found in the round-3 renders). */
  scroll-margin-top: 7rem;
  display: grid;
  grid-template-columns:
    var(--key-channel) minmax(0, 2fr) minmax(0, 1.6fr) minmax(0, 1.6fr) 3.5rem 3rem 6.5rem;
  grid-template-areas: "mark name rate change steps age .";
  column-gap: var(--space-3);
  align-items: start;
  padding: var(--space-3) 0;
  border-bottom: var(--rule-hair);
}

.rr:has(.rr-link:focus-visible) {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.rr-link:focus-visible {
  outline: 0;
}

.rr-mark {
  grid-area: mark;
  justify-self: center;
  margin-top: 0.35rem;
}

.rr-name {
  grid-area: name;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  min-width: 0;
}

/* FORGE-643: the stamp's word wraps inside the name column rather than running into the rate
   cell. At tablet width "Rate not confirmed" and "First reading in review" are wider than the
   column; a word that fits stays on one line. */
.rr-name .stamp {
  white-space: normal;
}

/* The name reads as a link at rest (reconciliation A2): a row click opens Review (round 3, R4),
   so only the name goes to the rooftop page, and it has to say so without a hover. */
.rr-link {
  font-weight: 600;
  color: var(--deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.rr-link .go-arrow {
  margin-left: var(--space-1);
}

.rr-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* Round 3, R4: static/board.js wires a row that has a Review, so a click on the row opens it.
   The stretch goes, the name stays a link to the rooftop page, and the row says it is clickable. */
.rr-wired {
  cursor: pointer;
}

.rr-wired .rr-link::after {
  content: none;
}

/* The name thickens under its own pointer only (round 4, M1): a row click opens Review, so a
   row-wide hover on the name would promise the wrong destination. An unwired row (Verified, or no
   script) IS one link over the whole row, so there the row's own hover still answers for it. */
.rr-link:hover,
.rr:not(.rr-wired):hover .rr-link {
  text-decoration-thickness: 2px;
}

.rr-place {
  font-size: var(--text-small);
  color: var(--muted);
}

/* Dashed, because nobody has established it: the same "gap in the reading" the hollow
   ring says, as an edge. */
.rr-announced {
  padding: 0 var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--text-small);
  color: var(--ink);
  border: var(--border-1) dashed var(--divider);
}

.rr-rate {
  grid-area: rate;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

/* FORGE-411 Collection Check: the configured-rate line, on the board row and the Locations
   table, and the inline form that sets it. */
.cc-line {
  font-size: var(--text-small);
  color: var(--ink);
}

.cc-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--space-1);
  margin-top: var(--space-1);
}

/* FORGE-621 C3: the next step beside a settled difference on Locations, above the quiet Mark button.
   FORGE-679 (D1): the daily taxable sales estimate, under the line and above C3, is set the same
   way, so the cell keeps one size, one colour and one left edge. No new token. */
.cc-next,
.cc-estimate {
  margin: var(--space-1) 0 0;
  font-size: var(--text-small);
  color: var(--ink);
}

/* FORGE-621 G5: the date a figure was marked as intended never breaks at its hyphens. */
.cc-date {
  white-space: nowrap;
}

/* FORGE-680 (FORGE-676 design 8.2, 8.3, 8.6): the Locations Collection Check cell. One left
   edge: the line, C3, the action row and the open form all start at the column head's edge.
   Layout only, on existing tokens; no colour, font or size is added. Every rule is scoped to
   the cell (.cc-cell, .cc-actions, .cc-edit), so the board journey's step-4 offer, which is a
   .cc-form jrn-offer, does not move (FORGE-586).

   The cell is positioned so the `.vh` text inside it (absolutely positioned) belongs to the
   table's own scroll box below 72rem; with the page as its containing block, the column's
   off-screen labels widened the whole page on a phone (review R1). */
td.cc-cell {
  position: relative;
}

/* The line is shared with the board; only here does it take its own block and balance its
   wrap, so "matches the published general rate" does not orphan "rate" (L19, FORGE-769 W2). */
td.cc-cell .cc-line {
  display: block;
  text-wrap: pretty;
}

/* Room for the action row on one line ("Record configured rate" and "Remove the mark" are
   345 px together), so a decision row is one button-height taller than a calm row, not two.
   Above 40rem only: below it FORGE-682's records take the full width. */
@media (min-width: 40rem) {
  td.cc-cell {
    min-width: 22rem;
  }
}

/* The opener first, then Mark or Remove (owner ruling Q1). */
.cc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.cc-actions:first-child {
  margin-top: 0;
}

.cc-actions > form {
  margin: 0;
}

/* Open, the disclosure takes the whole action row, so its form sits under the opener and Mark
   or Remove moves below Save. */
.cc-edit[open] {
  flex-basis: 100%;
}

/* The opener is a native <summary> wearing .btn-quiet, which gives it the fill, edge and ink
   (design review, Pass 5). This adds only what a summary lacks next to a button: the box, the
   pointer, the focus ring, the open-state edge, and no disclosure triangle. inline-block, not
   flex: one line of text needs nothing flex gives, and WebKit has ignored flex on a summary
   (review R2). */
.cc-edit > summary {
  display: inline-block;
  list-style: none;
  padding: var(--space-2) var(--space-3);
  border: var(--border-1) solid var(--divider);
  border-radius: var(--radius-1);
  cursor: pointer;
}

.cc-edit > summary::-webkit-details-marker {
  display: none;
}

.cc-edit[open] > summary {
  border-color: var(--primary);
}

.cc-edit > summary:focus-visible {
  outline: var(--border-3) solid var(--field-border-focus);
  outline-offset: 2px;
}

/* The visible name follows the state: "Record configured rate" closed, "Close" open (PC1, PC2). */
.cc-edit:not([open]) .cc-close,
.cc-edit[open] .cc-open {
  display: none;
}

/* The open form: under its opener, on the same left edge, tied to it by a hairline (L8), with
   its labels above inputs sized to the answer (L7). */
.cc-edit .cc-form {
  align-items: flex-start;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding-left: var(--space-3);
  border-left: var(--rule-hair);
}

.cc-edit .cc-form label {
  width: 100%;
}

.cc-edit input[name="rate"] {
  width: 8rem;
}

.cc-edit input[name="daily_taxable_sales"] {
  width: 12rem;
}

/* FORGE-681 (FORGE-676 8.4): a refused save marks the input the service named, in the alarm
   colour .field-error's bar already uses. */
.cc-edit input[aria-invalid="true"] {
  border-color: var(--status-alarm);
}

/* FORGE-681 (L10): after Save, Mark or Remove the page lands on the row's anchor. The sort can
   move the row that changed, so the landed row is picked out with the surface fill. */
tr:target > td {
  background: var(--surface);
}

/* ── FORGE-682: the Locations tables as records on a phone (FORGE-676 8.5, 8.7, 8.8) ─────────
   Owner direction 2: below 40rem each row of both Locations tables is a record, on FORGE-575's
   .staff-stack mechanics. Above 72rem the table is a table; from 40rem to 72rem it is a table
   inside its own .scroll box (the 72rem rule excludes .loc-stack). DOM order is unchanged and no
   CSS `order` is used, so reading and focus order are what is seen (L15). Existing tokens only. */

/* The table now sits in its own .scroll box, which starts a new block formatting context, so the
   table's top margin no longer collapses into the paragraph above it and the desktop page grew by
   16 px. The paragraph's own margin spaces it, as the collapsed pair did; the bottom keeps its
   margin, so the page below the table is where it was. */
table.loc-stack {
  margin: 0 0 var(--space-4);
}

@media (max-width: 40rem) {
  table.loc-stack,
  table.loc-stack tbody {
    display: block;
  }

  /* Hidden from sight, kept for assistive technology: the same clip as .vh. */
  table.loc-stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  /* A record: the head line, then one field to a line, with a hairline between records. */
  table.loc-stack tr {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: var(--space-2);
    padding: var(--space-3) 0;
    border-bottom: var(--rule-hair);
  }

  /* An amber row keeps its left bar, inset from it. */
  table.loc-stack tr.amber {
    padding-left: var(--space-3);
  }

  table.loc-stack td {
    display: block;
    flex-basis: 100%;
    padding: 2px 0;
    border: 0;
  }

  /* A labelled field: a 7rem mono-caps label, generated from data-label, and its value (one span,
     staff-shared.js `cell()`). 7rem, not .staff-stack's 6rem, holds "CHECKED AS OF" on one line.
     The label's alt text is empty, so a cell's name is not read twice; a browser that does not
     understand the alt-text form keeps the plain declaration and still shows it (review U1). */
  table.loc-stack td[data-label] {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    gap: var(--space-2);
    overflow-wrap: anywhere;
  }

  table.loc-stack td[data-label]::before {
    content: attr(data-label);
    content: attr(data-label) / "";
    padding-top: 2px;
    font-family: var(--font-mono);
    font-size: var(--text-label);
    letter-spacing: var(--track-label);
    text-transform: uppercase;
    color: var(--muted);
  }

  /* The head line (8.7, 8.8): the name, and on the monitored table the Resolution word and the
     State, small and muted, with a generated "·" that is not read. The name wraps anywhere, so a
     long unbroken one cannot push the record sideways (review O1). */
  table.loc-stack td.loc-name,
  table.loc-stack td.loc-head {
    display: block;
    flex-basis: auto;
    min-width: 0;
  }

  table.loc-stack td.loc-name::before,
  table.loc-stack td.loc-head::before {
    content: none;
  }

  table.loc-stack td.loc-name {
    overflow-wrap: anywhere;
    font-weight: 600;
    padding-bottom: var(--space-1);
  }

  table.loc-stack td.loc-head {
    padding: 0;
    font-size: var(--text-small);
    color: var(--muted);
  }

  table.loc-stack td.loc-head + td.loc-head::before {
    content: "·";
    content: "·" / "";
    margin-right: var(--space-2);
  }

  /* The Collection Check field takes the record's full width, its label above it (L14). */
  table.loc-stack td.cc-cell {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-1);
    padding: var(--space-2) 0;
  }

  /* A reader's empty field is not drawn (L16, PC7). It is clipped like .vh, never display: none,
     so it keeps its column and the fields after it keep their headers (review O2). */
  table.loc-stack td.cc-cell:empty {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
  }

  /* Its controls are full width and 44 px tall (L24): the action row becomes a column. */
  table.loc-stack .cc-actions {
    display: grid;
  }

  table.loc-stack .cc-edit > summary,
  table.loc-stack .cc-actions button {
    width: 100%;
    min-height: 44px;
    text-align: center;
  }

  table.loc-stack .cc-edit .cc-form label,
  table.loc-stack .cc-edit input {
    width: 100%;
  }

  table.loc-stack .cc-edit input {
    min-height: 44px;
  }
}

/* FORGE-680 (L18): every date in a Locations row stays on one line, as G5's .cc-date does. */
.loc-date {
  white-space: nowrap;
}

/* FORGE-678 (design 6.1, 6.2). The Locations action line: quiet buttons and the
   setup checklist as a plain link, in one wrapping row between the heading and the pills. A link
   wearing .btn-quiet gets the box the Collection Check opener gets on its <summary> (FORGE-680),
   so the two read as the same kind of control. No new colour, size or token. */
.loc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin: var(--space-3) 0;
  max-width: var(--measure-app);
}

.loc-actions a.btn-quiet {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  border: var(--border-1) solid var(--divider);
  border-radius: var(--radius-1);
  text-decoration: none;
}

.loc-actions a.btn-quiet:focus-visible {
  outline: var(--border-3) solid var(--field-border-focus);
  outline-offset: 2px;
}

/* The add form: one column, a label above its input, the hint quiet under the key, and the
   billing block read before the button. */
.loc-form label {
  display: block;
  margin-top: var(--space-3);
}

.loc-form input,
.loc-form select {
  display: block;
  width: 100%;
}

/* FORGE-753 (design 3.3, N11, eng review C3): a lone field takes the form's reading measure, so it ends
   where a row of fields ends. A date keeps its 24rem: a field is as wide as its answer. */
.loc-form input[type="date"] {
  max-width: 24rem;
}

.loc-form .field-hint {
  margin: var(--space-1) 0 0;
  max-width: 40rem;
  font-size: var(--text-small);
  color: var(--muted);
}

.loc-form .loc-billing {
  margin-top: var(--space-4);
}

.loc-form-actions {
  margin-top: var(--space-4);
}

/* FORGE-753 (Q2 C; design 3.3, eng review C1, C2): short fields that belong together share a row from
   40rem up: City, State and ZIP, and an equal pair. Each field and its error line sit in one .field
   cell, a flex column with the form's own gap, so an error sits as far from its field as in a column.
   Below 40rem both wrappers are display: contents, so the form is exactly the one column it was. The
   State and ZIP tracks fit today's labels; FORGE-613 narrows them when it shortens the labels. */
.field-row,
.field {
  display: contents;
}

@media (min-width: 40rem) {
  .field-row {
    display: grid;
    gap: 0 var(--space-3);
    align-items: start;
  }

  .field {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-width: 0;
  }

  .field-row-city {
    grid-template-columns: minmax(0, 1fr) 8rem 7rem;
  }

  .field-row-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* FORGE-678 PR 3 (design 6.1, 6.3, 6.4). The Not monitored word beside a row's name, small and
   muted as the head line's Resolution word is, kept on one line. */
.loc-standing {
  font-size: var(--text-small);
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}

/* The location page's who-and-when line, and the rate changes listed on it and on a confirm. */
.loc-who {
  font-size: var(--text-small);
  color: var(--muted);
}

.loc-changes {
  padding-left: var(--space-4);
}

/* A confirm page's form: the action's own button and the way back, read last (design 6.4). */
.loc-confirm {
  margin-top: var(--space-4);
}

.loc-change + .loc-change {
  margin-top: var(--space-2);
}

.loc-change .reopen-form,
.loc-change .rr-dismiss {
  margin-top: var(--space-1);
}

/* Below 40rem the action line's two buttons and the form's button are full width and 44 px tall,
   FORGE-682's rule for a record's controls (L24). */
@media (max-width: 40rem) {
  .loc-actions a.btn-quiet {
    flex-basis: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .loc-form input,
  .loc-form select {
    max-width: none;
    min-height: 44px;
  }

  .loc-form-actions button {
    width: 100%;
    min-height: 44px;
  }
}

.rr-rates {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.rate-after {
  font-weight: 600;
  color: var(--ink);
}

.rr-when {
  font-size: var(--text-small);
  color: var(--muted);
}

/* An unstated or overdue date is said in ink: it is the one line on the row that asks the
   operator to act on what it says. */
.rr-when-unstated,
.rr-when-overdue,
.rr-norate {
  font-size: var(--text-small);
  color: var(--ink);
}

.rr-change {
  grid-area: change;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-2);
  font-size: var(--text-small);
}

.rr-juris {
  color: var(--ink);
}

/* A JURISDICTION IS A PLACE AND ITS LEVEL (round 4, M5). The name takes weight in ink; the level
   is the tracked mono caps label the column heads and the row's Steps and Open labels use. No box
   and no fill, so it never reads as a status stamp or as a control. */
.juris-name,
.rb-rates .td-juris {
  font-weight: 600;
  color: var(--ink);
}

.juris-level,
.rb-rates .td-level {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.juris-level {
  margin-left: var(--space-1);
}

/* ONE COLUMN TEMPLATE FOR EVERY ROOFTOP'S RATE TABLE (rateroutine-329). Each block draws its own
   table, and under `table-layout: auto` each sized its columns from its own names, so Now, After
   and Status sat at a different x in every block and nobody could read down the page. Fixed
   layout plus the colgroup rateTable() emits puts them on one x: every table is the same width
   and carries the same template.

   The min-width is the `.reg` lesson (see its comment): fixed layout squeezes whatever it is
   given, so the floor is the fixed columns (7 + 2 × 8.5 + 13 = 37rem) plus 12rem the
   jurisdiction name always keeps, and below that the table scrolls in its `.scroll` box.
   design-system.test.js holds the floor to that sum, not to a literal. */
.rb-rates {
  table-layout: fixed;
  min-width: 49rem;
}

/* Takes the rest: whatever the fixed columns leave goes to the name. */
.rb-col-juris {
  width: auto;
}

/* "DISTRICT" and its padding; the level never wraps. */
.rb-col-level {
  width: 7rem;
}

/* A figure on one line; "no rate on file" may take two (eng review D4). */
.rb-col-rate {
  width: 8.5rem;
}

/* "needs verification" on one line; the foot's overdue date line wraps at its spaces. */
.rb-col-status {
  width: 13rem;
}

/* Jurisdiction names are customer data. Under fixed layout an unbroken token wider than its cell
   would paint over Level rather than widen the column, so the name may break anywhere. Its own
   rule, so the shared `.juris-name` above is not widened with it. */
.rb-rates .td-juris {
  overflow-wrap: anywhere;
}

.rr-more {
  color: var(--muted);
}

.rr-steps,
.rr-age {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-small);
}

.rr-steps {
  grid-area: steps;
}

.rr-age {
  grid-area: age;
  color: var(--muted);
}

/* A cell's label, for the phone row only (round 3, R11): hidden where columns line the figures up. */
.rr-cell-label {
  display: none;
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-variant-numeric: normal;
}

.rr-review {
  grid-column: 1 / -1;
  grid-row: 2;
}

.rr-review-toggle {
  position: absolute;
  z-index: 1;
  top: var(--space-3);
  right: 0;
  min-width: 6.5rem;
  padding: var(--space-1) var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-small);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--deep);
  background: var(--surface);
  border: var(--border-1) solid var(--divider);
  cursor: pointer;
  list-style: none;
}

.rr-review-toggle::-webkit-details-marker {
  display: none;
}

/* Open, the toggle quietens to a muted edge and draws a chevron for its state (round 3, R16);
   --primary is left to focus. */
.rr-review[open] > .rr-review-toggle {
  border-color: var(--muted);
}

.rr-review[open] > .rr-review-toggle::after {
  content: "";
  display: inline-block;
  width: 0.35rem;
  height: 0.35rem;
  margin-left: var(--space-2);
  border-right: var(--border-1) solid var(--deep);
  border-bottom: var(--border-1) solid var(--deep);
  transform: rotate(-135deg) translateY(-0.05rem);
}

/* Hovering a wired row lights REVIEW, because that is what a click there opens (round 4, M1).
   Not over the name, another control, or an open Review's body: a click on those does something
   else, and static/board.js ignores them in ROW_CONTROLS. The exclusions are chained rather than
   one :has(a, b, c), so the selector carries no comma for the stylesheet tests to split on (eng
   review D4). The open toggle is named because its muted edge is (0,3,0) and would outrank a plain
   hover (eng review D8). */
.rr-review-toggle:hover,
.rr-review[open] > .rr-review-toggle:hover,
.rr-wired:hover:not(:has(a:hover)):not(:has(button:hover)):not(:has(.rr-review-body:hover)) .rr-review-toggle {
  border-color: var(--primary);
}

.rr-review-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-5);
  padding: var(--space-4) 0 var(--space-3) var(--key-channel);
}

.rr-change-block {
  display: grid;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: var(--rule-hair);
}

.rr-change-block:first-child {
  padding-top: 0;
  border-top: 0;
}

.rr-change-head {
  margin: 0;
  font-size: var(--text-body);
}

/* The drawn arrow is skewed, so in running text it needs room either side or it sits on the
   struck-through old rate (found in the round-3 renders). */
.rr-change-head .rate-arrow,
.rb-item-head .rate-arrow,
.rb-line .rate-arrow {
  margin: 0 var(--space-2);
}

.rr-evidence {
  margin: 0;
}

/* What RateRoutine read, as labelled fields (round 3, R15), and each gap on a line of its own. */
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: var(--space-2) var(--space-4);
  margin: var(--space-2) 0 0;
}

.evidence-field {
  display: grid;
  gap: 2px;
}

.evidence-field dt {
  font-size: var(--text-small);
  color: var(--muted);
}

.evidence-field dd {
  margin: 0;
  font-size: var(--text-small);
  color: var(--ink);
}

.evidence-gap {
  margin: var(--space-2) 0 0;
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--ink);
}

.rr-waiting {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
}

/* RateRoutine's answer to a report, set apart as a quotation from the other side. */
.rr-reply {
  margin: 0;
  padding-left: var(--space-3);
  font-size: var(--text-small);
  color: var(--ink);
  border-left: var(--border-3) solid var(--primary);
}

.rr-check,
.rr-note {
  margin: 0;
  font-size: var(--text-small);
  color: var(--ink);
}

.rr-again > summary {
  font-size: var(--text-small);
  color: var(--deep);
  cursor: pointer;
}

.reopen-form {
  margin: 0;
}

/* A failed verify's error, beside the field it concerns (review DR3). Said in words and marked
   with the alarm edge, so it never rests on colour, and --urgent stays a fill and an edge,
   never text. The field points at it with aria-describedby. */
/* "Add another source": optional, so it stays collapsed until asked for, and opens itself
   when the link typed there was refused. */
.rr-add-source > summary {
  font-size: var(--text-small);
  color: var(--deep);
  cursor: pointer;
}

.field-error {
  margin: 0;
  padding-left: var(--space-2);
  font-size: var(--text-small);
  color: var(--ink);
  border-left: var(--border-3) solid var(--status-alarm);
}

/* ══ THE ROOFTOPS PAGES (rooftop-first plan, run 7) ═══════════════════════
   Information only: they read, and the board is where the work happens. A block is a ruled
   register section, never a card (design review, Pass 4): a hairline under each, no radius,
   no shadow, no resting fill. The name link stretches over the block so the whole block is
   one target; every other link in it sits above that target. Hover lightens the fill to
   --surface, which keeps --muted text at AA where --soft would not (rule 5). */

.rooftops-controls {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

/* The state segments and the search share the first row (round 4, M4). The row holds the open
   box's height while the box is shut, so clicking the glass moves nothing below it: an input is
   16px of text at 1.5, plus --space-2 above and below, plus its hairline. */
.controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  min-height: 2.625rem;
}

/* SEARCH IS A GLASS THAT OPENS A BOX (round 4, M4). A native <details>, so it opens with no
   script; the box belongs to the filter form through form=. The glass is drawn, for the reason
   .go-arrow is: the vendored subsets carry no glyph. */
/* A row, not a disclosure stack: a <details> lays its content out under the summary, which put
   the box below the glass and pushed the page down (the owner saw it on the live board). */
.search-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* The summary is the target; the lens is drawn inside it at a fixed size, so a 44px phone target
   does not inflate the glass with it (the round-4 render caught that). */
.search-glass {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  cursor: pointer;
  list-style: none;
}

.search-glass::-webkit-details-marker {
  display: none;
}

.search-glass::before {
  content: "";
  width: 0.85rem;
  height: 0.85rem;
  border: var(--border-1) solid var(--deep);
  border-radius: 50%;
}

.search-glass::after {
  content: "";
  position: absolute;
  right: 0.3rem;
  bottom: 0.3rem;
  width: var(--border-1);
  height: 0.4rem;
  background: var(--deep);
  transform: rotate(-45deg);
}

.search-toggle[open] > .search-glass::before {
  border-color: var(--primary);
}

.search-field {
  width: 100%;
  max-width: 18rem;
}

/* The box grows from the glass rightwards, and only when a click opened it: a search that is
   running renders open and marked, so the slide answers the click rather than replaying on every
   results page (eng review D3). */
@keyframes search-open {
  from {
    clip-path: inset(0 100% 0 0);
  }

  to {
    clip-path: inset(0);
  }
}

.search-toggle[open]:not([data-opened]) .search-field {
  animation: search-open 160ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .search-toggle[open]:not([data-opened]) .search-field {
    animation: none;
  }
}

/* One GET form: the Show chips, the hidden fields and Apply (round 3, R3; the search box moved
   out to the row above in round 4, M4, and stays in this form through form=). static/app.js
   submits it when a chip changes and hides Apply; without script, Apply stays. */
.rooftops-search {
  display: grid;
  gap: var(--space-3);
  justify-items: start;
}

.rooftops-search > label {
  width: 100%;
  max-width: 24rem;
}

.show-chips {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}

.show-chips legend {
  float: left;
  margin-right: var(--space-2);
  padding: 0;
  font-size: var(--text-small);
  font-weight: 600;
}

/* A toggle, not the read-only .chip: a bordered target whose tick carries its state, with the
   soft fill only as a second signal. */
.show-chip {
  flex-direction: row;
  align-items: center;
  gap: var(--space-2);
  min-height: 36px;
  padding: 0 var(--space-3);
  font-size: var(--text-small);
  color: var(--ink);
  background: var(--surface);
  border: var(--border-1) solid var(--divider);
  cursor: pointer;
}

.show-chip:hover {
  border-color: var(--primary);
}

.show-chip:has(input:checked) {
  background: var(--soft);
  color: var(--ink);
  border-color: var(--primary);
}

.apply[hidden] {
  display: none;
}

.rooftops-count {
  margin: var(--space-5) 0 0;
  padding-bottom: var(--space-3);
  font-size: var(--text-small);
  color: var(--muted);
  border-bottom: var(--rule-ink);
}

/* FORGE-639: the list's check filter, named above the count line in the board figure's words.
   Two items in a wrapping row, the shape of the board's .filter-line: what is filtered, then the
   way out. The separator lives in the second item, which moves to the next line whole, so a wrap
   never starts a line with it. Ink, not the count line's muted, because it changes what the list
   below means. */
.rooftops-filtered {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  /* About one space, so the gap before the separator matches the space after it. */
  gap: 0 var(--space-1);
  margin: var(--space-5) 0 0;
  font-size: var(--text-small);
  color: var(--ink);
}

.rooftops-filtered-what {
  min-width: 0;
}

.rooftops-filtered-clear {
  white-space: nowrap;
}

/* Only the date stays whole, as on the figure (.figure-date): the labels wrap. */
.rooftops-filtered-date {
  white-space: nowrap;
}

/* The caption and the count line read as one head. */
.rooftops-filtered + .rooftops-count {
  margin-top: var(--space-2);
}

/* .rb-empty has no margin, so under the caption it needs one. */
.rooftops-filtered + .rb-empty {
  margin-top: var(--space-3);
}

/* minmax(0, 1fr), not the implicit auto track (rateroutine-329, eng review R6): a grid item's
   automatic minimum is its min-content width, so the rate table's 49rem floor would widen the
   block, and the page with it, instead of scrolling inside its `.scroll` box. */
.rb-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.rb {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-4) 0;
  border-bottom: var(--rule-hair);
}

/* Hover marks the block with a primary channel just outside its left edge (round 3, R1), the
   channel the board's Review body sits on. It replaced a surface fill with a mint tint on
   every rate row beneath it, which the owner read as an unnatural highlight. Outside, because
   the status mark sits flush against the block's edge. */
.rb::before {
  content: "";
  position: absolute;
  top: var(--space-3);
  bottom: var(--space-3);
  left: calc(-1 * var(--space-3));
  width: 3px;
  background: transparent;
}

.rb:hover::before {
  background: var(--primary);
}

/* A rate row inside a rooftop is not a target of its own, so it takes no reading finger. */
.rb-rates .tr:hover {
  background: none;
}

.rb:hover .rb-link {
  text-decoration: underline;
}

.rb:has(.rb-link:focus-visible) {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.rb-link:focus-visible {
  outline: 0;
}

.rb-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-3);
}

.rb-name {
  display: flex;
  flex: 1 1 20rem;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
  min-width: 0;
}

.rb-link {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.rb-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.rb a:not(.rb-link) {
  position: relative;
  z-index: 1;
}

/* The rate table's scroll box sits above the stretched link too (reconciliation, eng review D6):
   on a phone the table is wider than the column, and a swipe on it has to reach the scroll box,
   not the link. A click on the table no longer opens the rooftop page; the name still does. */
.rb .scroll {
  position: relative;
  z-index: 1;
}

.rb-place {
  font-size: var(--text-small);
  color: var(--muted);
}

/* No status, said as a word: an unmonitored or inactive rooftop is never an alert. Dashed,
   like the announced marker, because nothing about it is being watched. */
.rb-standing {
  padding: 3px var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-small);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  border: var(--border-1) dashed var(--divider);
}

/* Resolve wears the board's Review toggle (round 3, R3), so "go and do the work" has one shape
   on both surfaces. Still a link: the Rooftops pages record nothing. */
.rooftop-back {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-small);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--deep);
  background: var(--surface);
  border: var(--border-1) solid var(--divider);
  text-decoration: none;
}

/* Back wears Resolve's outline (round 4, M3), so "leave this page" and "go do the work" share one
   shape, and its chevron is the drawn arrow turned to point the other way. */
.rb-resolve {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  padding: var(--space-1) var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-small);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--deep);
  background: var(--surface);
  border: var(--border-1) solid var(--divider);
  text-decoration: none;
}

.rb-resolve:hover,
.rooftop-back:hover {
  border-color: var(--primary);
}

/* An action, not a destination: it keeps --deep when visited (rateroutine-500). */
.rooftop-edit {
  white-space: nowrap;
  color: var(--deep);
}

/* Drawn, for the reason .rate-arrow is: the vendored subsets carry no arrow glyph. */
.go-arrow {
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-left: var(--space-2);
  border-top: var(--border-1) solid var(--deep);
  border-right: var(--border-1) solid var(--deep);
  transform: rotate(45deg) translateY(-0.1rem);
}

/* Back's chevron is the same drawn arrow, turned the other way (round 4, M3). Declared AFTER
   .go-arrow: both are (0,1,0), so the later rule wins, and declared first it still pointed
   forward. The round-4 render caught that; a test now pins the order. */
.go-arrow-back {
  margin-left: 0;
  margin-right: var(--space-2);
  transform: rotate(-135deg) translateY(-0.1rem);
}

/* A rate in the table is a figure (round 3, R13): mono, with tabular numerals, so the column lines up. */
.rb-rates .td-rate {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* The total is footed the way the board's figures are: an ink rule above it. */
.rb-rates tfoot .td {
  font-weight: 600;
  border-top: var(--rule-ink);
}

.rb-section {
  display: grid;
  gap: var(--space-2);
}

.rb-section-head {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
}

/* A rooftop's lines (round 3, R6): one per moving change or note, above its rate table, which
   carries the total (reconciliation A3). */
.rb-lines {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.rb-line {
  font-size: var(--text-small);
  color: var(--ink);
}

.rb-line-note {
  color: var(--ink);
}

.rb-items {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.rb-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
  padding-top: var(--space-2);
  font-size: var(--text-small);
  border-top: var(--rule-hair);
}

.rb-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.rb-item-head,
.rb-also,
.rb-empty {
  color: var(--ink);
}

.rb-settled {
  font-family: var(--font-mono);
  font-size: var(--text-small);
  color: var(--ink);
}

.rb-checks {
  flex-basis: 100%;
  margin: 0;
  padding-left: var(--space-4);
  color: var(--ink);
}

.rb-empty {
  margin: 0;
  font-size: var(--text-small);
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-4);
}

/* Previous and next: the pages shift, so a visited page link is stale. It keeps
   --deep (rateroutine-500). */
.pager a {
  color: var(--deep);
}

.rooftop-head {
  margin-bottom: var(--space-4);
}

.rooftop-standing {
  align-self: center;
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink);
}

.rooftop-status {
  /* A <p>, so the prose measure would stop it short and Resolve would sit mid-line. */
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
}

@media (max-width: 60rem) {
  .statement-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .statement-meta {
    padding-left: 0;
    padding-top: var(--space-3);
    border-left: 0;
    border-top: var(--rule-ink);
  }

  /* Two up. The column rule belongs between the pair, not beside the first of
     each row, so the first-child rule is re-drawn on nth-child here. */
  .figures-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .figure {
    padding-left: var(--space-5);
    border-left: var(--rule-hair);
  }

  .figure:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .figure:nth-child(n+3) {
    border-top: var(--rule-hair);
  }

  /* FORGE-623 (R2): five in one row here too, so the two-up rules are undone for it. */
  .figures-row-five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .figures-row-five .figure:nth-child(odd) {
    padding-left: var(--space-5);
    border-left: var(--rule-hair);
  }

  .figures-row-five .figure:first-child {
    padding-left: 0;
    border-left: 0;
  }

  .figures-row-five .figure:nth-child(n+3) {
    border-top: 0;
  }
}

/* FORGE-643: the tablet strip is sticky and two-up (four figures), or five across with a
   four-line label, 127 to 154 px tall, which is deeper than the desktop 7rem. A row opened by
   its fragment clears it here. The range is the exact complement of the phone query below,
   whose strip is not sticky, so the phone keeps its offset. */
/* FORGE-677: a landed board row clears the pinned stack and the strip pinned below it. */
.rr:target {
  scroll-margin-top: calc(7rem + var(--pinned-height, 0px));
}

@media (47.99rem < width <= 60rem) {
  .rr {
    scroll-margin-top: 10.5rem;
  }

  .rr:target {
    scroll-margin-top: calc(10.5rem + var(--pinned-height, 0px));
  }
}

@media (max-width: 47.99rem) {
  /* A sticky strip this deep on a phone is worse than scrolling back to it. And the four
     figures sit on one compact line rather than four stacked rows (review DR9): the standing
     sentence, read in one glance, before the list starts. The labels wrap under their
     figures; the 60rem query's two-up rules are reset here. */
  .figures {
    position: static;
  }

  .figures-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .figure,
  .figure:nth-child(odd),
  .figure:nth-child(n+3) {
    padding: var(--space-2) var(--space-2) var(--space-2) 0;
    border-left: 0;
    border-top: 0;
  }

  /* FORGE-623 (R2, amended by the owner 2026-11-20): on a phone five columns left the labels
     touching, so the five figures wrap 3 + 2. The 60rem rules for five are reset as for four. */
  .figures-row-five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .figures-row-five .figure,
  .figures-row-five .figure:nth-child(odd),
  .figures-row-five .figure:nth-child(n+3) {
    padding: var(--space-2) var(--space-2) var(--space-2) 0;
    border-left: 0;
    border-top: 0;
  }

  .figure-value {
    font-size: var(--text-h3);
  }

  .figure-label {
    letter-spacing: 0.06em;
  }

  .outcomes {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Top to bottom (round 3, R11): name, rate, change, then steps beside age on one labelled
     line, then the Review bar. */
  .rr {
    grid-template-columns: var(--key-channel) auto minmax(0, 1fr);
    grid-template-areas:
      "mark name name"
      ". rate rate"
      ". change change"
      ". steps age";
    column-gap: var(--space-3);
    row-gap: var(--space-2);
  }

  .rr-review {
    grid-row: 5;
  }

  .rr-cell-label {
    display: inline;
  }

  .rr-review-toggle {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 44px;
  }

  .rr-review-body {
    padding-left: 0;
  }

  .counts {
    grid-template-columns: minmax(0, 1fr);
  }

  .count {
    min-height: 44px;
  }

  .seg {
    min-height: 44px;
  }

  /* The journey's queue card stacks: the place and summary, then a full-width 44px bar. */
  .jrn-card {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
  }

  .jrn-go,
  .jrn-continue,
  .jrn-back {
    min-height: 44px;
  }

  .jrn-go {
    width: auto;
  }

  .search-glass {
    width: 44px;
    height: 44px;
  }

  .search-toggle[open] {
    flex: 1 1 12rem;
  }

  .show-chip {
    min-height: 44px;
  }

  .rb-resolve,
  .pager a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  /* ── A 44px target for every control on a phone (#326 (FORGE-389)) ──────
     122 of the 136 controls in the board's `main` measured under 44px at 375px,
     and 9 of 23 on /rooftops. A compliance lead checking a change from a store
     floor misses taps, or opens the wrong thing.

     SCOPED TO `.app-shell main`, WHICH IS THE PRODUCT PLANE AND ONLY IT.
     app.css is one sheet for three planes; html.js wraps <main> in .app-shell
     only under layout({ rail: true }), which board.js's page(), rooftops.js and
     billing.js set and auth.js, onboarding.js and content.js do not. Bare
     element rules here would silently resize /login, /signup and every
     onboarding step — screens this branch never renders, and that #320
     (FORGE-384) is about to redesign.

     44px is platform guidance, not the AA bar: WCAG 2.5.8 asks 24x24 and
     exempts a target "in a sentence or block of text". Links inside a sentence
     are therefore left alone on purpose — growing them would push the line they
     sit in apart or overlap the lines around them, which misroutes taps rather
     than fixing them. design-system.test.js keeps the exemption list, so each
     one is a decision on the record. */
  .app-shell main input,
  .app-shell main select,
  .app-shell main textarea,
  .app-shell main button {
    min-height: 44px;
  }

  /* <summary> is display: list-item, so min-height applies with no display
     change — which matters, because setting `display: flex` here would strip
     the disclosure marker off every one of them. */
  .app-shell main summary {
    min-height: 44px;
  }

  /* A checkbox's tick is 13px and will never be the target; its LABEL is.
     Declared after the generic `label:has(> input[type="checkbox"])` rule that
     makes it a row, so this adds a height rather than re-stacking it. */
  .app-shell main label:has(> input[type="checkbox"]) {
    min-height: 44px;
  }

  /* An inline box IGNORES min-height, so each of these takes the display that
     makes the declaration mean something. A rule that set the height alone
     would read as correct and do nothing, which is the shape of both faults the
     round-4 render caught.

     `.close-all` carries `:not([hidden])` because static/board.js toggles it
     with `link.hidden`, and `[hidden] { display: none }` is a UA rule that ANY
     author display beats. Without the guard, "Close all" would sit over an
     empty board on every phone, closing nothing. The sheet already carries
     `.apply[hidden]` for exactly this reason. */
  .app-shell main .close-all:not([hidden]),
  .app-shell main .rr-link,
  .app-shell main .rb-link,
  .app-shell main .rooftop-back {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  /* Already a flex column, so it needs the height and nothing else. */
  .app-shell main .figure {
    min-height: 44px;
  }

  /* Two links that carry no class and are not in a sentence: the evidence strip's
     "the official source", which is the value of a labelled field, and the agent
     notice's "source the agent read", which is a paragraph holding only a link.
     Both measured 16px at 375px, under even WCAG 2.5.8's 24px AA bar, so neither
     is an inline exemption — a <dd> holding one link is not prose.

     Found in the render, not by the source guard. Both are classless, so the
     guard skipped them (a classless control has to be reached by a bare-element
     rule, and a bare `a` rule would hit every prose link in the product). That
     split is the one D11 set up on purpose: the source guard catches drift, the
     browser proves the box. This is the browser doing its half. */
  .app-shell main .evidence-field dd a,
  .app-shell main .intake-source a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  /* /locations' filter pills and the "N open" links in its table cells, both at 20px.
     These are the round-2 shell screens that #320 (FORGE-384) will redesign, and they
     are in reach of every rule above because `.app-shell main` is the whole product
     plane (D5). Sizing a target is not a design change: it leaves what these screens
     say and how they are laid out for #320 to settle, and stops shipping a 20px tap
     target in the meantime. Found by broadening the render matrix to all eight
     reachable screens (D9), which is the only reason anyone looked at them. */
  .app-shell main .filter-pills a,
  .app-shell main td a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  /* FORGE-678 (design 6.1): the Locations action line. Its quiet buttons and its Setup checklist
     link are each a 44px target here; below 40rem the two buttons also take the full width (the
     FORGE-682 rule beside .loc-actions). */
  .app-shell main .loc-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .app-shell main .loc-actions a.btn-quiet {
    min-height: 44px;
  }

  /* lone-link (#348): a link alone on its line, not inside a sentence. The classless
     standalone links the #338 render had not reached: the Announced source line on a
     rooftop's page, both links on /billing/done, a claimed /snapshot's subscribe link and
     /settings' export link. Named by a class rather than by where they sit, so the source
     guard sees them and a sentence's link can never pick the rule up by accident. */
  .app-shell main .lone-link:not([hidden]) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  /* Both aid lists stack: the term above its definition, not beside it. Found in the
     375px render — the two-column grid left each definition in a ~130px column breaking
     to four words a line. Readable, but not something anyone reads, which is the whole
     point of the glossary. */
  .status-key-list,
  .kbd-list {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-1);
  }

  .status-key-term,
  .kbd-term {
    margin-top: var(--space-2);
  }
}

/* ══ Harvested craft (#309, round 1) ══════════════════════════════════════
   Details the five competition entries found that the first markup pass did
   not use. Recovered from the candidate stylesheets rather than reinvented. */

/* Every figure on an evidence screen is monospaced. A rate column read down
   the page is the product's primary object; proportional digits make it a
   sentence. Two entries reached this independently. */
td,
th {
  font-variant-numeric: tabular-nums;
}

/* Table heads as a register label rather than bold body copy: the column name
   is chrome, and the data under it is the content. */
th {
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: var(--space-2);
}

/* ── Print ─────────────────────────────────────────────────────────────────
   A customer files these screens as evidence, and a customer whose browser is
   in dark mode would otherwise print white type on white paper — the ink is
   light in dark mode and the printer does not paint the background.

   --on-signal is the one role that is dark in BOTH themes, which is exactly
   why it is the safe foreground here. Surfaces are forced white, and the
   status rails stay because they are borders, which print.

   The rail, the work drawer and the footer wordmark all go. The first two are
   chrome and controls; the third goes because <picture> follows the visitor's
   operating system when it prints, so a dark-mode visitor would file signal
   yellow on white paper at 1.57. The statement footer carries the name as
   text, which is what survives. */
@media print {
  /* #fff literally, not var(--surface): --surface is theme-dependent and is
     DARK in dark mode, so "force a light background" would have forced a dark
     one — 1.13:1 against --on-signal, caught by the guard. White is the one
     hex sanctioned outside :root and this is precisely the case it exists for. */
  body {
    background: #fff;
    color: var(--on-signal);
  }

  .nav,
  .app-rail,
  .page-foot,
  .work,
  .rr-review,
  .close-all,
  .ref-copy,
  .ref-copied,
  .view-toggle {
    display: none;
  }

  .hero,
  .empty-state,
  .stamp,
  .chip,
  .notice,
  .reading,
  .tiers,
  .outcome,
  .plan-mode,
  .proof-block,
  .cta-band,
  .auth-card {
    background: #fff;
    color: var(--on-signal);
  }

  .ref,
  .th,
  .of,
  .rate-was,
  .rate-now,
  .delta,
  .entry-when,
  .page-sub,
  .statement-kicker,
  .meta-label,
  .meta-value,
  .figure-label,
  .empty-state-note,
  .notice-label,
  .statement-mark,
  .reg-caption,
  .intake-when {
    color: var(--on-signal);
  }

  .td,
  .th,
  .figure,
  .delta,
  .intake-item,
  .hero-item {
    border-color: var(--on-signal);
  }

  .entry,
  .hero,
  .intake-item {
    break-inside: avoid;
  }
}

/* rateroutine-519 (eng review R6): the price change report, printed or saved to PDF from the
   browser. Its forms and links are controls, not record, so print drops them. */
.price-report {
  max-width: 60rem;
}

.price-report-account {
  margin-top: 1.5rem;
}

@media print {
  .no-print {
    display: none;
  }

  .price-report table {
    break-inside: avoid;
  }
}

/* The Help dialog (FORGE-516). layout() renders it on signed-in pages; app.js opens it with
   showModal() and the Help link is a plain link to /help without script. Existing tokens only
   (3A): the form controls, buttons and labels are the app's own. No `display` on the dialog
   itself, so a closed one stays closed. Desktop: centred, at most 40rem, scrolling inside
   itself. Under 60rem (6A): full screen, with the footer held at the bottom. */
.help-dialog {
  box-sizing: border-box;
  width: calc(100% - var(--space-6));
  max-width: 40rem;
  max-height: calc(100vh - var(--space-6));
  overflow: auto;
  padding: var(--space-5);
  border: var(--border-1) solid var(--divider);
  border-radius: var(--radius-2);
  background: var(--surface);
  color: var(--ink);
}

.help-dialog h2 {
  margin-top: 0;
  font-size: var(--text-h3);
}

/* label{display:flex} would otherwise beat the UA's [hidden] rule, so the script's reveal
   (removing `hidden`) is the only thing that shows a capture control. */
.help-dialog [hidden],
[data-help-form] [hidden] {
  display: none;
}

/* Scoped to the form, not the dialog: /help shows the same form with no dialog round it. The
   dialog's own Cancel sits outside the form, so it is named too. The fieldset's min-content floor
   would otherwise let a long line of markup or a wide screenshot push the page sideways on a
   phone, and the element box wraps its one long line instead of widening. */
.help-dialog button,
[data-help-form] button,
[data-help-form] input:not([type="checkbox"], [type="radio"]),
[data-help-form] textarea {
  min-height: 2.75rem;
}

[data-help-form] fieldset {
  min-width: 0;
}

[data-help-form] [data-help-element-view] {
  max-height: 12rem;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

[data-help-form] [data-help-shot-preview] {
  max-width: 100%;
  height: auto;
  border: var(--border-1) solid var(--divider);
}

.help-dialog-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--space-4);
  padding: var(--space-3) 0;
  background: var(--surface);
}

@media (max-width: 60rem) {
  .help-dialog {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    border: 0;
    border-radius: 0;
    /* No bottom padding: the sticky footer sits at the scrollport edge, so the page does not
       show through a strip below it. */
    padding-bottom: 0;
  }

  .help-dialog-footer {
    position: sticky;
    bottom: 0;
    border-top: var(--border-1) solid var(--divider);
  }
}

/* The step recorder's bar (FORGE-516, spec §5.3). layout() renders it hidden on signed-in pages
   and app.js shows it while a recording runs. 3A tokens: the flash's --signal ground and
   --on-signal text (pinned dark in both themes), --space-3 padding, --text-body. 6A: fixed to the
   top on desktop and to the bottom under 60rem, above the phone rail panel; the page makes the
   same room while it shows, and the sticky flash, figures and rail panel sit clear of it. Every
   control is at least 44px tall.
   The bar's height is fixed so the room the page makes always covers it, whatever text a stopped
   recording or the picker puts in it: one row on desktop (4.25rem), and on phones the text row
   above the buttons row (6.5rem). Text that would not fit is cut with an ellipsis, never wrapped. */
.help-recording-bar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 40;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  box-sizing: border-box;
  height: calc(2.75rem + 2 * var(--space-3));
  padding: var(--space-3);
  overflow: hidden;
  background: var(--signal);
  color: var(--on-signal);
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

.help-recording-bar [data-help-bar-text] {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.help-recording-bar[hidden] {
  display: none;
}

/* The bare p rule paints --muted, which fails on --signal; the bar keeps its own pairing. */
.help-recording-bar p {
  color: inherit;
}

.help-recording-actions {
  display: flex;
  flex: none;
  flex-wrap: nowrap;
  gap: var(--space-3);
}

.help-recording-actions button {
  min-height: 2.75rem;
  white-space: nowrap;
}

/* FORGE-692: the bar's buttons (Stop and send report; the picker's Use this and Cancel) are drawn
   in the bar's ink, as the staff banner's are: the filled button is 1.30:1 against --signal in
   dark. A disabled Use this keeps the app's disabled treatment, its strike and outline. */
.help-recording-bar button:not([disabled]) {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}

.help-recording-bar button:not([disabled]):hover {
  background: transparent;
  border-color: currentColor;
  box-shadow: inset 0 0 0 var(--border-1) currentColor;
  text-decoration: underline;
}

body:has(> .help-recording-bar:not([hidden])) {
  padding-top: calc(2.75rem + 2 * var(--space-3));
}

body:has(> .help-recording-bar:not([hidden])) .flash,
body:has(> .help-recording-bar:not([hidden])) .pinned {
  top: calc(2.75rem + 2 * var(--space-3));
}

/* FORGE-677 (outside review C2): the strip pins below the bar and the stack together, and a
   fragment landing clears both. */
body:has(> .help-recording-bar:not([hidden])) .figures {
  top: calc(2.75rem + 2 * var(--space-3) + var(--pinned-height, 0px));
}

body:has(> .help-recording-bar:not([hidden])) :target:not(.rr) {
  scroll-margin-top: calc(2.75rem + 2 * var(--space-3) + var(--pinned-height, 0px));
}

/* The wide desktop's sticky rail panel. */
@media (min-width: calc(15.5rem + 72rem + 2rem)) {
  body:has(> .help-recording-bar:not([hidden])) .rail-panel {
    top: calc(2.75rem + 2 * var(--space-3));
    min-height: calc(100vh - 2.75rem - 2 * var(--space-3));
  }
}

/* The open rail panel below the wide desktop is fixed under the rail bar, which the page's room
   has pushed down by the bar's height. */
@media (max-width: 89.49rem) {
  body:has(> .help-recording-bar:not([hidden])) .app-rail[open] .rail-panel {
    top: calc(3.1rem + 2.75rem + 2 * var(--space-3));
  }
}

@media (max-width: 60rem) {
  .help-recording-bar {
    top: auto;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    height: calc(var(--text-body) * var(--leading-body) + 2.75rem + 3 * var(--space-3));
  }

  .help-recording-actions {
    justify-content: center;
  }

  body:has(> .help-recording-bar:not([hidden])) {
    padding-top: 0;
    padding-bottom: calc(var(--text-body) * var(--leading-body) + 2.75rem + 3 * var(--space-3));
  }

  body:has(> .help-recording-bar:not([hidden])) .flash,
  body:has(> .help-recording-bar:not([hidden])) .pinned {
    top: 0;
  }

  body:has(> .help-recording-bar:not([hidden])) .figures {
    top: var(--pinned-height, 0px);
  }

  body:has(> .help-recording-bar:not([hidden])) :target:not(.rr) {
    scroll-margin-top: var(--pinned-height, 0px);
  }

  /* On phones the bar is at the bottom: the open rail panel stops above it. */
  body:has(> .help-recording-bar:not([hidden])) .app-rail[open] .rail-panel {
    top: 3.1rem;
    bottom: calc(var(--text-body) * var(--leading-body) + 2.75rem + 3 * var(--space-3));
  }
}

/* The element picker's outline (FORGE-516, spec §5.4, 3A): app.js moves the class to what the
   mouse is over, what has focus, or what a thumb tapped, so it is a class and never style="". It
   also wins over a focused control's own focus ring, so the outline reads the same however it
   got there. While picking, the bar holds the one line and Use this / Cancel in its actions row,
   which on a phone is the second of its two fixed rows. */
.help-pick-hover,
.help-pick-hover:focus-visible {
  outline: 2px solid var(--deep);
  outline-offset: 2px;
}

/* FORGE-428: the Terms of Service and Privacy Policy (src/web/legal-copy.js), the GA footer links,
   and the acceptance line under the signup and create-organization buttons. */
.legal { max-width: 72ch; }
.legal h2 { margin-top: var(--space-6); }
.legal li { margin-bottom: var(--space-2); }
.legal-meta { color: var(--muted); }
.footer-links a { margin: 0 var(--space-1); }
.form-note { color: var(--muted); margin-top: var(--space-3); }

/* ── Staff console shell (FORGE-575 PR 1) ─────────────────────────────────
   docs/designs/2026-11-07-715-staff-console.md §3. Every staff page renders through
   staffPage() in src/web/pages/staff-shared.js: the "← Staff home" link, the breadcrumb, the
   h1. The dashboard's work tiles, the alert badge (an alert, never part of a link's name), the
   filter bar, the record table (.staff-stack lists stack into records below 40rem; registers keep
   the contained scroll) and the site index. Tokens only. */

/* ── Header: back link, breadcrumb, main-destination row, title ─────────── */
.staff-head {
  margin: 0 0 var(--space-5);
}

.staff-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
  margin: 0 0 var(--space-3);
  font-size: var(--text-small);
}

.staff-home {
  font-weight: 600;
  color: var(--deep);
}

.staff-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.staff-crumbs li + li::before {
  content: "/";
  margin-right: var(--space-2);
  color: var(--muted);
}

.staff-title {
  margin: 0;
}

.staff-lede {
  margin: var(--space-2) 0 0;
  max-width: var(--measure-say);
  color: var(--muted);
}

/* ── Alert badge: a count that is not part of a link's name ─────────────── */
.staff-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  padding: 1px var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-small);
  font-weight: 600;
  line-height: 1.4;
  border: var(--border-1) solid transparent;
  border-radius: var(--radius-1);
}

.staff-badge-alarm {
  background: var(--alarm-bg);
  color: var(--alarm-fg);
}

.staff-badge-attention {
  background: var(--signal);
  color: var(--on-signal);
}

.staff-badge-alarm p,
.staff-badge-alarm small,
.staff-badge-attention p,
.staff-badge-attention small {
  color: inherit;
}

.staff-badge-clear {
  background: var(--surface);
  color: var(--muted);
  border-color: var(--divider);
  font-weight: 400;
}

/* ── Dashboard: work tiles, status strip, directory ─────────────────────── */
.staff-work {
  /* beats main > ul's prose measure: the tiles use the app measure */
  max-width: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: var(--space-3);
  margin: var(--space-3) 0 var(--space-6);
  padding: 0;
  list-style: none;
}

.staff-work-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--card-bg);
  border: var(--rule-hair);
  border-left: var(--border-4) solid var(--divider);
}

.staff-work-alarm {
  border-left-color: var(--status-alarm);
}

.staff-work-attention {
  border-left-color: var(--status-attention);
}

.staff-work-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
}

.staff-work-name {
  margin: 0;
  font-size: var(--text-h4);
}

.staff-work-line {
  margin: 0;
  font-size: var(--text-small);
  color: var(--muted);
}

.staff-work-act {
  margin: auto 0 0;
  font-size: var(--text-small);
}

.staff-status {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: var(--space-3) var(--space-5);
  margin: var(--space-3) 0 var(--space-6);
  padding: var(--space-4) 0;
  border-top: var(--rule-hair);
  border-bottom: var(--rule-hair);
}

.staff-status div {
  margin: 0;
}

.staff-status dt {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
}

.staff-status dd {
  margin: var(--space-1) 0 0;
}

/* FORGE-421 Run 1: the authenticator setup page. The key and the URI are typed or pasted, so they
   read as code and wrap anywhere rather than push a phone layout sideways. */
.staff-totp-steps {
  margin: var(--space-3) 0 var(--space-5);
}

.staff-totp-steps li {
  margin: 0 0 var(--space-3);
}

.staff-totp-secret,
.staff-totp-uri {
  display: block;
  margin: var(--space-2) 0 0;
  font-family: var(--font-mono);
  overflow-wrap: anywhere;
}

.staff-totp-secret {
  font-size: var(--size-300);
  letter-spacing: var(--track-label);
}

/* FORGE-421 Run 1 PR 1b: /staff/team. Each change is its own small form with the step-up beside
   it; on a phone the fields stack and fill the card. */
.staff-team-form {
  display: grid;
  gap: var(--space-3);
  margin: 0 0 var(--space-4);
  max-width: 36rem;
}

.staff-team-form label {
  display: grid;
  gap: var(--space-1);
}

.staff-team-form fieldset {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-3);
  border: var(--border-1) solid var(--divider);
  border-radius: var(--radius-1);
}

.staff-team-invite {
  margin-bottom: var(--space-6);
}

.staff-team-set {
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: var(--space-2);
}

.staff-team-set .staff-sub {
  display: block;
}

.staff-stepup {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: var(--space-3);
}

.staff-team-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

.staff-directory {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: var(--space-4) var(--space-5);
  margin: var(--space-3) 0 var(--space-6);
}

.staff-directory h3 {
  margin: 0 0 var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
}

.staff-directory ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.staff-directory li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) 0;
  border-bottom: var(--rule-hair);
}

/* The reference box on the dashboard: field and button on one line. */
form.staff-ref-search {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--space-2);
}

/* ── Filter bar ─────────────────────────────────────────────────────────── */
form.staff-filters {
  max-width: none;
  flex-direction: row;
  justify-content: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  align-items: end;
  margin: var(--space-3) 0 var(--space-3);
  padding: var(--space-3);
  background: var(--card-bg);
  border: var(--rule-hair);
}

.staff-filters-clear {
  align-self: center;
  font-size: var(--text-small);
}

.staff-count {
  margin: var(--space-3) 0 var(--space-2);
  font-size: var(--text-small);
  color: var(--muted);
}

/* ── Record table ───────────────────────────────────────────────────────── */
.staff-table {
  margin: 0 0 var(--space-4);
  background: var(--surface);
}

.staff-table th {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
  white-space: nowrap;
}

.staff-when {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.staff-nowrap {
  white-space: nowrap;
}

.staff-sub {
  display: block;
  font-size: var(--text-small);
  color: var(--muted);
}

.staff-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.staff-group-row th {
  padding-top: var(--space-4);
  background: var(--paper);
  border-top: var(--rule-ink);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink);
  font-weight: 600;
  white-space: normal;
}

.staff-group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  align-items: center;
  margin-top: var(--space-2);
  font-weight: 400;
}

.staff-row-alarm td:first-child {
  box-shadow: inset var(--border-3) 0 0 0 var(--status-alarm);
}

.staff-more > summary {
  font-size: var(--text-small);
  color: var(--deep);
  text-decoration: underline;
  cursor: pointer;
}

.staff-more[open] > summary {
  margin-bottom: var(--space-2);
}

/* A register that scrolls (not .staff-stack) keeps each value on one line, so a row stays one
   line tall and the block scrolls instead; a long free-text cell opts back into wrapping. */
.staff-table:not(.staff-stack) td {
  white-space: nowrap;
}

.staff-table td.staff-wrap {
  min-width: 16rem;
  white-space: normal;
}

.staff-act {
  white-space: nowrap;
}

/* Importance: the word carries it; the edge repeats it. */
.staff-imp {
  display: inline-block;
  padding: 0 var(--space-2);
  font-size: var(--text-small);
  border-left: var(--border-3) solid var(--divider);
  white-space: nowrap;
}

.staff-imp-high {
  font-weight: 600;
  border-left-color: var(--status-alarm);
}

.staff-imp-medium {
  border-left-color: var(--status-attention);
}

.staff-imp-low {
  color: var(--muted);
}

/* ── Site index ─────────────────────────────────────────────────────────── */
.staff-index {
  columns: 18rem;
  column-gap: var(--space-6);
}

.staff-index section {
  break-inside: avoid;
  margin: 0 0 var(--space-5);
}

.staff-index h2 {
  margin-top: 0;
}

.staff-index code {
  font-size: var(--text-small);
  color: var(--muted);
  overflow-wrap: anywhere; /* FORGE-755: a long path breaks inside its column on a phone */
}

.staff-clear {
  margin: 0 0 var(--space-6);
  font-size: var(--text-small);
  color: var(--muted);
}

.staff-index-note {
  font-size: var(--text-small);
  color: var(--muted);
}

/* ── Phone: work lists stack into designed records (panel D8) ─────────────
   Only tables marked .staff-stack: the review queue, reports, submissions, tickets, actions and
   changes. Registers, receipts, the email log and money tables keep the contained scroll. A cell
   with no data-label (the record's identity, its action) spans the card; a labelled cell shows its
   label in a narrow mono column. */
@media (max-width: 40rem) {
  /* Hidden from sight, kept for assistive tech (outside voice 14): the same clip as .vh. */
  .staff-stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .staff-stack,
  .staff-stack tbody,
  .staff-stack tr {
    display: block;
  }

  .staff-stack tr {
    padding: var(--space-3) 0;
    border-bottom: var(--rule-hair);
  }

  .staff-stack td {
    display: block;
    padding: var(--space-1) 0;
    border: 0;
  }

  .staff-stack td[data-label] {
    display: grid;
    grid-template-columns: 6rem minmax(0, 1fr);
    gap: var(--space-2);
    overflow-wrap: anywhere;
  }

  /* FORGE-683 (FORGE-682's form, review U1): the label's alternative text is empty, so a cell's
     name is its value alone and the label is not read twice; the column header still names it.
     A browser that does not understand the alt-text form keeps the plain declaration and still
     shows the label. The table and its rows state their roles in the markup (staff-shared.js
     table()), so the changed display does not cost them their table semantics. */
  .staff-stack td[data-label]::before {
    content: attr(data-label);
    content: attr(data-label) / "";
    padding-top: 2px;
    font-family: var(--font-mono);
    font-size: var(--text-label);
    letter-spacing: var(--track-label);
    text-transform: uppercase;
    color: var(--muted);
  }

  .staff-stack td.staff-num {
    text-align: left;
  }

  .staff-stack td.staff-act button {
    width: 100%;
    min-height: 44px;
  }

  .staff-stack td.staff-act form.inline {
    display: grid;
  }

  .staff-stack .staff-group-row,
  .staff-stack .staff-group-row th {
    display: block;
  }

  .staff-stack .staff-row-alarm td:first-child {
    box-shadow: none;
  }

  .staff-stack .staff-row-alarm {
    padding-left: var(--space-3);
    box-shadow: inset var(--border-3) 0 0 0 var(--status-alarm);
  }

  .staff-work {
    grid-template-columns: 1fr;
  }

  form.staff-filters > label,
  form.staff-filters > button {
    flex: 1 1 100%;
  }

  form.staff-filters select,
  form.staff-filters input:not([type="checkbox"]),
  form.staff-filters button {
    width: 100%;
    min-height: 44px;
  }
}

@media print {
  .staff-top {
    display: none;
  }
}

/* ── FORGE-575 PR 2: staff actions log ── (PR 2 writes its rules here, and only here) */
/* /staff/actions: the action label is the record's name, so it keeps a readable width on a
   desktop table; the On cell may wrap (a reason or a note), the rest stay one line. */
.staff-actions td:first-child {
  min-width: 11rem;
}
.staff-table.staff-actions td[data-label="On"] {
  min-width: 14rem;
  white-space: normal;
}
/* The active org filter, above the count line, with its way back to every org. */
.staff-actions-scope {
  margin: var(--space-3) 0 0;
  font-size: var(--text-small);
}
@media (max-width: 40rem) {
  .staff-actions td:first-child,
  .staff-table.staff-actions td[data-label="On"] {
    min-width: 0;
  }
}

/* ── FORGE-575 PR 3: review pages and their detail pages ── */
/* A detail page's fact strip: the status strip's grid, holding a record's long values (a source
   URL, a customer's note, a jurisdiction's full name), which wrap rather than widen the page. */
.staff-facts dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

.staff-facts + h2 {
  margin-top: var(--space-5);
}

/* The decision forms on a detail page sit one under another, each a labelled row. */
.staff-decide {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  margin: 0 0 var(--space-5);
}

/* A report's change summary leads its row; it keeps a readable measure instead of wrapping a
   word to a line beside wider columns. A stacked phone row spans it full width anyway. */
.staff-table td.staff-lead {
  min-width: 12rem;
}

/* The review lists' decision fields (a reason, a note) take a set width beside their button, so
   the Decide column does not push a desktop table past the measure. On a phone the stacked row's
   rules make them full width instead. */
@media (min-width: 40rem) {
  .staff-review td.staff-act input[type="text"] {
    width: 11rem;
  }
}

/* ── FORGE-575 PR 4: data and ops pages, the source page ── */
/* A note under a heading or a table: what a mark means, or a rule that applies to every row, said
   once instead of on each row (the peak-memory "at least", the auto-approve bar). */
.staff-legend {
  margin: var(--space-2) 0 var(--space-3);
  max-width: var(--measure-say);
  font-size: var(--text-small);
  color: var(--muted);
}

/* A filter value the page ignored, named above the results (§3.4: never a 400). */
.staff-notice {
  margin: 0 0 var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--card-bg);
  border: var(--rule-hair);
  border-left: var(--border-3) solid var(--status-attention);
  font-size: var(--text-small);
}

/* A stored URL in a header: it wraps anywhere rather than widen the page on a phone. */
.staff-url {
  overflow-wrap: anywhere;
}

/* A preset's count, beside its word. */
.staff-preset-n {
  margin-left: var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--text-small);
}

/* The source page's facts strip, when the source is blind. */
.staff-status-alarm {
  border-top: var(--border-3) solid var(--status-alarm);
}

/* The source forms: in a register row's disclosure, and on the source page. */
.staff-source-forms {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  align-items: end;
  margin: 0 0 var(--space-2);
}

.staff-more .staff-role-form,
.staff-source-forms .staff-role-form {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: end;
}

.staff-more form.inline + form.inline {
  margin-top: var(--space-2);
}

/* ── FORGE-575 PR 5: org detail and the registers ── */
/* The org page: a facts strip, an in-page index over four groups (Account, People, Data,
   Activity), each a run of sections with one fact-block shape. The registers' quick filters and
   CSV line. Tokens only. */
.staff-org-facts {
  margin-top: 0;
}

/* FORGE-663 (design S1.5, L24): .staff-menu is the same boxed index for every in-page anchor row
   (pageMenu: Costs, Funnel), never the tabs' look. */
.staff-org-index,
.staff-menu {
  margin: 0 0 var(--space-6);
  padding: var(--space-3) var(--space-4);
  background: var(--card-bg);
  border: var(--rule-hair);
  font-size: var(--text-small);
}

.staff-org-index ol,
.staff-menu ol {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.staff-menu ol {
  flex-flow: row wrap;
  gap: var(--space-2) var(--space-4);
}

.staff-org-index-group {
  display: inline-block;
  min-width: 5.5rem;
  font-weight: 600;
}

.staff-org-group {
  margin: 0 0 var(--space-6);
  padding-top: var(--space-3);
  border-top: var(--rule-ink);
}

.staff-org-group-name {
  margin: 0 0 var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
}

.staff-org-group > section {
  margin: 0 0 var(--space-5);
}

.staff-org-group > section > h2 {
  margin: 0 0 var(--space-2);
}

/* One fact-block shape for every block of facts on the org page. */
.staff-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--space-1) var(--space-4);
  max-width: var(--measure-say);
  margin: 0 0 var(--space-3);
}

.staff-facts dt {
  color: var(--muted);
}

.staff-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.staff-org-more,
.staff-export {
  margin: var(--space-2) 0 var(--space-3);
  font-size: var(--text-small);
}

/* A register's quick filters: a visible label, then the pills. */
.staff-quick {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
  margin: 0 0 var(--space-3);
  font-size: var(--text-small);
}

.staff-quick-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
}

.staff-quick .staff-tabs {
  margin: 0;
}

@media (max-width: 40rem) {
  .staff-facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .staff-facts dd {
    margin: 0 0 var(--space-2);
  }

  .staff-org-index-group {
    display: block;
  }
}

/* ── FORGE-575 PR 6: tickets and the email log ── */
/* The ticket list: under its presets, one line of what is no filter of its own (overdue, listed
   first in the default view, and the median close). Overdue carries the alarm edge; the words
   carry the meaning. */
.staff-tickets-facts {
  margin: 0 0 var(--space-3);
  font-size: var(--text-small);
}

/* FORGE-652 (design review R2): the Rates not confirmed heading's past-the-deadline line shares
   the tickets' overdue rule, and takes the body ink: an alarm never reads as muted secondary copy.
   The words carry the meaning; the edge only repeats it. */
.staff-tickets-overdue,
.staff-overdue {
  padding-left: var(--space-2);
  border-left: var(--border-3) solid var(--status-alarm);
  font-weight: 600;
}

.staff-sub.staff-overdue { color: var(--ink); }

/* A printed reference reads as one token: it never breaks across lines. */
.staff-table td.staff-tickets-ref {
  white-space: nowrap;
}

/* The email log: a short chip on a broadcast row whose failed sends retry as a job, and the one
   legend line under the table that links the jobs page. */
.staff-email-chip {
  display: inline-block;
  padding: 0 var(--space-2);
  border: var(--rule-hair);
  border-radius: var(--radius-1);
  font-size: var(--text-small);
  color: var(--muted);
  white-space: nowrap;
}

.staff-email-legend {
  margin: 0 0 var(--space-3);
  font-size: var(--text-small);
  color: var(--muted);
}

/* Panel D8: on a phone the ticket list stacks into records (.staff-stack), so the FORGE-516
   sticky Reference column (the 60rem block above) stands down: the reference and summary are the
   record's identity line, full width. Between 40rem and 60rem it is still the sticky scroll. */
@media (max-width: 40rem) {
  .staff-stack .staff-tickets-ref,
  .staff-stack .staff-tickets-summary {
    position: static;
    min-width: 0;
    max-width: none;
    background: none;
  }

  .staff-stack .staff-tickets-ref {
    font-weight: 600;
  }

  /* An empty fact (no assignee, no owner, no 72-hour marker) is left off the record. FORGE-683:
     it is clipped like .vh, never display: none, so it keeps its column and the cells after it
     keep their headers (FORGE-682's review O2). */
  .staff-stack td.staff-tickets-blank {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* ── FORGE-575 PR 7: money and site pages ── */

/* FORGE-663: the money pages' in-page index is the shared "On this page" menu (.staff-menu, with
   the org page's index under FORGE-575 PR 5). */

/* A money table's totals sit in row heads; they read as figures, not as column labels. */
.staff-money tbody th {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink);
  font-weight: 600;
  border-top: var(--rule-ink);
}

/* A money table's line name may wrap, so a two-column table (the margin line) fits a phone
   without scrolling; the figures stay on one line. */
.staff-money td:first-child {
  min-width: 10rem;
  white-space: normal;
}

/* The fixed-cost form and the provider limits form (FORGE-640): one wrapping row on a wide
   screen, a column on a phone. */
form.staff-fixed-cost,
form.staff-provider-limits {
  max-width: none;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--space-2) var(--space-3);
  margin: var(--space-3) 0 var(--space-4);
}

/* One price version's detail: prices, Stripe, moves and actions behind its summary line. On the
   page colour, not a card's, so the .scroll edge shades (painted in --paper) do not show as bars. */
.staff-version {
  margin: 0 0 var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--paper);
  border: var(--rule-hair);
}

.staff-version > summary {
  font-weight: 600;
  cursor: pointer;
}

.staff-version[open] > summary {
  margin-bottom: var(--space-3);
}

.staff-version-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  align-items: end;
  margin-top: var(--space-3);
}

/* What customers read in a Terms or Privacy email keeps the line breaks staff typed. */
.staff-legal-summary {
  white-space: pre-line;
}

@media (max-width: 40rem) {
  form.staff-fixed-cost > label,
  form.staff-fixed-cost > button,
  form.staff-provider-limits > label,
  form.staff-provider-limits > button {
    flex: 1 1 100%;
  }

  form.staff-fixed-cost input,
  form.staff-fixed-cost button,
  form.staff-provider-limits input,
  form.staff-provider-limits button {
    width: 100%;
    min-height: 44px;
  }
}

/* ── FORGE-654: the staff info button ── (design docs/designs/2026-11-22-883-staff-info-button.md
   D3, D7, D8). A page's or a section's reference text sits behind an "i" beside its heading, in a
   native <details>: closed on every load, no script. The heading floats inside a flow-root wrapper,
   so the "i" stays on the heading's first line, open or closed, and the opened text clears below
   the heading at the heading's left edge. The wrapper carries the heading's margins, so the section
   rhythm does not move. Tokens only. */
.staff-about-head {
  display: flow-root;
  margin: var(--space-5) 0 var(--space-3);
}

.staff-head > .staff-about-head {
  margin: 0;
}

.staff-about-head > :is(h1, h2, h3) {
  float: left;
  max-width: calc(100% - 3rem);
  margin: 0;
  margin-right: var(--space-2);
}

/* Engineering review F1: the two contextual heading rules, carried to the wrapper. */
.staff-facts + .staff-about-head {
  margin-top: var(--space-5);
}

.staff-org-group > section > .staff-about-head {
  margin: 0 0 var(--space-2);
}

/* The hit box is as tall as its heading's line box, so the ring centres on the first line. */
.staff-about > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  vertical-align: top;
  list-style: none;
  cursor: pointer;
  color: var(--deep);
}

.staff-about > summary::-webkit-details-marker {
  display: none;
}

h1 + .staff-about > summary {
  height: calc(var(--text-h1) * var(--leading-heading));
}

h2 + .staff-about > summary {
  height: calc(var(--text-h2) * var(--leading-heading));
}

h3 + .staff-about > summary {
  height: calc(var(--text-h3) * var(--leading-heading));
}

.staff-about > summary:focus-visible {
  outline: var(--border-3) solid var(--field-border-focus);
  outline-offset: 2px;
}

/* One ring at every heading level: a level that scaled it would read as three controls. */
.staff-about-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 1.25rem;
  height: 1.25rem;
  border: var(--border-1) solid currentColor;
  border-radius: 50%;
  font-size: var(--text-small);
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

.staff-about > summary:hover .staff-about-mark,
.staff-about[open] > summary .staff-about-mark {
  border-color: var(--deep);
  background: var(--deep);
  color: var(--paper);
}

/* The palette guard's rule for any fill that sets its own foreground: the mark holds no <p>
   today, and if one ever lands inside it, the bare `p { color: --muted }` must not repaint it. */
.staff-about > summary:hover .staff-about-mark p,
.staff-about[open] > summary .staff-about-mark p {
  color: inherit;
}

/* The open panel reads like the lede it replaces: no box, rule or fill, which on a staff page
   would mean a notice (live state). */
.staff-about-body {
  clear: left;
  max-width: var(--measure-say);
  padding-top: var(--space-2);
}

.staff-about-body p {
  margin: 0 0 var(--space-2);
  color: var(--muted);
}

.staff-about-body > :last-child {
  margin-bottom: 0;
}

@media (forced-colors: active) {
  .staff-about[open] > summary .staff-about-mark {
    border-width: var(--border-3);
  }
}

/* Phone: a 44px box whose negative block margin keeps the heading row its own height. */
@media (max-width: 40rem) {
  .staff-about-head > :is(h1, h2, h3) {
    margin-right: 0;
  }

  .staff-about-head > .staff-about > summary {
    width: 44px;
    height: 44px;
  }

  .staff-about-head > h1 + .staff-about > summary {
    margin-block: calc((var(--text-h1) * var(--leading-heading) - 44px) / 2);
  }

  .staff-about-head > h2 + .staff-about > summary {
    margin-block: calc((var(--text-h2) * var(--leading-heading) - 44px) / 2);
  }

  .staff-about-head > h3 + .staff-about > summary {
    margin-block: calc((var(--text-h3) * var(--leading-heading) - 44px) / 2);
  }
}

/* D10 (owner ruling P9, placed by the Q-B answer): the staff home's one line on where each page's
   rules live, read once above the directory it describes. */
.staff-info-line {
  margin: 0 0 var(--space-3);
  max-width: var(--measure-say);
}

/* D8 (owner ruling Q-A): the one-time screens keep their text, in a tighter layout. */
.staff-onetime > p,
.staff-onetime > ul,
.staff-onetime > ol {
  margin: 0 0 var(--space-2);
  max-width: var(--measure-say);
}

.staff-onetime > ul,
.staff-onetime > ol {
  padding-left: var(--space-5);
}

.staff-onetime li {
  margin: 0;
}

.staff-onetime .staff-totp-steps li {
  margin: 0 0 var(--space-2);
}

.staff-onetime .staff-totp-secret {
  margin-top: var(--space-1);
  font-size: var(--text-body);
  letter-spacing: 0.08em;
}

.staff-onetime .staff-totp-uri {
  margin-top: var(--space-1);
  font-size: var(--text-small);
  color: var(--muted);
}

.staff-onetime > form {
  margin-top: var(--space-3);
}

.staff-onetime > form:not(.staff-team-form) {
  display: grid;
  gap: var(--space-3);
  max-width: 36rem;
}

.staff-onetime > form:not(.staff-team-form) > button {
  justify-self: start;
}

.staff-onetime > form:not(.staff-team-form) label {
  display: grid;
  gap: var(--space-1);
}

.staff-onetime .staff-stepup {
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  align-items: end;
}

.staff-onetime .staff-stepup label,
.staff-onetime .staff-stepup input {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
}

/* ── FORGE-657: the phone filter fold ── (design docs/designs/2026-11-23-888-phone-filter-bars.md
   D3-D5). On /staff/actions and /staff/email the filter form sits in a native <details>: on a
   phone a 44px "Filters" bar, closed unless a field is set; on a desktop today's open form, by
   showing the closed content through ::details-content and hiding the bar. The desktop rules sit
   behind @supports, so a browser without ::details-content keeps the bar instead of losing the
   form. No script. Tokens only. */
.staff-filter-fold > summary {
  min-height: 44px;
  box-sizing: border-box;
  margin: var(--space-3) 0 0;
  padding: 0 var(--space-3);
  line-height: 44px;
  background: var(--card-bg);
  border: var(--rule-hair);
  font-weight: 600;
  cursor: pointer;
}

.staff-filter-fold:not([open]) > summary {
  margin-bottom: var(--space-3);
}

/* Open, the form sits directly under the bar, and the two read as one card. */
.staff-filter-fold[open] > summary {
  border-bottom: 0;
}

.staff-filter-fold[open] > form.staff-filters {
  margin-top: 0;
}

.staff-filter-fold > summary:focus-visible {
  outline: var(--border-3) solid var(--field-border-focus);
  outline-offset: 2px;
}

/* The email log's line naming the audience and each set filter (owner ruling W2): shown while the
   fold is closed, hidden while the open form shows the same values. */
.staff-filter-active {
  margin: var(--space-3) 0 var(--space-2);
  font-size: var(--text-small);
  overflow-wrap: anywhere;
}

.staff-filter-fold[open] + .staff-filter-active {
  display: none;
}

/* Desktop: today's form, unchanged. `width > 40rem` is the exact complement of the staff phone
   query; display and content-visibility both, whichever way an engine hides a closed slot. */
@media (width > 40rem) {
  @supports selector(::details-content) {
    .staff-filter-fold > summary {
      display: none;
    }

    .staff-filter-fold::details-content {
      display: block;
      content-visibility: visible;
    }

    .staff-filter-fold[open] > form.staff-filters {
      margin-top: var(--space-3);
    }

    .staff-filter-active {
      display: none;
    }
  }
}

/* FORGE-671 (docs/designs/2026-11-25-914-staff-rerun.md, section 10). On /staff/jobs a failure row's
   What cell names its target above the type, and its actions cell carries the newest re-run's state
   line above Re-run (a link styled as the row's filled control) and Resolve. The actions cell keeps
   its buttons on one line; the state line wraps. The confirm page's facts wrap a long error or URL
   rather than push a phone layout sideways. */
.staff-target {
  display: block;
}

.staff-act .staff-rerun-state {
  display: block;
  max-width: 24rem;
  margin: 0 0 var(--space-2);
  white-space: normal;
  overflow-wrap: anywhere;
}

.staff-act-buttons {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

a.staff-rerun-link {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  border: var(--border-1) solid var(--btn-bg);
  border-radius: var(--radius-1);
  background: var(--btn-bg);
  color: var(--btn-fg);
  text-decoration: none;
}

a.staff-rerun-link:hover {
  background: var(--btn-bg-hover);
  border-color: var(--btn-bg-hover);
  color: var(--btn-fg);
}

.staff-rerun-facts > div {
  min-width: 0;
}

.staff-rerun-facts dd {
  overflow-wrap: anywhere;
}

.staff-rerun-action p {
  max-width: 44rem;
}

.staff-rerun-form {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
  margin: var(--space-4) 0 0;
}

@media (max-width: 40rem) {
  .staff-stack td.staff-act a.staff-rerun-link {
    width: 100%;
    min-height: 44px;
    text-align: center;
  }

  .staff-act-buttons {
    display: grid;
    width: 100%;
  }

  .staff-rerun-form {
    display: grid;
  }

  .staff-rerun-form button {
    width: 100%;
    min-height: 44px;
  }
}

/* ── FORGE-702: the staff console's frame ──────────────────────────────────
   Design docs/designs/2026-11-26-899-staff-console-design.md S1.1 to S1.3 and S2.1. The staff bar
   (Staff and Guides beside the mark, one row on a phone), the provider strip, the three notice
   levels and the home's heading row and Status warning. Existing tokens only: no new colour, no
   new font, no new size. */

/* S1.1: the staff bar. Customer bars carry none of these classes. */
.nav.nav-staff-bar > .nav-brand {
  margin-right: 0;
}

.nav-staff {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: 0 auto 0 0;
  padding: 0;
  align-self: baseline;
}

.nav-staff .nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
}

.nav-help-short { display: none; }

/* S1.3: three notice levels on a surface, told apart by the edge's existing status token. */
.notice.notice-info {
  background: var(--surface);
  color: var(--ink);
  border-left: var(--border-4) solid var(--primary);
}

.notice.notice-caution {
  background: var(--surface);
  color: var(--ink);
  border-left: var(--border-4) solid var(--status-attention);
}

.notice.notice-blocked {
  background: var(--surface);
  color: var(--ink);
  border-left: var(--border-4) solid var(--status-alarm);
}

/* The palette guard's rule for a box that sets its own foreground: a <p> inside keeps it. */
.notice-info p,
.notice-caution p,
.notice-blocked p {
  color: inherit;
}

.notice-lead {
  font-weight: 600;
}

/* S1.2: the provider strip, system status above the page head; small, with room below it. */
.notice.staff-system {
  margin: 0 0 var(--space-4);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-small);
}

.notice.staff-system p {
  margin: 0;
}

.notice.staff-system p + p {
  margin-top: var(--space-1);
}

/* S2.1: the home's heading row holds the reference finder; the Status cell warns by its edge. */
.staff-head.staff-head-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-3) var(--space-5);
}

.staff-head-main {
  min-width: 0;
}

form.staff-find {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: end;
  gap: var(--space-2);
  margin: 0;
  max-width: none;
}

.staff-find input {
  width: 12rem;
}

.staff-status .staff-status-warn {
  padding-left: var(--space-3);
  box-shadow: inset var(--border-3) 0 0 0 var(--status-attention);
}

.staff-status-note {
  margin: var(--space-1) 0 0;
  font-size: var(--text-small);
  color: var(--ink);
}

@media (max-width: 40rem) {
  .nav.nav-staff-bar {
    flex-wrap: nowrap;
    gap: var(--space-3);
  }

  .nav-staff-bar > .nav-slot { display: none; }

  .nav-staff-bar .nav-help-long { display: none; }

  .nav-staff-bar .nav-help-short { display: inline; }

  .nav-staff {
    gap: var(--space-3);
  }
}

/* ── FORGE-663 and FORGE-704: filter bars, tabs, registers, empty sections, buttons ──────────
   Design docs/designs/2026-11-26-899-staff-console-design.md S1.4, S1.5, S1.6 and S1.9. Existing
   tokens only: no new colour, no new font, no new size. */

/* S1.5 (L24): tabs filter one list. A hairline under the row, each tab a 44px target in --deep,
   the current one in ink and bold over a 3px --deep bar, counts in tabular figures, and room above
   so the row never sits flush under a notice. */
.staff-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-5);
  margin: var(--space-3) 0 var(--space-3);
  border-bottom: var(--rule-hair);
  font-size: var(--text-small);
}

.staff-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  box-sizing: border-box;
  margin-bottom: -1px;
  border-bottom: var(--border-3) solid transparent;
  color: var(--deep);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

.staff-tabs a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--deep);
}

.staff-tabs a:hover {
  text-decoration: underline;
}

/* S1.5 (L22): on a desktop the filter row's labels sit over fields of one height, and Apply with
   Clear filters ends the row. A ticked box lines up with the fields' text. */
form.staff-filters select,
form.staff-filters input:not([type="checkbox"]),
form.staff-filters > button {
  box-sizing: border-box;
  min-height: 44px;
}

form.staff-filters > button {
  margin-left: auto;
}

form.staff-filters > .staff-filters-clear {
  align-self: end;
  line-height: 44px;
}

/* Text fields and long selects take a compact width on a desktop, so six fields, Apply and Clear
   filters share one row at 1280 rather than Apply wrapping alone. */
@media (width > 40rem) {
  form.staff-filters input[type="search"],
  form.staff-filters input:not([type]) {
    width: 9rem;
  }

  form.staff-filters select {
    max-width: 10rem;
  }

  form.staff-filters input[list="staff-org-names"] {
    width: 12rem;
  }
}

form.staff-filters > label:has(> input[type="checkbox"]) {
  align-self: end;
  min-height: 44px;
  align-items: center;
}

/* S1.4 (L09): a free-text cell in a register wraps, capped at about 22rem, so a long name or
   summary costs height rather than pushing the table past its box. */
.staff-table td.staff-wrap {
  min-width: 8rem;
  max-width: 22rem;
  overflow-wrap: anywhere;
}

/* S1.4 (L15): a record that is not a to-do (a high-importance staff action) takes the caution
   edge, drawn the alarm marker's way, as an inset on the first cell, so no text moves. */
.staff-row-caution td:first-child {
  box-shadow: inset var(--border-3) 0 0 0 var(--status-attention);
}

/* S1.6 (W24): an empty section is its heading and this one muted line, its action beside it. */
.staff-none {
  margin: 0 0 var(--space-5);
  font-size: var(--text-small);
  color: var(--muted);
}

.staff-none > details {
  display: inline-block;
  vertical-align: top;
}

.staff-none > details[open] {
  display: block;
}

@media (max-width: 40rem) {
  form.staff-filters > button {
    margin-left: 0;
  }

  /* S1.4 (L15): a marked phone record keeps its inset edge, and every record in a list that has a
     marked one takes the same left room, so the marker never moves one record's text against its
     neighbours'. */
  .staff-stack:has(.staff-row-alarm, .staff-row-caution) tr {
    padding-left: var(--space-3);
  }

  .staff-stack .staff-row-caution td:first-child {
    box-shadow: none;
  }

  .staff-stack .staff-row-caution {
    padding-left: var(--space-3);
    box-shadow: inset var(--border-3) 0 0 0 var(--status-attention);
  }
}

/* ── FORGE-709: the address change (design S2.9, ledger L82 to L87) ─────────────────────────
   What the customer wrote sits above the fields in the body face (D1); the review shows Before
   and After side by side in ink, the changed parts bold, then the facts and the rate today. */
.staff-move-request-section {
  max-width: var(--measure-say);
  margin: 0 0 var(--space-4);
}

.staff-move-request {
  margin: 0 0 var(--space-3);
  color: var(--ink);
}

.staff-move-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  max-width: var(--measure-say);
  margin: 0 0 var(--space-4);
}

.staff-move-compare > div {
  padding: var(--space-3);
  border: var(--rule-hair);
}

.staff-move-compare dt {
  margin: 0 0 var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
}

.staff-move-compare dd {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.staff-move-rate {
  max-width: var(--measure-say);
  color: var(--ink);
}

.staff-move-confirm {
  margin: var(--space-4) 0 var(--space-3);
}

@media (max-width: 20rem) {
  .staff-move-compare {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── FORGE-707: the ticket laid out for triage ──────────────────────────────
   Design docs/designs/2026-11-26-899-staff-console-design.md S2.3 and S2.4 (L10, L12, L14, L37,
   L50 to L58; owner rulings D1 and Q-B). Two columns from 64rem up, three action groups, the
   customer beside it; the customer's words in the body face; the tickets list's compact phone
   record. Existing tokens only: no new colour, no new font, no new size. Every rule is scoped to
   the ticket's split, the tickets table or the settings page, so another page's cards keep theirs. */

/* S2.4 (L50): the source order is facts, main, actions, so a phone reads history before action.
   From 64rem a grid puts the facts and the actions in a 21rem side column (rows auto 1fr), so no
   gap opens under the facts. */
.staff-split {
  display: grid;
  gap: var(--space-5);
}

.staff-split-facts,
.staff-split-act {
  display: grid;
  gap: var(--space-4);
  align-content: start;
  min-width: 0;
}

.staff-split-main {
  min-width: 0;
}

.staff-split-main > h2:first-child,
.staff-split-main > .notice:first-child,
.staff-split-main > .staff-tickets-resolution:first-child {
  margin-top: 0;
}

@media (min-width: 64rem) {
  .staff-split {
    grid-template-columns: minmax(0, 1fr) 21rem;
    grid-template-rows: auto 1fr;
    align-items: start;
  }

  .staff-split-facts { grid-column: 2; grid-row: 1; }

  .staff-split-main { grid-column: 1; grid-row: 1 / span 2; }

  .staff-split-act { grid-column: 2; grid-row: 2; }
}

/* S2.4 (L14): the facts card and the customer card, each on the card surface. */
.staff-split .staff-card {
  padding: var(--space-4);
  background: var(--card-bg);
  border: var(--rule-hair);
  color: var(--ink);
}

.staff-split .staff-card p {
  color: inherit;
}

.staff-split .staff-card > h2 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-h4);
}

.staff-split .staff-card .staff-facts {
  max-width: none;
  margin: 0;
}

/* A stamp in the 21rem card wraps rather than running past its edge. */
.staff-split .staff-card .staff-when {
  white-space: normal;
}

.staff-split .staff-card .staff-facts form {
  margin-top: var(--space-2);
}

.staff-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  margin: 0 0 var(--space-3);
}

/* The org's standing line (FORGE-705's formatter), muted under the org's name. */
.staff-split .staff-card .staff-standing-note {
  margin: 0 0 var(--space-3);
  font-size: var(--text-small);
  color: var(--muted);
}

.staff-customer .staff-org-more {
  margin: var(--space-3) 0 0;
}

/* S2.4 (L51): three action groups, each a card; Close the ticket set apart by an ink top rule. */
.staff-split .staff-group {
  padding: var(--space-4);
  background: var(--card-bg);
  border: var(--rule-hair);
  color: var(--ink);
}

.staff-split .staff-group p {
  color: inherit;
}

.staff-split .staff-group > h3 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-h4);
}

.staff-split .staff-group-final {
  border-top: var(--rule-ink);
}

.staff-split .staff-group form {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--space-2);
  max-width: none;
  margin: 0 0 var(--space-3);
}

.staff-split .staff-group form:last-child {
  margin-bottom: 0;
}

.staff-split .staff-group select {
  min-width: 9rem;
}

.staff-split .staff-group .staff-wide,
.staff-split .staff-group fieldset {
  flex: 1 1 100%;
}

.staff-split .staff-group textarea {
  box-sizing: border-box;
  width: 100%;
}

.staff-owner-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin: 0;
  font-size: var(--text-small);
  overflow-wrap: anywhere;
}

.staff-split .staff-group .staff-owner-line {
  flex: 1 1 100%;
}

.staff-split .staff-group .staff-check {
  flex: 1 1 auto;
}

/* S2.4 (D1, Q-B, W41): what a person wrote, in the body face with its line breaks; references,
   paths and codes stay mono. */
.staff-quote {
  margin: 0 0 var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: var(--rule-hair);
  color: var(--ink);
  font-family: var(--font-sans);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.staff-quote-label {
  margin: 0 0 var(--space-1);
  font-size: var(--text-small);
}

/* S2.4 (L53): the tool row, directly under the text it acts on. */
.staff-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  margin: 0 0 var(--space-5);
  font-size: var(--text-small);
}

.staff-tools > details[open] {
  flex: 1 1 100%;
}

.staff-tools a.btn-quiet {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  border: var(--border-1) solid var(--divider);
  border-radius: var(--radius-1);
  text-decoration: none;
}

/* S2.4 (L56): a closed ticket's resolution, and its resend, lead the main column. */
.staff-resolution {
  margin: 0 0 var(--space-4);
}

.staff-resolution form {
  margin-top: var(--space-2);
}

/* S2.4 (L57): the timeline at the main column's width, oldest first, the time muted above. */
.staff-timeline {
  margin: 0 0 var(--space-5);
  padding: 0;
  list-style: none;
}

.staff-timeline > li {
  padding: var(--space-2) 0;
  border-bottom: var(--rule-hair);
}

.staff-timeline .staff-when {
  display: block;
  font-size: var(--text-small);
  color: var(--muted);
}

.staff-timeline p {
  margin: var(--space-1) 0 0;
  color: var(--ink);
}

.staff-timeline .staff-quote {
  margin: var(--space-2) 0 0;
}

/* S2.4 (W40): a settings section's scope, under its heading. */
.staff-scope {
  margin: 0 0 var(--space-3);
  font-size: var(--text-small);
  color: var(--muted);
}

/* S2.3 (L10): the summary is the list's flexible column; the short facts keep to one line. */
.staff-tickets-table td.staff-tickets-summary {
  min-width: 14rem;
}

.staff-tickets-table td.staff-tickets-chip:not(:last-child) {
  white-space: nowrap;
}

/* S2.3 (L12): on a phone each ticket is a compact record. Line 1 is the reference and summary;
   then one wrapping run of chips (kind, status, priority, age, reply due); then the assignee and
   the org, when set. The row is a wrapping flex line so the chips run together, though the org
   sits between them in the source. A blank fact stays clipped out of the flow (PR 6's rule). */
@media (max-width: 40rem) {
  .staff-stack.staff-tickets-table tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-1) var(--space-2);
  }

  .staff-stack.staff-tickets-table td {
    flex: 1 1 100%;
    order: 2;
  }

  .staff-stack.staff-tickets-table td.staff-tickets-ref,
  .staff-stack.staff-tickets-table td.staff-tickets-summary {
    order: 0;
  }

  .staff-stack.staff-tickets-table td.staff-tickets-chip {
    display: inline-flex;
    flex: 0 0 auto;
    order: 1;
    padding: 2px var(--space-2);
    border: var(--rule-hair);
    font-size: var(--text-small);
  }

  .staff-stack.staff-tickets-table td.staff-tickets-chip::before {
    content: none;
  }

  /* A blank fact is no chip: it stays the 1px clip PR 6 makes of it. */
  .staff-stack.staff-tickets-table td.staff-tickets-chip.staff-tickets-blank {
    padding: 0;
    border: 0;
  }
}

/* ── FORGE-708: the org page answers "is this customer OK?" and stays navigable ──────────────
   Design S2.6 (L13, L73 to L79). The standing line under the h1; the "On this page" menu sticky
   from 64rem up, with "Back to sections" on a phone only; Billing and Entitlement side by side;
   the caution chip; a location's address history behind its name. Tokens only. */
.staff-standing {
  margin: 0 0 var(--space-4);
  font-size: var(--text-h3);
  color: var(--ink);
}

.staff-menu .staff-menu-label {
  margin-right: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
}

.staff-back {
  margin: 0 0 var(--space-2);
  font-size: var(--text-small);
}

.staff-two > section {
  margin: 0 0 var(--space-5);
}

.staff-two > section > h2 {
  margin: 0 0 var(--space-2);
}

.chip-caution {
  color: var(--ink);
  box-shadow: inset 3px 0 0 0 var(--status-attention);
}

.staff-loc-history > summary {
  cursor: pointer;
  color: var(--deep);
  text-decoration: underline;
}

.staff-loc-history[open] > summary {
  margin-bottom: var(--space-1);
}

.staff-loc-history p,
.staff-loc-history ul {
  margin: 0 0 var(--space-1);
  font-size: var(--text-small);
  white-space: normal;
}

.staff-loc-history ul {
  padding-left: var(--space-4);
}

.staff-loc-history-head {
  color: var(--muted);
}

@media (min-width: 64rem) {
  .staff-menu-sticky {
    position: sticky;
    top: 0;
    z-index: 2;
  }

  /* A jump from the menu lands below it, not under it. */
  .staff-org-group,
  .staff-org-group section {
    scroll-margin-top: 8rem;
  }

  .staff-back {
    display: none;
  }

  .staff-two {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-6);
  }
}

/* FORGE-708 (S2.6 item 7): the Orgs register's Status, a standing line, wraps at word breaks only. */
.staff-table td.staff-standing-cell {
  min-width: 12rem;
  max-width: 17rem;
  white-space: normal;
}

/* ── FORGE-706 and FORGE-712: the review gate (design S1.10, S2.5; ledger L38, L59 to L65, L68)
   and the flash's next link (S1.3, L08). Existing tokens only. ────────────────────────────── */

/* S2.5 (L59): an agent-verified proposal's chip; the disputed one takes .chip-caution. */
.chip-verified {
  color: var(--ink);
  box-shadow: inset 3px 0 0 0 var(--primary);
}

/* Q-A: a row's Review link on a phone, where its Approve is not drawn. */
.staff-queue-review {
  display: none;
}

/* A quiet link that opens a record wears the quiet button's box. */
.staff-review a.btn-quiet {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  border: var(--border-1) solid var(--divider);
  border-radius: var(--radius-1);
  text-decoration: none;
}

.staff-review a.btn-quiet:focus-visible {
  outline: var(--border-3) solid var(--field-border-focus);
  outline-offset: 2px;
}

/* Q-A: no list Approve on a phone, the batch's included; the row offers Review instead. */
@media (max-width: 40rem) {
  .staff-queue-approve,
  .staff-stack td.staff-act form.staff-queue-approve,
  .staff-stack .staff-group-row form.staff-queue-approve {
    display: none;
  }

  .staff-queue-review {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .staff-review td.staff-act a.btn-quiet {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }
}

/* S2.5 (L61): the Objection, a caution notice under the h1, the verifier quoted in the body face. */
.notice.staff-objection {
  margin: 0 0 var(--space-5);
}

.staff-objection p,
.staff-objection blockquote {
  margin: 0 0 var(--space-2);
}

.staff-objection > :last-child {
  margin-bottom: 0;
}

.staff-objection-quote {
  padding: 0 0 0 var(--space-3);
  border-left: var(--rule-hair);
  font-family: var(--font-sans);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.staff-objection-by {
  font-size: var(--text-small);
  color: var(--muted);
}

/* S1.10 (L38): the Decision block, one card: the Reason full width, its hint, one row of buttons. */
.staff-decision {
  display: grid;
  gap: var(--space-2);
  max-width: 40rem;
  margin: 0 0 var(--space-5);
  padding: var(--space-4);
  background: var(--surface);
  border: var(--rule-hair);
}

.staff-decision textarea,
.staff-confirm-form textarea {
  box-sizing: border-box;
  width: 100%;
  font: inherit;
  padding: var(--space-2);
  border: var(--border-1) solid var(--field-border);
  border-radius: var(--radius-1);
  background: var(--field-bg);
  color: var(--field-fg);
}

.staff-decision textarea:focus-visible,
.staff-confirm-form textarea:focus-visible {
  outline: var(--border-3) solid var(--field-border-focus);
}

.staff-decision > p {
  margin: 0;
}

.staff-hint {
  font-size: var(--text-small);
  color: var(--muted);
}

.staff-decision-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

@media (max-width: 40rem) {
  .staff-decision-actions button {
    flex: 1 1 100%;
    min-height: 44px;
  }
}

/* S2.5 (L68, Q-D): the precision beside the grant, and the grant's confirm step, whose summary
   wears the danger button's look and holds the Reason and the final submit. */
.staff-precision {
  margin: 0;
  font-size: var(--text-small);
}

.staff-confirm > summary {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  border: var(--border-1) solid var(--btn-bg-danger);
  border-radius: var(--radius-1);
  background: var(--btn-bg-danger);
  color: var(--btn-fg);
  cursor: pointer;
  list-style: none;
}

/* The palette guard's rule for a box that sets its own foreground. */
.staff-confirm > summary p {
  color: inherit;
}

.staff-confirm > summary::-webkit-details-marker {
  display: none;
}

.staff-confirm > summary:hover {
  background: var(--btn-bg-danger-hover);
  border-color: var(--btn-bg-danger-hover);
}

.staff-confirm > summary:focus-visible {
  outline: var(--border-3) solid var(--field-border-focus);
  outline-offset: 2px;
}

/* Opened among the source's forms, the confirm step takes a row of its own. */
.staff-source-forms .staff-confirm[open] {
  flex: 1 1 100%;
}

.staff-confirm-form {
  display: grid;
  gap: var(--space-2);
  max-width: 28rem;
  margin-top: var(--space-2);
}

/* S1.3 (L08, W15): the flash's next link sits after its sentence, in the flash's own ink. */
.flash-text a {
  color: inherit;
}

/* ── FORGE-703: Rates not confirmed by reading, Jobs with their errors, the re-run's allowance
   (design S2.7, S2.8; ledger L66, L69 to L72). Existing tokens only. ───────────────────────── */

/* S2.7: a reading row heads its group, as a group row does; its rooftops sit under it, set in. */
.staff-unconfirmed .staff-reading-row td {
  background: var(--paper);
  border-top: var(--rule-ink);
  white-space: normal;
}

/* A group of two readings: the second follows the first without a second heavy rule. */
.staff-unconfirmed .staff-reading-row + .staff-reading-row td {
  border-top: var(--rule-hair);
}

.staff-unconfirmed .staff-reading-row a {
  display: inline-block;
  margin-top: var(--space-1);
}

.staff-unconfirmed .staff-rooftop-row td {
  padding-left: var(--space-5);
  white-space: normal;
}

.staff-rooftop-chip {
  display: block;
  margin-top: var(--space-1);
}

/* FORGE-734 (design 8.3): a flagged rooftop's facts row, then its decision form across the row.
   Existing tokens only. The form's note field takes the cell's width; the wrong button follows W9. */
.staff-placements .staff-placement-row td {
  white-space: normal;
  vertical-align: top;
}

.staff-placements .staff-placement-form td {
  border-top: 0;
  padding-top: 0;
  white-space: normal;
}

.staff-placements .staff-placement-form label {
  display: block;
}

.staff-placements .staff-placement-form textarea {
  display: block;
  width: 100%;
  max-width: 40rem;
  margin-top: var(--space-1);
}

.staff-placements .staff-placement-form .notice {
  margin: var(--space-3) 0;
}

/* FORGE-762 (design 7.2): the pick. One choice a line with its words beside its mark, the typed name under
   "Another city", and the note and notices in the form's reading measure. The fieldset is a plain group
   here, not a card. The list's heads wrap, so "Check it on" stays on the screen. Existing tokens only. */
.staff-placements thead th {
  white-space: normal;
}

.staff-pick {
  max-width: 40rem;
  margin-top: var(--space-4);
}

.staff-placement-form .staff-pick {
  margin-top: var(--space-2);
}

.staff-pick fieldset {
  margin: 0 0 var(--space-2);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}

.staff-pick legend {
  padding: 0;
  margin-bottom: var(--space-2);
  font-weight: 600;
}

.staff-pick label,
.staff-placements .staff-placement-form .staff-pick label {
  display: block;
  margin: 0 0 var(--space-2);
}

.staff-pick .staff-pick-option,
.staff-pick .staff-pick-differs,
.staff-placements .staff-placement-form .staff-pick .staff-pick-option,
.staff-placements .staff-placement-form .staff-pick .staff-pick-differs {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.staff-pick .staff-pick-option input,
.staff-pick .staff-pick-differs input {
  flex: none;
}

.staff-pick .staff-pick-other,
.staff-placements .staff-placement-form .staff-pick .staff-pick-other {
  margin-left: var(--space-5);
}

.staff-pick .staff-pick-other input {
  display: block;
  width: 100%;
  max-width: 22rem;
  margin-top: var(--space-1);
}

.staff-pick textarea {
  display: block;
  width: 100%;
  margin-top: var(--space-1);
}

.staff-pick .notice,
.staff-placements .staff-placement-form .staff-pick .notice {
  margin: var(--space-3) 0;
}

/* FORGE-747: the "Choose jurisdictions" form sits clear of the undo button above it. Existing tokens. */
.staff-hand-map-form {
  margin-top: var(--space-5);
}

/* S2.8 item 1 (L71): the cache line's figures open under its one sentence. */
.staff-cache > summary {
  cursor: pointer;
}

/* S2.8 item 4 (L72, W48): the allowance a re-run spends, one line in ink above the button. */
.staff-rerun-action p.staff-rerun-spend {
  margin: var(--space-4) 0 0;
  color: var(--ink);
  font-weight: 600;
}

/* S2.8 item 2: with the Job column gone the error takes the room, so Re-run and Resolve keep one
   row on a wide screen; on a phone they stack as before. */
@media (min-width: 40.01rem) {
  #failures .staff-act-buttons {
    flex-wrap: nowrap;
  }
}

@media (max-width: 40rem) {
  .staff-unconfirmed .staff-reading-row {
    background: var(--paper);
    border-top: var(--rule-ink);
  }

  .staff-unconfirmed .staff-reading-row + .staff-reading-row {
    border-top: var(--rule-hair);
  }

  .staff-unconfirmed .staff-reading-row td {
    background: none;
    border-top: 0;
  }

  .staff-unconfirmed .staff-rooftop-row td {
    padding-left: 0;
  }
}

/* ── FORGE-703 PR (b): the team, maintenance and content pages (design S2.10; ledger L89, L92,
   L95). Existing tokens only. ─────────────────────────────────────────────────────────────── */

/* L89 (S1.9): the team row's Change is a quiet button that opens the same disclosure. */
.staff-more-button > summary.btn-quiet {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  border: var(--border-1) solid var(--divider);
  border-radius: var(--radius-1);
  font-size: var(--text-small);
  color: var(--ink);
  text-decoration: none;
  list-style: none;
}

.staff-more-button > summary.btn-quiet::-webkit-details-marker {
  display: none;
}

.staff-more-button > summary.btn-quiet:hover {
  border-color: var(--primary);
}

.staff-more-button > summary.btn-quiet:focus-visible {
  outline: var(--border-3) solid var(--field-border-focus);
  outline-offset: 2px;
}

/* L92: the OFFLINE confirmation shows only while the form's mode is offline. A browser without
   :has() shows it always, as before, and the server's rule is the same either way. */
@supports selector(:has(*)) {
  form:has(select[name="mode"]) .staff-offline-confirm {
    display: none;
  }

  form:has(select[name="mode"] option[value="offline"]:checked) .staff-offline-confirm {
    display: flex;
  }
}

/* L92 (W57): Start now, folded under its summary, below Schedule. */
.staff-start-now {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: var(--rule-hair);
}

.staff-start-now > summary {
  cursor: pointer;
  color: var(--deep);
  text-decoration: underline;
}

.staff-start-now[open] > summary {
  margin-bottom: var(--space-3);
}

@media (max-width: 40rem) {
  .staff-more-button > summary.btn-quiet {
    min-height: 44px;
  }

  /* A 44 px target that keeps the disclosure's marker. */
  .staff-start-now > summary {
    padding: var(--space-3) 0;
  }
}

/* ── FORGE-658: the staff guides section ── (design docs/designs/2026-11-27-staff-guides.md §1.8;
   S1.7 of docs/designs/2026-11-26-899-staff-console-design.md, from the mock's guides frame). A
   34rem reading column, numbered steps, scripts in a ruled block, the foot under a hairline. The
   "On this page" menu folds on a phone after FORGE-657's pattern: closed under a 44px bar there,
   shown open with no bar on a desktop through ::details-content, and a browser without it keeps
   the bar. The "i" panel's guide line sits under a hairline when text precedes it. Tokens only. */
.staff-guide {
  max-width: var(--measure-prose);
}

.staff-guide-meta {
  margin: 0 0 var(--space-4);
  font-size: var(--text-small);
  color: var(--muted);
}

.staff-guide section {
  margin: 0 0 var(--space-5);
}

.staff-guide h3 {
  margin: var(--space-4) 0 var(--space-1);
  font-size: var(--text-body);
}

.staff-steps {
  margin: 0;
  padding-left: var(--space-5);
}

.staff-steps > li {
  margin: 0 0 var(--space-5);
}

.staff-steps > li > h2 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-h3);
}

.staff-script {
  margin: var(--space-2) 0 var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: var(--rule-hair);
  border-left: var(--border-4) solid var(--deep);
  color: var(--ink);
}

.staff-script p {
  margin: 0;
}

.staff-used-on {
  margin: var(--space-6) 0 0;
  padding-top: var(--space-3);
  border-top: var(--rule-hair);
  font-size: var(--text-small);
}

.staff-guide-list {
  margin: 0 0 var(--space-6);
  padding: 0;
  max-width: var(--measure-prose);
  list-style: none;
}

.staff-guide-list li {
  padding: var(--space-3) 0;
  border-bottom: var(--rule-hair);
}

/* The index's page guides sit in the site index's columns, under h3 group names: each column
   starts level, as the site index's h2s do. */
.staff-index h3 {
  margin-top: 0;
}

.staff-about-guide {
  margin: 0;
}

.staff-about-body > * + .staff-about-guide {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: var(--rule-hair);
}

.staff-guide-fold > summary {
  min-height: 44px;
  box-sizing: border-box;
  margin: 0 0 var(--space-3);
  padding: 0 var(--space-3);
  line-height: 44px;
  background: var(--card-bg);
  border: var(--rule-hair);
  font-weight: 600;
  cursor: pointer;
}

.staff-guide-fold[open] > summary {
  margin-bottom: 0;
  border-bottom: 0;
}

.staff-guide-fold > summary:focus-visible {
  outline: var(--border-3) solid var(--field-border-focus);
  outline-offset: 2px;
}

@media (width > 40rem) {
  @supports selector(::details-content) {
    .staff-guide-fold > summary {
      display: none;
    }

    .staff-guide-fold::details-content {
      display: block;
      content-visibility: visible;
    }
  }
}

/* ── FORGE-610: Skip to content ───────────────────────────────────────────
   The first thing a keyboard reaches on every customer and public page (html.js layout()).
   Off the top of the screen until it has focus, then over everything at the top left: moved by
   transform, never faded out or set to display none, so it stays in the tab order and the
   accessibility tree. Above the recorder bar (40) and the rail overlay (30). */
.skip-link {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 50;
  padding: var(--space-2) var(--space-3);
  border: var(--border-1) solid var(--ink);
  border-radius: var(--radius-1);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

@media print {
  .skip-link {
    display: none;
  }
}
/* ── end FORGE-610 */

/* ── FORGE-612: the state page's breadcrumb and its call to action ─────────
   Coverage > Texas above the H1, small and muted like the staff trail, with the separator drawn
   by CSS and given empty alternative text, so a screen reader reads two items, not a symbol. */
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  margin: 0 0 var(--space-3);
  padding: 0;
  list-style: none;
  font-size: var(--text-small);
  color: var(--muted);
}

.crumbs li + li::before {
  content: "\203A" / "";
  margin-right: var(--space-2);
  color: var(--muted);
}

.state-cta {
  color: var(--ink);
}
/* ── end FORGE-612 */

/* FORGE-721: the one line that says why a read-only member's work controls are withheld. */
.role-withheld {
  margin: var(--space-2) 0;
  font-size: var(--text-small);
  color: var(--muted);
}

/* ── FORGE-620 (design docs/designs/2026-11-27-review-pages.md 2.2, 2.3, 3; D15): the review
   pages' legend in the heading row, the warnings under the h1, and "Who it affects". Existing
   tokens only. Closed, the legend's button sits at the h1's row's end; open, it takes the row's
   full width under the heading, so it pushes the page down and covers nothing. ── */
.staff-legend {
  margin: 0;
  max-width: 100%;
}

/* The heading takes the row beside the closed legend, so a short h1 never wraps around its "i". */
.staff-head-row:has(> .staff-legend) > .staff-head-main {
  flex: 1 1 auto;
}

.staff-legend[open] {
  flex: 1 0 100%;
}

.staff-legend > summary {
  display: inline-block;
  padding: 0 var(--space-3);
  line-height: 44px;
  background: var(--card-bg);
  border: var(--rule-hair);
  font-weight: 600;
  cursor: pointer;
}

.staff-legend[open] > summary {
  margin-bottom: var(--space-3);
}

.staff-legend > summary:focus-visible {
  outline: var(--border-3) solid var(--field-border-focus);
  outline-offset: 2px;
}

.staff-legend-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4) var(--space-5);
  padding: var(--space-4);
  background: var(--card-bg);
  border: var(--rule-hair);
}

@media (width > 48rem) {
  .staff-legend-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.staff-legend-group h2 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-h3);
}

.staff-legend-group dl {
  margin: 0;
}

.staff-legend-group dl > div {
  margin: 0 0 var(--space-2);
}

.staff-legend-group dt {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.staff-legend-group dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.staff-legend-responses {
  grid-column: 1 / -1;
  margin: 0;
  padding-left: var(--space-5);
}

.staff-warnings {
  display: grid;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
}

.staff-warnings > .notice {
  margin: 0;
  overflow-wrap: anywhere;
}

.staff-impact-set {
  margin: 0 0 var(--space-5);
}

.staff-total {
  margin: var(--space-2) 0;
  font-weight: 600;
}

.staff-check-on {
  overflow-wrap: anywhere;
}

.staff-impact-more > summary {
  cursor: pointer;
  font-weight: 600;
  margin: 0 0 var(--space-3);
}

/* ── FORGE-627: the review pages' Cross-check row ──
   The last row of a facts strip, across both columns: a long sentence in the max-content first
   column would widen it and squeeze the second, and a row inserted mid-strip shifts every pair. */
.staff-facts > .staff-fact-wide {
  grid-column: 1 / -1;
}

/* ── FORGE-741 (a finding fixed here): the review pages' facts strips keep both columns ──
   A detail page's strip is the status strip with .staff-facts' two columns, whose first is
   max-content. Each pair there is one grid item, so a long value in the first column (the
   no-probe sentence under "Asked about", a long source name) took the whole measure and squeezed
   the second column to nothing. The first column now stops at half the strip; a short first
   column is laid out as before. The phone's one column is unchanged. */
.staff-status.staff-facts {
  grid-template-columns: fit-content(50%) minmax(0, 1fr);
}

@media (max-width: 40rem) {
  .staff-status.staff-facts {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* FORGE-751 (design docs/designs/2026-11-29-1075-address-unit-and-import-help.md 10.3): the import
   page's column help. Each column is a native <details>, closed, so it opens with no script under the
   CSP. The summary is a block: the name and Required or Optional on the first line, the short line
   under it, and More or Less, which follows the [open] state, at its end. The list keeps the running-text
   measure main > ul gives it; FORGE-753 owns the page's width. Tokens only. */
.col-list {
  list-style: none;
  padding-left: 0;
}

.col-list > li {
  border-bottom: var(--rule-hair);
}

.col-help > summary {
  display: block;
  list-style: none;
  padding: var(--space-2) 0;
  cursor: pointer;
}

.col-help > summary::-webkit-details-marker {
  display: none;
}

.col-help > summary:focus-visible {
  outline: var(--border-3) solid var(--field-border-focus);
  outline-offset: 2px;
}

.col-short {
  display: block;
}

.col-more,
.col-less {
  color: var(--deep);
  text-decoration: underline;
}

.col-help[open] .col-more,
.col-help:not([open]) .col-less {
  display: none;
}

.col-help > p {
  margin-top: 0;
}

/* FORGE-754. The location page's unit edit: a small form under the action line, a field sized for
   a 40-character unit, and its button a quiet one, as the page's second action is (M7). Below 40rem
   the field and button are full width and 44 px tall, FORGE-682's rule for a record's controls. */
.loc-unit {
  margin-top: var(--space-4);
  max-width: 24rem;
  gap: var(--space-2);
}

.loc-unit button {
  align-self: flex-start;
}

@media (max-width: 40rem) {
  .loc-unit {
    max-width: none;
  }

  .loc-unit input,
  .loc-unit button {
    min-height: 44px;
  }

  .loc-unit button {
    width: 100%;
  }
}

.location-answer-form,
.location-answer-form fieldset,
.location-answer-form select {
  min-width: 0;
  max-width: 100%;
}

.location-answer-choice {
  padding-block: var(--space-2);
}

.location-answer-choice label {
  display: block;
  overflow-wrap: anywhere;
}

.location-answer-choice input[type="checkbox"] {
  width: auto;
  min-height: 0;
}

.location-answer-review {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.location-answer-readout dd {
  margin-inline-start: 0;
}

@media (max-width: 40rem) {
  .location-answer-review {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── FORGE-763: a rooftop's rates page ──
   One lookup checks the placement and each rate, so the page is short: the pick first and the rates
   beside it on a wide screen (stacked in that order below), the whole rate folded to its totals, and
   each rate one card, what it is on the left and its decision on the right. Existing tokens only. */
.staff-status.staff-facts.staff-rooftop-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: none;
  margin-bottom: var(--space-4);
  padding: var(--space-3) 0;
}

.staff-rooftop-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
}

.staff-rooftop-pick h2,
.staff-rates-head h2 {
  margin: 0;
}

.staff-rooftop-pick .staff-pick {
  margin-top: var(--space-3);
}

.staff-rates-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--space-4);
}

.staff-rates-head .staff-count {
  margin: 0;
}

.staff-whole-fold > summary {
  padding: var(--space-2) 0;
  cursor: pointer;
}

.staff-whole-fold .staff-total {
  margin: 0 var(--space-3) 0 0;
}

.staff-one-form {
  margin: 0 0 var(--space-3);
}

.staff-rate-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3) var(--space-5);
  padding: var(--space-4) 0;
  border-top: var(--rule-hair);
  scroll-margin-top: var(--pinned-height, 0px);
}

.staff-rate-card h3,
.staff-rate-what > p,
.staff-rate-cross {
  margin: 0 0 var(--space-2);
  overflow-wrap: anywhere;
}

.staff-rate-figure {
  font-size: var(--text-h3);
  font-weight: 600;
  color: var(--ink);
}

.staff-rate-others {
  font-weight: 600;
  color: var(--ink);
}

.staff-rate-figure .staff-sub {
  font-weight: 400;
}

.staff-rate-check {
  display: grid;
  gap: var(--space-2);
  max-width: 34rem;
  margin: 0;
}

.staff-rate-check label {
  font-weight: 600;
}

.staff-rate-check p {
  margin: 0;
}

.staff-rate-check input[type="text"],
.staff-rate-card .staff-decision input[type="text"] {
  box-sizing: border-box;
  width: 100%;
  scroll-margin-top: calc(6rem + var(--pinned-height, 0px));
}

/* One field and one button: the button sits beside the field, so a card is three lines tall. */
.staff-rate-check-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.staff-rate-check-row > * {
  grid-column: 1 / -1;
}

.staff-rate-check-row > input[type="text"] {
  grid-column: 1;
  grid-row: 2;
}

.staff-rate-check-row > .staff-decision-actions {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  margin: 0;
}

.staff-rate-card .staff-decision {
  margin: 0;
}

.staff-rate-check + .staff-more {
  margin-top: var(--space-2);
}

.staff-next-rooftop {
  margin: var(--space-4) 0;
}

@media (width > 64rem) {
  .staff-rooftop-cols {
    grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
    gap: var(--space-6);
  }

  .staff-rate-card {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }
}

@media (max-width: 40rem) {
  .staff-status.staff-facts.staff-rooftop-facts {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-2);
  }

  .staff-rate-check input[type="text"],
  .staff-rate-check button {
    min-height: 44px;
  }
}

/* FORGE-773: the aggregator orders guide (/help/aggregator-orders) and its staff preview. Each
   agency passage is a blockquote with its source line under it; the not-advice box sits above
   the states. Long URLs, digests and statute text wrap rather than widen the page. */
.guide {
  max-width: var(--measure-prose);
  overflow-wrap: anywhere;
}

.guide-staff {
  max-width: none;
}

.guide-lead {
  font-size: var(--text-body);
}

.guide-not-advice {
  margin: var(--space-4) 0 var(--space-5);
  padding: var(--space-3) var(--space-4);
  border: var(--rule-hair);
  border-radius: var(--radius-1);
  background: var(--soft);
}

.guide-not-advice p {
  margin: 0;
}

.guide-jump {
  margin: 0 0 var(--space-5);
}

.guide-jump-label,
.guide-your-states,
.guide-city-lead {
  margin: var(--space-4) 0 var(--space-2);
  font-weight: 600;
}

.guide-jump ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-state,
.guide-staff-row {
  margin: 0 0 var(--space-6);
  padding-top: var(--space-3);
  border-top: var(--rule-hair);
}

.guide-state-none,
.guide-waiting {
  margin: var(--space-4) 0;
}

.guide-city {
  margin: var(--space-4) 0 0;
}

.guide-source blockquote,
.guide-staff-row blockquote {
  margin: 0 0 var(--space-3);
  padding: 0 0 0 var(--space-3);
  border-left: var(--rule-hair);
}

.guide-source blockquote p,
.guide-staff-row blockquote p {
  margin: 0 0 var(--space-2);
}

.guide-question {
  font-style: italic;
}

.guide-cite,
.guide-date,
.guide-late,
.guide-digest {
  margin: 0 0 var(--space-1);
  font-size: var(--text-small);
}

.guide-cite cite {
  font-style: normal;
}

.guide-date {
  color: var(--muted);
}

.guide-late {
  font-weight: 600;
}

.guide-merchants {
  padding-left: var(--space-4);
}

.guide-merchants li {
  margin: 0 0 var(--space-2);
}

.guide-merchants .guide-date {
  display: block;
}

.guide-footer,
.guide-entry {
  margin: var(--space-5) 0 0;
}

.guide-entry {
  margin-top: var(--space-3);
}

@media print {
  .guide-staff-row {
    break-inside: avoid-page;
  }
}

/* ---------------------------------------------------------------------
   FORGE-774 (design docs/designs/2026-12-02-1109-suggestions.md §8): Improvements and
   suggestions. Cards stack, long text wraps, and every action is a native form or
   <details>, full-width below 480 px. No script.
   --------------------------------------------------------------------- */

.suggestions {
  max-width: var(--measure-app);
}

.suggestion-lead,
.suggestion-statusline {
  max-width: var(--measure-prose);
}

.suggestion-statusline,
.suggestion-hint,
.suggestion-count,
.suggestion-month,
.help-idea-line {
  color: var(--muted);
}

.suggestion-new {
  margin: var(--space-4) 0;
}

.suggestion-empty {
  margin: var(--space-5) 0;
}

.suggestion-cards {
  display: grid;
  gap: var(--space-4);
  margin: var(--space-4) 0;
}

.suggestion-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: var(--space-4);
  overflow-wrap: anywhere;
}

.suggestion-card > * {
  margin: 0 0 var(--space-2);
}

.suggestion-card > :last-child {
  margin-bottom: 0;
}

.suggestion-kind {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--deep);
}

.suggestion-title {
  font-size: var(--size-300, 1.15rem);
  line-height: var(--leading-heading);
}

.suggestion-tag {
  display: inline-block;
  padding: 0 var(--space-2);
  border: 1px solid var(--divider);
  border-radius: 999px;
  color: var(--ink);
}

.suggestion-status,
.suggestion-mine-state {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  align-items: baseline;
}

.suggestion-reason {
  max-width: var(--measure-prose);
}

.suggestion-body,
.suggestion-status-note,
.suggestion-own-note,
.suggestion-staff-body {
  white-space: pre-wrap;
  max-width: var(--measure-prose);
}

.suggestion-hint {
  margin: 0;
}

.suggestion-card textarea {
  font: inherit;
}

.suggestion-own-note {
  border-left: 3px solid var(--divider);
  padding-left: var(--space-3);
}

.suggestion-voted {
  color: var(--primary);
}

.suggestion-vote-form,
.suggestion-note-form,
.suggestion-unvote-form,
.suggestion-withdraw-form,
.suggestion-form,
.suggestion-staff-form,
.staff-form {
  display: grid;
  gap: var(--space-2);
  justify-items: start;
  max-width: var(--measure-prose);
}

.suggestion-note-form textarea,
.suggestion-note-fold textarea,
.suggestion-form input,
.suggestion-form textarea,
.staff-form input[type="text"],
.staff-form textarea,
.staff-form select {
  width: 100%;
}

.suggestion-note-fold {
  width: 100%;
}

.suggestion-note-fold > summary {
  cursor: pointer;
  color: var(--deep);
}

.suggestion-note-fold[open] > summary {
  margin-bottom: var(--space-2);
}

.suggestion-terminal {
  margin: var(--space-5) 0;
}

.suggestion-terminal > summary {
  cursor: pointer;
  font-weight: 600;
}

.suggestion-mine {
  margin-top: var(--space-6);
}

.suggestion-mine-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.suggestion-mine-item {
  border-top: 1px solid var(--divider);
  padding-top: var(--space-3);
  overflow-wrap: anywhere;
}

.suggestion-mine-item > * {
  margin: 0 0 var(--space-2);
}

.suggestion-mine-title {
  font-weight: 600;
}

.suggestion-field,
.staff-field {
  display: grid;
  gap: var(--space-1);
  width: 100%;
}

.staff-section {
  margin: var(--space-6) 0 0;
}

.staff-head-action {
  margin: 0;
}

.suggestion-original {
  border-left: 3px solid var(--signal);
  padding-left: var(--space-4);
}

@media (max-width: 479.98px) {
  .suggestion-card button,
  .suggestion-mine-item button,
  .suggestion-form button,
  .suggestion-new .btn-primary,
  .staff-form button {
    width: 100%;
  }

  .suggestion-vote-form,
  .suggestion-note-form,
  .suggestion-unvote-form,
  .suggestion-withdraw-form,
  .suggestion-form,
  .staff-form {
    justify-items: stretch;
  }
}
