/* The console's look, and the layer underneath it.

   **Proportional, on a dark ground.** This file used to open by arguing that the
   console was "terminal-adjacent on purpose, and still deliberately so". That was
   a decision rather than a description, it is a *different* decision now, and
   `plans/console-beta.md` §2.1 is where it was taken: prose, headings and labels
   are set in the sans face, and monospace is kept for what an operator compares
   **down a column** -- a run id, a pid, a rate, a cost, a dotted settings path, a
   query, a log line, a timestamp, a figure in a `.stat` or a `.tally`, a table
   cell that is a number. Everything else is read *across*, as sentences, and a
   sentence set at a fixed pitch is slower to read for nothing in return.

   **Thirty-one rules set the mono face and every one of them was classified
   rather than left where it stood**: twenty-one kept it and ten moved. The
   classification is the table in the type block below, selector by selector,
   because the criterion this was done against is "a deliberate classification
   recorded in the file" and a rule that is *not* in that table is a rule somebody
   added without deciding.

   What does **not** change: the ground stays dark, the page stays
   server-rendered, there is no theme toggle, and the state-keyed left rule is
   still the card idiom -- so a fleet of five is scannable without reading any of
   it.

   **This sentence used to say "with one script tag" and `D6` is where that
   stopped being true.** It is **two** now -- a checksum-pinned htmx and
   `static/console.js`, both `src` under `/static/`, neither inline -- and the
   claim moved out of prose and into `tests/quality/test_console_scripts.py`,
   which is a stronger statement than the one it replaces: an invariant written
   in four comments and asserted nowhere is an invariant somebody can break by
   editing a fifth file. What has not changed is the property those four comments
   were *about*: every rule below is drawn by the browser off this file, no
   layout on this console is computed, and three of the four places that cited
   the count were citing it to say a log pins itself, a disclosure opens and a
   picture is drawn with **no script at all**. All three are still true.

   What is new is a **token layer**. Five milestones of appending left seven
   unnamed hex values repeated up to seven times each, eleven ad-hoc font sizes
   and four more in px, no spacing or radius scale, and no focus style on any
   button, nav link or table link. So this file now opens with the vocabulary
   and spends the rest of itself using it: a surface ladder that names the three
   greys and the two rules between them, a tone per status carried as raw RGB
   *channels* -- so a card's edge and a table row's wash are one colour at two
   alphas rather than two hand-mixed hexes -- and spacing, radius and type
   scales.

   **The values in that vocabulary were then measured, and moved.**
   `.claude/handoff/console-ui-punch-list.md` item 7: the three surfaces were
   within a few points of each other so nothing read as raised, the four status
   tones sat within eleven greyscale points of each other so a `.7rem` chip was
   told apart by hue alone, and the accent was a generic blue. Every number below
   is now a measurement rather than a guess -- the ladder is separated in L*, the
   four tones are separated in *value* as well as hue, the accent is violet
   because it is the only signature colour with no adjacency to a status hue, and
   every text/background pair the console can render is at WCAG AA. The one rule
   below that changed with them is `.chip`, and it says why where it is written:
   a tint whose ink is the same colour as the tint cannot reach 4.5:1 over
   *anything* at any alpha, so the chip's ground is the well rather than the
   card.

   **And every raised thing was carried by a border alone**, which is the other
   half of the same complaint: a card, a panel, a form and a popover all sat on
   the page as a rectangle with a hairline around it, so nothing was *above*
   anything. There is an elevation ladder now, three steps, and it is built out
   of the surface ladder rather than beside it -- a shadow here is the darkest
   surface at an alpha, so the deepest step of the ground is also what a thing
   casts onto it. Elevation follows the radius, which is what keeps a panel from
   reading as a card: a control or a card takes `--elev-1`, a panel takes
   `--elev-2`, and `--elev-3` is the one box that is in the browser's top layer.
   A *sunken* thing takes none, which is a different question from its corners.

   **The state table is the one place a state names a colour.** One line per
   state; every surface reads `--state` / `--state-ink` / `--state-edge` /
   `--state-wash` from whatever it inherited. It was written out five separate
   times before this -- once each for `.campaign`, `.run`, `.outcome`,
   `.logtail` and `.tally` -- so a seventh member of `CampaignRow.state` or
   `RunStatus` meant finding five tables, and four of them were found. Now a new
   status colours the card, the chip, the table row, the tally and the log line
   at once, or it is visibly neutral everywhere and nowhere else.

   ------------------------------------------------------------------------

   **`D0` re-valued every colour in this file from a design mock, and the mock
   is a direction rather than a specification.** The ground is warm charcoal
   instead of blue-black, the signature colour is periwinkle instead of violet,
   the tones are muted where they were near-neon -- chroma 25--43 against the
   48--56 they carried -- and the corners are 4/6/9/12 where they were 3/4/6/8.
   What did not survive transcription is the *arithmetic*, and
   `plans/console-design.md` §2.1 is where that was settled before a line was
   written: taken literally the mock puts seven of forty-four text pairs under
   4.5:1, its four status tones sit within twelve greyscale points of each
   other, and its three surfaces within 2.6 L* -- which is, almost verbatim, the
   punch-list item `B1` was opened to fix.

   **Four values are therefore different from the mock's, and each argues for
   itself where it is declared** -- that is the rule this file states about
   itself, and it is why the token blocks below are as long as they are. In
   summary: the well is deeper, because the mock's own sits 2.6 L* under its
   page and that is not a step a reader sees; the mock's fourth surface is not
   adopted at all, for the same reason read the other way; **a tone is two
   values now**, the mock's for what it paints and a lifted twin for what it
   writes; and `idle` moved down the ladder rather than sitting between two
   status tones.

   **The one value that did not move is the accent.** `#7e88b8` is a decision
   taken outside this file and it is pinned: it fills, it borders, it meters and
   it draws the focus ring, and where it would be *text* its lifted twin stands
   in. Nothing below re-derives it.

   ------------------------------------------------------------------------

   **`D2` turned the app bar on its side, and the ladder below is what that
   costs.** The chrome was a full-width strip with the brand at one end and seven
   links at the other; it is a **rail** now, and a page is a two-column shell.
   `plans/console-design.md` §2.3 is where the nav became a list and §4 is where
   the ladder was agreed. Three things follow from the flip and are decided here
   rather than at whichever rule spends them:

   * **The rail is not a fourth surface.** It takes the page tone and a right
     rule (§2.1). A raised sidebar is a fourth grey for a difference nothing can
     see, and at the width where the rail becomes a full-width top bar a second
     background reads as a banner rather than as a rail.
   * **The content column carries `min-width: 0`.** A flex item's floor is its
     content's min-content width, so without it the console's widest table pushes
     the whole shell sideways at every width instead of scrolling inside itself.
     That one declaration is what the 380px floor rests on now.
   * **The touch floor is scoped, not global.** `--tap` is declared with the rest
     of the vocabulary and *applied* only inside the second layer below, so
     desktop density -- the console's whole character -- is untouched.

   -- the breakpoint ladder: four steps, and `D3` gave back the fifth ---------

   **Custom properties cannot appear in a media query condition**, which is why
   every width here is a literal. The two that existed were literals with nothing
   written between them; these are the four, with what each is for and where its
   number comes from:

     69rem     the shell stops fitting: **derived, not chosen** -- `--page-width`
               is 68rem, and a gutter is the width at which the column plus the
               rail stops fitting the viewport. Every two-column split collapses
               here and the fleet card's action cluster un-pins from the right.
     56.25rem  the shell turns from a row into a column: the rail becomes a
               full-width top bar, its nav a wrapping pill row, its group labels
               a hairline between runs of pills. **The touch floor turns on
               here.** The mock's own second breakpoint is 900px and this is
               900px exactly rather than 56rem's 896: the floor it switches on is
               measured at 900 (`tests/tools/seot_measure.py`), and a rule that
               is off by four pixels at precisely the width somebody proves it at
               is a rule nobody can prove.
     44rem     content inside the column: `.facts` to one column. **Unchanged by
               `D2`** -- it does a different job from the two above it, and
               `.facts` collapsing is still right when the rail is already a top
               bar. `D3` took the *table* rule out of it; see below.
     30rem     a phone: gutters narrow, the padded boxes tighten. **Unchanged
               apart from the two `.appbar` rules the second step obsoleted**,
               which are deleted rather than left.

   **The fifth entry is gone, and deleting it is `D3`'s, and it is the useful
   half of a defect somebody saw in a picture.** `D2` added a `56.26rem..69rem`
   *range* because a table scrolled by turning into a block at 44rem and that
   query is keyed to the **viewport**, which the rail had just stopped being the
   same thing as the content column -- so at 901px the column is 629px and the
   sessions table wanted 696, and the range was the correction. It was correct
   arithmetic about the wrong mechanism. A table scrolls because the box around
   it scrolls, and the box around it is a *width-independent* fact: `ui.table`
   renders a `.tablewrap` now, so a table that does not fit its column scrolls at
   **every** width and no query decides it. Both `table { display: block }` rules
   are therefore deleted, the range with them, and the ladder is the four steps
   `plans/console-design.md` §4 asked for rather than the four plus the one the
   old mechanism cost. The comment `D2` left on the range said the honest thing
   -- that the 44rem step "rested on an assumption the rail falsified" -- and the
   answer to a falsified assumption is to stop resting on it, not to bound the
   damage.

   A media query carrying a **width** that is not in this table is a breakpoint
   somebody added without deciding. **The app (`/app`) is the one exception
   with a ledger of its own**: two `min-width` steps, 48rem (a tablet held
   upright: the phone column becomes a dashboard) and 64rem (a laptop: a
   campaign's two columns), every rule under them scoped to `.phone`, written
   down with their reasons at the end of the phone section. No console page
   meets either. (The one query below that carries no width is
   `prefers-reduced-motion`, which is a preference rather than a step, and it
   says so where it is written.) */

/* -- the faces, and they are served from this console's own origin -----------

   **Five files, and every one of them is a weight a rule in this file asks
   for.** The set was not chosen from the mock and it was not chosen from taste:
   a browser was driven over every page in the three states `seot_measure.py`
   walks, and every element with a text node of its own was asked for its
   computed `font-family`, `font-weight` and `font-style`. It came back with
   seven combinations, and **two of the seven were asked for by a user-agent
   default rather than by a rule** -- `.mark` is an `<h1>`, and `.tally b` /
   `.spend b` / `.reading b` / `.stat b` are `<b>`, and not one of the five named
   a weight. `D4` is the stage the block above named as the one that had to
   decide them, and it decided them **down to 600**:

     sans 400          1318 elements   prose, labels, links, everything unsaid
     sans 600           351 + 76       `h2`, `h3`, `th`, `.chip`, every button,
                                       every legend -- and now `.mark` and every
                                       `<b>` in a sentence, which were the 76
     sans 400 italic     38            `.note`, `.skipped`, `.reading .asof`
     mono 400           631            values, ids, paths, queries, log lines
     mono 600           74 + n         `.log b`'s event name, which the `D1a`
                                       walk did not count on its own -- and now
                                       `.tally b`, `.spend b`, `.reading b` and
                                       `.stat b`, which were the 74

   The counts are `D1a`'s and only the two 700 rows moved, so they are added
   rather than re-measured; the `n` is a letter and not a number because that
   row's own figure was never taken. **The names beside them were incomplete and
   the deletion is what found it**, which is worth recording as a lesson about this
   kind of audit: a *computed-style* count sees every element, and the two lists
   somebody wrote next to the numbers did not -- "sans 700: `.mark`, and nothing
   else" over 76 elements on 33 page-states, when there is one `.mark` per page
   and the rest were bold words inside sentences; "mono 700" naming three rules
   when there were four, `.stat b` being the one nobody had listed. A count and a
   list beside it are two claims, and only one of them was measured.

   Three reasons, and the third is the smallest. **Nothing had decided 700** --
   it is what a browser draws for `<h1>` and `<b>` when a stylesheet is silent, in
   a file whose whole contract is that a rule not in a table below is a rule
   somebody added without deciding. **600 is already this console's emphasis
   weight everywhere anybody did decide one**: every heading, every `th`, every
   chip, every button, every legend, `.reading .who`, and -- the one `<b>` that
   was decided rather than defaulted -- `.log b`. Two emphasis weights with no
   rule saying which is a system with one too many. And two of seven files is
   **37.8KB of 137KB**, on a console the paragraph below reaches over an SSH
   tunnel.

   So `b { font-weight: 600 }` and `.mark { font-weight: 600 }` are declared
   rather than left to the browser's own weight matching, which would have
   substituted 600 for the missing 700 and drawn the same pixels off a *silence*.
   The two files, their `@font-face` blocks and their two `[binaries.*]` rows in
   `seot/versions/pins.toml` are deleted in the same commit, which is what
   `test_the_table_is_every_file_the_console_serves_that_it_did_not_write`
   exists to make impossible to do by halves.

   **Subsetted, because this console is reached over an SSH tunnel.** The five
   complete faces are 290KB; these are **99KB**, and the coverage is ASCII plus
   Latin-1 plus Latin Extended-A plus the twelve marks the console draws: the
   two dashes, the four quotes, the ellipsis, the four arrows and the tick.
   Latin Extended-A is the one piece of that which is insurance rather than
   measurement: a campaign's name, its query pool and its target URL are all
   operator-supplied, and a Polish or Turkish name should not be drawn half in
   one face.

   **The fallback stack under `--font-sans` / `--mono` is load-bearing twice
   over, and the second reason is the surprising one.** The first is the ordinary
   one: a file that does not arrive -- a stripped deploy, a checksum that will
   not verify once `verify_asset()` covers these -- falls back to what the two
   names said before this block existed. The second is that **IBM Plex does not
   draw three of the characters the console renders on nearly every page**: `ⓘ`
   (U+24D8, in `ui.info`, 498 of them across the dump) and the `▸` / `▾`
   (U+25B8 / U+25BE) a `.knobgroup` summary sets in `content`. Neither face has
   ever had them. So those three glyphs resolve *per character* to the next
   family in the stack, on every page, for ever -- which is why no
   `unicode-range` is declared here. A range would make the fallback a rule the
   two names have to be kept in sync with; leaving it off makes it the browser's
   own per-glyph substitution, which is the mechanism the ⓘ proves every time
   the console is opened.

   `local()` comes first in each `src` so a machine that already has IBM Plex
   installed spends no bytes and gets the full face. It names the **style**, not
   the family: `local("IBM Plex Sans")` inside a 600 block would match the
   Regular on such a machine and hand the browser a face to fake the weight from.

   `font-display: swap` because the alternative is worse in both directions --
   `block` hides a status console behind a blank page while a font loads, and
   `optional` means the first visit after a deploy silently draws in the fallback
   and the design is one nobody can photograph.

   Provenance: `@ibm/plex-sans` and `@ibm/plex-mono`, both **1.1.0**, from the
   npm registry; subsetted with `fonttools` 4.63.0. IBM Plex is OFL-1.1 and the
   licence travels with the files as `fonts/OFL.txt`. */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("IBM Plex Sans"), local("IBMPlexSans"),
       url("fonts/ibm-plex-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: local("IBM Plex Sans Italic"), local("IBMPlexSans-Italic"),
       url("fonts/ibm-plex-sans-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: local("IBM Plex Sans SemiBold"), local("IBMPlexSans-SemiBold"),
       url("fonts/ibm-plex-sans-600.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("IBM Plex Mono"), local("IBMPlexMono"),
       url("fonts/ibm-plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: local("IBM Plex Mono SemiBold"), local("IBMPlexMono-SemiBold"),
       url("fonts/ibm-plex-mono-600.woff2") format("woff2");
}

:root {
  /* -- what the user agent draws, and this is the one declaration that tells
     it ------------------------------------------------------------------

     **A UA default is invisible to a contrast model**, which is the lesson `B3`
     paid for: a link in prose took the browser's own `#0000EE` at 1.8:1 and the
     script that models every pair could not see it, because it reads tokens and
     that was a colour the console never set. `B4` is the forms, and the forms
     are where the rest of those defaults live -- a `<select>`'s drop-down list,
     a number input's spinners, a checkbox's tick, a scrollbar, and the
     validation bubble a required field pops when it is refused. None of them is
     styleable rule by rule and every one of them was being drawn light-on-white
     inside a console that is otherwise near-black.

     `color-scheme: dark` is the whole fix and it is one line: it tells the user
     agent which of its two palettes to render its own widgets from. Measured in
     Chromium -- the option list, the spinners, the scrollbar and the bubble all
     come back dark. It changes nothing this file already paints, because every
     surface here names its own background.

     `accent-color` is the second half and is about identity rather than
     legibility: a checkbox on `/config` was ticked in the browser's blue on a
     console whose accent is violet, which is one control on every settings page
     drawing a colour that is not in the palette at all. */
  color-scheme: dark;
  accent-color: var(--accent);

  /* -- the surface ladder ------------------------------------------------
     Three greys, darkest first, and the rules that separate them. `sunken`
     is the one that appeared seven times unnamed: it is what you type into, what
     a log is read out of, the track a meter fills, and -- because it is the
     darkest thing here -- the ink on a filled button of either kind.

     **Spaced in L*, and that is what the whole ladder is for.** At this end of
     the scale a contrast *ratio* between two near-blacks is ~1.2 whatever you
     do and says nothing about whether an eye can see the edge; L* does. Before
     `B1` the three surfaces were 1.6 and 3.9 points apart, so nothing read as
     raised and the card borders carried the whole hierarchy; `B1` opened that
     to 3.0 and 6.1.

     **`D0`'s ladder is the mock's page and card with a deeper well under
     them**: L* 6.7 -> 10.8 -> 15.1, gaps of 4.0 and 4.3. The page and the card
     are the mock's own values and did not move. The well did, and it is the
     first of this stage's four deviations: **the mock's own well is `#16181c`,
     2.6 L* under its page**, which is under the 3.0 `B1` measured as the
     smallest step a reader sees -- and it is the step between a form and the
     box you type into, which is the one place on this console that a person
     puts a cursor. `#131519` is the same hue three points further down.

     **The mock's fourth surface is not adopted.** It draws a `#1f2126` raised
     step for the sidebar rail, 1.5 L* over its page: a fourth name for a
     difference nothing can see, and at the width where the rail becomes a
     full-width top bar a second background reads as a banner rather than as a
     rail. The rail takes the page tone and a rule, which is `D2`'s to draw.

     The two rules above the surfaces are the mock's, and `--rule-strong` and
     `--rule-hover` are its other two: the ladder is re-valued as a ladder
     rather than as the two members that happen to be spent today, the same way
     `--sp-*` and `--fs-*` are declared whole. `D2` and `D4` are the stages that
     spend them. */
  /* The bottom step is declared as **channels** and the colour derived from
     them, the way the tones below are, because it is needed at an alpha as
     well as flat: the elevation ladder casts this surface rather than black,
     so the shadow under a card and the well a chip sits in are one value and not
     two that can drift. `rgb(19 21 25)` is `#131519` exactly. */
  --rgb-sunken: 19 21 25;
  --surface-sunken: rgb(var(--rgb-sunken));
  --surface-page: #1b1d22;
  --surface-panel: #23262c;
  --rule-soft: #2a2e35;
  --rule-line: #31353d;
  --rule-strong: #3a3f48;
  --rule-hover: #454b56;

  /* The old names, kept because they read better at the point of use and
     because every rule below already speaks them. */
  --bg: var(--surface-page);
  --panel: var(--surface-panel);
  --line: var(--rule-line);

  /* -- ink ---------------------------------------------------------------
     Both are the mock's and both went up with the ladder: a lighter card is a
     higher floor for everything written on it. `--dim` is the secondary ink and
     the pair that binds it is not the page but a *washed* table row -- a
     sessions row is tinted in its own tone, so `--dim` in a cell sits on a
     lightened panel, and the value here clears 4.5:1 on every wash any state
     can produce, the brightest of which it makes at 5.35:1.

     **The mock's third ink is not adopted.** It carries a `#7f848e` faint step
     under these two, which measures 4.04:1 on its own card and is the value the
     mock leans on for a lot of small print. This file's ink scale is two steps
     and nothing in it needs a third; if `D4` finds a rule that does, the
     equivalent that clears the floor is about `#898d96` and it lands there,
     with its measurement, rather than being declared here on spec. */
  --ink: #dfe1e5;
  --dim: #a1a6b0;
  /* Ink for a filled accent surface. The same value as `--surface-sunken`, and
     named separately because it is doing the opposite job. `.btn-danger` takes
     it too: `#fff` on the red fill measured **3.09:1** and was the loudest
     failing pair on the console. Dark ink on both filled buttons is also one
     rule rather than two.

     **It is verified on every ground that can be filled, not just the two
     buttons**: `a.chip:hover` fills a chip with whatever tone reached it, so
     all five are checked, and the dimmest of them (`bad`) carries this ink at
     4.77:1. That is also the floor under the fill ladder below -- a tone dimmer
     than grey 126 cannot hold this ink at 4.5:1. */
  --ink-inverse: var(--surface-sunken);

  /* -- tones, as channels ------------------------------------------------
     Raw `R G B` rather than a colour, so one tone yields a border and a row wash
     by changing only the alpha. Anything that needs the colour itself takes the
     named alias underneath.

     **A tone is two values now, and that is the third of `D0`'s four
     deviations.** The mock's tones are muted -- which is the half of its
     direction that matters most, chroma 25--43 against the 48--56 this console
     carried -- and muted on a dark ground means dim: as text on the mock's own
     card they measure 3.96 / 4.21 / 4.40 / 4.40:1, four failures out of four.
     The naive repair is to brighten each until it passes, and it is worse than
     the disease: it lands `bad` and `accent` on the same greyscale value, which
     is the defect `B1` was opened to fix, and it throws away the mock.

     So each chromatic tone keeps the mock's value for what it **paints** and
     gains a twin -- same hue, same chroma, higher L* -- for what it **writes**:

       paint    a 9% row wash, a filled button, a meter's bar, the ground a
                chip takes on hover, the focus ring, the 16% nav tint. One of
                these is on screen at a time and none is compared to the one
                beside it, so the mock's own value stands.
       write    every character the console sets in a state colour, **and the
                two marks that are read instead of a word**: the rule down a
                card's left edge and the edge around a chip. Those are writing
                rather than painting because their whole job is to be told apart
                from the one on the next card -- and on the mock's paint values
                `running` and `stopped` are four greyscale points apart, which
                is the fleet's most-read distinction drawn in a difference
                nobody can see. On the written values they are fifty-two.

     **The written ladder is what carries the separation**, and it is the
     measurement `B1` asked for. Desaturated to greyscale -- which is what a
     red-green deficiency does to `good` against `bad`, and what a `.7rem` chip
     does to everything -- it reads
     **idle 144 < bad 160 < accent 178 < good 196 < warn 214**: gaps of 17 / 17
     / 19 / 18, against `B1`'s 13 / 26 / 23 / 20. Evener, and its smallest gap
     is bigger. The span is bounded at both ends and the bounds are why it is
     not wider: a tone dimmer than grey 140 cannot make 4.5:1 as text on
     `--surface-panel`, and a tone much past 214 stops being a hue.

     **The painted ladder is not separated and does not have to be**, which is
     worth saying plainly rather than leaving as a silence: it reads
     bad 130 < accent 138 < idle 144 < good 146 < warn 162, and two of its five
     members are pinned -- the accent by a decision outside this file, the floor
     at grey 126 by `--ink-inverse` needing 4.5:1 on top of it -- so five values
     cannot be spread across the 36 points left. Every one of them is either a
     ground (a wash, a fill) or a one-at-a-time mark (a ring, a meter), and each
     is drawn on a card that also draws the same state's chip in the written
     value.

     **`idle` has one value rather than two, and it moved.** It is achromatic,
     it already sits at the bottom of the written ladder, and a lifted twin
     would be a token that says nothing. What moved is the mock's `#979ca6`,
     grey 156, which lands *between* `good` and `warn` -- so a chip that means
     "nothing is happening" would be a greyscale match for one that means "it
     did the thing". Below `bad` is where this console has always put it, and it
     is the one pair here greyscale cannot separate: it is achromatic by design,
     and every surface that renders it also renders the state's own name as a
     word (`identity`'s badge, `.log .level`), so the colour is the redundant
     half there.

     **`--rgb-accent` is periwinkle and is pinned.** It is a decision taken
     outside this file, and the adjacency argument that chose violet before it
     still holds for it: the accent also means `running`, so it is on screen
     beside `ok`, `warn` and `bad` at chip size, and a periwinkle has no
     neighbour among a sage, an ochre and a dusty rose. Its written twin is the
     mock's own `a:hover`, so both halves of the pair come out of the mock.

     Both sets of aliases are declared whole, and three of the eight have no
     call site today: nearly everything below reaches a tone through the state
     table rather than by name, which is why `--ok` was already an alias nothing
     spent before this stage. They are a vocabulary rather than a usage list --
     the same argument the rule ladder above makes for its two new steps. */
  --rgb-accent: 126 136 184;
  --rgb-good: 111 156 125;
  --rgb-warn: 199 154 85;
  --rgb-bad: 192 106 99;
  --rgb-idle: 139 144 154;

  --rgb-accent-ink: 167 176 216;
  --rgb-good-ink: 160 207 174;
  --rgb-warn-ink: 251 207 146;
  --rgb-bad-ink: 226 136 127;

  --accent: rgb(var(--rgb-accent));
  --ok: rgb(var(--rgb-good));
  --warn: rgb(var(--rgb-warn));
  --bad: rgb(var(--rgb-bad));

  --accent-ink: rgb(var(--rgb-accent-ink));
  --ok-ink: rgb(var(--rgb-good-ink));
  --warn-ink: rgb(var(--rgb-warn-ink));
  --bad-ink: rgb(var(--rgb-bad-ink));

  /* The tone nothing has claimed, in both halves. Every chip and card in the
     templates today sits inside an element carrying a state class, so this is a
     floor rather than a case that renders -- but a floor that reads as "no
     state" instead of as a colour somebody meant. `idle` is its own written
     value, so the two lines name the same channels. */
  --state-rgb: var(--rgb-idle);
  --state-ink-rgb: var(--rgb-idle);

  /* -- type --------------------------------------------------------------
     Two faces, and which one a rule takes is the classification recorded at the
     bottom of this block. `--font-sans` is the console's face: it is what `body`
     sets, so *not* naming a face is now the same decision as naming the sans
     one. `--mono` is named only where a column of values has to line up.

     **Both names now resolve to a face this console ships, and until `D1` they
     resolved to whatever the reader's box happened to have.** `system-ui` is
     four different typefaces on four operating systems and `ui-monospace` is
     four more, so every width on this console -- a chip's, a button's, a table
     column's, the 380px floor `seot_measure.py` guards -- was measured against
     one of eight combinations and asserted about all of them. IBM Plex Sans and
     IBM Plex Mono are one pair everywhere, they are a **designed pair** (same
     drawing, same vertical metrics, so a mono value beside a sans label sits on
     the same baseline without a per-rule nudge), and they are OFL-1.1, which is
     what makes vendoring them same-origin legal as well as possible. The
     `@font-face` blocks that declare them are above `:root`; what they weigh and
     why there are seven of them is argued there.

     **The stacks behind them are kept exactly as they were**, and they are not
     decoration. Two things fall back to them: a face that does not arrive, and
     the three characters IBM Plex has never drawn -- the `ⓘ` and the two
     disclosure triangles, which resolve per glyph on every page the console
     renders. Deleting the tail of either list would leave the first case with
     the browser's default serif and the second with a hollow box. */
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Seven steps, each with a job, replacing fifteen ad-hoc sizes.
     **Step 7 is no longer declared-and-unused**: it was written down when this
     scale was, nothing ever referenced it, and the page title was set at step 6
     -- so the scale had a display step on paper and none on screen. `.mark` is
     step 7 now, and it is the only thing on the console that is. */
  --fs-1: .7rem;      /* uppercase micro-labels: chips, table headers, legends */
  --fs-2: .75rem;     /* mono meta: run ids, pids, hints, log lines */
  --fs-3: .8rem;      /* small prose: notes, field labels, table cells */
  --fs-4: .85rem;     /* the card's own lines, and form controls */
  --fs-5: .9375rem;   /* body */
  --fs-6: 1rem;       /* a thing's own name, a number worth reading */
  --fs-7: 1.4rem;     /* the page title, and nothing else */

  /* A line-height **per step, not per rule**, which is what this file did before:
     `/1`, `/1.4`, `/1.5` and `/1.6` were spelled into eleven `font:` shorthands
     and the other fifty-odd sized rules took whatever `body` happened to say.
     Two rules at the same step disagreeing about their leading is a rhythm
     nobody chose.

     Steps 3, 4 and 5 are the reading steps and share one value, so they are the
     value `body` sets and **a rule at those steps names no line-height** unless
     it uses the `font:` shorthand, which forces one. Inheritance is the
     mechanism; writing `--lh-3` onto forty rules that already have it would be
     noise standing in for a decision. Steps 1, 2, 6 and 7 differ from what they
     would inherit, so every rule at those steps names its own.

     **`--lh-1` is solid leading and any single-line label takes it, whatever its
     step** -- the same argument `--ls-caps` makes one paragraph down. A chip, a
     `th`, a legend, a button and a section heading are each one line aligned by
     the box around it, so a line box with leading inside it is a control taller
     than its own label for no reason. Step 1 is where they mostly sit, which is
     why the value is declared there rather than under a sixth name. */
  --lh-1: 1;          /* solid: one line, aligned by its box */
  --lh-2: 1.6;        /* log lines: the one place leading is scanability */
  --lh-3: 1.5;
  --lh-4: 1.5;
  --lh-5: 1.5;        /* the reading value, and what `body` sets */
  --lh-6: 1.4;
  --lh-7: 1.2;        /* display: the bigger the type, the tighter the leading */

  /* Tracking, and it is named in exactly the two places the font's own metrics
     are wrong for the job rather than as seven tokens of which five would be
     `0`. A face is drawn for lower case at reading size; capitals set solid look
     packed, and display sizes look loose, because the side bearings a font ships
     are a proportion of the em and the eye's tolerance is not.

     `--ls-caps` is a function of **case**, not of size, which is why it is one
     token rather than a column of the scale: the console sets capitals at three
     different steps -- a chip and a `th` at 1, a group's legend at 2, an `h2` at
     3 -- and all three want the same air between letters. */
  --ls-caps: .05em;
  --ls-display: -.01em;

  /* -- the mono/sans classification, all thirty-one rules ----------------
     The criterion (`plans/console-beta.md` §4) is what an operator *does* with
     the string: mono if it is compared down a column or copied into a shell,
     sans if it is read. Twenty-one rules kept the mono face, ten moved. Both
     lists are here rather than as thirty-one comments scattered through the
     file, because the question "is this console's use of monospace deliberate"
     is answered by a list or it is not answered.

     **A rule written after that audit joins this table, or it is a rule
     somebody added without deciding** -- which is what the header says and is
     the only thing that keeps the list from being a snapshot of one afternoon.
     `B2`'s two are the first: `.version` below, and `.channel` beside the `.env`
     it shares a shape with. `B3` adds three and *replaces* one: `td.when` and
     `td.num` are the two cell kinds the tables name at their call sites, and
     they take over from `.history td:first-child`, which classified one column
     of one table by counting; `.retired` is a campaign's own quiet tag. **`B4`
     adds two and drops a name from two more**: `.fieldgroup > legend` and
     `.field .mark` are the two micro-labels the forms grew, and the `.kv` half
     of `.kv dt` / `.kv.error dd` is gone with the alias -- see the primitives
     block, where the argument for retiring it is written. So the lists are the
     audit's thirty-one plus whatever has been added on purpose since, and the
     count of each is a `grep` rather than a number written here that can go
     stale.

     **Mono, and why** -- the string is a value, an identifier or a figure:

       `code`                              a command, a path or an id, inline
       `.reading b`                        the bar's two figures
       `.version`                          the build that drew the page
       `.stat b`, `.stat .value`           a figure in a strip
       `.stat .unit`                       what the figure is *of*, and it ends
                                           in a figure -- `of 495`, compared to
                                           the `of 495` on the day below. `D3`'s,
                                           and the one entry on either list whose
                                           argument is about the *tail* of the
                                           string rather than the whole of it
       `.facts.error dd`                   a serialised error
       `.field input`, `.field select`     a URL, a count, a tz id, a geo code
       `.field textarea`                   the query pool, one query per line
       `.field ::placeholder`              an *example* value, in the box the
                                           value goes in -- so it is the same
                                           face as the value or it does not
                                           show what the box wants
       `.batch .target`                    a URL
       `.took`, `.rid`                     a duration and a run id
       `.log`                              log lines, and the four columns in one
       `.logstate .path`                   an absolute artifact path
       `.knob .path`                       a dotted settings path
       `.knob input`, `.knob select`       a setting's value
       `.skipped .path`                    a dotted settings path
       `.target`                           a URL
       `.rate`, `.pid`                     a rate and a pid
       `.day .when`                        a date
       `.pool`                             queries
       `.tally b`                          a figure in a tally
       `.spend b`                          a cost
       `.sessions td.query`                a query
       `td.when`                           a table cell that is a date or a
                                           timestamp, in either table
       `td.num`                            a table cell that is a figure: a
                                           duration, a count, a cost
       `.sessions td.cost`                 a cost, to four decimals

     **Sans, and why** -- it is a heading, a micro-label or prose, and none of
     them is ever compared to the one above it:

       `.reading .label`                   SLOTS / SPEND, a micro-label
       `.channel`, `.env`, `.retired`      a channel, an environment and a
                                           campaign nobody will run again: three
                                           micro-labels, one shape, one rule
       `h2`                                a heading
       `h3`                                a heading
       `.chip`, `.badge`, `.outcome`, `.warn-chip`   a micro-label
       `.stat .label`                      a micro-label
       `.facts dt`                         a micro-label
       `.fieldgroup > legend`              a micro-label naming a group of
                                           fields, in the same shape as every
                                           other one on the console
       `.field .mark`                      `required` / `read-only`: a word
                                           about the control rather than a value
                                           in it, which is the whole criterion.
                                           The one entry on this list that is
                                           *not* set in the micro-label shape,
                                           and the rule says why
       `.disclose > summary`               a control wearing a `<summary>`: it
                                           opens the create form, and it was
                                           drawn as a heading until it read as
                                           one with nothing under it
       `.knobgroup > summary .legend`      a micro-label
       `table th`                          a column's name, read once
       `.navgroup .grouplabel`             a micro-label naming a run of nav
                                           links -- `D2`'s one addition, in the
                                           same shape as every other one on the
                                           console, which is why it is written
                                           here rather than beside the rail

     The two that are worth arguing about are recorded as arguments rather than
     as entries. A **form control** stayed mono: what is typed into one here is a
     URL, a daily count, an IANA timezone, a two-letter geo and a pool of
     queries, every one of which is also an argument to `seot campaigns create`,
     and the pool in particular is a column of lines whose whole point is that
     they line up. A **`th`** moved: a column header is read once to find out
     what the column is, and it is the cells under it -- not the headers beside
     it -- that have to align. */

  /* -- space ------------------------------------------------------------- */
  --sp-1: .25rem;
  --sp-2: .4rem;
  --sp-3: .6rem;
  --sp-4: .75rem;
  --sp-5: 1rem;
  --sp-6: 1.5rem;
  --sp-7: 2rem;

  /* -- radius ------------------------------------------------------------
     The de-facto 3/4/5/6/8 collapsed to four, with 5 folded into 4, and `D0`
     re-valued the four to the mock's. Every step went up and the ratio between
     them barely moved, so nothing below has to be re-decided: a card is still
     rounder than a chip and a panel is still rounder than a card. */
  --radius-1: 4px;    /* a meter */
  --radius-2: 6px;    /* a chip, a control */
  --radius-3: 9px;    /* a card */
  --radius-4: 12px;   /* a panel */
  /* A pill, which is a shape rather than a step: the number only has to beat
     half the element's height, so it is not on the ladder above and cannot be
     interpolated with it. It was the literal `999px` in the app bar's nav; the
     rail draws its links as blocks and it is spent under 56.25rem, where they
     become a wrapping row of pills -- and, since `D4`, where a chip that opens a
     `.why` takes it too. Both spends are the same sentence: **under the flip,
     this is the shape of a thing you press that is not a `<button>`.** */
  --radius-pill: 999px;

  /* -- elevation ---------------------------------------------------------
     Every raised thing on this console was a rectangle with a hairline round it,
     so a card, a panel, a form and a popover all sat in the same plane and
     hierarchy rested entirely on borders.

     **The shadow colour is the ladder's own bottom step, not black.** The page
     is `--surface-page` at L* 4.4 and `--surface-sunken` is L* 1.4, so a shadow
     mixed toward the sunken surface darkens the ground by about the same step
     the ladder already uses between two surfaces -- which is the step this
     console was measured to need. Black would be a sixth grey nobody chose, and
     at this end of the scale it is barely a wider gap than the one below.

     Three steps, and which one a raised thing takes **follows its radius**, so a
     panel cannot come out reading as a card: a control or a card (`--radius-2`,
     `--radius-3`) takes `--elev-1` and a panel (`--radius-4`) takes `--elev-2`.
     `--elev-3` names its own case rather than a radius: the popover is in the
     browser's top layer, floating over a page it does not belong to, and how far
     off that page it appears is the only thing separating it from the panel
     behind it.

     A **sunken** thing takes none of them, and that is a different question from
     how big its corners are: a chip in its well, a meter's track and every text
     input are `--surface-sunken` on purpose and a shadow would argue with the
     one thing they have in common. */
  --elev-1: 0 1px 3px rgb(var(--rgb-sunken) / 70%);
  --elev-2: 0 3px 10px rgb(var(--rgb-sunken) / 75%);
  --elev-3: 0 12px 32px rgb(var(--rgb-sunken) / 85%);

  /* The state rule down a card's left edge. One width, everywhere it appears. */
  --edge: 3px;

  /* **`--page-width` was here and it is gone.** It was 68rem of `max-width` on
     `<body>` with `margin: 0 auto`, so the whole shell -- rail included -- was a
     1088px strip centred in whatever screen it was opened on: 176px of empty
     page down each side at 1440, 416px at 1920, and a rail that got narrower in
     absolute terms as the monitor got wider. The design mock draws the shell
     edge to edge and caps *individual pages* instead, which is the honest
     version of the same idea and is what `main[data-page]` below does.

     It is deleted rather than left at a value nothing reads, which is this
     file's own rule about undecided rules. Four comments still name it and each
     of them is a history: the ladder at the top of this file derives its first
     breakpoint from it, and `--gutter`, `--rail` and `--knob-col` were all
     classified by pointing at it. Nothing computes from it.

     The page's own side padding. It was a literal in `body` and in one media
     query, and a token because the app bar cancelled it with a negative margin
     to bleed to the edges of the column -- a pair that can drift. **The rail
     bleeds nothing**, so the second reader is gone and the reason is now the
     ordinary one: two of the four breakpoints below redeclare it, and a padding
     spelled in three places is a padding that is right in two of them. A layout
     value, like `--page-width` and `--knob-col`.

     **2rem rather than 1.5rem since the shell went full-bleed**, which is the
     mock's own 32px. It was a gutter inside a centred strip that already had
     176px of air beside it; it is now the only thing between the reading column
     and the edge of the screen. */
  --gutter: var(--sp-7);

  /* -- the shell -------------------------------------------------------
     Three layout values `D2` needs and `config/` could not honestly decide, in
     the same category as `--page-width` and `--knob-col` above.

     `--rail` is the nav column's width, and it was **measured rather than
     chosen**: the longest label the nav can draw is `Configuration`, which sets
     at 13 characters of `--fs-3` sans, and the value was that plus the link's
     own padding either side, rounded to the space scale's rhythm. That
     measurement gave 12.5rem and it is not wrong -- it is the floor. **The mock
     draws 238px** and the difference is what the rail gained: a footer holding a
     labelled meter (`Browser slots` over `6 / 8` over a track), which is three
     things across where the nav is one, and a brand block whose mark, channel
     chip and version now sit on two lines rather than four. 14.875rem is the
     mock's figure to the pixel at a 16px root. */
  --rail: 14.875rem;

  /* The rail's own surface, and **this is a reversal on the record.** `D2`
     refused it in as many words: the mock's `#1f2126` is 1.5 L* over the page,
     "half the smallest step `B1` measured a reader as seeing -- a fourth grey
     for a difference nothing shows", so the rail was drawn as the page's own
     tone plus a right rule.

     What that argument missed is that the step is not what the surface is for.
     The rail is now **full height and full bleed**: it runs from the top of the
     viewport to the bottom of it, against a column that scrolls past it, and at
     1920px it is one of two regions rather than a strip inside a centred page.
     A hairline alone leaves the nav floating on the same ground as the content
     three pixels to its right; the tone is what says the region has an edge at
     the bottom of the screen as well as down its side. It is still the smallest
     step in the file, and it is still the only element that takes it.

     The 56.25rem layer, where the rail becomes a full-width top bar, keeps the
     original judgement and **cancels this**: at that width a second background
     across the whole screen reads as a banner rather than as a rail, which is
     what `D2` measured and what has not changed. */
  --surface-rail: #1f2126;

  /* `--tap` is the touch-target floor, 44 CSS pixels, which is what
     WCAG 2.5.5 asks and what every platform's own guidance lands on within a
     pixel. **It is applied only inside the 56.25rem layer** -- see the ladder in
     this file's header -- so the desktop console keeps its density and a phone
     gets a control a thumb can hit. `tests/tools/seot_measure.py` reports every
     control under 44 in either axis at 900 and 380, which is what keeps this
     from being a number nobody checks.

     `--auth-col` is the width of the one column that is not the console: the
     sign-in screen, which the mock draws as a bare centred column. It is a
     *measure* rather than a layout, so it is set by the two fields in it --
     wider is a form whose labels float away from their boxes. */
  --tap: 2.75rem;
  --auth-col: 26rem;

  /* The narrowest a settings cell may be before the grid drops a column. A
     *layout* value in the same category as `--page-width` above and declared
     the same way, not an operational setting: nothing in `config/` decides how
     many controls fit across a viewport, and `Settings` has no field that could
     honestly hold one. At 68rem of page it yields three across, two at a tablet
     and one on a phone -- see `.knobrows`, where the `min()` is what keeps the
     last of those from overflowing. */
  --knob-col: 17rem;

  /* The two widths a form field is written at, and they are here for the reason
     `--knob-col` is: a layout value nothing in `config/` could honestly decide.
     They were literals inside `.field` -- `flex: 1 1 14rem` and
     `flex: 0 0 5rem` -- and the second of the two was **not doing what it
     said**. A flex item cannot shrink below its content's min-content size and
     an `<input>`'s is about twenty characters, so a `narrow` field asking for
     5rem came out 195px: the same width as a wide one, from a rule that had
     asked for a third of it. The control carries `width: 100%` now (see
     `.field`, where the two measurements are), so the modifier means what it
     reads as -- which is why `spec_fields` could stop asking for it on a box
     that holds `America/Argentina/Buenos_Aires`. */
  --field-col: 14rem;
  --field-col-narrow: 7rem;

  /* The narrowest a figure in a `.statstrip` may be before the strip drops to
     fewer across, and it is here for the reason the three above it are: a layout
     value nothing in `config/` could honestly decide. `D3`'s, and it is a
     **floor** rather than a width -- the cells share whatever is left, so at
     68rem of page it yields three across, two at a tablet and one on a phone.
     Measured against the widest hint the console writes ("over 0 session(s) with
     a ledger row, and nothing capping it"), which wraps to three lines at this
     width and to two at the width three of them get. */
  --stat-col: 11.875rem;

  /* How tall a chart's plot is, and it is one number for both of them: the bars
     and the curve sit one above the other on a campaign's Overview, and two
     plot areas of different heights on one page read as two unrelated pictures
     rather than as one x-axis asked two questions.

     `D5`'s, and it is here rather than at either rule for the reason `--stat-col`
     is: a layout value nothing in `config/` could honestly decide. 8rem is what
     the bars need to be read at -- the same 8rem `.meter` is wide, which is not
     a coincidence but is not a dependency either -- and it is what makes the
     curve's fixed-height `<svg>` a shape rather than a strip. Below the flip it
     is the one dimension that shrinks (see the 30rem block), because a phone's
     screen is short and a chart that fills it pushes everything else off. */
  --chart-h: 8rem;
}

/* The state quartet, derived per element. It was a triple until `D0`, and
   `--state-bg` -- the 18% tint a chip used to sit on -- is still **gone**, for
   the arithmetic that removed it: a chip's ink and its tint were the same
   colour, so the tint could only ever raise the floor its own ink was measured
   against. The best a dim tone could reach was 4.66:1 with *no* tint at all,
   3.63:1 with the 18% it had, and no alpha in between clears 4.5:1 on a panel
   this console can afford to have. `.chip` therefore sits on
   `--surface-sunken` and keeps the tone in its ink and its border.

   **The fourth is `--state-ink`, and which of the two a derived value takes is
   the allocation the tone block above argues.** A wash is a ground, so it is
   the painted channel; an edge is a mark, so it is the written one. That is
   also why they are no longer one colour at two alphas: they were, until the
   value that has to be legible and the value that has to look right stopped
   being the same number.

   Declared on `*` rather than on `:root` on purpose: a `var()` inside a custom
   property is substituted where the property is *declared*, so computing these
   once on the root would have every element inherit the root's colour rather
   than resolve its own. Here each element re-derives them from whichever
   `--state-rgb` and `--state-ink-rgb` reached it, which is what lets a chip
   inside a card take the card's tone without naming it. Both channels are set
   together on every line of the state table below, and are never defaulted from
   each other: a rule that set one and inherited the other would draw a card in
   one state and its chip in another. */
*,
*::before,
*::after {
  --state: rgb(var(--state-rgb));
  --state-ink: rgb(var(--state-ink-rgb));
  --state-edge: rgb(var(--state-ink-rgb) / 45%);
  --state-wash: rgb(var(--state-rgb) / 9%);
}

* { box-sizing: border-box; }

/* -- the state table ------------------------------------------------------

   One line per state, and the only place in this file where a state names a
   colour. The names are not invented here: every one of them is a member of
   `CampaignRow.state`, `store.RunStatus`, `store.BatchStatus`,
   `store.JobStatus`, `webui.state.RunState`, `replay.RunOutcome`,
   `runlog.TailStatus` or a log level, and reaches the markup straight off the
   model. Adding a member to any of those is one line here and nothing else.

   `JobStatus` arrived with U2, and its three members that were not already here
   -- `dispatched`, `succeeded`, `dead_letter` -- are the reason: a job's status
   on a run's page is the one chip whose subject is not its container's state, so
   it is drawn as `ui.chip(kind)` and takes its tone from this table. Leaving
   three of the seven unnamed would have left those three inheriting the run's
   colour, which is the defect the chip was given a kind to fix.

   `debug` and `info` are deliberately absent: `.log` sets the accent tone for
   the whole well, so an ordinary line inherits it and only a level with
   something to say overrides. */

/* Asked for, and not finished. */
.pending, .queued, .dispatched, .running, .live, .edited {
  --state-rgb: var(--rgb-accent);
  --state-ink-rgb: var(--rgb-accent-ink);
}

/* It did the thing. */
.success, .success_recovered, .succeeded, .completed, .done, .ok {
  --state-rgb: var(--rgb-good);
  --state-ink-rgb: var(--rgb-good-ink);
}

/* Somebody has to know, and the box is not broken. `failed_not_ranked` is on
   this side deliberately -- it is a ranking signal rather than a defect, and
   `replay.RunOutcome` says so. `skipped_not_ranked` is the same answer known in
   advance (`rank.on_absent: skip`), and `views.tone_of` already draws it amber. */
.backoff, .stopping, .draining, .cancelled, .interrupted,
.failed_blocked, .failed_not_ranked, .skipped_not_ranked,
.warn, .warn-chip, .warning, .transient {
  --state-rgb: var(--rgb-warn);
  --state-ink-rgb: var(--rgb-warn-ink);
}

/* The box, or the run, is broken. `permanent` and `poison` are
   `resilience.ErrorClass` members, added by U6 when a failed run's error class
   became `ui.chip(r.row.error_class)` rather than a badge wearing the run's own
   colour. `transient` is above with the ambers, because "a retry may succeed" is
   not the same news. */
.failed, .failed_error, .failed_engine, .dead_letter, .refused, .unreadable, .bad,
.error, .critical,
.permanent, .poison {
  --state-rgb: var(--rgb-bad);
  --state-ink-rgb: var(--rgb-bad-ink);
}

/* Nothing is happening, and nothing is wrong. `missing` is the *normal* state of
   a log after `storage.retention_days`, which is why it reads as an absence. */
.stopped, .missing { --state-rgb: var(--rgb-idle); --state-ink-rgb: var(--rgb-idle); }

/* The one exception, and it is a difference in the domain rather than in the
   stylesheet. A *run* that is running is in flight and will end, so it is live;
   a *campaign* that is running is doing the only thing it exists to do and will
   not end on its own, so it is good. Written here, once, rather than by giving
   the fleet its own table again.

   **Two selectors, because a campaign's state is read on a page with no card
   around it.** The first is the card and the campaign's own head, where the
   domain class is on the element the chip sits inside. The second is `/bulk`,
   whose rows are a table: `B5`'s walk found `running` drawn green on the fleet
   and violet three clicks away, which is the state table's own stated purpose
   ("a new status colours the card, the chip, the table row, the tally and the
   log line at once") failing on the one status that has an exception. The class
   goes on the `<table>` rather than on the chip or the row, because `.campaign`
   is also the card's own rule -- padding, panel, border, left edge -- and an
   element wearing it becomes a card wherever it is. */
.campaign.running, .campaigns .running {
  --state-rgb: var(--rgb-good);
  --state-ink-rgb: var(--rgb-good-ink);
}

/* -- base ----------------------------------------------------------------- */

/* **No width and no padding, and both were the console's loudest defect.** This
   rule read `margin: 0 auto; max-width: var(--page-width)`, so the *shell* --
   rail, column and everything in either -- was a 1088px strip centred in
   whatever screen it was opened on. At 1440 that is 176px of empty page down
   each side; at 1920 it is 416px. The rail was 200px of that strip rather than
   200px of the screen, so the console got narrower as the monitor got wider,
   which is the opposite of what a fleet of cards and an eight-column sessions
   table want.

   The design mock is unambiguous about this: `min-height:100vh` on the shell, a
   fixed aside, `flex:1` on the main, and 32px of padding inside it. So the
   padding moves to `.column` -- where it is the reading column's own gutter
   rather than the document's -- and the width goes entirely. Pages that are a
   *measure* cap themselves instead; see `main[data-page]`, which is where the
   token that used to be here went. */
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: var(--fs-5)/var(--lh-5) var(--font-sans);
}

code { font-family: var(--mono); overflow-wrap: anywhere; }
/* **...except in a table cell, and `D3` is where that stopped being true.**
   `anywhere` is right for an identifier inside a *sentence*: a paragraph is
   read across, a URL in the middle of one is longer than a phone, and the
   alternative is a page that scrolls sideways at 380px. A table cell is the
   opposite job. `/audit` drew `set_campaig` / `n_budget`, `refuse_admi` / `n`
   and `stop_campai` / `gn` down its `action` column -- an identifier broken at
   an arbitrary character, in the one column a reader runs their eye down, which
   makes the name unreadable *and* unfindable by eye or by the browser's own
   find. Nothing about the string says where the break was inserted.

   **A scroller rather than an ellipsis, and the choice is about evidence.** Both
   keep the token whole and either beats what was there. An ellipsis takes
   characters away, and the characters it takes are the tail -- which is the end
   that distinguishes `set_campaign_budget` from `set_campaign_cap`, and this is
   a forensic record whose whole job is to be read as one. A scroller costs a
   gesture and loses nothing. The console can afford it because `.tablewrap`
   below is a scroller at every width, so this declaration is the whole fix
   rather than the first half of one.

   `normal`, not `break-word`: the token still breaks at every opportunity the
   *string* offers -- a space, a hyphen -- so a uuid goes on wrapping at its own
   dashes and only a run with nothing to break on makes the table wide. */
:where(td, th) code { overflow-wrap: normal; }

/* **Emphasis is 600, and this rule is why the console ships five faces instead
   of seven.** A `<b>` with no rule over it is 700 to a user agent, and there are
   seventy-odd of them: a bold word in a sentence, a figure in a `.tally`, a
   `.spend`, a `.stat` and the bar's two numbers. Nothing chose that -- it is the
   browser's default in a file whose contract is that an undecided rule is a
   defect -- and 600 is what every rule here that *did* choose already asks for,
   `.log b` included, which is the one `<b>` somebody had classified. See the
   faces block above the token layer for the arithmetic and for the two files
   this deletes.

   Declared rather than left to CSS font matching, which would have picked the
   600 face for a 700 request the moment the Bold file went away and drawn the
   same pixels off a silence. `<strong>` is deliberately absent: no template on
   this console emits one, and a selector matching nothing is the thing `.btn`
   and `.kv` were retired for. */
b { font-weight: 600; }

/* **A link in prose, and until `B3` there was no rule for one at all.** Every
   link this file styled was a link in a *component* -- a crumb, a tab, a nav
   pill, a paging control, a cell of a table, the one to a campaign's log -- so a
   link inside a sentence took the user agent's own `#0000EE`, which on this
   ground measures **1.8:1** and is the worst pair the console has ever drawn. It
   was reachable before this stage (a write reply naming the campaign it wrote, a
   create form pointing at `/config`, the 422 body's way back, and the Overview's
   ⓘ) and `B3` puts one in five more places, since a next action is usually a
   link. The accent is what a link is everywhere else here; the underline stays,
   because in a paragraph colour alone is not an affordance. Element-level, so
   every component rule above and below goes on winning. */
a { color: var(--accent-ink); }

/* The focus ring, and it is the whole accessibility fix this file owed.
   Buttons, nav links, table links, paging links and chips had no focus style at
   all -- only three field selectors did -- so a keyboard was a way to move an
   invisible caret around the console. `:where()` keeps the specificity at zero,
   so a component may still say something more specific without fighting it. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-2);
}

/* -- the shell: a rail, and the column beside it --------------------------
   An `h1`, a tagline paragraph and four underlined text links with nothing
   between the chrome and the page became a **bar** at `B1`
   (`.claude/handoff/console-ui-punch-list.md` item 8), and the bar becomes a
   **rail** here. `plans/console-design.md` §4 is the decision; §2.3 is the
   reason, and it is about the nav rather than about fashion: seven links in
   three labelled groups with a role gate coming for two of them is a list, and a
   single row of pills has nowhere to put a group label.

   **The rail is the page's own tone plus a right rule, and that is a decision
   with arithmetic behind it** (§2.1): the mock draws a raised `#1f2126`
   sidebar, 1.5 L* over its page, which is half the smallest step `B1` measured
   a reader as seeing -- a fourth grey for a difference nothing shows. And at
   56.25rem the rail becomes a full-width top bar, where a second background
   stops reading as a rail and starts reading as a banner.

   **It is sticky, and the earlier refusal is not being reversed.** What was
   offered and declined at `B1` was a sticky *bar*: ~90px of pinned **vertical**,
   on a console whose Log tab wants every row of it. A rail costs no vertical at
   all, so the argument does not reach it, and a nav that scrolls away on the one
   page that is 4000px long is a nav somebody scrolls back up to.

   **The content column carries `min-width: 0`.** A flex item will not shrink
   below its content's min-content width, so the console's widest table -- seven
   columns, one of them a URL -- would push the shell sideways at every width
   rather than scrolling inside itself. It is one declaration and the 380px floor
   rests on it.

   `.auth` is the other shape: the one page reachable without a session, drawn as
   the bare centred column the mock draws it as. No rail, and `--auth-col` is a
   measure rather than a layout -- see the token block. It is declared with the
   rest of the sign-in screen rather than here, under "the sign-in column" below:
   what a shell *is* belongs in this section, and everything else about `/login`
   is about the card in it. */
.shell {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}
/* **A full-height region rather than a sticky block at the top of a page.** It
   was `top: var(--sp-5)` with `align-items: flex-start` over it, so the rail was
   as tall as its own contents and the page's ground ran underneath it -- which
   reads as a floating column of links on a short page and as a column that ends
   halfway down on a long one. `100vh` with `top: 0` is the mock's own
   arrangement, and it is what lets the footer be a footer: `margin-top: auto`
   inside a box the height of the viewport puts the slots meter at the bottom of
   the *screen*, which is where it was drawn.

   `overflow` is on the nav rather than here, so the brand block and the footer
   stay pinned while a nav longer than the screen scrolls between them. */
.rail {
  position: sticky;
  top: 0;
  align-self: flex-start;
  flex: 0 0 var(--rail);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-rail);
  border-right: 1px solid var(--rule-line);
}
/* The three bands of the rail, each padded on its own so the rules between them
   reach the full width of the column. A hairline that stops short of the edge
   reads as an underline on the thing above it rather than as a division. */
.rail > .brand { padding: var(--sp-5) var(--sp-5) var(--sp-4); border-bottom: 1px solid var(--rule-soft); }
.rail > .railnav { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: var(--sp-4) var(--sp-3); }
.rail > .railfoot { padding: var(--sp-4) var(--sp-5) var(--sp-5); }

/* The reading column. `min-width: 0` because a flex item will not shrink below
   its content's min-content width, so the console's widest table would push the
   shell sideways rather than scrolling inside itself -- one declaration, and the
   380px floor rests on it. The padding is `<body>`'s old one, moved here at the
   same time the width cap went: what it pads is the page's reading area, and the
   rail is not part of that. */
.column {
  flex: 1 1 auto;
  min-width: 0;
  padding: var(--sp-5) var(--gutter) calc(var(--sp-7) * 2);
}

/* The four things the console says about itself, as **two rows rather than one
   wrapping group**. They were one baseline row that wrapped, so in a rail they
   came out up to four lines deep and which of the four shared a line depended on
   the length of an environment name. The mock's arrangement is the stable one:
   who this is on the first row, what build and which box on the second.

   `baseline` inside each row and not `center`: the mark is a display step and
   what sits beside it are micro-labels, so aligning their boxes would leave the
   small type floating in the middle of the big type's line box. */
.brand { display: flex; flex-direction: column; gap: var(--sp-3); }
.brand .who, .brand .build {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-2);
  margin: 0;
}
/* The mark's initial as a filled tile, which is the mock's one piece of pure
   ornament and the only element on this console that takes the accent as a
   *ground*. It earns the exception by being 26px square: `--ink-inverse` on
   `--accent` is the pair the primary button already uses, measured, and this is
   two characters of it at 600.

   `center` on this row and not `baseline`, because a tile is a box rather than
   text -- its baseline is its bottom edge, which would hang the wordmark off the
   floor of the square. */
.brand .who { align-items: center; }
.brand .tile {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 1.625rem;
  height: 1.625rem;
  border-radius: var(--radius-3);
  background: var(--accent);
  color: var(--ink-inverse);
  font: 700 var(--fs-4)/1 var(--mono);
}
/* The product mark. **A step down from `--fs-7`, and the display step moved to
   the page title.** It was the console's one use of step 7 on the argument that
   a wordmark should outrank everything; with a rail 238px wide and an `<h1>`
   now on every page, a 22px wordmark over a 23px page title is two display
   steps arguing. The mock sets the mark at 16px beside a 23px title, which is
   the right order: the product is a constant and the page is what changed.

   No longer an `<h1>` either -- `pagehead` owns that element now, and the mark
   is drawn on every page including the ones that have their own heading. */
.mark {
  margin: 0;
  font-weight: 600;
  font-size: var(--fs-6);
  line-height: var(--lh-1);
  letter-spacing: var(--ls-display);
}

/* Two tags, one shape and two jobs. The shape is written once because the day
   they differ by a pixel is the day one of them looks like a mistake: same
   step, same solid leading, same tracking, same corners as a chip -- these are
   the same *kind* of object, read once and never compared down a column.

   They are told apart by weight of colour rather than by geometry, and which
   one is louder is a judgement worth writing down: **the environment is accent
   and the channel is not.** Which box this console can spend money in is the
   operationally important fact of the two; that the product is a Beta is a
   footnote about the software, true on every page for ever, and a second accent
   tag a thumb away would make the reader compare them. */
.channel, .env, .retired {
  font: 600 var(--fs-1)/var(--lh-1) var(--font-sans);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  padding: .3em .5em;
  border-radius: var(--radius-2);
}
/* Sunk into the well and outlined in the page's own rule: a tag, and a quiet
   one. `--dim` on `--surface-sunken` is the brightest pair the secondary ink
   makes anywhere on the console, which is what lets it be this quiet and still
   be read.

   **`.retired` is the third of these and it is a campaign's, not the bar's**,
   which is why it shares the shape and the colours rather than getting its own:
   it is the same *kind* of object -- a fact about the thing, read once, never
   compared down a column -- and drawing it any other way would make a reader
   compare it against the state badge beside it. It is deliberately not a
   `.chip`: a chip's kind is an enum member that takes the state table's tone,
   and `retired` is a timestamp being read rather than a state
   (`plans/campaign-lifecycle.md` §1). Quiet is also the right loudness: a
   retired campaign is not going well or badly, it is over. */
.channel, .retired {
  background: var(--surface-sunken);
  border: 1px solid var(--rule-line);
  color: var(--dim);
}
/* The environment, and never a state: which env a console is pointed at is not
   something that goes well or badly. **Sans**, because it is a micro-label
   naming the environment rather than a value compared against the one on another
   page: there is only ever one of these on screen.

   The `vertical-align: .2em` it used to carry is gone with the `<h1>` it used to
   sit inside: it was nudging an inline chip up out of the mark's baseline, and
   the brand is a baseline-aligned flex row now, which does that properly. */
.env {
  border: 1px solid var(--accent);
  color: var(--accent-ink);
}
/* Which build drew this page. **Mono**, and it is the one string in the bar that
   is: a version is compared against another version -- what is deployed, what
   `seot --version` says, what a bug report quotes -- and it is copied into
   places where the digits have to line up. It is `seot.__version__` through
   `chrome()` and is never typed into a template. */
.version {
  font-family: var(--mono);
  font-size: var(--fs-2);
  line-height: var(--lh-1);
  color: var(--dim);
}
/* In the rail the version is a link to `/changelog` -- what changed in the build
   it names. It keeps the micro-label's tone rather than taking the link colour,
   because it is still the build's name first; the underline on hover is what
   says it goes somewhere. The sign-in shell draws it as a plain span. */
a.version { text-decoration: none; }
a.version:hover, a.version:focus-visible { color: var(--ink); text-decoration: underline; }
/* Where the number came from, drawn only when it was not the installed package:
   a bare checkout's `pyproject.toml`, or nothing at all (`seot/__init__.py`'s
   `SOURCE_NOTES`). A whole line under the number, because it is a sentence. */
.brand .vsource {
  flex-basis: 100%;
  font-size: var(--fs-1);
  color: var(--dim);
}

/* The nav, down the rail: three labelled groups of links, one landmark around
   all three. `_ui.html`'s `navgroup()` draws a group and `nav.py` is the list;
   a group whose every member is gated away renders nothing at all, label
   included, which is what lets `Admin` exist before anybody can see a member of
   it.

   **A block rather than a pill, and the pill is not lost.** A pill is a shape
   for a *row* of short labels; down a 12.5rem column the shapes stop being
   compared to each other and start being compared to the edge of the rail, so a
   rounded rectangle that fills the column is what reads as a list. The pill
   comes back inside the 56.25rem layer, where the nav is a row again --
   `--radius-pill` is spent there, and the token's own comment says so.

   **The current item is filled, and it is the one place on the console where a
   tinted ground survives the AA arithmetic the chip failed**: the accent is
   bright enough that its own ink over its own 16% tint measures 5.49:1 on a
   panel and better than that on the page, where the rail sits. The dimmest tone
   in the state table cannot reach 4.5:1 over any tint at all.

   **Marked by `aria-current="page"` and nothing else**, which is the rule
   `.tabs` states below and the breadcrumb follows -- and the flat nav this
   replaces was the one place breaking it, carrying a `class="here"` that said
   the same thing to nothing that reads it.

   `--lh-1` on the link because a nav label is one line aligned by the box round
   it: the token block's rule, and the reason a pill was 1.5 lines tall while
   every other single-line label on the console was one. */
.railnav { display: flex; flex-direction: column; gap: var(--sp-5); font-size: var(--fs-3); }
.navgroup { display: flex; flex-direction: column; gap: var(--sp-1); }
/* A micro-label naming a run of links, in the console's one micro-label shape --
   the classification table in the type block carries it, like every other rule
   here that names a face. */
.navgroup .grouplabel {
  margin: 0 0 var(--sp-1);
  font: 600 var(--fs-1)/var(--lh-1) var(--font-sans);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--dim);
}
.navgroup ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
/* A flex row since the dot arrived, and `align-items: center` rather than
   `baseline`: a 5px circle has no baseline worth aligning to, and centring it on
   the label's line box is what puts it beside the word rather than under it. */
.navgroup a {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  line-height: var(--lh-1);
  border: 1px solid transparent;
  border-radius: var(--radius-2);
  color: var(--dim);
  text-decoration: none;
}
/* The mock's leading dot. It is `--rule-line` -- the same hairline the rail's own
   border is -- so a column of them reads as a rule with the labels hung off it,
   which is the whole of what it does. The current item's is the accent, declared
   with the rest of that state two rules down. `flex: none` because a 5px item
   inside a flex row will otherwise shrink to nothing when a label wraps. */
.navgroup .dot {
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rule-line);
}
.navgroup a:hover { color: var(--ink); background: var(--surface-sunken); }
.navgroup a:hover .dot { background: var(--dim); }
/* Bold as well as filled, because the fill is a tint of the accent and the
   accent is also what a link is: weight is the half of "you are here" that
   survives a reader who does not see the colour.

   **Two selectors, one rule, and `D6` is why**: the ⌘K palette lists the same
   destinations and has to mark the current one the same way, and a second block
   spelling the same four declarations is the duplication the component guard
   refuses in markup for a reason that does not stop at markup. What differs
   between a rail pill and a palette row is *which* page is current on a campaign
   — the rail lights the group, the palette lights the tab — and that is decided
   in `_ui.html`, where it belongs, not here. */
.navgroup a[aria-current="page"], .palette .hits a[aria-current="page"] {
  font-weight: 600;
  color: var(--accent-ink);
  background: rgb(var(--rgb-accent) / 16%);
  border-color: var(--state-edge);
}
/* The current link is the accent whatever it sits in, so its border is the
   accent's own 45% rather than whatever state reached it. */
.navgroup a[aria-current="page"], .palette .hits a[aria-current="page"] {
  --state-rgb: var(--rgb-accent);
  --state-ink-rgb: var(--rgb-accent-ink);
}
.navgroup a[aria-current="page"] .dot { background: var(--accent); }

/* -- jump to a page --------------------------------------------------------

   `_ui.html`'s `palette()`: a `<button popovertarget>` in the rail and a
   `<div popover>` it opens, and **the second of the console's two script tags is
   what this block is drawn around.** `plans/console-design.md` §2.5. Everything
   below has to hold in both states -- with `console.js` and without it -- so
   nothing here is keyed on the script having run except through `hidden`, which
   is an attribute the browser already knows how to draw.

   **The trigger is `.btn-quiet` and it sits above the nav rather than under it**:
   it is a faster way to reach the same list, so it reads before the list rather
   than after it. Full width, because the rail is a column of full-width things
   and a button floating in 12.5rem of air is a button somebody has to aim at.

   **`--elev-3` and not `--elev-2`**, which is the ladder's own rule read off the
   token block: this is in the browser's **top layer**, floating over a page it
   does not belong to, and how far off that page it appears is the only thing
   separating it from the panel behind it. It is the second box on this console
   in that layer; `.infobox` is the first and takes the same step.

   **Pinned near the top rather than centred**, which is the one number here that
   is a judgement rather than a token: a user agent centres an unanchored
   popover, so a list that shortens as it is filtered would walk *up* the screen
   on every keystroke. `10vh` holds the top edge still and lets the rows move.
   It is a viewport unit rather than a step of the space scale on purpose --
   what a top-layer box is positioned against is the screen, and nothing else.

   **`--auth-col` is the width**, borrowed rather than added: the sign-in column
   is the one other box on this console sized as a *measure* rather than as a
   layout, and a palette is the same kind of thing -- a short column of short
   labels. A new token would have been the same number under a second name.

   Each row's two halves are pushed apart, so the group a page belongs to is a
   column somebody scans down rather than a word hanging off the end of a label.
   `.on` is the script's selection and is a **class on the row** rather than
   focus on its link, for the reason `console.js` gives: focus stays in the
   filter box for the whole interaction, or the next character typed goes
   nowhere. */
.jump { display: contents; }
.jumpto {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  font-size: var(--fs-3);
}
/* The shortcut hint is pushed to the far end of the trigger; what a key cap
   *looks* like is declared once, with the palette's own footer caps. */
.jumpto kbd { margin-left: auto; }

/* -- a modal ---------------------------------------------------------------

   `ui.modal`, and the design mock's confirm dialog. It is the third box on this
   console in the browser's **top layer** -- `.infobox`, `.palette`, this -- so it
   takes `--elev-3` for the ladder's own stated reason: how far off the page a
   floating box appears is the only thing separating it from the panel behind it.

   **Pinned near the top rather than centred**, which is the palette's own
   judgement and holds here for a different reason: a dialog whose height depends
   on how many consequences it has to list is a dialog that would sit at a
   different height for a Stop than for a Retire, and the two are opened from
   buttons a few pixels apart. Its top edge holds still.

   `::backdrop` is what makes it read as modal without being modal -- see the
   macro, where the choice of `popover` over `<dialog showModal>` is argued. The
   wash is the page's own darkest surface at 70%, so what is behind it is still
   legible as the page it is about. */
.modal {
  width: min(34rem, calc(100vw - 2 * var(--gutter)));
  max-height: 80vh;
  margin: 10vh auto auto;
  padding: 0;
  overflow-y: auto;
  background: var(--surface-panel);
  color: var(--ink);
  border: 1px solid var(--rule-line);
  border-left: var(--edge) solid var(--state-ink);
  border-radius: var(--radius-4);
  box-shadow: var(--elev-3);
}
.modal::backdrop { background: rgb(var(--rgb-sunken) / 70%); }
/* The head: a dot in the tone, the question, and what the press means in one
   sentence. `align-items: flex-start` and a nudge on the dot, because it is a
   6px circle beside two lines of type -- centring it on the pair would put it
   level with the gap between them. */
.modal .head {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  border-bottom: 1px solid var(--rule-soft);
}
.modal .head .dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: .45rem;
  border-radius: 50%;
  background: var(--state-ink);
}
/* An `<h2>`, and it is the one on this console that is **not** a micro-label.
   The element rule turns every heading into an uppercase caption, which is right
   for a region of a page and wrong for the title of a dialog: this is the
   sentence somebody reads to decide, and it is the largest thing in its own box
   rather than a label over the thing that is. */
.modal h2 {
  margin: 0;
  font: 600 var(--fs-6)/var(--lh-6) var(--font-sans);
  text-transform: none;
  letter-spacing: var(--ls-display);
  color: var(--ink);
}
.modal .head p { margin: var(--sp-2) 0 0; font-size: var(--fs-3); color: var(--dim); }
.modal .modalfacts { margin: 0; padding: var(--sp-4) var(--sp-5); }
/* The consequences, in the page's own well so the list reads as a quotation of
   what the button does rather than as more of the dialog's prose. */
.modal .effects {
  margin: 0 var(--sp-5) var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-sunken);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-3);
}
.modal .effects .label {
  margin: 0 0 var(--sp-2);
  font: 600 var(--fs-1)/var(--lh-1) var(--font-sans);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--dim);
}
.modal .effects ul { margin: 0; padding-left: var(--sp-5); }
.modal .effects li { margin: var(--sp-2) 0; font-size: var(--fs-3); color: var(--ink); }
.modal .effects li::marker { color: var(--dim); }
.modal .press { padding: 0 var(--sp-5) var(--sp-4); }
.modal .press .field { margin-bottom: var(--sp-4); }
/* The footer: a raised strip at the bottom of the box, so the two buttons read
   as the end of the dialog rather than as two more items in it. The negative
   margins are how a full-bleed band lives inside a padded parent -- the padding
   is `.press`'s and this is the one child that has to escape it. */
.modal .foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-2);
  margin: 0 calc(-1 * var(--sp-5)) calc(-1 * var(--sp-4));
  padding: var(--sp-3) var(--sp-5);
  background: var(--surface-rail);
  border-top: 1px solid var(--rule-soft);
}
/* A disabled CTA is the type-to-confirm's whole answer, so it has to *read* as
   refused rather than merely as a button somebody has not pressed yet. */
.modal button[disabled] { opacity: .5; cursor: not-allowed; }

/* -- a card's overflow menu ------------------------------------------------

   The mock's `···` on a fleet card. It is the fourth box on this console in the
   browser's **top layer** — `.infobox`, `.palette`, `.modal`, this — so it takes
   `--elev-3` for the ladder's stated reason, and it is the only one of the four
   that lives inside a *polled* fragment. An htmx swap dismisses an open popover,
   so this menu closes every `campaign_pane_interval_s` while it is open;
   `campaign_ui.actions` records that as the acceptable half of the pair, since a
   popover reverts visibly where a `:target` reverts in silence.

   **Anchored to the button rather than centred**, which is the `.infobox` idiom
   and for the same reason: a user agent centres an unanchored popover, and a
   six-item menu in the middle of the screen is a dialog. `popovertarget` makes
   the button the implicit anchor, so nothing has to name one. Behind `@supports`
   because the fallback has to stay the UA's own centring — a margin set
   unconditionally pins the box to the top-left corner in a browser that has
   popovers and not anchor positioning. */
.more { position: relative; }
.dots { line-height: var(--lh-1); letter-spacing: .05em; }
.menu {
  width: max-content;
  min-width: 12rem;
  padding: var(--sp-2);
  background: var(--surface-page);
  color: var(--ink);
  border: 1px solid var(--rule-line);
  border-radius: var(--radius-3);
  box-shadow: var(--elev-3);
}
@supports (position-area: block-end) {
  .menu {
    position-area: block-end span-inline-start;
    position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
    margin: var(--sp-1);
  }
}
/* Every item is a full-width row: a menu is a list of destinations, and a label
   that stops where its text does is a target somebody has to aim at. */
.menu a, .menu button {
  display: block;
  width: 100%;
  padding: var(--sp-2) var(--sp-3);
  border: 0;
  border-radius: var(--radius-2);
  background: none;
  color: var(--ink);
  font: var(--fs-3)/var(--lh-3) var(--font-sans);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.menu a:hover, .menu button:hover { background: var(--surface-panel); }
/* The destructive item is the tone rather than the shape: a red-filled row in a
   menu of grey rows reads as the menu's own purpose. */
.menu button { color: var(--bad-ink); }
.menu hr { margin: var(--sp-2) var(--sp-1); border: 0; border-top: 1px solid var(--rule-line); }
.menu .note { margin: 0 var(--sp-3) var(--sp-1); font-size: var(--fs-2); font-style: normal; color: var(--dim); }

.palette {
  width: min(var(--auth-col), calc(100vw - 2 * var(--gutter)));
  max-height: 70vh;
  margin: 10vh auto auto;
  padding: var(--sp-4);
  overflow-y: auto;
  background: var(--surface-panel);
  color: var(--ink);
  border: 1px solid var(--rule-line);
  border-radius: var(--radius-4);
  box-shadow: var(--elev-3);
}
/* The same wash the modal's backdrop takes, and it was absent: the palette was
   the one box on this console in the top layer that did not look like it was in
   front of anything. Lighter than the dialog's 70%, which is the difference
   between the two -- a confirmation is about the thing behind it and wants that
   thing quiet, where a palette is a way *off* this page and wants it legible. */
.palette::backdrop { background: rgb(var(--rgb-sunken) / 55%); }
/* **The search row, and the mock draws it as a row rather than as a box.** A
   bordered input inside a bordered popover is two rectangles a few pixels apart
   saying the same thing; a `›` in the gutter, a groundless field and a hairline
   under the lot reads as a prompt, which is what a palette is. The whole row
   ships `hidden` and `console.js` unhides it, so a console with no script has
   neither a box it cannot use nor furniture around one.

   Sans and not mono: what is typed here is a word out of a label, read across --
   the classification table in the type block above is the rule, and this is the
   side of it that is prose. */
.palette .ask {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: calc(-1 * var(--sp-4)) calc(-1 * var(--sp-4)) 0;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--rule-soft);
}
.palette .ask .prompt { font-family: var(--mono); color: var(--dim); }
.palette .filter {
  flex: 1 1 auto;
  min-width: 0;
  padding: var(--sp-1) 0;
  font: var(--fs-5)/var(--lh-3) var(--font-sans);
  color: var(--ink);
  background: none;
  border: 0;
  outline: none;
}
.palette .filter::placeholder { color: var(--dim); }
/* What the keys do, and how much is left. It is the mock's footer, it ships
   `hidden` for the reason the search row does -- every word in it names a
   binding `console.js` owns -- and it takes the rail's own tone so the box has a
   floor rather than ending on its last row. */
.palette .keys {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin: var(--sp-3) calc(-1 * var(--sp-4)) calc(-1 * var(--sp-4));
  padding: var(--sp-2) var(--sp-4);
  background: var(--surface-rail);
  border-top: 1px solid var(--rule-soft);
  font-size: var(--fs-2);
  color: var(--dim);
}
.palette .keys span { display: flex; align-items: center; gap: var(--sp-1); }
.palette .keys .count { margin-left: auto; }
/* A key cap. The console's first, and it is here rather than as an element rule
   because `<kbd>` appears in exactly two places -- this footer and the Jump
   button's shortcut hint -- and both are inside the palette component. */
.palette kbd, .jumpto kbd {
  padding: .15rem .3rem;
  font: var(--fs-1)/var(--lh-1) var(--mono);
  color: var(--dim);
  background: var(--surface-sunken);
  border: 1px solid var(--rule-line);
  border-radius: var(--radius-1);
}
.palette .hits {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin: var(--sp-3) 0 0;
  padding: 0;
  list-style: none;
}
.palette .hits a {
  display: flex;
  align-items: baseline;
  gap: var(--sp-4);
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-3);
  line-height: var(--lh-1);
  border: 1px solid transparent;
  border-radius: var(--radius-2);
  color: var(--ink);
  text-decoration: none;
}
.palette .hits .in { margin-left: auto; color: var(--dim); font-family: var(--mono); font-size: var(--fs-2); }
/* The mock's leading dot, and it is the rail's own -- same size, same hairline
   tone, same accent when the row is the page you are on. Two lists of the same
   destinations that marked the current one differently would be two lists. */
.palette .hits .dot {
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rule-line);
}
.palette .hits a[aria-current="page"] .dot { background: var(--accent); }
.palette .hits a:hover, .palette .hits li.on a {
  background: var(--surface-sunken);
  border-color: var(--rule-soft);
}
/* Where you are is marked by `aria-current` and drawn by the **rail's own rule**,
   two blocks above: same four declarations, one place, and the palette's selector
   is on it rather than beside it. Nothing about the current row is declared here. */
.palette .nohits { margin-top: var(--sp-4); }

/* The rail's footer: what the box is committed to, what it has spent today, and
   whose session this is. `margin-top: auto` pushes it to the bottom of the rail
   rather than leaving it under the nav, so on a short page it is where a footer
   is and on a long one the rail is still one object.

   The rule above it is `--rule-soft` and not `--rule-line`: the rail's own right
   border is the line that separates two *regions*, and a second line at the same
   weight inside one of them would read as a third column. */
.railfoot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  border-top: 1px solid var(--rule-soft);
}

/* The reading of the box itself, and **the class survives the app bar it was
   written for** -- `.reading` names what the block is (`Reading the box…` is its
   own placeholder), not where it sat. Track 8 was warned this selector might be
   renamed when the bar became a rail; it did not need to be, and `.reading .who`
   below is carried across unchanged.

   **A column of label-over-value rather than a baseline row.** It was a
   horizontal strip pushed to the right-hand end of a full-width bar; in a
   12.5rem rail the same flex row wraps between a label and the figure it labels,
   which is the one place it must not. Each label, the name and the sign-out form
   claim a whole line (`flex-basis: 100%`), so a figure sits under the word for
   it and nothing is orphaned. Inside the 56.25rem layer the rail is a row again
   and so is this. */
.reading {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin: 0;
  font-size: var(--fs-2);
  line-height: var(--lh-2);
  color: var(--dim);
}
/* **A label pushed against its own figure, one pair per line.** It was a
   wrapping baseline row where `flex-basis: 100%` on the labels was doing the
   work, so a label and the number it labels could land on different lines --
   which is the one place they must not, and is exactly what happened to
   `BILLED TODAY` beside a `$0.00` and an ⓘ. `space-between` is the mock's
   arrangement and it cannot wrap wrongly because there is nothing to wrap. */
.reading .row {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  margin: 0;
}
.reading .row > :last-child { margin-left: auto; }
.reading .idle { font-size: var(--fs-2); }
/* SLOTS / SPEND: a micro-label, so **sans**. What it labels is not. */
.reading .label {
  font: 600 var(--fs-1)/var(--lh-1) var(--font-sans);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--dim);
}
.reading b { font-family: var(--mono); font-size: var(--fs-4); color: var(--ink); }
/* The one figure that can be a warning: the box is committed past its own
   ceiling. The number says it too -- `10/8` -- which is what keeps this from
   being colour as the only carrier. */
.reading b.warn { color: var(--warn-ink); }
/* "at load", and it is the whole of the snapshot claim. Smaller than the number
   and never hidden behind the ⓘ: a stale figure read as live is the difference
   between "there is room" and "a Start will be refused". */
.reading .asof { font-size: var(--fs-1); line-height: var(--lh-1); font-style: italic; }
/* Who is holding the console. **Sans, and that is the type table read straight
   off**: mono is what an operator compares down a column -- a run id, a pid, a
   rate, a cost -- and a username is an identity rather than a value anybody
   lines up. So it is not `.reading b`, which is the bar's two *figures*.

   `.name` rather than `.who`, because `.who` is now the *row* the name sits in:
   the footer became one `.row` per pair when it stopped being a wrapping
   baseline group, and the name needed a class of its own inside one. */
.reading .name { color: var(--ink); font-weight: 600; }
/* The sign-out button is a whole row rather than an item pushed to the end of
   one: it is the only *action* in the rail's footer, and a 44px control sharing
   a line with a 12px label reads as a control attached to the label. */
.reading form { display: block; }
.reading form button { width: 100%; }

/* Where the page sits and what it says about itself, as one block --
   `ui.pagehead`. The trail and the tagline were two loose elements in the
   layout with five steps of air between them, so an address and the name it
   addresses read as two unrelated lines. The air that separates the *pair* from
   the page lives on the wrapper now, which is also why a page with no tagline at
   all no longer draws an empty paragraph with a margin under it. */
/* **A row now, and it has a title in it.** The mock draws the trail, the page's
   name and its one line down the left with the page's own actions pinned to the
   right of the same header, wrapping to a second row when there is not enough
   width for both. What it changes about the console is the reading order:
   address, name, sentence, in three sizes rather than one dim paragraph at the
   top of every surface. `_ui.html`'s `pagehead` says why the title stopped being
   refused. */
.pagehead {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--sp-4) var(--sp-6);
  margin: 0 0 var(--sp-6);
}
.pagehead .what { flex: 1 1 22rem; min-width: 0; }
/* **`--fs-7` finally gets the element its own comment names.** The token has read
   "the page title, and nothing else" since `B1` declared the scale, and until now
   the console had no page title -- so the step was spent on the wordmark in the
   rail instead, and every page's largest type was the product's name. The mark
   drops to step 6 (see `.mark`) and this takes the step that was always
   described as its.

   The tracking is the display value for the reason the mark takes it: the side
   bearings a face ships are a proportion of the em, so a heading at this size
   wants less air between the letters rather than more. */
.pagehead h1 {
  margin: 0;
  font: 600 var(--fs-7)/var(--lh-7) var(--font-sans);
  letter-spacing: var(--ls-display);
  color: var(--ink);
}
/* The actions sit on the title's own line rather than the trail's: the trail is
   an address in 11px mono and a row of buttons beside it reads as a toolbar
   attached to the breadcrumb. One line of nudge is what the mock's `padding-top`
   is doing, spelled as a step of the scale. */
.pagehead .pageactions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  padding-top: var(--sp-5);
}
/* The page's own line. It was `.masthead p`.

   **A measure, and it is the one length in this block that is about reading
   rather than about the mock.** The column is full-bleed now: at 1920 an
   unconstrained tagline is a 1600px line of 15px prose, which is roughly three
   times the length anybody tracks back across. 62ch is the mock's own figure and
   is inside the 45-75 the typographic literature settles on. It applies to the
   sentence and not to the block, so the ⓘ stays on its end. */
.tagline {
  margin: var(--sp-2) 0 0;
  max-width: 62ch;
  color: var(--dim);
  font-size: var(--fs-4);
}
/* A tagline with an ⓘ on it is a **sentence and a control**, and only the
   sentence has a measure. Counting the glyph against the cap is what put it
   alone on a second line under `/retired`'s tagline: 76 characters fit inside
   62ch and 76 characters plus a 22px button did not. `ui.lede` wraps the
   sentence for exactly this; a tagline with no ⓘ has no `.said` in it, does not
   match, and keeps the cap on the paragraph. */
.tagline:has(.info) {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  max-width: none;
}
.tagline .said { max-width: 62ch; }

/* **Two questions side by side, and it is the design mock's own division of a
   campaign's Overview.** The left track is the day and the days before it, read
   down a column; the right is what the window produced, which is a five-row
   tally that was sitting alone on a 1400px line under a table.

   `minmax(0, …fr)` on both for the reason `.column` and the fleet card carry it:
   a grid item's automatic minimum is its content, so the history table would
   push the tally off the page rather than scrolling inside its own `.tablewrap`.
   The first heading in each track loses its top margin -- an `<h2>` has one so it
   separates itself from whatever preceded it, and at the top of a column there is
   nothing to separate from, which reads as the two columns starting at different
   heights.

   One track under 69rem, which is where the shell stops fitting and is the same
   step the fleet card's three columns collapse at. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--sp-4) var(--sp-6);
  align-items: start;
}
.split > * > :first-child { margin-top: 0; }

/* The Cost panel's rows: a label against its figure, the way the rail's footer
   and a card's day line already draw a pair. `.lead` is today's spend, which is
   the figure somebody opened the section for; the cap under it is the thing that
   qualifies it, at the size of the label rather than the size of the answer.

   The rule between them is what stops a reader taking the cap for the spend —
   `campaign_ui.spend_today` records that as a reader's complaint rather than a
   preference. */
.costpane .row,
.rankpane .row {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  margin: 0;
  font-size: var(--fs-3);
  color: var(--dim);
}
.costpane .row + .row,
.rankpane .row + .row { margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--rule-soft); }
.costpane .row b,
.rankpane .row b { margin-left: auto; font-family: var(--mono); color: var(--ink); }
.costpane .row.lead b { font-size: var(--fs-7); line-height: var(--lh-7); letter-spacing: var(--ls-display); }
/* The third state, and the tone says which it is: a ceiling nobody has set is a
   thing to know rather than a thing that is well. `console.css`'s state table
   supplies the word; nothing here picks a colour. */
.costpane .unset { color: var(--warn-ink); }
.costpane .note { margin: var(--sp-3) 0 0; font-style: normal; }

/* Where the site ranks: Cost's rows, with a label that is two lines -- the
   query, then where and when it was asked in the mono meta size -- and a figure
   that does not wrap, so a long query is what gives way. An `absent` row is an
   answer and is drawn, but as a word in the prose face and dimmed, since it is
   not a figure to compare down the card. `campaign_ui.ranks` carries the
   argument. */
.rankpane .row .label { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; }
.rankpane .row .query { color: var(--ink); overflow-wrap: anywhere; }
.rankpane .row .meta { font-size: var(--fs-2); }
.rankpane .row b { white-space: nowrap; }
.rankpane .row.absent b { font-family: inherit; color: var(--dim); }

/* **The four pages that are a *measure*, and this is what replaced
   `--page-width`.**
   `<body>` used to cap the whole console at 68rem, rail included; the mock caps
   these four and leaves everything else edge to edge. The division is not
   arbitrary and it is not per-page taste: a stack of labelled fields, a grid of
   knob cards and a five-column roster are read *across a line*, so they have a
   measure the way a paragraph does. The fleet's cards, the eight-column sessions
   table, the log and the two-column detail pages are read *down a column*, and
   every pixel of width is a column they do not have to scroll.

   Their own figures rather than one token, because the mock gives four and they
   differ by what is in them -- 840 for a form of paired fields, 1000 for a grid
   whose cell floor is `--knob-col`, 900 and 940 for two rosters. Written to the
   rem scale at a 16px root, which is what those pixel values are. */
main[data-page="settings"] { max-width: 52.5rem; }
main[data-page="config"] { max-width: 62.5rem; }
main[data-page="retired"] { max-width: 56.25rem; }
main[data-page="bulk"] { max-width: 58.75rem; }
/* A fifth, and the plainest case of the argument above: `/changelog` is prose,
   read across a line, so it gets a reading measure rather than the viewport. */
main[data-page="changelog"] { max-width: 48rem; }

/* The changelog's releases. A version heading is the page's `<h2>`, its date the
   mono micro-label beside it (a date is compared down a column of releases), and
   the groups under it are `<h3>` -- `ui.section` draws both. */
.release + .release { margin-top: var(--sp-7); }
/* A version heading is what the page is scanned by, so it is the one `<h2>` on
   the console drawn in ink at a reading size rather than as a dim micro-label --
   the group headings under it (`Added`, `Fixed`) keep the `h3` label. The name
   is a version compared against the bar's, so it is mono. */
.release h2 {
  font-family: var(--mono);
  font-size: var(--fs-5);
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink);
}
.release h2 time {
  font-family: var(--mono);
  font-size: var(--fs-2);
  font-weight: normal;
  color: var(--dim);
}
.release ul { margin: 0 0 var(--sp-4); padding-left: var(--sp-5); }
.release li + li { margin-top: var(--sp-2); }

/* Breadcrumbs. `crumbs(items)` renders a `<nav class="crumbs">` holding an
   `<ol>` of `<li>`, the last one carrying `aria-current="page"` -- so the
   separator is drawn by CSS and never sits in the accessible name.

   **Tight to the tagline under it**, one space step rather than five: the trail
   moved above the page's own line (`_layout.html` says why), and an address
   belongs *with* the name it addresses. Five steps of air between the two made
   them read as two unrelated lines. */
/* **Mono, and it is the type table read straight off rather than a borrowing
   from the mock.** A trail is a path: `Console / Campaigns / site-a` is the same
   kind of string as a run id or a day, its segments line up down a stack of
   pages, and the classification rule this console has followed since `B1` is
   that mono means a value you compare rather than prose you read. It was
   `--fs-3` sans and now sits a step down at `--fs-2`, which is what puts it
   under the title rather than beside it. */
.crumbs {
  margin: 0 0 var(--sp-2);
  font-family: var(--mono);
  font-size: var(--fs-2);
  color: var(--dim);
}
.crumbs ol { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
/* `.8` rather than `.6`: the separator is punctuation, but it is rendered text,
   and six tenths of `--dim` over the page measured 2.9:1. */
.crumbs li + li::before { content: "/"; margin-right: var(--sp-2); color: var(--dim); opacity: .8; }
.crumbs a { color: var(--dim); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--ink); }

/* The tab bar over a campaign's sub-pages. The active tab is marked by
   `aria-current="page"` and nothing else: a second class saying the same thing
   is a second thing to forget.

   **Underlined where the bar above is filled, and the difference is deliberate.**
   Two levels of navigation that look the same are one level drawn twice: the
   pills in the bar move between the console's four *sections*, and these move
   between the four faces of one campaign. A tab attached to the rule under it
   reads as part of the thing it belongs to, which is exactly the claim.

   `--lh-1` for the same reason the pills take it -- a tab's label is one line,
   aligned by its box -- and the weight on the current one is the same
   colour-is-not-the-only-carrier argument. */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  margin: 0 0 var(--sp-6);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-3);
}
.tabs a {
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: -1px;
  line-height: var(--lh-1);
  color: var(--dim);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.tabs a:hover { color: var(--ink); border-bottom-color: var(--rule-line); }
.tabs a[aria-current="page"] {
  font-weight: 600;
  color: var(--accent-ink);
  border-bottom-color: var(--accent-ink);
}

/* -- a strip of filters ----------------------------------------------------

   `ui.filters` (Track 18): chips that narrow what a page or a fragment shows --
   a run's log by kind, `/runs` by outcome. The `.tabs` treatment at a smaller
   step, and deliberately *not* a tab strip: a tab moves you to another face of a
   thing, a filter shows less of the face you are on, so it carries no rule under
   it and its current chip is filled rather than underlined. The weight on the
   current one is the colour-is-not-the-only-carrier argument again. No face is
   named here; a chip's label is prose. */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-3);
}
.filters a {
  padding: var(--sp-2) var(--sp-3);
  line-height: var(--lh-1);
  color: var(--dim);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
}
.filters a:hover { color: var(--ink); border-color: var(--dim); }
.filters a[aria-current="true"] {
  font-weight: 600;
  color: var(--accent-ink);
  border-color: var(--accent-ink);
}

.lede { margin: 0 0 var(--sp-6); color: var(--dim); font-size: var(--fs-4); max-width: 54rem; }
.lede code { color: var(--ink); }

/* -- headings -------------------------------------------------------------

   Two element rules, because after `B0` every `<h2>` and `<h3>` on the console
   comes out of one macro (`ui.section`) and there is nothing else for either
   selector to catch. A heading is **sans**: it names what is under it and is
   read once, and nothing lines two of them up.

   `h3` used to be `.section > h3, .pane h3` -- a descendant rule, so the two
   headings on a campaign's Overview that sit *outside* the polled pane matched
   neither half of it and came out as the browser's own bold 1.17em, beside two
   inside it drawn as accent micro-labels. That is the defect a heading written
   into seven templates produces and it is why `B0` collapsed them: classified
   here, once, both draw the same. */
h2 {
  margin: var(--sp-6) 0 var(--sp-3);
  font: 600 var(--fs-3)/var(--lh-1) var(--font-sans);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--dim);
}
h3 {
  margin: var(--sp-5) 0 var(--sp-1);
  font: 600 var(--fs-1)/var(--lh-1) var(--font-sans);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--accent-ink);
}

/* -- primitives -----------------------------------------------------------

   Added alongside the names the templates use today rather than instead of
   them: U1 and U2 rewrite the markup, and a stylesheet that renamed things
   first would have made that a rewrite of two files at once. Each shares its
   rule with the selector it will eventually absorb.

   **Which makes each of these a name with a deadline**, and `B4` is where the
   last of them came due: an alias that outlives the rename it was written for
   stops being a bridge and becomes a second name for one thing. `.section` was
   retired at `B1`, `.card` at `B3`, `.launch label` before either, and `B4`
   settles the four that were left -- `.btn` and `.kv` are **retired** (nothing
   ever emitted either, and both had a live name already), while `.btn-danger`
   and `.btn-quiet` are **kept and made live**, absorbing `button.stop` and
   `.actions .reset` respectively. The button block below carries that argument
   where it belongs.

   So the ones still standing -- `.campaign`, `.run`, `.badge`, `.outcome`,
   `.warn-chip` -- are the list of renames the templates have not done yet, not a
   vocabulary. `.facts` has left that list without being renamed: it was paired
   with `.kv`, `.kv` is gone, and a name whose replacement was retired is simply
   the name. */

/* A panel: a page's worth of one subject, with no state of its own.

   **`.section` is retired here and it was never anything but an alias.** U0 was
   forbidden from editing templates, so each primitive it introduced was declared
   beside the older selector it would eventually absorb -- and this one was
   declared beside a selector that did not exist: no template has ever emitted
   `class="section"`, before U0 or since. It is the shape `.launch label` had one
   rule down, an alias kept alive next to the name it was going to replace, and
   the reason to retire it rather than leave it is the same reason plus one:
   `_ui.html` now has a macro called `section`, and that macro renders a
   *heading*. Two live names one letter apart, meaning a panel in this file and a
   heading in that one, is a defect waiting for whoever reads them in the wrong
   order. `.pane` is the name, it is what both call sites write, and the panel
   below is unchanged in every other respect. */
.pane {
  margin-bottom: var(--sp-6);
  padding: var(--sp-4) var(--sp-5) var(--sp-5);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-4);
  box-shadow: var(--elev-2);
}

/* A card: one row of the fleet, one bot in the smoke pane, one session. The
   left rule is the state, and nothing else decides it.

   **After the panel rule on purpose.** Both campaign and run detail render
   `class="pane campaign …"` / `class="pane run …"`, and `border` is a shorthand:
   with the panel last, its `1px solid var(--line)` reset the left edge those
   pages exist to show. It survived as a *one-pixel* state rule, because the old
   per-state rules set only `border-left-color` and outspecified it. Ordered this
   way the card wins outright and a detail page gets the same edge its own card
   in the fleet has.

   **`.card` was the U0 alias on this rule and `B3` retired it rather than
   renaming the templates into it** -- the deadline the primitive block above
   says every one of these names carries, come due and decided. The two live
   names are not legacy: the state table's one exception is `.campaign.running`,
   because a campaign that is running is doing the only thing it exists to do
   where a *run* that is running is merely live, and that exception keys on the
   domain class. Renaming both elements to `.card` would either lose the
   exception or leave `.card.running` meaning "campaign" until the day a run card
   took the same name and silently turned green. A name that cannot absorb the
   two things it was written for is a second name for one of them, which is what
   `.section` was retired for at `B1`. */
.campaign, .run {
  margin-bottom: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: var(--edge) solid var(--state-ink);
  border-radius: var(--radius-3);
  /* One step, and it is the lower of the two because a card is the smaller
     thing. Both detail pages render `class="pane campaign …"` / `"pane run …"`,
     so they take a panel's shadow *and* a card's -- and the card's wins for the
     reason the border does, which is that this rule is written after the panel's
     on purpose. A campaign's own page and its card in the fleet come out at the
     same height off the page, which is what somebody who clicked one to reach
     the other expects. */
  box-shadow: var(--elev-1);
}
.campaign header, .run header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

/* **A fleet card is a three-column grid, and that is the design mock's own
   division of it.** It was a header with the identity at one end and the buttons
   at the other, over three full-width paragraphs -- so on a console that is now
   edge to edge, one campaign's name sat 1400px from its own Stop button and the
   day under it ran the whole width to say `9 of 495`. Three cells, each
   answering one question: who this is, how today is going, and what you can do
   about it.

   The tracks are the mock's ratios. The first two are `minmax(0, …fr)` so that
   a long URL or a wide meter shrinks rather than pushing the third off the card
   -- a grid item's automatic minimum is its content, the same rule `.column`
   carries for the shell. The third is `auto`: a row of buttons has one right
   width and it is whichever buttons this campaign's state draws.

   `.flags` spans all three. See `campaign_ui.card` for why a warning chip is not
   filed under the progress it is not about.

   **`article.campaign` and not `.campaign`, and the element is the distinction
   rather than a modifier class.** Three templates render `class="campaign …"`:
   `campaign_ui.card` writes an `<article>`, because a card in a list is a
   self-contained thing; `_campaign.html` and `_head.html` write a `<section>`,
   because a campaign's own page is a region *of* the page it is the subject of.
   That is the difference the grid is about, it was already in the markup, and a
   second name for it would be a second thing to keep in step. `.run` is untouched
   for the same reason -- a run's page is a detail page and renders a header. */
article.campaign {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) auto;
  gap: var(--sp-3) var(--sp-6);
  align-items: center;
}
/* **A campaign that is a *page body* rather than a thing on a page.** The
   Overview carries `class="campaign bare …"`: it needs the state class, because
   the state table's one exception keys on `.campaign`, and it must not be a box,
   because everything inside it is one. It was `pane campaign`, which drew four
   stat cards, two tables and two panels inside a bordered card with a green edge
   down it. */
.campaign.bare {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
article.campaign > .who { min-width: 0; display: flex; align-items: center; gap: var(--sp-2) var(--sp-3); flex-wrap: wrap; }
article.campaign > .today { min-width: 0; }
article.campaign > .flags { grid-column: 1 / -1; }
article.campaign > .flags > :first-child { margin-top: 0; }

/* The card's identity, as the mock's two lines. `.name` is the campaign and what
   state it is in; `.where` is what it points at and how fast. Each is its own
   row, so a long URL wraps under itself rather than pushing the pid onto a
   second line of the first row. */
article.campaign > .who { display: block; }
.campaign .line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-3);
  margin: 0;
}
.campaign .line.where { margin-top: var(--sp-2); }
/* The state, as a dot before the name. `aria-hidden` in the markup, because the
   chip beside it says the same thing in a word — what this buys is a left edge
   for a column of names to line up against. It pulses only when the campaign is
   doing the thing it exists to do; `prefers-reduced-motion` stops it, through
   the block at the foot of this file. */
.campaign .line .dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--state-ink);
}
.campaign.running > .who .dot { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.campaign .who a.who,
.campaign header .who {
  color: var(--ink);
  text-decoration: none;
  font-size: var(--fs-6);
  line-height: var(--lh-6);
  font-weight: 600;
  letter-spacing: var(--ls-display);
}
.campaign .who a.who:hover, .campaign header .who:hover { text-decoration: underline; }
/* The buttons, as a group at the right end. On a card that is now the third grid
   cell, so the auto margin that used to push them there is gone -- the *track*
   is what puts them at the end, and it is `auto`, so the free space lands in the
   two `fr` columns beside them rather than between two buttons. `.run`'s header
   is still a flex row and still wants it. */
.run header .actions { margin-left: auto; }

/* A chip: `.badge` (what a thing is), `.outcome` (how a run ended) and
   `.warn-chip` (something to know) were one component wearing three names.
   It takes its tone from whatever it sits inside, so a chip whose subject is
   *not* its container's state -- a job's status on a run's page -- has to be
   given one.

   **The ground is the well, not a tint of the tone, and that is the one rule the
   palette recalibration had to change.** A chip drew `--state-bg` -- the tone at
   18% over whatever it sat on -- with the *same tone* as its ink, which is a pair
   whose contrast is capped by the container: on `--surface-panel` a `stopped`
   badge measured 3.63:1 and a `failed` one 4.27:1, and lowering the alpha cannot
   fix it because at 0% the same pair is still only 4.66:1. So the tint is gone,
   the pill is sunk into the page's darkest surface -- 5.6:1 for the dimmest tone
   this table has, 12.9:1 for the brightest -- and the tone is carried by the ink
   and by a border at `--state-edge`, where a tint's job was. It also reads as
   what it is: at `.7rem` an inset pill on a raised card is a chip, where a 9%
   difference in background was a rectangle somebody had tinted.

   The hover inverts rather than brightening, for the same measurement one step
   on: `--ink` over the tone at 45% was 4.22:1 for the brightest tone, and a
   filled pill with the well's own near-black on it is 13:1 for every tone.

   **Sans, and it is the classification that changes this rule.** A chip says
   `running`, `stopped`, `failed_blocked` -- a state's own name, read once as a
   word, never lined up against the chip on the card above. It was mono because
   everything was; at `.7rem` a fixed pitch is also the least legible thing the
   face can do, and the capitals get the scale's tracking instead. */
.chip, .badge, .outcome, .warn-chip {
  font: 600 var(--fs-1)/var(--lh-1) var(--font-sans);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  padding: .3em .5em;
  border: 1px solid var(--state-edge);
  border-radius: var(--radius-2);
  background: var(--surface-sunken);
  color: var(--state-ink);
}
/* A chip that opens a `.why`. It is a link, so it takes the focus ring. */
a.chip { text-decoration: none; }
a.chip:hover { background: var(--state); border-color: var(--state); color: var(--ink-inverse); }

/* The disclosure U2 and U6 hang warning prose on. `:target` rather than
   `<details>` -- `_ui.html`'s `why()` carries the whole reason and the
   measurement that narrowed it: the hash survives an `outerHTML` swap and the
   *target* does not, so an opened `.why` inside a polled fragment closes at the
   next poll and one more click re-opens it. What a `<details>` would lose in the
   same place is the fact that it was open at all. The knob groups below are the
   other half of that rule and really are `<details>`, because neither surface
   drawing them polls -- a form inside a polled region wipes what somebody is
   typing, so the two knob pages are the two that cannot be one. */
.why { display: none; }
.why:target {
  display: block;
  margin: var(--sp-3) 0 0;
  padding: var(--sp-3) var(--sp-4);
  scroll-margin-top: var(--sp-6);
  background: var(--state-wash);
  border-left: var(--edge) solid var(--state-ink);
  border-radius: var(--radius-2);
  font-size: var(--fs-3);
  color: var(--ink);
}
.why p { margin: 0 0 var(--sp-2); }
.why p:last-child { margin-bottom: 0; }
.why .dismiss { float: right; color: var(--dim); font-size: var(--fs-2); line-height: var(--lh-2); }

/* A strip of numbers across the top of a page. `<div class="stat"><span
   class="label">…</span><b>…</b><span class="hint">…</span></div>`.

   **`D3` gave the cells a width, and until then the hints were setting one.** A
   `.stat` is a column of three lines of which the third is a *sentence* -- "over
   0 session(s) with a ledger row, and nothing capping it" -- so a flex item
   sized to its content came out as wide as its caveat. Three of them measured
   ~300px each against an 816px column, so the third wrapped to a second row and
   the Overview opened with two figures side by side and a third underneath, at
   three different left edges. That is a strip of numbers that cannot be read as
   one, and the number is the only thing on it anybody came for.

   `flex: 1 1 var(--stat-col)` is the whole fix: the cells share the row, the
   hint wraps *inside* its own cell instead of deciding how wide the cell is, and
   the labels line up. `--stat-col` is a floor rather than a width -- three fit
   across a full column, two at a tablet, one on a phone -- so the strip still
   wraps, it just wraps as columns rather than as content.

   **The `.info` deliberately does not grow.** `spend_today` ends its strip with
   an ⓘ that is a member of the row rather than a paragraph under it, and it is a
   22px control: giving it a share of the free space would put a fifth of the
   strip's width behind one glyph. It stays content-sized and centred (see the
   rule beside `.infobox`, which is where the `align-self` argument is). */
/* **A grid of cards, and it was a borderless flex row.** The mock draws each
   figure in its own panel -- `repeat(auto-fit, minmax(190px, 1fr))`, with a
   border, a radius and its own ground -- and that is the difference between a
   strip of four numbers and four things a reader compares. `auto-fit` rather
   than a count: the fleet draws four and a campaign draws four, but the spend
   strip draws two or three, and a grid that counts its own columns needs no
   caller to say which.

   `--stat-col` is the track floor and it drops from 13rem to 11.875rem here,
   which is the mock's 190px: a *card* holds its hint at a narrower width than a
   bare column did, because the card's own padding is what was keeping two hints
   apart before. */
.statstrip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--stat-col), 1fr));
  gap: var(--sp-4);
  margin: 0 0 var(--sp-6);
  padding: 0;
  list-style: none;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-4) var(--sp-5);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-3);
  box-shadow: var(--elev-1);
}
/* The label is sans and the figure under it is mono, and this is the pair the
   whole classification is about: the label says what the column is, the figure
   is the column.

   The step of air under it is the mock's 9px: in a card the two are the only
   things in a column, and a tight pair reads as one line broken in the wrong
   place. */
.stat .label {
  margin-bottom: var(--sp-2);
  font: 600 var(--fs-1)/var(--lh-1) var(--font-sans);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--dim);
}
/* **The figure is the largest thing in the card**, and it takes `--fs-7` -- the
   page title's step, and the only other element on this console that does. A
   stat card exists to be read across a row of four at a glance; at `--fs-6` it
   was the same size as a campaign's name on the card underneath it, which is
   how a strip of headline figures came to read as a caption. */
.stat b, .stat .value {
  font-family: var(--mono);
  font-size: var(--fs-7);
  line-height: var(--lh-7);
  letter-spacing: var(--ls-display);
  color: var(--ink);
}
/* The figure's scale, beside the figure and not the same size as it -- `stat`'s
   `unit` parameter, and the defect it fixes is one glance long. "done today" was
   `9 of 495` set as one mono string at `--fs-6`, so the number a reader is
   looking for and the number it is measured against were the same size, the same
   colour and the same face: three characters of answer inside eight of context.
   The unit is the context, so it is set where every other piece of context on
   this console is -- the secondary ink, a step down, on the figure's own
   baseline. It is still mono, because `of 495` ends in a figure somebody
   compares to the one on the card below.

   **Inside the `<b>` rather than beside it**, which is why it needs a weight of
   its own: `.stat` is a *column* of three lines, so a fourth child would be a
   fourth line, and the unit belongs on the figure's baseline. Sitting inside the
   `<b>` it would otherwise take that element's bold. */
.stat .unit {
  font-family: var(--mono);
  font-size: var(--fs-3);
  font-weight: 400;
  color: var(--dim);
}
.stat .hint { margin-top: var(--sp-2); font-size: var(--fs-2); line-height: var(--lh-2); color: var(--dim); }

/* A key/value block: a run's own facts, and its error.

   **`.kv` was the U0 alias here and `B4` retired it**, which is the same
   argument `.section` and `.card` were retired on and the shortest of the three:
   no template has ever emitted `class="kv"`, before U0 or since. `.facts` is
   what `run.html` writes, twice, and it is the only caller either name has ever
   had -- so the pair was not a bridge from an old name to a new one, it was one
   rule answering to two selectors of which one was reachable. Renaming the two
   call sites into `.kv` would have been the same file's worth of churn for a
   three-letter name, and leaving both would have left the next reader picking.

   `align-items: baseline` is what pays for the term's leading going solid with
   every other micro-label: the `dt` used to carry a `/1.5` line-height whose
   only job was to drop its single line far enough to look level with the `dd`
   beside it, which is a type value doing a layout value's work and drifts the
   moment either step moves. A grid row aligns its items' first baselines when
   asked to, and then the two can be set at whatever size each wants. */
.facts {
  display: grid;
  grid-template-columns: minmax(7rem, 9rem) 1fr;
  align-items: baseline;
  gap: var(--sp-2) var(--sp-4);
  margin: var(--sp-3) 0 0;
}
.facts dt {
  font: 600 var(--fs-1)/var(--lh-1) var(--font-sans);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--dim);
}
.facts dd { margin: 0; font-size: var(--fs-4); }
.facts.error dd { font-family: var(--mono); font-size: var(--fs-3); overflow-wrap: anywhere; }

/* A labelled control.

   **`.launch label` used to be on this rule and it was a trap, not an alias.**
   U0 was forbidden from editing templates, so every primitive it introduced was
   declared beside the older selector it would eventually absorb. That one was
   a *descendant* selector -- specificity 0-1-1 -- while `.knob` below is a single
   class at 0-1-0, and 0-1-1 beats 0-1-0 whatever the source order. So every knob
   label inside `_edit.html`'s `class="launch edit-campaign"` lost its
   `display: grid` and became this flex column, with `.knob`'s `align-items:
   center` -- vertical alignment in a grid row -- turning into horizontal centring;
   `/config`'s form is `class="knobs"` and drew the grid correctly, which is why
   the two pages disagreed about the same macro's output. Retired rather than
   out-specified: raising `.knob` would leave the trap armed for the next label
   that happens to sit inside a `.launch`. The three call sites that kept it
   alive -- `smoke.html`'s own labels, and `spec_fields`' `pool` modifier -- call
   `ui.field` / `ui.number_field` now. */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 1 1 var(--field-col);
  font-size: var(--fs-3);
  color: var(--dim);
}
.field.narrow { flex: 0 1 var(--field-col-narrow); }
/* The column, and none of what is left over -- which is the whole difference
   between this and `.field` itself, since both ask for the same `--field-col`.

   **`B4` left `Timezone` growing deliberately and recorded that a reader might
   disagree. `B5` walked it and disagrees.** In a row of four it was the only
   field with `flex-grow: 1`, so it took every pixel the other three did not:
   617px of box for `UTC`, beside three boxes a fifth of that, which reads as a
   mistake rather than as a wide field. It cannot be `narrow` -- 7rem does not
   hold `America/Argentina/Buenos_Aires`, which is why `spec_fields` took the
   modifier *off* it -- so the missing modifier was the one in between, and it is
   a third width in the same vocabulary rather than a `max-width` on one call
   site. What is left of the line stays empty, which is what a form does. */
.field.medium { flex: 0 1 var(--field-col); }
.field.wide { flex: 1 1 100%; }
/* **`min-width: 0` on the control and deliberately not on the field.** A flex
   item's automatic minimum is its content's, and a control's min-content is
   about twenty characters -- which is what made `.field.narrow` come out the
   same width as a wide one and what would stop any field shrinking on a phone.
   Zeroing it on the *field* was the first thing tried and it was worse: the
   floor went to nothing, so `Sessions/day required` overflowed a 118px box and
   painted itself across the label of the field beside it. Measured at 1130px,
   in a screenshot. Zeroed on the control instead, a field's floor is the longest
   *word* of its own label, which is the smallest number that is still true.

   `width: 100%` is the half of that which actually works, and it took a second
   measurement to find: `min-width: 0` lowers a box's floor but not its
   *min-content contribution*, and a text input's is its `size` attribute -- so
   `Country` came out 194px inside a modifier asking for 112px until the width
   was a percentage, which contributes nothing to intrinsic sizing. The textarea
   has carried `width: 100%` since U0 for the same reason, which is why it was
   the one control on the console that could already shrink. */
.field input, .field select, .field textarea { width: 100%; min-width: 0; }

/* The label's own line, and it is one element because it has to be one **flex
   item**. `.field` is a flex column, so a label's inline content is split into
   anonymous items at every element boundary: "Queries &mdash; one per line, ",
   a `<code>`, " to weight one" came out as three stacked lines at every width,
   which is the defect a reader reported at 1130px and `B3` handed on. Wrapped,
   the whole label is one item and its contents flow as text again -- which is
   also what lets the mark and the ⓘ sit beside the words rather than under
   them. No `display` here on purpose: a span is already an item, and its
   children are inline flow by inheritance.

   **It is `--ink` where the field around it is `--dim`, and that is a change to
   what a form label *is*.** Every label on the console was the secondary ink,
   which is right for a caption under a number and wrong for the word telling
   somebody what to type: on a form, the labels are the content. The inversion is
   also what pays for the mark below being legible without being loud -- with
   both at `--dim` the only thing separating them was that the smaller one was
   bold, so `REQUIRED` read louder than `Name`. */
.field .name { color: var(--ink); }
/* `required`, or `read-only`.

   **The one micro-label on this console that is not set as one**, and it was
   drawn that way first and measured: uppercase, bold and tracked, five of them
   down a create form read as five headings and `REQUIRED` was louder than
   `Name`. The shape is right for a *label* -- a `th`, a chip, a legend, a thing
   that names what is beside it -- and this is an annotation on a label rather
   than one of its own. So it is lower case and regular weight, one step down,
   in the secondary ink; it also fits `At once required` on one line at
   `--field-col-narrow`, which the uppercase version did not.

   `--dim` rather than a tone, because neither word is a warning: a form with
   five accent tags beside five labels reads as five things having gone wrong.
   `aria-hidden` in the markup, because the control already carries `required` /
   `disabled` and a screen reader announces both from there. */
.field .mark {
  margin-left: var(--sp-2);
  font: var(--fs-1)/var(--lh-1) var(--font-sans);
  color: var(--dim);
}

/* A group of fields under one legend -- `ui.fieldgroup`, and the whole of `B4`'s
   grouping. Every default a `<fieldset>` ships is undone here: the UA's border,
   its padding, and its `min-width: min-content`, which is the one that matters.
   A fieldset holding a flex row of inputs refuses to shrink below the widest
   thing in it, so at 380px it is the element that takes the page sideways --
   measured, and it is why this rule exists at all rather than the element being
   used bare. */
.fieldgroup {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--sp-4);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
/* The legend is not a flex item: a fieldset's rendered legend sits above its
   anonymous content box whatever `display` the fieldset takes, which is exactly
   the layout wanted and is why this is a `<fieldset>` rather than a `<div>` with
   a heading in it. `float` is what makes it a full-width line in the box rather
   than a shrink-wrapped label the first field sits beside. */
.fieldgroup > legend {
  float: left;
  width: 100%;
  padding: 0;
  margin-bottom: var(--sp-3);
  font: 600 var(--fs-1)/var(--lh-1) var(--font-sans);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--dim);
}

/* A form directly under a table in the same section -- the Messaging page's
   account form under the table of where its four secrets are set. Nothing else
   on the console puts a fieldset straight after a `.tablewrap`, so its legend
   sat on the table's bottom edge: measured in a screenshot, not a guess. */
.tablewrap + form { margin-top: var(--sp-5); }

/* A broadcast's body as a contact reads it: its own line breaks kept, since a
   message is written in lines and a collapsed one is not what anybody receives. */
.said {
  margin: var(--sp-3) 0 0;
  padding: var(--sp-4) var(--sp-5);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--panel);
  border-left: 3px solid var(--line);
}

/* -- buttons --------------------------------------------------------------

   **Three names, and they are loudness rather than verbs** -- which is `B4`'s
   call on the last of the U0 aliases, taken for the call site that is about to
   need it. `plans/campaign-lifecycle.md` `L2` adds a **Retire** to the same
   `.actions` row that draws Start and Stop: it is not destructive (`L0` gave a
   campaign a `retired_at` and refused it a delete), it is reversible, and it
   must not read as either of the two buttons beside it. A vocabulary of verbs
   has no name for that; a vocabulary of loudness does, and `L2` writes
   `class="btn-quiet"` and nothing else.

   **`.stop` and `.reset` are retired into those two**, and the reason is that
   both had already stopped naming what they matched: `class="stop"` was on the
   fleet's Stop, on the smoke pane's Stop **and on the edit form's "Restart
   now"**, so one of the three buttons wearing it was not a stop at all;
   `.actions .reset` named the single button on `/config` rather than a kind. A
   class that names one instance is a class the second instance renames.

   ------------------------------------------------------------------------

   **`D4` kept all three names and changed what two of them draw, because the
   vocabulary was right and the treatment was upside down.** Every screenshot of
   this console since `D0` opens on two filled salmon Stops dominating the fleet,
   a third on `/bulk`, and a filled *accent* `Filter` that is the loudest control
   on `/audit`. So the loudest pixels on the console belonged to a **destructive
   action** and to a **narrowing convenience**, which is the wrong way round in
   both directions at once -- one defect in two tones, and it is settled here as
   one decision rather than as two fixes.

   **The rule, and it is the whole of it: what a button draws follows from what
   it is to its *page*, not from what it is to its *form*.** Three questions, in
   this order, and the first that answers yes decides it:

     1. does pressing it end something that is in flight, or take something
        away?                                 -> `.btn-danger`, outlined
     2. does it write nothing at all -- only narrowing, resetting or discarding
        what is on the screen -- or is there another button in the same cluster
        that the page is more about?          -> `.btn-quiet`
     3. otherwise it is the action the page exists to take
                                              -> a bare `<button>`, filled

   Question 2 is the one that moved `Filter`. It is the submit of its own form,
   which is what made it a bare `<button>`; it is not what `/audit` is *for*,
   which is the trail underneath it, and it sends a `GET`. `/config`'s Reset was
   already quiet on that reasoning and nobody had written the reasoning down.

   **What each one draws, and there is exactly one filled thing per cluster:**

     a bare `<button>`   the accent, filled, with the darkest surface as its ink.
                         Unchanged. It is the only saturated block of colour in a
                         row of controls, which is what makes it findable without
                         being read.
     `.btn-danger`       outlined: a 16% tint of the tone, a 1px border in the
                         **paint** value and the label in the **ink** twin. Found
                         by hue rather than by area -- a control whose press
                         cannot be undone by pressing it again has to be
                         unmistakable, which is not the same as loud. This is the
                         mock's own shape (`#2e2426` under `#6e4744` under
                         `#c06a63`), re-derived through `D0`'s split rather than
                         transcribed: `#c06a63` **is** `--bad`, and `--bad` as
                         text measures 3.96--4.40:1, which is the failure that
                         split existed for.
     `.btn-quiet`        unchanged: the rule line, filled, with the ordinary ink.
                         Neither the page's action nor a destruction -- a
                         convenience, or a write that Revive undoes.

   **16% and not `--state-wash`'s 9%, and that alpha is the one number in this
   block that came off a screenshot rather than out of the arithmetic.** A wash is
   sized for a *row* -- a wide band behind a table -- and at 9% the danger button
   came out with a body of L* 18.7 against the grey `.btn-quiet` beside it at
   22.1, so the Retire on every fleet card read as the more solid of the two.
   That is `B4`'s ranking inverted: the loud one has to be at least as present as
   the one whose whole job is to read as neither. 16% puts it at **21.6** -- the
   same body as the quiet button, plus a coloured border and a coloured label
   that the quiet button does not have -- and it is the alpha this file already
   spends on its one other tinted control ground, the current nav item.

   The rest is measured: the border is `--bad` at 3.96:1 on a panel, 4.40 on the
   page and 3.26 on its own fill, all three over 1.4.11's 3:1, so the control's
   boundary is identifiable against both colours adjacent to it on either ground
   it can sit on. The label is `--bad-ink` at 4.80:1 / 5.33:1.

   Both modifiers ride the element selector rather than repeating its body,
   because every button the console draws is a `<button>`: an `<a>` styled as one
   is a link that is not a link, and `L2`'s Retire is an `hx-post` behind an
   `hx-confirm`, like the Stop beside it. The element rule carries a
   **transparent** border rather than none, so that adding a visible one to a
   modifier does not make that kind of button two pixels bigger than the one
   next to it in the same row. */
button {
  padding: var(--sp-3) var(--sp-5);
  font: 600 var(--fs-4)/var(--lh-1) var(--font-sans);
  color: var(--ink-inverse);
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: var(--radius-2);
  box-shadow: var(--elev-1);
  cursor: pointer;
  transition: filter .12s ease-out;
}
button:hover { filter: brightness(1.1); }
/* Its own state rather than whatever reached it, which is the idiom `:where()`
   gives `.banner`, `.log` and `.knobgroup`: a Stop lives inside a
   `.campaign.running` card, so a bare `--state-wash` here would draw the *card's*
   tone -- a green Stop on a running campaign, which is every card on the fleet.
   Zero specificity, so a state class on the button itself would still win. */
:where(.btn-danger) { --state-rgb: var(--rgb-bad); --state-ink-rgb: var(--rgb-bad-ink); }
.btn-danger {
  color: var(--state-ink);
  background: rgb(var(--state-rgb) / 16%);
  border-color: var(--state);
}
/* The smoke pane's own Stop, which is not in an `.actions` row: it is the last
   item of the `.batch` line and pushes itself to the end of it. A position is a
   fact about the row a button is in, and a danger colour is a fact about the
   button, so the two are not one rule. */
.batch .btn-danger { margin-left: auto; }
.btn-quiet { background: var(--line); color: var(--ink); }
/* **A link drawn as a button, and the comment above says why that is normally
   refused** — "an `<a>` styled as one is a link that is not a link". It is right,
   and there are exactly two places the *inverse* is true, both of them the design
   mock's: a page action at the top right of the header (`New campaign`) and the
   health strip's `Open potter-hq`. Neither is a write. Both *go somewhere*, which
   is what an `<a>` is for and what a `<button>` would be lying about — a
   `<button>` that navigates loses the middle click, the open-in-new-tab and the
   status bar, and screen readers announce it as an action rather than a
   destination.

   So the rule is: **a button is a write, a link is a destination, and either may
   be drawn loudly.** `.btn-primary` is the accent shape for the second kind;
   `.btn-quiet` above already gets used by both. `inline-flex` and the centring
   are what an `<a>` needs to hold a `<button>`'s box. */
.btn-primary, a.btn-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-3) var(--sp-5);
  font: 600 var(--fs-4)/var(--lh-1) var(--font-sans);
  border: 1px solid transparent;
  border-radius: var(--radius-2);
  box-shadow: var(--elev-1);
  text-decoration: none;
  cursor: pointer;
  transition: filter .12s ease-out;
}
.btn-primary { color: var(--ink-inverse); background: var(--accent); }
a.btn-quiet { color: var(--ink); background: var(--line); }
.btn-primary:hover, a.btn-quiet:hover { filter: brightness(1.1); text-decoration: none; }

.actions { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.actions .held { color: var(--dim); font-size: var(--fs-3); }

/* -- the smoke form ------------------------------------------------------- */

.launch {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-end;
  flex-wrap: wrap;
  padding: var(--sp-5);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-4);
  box-shadow: var(--elev-2);
}
/* Every control below stays **mono**, and it is the one classification worth
   arguing with. What is typed into these boxes is a URL, a daily count, an IANA
   timezone, a two-letter geo and a pool of queries -- each of them also an
   argument to a `seot campaigns create` line, and the pool in particular is a
   column of lines whose entire point is that they line up under each other. The
   *label* over the box is sans; the box is a value.

   Scoped to `.field` rather than to `.launch`, for the reason the label rule
   above gives at length: every control inside a `.launch` form is inside a
   `.field` now, and a `.launch input` here would go on matching the knob inputs
   in `_edit.html` at the same specificity as `.knob input` -- a second collision
   waiting on source order rather than on a decision. */
.field input, .field select {
  padding: var(--sp-3) var(--sp-3);
  font: var(--fs-4) var(--mono);
  color: var(--ink);
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
}
.field textarea {
  width: 100%;
  padding: var(--sp-3) var(--sp-3);
  font: var(--fs-3)/var(--lh-3) var(--mono);
  color: var(--ink);
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  resize: vertical;
}

/* -- what a control says about itself -------------------------------------

   Three states that were the user agent's own until `B4`, which is the half of a
   form a stylesheet cannot see: `color-scheme` at the top of this file fixes the
   *widgets*, and these fix the three things a control has to be able to say
   about itself -- this is an example, I was refused, you may not type here.

   **An example is not a value.** A placeholder had no rule, so it took the UA's
   grey -- and on the create form the placeholders are `site-a`,
   `https://a.example` and a three-line query pool, which is a form that looks
   filled in when it is empty. `--dim` is the secondary ink and measures 7.3:1 in
   a sunken box, so it is a step below the value it stands in for and still a long
   way above the floor. The face is inherited and stays mono: an example of what
   goes in the box, drawn in the box, in the face the value will be drawn in.

   **A refused field says so where it is.** This is the client half of `B4`'s
   "refusals beside the field they refuse" -- `required`, `min` and `max` are
   enforced by the browser, and until now the only trace of a refusal was a bubble
   that dismisses itself. `:user-invalid` and **not** `:invalid`, which is the
   whole reason this is possible at all: `:invalid` matches from first paint, so
   it would open the create form with three boxes already marked wrong, where
   `:user-invalid` waits for the field to have been interacted with or the form
   submitted. Colour is not the only carrier -- the ring is a second pixel of
   border weight, so a reader who does not see the red still sees a heavier box.

   **A disabled control is readable, and obviously inert.** `opacity: .45` did
   both jobs badly: it measured **3.63:1** for the value inside, and it dimmed the
   border by the same amount, so a read-only box looked like a box that had failed
   to load. The ground goes instead -- there is nothing to type into -- the border
   drops to the softer rule, and the value is `--dim` at 6.1:1 on a panel. The
   word beside the label (`ui.field`'s `mark`) is the other half; a control that
   is grey and silent is a control somebody files a bug about. */
.field ::placeholder { color: var(--dim); }
.field input:user-invalid, .field textarea:user-invalid, .knob input:user-invalid {
  border-color: var(--bad);
  box-shadow: 0 0 0 1px var(--bad);
}
.field input:disabled, .field select:disabled, .field textarea:disabled,
.knob input:disabled, .knob select:disabled {
  color: var(--dim);
  background: none;
  border-color: var(--rule-soft);
  cursor: not-allowed;
}

/* Both campaign forms reuse `.launch`, so a campaign's fields lay out like the
   one-shot form's rather than acquiring a second idiom. What is added is the
   textarea a query *pool* needs -- a vocabulary is twenty lines, not one -- and
   the fact that both forms grow a notice and a group of settings.

   `.fieldgroup` is on the full-width list because the groups are *rows* of the
   form: three of them side by side would be the flat flex row `B4` broke up,
   with a legend over each third of it. */
.new-campaign, .edit-campaign { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: flex-end; }
.launch .notice, .launch .actions, .launch .knobs, .launch .warn,
.launch .fieldgroup { flex: 1 1 100%; }
/* Air *between* groups that is more than the air inside one, or the legends
   read as four more labels in one long list. `.launch`'s own row gap is
   `--sp-4`, which is also the gap between a legend and the fields under it, so
   without this the boundary between two groups measures exactly the same as the
   join inside one. */
.launch .fieldgroup + .fieldgroup { margin-top: var(--sp-4); }

/* -- the sign-in column ----------------------------------------------------

   `/login` is the one page in this console with no rail, so it is the one page
   whose layout is not the shell at the top of this file: a centred column, the
   mark and the environment above it, and one card in it. `_layout.html`'s
   `signed_in` branch draws that shape and `plans/console-design.md` §2.6 is why
   restyling it is `D7`'s rather than Track 8's -- `A1` shipped the page working,
   on the macros that already existed, and this is the half that was left.

   **The mock's `44px 24px` is `body`'s own padding plus one step of the scale**,
   which is why nothing below names a length the token layer has not: `body`
   already gives `--sp-5` at the top and `--gutter` either side, so the column
   adds `--sp-7` and comes out at 48 over 24. Vertical *centring* was the
   alternative and it is refused for the reason the prod banner is first in the
   reading column rather than above the shell: a refusal grows this card by a
   line, and a centred card answers a failed sign-in by moving the two boxes
   somebody is about to retype into.

   **Every control fills the column, and that is the defect this stage was for.**
   `login.html` writes its two boxes as `.field.medium`, which is
   `flex: 0 1 var(--field-col)` -- a *row* modifier, sized so that four fields fit
   across `/audit`'s filter, and whose `flex-grow` is **0**. Measured in Chromium
   at all four widths: a **224px** box every time, in a group 382px wide at 1440,
   1100 and 900 and 330px at 380 -- a control that stopped 40% short of the box
   around it and did not widen when the box did -- beside a **78px** submit. A
   sign-in form is one control per line by nature rather than a row that happens
   to wrap, so the fields and the submit take the width they are given instead:
   366 and 332 at 1440, 330 and 274 at 380.

   **It is a rule here rather than a `wide` at the two call sites**, and that is
   the whole point of the arrangement `.claude/handoff/console-auth-track9-interface.md`
   set up: `login.html`, `audit.html` and `users.html` declare no class of their
   own, so restyling them costs Track 8 nothing and costs this file no markup
   change on somebody else's page.

   The ⓘ keeps its place at the end of the submit's row. The mock draws that
   prose as a visible footnote card under a divider; `A1` put it behind the
   affordance every other standing explanation on this console is behind, and
   which of the two it should be is a decision about **what the page says**
   rather than about how it looks -- so it is reported to Track 8 rather than
   reversed here. What is fixed is the shape it was in: a 78px submit with a
   glyph floating beside it, in a card five times its width. */
/* The padding is this rule's own now that `<body>` has none: the shell stopped
   being a centred strip, so the one page that *is* a centred column has to say
   so itself. `--sp-7` over `--sp-5` down the sides is the mock's `44px 24px` to
   within a pixel of the scale. */
.auth {
  max-width: calc(var(--auth-col) + 2 * var(--gutter));
  margin: 0 auto;
  padding: var(--sp-7) var(--gutter) calc(var(--sp-7) * 2);
}
/* The mock's 24px between the mark and what the page is. On the rail these two
   are separated by a rule and a band of padding; here they are two blocks in one
   column, and without this the build line sits on top of the heading. */
.auth .brand { margin-bottom: var(--sp-6); }
/* `--sp-6` is the mock's card padding to the pixel (24px), and it is a step up
   from the `--sp-5` every other `.launch` on this console takes: those are wide
   forms whose air is horizontal, and this one is a column of two. The phone step
   at the bottom of this file tightens it with the rest of them. */
.auth .launch { padding: var(--sp-6); }
/* Written at 0-3-0 rather than 0-2-0 on purpose: `.field.medium` is 0-2-0 and
   sits earlier in this file, so an equally specific rule here would be a
   declaration that works because of where it happens to be written. */
.auth .launch .field { flex: 1 1 100%; }
/* `:not(.info)` because the ⓘ is a `<button>` too, and a submit that grew to
   fill the row would otherwise take the affordance beside it with it. */
.auth .actions button:not(.info) { flex: 1 1 auto; }
/* Three gaps, and stacking them is what makes the card a form rather than four
   things in a box. `.field`'s own `--sp-2` holds a label to its control;
   `--sp-5` here holds one pair off the next, where `.fieldgroup`'s `--sp-4` is
   the gap between fields *across* a row and reads as the same distance when they
   are stacked; and the submit takes another step away again, because at the row
   gap it was the third box in a column of three and this is the one thing on the
   page that is not a box to type in. A rule was the alternative -- the mock
   draws one here, under its SSO divider -- and 22px of air says the same thing
   without putting a second horizontal line inside a 400px card. */
.auth .fieldgroup { gap: var(--sp-5); }
.auth .actions { margin-top: var(--sp-3); }

/* -- the pane ------------------------------------------------------------- */

#pane { margin-top: var(--sp-6); }

.idle { color: var(--dim); }

/* -- what a region says when it has nothing to show ------------------------
   `ui.empty`, and it is two things: the absence, and what to do about it. The
   class is on the paragraph beside whichever of `.idle` / `.dim` / `.day dim`
   the surface asked for, so the modifier goes on deciding the colour of the
   block and this rule only splits it.

   The absence is `--ink` where the paragraph around it is `--dim`, which is the
   inversion this stage is for: "there is nothing here" is the region's *content*
   when there is nothing, and it was being drawn as the quietest thing on the
   page. The action under it is a step smaller and stays dim -- it is worth
   reading once, not every time.

   `display: block` rather than a `<p>` inside the `<p>`: the parser closes a
   paragraph at a nested block element, and both halves are phrasing content.
   **`deferred()`'s stub carries `.idle` and not this**, deliberately -- it says
   *wait*, and an instruction on a region that is already fetching would be an
   instruction to do nothing. */
.empty .what { color: var(--ink); }
.empty .next {
  display: block;
  margin-top: var(--sp-1);
  font-size: var(--fs-3);
  color: var(--dim);
}
.empty .next code { color: var(--ink); }

.batch {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  color: var(--dim);
}
.batch .query { color: var(--ink); }
.batch .target { font-family: var(--mono); font-size: var(--fs-4); }

.who { font-weight: 600; }
.took, .rid { color: var(--dim); font-family: var(--mono); font-size: var(--fs-2); line-height: var(--lh-2); }
/* The id's end of the header, linked or not: the auto margin pushes whichever
   one the bot has -- the link to its session page, or its id as text before
   there is a page -- to the right end, where the id has always been read.
   A flex row of its own so the gap between the label and the id survives the
   touch floor, which makes every `.tolog` an inline-flex box and would
   otherwise collapse the space between them; the id takes the link's colour so
   the two read as one target. */
.run header .session {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.session .rid { color: inherit; }

.arrival, .visit, .progress { margin: var(--sp-3) 0 0; font-size: var(--fs-4); color: var(--dim); }
/* Brighter than the finished lines: this one is still moving. */
.progress { color: var(--ink); }
/* ...unless it is standing still on purpose, waiting for a person. */
.progress.waiting { color: var(--warn-ink); }
/* What went wrong, as a line of prose. **`p.failed` rather than `.failed`**, and
   the element is load-bearing: `failed` is also a `CampaignStatus` and a
   `BatchStatus`, so a bare rule here matched `<article class="campaign failed">`
   and painted the whole card red at prose size -- and, depending only on which
   rule came later in this file, took the card's bottom margin with it. Every
   `failed` in the templates that means *a sentence about a failure* is a `<p>`;
   every one that means *a state* is on a card or a row. */
p.failed { margin: var(--sp-3) 0 0; font-size: var(--fs-4); color: var(--state-ink); }

/* -- a callout, and a reply to a press ------------------------------------
   `:where()` so the default tone loses to any state class on the same element:
   `.notice.done` is a create that worked, `.notice.warn` is one that worked with
   something to say, and a bare `.notice` is a refusal. */
:where(.notice) { --state-rgb: var(--rgb-bad); --state-ink-rgb: var(--rgb-bad-ink); }
.notice {
  margin: 0 0 var(--sp-5);
  padding: var(--sp-4) var(--sp-5) var(--sp-4) var(--sp-7);
  background: var(--state-wash);
  border: 1px solid var(--state-ink);
  border-radius: var(--radius-3);
  box-shadow: var(--elev-1);
  color: var(--state-ink);
}

/* Green-edged when something was written, red when it was refused -- the same
   left-border vocabulary the cards use, because the question a reader has is the
   same one: did this happen? */
:where(.acted) { --state-rgb: var(--rgb-idle); --state-ink-rgb: var(--rgb-idle); }
.acted {
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-5);
  border-left: var(--edge) solid var(--state-ink);
  background: var(--panel);
  border-radius: var(--radius-2);
  box-shadow: var(--elev-1);
}
.acted .note { margin: var(--sp-2) 0 0; font-size: var(--fs-3); }

/* -- logs ------------------------------------------------------------------
   The event name is accent by default and takes the line's level when it has
   one, which is why the reset lives on the container: an `li` carrying
   `.warning` or `.error` is matched by the state table directly, and a matched
   rule beats an inherited value. */
:where(.log) { --state-rgb: var(--rgb-accent); --state-ink-rgb: var(--rgb-accent-ink); }
.log {
  list-style: none;
  margin: var(--sp-3) 0 0;
  padding: var(--sp-3);
  max-height: 16rem;
  overflow: auto;
  background: var(--surface-sunken);
  border-radius: var(--radius-2);
  font: var(--fs-2)/var(--lh-2) var(--mono);
}
.log:empty { display: none; }
/* **The three columns before the detail are sized in `ch`, and that is `D3`'s
   one change to how a log reads.** Every one of them was `flex: 0 0 auto`, so
   each row's detail started wherever *that row's* event name happened to end --
   a log of forty lines with forty left edges, in the one region on this console
   whose whole value is that it is scanned down rather than read across. A `ch`
   is the advance of `0` in the element's own face and the log is mono, so three
   floors in `ch` are three floors in characters: `HH:MM:SS` is 8, the longest
   level this console writes is `warning` at 7, and 18 is the event names the
   harness actually emits (`day.start`, `run.finish`, `orchestrator.admitted`)
   with the longest of them still able to push its own column wider.

   **Floors rather than widths, and the difference is the whole reason this is
   not a grid.** A grid on the `<ol>` would align every row exactly -- and would
   also replace `flex-direction: column-reverse` on `.logtail .log`, which is the
   sticky bottom and is load-bearing (`plans/console-ui.md` §2.4: a log that
   scrolls itself does not get to ask for script, and `D6`'s second tag does not
   reopen that -- `console.js` opens a palette and touches nothing else). So
   the columns line up until a line has something longer than the floor in one of
   them, and then that line alone steps out. That is the cheap 95% of the fix and
   it costs no mechanism.

   A line that was not JSON -- the traceback, which is usually why the page is
   open -- still gets the whole width: its other three cells are `:empty` and the
   rule at the end of this block removes them, floors included. */
.log li { display: flex; gap: var(--sp-3); white-space: pre-wrap; overflow-wrap: anywhere; }
.log time { color: var(--dim); flex: 0 0 auto; min-width: 8ch; }
/* The level as a word as well as a tone. The state table gives `debug` and
   `info` no rule, so colour alone distinguishes two of the five levels and only
   for a reader who sees colour; `--state-ink` is on the event beside it. */
.log .level { flex: 0 0 auto; color: var(--dim); min-width: 7ch; }
.log b { flex: 0 0 auto; font-weight: 600; color: var(--state-ink); min-width: 18ch; }
/* `min-width: 0` because a flex item's automatic minimum is its content, so
   without it a single long value -- a URL, a serialised error -- pushes the row
   wider than the well and the page scrolls sideways. */
.log .detail { color: var(--dim); min-width: 0; }
/* A line that was not JSON fills the detail column and leaves the other three
   empty (`runlog.LogRow.parsed`). Collapsed rather than rendered blank, so a
   traceback does not read as a row with three missing values -- and so it does
   not carry three gaps of indentation the parsed lines around it do not have. */
.log li > :empty { display: none; }

.logtail { margin-bottom: var(--sp-6); }
.logstate {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-3);
}
.logstate .path {
  font-family: var(--mono);
  font-size: var(--fs-2);
  line-height: var(--lh-2);
  color: var(--dim);
  margin-left: auto;
  /* An absolute artifact path has no spaces in it and is longer than a phone. */
  overflow-wrap: anywhere;
}
/* Taller than the smoke pane's: this is the whole of what a child said today,
   and the two bounds on it are `webui.file_tail_max_bytes` / `_max_lines`.

   **This is the sticky bottom, and it is the whole of it** -- `plans/console-ui.md`
   §2.4: a log that scrolls itself does not get to ask for a script. `D6` added a
   second tag for the palette and this rule is untouched by it; what §2.4 refused
   was JavaScript *for this*, not JavaScript. `column-reverse` puts the first
   child at the *bottom* and anchors the scroll there, so a fragment that swaps its
   own outerHTML every few seconds comes back showing the newest line without
   anybody asking the browser to move. Scrolling back up through the day still
   works, and stays put while new lines land underneath.

   The markup is therefore newest-first, which is the opposite of what it reads as
   -- said in `_log.html` at the loop, where somebody changing the order will be.

   No `height`, only `max-height`: with the box sized to its content there is no
   free space for `column-reverse` to pack against, so a three-line log sits at the
   top of a short well rather than at the bottom of a tall one. */
.logtail .log {
  max-height: 28rem;
  display: flex;
  flex-direction: column-reverse;
}

/* -- the knobs ------------------------------------------------------------ */

/* A group is a disclosure, and `<details>` rather than a `.why`'s `:target` --
   `_ui.html`'s `knob_groups` gives the reasons, of which the load-bearing one
   is that neither surface drawing this polls. The panel is what the
   `<fieldset>` was; the summary is what the `<legend>` was, plus the two things
   a closed group has to be able to say. */
.knobgroup {
  margin: 0 0 var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-4);
  box-shadow: var(--elev-2);
}

/* The same disclosure with no panel around it, for a *form* the page opens
   with rather than a group of settings inside one. The create form is
   `.launch`, which already draws its own panel, so a second one around it
   would be a box in a box. `<details>` and not `:target` because nothing here
   polls: `_ui.html` states that rule at both macros, and the create form is
   outside the fleet fragment for the older reason that a swap wipes what
   somebody is typing.

   **It is a control now, and it was a heading.** U6 folded the create form
   behind this and styled the summary as the `<h2>` it replaced, so that the
   page's rhythm would not depend on whether the form was open. What that
   produced on the fleet is what a reader complained about: `NEW CAMPAIGN` in
   the same uppercase micro-label as `FLEET` under it, one line below the
   tagline, reading as a section heading with nothing beneath it. It opens a
   form, so it is drawn as the thing you press: sentence case, sunk into the
   well, outlined, and carrying a disclosure marker that says which way it goes.

   That marker is a `::before`, and `B4` moved it down two rules to be shared
   with the knob groups -- which had none at all for the same reason this one
   needs its own. See it there. */
.disclose { margin: var(--sp-6) 0 var(--sp-5); }
.disclose > summary {
  display: inline-flex;
  align-items: baseline;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  font: 600 var(--fs-3)/var(--lh-1) var(--font-sans);
  color: var(--dim);
  background: var(--surface-sunken);
  border: 1px solid var(--rule-line);
  border-radius: var(--radius-2);
  cursor: pointer;
}
/* The marker, and it is written once for both disclosures on purpose.

   **The knob groups had none at all**, which is a user-agent default that was
   *removed* rather than one that was never styled -- and it is the kind `B3`
   said a contrast model cannot see. Any `display` other than `list-item` drops
   the UA's own triangle, and `.knobgroup > summary` is `display: flex` because
   its legend, its counts and its ⓘ have to sit on one baseline. So the four
   groups on `/config` and on a campaign's Settings page were four bars with no
   affordance saying they open, on the two pages where sixty-three of the
   console's controls live. `.disclose` replaced its own marker when it took the
   same `display`; this is that fix, one rule up, for the surface that needed it
   more.

   Generated content for the reason the breadcrumb separator is: a glyph written
   into the markup is a glyph a screen reader reads out as part of the name. */
.disclose > summary::before,
.knobgroup > summary::before { content: "\25B8"; color: var(--dim); }
.disclose[open] > summary::before,
.knobgroup[open] > summary::before { content: "\25BE"; }
.disclose > summary:hover { color: var(--ink); border-color: var(--dim); }
/* **The fleet's `New campaign` summary is deliberately quiet, and it was accent
   for one commit.** The mock draws that action once, as a button at the top right
   of the page header, and `campaigns.html` puts it there — as an `<a>` to
   `#new-campaign`, because the form posts into `hx-target="this"` and the
   `<details>` has to wrap the include from outside or a create would collapse it
   and take its own answer out of sight. Which leaves this `<summary>` as the
   *same action drawn a second time*, twelve rows lower. Two accent buttons
   saying `New campaign` on one page is worse than one accent button and one
   toggle, so the toggle stays the shape every other disclosure on this console
   has. */
.knobgroup[open] { padding-bottom: var(--sp-5); }
.knobgroup > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-2) var(--sp-4);
  cursor: pointer;
}
.knobgroup > summary .legend {
  font: 600 var(--fs-2)/var(--lh-1) var(--font-sans);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--accent-ink);
}
.knobgroup > summary .count { font-size: var(--fs-2); line-height: var(--lh-2); color: var(--dim); }
/* The one thing worth seeing without opening the group: something in here is
   not what the files say. Not a chip -- `.chip`'s kinds are enum members, and
   inventing one would fall through the state table to whatever it inherited.

   **And it fell through anyway, which is what `D3` found.** `--state-ink` with
   nothing declaring a state resolves to `:root`'s floor, and that floor is
   `idle` -- so the two marks on these two pages that mean "somebody has
   overridden this" (this count, and the left rule on `.knob.edited` below) were
   both drawn in the one tone on the console that means *nothing is happening*.
   The comment above was right that inventing a chip kind was the wrong fix and
   stopped one step short of the right one: a region declares its own tone, which
   is the idiom `:where(.log)` and `:where(.budget)` already use two blocks up.

   **Accent, and it is the meaning rather than a preference.** A held value is
   not a warning and not a failure -- `/config` holds one on purpose, and a
   campaign's spec holds one for its whole life -- so amber would be the console
   telling an operator off for using the feature. Accent is what this console
   paints the thing a page is *about*, and on these two pages the overridden
   settings are what somebody came for; `group.edited` opens their disclosure for
   the same reason. It is `--accent-ink` on the summary's sunken ground, which is
   the pair `.legend` beside it already measures. */
:where(.knobgroup) { --state-rgb: var(--rgb-accent); --state-ink-rgb: var(--rgb-accent-ink); }
.knobgroup > summary .count.changed { color: var(--state-ink); }
/* The group's note, as the ⓘ that opens it. Amber where the paragraph it
   replaces was amber, and by position rather than by a class the macro would
   have to be told to write: the one in a summary is a group's note, the one in a
   `.knob` is a setting's hint, and neither has to say so. */
.knobgroup > summary .info { color: var(--warn-ink); }
.knobgroup[open] > summary { margin-bottom: var(--sp-4); }

/* -- the knob grid --------------------------------------------------------

   **Sixty-three settings were sixty-three full-width rows**, which left most of
   the page empty and made a group of twenty a scroll. They are a grid of cells
   now, as many across as the width allows: `auto-fill` counts the columns, so
   there is no column count written down anywhere and no breakpoint of this
   grid's own. `--knob-col` is the only number that decides how many there are,
   and it is a layout value in the sense `--page-width` is.

   `min(var(--knob-col), 100%)` rather than the token alone, and it is the whole
   of the narrow-viewport story: a bare `minmax(17rem, 1fr)` keeps a 17rem floor
   under the track even when the container is 20rem of phone with padding taken
   out of it, and the grid -- not the page -- is then wider than its box. Capping
   the floor at the container's own width is what makes one column the answer
   instead of a sideways scroll. */
.knobrows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(var(--knob-col), 100%), 1fr));
  gap: var(--sp-2) var(--sp-4);
}

/* One cell: the path and its ⓘ on the first line, the control under it.

   `align-content: space-between` over a stretched cell is what keeps the
   controls in a row lined up with each other: a two-line path would otherwise
   push its own box's control a line lower than its neighbours', and a column of
   values that does not line up is the one thing this console's monospace exists
   to avoid. */
.knob {
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: space-between;
  align-items: start;
  gap: var(--sp-1) var(--sp-2);
  padding: var(--sp-2);
  border-left: 2px solid transparent;
}
.knob:hover { background: var(--surface-sunken); }
.knob.edited { border-left-color: var(--state-ink); }
/* `anywhere` rather than `break-word`, and it is still load-bearing after the
   regrid -- re-measured at 380px with every group forced open, because the
   measurement that put it here was taken against the collapsed layout the
   `.launch label` collision produced and proved nothing about this one. Only
   `anywhere` counts toward the min-content size a grid track is sized from, so
   `break-word` would wrap the text and leave the column as wide as
   `entry.serp.behavior.pogo_back_prob`. A dotted path has no spaces in it, which
   is why it is the one string on the console with no break opportunity at all. */
.knob .path { font: var(--fs-3) var(--mono); overflow-wrap: anywhere; }
/* `min-width: 0` and a full-width control: a form control's *intrinsic* width is
   about twenty characters, which is wider than a cell at three columns, and a
   grid item's automatic minimum is its content -- so without both of these the
   track is sized by the box rather than the box by the track. */
.knob input, .knob select {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  padding: var(--sp-2) var(--sp-3);
  font: var(--fs-3) var(--mono);
  color: var(--ink);
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
}
.knob input[type="checkbox"] { justify-self: start; width: 1.1rem; height: 1.1rem; }
/* A frozen knob is disabled and reads like every other disabled control on the
   console -- the rule is in the form block above, with the measurement that
   retired the `opacity: .45` this line used to carry. */

/* -- the ⓘ, and the prose it opens ---------------------------------------

   `_ui.html`'s `info()`: a `<button popovertarget>` and a `<span popover>`, and
   **no JavaScript anywhere near either** -- which is still true after `D6` put a
   second script tag on the page, because the palette is built out of this exact
   pair of attributes and adds script only for the keystroke that opens it. The ⓘ
   needs no keystroke, so it takes none of it.

   **Nothing here sets `display: none` on the box, deliberately.** The user
   agent's `[popover]:not(:popover-open)` rule is what hides it, so a browser
   that does not implement the attribute renders the prose inline -- which is
   what these two surfaces did before, so the unsupported case degrades to the
   behaviour it is replacing rather than to a sentence nobody can reach.

   **`:where(button)`, because `info` is also a log level.** `ui.log_line` writes
   `<li class="{{ line.level }}">` so the state table can colour a `warning` or
   an `error`, and a bare `.info` therefore matched every info line of every
   log: IBM Plex Sans at `--fs-4` on a 13.6px line in a mono 12/19.2 well, a
   pointer cursor, 4px of side padding -- and, under 56.25rem, the ⓘ's 44px
   floor, so each info line was a 44px row. `:where()` scopes it to the element
   `ui.info` draws and keeps the specificity at 0-1-0, so nothing that already
   out-specifies it changes. */
.info:where(button) {
  padding: 0 var(--sp-1);
  font: var(--fs-4)/var(--lh-1) var(--font-sans);
  color: var(--dim);
  background: none;
  border: 0;
  border-radius: var(--radius-2);
  cursor: pointer;
}
.info:where(button):hover { color: var(--ink); background: none; }

.infobox {
  max-width: 22rem;
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-panel);
  color: var(--ink);
  border: 1px solid var(--rule-line);
  border-radius: var(--radius-3);
  box-shadow: var(--elev-3);
  font: var(--fs-3)/var(--lh-3) var(--font-sans);
  overflow-wrap: anywhere;
}
/* A box with two paragraphs in it. `<span>` and not `<p>`, because the box is a
   span -- `info()` says why, and a `<div>` inside the `<p>` two call sites sit in
   would make the parser close that paragraph. */
.infobox .line { display: block; }
.infobox .line + .line { margin-top: var(--sp-3); }

/* The ⓘ as an item of a strip rather than as a paragraph under one: without
   this it stretches to the height of the tallest stat, because `.statstrip` is a
   flex row and a button's default `align-self` is `stretch`. */
.statstrip > .info { align-self: center; }

/* Beside the ⓘ that opened it rather than in the middle of the screen, where a
   popover with no anchor lands. `popovertarget` makes the button the box's
   *implicit* anchor, so nothing has to name one -- which matters here, because
   naming one would mean writing a generated `anchor-name` into the markup for
   each of sixty-four boxes.

   Behind `@supports` because the fallback has to stay the UA's own: the
   centring comes from `margin: auto`, so setting a margin unconditionally would
   pin the box to the top-left corner in a browser that has popovers and not
   anchor positioning. */
@supports (position-area: block-end) {
  .infobox {
    position-area: block-end span-inline-end;
    position-try-fallbacks: flip-inline, flip-block, flip-block flip-inline;
    /* `most-width`, because a fallback is only *tried* when the box overflows
       and this one never does: a hint in the right-hand column has 80px of room
       and the box shrinks into it rather than spilling, so the flipped position
       is never reached and the prose comes out one word wide. Ordering the
       options by the room each has picks the side with space instead. */
    position-try-order: most-width;
    margin: var(--sp-1);
  }
}

.skipped { margin: var(--sp-2) var(--sp-2); color: var(--dim); font-size: var(--fs-3); font-style: italic; }
.skipped .path { font-family: var(--mono); font-style: normal; overflow-wrap: anywhere; }

/* -- the campaign's own vocabulary ---------------------------------------- */

.target { font-family: var(--mono); font-size: var(--fs-3); color: var(--dim); overflow-wrap: anywhere; }
.rate, .pid { font-family: var(--mono); font-size: var(--fs-2); line-height: var(--lh-2); color: var(--dim); }
/* The pid takes the free space on a campaign's own head, where the identity is a
   full-width row and its tail belongs at the far end of it.

   **Not on a fleet card, where the identity is now a grid cell.** An auto margin
   inside a 1.35fr column pushed `pid 4242` to the far right of the cell and left
   a hand's width of nothing between it and the name it belongs to -- which is
   the defect the three-column grid was for, reproduced inside one of its cells.
   `.who` is the card's identity cell (`campaign_ui.card`); the pid sits after
   the rate, which is where the mock draws it. */
.pid { margin-left: auto; }
article.campaign > .who .pid { margin-left: 0; }
.dim { color: var(--dim); }

/* Want and is, when they differ. Amber rather than red: want=run over is=failed
   is a real state the console is meant to show, not a rendering error. */
.disagrees { margin: var(--sp-3) 0 0; font-size: var(--fs-3); color: var(--warn-ink); }
.disagrees b { color: var(--ink); }

.day, .counts, .pool { margin: var(--sp-3) 0 0; font-size: var(--fs-4); color: var(--dim); }
/* **The day is a block of three lines now** -- see `campaign_ui.day_progress`.
   The label and the figure are pushed to the ends of one line, the bar is full
   width under them, and the caller's sentence is under that. It was one
   paragraph with an inline 8rem meter *between* the two numbers a reader
   compares. */
.day { display: flex; flex-direction: column; gap: var(--sp-2); }
.day .figure { display: flex; align-items: baseline; gap: var(--sp-3); margin: 0; }
/* The figure is the answer and the date is the label, so the figure takes the
   ink and the right-hand end -- the same arrangement the rail's footer uses for
   the box's two numbers, and for the same reason: a value read against a name is
   read from the value. */
.day .figure .of { margin-left: auto; text-align: right; color: var(--ink); font-family: var(--mono); }
.day .figure .of .dim { font-family: var(--font-sans); }
.day .says { margin: 0; font-size: var(--fs-3); }
.day .when { font-family: var(--mono); color: var(--ink); }
.pool { font-family: var(--mono); font-size: var(--fs-2); line-height: var(--lh-2); }

/* The progress bar. Not `.progress` -- the smaller pane already owns that class
   for a line of text, and two meanings for one selector is how a stylesheet
   rots. The fill stays accent rather than taking `--state`: how far through the
   day a campaign is says nothing about whether the campaign is well. */
.meter {
  display: inline-block;
  width: 8rem;
  height: .5rem;
  vertical-align: middle;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-1);
  overflow: hidden;
}
.meter .bar { display: block; height: 100%; background: var(--accent); transition: width .3s ease-out; }
/* `meter`'s `size`, and it is one dimension rather than a second component. A
   campaign's own page draws exactly one of these, under a heading that says
   `Today`, with the whole content column to itself -- so the bar is the figure
   there and 8rem of it reads as a token of one. On a fleet card it is one item
   in a row on one card of several, where a wide bar would turn a list of
   campaigns into a page of progress bars. Two readings, one body.

   A percentage of the line rather than a second literal: it is inline in a
   sentence that ends with the day's status, so it takes what is left of the
   measure rather than a width somebody picked. The 30rem block below sets 6rem
   on the plain one and this overrides it there too, which is right -- on a phone
   the sentence wraps and the bar gets its own line either way. */
.meter.wide { width: 40%; min-width: 8rem; }
/* The third reading, and it is the rail footer's. Here the bar is not inline in
   a sentence at all -- it is a block under the figure it draws, the width of the
   column it is in -- so `min-width` would only ever be a way to overflow a
   238px rail. Thinner than the other two, because at this size it is a *gauge*
   beside a number rather than the number itself; the mock draws 4px. */
.meter.full { display: block; width: 100%; height: .25rem; }
/* The fourth reading, and it is the tally's: a bar at the end of a row of six,
   standing for that row's share of the largest. Fixed rather than fluid, because
   what it is compared against is *the bar on the line above it* — a proportional
   width would make every row's track a different length and the comparison
   meaningless. It takes the row's own tone rather than the accent, which is the
   one place a meter does: here the bar is the status, where everywhere else it is
   progress through something. */
.meter.mini { flex: none; width: 3.5rem; height: .25rem; }
.tally .meter.mini .bar { background: var(--state-ink); }

.counts .total { color: var(--ink); }
.counts .ok, .counts .bad, .counts .live { color: var(--state-ink); }

/* Amber for something the operator has to know, red for the box being broken.
   `warn` is a paragraph, `warn-chip` sits inline in a table cell. */
.warn { margin: var(--sp-3) 0 0; font-size: var(--fs-3); color: var(--state-ink); }
.note { margin: var(--sp-3) 0 0; font-size: var(--fs-3); color: var(--dim); font-style: italic; }
.note code { font-style: normal; }

/* **One status per row, and it was a wrapping row of pairs.** The mock draws a
   dot in the tone, the status's name, its count pushed to the right and a bar of
   its share — six outcomes a reader runs an eye *down*, where a wrapping row of
   `12 failed_blocked` pairs is six figures in six places. It is the same shape
   the rail's footer takes for the box's two numbers, and for the same reason: a
   value read against a name is read from the value's end. */
.tally { list-style: none; display: flex; flex-direction: column; margin: 0; padding: 0; }
.tally li {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  font-size: var(--fs-3);
  color: var(--dim);
}
.tally li + li { border-top: 1px solid var(--rule-soft); }
.tally .dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--state-ink);
}
/* The name takes the free space, so every count in the column lands on the same
   x — which is the whole of what makes six of them comparable. `.term` and not
   `.what`, which is `ui.empty`'s signature in the component guard. */
.tally .term { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.tally b { color: var(--state-ink); font-size: var(--fs-4); line-height: var(--lh-2); font-family: var(--mono); }

/* The fleet's header: what the box is committed to, and what the environment has
   spent today. Two sentences rather than a stat strip, because each carries a
   caveat and a number in a strip has nowhere to put one.

   **`.fleetbar` is gone and the box around them is `.banner` now**, which is
   `plans/console-design.md` §3's second call site for that block and `D4`'s.
   What it replaced was a `<header>` with a `--rule-soft` line under it, written
   to stop the two sentences reading as prose somebody left above the first card
   -- a hairline doing a container's job, and the strip's one *state* was still
   being carried by a single sentence turning amber inside it. The banner's left
   rule is what separates the region now, and the state colours the strip.

   The box's browser budget takes no state of its own: it inherits the strip's,
   which is `idle` until the fleet claims more than the box has. Not amber unless
   it is actually over -- an operator reads this line on every page load and a
   permanently amber number stops being read at all. */
.budget { margin: 0 0 var(--sp-2); font-size: var(--fs-3); color: var(--state-ink); }
.budget code { color: var(--ink); }

/* Today's billed spend for the whole environment, beside it. Never a state:
   money spent is not going well or badly on its own, and a cap is a campaign's
   rather than a fleet's -- so there is no headroom to colour here. The figure
   itself is mono, because every number on this console is. */
.spend { margin: 0; font-size: var(--fs-3); color: var(--dim); }
.spend b { font-family: var(--mono); font-size: var(--fs-4); color: var(--ink); }
.spend code { color: var(--ink); }

/* One click from a card to that campaign's live log -- the series' own exit
   criterion. Quieter than the name beside it, which is the link to the campaign
   itself, and louder than the target: it is the second thing on the card
   somebody presses. */
.tolog { font-size: var(--fs-3); color: var(--accent-ink); text-decoration: none; }
.tolog:hover { text-decoration: underline; }

/* -- the two charts -------------------------------------------------------
   `D5`, and `plans/console-design.md` §2.4. Two pictures, no script and no
   library: the bars are a CSS grid of `<div>`s and the curve is one inline
   `<svg>`. **Not one number below is computed here or in a template** -- every
   height, share, `points` string, `path` and gridline arrives as an attribute
   off `views.Hours` / `views.Curve`, which is `ui.meter`'s rule spent on a
   surface with two hundred numbers on it instead of one.

   Both wear `.pane` as well, so a chart is raised the way every other region on
   this console is and nothing here re-declares a background, a border or a
   shadow. What `.chart` adds is the `<figure>`'s own user-agent margin, which is
   `1em 40px` and is the only reason this selector exists at all.

   **The plot is sunken, and that is a contrast decision rather than a look.** A
   tone drawn on the panel measures 3.96:1 (`bad`) to 5.91:1 (`warn`); on
   `--surface-sunken` the same three are 4.77 to 7.12. 1.4.11 asks 3:1 of a
   graphical object, and the cheapest way to hold every tone well clear of it at
   both ends is to put them all on the darkest ground the ladder has.

   **The tones are told apart by the written ladder, never by hue alone.** Three
   status tones sit within a few greyscale points of each other by construction
   -- they are separated as far as a chip needs and two of the five are pinned
   (`plans/console-design.md` §2.1) -- so a reader who does not see hue cannot
   read a stack of them. What answers that is not more colour: it is the legend
   under every chart carrying the same figures as text, the whole plot named as
   one image, and each column's own bucket in a `title`. */

/* Its own tone floor, for the reason `:where(.banner)` declares one: a
   `--state` with nothing declaring it resolves to whatever the element
   inherited, and a chart dropped inside a `.campaign.running` card would draw
   its legend in that campaign's green. Every mark that *has* a tone names its
   own below. */
:where(.chart) { --state-rgb: var(--rgb-idle); --state-ink-rgb: var(--rgb-idle); }
.chart { margin: 0 0 var(--sp-6); }

/* The room a chart's region holds open before its fragment lands. `ui.deferred`
   mounts on `load`, so without this the heading under a chart -- and on the
   Overview everything below it, down to the log -- jumps down the page the
   moment the fetch returns.

   **Keyed off the stub's own `hx-get`, and it is the one attribute selector in
   this file.** The alternatives were a wrapper element at three call sites, or a
   modifier on a macro that five other regions call, for a rule that is *about*
   those three URLs -- and there is nothing here to keep in sync with them,
   because the selector is the URL. It matches only the stub: what replaces it
   carries no `hx-` attribute at all.

   The plot's height plus a step, rather than the box's: a caption wraps to two
   lines on one surface and three on another, so an exact figure would be exact
   for one of them. Reserving most of the jump is the whole of what this is
   for. */
[hx-get$="/hours"], [hx-get$="/curve"] {
  display: block;
  min-height: calc(var(--chart-h) + var(--sp-7));
}

/* The well both plots are drawn in. `overflow: hidden` is what keeps a bar's
   square corners inside the rounded box. */
.chart .plot {
  position: relative;
  height: var(--chart-h);
  background: var(--surface-sunken);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-2);
  overflow: hidden;
}

/* The x-axis: the window's two ends, and the zone said once rather than on
   every label. Drawn by both charts from the same element, so the two pictures
   on a campaign's Overview label their shared axis identically. */
.chart .axis {
  display: flex;
  justify-content: space-between;
  margin: var(--sp-2) 0 0;
  font-family: var(--mono);
  font-size: var(--fs-2);
  line-height: var(--lh-2);
  color: var(--dim);
}

/* **The panel's own title row: what this chart is, and what its colours mean.**
   The mock opens every chart panel with one, and the heading used to be a
   `ui.section` at the call site -- so a page drew a micro-label, a step of air,
   and then a box that arrived a moment later carrying its own legend somewhere
   else entirely. One object with a name.

   `baseline` and `space-between`: the name and the key are read as one line, and
   the key goes to the far end where it stops competing with the name for the
   reader's first fixation. It wraps, because the fleet's three-item legend and a
   long title do not both fit on a phone. */
.chart .charthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  margin-bottom: var(--sp-4);
}
/* The element rule gives an `<h2>` a top margin so it separates itself from
   whatever came before; at the top of its own panel there is nothing to separate
   from. */
.chart .charthead h2 { margin: 0; }

/* The written ladder. `.tally`'s shape and `.tally`'s reason -- a figure a
   reader compares across, set in the face this console compares figures in --
   and each item takes its own tone through the state table, so the swatch and
   the segment above it cannot disagree.

   **In the title row it is a *key* rather than a readout**, so the figures come
   down to the size of the words beside them: at `--fs-6` three counts in a
   header row were larger than the chart's own name, which made the legend the
   headline. The count stays -- it is the chart's text equivalent, and the
   argument for that is in `campaign_ui.hours` -- it is simply no longer shouting. */
.chart .legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-2) var(--sp-4);
  margin: 0;
  padding: 0;
}
.chart .legend li {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  font-size: var(--fs-2);
  color: var(--dim);
}
.chart .legend b {
  font-family: var(--mono);
  font-size: var(--fs-3);
  line-height: var(--lh-2);
  color: var(--state-ink);
}
/* The swatch, which is the one place a legend item names its own colour --
   `--state` rather than `--state-ink`, because it stands for a *fill* and the
   figure beside it is what stands for the text. */
.chart .legend li::before {
  content: "";
  align-self: center;
  width: var(--sp-3);
  height: var(--sp-3);
  background: var(--state);
  border-radius: var(--radius-1);
}
/* The curve's two series are not statuses, so they are named here rather than in
   the state table -- and each is named **once**, on a class the mark and its own
   legend swatch both wear. That is the state table's idiom applied one level
   down, and it is what stops the swatch and the line it stands for being two
   colours: they are the same `--state`, resolved from the same declaration.
   `.delivered` and `.plan` rather than `.done`, which is already a member of the
   state table's *good* row and would have meant winning on specificity to avoid
   drawing a green line.

   `behind` is a shortfall and deliberately takes no tone and no swatch: a
   campaign trailing its own curve at eleven in the morning is the ordinary state
   of a day that is still running, and an amber number nobody can act on is a
   number that stops being read. */
.curve .plan { --state-rgb: var(--rgb-idle); --state-ink-rgb: var(--rgb-idle); }
.curve .delivered { --state-rgb: var(--rgb-accent); --state-ink-rgb: var(--rgb-accent-ink); }
.curve .behind::before { background: none; }

.chart figcaption {
  margin: var(--sp-3) 0 0;
  font-size: var(--fs-3);
  color: var(--dim);
}
.chart figcaption code, .chart figcaption b { color: var(--ink); }

/* -- the bars ------------------------------------------------------------- */

/* One column per bucket, sharing the width equally, aligned to the floor.
   `grid-auto-columns: 1fr` rather than a `repeat()` with a count in it: the
   number of buckets is `webui.chart_buckets` and a stylesheet may not know it. */
.hours .plot {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: end;
  padding: var(--sp-2);
  gap: 0;
}

/* **No gap between the columns, and the separation is inside them.** A gap in
   the grid is a fixed number of pixels twenty-three times over, which at 380px
   eats more of the plot than the bars get; a bar narrower than its own column
   separates them by a proportion instead, and so holds at every width. */
.hours .col { display: flex; align-items: flex-end; justify-content: center; height: 100%; }
.hours .bar {
  display: flex;
  flex-direction: column-reverse;
  width: 68%;
  border-radius: var(--radius-1) var(--radius-1) 0 0;
  overflow: hidden;
}
/* `column-reverse`, so the first segment in the markup is the one on the floor
   -- the tones arrive worst-last from `views.Bar.segments`, and a stack read
   bottom-up puts what went well under what did not. */
.hours .seg { display: block; width: 100%; background: var(--state); }
/* The hairline between two segments is the plot's **own ground**, which is the
   whole of how a stack is legible: the three tones are 1.2--1.5:1 against each
   other, so two touching segments are one block, and each one bounded by the
   well is 4.77:1 or better against what it touches.

   What this does not fix, and it is arithmetic rather than an oversight: a
   segment is a whole percent of its own column, so one failure in a bucket of
   four hundred rounds to nothing and is drawn as nothing. It is still in the
   legend, in the column's `title` and in the tally beside the chart. At this
   repo's volumes -- a day is 500 sessions, so a bucket is tens -- a single run
   is a percent or more and is drawn. */
.hours .seg + .seg { border-bottom: 1px solid var(--surface-sunken); }

/* -- the curve ------------------------------------------------------------ */

/* Stretched to the well rather than fitted to it: there is no text inside this
   element (see `views.CURVE_BOX`), so nothing minds being scaled unevenly, and
   every stroke carries `vector-effect="non-scaling-stroke"` so a hairline stays
   a hairline at any scale. */
.curve .plot svg { display: block; width: 100%; height: 100%; }

/* Decoration rather than data: a gridline that met 1.4.11 would be a cage
   around the two lines it exists to help read. The floor and the peak carry
   labels; the midline is the one that does not, because half of an odd peak is
   not a session. */
.curve .grid { stroke: var(--rule-line); stroke-width: 1; }
.curve .area { fill: rgb(var(--rgb-accent) / 16%); stroke: none; }
.curve polyline { fill: none; stroke: var(--state); stroke-width: 1; }
/* Thicker, filled under, and solid: the delivery is the line somebody is
   reading and the plan is what it is read against. */
.curve .delivered { stroke-width: 2; }
/* Dashed, and that is the second of the three channels these two lines are told
   apart by -- the third is the fill under the delivered one. `accent` against
   `idle` is 1.07:1, so two hairlines at that separation are one line to a reader
   who does not see hue, and colour alone was never going to be enough. */
.curve .plan { stroke-dasharray: 4 3; }

/* The y-axis, in HTML at the box's own edges, so no rule has to place a number
   the chart computed. Absolute rather than a flex column because it sits *over*
   the plot: the alternative is a gutter, and a gutter at 380px is a tenth of
   the picture spent on two labels. */
.curve .tick {
  position: absolute;
  right: var(--sp-2);
  padding: 0 var(--sp-1);
  background: rgb(var(--rgb-sunken) / 80%);
  border-radius: var(--radius-1);
  font-family: var(--mono);
  font-size: var(--fs-2);
  line-height: var(--lh-2);
  color: var(--dim);
}
.curve .tick.high { top: var(--sp-1); }
.curve .tick.low { bottom: var(--sp-1); }

/* -- tables: a day history, a page of sessions ---------------------------- */

/* The box a table scrolls inside, and it is `ui.table`'s own element.

   **It replaces a rule that turned the table into a block at two widths**, and
   the swap is the ladder entry `D3` deleted. `U0` was forbidden from editing
   templates, so the only way it had to make seven columns scrollable was
   `table { display: block; overflow-x: auto }` inside a media query -- which
   works, and pays for it twice: a `display: block` table shrink-wraps its own
   columns instead of filling the region, and a *media query* answers the
   question "is the viewport narrow" when the question is "is this table wider
   than the column it is in". Those stopped being the same question the day the
   rail took 14rem out of the column, which is what the `56.26rem..69rem` range
   in this file's header was bounding.

   A wrapper answers the real question and answers it at every width: the table
   keeps `display: table`, so it still fills the column and its own column
   algorithm still runs, and it overflows this box only when it genuinely does
   not fit. `min-width: 0` for the reason the content column carries one -- this
   is a block in a flex column, and a scroll container whose floor is its
   content's min-content width is not a scroll container.

   **No `tabindex` on it, and that is a decision rather than an omission.** A
   scroll container has to be reachable from a keyboard; Chromium and Firefox
   both make one focusable *when it actually scrolls*, which is the whole of the
   condition. Writing `tabindex="0"` into the markup would put a tab stop on
   every table at every width, including the four that fit -- a stop that does
   nothing, on a console whose tab order is otherwise every control and nothing
   else. */
/* **A panel as well as a scroller, which is the mock's arrangement for every
   table it draws.** Four call sites get it at once because all four go through
   `ui.table`, which is the whole reason `B0` collapsed them into it. `overflow`
   and a radius together are what round the corners of the rows inside: without
   `overflow: hidden` a `<thead>` on its own ground squares off the top two.
   `overflow-x: auto` supplies the clipping and the scrolling in one. */
.tablewrap {
  min-width: 0;
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-3);
  box-shadow: var(--elev-1);
}

table { width: 100%; border-collapse: collapse; font-size: var(--fs-3); }
/* Sans, and it is the classification most worth saying out loud on a table:
   a column *header* is read once to find out what the column is, and it is the
   cells under it -- which are mono where they are values -- that have to line up
   with each other. A header lining up with the header beside it buys nothing. */
table th {
  text-align: left;
  padding: var(--sp-2) var(--sp-3);
  font: 600 var(--fs-1)/var(--lh-1) var(--font-sans);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: var(--dim);
  border-bottom: 1px solid var(--line);
}
table td { padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--rule-soft); color: var(--dim); }
table td a { color: var(--accent-ink); }

/* -- secondary inside a cell, and why it cannot be a colour -----------------

   **The rule: inside a uniformly dim context, secondary-ness cannot be expressed
   on the colour axis at all, so it goes on weight, or on nothing.**

   The line above is the reason. `table td` is `--dim`, so `.dim` on a span inside
   one sets the colour that span already had -- and eleven such spans exist across
   five templates, each of them an author saying *this part is secondary* and each
   of them drawing identically to the text beside it. Measured in Chromium at
   1440px on `/users`: a name and the `you` mark beside it came back
   `rgb(147, 155, 173)`, weight 400, 12.8px, alike in everything but the face.

   **There is no darker ink to reach for.** `--dim` is the secondary ink and it is
   already spent -- the token block records it at the bottom of what clears 4.5:1
   on the three surfaces, so a third ink below it is a pair that fails AA on the
   page it would be drawn on. The colour axis in a cell has exactly one value and
   it is taken.

   So the *primary* rises instead. Both selectors below are the same statement
   from the two sides a template can write it: an element immediately followed by
   a `.dim` (a name, then the mark that annotates it) and an element immediately
   after one (a kind, then the id it qualifies). 600 is this console's one
   emphasis weight -- the same one every heading, `th`, chip, button and legend
   takes -- so nothing new is introduced to say an old thing.

   **`:has()` rather than a class on the primary, and that is what makes this a
   rule rather than eleven patches.** A class would have to be remembered at the
   twelfth call site by somebody who has not read this block; a relational
   selector reads the pair that is already in the markup. It is scoped to a cell,
   and it was the file's only `:has()` until `D7` wrote a second one for the same
   shape of reason -- a field group asking whether anything in it is taller than a
   line, in the touch layer at the bottom of this file.

   **What this deliberately does not do is give a lone `.dim` in a cell a look**,
   and the audit is the reason rather than an omission. Ten of the eleven were
   audited one at a time before this rule was written, and the five that are an
   em-dash, plus the one that is `not recorded`, have **nothing beside them to be
   secondary to**: they are the whole content of their cell. An em-dash is already
   the minimal mark for an absence and there is no quieter way to draw nothing --
   so those keep the class for the second, unrelated job it does two rules below
   (keeping prose out of a figure column's mono face) and take no ink from here.
   The one whose author was wrong -- `searched N page(s)`, which is a session's
   *answer* in the column that asks where it arrived -- lost its span in this
   commit, which is `/users`' `never` a milestone later and the same argument. */
table td :has(+ .dim), table td .dim + * { font-weight: 600; }
/* A cell that is a **timestamp or a date**: mono, and the ink rather than the
   secondary ink, because it is the thing that identifies the row. It was
   `.history td:first-child` -- a positional selector for one of the two tables,
   under which the sessions table's ISO timestamp came out proportional beside a
   mono cost. `td.when` is written at the call site instead, so the two tables
   answer "which cell is a date" the same way and neither answers it by counting.
   (`.day .when` above is the same word inside a card's day line and is scoped to
   it; nothing here reaches into that one.)

   **`nowrap` is `D3`'s, it is the same declaration `td.num` below already
   carries, and the argument for it is the one both tracks working on this table
   got wrong first.** A timestamp is a single value read down a column, so a
   timestamp on two lines is the same defect as `$0.0039` on two lines -- and
   `/audit` spent two lines on every row of a forensic record for it. What made
   it hard to see is that *both* tracks tried to fix it by changing the string:
   Track 8 shipped a shorter form (25 characters to 19) and measured it still
   wrapping, and this stage was about to decline the rule on the grounds that
   the column was "only" 180.7px wide.

   **A column's rendered width in an over-constrained table is an output of the
   layout, not an input.** The table is wider than its column at both widths that
   matter, so every column is already at its own floor and the free width is
   shared out; shortening the *content* of one column hands the saving straight
   to the four beside it and leaves that column no wider. 180.7px allotted at
   816px and 165.8px at 629px, against 211.8px needed -- and 128.9px / 109.1px
   allotted against 165.6px needed once the string is shortened. Measured in
   Chromium by counting line boxes with `Range.getClientRects()` rather than by
   reading cell heights, which is what a wrapped cell in a row with a taller
   neighbour hides. The only thing that raises the allotment is telling the
   layout the column has a floor, which is what this declaration is.

   **It interacts with the `code` rule at the top of this file and the order
   matters to whoever reads a bisect.** `overflow-wrap: anywhere` was letting the
   `target` and `detail` cells squeeze to almost any width, so taking it away
   raises the uuid column's floor by ~216px and takes that width from the columns
   beside it -- `when` included. Landed alone, the identifier fix presents as a
   timestamp regression. Both land here, and the table scrolls inside
   `.tablewrap` where the two floors together no longer fit. */
td.when { color: var(--ink); font-family: var(--mono); white-space: nowrap; }
/* **A floor, and it is the one column `D3` gave one.** The sessions table is the
   widest thing the console draws -- eight columns -- and where the column is
   629px the auto layout gave `query` **75px**: seven characters, at which
   `hand made ceramic mug` breaks into four lines and takes the row with it.
   Twelve lifts that to 96px and three, which is the difference between a cell
   and a paragraph. `ch` because the cell is mono, so twelve of them is twelve
   characters and not an estimate of twelve.

   **Twelve rather than fourteen, and the two-line version was measured and
   declined.** Fourteen is the real answer to the reading -- 112px, at which
   `ceramic mug` fits on one line and the cell is two -- and it costs the desktop
   table its fit: with `td.when` above no longer wrapping, this table's
   min-content is **805px against an 816px column**, eleven pixels of slack, so a
   floor of fourteen takes it to 821 and the wrapper puts a scrollbar under the
   widest page on the console to buy one line of one cell. Five pixels of
   horizontal scroll is a scrollbar for nothing.

   **The fix that would actually pay is not in this file, and it is worth writing
   down where somebody will find it.** Fifty-three of those pixels are in
   `when`, which renders a 25-character ISO string with a `+00:00` on it; the
   sessions table is the one table here that is *not* over-constrained at the
   desktop width, so unlike `/audit` it is a table where shortening the content
   really would hand the width to its neighbours. That is `views.py`'s format and
   nobody has scoped it. */
.sessions td.query { color: var(--ink); font-family: var(--mono); min-width: 12ch; }
/* A session's Pages card (Track 18): the title is read, so it keeps the body's
   face, and the path under it is a `code` -- already on the mono list. It takes a
   line of its own, and may break anywhere, because a path is one long word and
   the wrapper should scroll the table rather than the cell push it wide. */
.pages td.page { min-width: 16ch; }
.pages td.page code { display: block; overflow-wrap: anywhere; }
/* A session's Files card (Track 18, D7): a file name is one long word, so it may
   break anywhere rather than push the table wide at a phone width. */
.files td.page code { overflow-wrap: anywhere; }
/* The results page a search ended on, drawn under the Files card. A full-page
   capture is thousands of pixels tall, so the figure shows its **top** -- capped
   in height and clipped, never a scroll box inside the page -- and the picture is
   a link to the whole of it. `max-width: 100%` is what keeps a 1280px capture
   from being the widest thing on a 380px screen. */
.lastpage { margin: var(--sp-3) 0 0; }
.lastpage a { display: block; max-height: 32rem; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-2); }
.lastpage img { display: block; max-width: 100%; height: auto; }
.lastpage figcaption { margin-top: var(--sp-2); font-size: var(--fs-3); }
.film { margin: var(--sp-3) 0 0; }
.film video { display: block; max-width: 100%; height: auto; max-height: 32rem; border: 1px solid var(--line); border-radius: var(--radius-2); background: var(--surface-sunken); }
.film figcaption { margin-top: var(--sp-2); font-size: var(--fs-3); }
/* A cell that is a **figure**: a duration, a session count, a cost. Mono and
   right-aligned, because the column exists to be compared down rather than read
   across, and `white-space: nowrap` so `$0.0039` never wraps into two lines in a
   table that already scrolls inside itself on a narrow viewport. The cost keeps
   a rule of its own only for what is special about it -- four decimals, which
   `_runs.html` says why two would report every session in the day as free.

   **The header takes the alignment and not the face**, which is the whole of why
   `th.num` is separate: a column header is read once to find out what the column
   is (the classification table argues it at `table th`), but a left-aligned
   `COST` over a right-aligned column of costs was a header pointing at the wrong
   end of its own cells. `ui.table`'s `numeric` is what writes it. */
th.num, td.num { text-align: right; }
td.num, .sessions td.cost { font-family: var(--mono); white-space: nowrap; }
.sessions td.cost .dim, td.num .dim { font-family: var(--font-sans); }
/* Every row carries its status, so every row is washed in its own tone rather
   than three failure classes being singled out by name. */
.sessions tbody tr, .history tbody tr { background: var(--state-wash); }

/* `align-items: center` since Track 22's numbered pager: at touch widths every
   link in it is a 44px box, and the count and the current page beside them are
   text that would otherwise sit at the top of that row. */
.paging { margin: var(--sp-3) 0 0; display: flex; align-items: center; gap: var(--sp-5); font-size: var(--fs-3); flex-wrap: wrap; }
.paging a { color: var(--accent-ink); text-decoration: none; }
.paging a:hover { text-decoration: underline; }
/* The sessions browser's filter form is followed by its table, on `/runs` and
   on a campaign's Sessions tab alike, and the table's top edge sat on the
   form's bottom border -- two raised surfaces reading as one. */
.runfilters { margin-bottom: var(--sp-5); }

/* -- the tone-keyed strip, and the two things drawn from it ----------------
   The prod banner is loud on purpose and first in the reading column, because
   what it says is that this page can spend money on infrastructure that is not
   finished. The sentences are `layout.PROD_GAPS` and they are **Track 8's**; how
   the block is drawn is this track's.

   **`D2` gave it the console's own idiom instead of the browser's.** It was a
   rectangle bordered all the way round in `--bad-ink` -- the one raised thing
   still outlined after `B1` moved every card, panel and popover to elevation --
   so the loudest element on the page was also the only one wearing a shape
   nothing else here wears, and it read as a user-agent alert dropped onto the
   console. It is a state-keyed **left rule** over the same wash now, which is
   exactly how this console has always said "this thing is in this state", at the
   same `--edge` width as every card in the fleet.

   **It is not quieter.** Same tone, same wash, same `role="alert"`, same
   position ahead of everything else on every page; what it stops doing is
   competing with the page for the same vocabulary. The three items are content
   -- each stops being true the day a particular milestone lands -- so they are
   set at reading leading rather than compressed, and nothing here truncates or
   hides one.

   `.what` is the introducing sentence rather than a bare text node, so the list
   under it can be tight to it without the paragraph's own margin deciding how
   tight.

   **`D4` gave it a second caller and a tone floor.** The fleet's health strip is
   this block now (`plans/console-design.md` §3), which means the tone can no
   longer be `bad` by construction -- so the floor here is **`idle`** and each
   call site names its own: the prod banner passes `bad`, and the fleet passes
   `warn` only when the box is committed past its own ceiling. `idle` rather than
   nothing, because a `--state-wash` with no state declared resolves to whatever
   the element inherited, and inside `.fleet` that would have been the first
   campaign's colour.

   **`.banner b` is `.banner .what b`** for the same reason: the fleet's spend
   line puts its figure in a `<b>` that is already classified as mono `--ink`, and
   a rule reaching every `<b>` in the box would have re-coloured it from four
   hundred lines away. The prod banner's bold opening sentence is the one this
   was written for and `.what` is where it lives. */
:where(.banner) { --state-rgb: var(--rgb-idle); --state-ink-rgb: var(--rgb-idle); }
.banner {
  margin: 0 0 var(--sp-6);
  padding: var(--sp-4) var(--sp-5);
  font-size: var(--fs-3);
  color: var(--ink);
  background: var(--state-wash);
  border: 1px solid var(--rule-line);
  border-left: var(--edge) solid var(--state-ink);
  border-radius: var(--radius-3);
  /* Its radius' step, like every other raised box: leaving the loudest box on
     the console the one thing lying flat on the page would make it read as the
     least important. */
  box-shadow: var(--elev-1);
}
/* The fleet's health strip, inside the banner: a dot in the tone, what the fleet
   is, and an action at the far end pointing at whatever is wrong. `_fleet.html`
   carries the argument for what it leads on. `flex-start` on the dot and a nudge
   under it, because it is an 8px circle beside two lines of type. */
.health { display: flex; align-items: flex-start; gap: var(--sp-3); }
.health .dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: .45rem;
  border-radius: 50%;
  background: var(--state-ink);
}
.health .says { flex: 1 1 auto; min-width: 0; }
.health .what { font-size: var(--fs-5); font-weight: 600; color: var(--ink); }
.health .detail { margin: var(--sp-1) 0 0; font-size: var(--fs-3); color: var(--dim); }
/* An `<a>` drawn as a button, because where it goes is a page: the mock's
   `Open potter-hq`. `align-self` rather than centring on the pair, so it sits on
   the headline's own line whatever the detail wraps to. */
.health > .btn-quiet {
  flex: none;
  align-self: flex-start;
  text-decoration: none;
  white-space: nowrap;
}

.banner .what { margin: 0; }
.banner .what b { color: var(--state-ink); }
/* The marker takes the tone and the sentence keeps `--ink`: three long lines set
   in a status colour is a paragraph nobody finishes, and the marker is the part
   that has to be found. */
.banner ul { margin: var(--sp-3) 0 0; padding-left: var(--sp-5); }
.banner li { margin: var(--sp-2) 0; }
.banner li::marker { color: var(--state-ink); }

/* -- narrow viewports -----------------------------------------------------

   **Four steps, and the table that decides them is in this file's header.** Two
   existed and two are `D2`'s; a media query whose width is not in that table is
   a breakpoint somebody added without deciding.

   Two things overflowed with no fallback before any of them: the knob grid and
   the sessions table's seven columns. **Neither needs a rule here now, and that
   is the shape the whole block is trying to have.** `.knobrows` counts its own
   columns with `auto-fill` and caps the track floor at the container width, so
   it is one column on a phone without anybody choosing a breakpoint, and a cell
   is two lines at every width; `.tablewrap` is a scroll container at every
   width, so a table that does not fit scrolls inside itself without a query
   deciding when. Both are the same lesson twice: a rule that answers "how wide
   is the viewport" when the question is "does this fit its own box" is a rule
   that will be wrong the next time something changes the box, and the rail
   changed the box. Target is 0px of horizontal scroll at 1440, 1100, 900 and
   380, on every page in the widest state it has: every `<details>` open and
   every `.why` targeted in turn. */

/* Step 1. The shell stops fitting: `--page-width` plus a gutter. The content
   column has been shrinking since the rail appeared beside it, and this is the
   width at which a row that pins its controls to the far right end leaves a band
   of empty page between them and what they act on. Both rules were in the 30rem
   block, which is three steps too late -- a fleet card at 900px already reads as
   two things that are not about each other.

   `.batch .btn-danger` is also the correction of a **rule that had stopped
   matching**: the 30rem block asked for `.batch .stop`, and `B4` retired `.stop`
   into the loudness vocabulary, so the smoke pane's Stop has not un-pinned at
   any width since.

   `D4` draws the fleet card's three-column grid and it lands here. */
@media (max-width: 69rem) {
  .run header .actions, .batch .btn-danger { margin-left: 0; }
  /* The fleet card's three cells and the Overview's two columns, both to one
     track. Below this width there is not enough reading column for a table and a
     tally beside it, and a card's identity, day and buttons stop being three
     things and start being three lines. */
  article.campaign { grid-template-columns: minmax(0, 1fr); }
  article.campaign > .actions { justify-content: flex-start; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split > * > :first-child { margin-top: var(--sp-6); }
  .split > :first-child > :first-child { margin-top: 0; }
}

/* Step 2. The shell turns from a row into a column, and this is the load-bearing
   rule of the whole track.

   **The rail becomes a full-width top bar**: static rather than sticky, a row
   rather than a column, its bottom rule where its right rule was. The nav's
   group labels go, because three words stacked above a wrapping row of pills is
   a heading per pill; **grouping survives as a hairline between runs**, which is
   what stops seven undifferentiated pills from being what the reader gets. The
   nav items **wrap** -- `flex-wrap: wrap` over items that size to their own
   content -- so Track 8 adding an eighth and a ninth cannot break this layout,
   only make it two rows.

   **The touch floor turns on here and nowhere else.** `--tap` is 44 CSS pixels;
   a console that pays for 380px and then draws a 33px nav pill has taken half a
   decision. It is scoped to this layer so the desktop console keeps the density
   that is its whole character. `:where()` keeps the specificity at zero, so a
   component may still say something more specific without fighting it, and the
   `display` on each is what makes `min-height` mean anything: it does nothing at
   all to an inline box, which is what a link is.

   The ⓘ is deliberately **not** exempt -- it grows its hit area rather than
   staying a 22px target beside a 44px one. `tests/tools/seot_measure.py` reports
   every control under 44 in either axis at 900 and 380, with the exemptions it
   allows named in it: a link inside a sentence of prose cannot be 44px tall
   without breaking the paragraph around it. */
@media (max-width: 56.25rem) {
  .shell { display: block; min-height: 0; }
  /* **The rail's own surface is cancelled here, and that is `D2`'s judgement
     kept rather than a second thought.** A tone that says "this column is a
     region" when it is 238px down the left says "this is a banner" when it is
     the full width of a phone. Everything else the desktop rail gained goes with
     it: the height, the sticky, the three padded bands. */
  .rail {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-3) var(--sp-5);
    margin: 0;
    padding: var(--sp-4) var(--gutter);
    background: none;
    border-right: 0;
    border-bottom: 1px solid var(--rule-line);
  }
  .rail > .brand { padding: 0; border-bottom: 0; }
  .rail > .railnav { flex: 1 1 auto; overflow: visible; padding: 0; }
  .rail > .railfoot { padding: 0; }
  /* The column's own top padding goes: the bar above it is the page's first
     object and 1rem of air under a full-width rule reads as a gap rather than as
     a margin. */
  .column { padding-top: var(--sp-5); }
  .railnav { flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
  .navgroup { flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--sp-1); }
  .navgroup .grouplabel { display: none; }
  .navgroup + .navgroup { padding-left: var(--sp-3); border-left: 1px solid var(--rule-line); }
  .navgroup ul { flex-direction: row; flex-wrap: wrap; }
  /* A pill again, and centred in it: the rail draws a block that fills its
     column, and a row draws a shape. Written at this specificity rather than
     inside the `:where()` below because `.navgroup a` already declares a
     `display` and a zero-specificity rule would lose to it -- leaving a 44px box
     with its label sitting at the top of it. */
  .navgroup a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-pill);
  }
  /* The footer takes the right-hand end of the bar, which is where the box's two
     numbers were before the rail existed, and is a row again rather than a
     column of label-over-value.

     **Every one of these is a flip of something the desktop rail wants and a
     phone cannot afford.** In a 238px column the footer is five stacked pairs
     with a meter and a full-width button, which at 380px is 300px of chrome
     above the page: the rail's whole footer arrived before the word `Campaigns`
     did. As a wrapping row it is two lines. `margin-left: 0` on each row's last
     child is what un-does `space-between` -- in a column a label pushed away from
     its figure is a pair; in a row it is two pairs interleaved.

     **`.asof` stays, and that is a deliberate departure from the mock**, which
     hides it at this width. "as of page load" is the whole of the snapshot
     claim, and a stale slots figure read as live is the difference between
     "there is room" and "a Start will be refused" -- the argument `.reading .asof`
     carries above, unchanged by the viewport being narrow. It is four words of
     italic; what it would buy to drop them is one line. */
  .railfoot {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-3) var(--sp-5);
    margin: 0 0 0 auto;
    border-top: 0;
  }
  .reading { flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-5); }
  .reading .row { gap: var(--sp-2); }
  .reading .row > :last-child { margin-left: 0; }
  /* A gauge rather than a bar: in a row a 100%-wide meter claims the whole line
     it is on, and what it is measuring is two characters to its left. */
  .reading .meter.full { width: 5rem; }
  .reading form { flex: 0 0 auto; }
  .reading form button { width: auto; }
  .jumpto { width: auto; }

  :where(button, summary) { min-height: var(--tap); }
  /* Every link that is a *control* rather than a word in a sentence: the nav,
     the two tab strips, the trail, the paging pair, a card's own name, the link
     to a live log, the one that closes a `.why`, and a link drawn as a button
     (`New campaign` at the head of the fleet, the health strip's `Open <name>`).
     `display` is what makes
     `min-height` mean anything -- it does nothing at all to an inline box, which
     is what a link is until something says otherwise.

     Enumerated rather than applied to every `a[href]` with the prose contexts
     carved out, and the enumeration is checked rather than trusted:
     `seot_measure.py` reports **every** control under 44 in either axis at 900
     and 380, so a component added later that forgets this line is a number in a
     run rather than a thing somebody notices in a screenshot. */
  /* **`a.btn-primary` and `a.btn-quiet` are the link half of "a button is a
     write, a link is a destination, and either may be drawn loudly".** The
     `<button>` half was already 44px through the `:where()` above; the `<a>`
     half took only its own padding, and the fleet's `New campaign` measured
     **127x35** at 900 and 380 in every state until this line. Both names
     because both are the same shape for the same reason, and the second only
     draws when a campaign has given up, which no measured state contains.

     `a.who` and it used to be `.campaign header .who`. A fleet card is a grid of
     three cells rather than a header now, so the descendant selector stopped
     matching and the campaign's own name came back **42x22** at 380px --
     measured, by `seot_measure.py`, which is the whole reason that enumeration
     is checked rather than trusted. The element is what to key on: the name is
     an `<a class="who">` wherever a card is drawn.

     `a.clear` is the link beside a filter form's button that drops every
     filter -- `/audit`'s, `/contacts`' and the sessions browser's. It draws once a
     filter is set, which no state in `PAGES` contains, so it measured
     **33x23** at 380px the first time a filtered URL was walked (Track 22). */
  :where(
    .navgroup a, .tabs a, .filters a, .crumbs a, .paging a, a.chip,
    a.who, a.version, .tolog, .why .dismiss, a.btn-primary, a.btn-quiet,
    a.clear
  ) {
    display: inline-flex;
    align-items: center;
    min-width: var(--tap);
    min-height: var(--tap);
  }
  /* The numbered pager under a list of sessions (Track 22). At this width
     every page link is a 44px box, so the box is the spacing: its number is
     centred in it, the current page -- text, not a link -- takes the same box
     so the run of numbers keeps one rhythm, and the gap between items drops
     to a hair. With the label at the left of each box and `--sp-5` on top,
     a screenshot at 380px showed `4` far from `5` and `5` tight on `6`. */
  nav.paging { gap: var(--sp-1) var(--sp-2); }
  nav.paging a, nav.paging b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--tap);
    min-height: var(--tap);
  }
  /* The palette's rows and its filter, `D6`'s. Written at this specificity
     rather than inside the `:where()` above for `.navgroup a`'s reason -- both
     already declare a `display`, and a zero-specificity rule would lose to it,
     leaving a 44px box with its label at the top.
     A row keeps `justify-content: space-between` rather than centring, because
     its two halves are a label and the group it is in and they are read as a
     column down the list. The measurement is what proved these were needed:
     `seot_measure.py` opens the palette before it counts, so its rows are
     controls it can see -- and they came back 27px and 34px. */
  .palette .hits a { min-height: var(--tap); }
  .palette .filter { min-height: var(--tap); }
  /* A chip that is a control is a **pill** at this width, which is the shape
     every other pressable non-button on this console already takes here: the nav
     items five rules up. `D4`'s, and the defect is one somebody saw in a picture
     -- `TRUNCATED` in a 44px-tall box with a 6px radius is a *button*, sitting
     inside a sentence, in a row of `RUNNING` and `FAILED` labels that are not
     pressable at all. The corners are the whole fix: at 44px a lozenge reads as a
     tag somebody can press and a rounded rectangle reads as a submit. Nothing
     shrinks, because the alternative to a 44px target is an exemption, and
     `plans/console-design.md` §4 refuses one for a control this size for the same
     reason it refuses one for the ⓘ.

     `--radius-2` is still what a chip takes everywhere else, including a `<span>`
     one here: the shape says *pressable*, so giving it to a label would be the
     same mistake pointing the other way. */
  a.chip { border-radius: var(--radius-pill); }
  /* `a.chip` and not `.chip`: a chip is a `<span>` unless it opens a `.why`, and
     the ones that do are the warning chips on a fleet card -- the only way to
     reach the sentence explaining why a day is not what it looks like. A span
     saying `RUNNING` is a label and takes nothing.

     **A checkbox is excluded and it is the one control that is exempt in the
     stylesheet as well as in the measurement.** `min-height` stretches its box
     and not its glyph, so a knob's checkbox came out 18x44: a 13px tick floating
     in a field, which is a worse target than the 13px one because it looks like
     a control that failed to render. What a thumb hits is the `<label>`, which
     is the whole row. */
  /* `.setpw input` is `/users`' reset-password pair: two inputs and a `Reset`
     in a row's own cell, hand-written rather than `ui.field` for `login.html`'s
     reason and so outside `.field`. Sixteen of them measured **153x21** -- the
     UA's own height -- beside a `Reset` that was already 44, so the row is no
     taller for it: the cell's height was the button's. */
  :where(
    .field input:not([type="checkbox"]), .field select, .field textarea,
    .knob input:not([type="checkbox"]), .knob select, .setpw input
  ) {
    min-height: var(--tap);
  }
  /* The ⓘ is the one exemption `plans/console-design.md` §4 refuses by name, so
     it grows instead. It inherits `box-shadow: var(--elev-1)` from the element
     rule every button on this console shares, and a shadow round a 22px
     transparent glyph is invisible while a shadow round a 44px one is a
     rectangle floating beside a figure -- so it drops it, which is what a
     borderless, groundless control should have been doing all along.

     `.field .name` takes the same floor so that a row of labels lines up when
     one of them carries an ⓘ and is therefore two lines tall. **`D7` narrowed
     it to the groups that have one, and the reason is a measurement of what it
     buys where it does not.** In Chromium at 900px, on the fleet's create form:
     `Sessions/day` (label 63px, the ⓘ wrapped under its words) beside `At once`,
     `Timezone` and `Country` at 44px. With the floor their label texts sit at
     `top` 557 and 576 -- **19px apart, so the row does not line up either way**
     -- and without it, at 532 and 576, which is 44. So the floor halves a
     misalignment it cannot remove: the ⓘ is a 44px box by the exemption this
     block refuses, a 44px box does not fit beside `Sessions/day required` in a
     7rem label, and a label with a control wrapped under its words is taller
     than one without whatever this rule says.

     What it costs where there is no ⓘ is the whole of the trade. 17px of text
     at the top of a 44px box puts **32px between a label and the control it
     names, against 8px on the desktop**, and a group whose labels are all one
     line has nothing to line up with -- so those 24px are air under every label
     on the console's two filter-shaped forms, `/audit`'s four and `/login`'s
     two, and under the create form's own `Name` / `Site` and `Queries` groups.
     At 380 the fields are stacked one per row and the equalising is worth
     nothing at any of them.

     The exception is written as the condition rather than as a page, which is
     also why it is a second `:has()` in this file: what wants a floor is a *row
     containing something taller than a line*, and on this console that is only
     ever the ⓘ. `/smoke`'s four fields are direct children of their `.launch`
     rather than of a `.fieldgroup`, so they are untouched by it and keep the
     floor they have had. */
  .info:where(button) { min-width: var(--tap); min-height: var(--tap); box-shadow: none; }
  .field .name { min-height: var(--tap); }
  .fieldgroup:not(:has(.info)) .name { min-height: 0; }
}

/* Step 3. Content inside the column, and it survives `D2` unchanged: `.facts`
   collapsing to one column is still right when the rail is already a top bar.

   **`D3` took the table rule out of it, and the band query with it.** Both said
   `table { display: block; overflow-x: auto }`, which is a viewport answering a
   question about a column; `.tablewrap` is the column answering it, at every
   width. The `.facts` half is untouched -- that one really is about the
   viewport, because a two-column definition list is a *measure* and a narrow
   page cannot hold two of them. */
@media (max-width: 44rem) {
  .facts { grid-template-columns: 1fr; gap: var(--sp-1); }
  .facts dd { margin-bottom: var(--sp-2); }
  .statstrip { gap: var(--sp-4) var(--sp-5); }
  /* **A log line stacks here, for `.facts`' reason: four columns are a
     measure.** The clock, the level and the event keep their `ch` floors and
     their row; the detail takes the next row at the whole width of the well.
     Without it the three floors -- 33ch and two gaps, about 260px -- were spent
     before the detail got any, and at 380px a traceback's headline came out
     **56px wide and 45 lines tall** on a run page (28px and 89 lines in the
     smoke pane's narrower card). At 44rem the detail still had 340px; at 600px,
     236. Every detail starts at the same left edge, so the column a reader
     scans down survives the stacking, and the event above it is what says where
     one line ends. `row-gap: 0` keeps a line's two rows one line. One rule
     because `ui.log_line` is one macro: the run page, a campaign's day log and
     the smoke pane all draw it. */
  .log li { flex-wrap: wrap; row-gap: 0; }
  .log .detail { flex-basis: 100%; }
}

/* Step 4. A phone. It survives `D2` **minus the two `.appbar` rules step 2
   obsoleted**, which are deleted rather than left: this file does not tolerate a
   rule nobody decided, and a rule whose selector no longer exists is the purest
   form of one. */
@media (max-width: 30rem) {
  /* Redeclared here so the page's padding narrows with the viewport. It was a
     literal in `body` and in this block before it was a token.

     `--chart-h` joins it at `D5`, and for the same shape of reason: a phone's
     screen is short, and a plot that fills a third of it pushes the fleet off
     the bottom. The token rather than either chart's own rule, so the bars and
     the curve stay the same height as each other -- which is the whole reason
     there is a token. */
  :root { --gutter: var(--sp-4); --chart-h: 6rem; }
  .column { padding-bottom: var(--sp-7); }
  /* The bar's footer stops claiming the right-hand end: at this width it is a
     row of its own under the nav rather than the tail of one. */
  .railfoot { margin-left: 0; }
  .campaign, .run { padding: var(--sp-3) var(--sp-4); }
  .pane { padding: var(--sp-3) var(--sp-4) var(--sp-4); }
  /* The sign-in card is named beside the others rather than left to lose to its
     own 0-2-0 rule: `.auth .launch` above out-specifies a bare `.launch` here,
     so a card that is deliberately airier than the rest at every other width
     would have been the one card that did not tighten on a phone. */
  .launch, .auth .launch { padding: var(--sp-4); }
  /* The left padding stays wide enough for the list markers: `.notice` is a
     `<ul>` and its bullets live in that indent. */
  .notice { padding: var(--sp-3) var(--sp-4) var(--sp-3) var(--sp-6); }
  .meter { width: 6rem; }
  .run header .session, .pid { margin-left: 0; }
}

/* Everything that moves, and there is very little of it: a meter's width on
   each poll and a button's hover. Somebody who has asked for less of that gets
   the end state immediately rather than a shorter animation. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* -- the phone view's palette (`/app`) ---------------------------------------

   The phone view is an instrument rather than the console in a smaller window:
   a near-black slate page, cyan for "live" and for the one press that matters,
   and the four tones redrawn bright enough to glow on it. **Scoped to the phone
   and nothing else.** The block keys on `:root` only when the body's own child
   is a `.phone`, so the palette above is untouched and the desktop console
   renders exactly as it did.

   On `:root` rather than on `.phone`, for the reason the state table gives: the
   derived tokens (`--bg`, `--accent`, `--surface-sunken`, `--line`) are
   computed where they are declared, which is the root, so re-valuing their
   inputs lower down would leave them reading the console's. This is the dark
   half and it is unconditional; the light half follows the phone's own setting
   in the section below. `pwa.THEME_DARK`, the manifest and the home-screen
   icons (`tests/tools/app_icons.py`) read `--surface-page` and the accent out of
   *this* block, and `test_webui_phone.py` holds them to it.

   The names it adds are the phone's alone: `--accent-hi` (the teal far end of
   the accent's gradient), `--rgb-idle-ink` (idle's written twin -- the console
   never needed one, because there idle's paint is its ink), `--phone-cta-*`
   (the primary press and the brand tile: a bright gradient with dark ink in
   *both* themes, so Start is the same component in light as in dark),
   `--phone-control` (a quiet control's border, 3:1 on the bare page as well as
   on a card), `--phone-track` (a meter's housing,
   lighter than the card it sits in), `--phone-sheet` (the Stop dialog),
   `--phone-field` (a text input: a well in the dark, white with a drawn
   border by day, where a well darker than its card reads as disabled),
   `--phone-dock` (the tab bar, translucent where a blur is drawn behind it),
   `--phone-pill` (the current tab), `--phone-aura` (how far the page and a
   toned card lean toward their colour) and `--phone-shine` (the lift under a
   primary press and the brand tile). `--phone-glow` is declared per element
   just below, because it reads `--state-rgb`. Every hue here is a cyan or a
   teal (187, 171), a green (158), an amber (37), a red (354) or a slate
   neutral (210-215): nothing on the phone resolves to a violet. */
:root:has(> body > .phone) {
  color-scheme: dark;
  --rgb-sunken: 5 8 12;
  --surface-page: #080c12;
  --surface-panel: #0f151d;
  --surface-rail: #0b1017;
  --rule-soft: #18212c;
  --rule-line: #243244;
  --rule-strong: #2f4257;
  --rule-hover: #3e566f;
  --ink: #e6edf5;
  --dim: #8c9db1;
  --ink-inverse: #031419;
  --rgb-accent: 34 211 238;
  --rgb-good: 52 211 153;
  --rgb-warn: 245 176 65;
  --rgb-bad: 255 93 108;
  --rgb-idle: 107 122 140;
  --rgb-accent-ink: 103 232 249;
  --rgb-good-ink: 110 231 183;
  --rgb-warn-ink: 252 210 123;
  --rgb-bad-ink: 255 151 160;
  --rgb-idle-ink: 169 182 198;
  --state-ink-rgb: var(--rgb-idle-ink);
  --accent-hi: #5eead4;
  --phone-cta-from: var(--accent);
  --phone-cta-to: var(--accent-hi);
  --phone-cta: linear-gradient(135deg, var(--phone-cta-from), var(--phone-cta-to));
  --phone-cta-ink: var(--ink-inverse);
  --phone-cta-edge: transparent;
  --phone-control: #56718c;
  --phone-track: #1b2634;
  --phone-sheet: #131b25;
  --phone-field: var(--surface-sunken);
  --phone-dock: rgb(11 16 23 / 88%);
  --phone-pill: rgb(var(--rgb-accent) / 14%);
  --phone-aura: 7%;
  --phone-shine: inset 0 1px 0 rgb(255 255 255 / 30%), 0 6px 20px rgb(var(--rgb-accent) / 30%);
  --elev-1: inset 0 1px 0 rgb(255 255 255 / 5%), 0 1px 2px rgb(0 0 0 / 50%);
  --elev-2: 0 8px 22px rgb(0 0 0 / 55%);
  --elev-3: 0 20px 52px rgb(0 0 0 / 70%);
}

/* A browser with no `:has()` (Firefox before 121, Safari before 15.4) never
   matches the block above, so the names only the phone declares would be
   undefined there and Start, the meter's housing and the dock would paint
   nothing. It gets them here instead, on `.phone` and only when `:has()` is
   missing -- declared on `.phone` anywhere else they would shadow the palette
   for every browser. Each is built from the console's own tokens, which is the
   palette such a browser draws the rest of the app in (the phone view as it
   stood before the redesign, dark and periwinkle): degraded, never blank. */
@supports not selector(:has(a)) {
  .phone {
    --rgb-idle-ink: var(--rgb-idle);
    --accent-hi: var(--accent);
    --phone-cta: var(--accent);
    --phone-cta-ink: var(--ink-inverse);
    --phone-cta-edge: transparent;
    --phone-control: var(--rule-hover);
    --phone-track: var(--surface-sunken);
    --phone-sheet: var(--surface-panel);
    --phone-field: var(--surface-sunken);
    --phone-dock: var(--surface-rail);
    --phone-pill: rgb(var(--rgb-accent) / 14%);
    --phone-aura: 0%;
    --phone-shine: none;
  }
}

/* The one glow, re-derived on every element from whichever tone reached it --
   the same reason `--state` is declared on `*` and not on the root. It lights a
   bar, a dot or an edge, and never text. The light half turns it off. */
.phone *,
.phone *::before,
.phone *::after {
  --phone-glow: 0 0 12px rgb(var(--state-rgb) / 45%);
}

/* -- the phone view (`/app`, `pages/phone.py`) ------------------------------

   A second face on the same token names: one centred column, cards that carry
   their tone as a lit top edge, live numbers as mono readouts, controls at least
   `--tap` square, and a tab bar that floats above the bottom of the screen,
   where a thumb is. Nothing here restyles the console; every rule is scoped
   under `.phone` or names a class only the phone view draws. The console's
   shared components (`.chip`, `.meter`, `.empty`, `.modal`, `.notice`,
   `.btn-quiet`, `.btn-danger`) are restyled here as `.phone .chip` and so on,
   never at their source.

   **Light and dark.** The console is a dark tool and stays one. The phone view
   follows the phone: under `prefers-color-scheme: light` the block below
   re-values the base tokens on `:root` -- only when the page's body holds a
   `.phone` -- and every derived token (`--bg`, `--accent`, `--state`, the
   chips' inks) follows, because they are computed from these on `:root`.
   `pwa.THEME_LIGHT` is held to its `--surface-page` by a test. */
@media (prefers-color-scheme: light) {
  :root:has(> body > .phone) {
    color-scheme: light;
    --rgb-sunken: 228 234 240;
    --surface-page: #eef2f6;
    --surface-panel: #ffffff;
    --surface-rail: #f8fafc;
    --rule-soft: #e1e7ee;
    --rule-line: #cfd8e2;
    --rule-strong: #b8c4d1;
    --rule-hover: #9fadbd;
    --ink: #0d1722;
    --dim: #4d5c6c;
    --ink-inverse: #ffffff;
    --rgb-accent: 14 116 144;
    --rgb-good: 21 128 61;
    --rgb-warn: 180 83 9;
    --rgb-bad: 198 40 40;
    --rgb-idle: 100 116 139;
    --rgb-accent-ink: 11 95 119;
    --rgb-good-ink: 22 101 52;
    --rgb-warn-ink: 138 63 8;
    --rgb-bad-ink: 166 30 30;
    --rgb-idle-ink: 71 85 105;
    --accent-hi: #0f766e;
    --phone-cta-from: #06b6d4;
    --phone-cta-to: #2dd4bf;
    --phone-cta-ink: #031419;
    --phone-cta-edge: rgb(14 116 144 / 35%);
    --phone-control: #708196;
    --phone-track: #dde4ec;
    --phone-sheet: #ffffff;
    --phone-field: #ffffff;
    --phone-dock: rgb(248 250 252 / 90%);
    --phone-pill: rgb(var(--rgb-accent) / 12%);
    --phone-aura: 5%;
    --phone-shine: inset 0 1px 0 rgb(255 255 255 / 45%), 0 6px 18px rgb(6 182 212 / 35%);
    --elev-1: 0 1px 2px rgb(13 23 34 / 8%);
    --elev-2: 0 4px 12px rgb(13 23 34 / 12%);
    --elev-3: 0 14px 36px rgb(13 23 34 / 22%);
  }
  .phone *,
  .phone *::before,
  .phone *::after { --phone-glow: none; }
}

/* Idle is a tone with two halves on the phone, like the other four. The state
   table leaves `.idle` to inherit, which on the console is the root's idle;
   here it is named, so an idle chip inside a green card is still idle. */
.phone .idle,
.phone .stopped,
.phone .missing {
  --state-rgb: var(--rgb-idle);
  --state-ink-rgb: var(--rgb-idle-ink);
}

/* A card's tone sits on its `.edge` (so `.idle`'s dimmed text colours the edge
   and never the words); lifting it to the card is what lets the card's meter,
   and its aura, draw in the card's own tone rather than the accent. A card
   with no edge keeps the accent, at zero specificity, so a tone class on the
   card itself (`.appsaid.done`) still wins. */
:where(.phone .appcard) { --state-rgb: var(--rgb-accent); --state-ink-rgb: var(--rgb-accent-ink); }
.phone .appcard:has(> .edge.live) { --state-rgb: var(--rgb-accent); --state-ink-rgb: var(--rgb-accent-ink); }
.phone .appcard:has(> .edge.ok) { --state-rgb: var(--rgb-good); --state-ink-rgb: var(--rgb-good-ink); }
.phone .appcard:has(> .edge.warn) { --state-rgb: var(--rgb-warn); --state-ink-rgb: var(--rgb-warn-ink); }
.phone .appcard:has(> .edge.bad) { --state-rgb: var(--rgb-bad); --state-ink-rgb: var(--rgb-bad-ink); }
.phone .appcard:has(> .edge.idle) { --state-rgb: var(--rgb-idle); --state-ink-rgb: var(--rgb-idle-ink); }

/* The column, and the two widths it is drawn at: `--phone-col` on a phone and
   `--phone-wide` from 48rem up (see the app's steps at the end of this
   section). Layout lengths, not colours, so neither is in a palette block.
   Every edge adds its `env(safe-area-inset-*)`: the app's shells ask for
   `viewport-fit=cover`, so a notch or a home indicator is the page's to clear,
   and where there is none the inset is 0 and the padding is what it was. */
.phone {
  --phone-col: 34rem;
  --phone-wide: 78rem;
  max-width: var(--phone-col);
  min-height: 100vh;
  margin: 0 auto;
  /* Room under the last card for the floating tab bar and the home indicator. */
  padding:
    calc(var(--sp-5) + env(safe-area-inset-top, 0px))
    calc(var(--sp-5) + env(safe-area-inset-right, 0px))
    calc(var(--tap) * 2 + var(--sp-4) + env(safe-area-inset-bottom, 0px))
    calc(var(--sp-5) + env(safe-area-inset-left, 0px));
  overflow-wrap: anywhere;
}
/* The two pages with no tab bar keep no room for one. */
.phone.appauth,
.phone.offline { padding-bottom: calc(var(--sp-6) + env(safe-area-inset-bottom, 0px)); }
/* A cyan wash at the top of the screen, fixed behind everything: the page is
   lit from above rather than flat. Decoration only, and nothing reads on it
   that does not also clear AA on the bare page. */
.phone::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(120% 60% at 50% -10%, rgb(var(--rgb-accent) / var(--phone-aura)), transparent 60%);
}
.phone h1 {
  margin: 0 0 var(--sp-5);
  font: 600 var(--fs-7)/var(--lh-7) var(--font-sans);
  letter-spacing: -.01em;
  color: var(--ink);
}
/* A card's heading is a micro-label: it names the card, the card's content is
   what is read. A direct child only, so the Stop dialog's question -- an `h2`
   inside the status card -- keeps the dialog's own heading. */
.phone .appcard > h2 {
  margin: 0 0 var(--sp-4);
  font: 600 var(--fs-1)/var(--lh-1) var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--dim);
}
.phone .appcard > h2 .sub {
  display: inline;
  margin: 0 0 0 .25em;
  text-transform: none;
  letter-spacing: 0;
}
.phone a { color: var(--accent-ink); text-underline-offset: .2em; }
.phone :where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
}

.apphead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-5);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--rule-soft);
}
.appmark {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: var(--tap);
  font: 600 var(--fs-6)/var(--lh-1) var(--font-sans);
  letter-spacing: .02em;
  text-decoration: none;
}
.phone .appmark { color: var(--ink); }
.appmark .glyph {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background: var(--phone-cta);
  box-shadow: var(--phone-shine);
  color: var(--phone-cta-ink);
  font: 600 var(--fs-6)/var(--lh-1) var(--mono);
}
/* The prod banner: a red wash with a lit dot, rather than a stripe. */
.appwarn {
  --state-rgb: var(--rgb-bad);
  --state-ink-rgb: var(--rgb-bad-ink);
  position: relative;
  margin: 0 0 var(--sp-5);
  padding: var(--sp-3) var(--sp-4) var(--sp-3) calc(var(--sp-4) + 8px + var(--sp-3));
  border: 1px solid rgb(var(--rgb-bad) / 45%);
  border-radius: 12px;
  background: rgb(var(--rgb-bad) / 12%);
  color: var(--ink);
  font: var(--fs-3)/var(--lh-3) var(--font-sans);
}
.appwarn::before {
  content: "";
  position: absolute;
  left: var(--sp-4);
  top: calc(var(--sp-3) + (var(--lh-3) * var(--fs-3) - 8px) / 2);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--state);
  box-shadow: var(--phone-glow);
}

.back {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  margin: calc(-1 * var(--sp-3)) 0 0;
  font-weight: 600;
  text-decoration: none;
}
/* A title with a page action opposite it: the action at its own width, beside
   the name while both fit and under it when they do not. */
.apptitle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3) var(--sp-5);
  margin: 0 0 var(--sp-5);
}
.phone .apptitle > h1 { min-width: 0; margin: 0; }
.phone .apptitle > .appbutton {
  flex: none;
  width: auto;
  margin: 0;
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-4);
}

/* The readouts: a live number is the largest thing on a card, in mono so a
   figure that ticks up on the next poll does not shift the words beside it.
   The page's own total is the hero, a step above every card's, so the sum and
   its parts never read at the same volume; on a site's page its status rides
   beside it as a chip, the same chip every card below carries. */
.apptotal { margin: 0 0 var(--sp-5); color: var(--dim); font-size: var(--fs-5); line-height: 1.1; }
.apptotal b, .appcard .count b {
  margin-right: .1em;
  color: var(--ink);
  font: 600 2rem/1.1 var(--mono);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.apptotal b { font-size: 2.75rem; line-height: 1; letter-spacing: -.03em; }
.phone .apptotal .chip { margin-left: var(--sp-2); }
.appnote {
  margin: var(--sp-5) 0 0;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--rule-soft);
  color: var(--dim);
  font-size: var(--fs-3);
}

/* The front page's headline row: the day's total as the hero, lit from its
   corner like a toned card, and two small readouts beside each other under it
   -- until 64rem, where the hero takes two of the cards' three columns and the
   small readouts stack in the third. */
.appstats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
  margin: 0 0 var(--sp-5);
}
.phone .appstats .appcard { margin: 0; }
.appstats .hero { grid-column: 1 / -1; }
.phone .appstat.hero {
  background-image: radial-gradient(90% 90% at 0% 0%, rgb(var(--state-rgb) / var(--phone-aura)), transparent 70%);
}
.appstat .apptotal { margin: 0 0 var(--sp-4); }
.appstat .count { margin: 0; }

.sitelist { display: grid; gap: var(--sp-4); margin: 0; padding: 0; list-style: none; }
.appcard {
  position: relative;
  display: block;
  margin: 0 0 var(--sp-4);
  padding: var(--sp-5);
  overflow: hidden;
  background-color: var(--panel);
  border: 1px solid var(--rule-soft);
  border-radius: 16px;
  box-shadow: var(--elev-1);
  color: var(--ink);
}
/* A toned card leans toward its tone from the corner its edge starts in. */
.phone .appcard:has(> .edge) {
  background-image: radial-gradient(90% 70% at 0% 0%, rgb(var(--state-rgb) / var(--phone-aura)), transparent 70%);
}
.phone .sitelist .appcard { margin: 0; }
/* A row of cards is as tall as its tallest, and each card fills its cell. */
.sitelist > li { display: grid; }
.phone .appcard > :last-child { margin-bottom: 0; }
/* The tone, as a lit line across the top that fades out to the right. Its
   margin is zeroed because `.warn` is also the console's amber paragraph, with
   a top margin, and an edge in that tone was drawn 10px inside its card. */
.appcard > .edge {
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  margin: 0;
  background: linear-gradient(90deg, var(--state), rgb(var(--state-rgb) / 0%) 70%);
}
.phone a.appcard { color: var(--ink); text-decoration: none; min-height: var(--tap); }
.phone a.appcard:hover,
.phone a.appcard:focus-visible { border-color: var(--rule-strong); box-shadow: var(--elev-2); }
.phone a.appcard:active { transform: scale(.985); }
.appcard .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-3);
  margin: 0;
}
.appcard .host { min-width: 0; font: 600 var(--fs-6)/var(--lh-6) var(--font-sans); }
.appcard .count { display: block; margin: var(--sp-4) 0 var(--sp-3); color: var(--dim); font-size: var(--fs-5); line-height: 1.1; }
.appcard > h2 + .count { margin-top: 0; }
.appcard .says { margin: var(--sp-3) 0 0; color: var(--dim); font-size: var(--fs-4); }
.phone .sub { display: block; margin-top: var(--sp-3); color: var(--dim); font-size: var(--fs-3); font-weight: 400; }
.appcard .top .sub { display: inline; margin: 0; }

/* A chip is a pill with a dot, and the dot's shape carries the state as well as
   its colour: solid for a settled tone, pulsing for live, a hollow ring for
   idle. No margin of its own, for the edge's reason: a `.chip.warn` took the
   console paragraph's top margin and dropped its card's header 8px below its
   neighbours'. Where a chip wants room, its container's rule says so. */
.phone .chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  margin: 0;
  gap: .5em;
  padding: .3em .7em;
  border: 1px solid var(--state-edge);
  border-radius: var(--radius-pill);
  background: rgb(var(--state-rgb) / 14%);
  color: var(--state-ink);
  font: 600 var(--fs-2)/var(--lh-1) var(--font-sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.phone .chip::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--state);
  box-shadow: var(--phone-glow);
}
.phone .chip.idle::before { background: transparent; box-shadow: inset 0 0 0 1px var(--state-ink); }

/* The meter: a pill housing a shade lighter than the card, and a fill in the
   tone of whatever it sits in -- its card, or its row -- graded from the paint
   to the ink and lit. A fill above zero is never shorter than 1.25rem -- at
   8px it was a round blob the size and colour of a chip's dot, and read as a
   second status light -- so a day that has started reads as a bar that has
   started, and one that has not reads as empty. */
.phone .meter,
.phone .meter.full {
  display: block;
  width: 100%;
  height: 8px;
  overflow: visible;
  background: var(--phone-track);
  border: 0;
  border-radius: var(--radius-pill);
}
.phone .meter .bar {
  min-width: 1.25rem;
  max-width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--state), var(--state-ink));
  box-shadow: var(--phone-glow);
}
.phone .meter .bar[style="width: 0%"] { min-width: 0; box-shadow: none; }

/* The presses: full width on a phone, side by side when both are drawn. */
.appactions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); }
.appactions > :is(button, .appbutton, .keep) { flex: 1 1 8rem; }
.appactions > .keep > button { width: 100%; }
.phone button, .appbutton {
  min-height: var(--tap);
  min-width: var(--tap);
  padding: var(--sp-3) var(--sp-5);
  border-radius: 12px;
  font: 600 var(--fs-5)/1.2 var(--font-sans);
}
.appbutton {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 0 var(--sp-4);
  border: 1px solid var(--phone-cta-edge);
  background: var(--phone-cta);
  box-shadow: var(--phone-shine);
  color: var(--phone-cta-ink);
  text-decoration: none;
}
.appactions .appbutton { margin: 0; }
.phone a.appbutton { color: var(--phone-cta-ink); }
.phone .appbutton.quiet,
.phone .btn-quiet {
  background: transparent;
  border: 1px solid var(--phone-control);
  box-shadow: none;
  color: var(--ink);
}
.phone a.appbutton.quiet { color: var(--ink); }
.phone .appbutton.danger,
.phone .btn-danger {
  background: rgb(var(--rgb-bad) / 14%);
  border: 1px solid rgb(var(--rgb-bad) / 55%);
  box-shadow: none;
  color: var(--bad-ink);
}
.phone .appbutton.quiet:hover, .phone .btn-quiet:hover { border-color: var(--accent); filter: none; }
.phone .appbutton.danger:hover, .phone .btn-danger:hover { border-color: var(--bad); filter: none; }
.phone button:active, .phone .appbutton:active { transform: scale(.985); }
.phone button[disabled] {
  opacity: 1;
  background: transparent;
  border-color: var(--rule-line);
  box-shadow: none;
  color: var(--dim);
  cursor: not-allowed;
}

/* The Stop dialog: a sheet from the bottom of a phone, and from 48rem a box in
   the middle of the screen rather than the console's, pinned under the top
   edge with the rest of a wide screen dimmed beneath it. Still the console's
   `ui.modal` (a native `popover`); only its geometry and surface change. */
.phone .modal {
  background: var(--phone-sheet);
  border: 1px solid var(--rule-strong);
  border-radius: 20px;
  box-shadow: var(--elev-3);
}
/* The scrim is dark in both themes and literal rather than a token, because a
   `::backdrop` does not inherit custom properties everywhere. A light one left
   the page legible behind the sheet, its own red Stop directly above Stop it. */
.phone .modal::backdrop { background: rgb(3 6 10 / 72%); }
@supports (backdrop-filter: blur(1px)) {
  .phone .modal::backdrop { backdrop-filter: blur(3px); }
}
.phone .modal .head .dot { background: var(--state); box-shadow: var(--phone-glow); }
/* The console's well has no top margin (its other dialogs put facts above it);
   here it sits right under the head's rule, so it takes the gap it has below. */
.phone .modal .effects { margin: var(--sp-4) var(--sp-5); border-radius: 12px; }
.phone .modal .effects ul { padding-left: 0; list-style: none; }
.phone .modal .effects li { position: relative; padding-left: var(--sp-4); }
.phone .modal .effects li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warn);
}
.phone .modal .foot { flex-wrap: wrap; gap: var(--sp-3); }
.phone .modal .foot button { flex: 1 1 8rem; }
@media (prefers-color-scheme: light) {
  .phone .modal::backdrop { background: rgb(8 12 18 / 55%); }
}
@media (max-width: 47.99rem) {
  .phone .modal {
    inset: auto 0 0 0;
    width: 100%;
    max-width: none;
    max-height: 85vh;
    margin: 0 auto;
    border-width: 1px 0 0;
    border-radius: 20px 20px 0 0;
  }
  .phone .modal .foot { padding-bottom: calc(var(--sp-3) + env(safe-area-inset-bottom, 0px)); }
}

.went { display: grid; gap: var(--sp-4); margin: 0; padding: 0; list-style: none; }
/* A line carries its tone as a class off the state table, and `.warn` is also
   the console's amber paragraph (smaller, with a top margin): the line keeps
   the tone for its bar and nothing else of it. */
.phone .went li {
  display: grid;
  grid-template-columns: 1fr auto minmax(4.5ch, auto);
  align-items: baseline;
  gap: var(--sp-2) var(--sp-3);
  margin: 0;
  color: var(--ink);
  font-size: var(--fs-5);
}
.went .label { min-width: 0; }
.went b { font: 600 var(--fs-6)/var(--lh-1) var(--mono); font-variant-numeric: tabular-nums; }
.went .share {
  color: var(--dim);
  text-align: right;
  white-space: nowrap;
  font: var(--fs-3)/var(--lh-1) var(--mono);
  font-variant-numeric: tabular-nums;
}
.went .meter { grid-column: 1 / -1; }

/* The last sessions: a row per session, a whole-row target, a hairline between. */
.visits { margin: 0; padding: 0; list-style: none; }
.visits li + li { border-top: 1px solid var(--rule-soft); }
/* `.entry` is the same row unlinked: the public hostname serves no `/runs/`. */
.visits a,
.visits .entry {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: var(--tap);
  margin: 0 calc(-1 * var(--sp-3));
  padding: var(--sp-2) var(--sp-3);
  border-radius: 10px;
  font-size: var(--fs-5);
  text-decoration: none;
}
.phone .visits a,
.phone .visits .entry { color: var(--ink); }
.phone .visits a:hover,
.phone .visits a:focus-visible,
.phone .visits a:active { background: rgb(var(--rgb-accent) / 6%); }
.visits .at {
  flex: none;
  width: 5.5ch;
  white-space: nowrap;
  color: var(--dim);
  font: var(--fs-3)/var(--lh-1) var(--mono);
  font-variant-numeric: tabular-nums;
}
.visits .dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--state);
  box-shadow: var(--phone-glow);
}
.visits a.idle .dot,
.visits .entry.idle .dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--state-ink); }
/* `.said` is also the console's quoted broadcast body (a panel with a left
   rule); here it is only the row's words. */
.visits .said {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  white-space: normal;
  background: none;
  border: 0;
}
.visits .go { color: var(--dim); font-size: var(--fs-6); }
.phone .visits a:hover .go,
.phone .visits a:focus-visible .go,
.phone .visits a:active .go { color: var(--accent-ink); }

/* What a press earned: a card washed in its outcome, its edge solid. */
.phone .appcard.appsaid {
  border-color: rgb(var(--state-rgb) / 30%);
  background-image: linear-gradient(rgb(var(--state-rgb) / 9%), rgb(var(--state-rgb) / 9%));
}
.appsaid > .edge { background: var(--state); }
.appsaid p { margin: 0; color: var(--ink); }
.appsaid details { margin-top: var(--sp-3); font-size: var(--fs-3); }
/* A flex summary loses the UA's marker, so it draws its own: a chevron drawn
   from two borders at the label's own size and in the label's own ink, turned
   down when open. The triangle glyph it replaces rendered about 6px tall in dim
   ink, and the row did not read as something to press. */
.appsaid summary {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: var(--tap);
  cursor: pointer;
  list-style: none;
  color: var(--ink);
  font-size: var(--fs-4);
  font-weight: 600;
}
.appsaid summary::-webkit-details-marker { display: none; }
.appsaid summary::before {
  content: "";
  flex: none;
  width: .5em;
  height: .5em;
  margin-left: .15em;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(-45deg);
}
.appsaid details[open] > summary::before { transform: translateY(-.15em) rotate(45deg); }
.phone .appsaid .notice {
  margin: 0;
  padding: var(--sp-3) var(--sp-4);
  list-style: none;
  background: var(--surface-sunken);
  border: 1px solid var(--rule-soft);
  border-radius: 10px;
  box-shadow: none;
  color: var(--ink);
  font-size: var(--fs-3);
}

/* Who is signed in: label left, value right, a hairline between rows. */
.appfacts { display: grid; grid-template-columns: auto 1fr; margin: 0; }
.appfacts dt,
.appfacts dd { padding: var(--sp-3) 0; border-top: 1px solid var(--rule-soft); }
.appfacts dt:first-of-type,
.appfacts dt:first-of-type + dd { padding-top: 0; border-top: 0; }
.appfacts dt {
  display: flex;
  align-items: center;
  color: var(--dim);
  font: 600 var(--fs-1)/var(--lh-1) var(--font-sans);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.appfacts dd { margin: 0; padding-left: var(--sp-5); font-weight: 600; text-align: right; }

/* The account page's two cards, each with its press at the foot: stacked on
   a phone, side by side from 48rem and as tall as each other, the presses on
   one line across the pair. */
.appduo { display: grid; gap: var(--sp-4); }
.phone .appduo > .appcard { display: flex; flex-direction: column; margin: 0; }
.phone .appduo .says { margin: 0; color: var(--ink); font-size: var(--fs-5); }
.appduo .appactions { margin-top: auto; padding-top: var(--sp-5); }

/* An empty state inside a card is a placeholder on the card's own surface: a
   dashed hairline and a hollow ring, idle's own mark, before the absence in
   ink and what to do in dim. Never a well darker than the card -- two of those
   on a stopped campaign read as two empty text boxes. */
.phone .empty {
  position: relative;
  margin: 0;
  padding: var(--sp-4) var(--sp-4) var(--sp-4) calc(var(--sp-4) + 10px + var(--sp-3));
  background: none;
  border: 1px dashed var(--rule-strong);
  border-radius: 12px;
  font-size: var(--fs-4);
}
.phone .empty::before {
  content: "";
  position: absolute;
  left: var(--sp-4);
  top: calc(var(--sp-4) + (var(--lh-4) * var(--fs-4) - 10px) / 2);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--state-ink);
}
.phone .empty .what { display: block; color: var(--ink); }
.phone .empty .next { color: var(--dim); }

/* The front page with no site at all: the empty state *is* the page, so it is
   a card of its own -- a glyph in an accent ring, the absence as a title, and
   the way out as a quiet press rather than a link inside a sentence. */
.phone .appempty {
  display: grid;
  justify-items: center;
  padding: var(--sp-7) var(--sp-5) var(--sp-6);
  text-align: center;
}
.appempty .appglyph {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: var(--sp-5);
  border: 1px solid rgb(var(--rgb-accent) / 35%);
  border-radius: 50%;
  background: var(--phone-pill);
  box-shadow: var(--phone-glow);
  color: var(--accent-ink);
}
.appempty .appglyph svg { fill: none; stroke: currentColor; stroke-width: 1.6; }
.phone .appempty .empty { padding: 0; border: 0; font-size: var(--fs-5); }
.phone .appempty .empty::before { content: none; }
.phone .appempty .empty .what { margin-bottom: var(--sp-2); font: 600 var(--fs-6)/var(--lh-6) var(--font-sans); }
.phone .appempty .appbutton { margin: var(--sp-6) 0 0; }

/* The tab bar: a dock floating above the bottom edge, its current item a pill.
   The translucent fill is the contrast basis; the blur is a bonus where it is
   drawn. It sits inside `.apphead` in the markup and is fixed here, so on a
   phone it leaves the header's flow; from 48rem it is in flow, a row of links
   in the bar across the top (the app's steps, below). */
.tabbar {
  position: fixed;
  inset:
    auto
    calc(var(--sp-4) + env(safe-area-inset-right, 0px))
    calc(var(--sp-3) + env(safe-area-inset-bottom, 0px))
    calc(var(--sp-4) + env(safe-area-inset-left, 0px));
  z-index: 10;
  display: flex;
  gap: 4px;
  max-width: calc(var(--phone-col) - 2 * var(--sp-4));
  margin-inline: auto;
  padding: 4px;
  background: var(--phone-dock);
  border: 1px solid var(--rule-line);
  border-radius: 22px;
  box-shadow: var(--elev-3);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .tabbar {
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
  }
}
.tabbar a {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 3.5rem;
  border-radius: 18px;
  font: 600 var(--fs-1)/var(--lh-1) var(--font-sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
}
.phone .tabbar a { color: var(--dim); }
.phone .tabbar a:hover { color: var(--ink); }
.phone .tabbar a[aria-current="page"] {
  color: var(--accent-ink);
  background: var(--phone-pill);
  box-shadow: inset 0 0 0 1px rgb(var(--rgb-accent) / 35%);
}
.tabbar svg { fill: none; stroke: currentColor; stroke-width: 1.6; }

/* The offline page (`static/app/offline.html`), which has no tab bar: one
   card, the sign-in's, holding what happened and the way back. */
.phone.offline .appcard { padding: var(--sp-6) var(--sp-5); }
.phone.offline .appnote { margin: 0 0 var(--sp-5); padding: 0; border: 0; color: var(--ink); font-size: var(--fs-5); }

/* The sign-in, in the app's look (`_app_sign_in.html`): `login.html`'s own
   form, restyled inside `.appauth` and nowhere else, so the console's sign-in
   reads none of this. The form is a card; a field is its label over a tall
   input in the page's sans at 1rem -- a phone zooms into a smaller one on
   focus -- and the press is the app's Start. "Required" is the input's own
   attribute, so the console's written mark is not drawn. */
.appauth .says { margin: 0 0 var(--sp-6); color: var(--dim); font-size: var(--fs-5); }
.phone.appauth .launch {
  display: grid;
  gap: var(--sp-5);
  padding: var(--sp-6) var(--sp-5);
  background: var(--panel);
  border: 1px solid var(--rule-soft);
  border-radius: 16px;
  box-shadow: var(--elev-1);
}
.appauth .fieldgroup { display: grid; gap: var(--sp-5); }
.appauth .fieldgroup > legend { margin-bottom: var(--sp-2); }
.phone.appauth .field { gap: var(--sp-3); font-size: var(--fs-4); }
.appauth .field .name { font-weight: 600; }
.appauth .field .mark { display: none; }
.phone.appauth .field input {
  min-height: 3rem;
  padding: var(--sp-3) var(--sp-4);
  background: var(--phone-field);
  border: 1px solid var(--phone-control);
  border-radius: 12px;
  color: var(--ink);
  font: var(--fs-6)/var(--lh-6) var(--font-sans);
}
.phone.appauth .field input:focus-visible {
  border-color: var(--accent);
  outline: 2px solid var(--accent-ink);
  outline-offset: 1px;
}
.appauth .actions { display: block; margin: 0; }
.phone.appauth .actions button {
  width: 100%;
  border: 1px solid var(--phone-cta-edge);
  background: var(--phone-cta);
  box-shadow: var(--phone-shine);
  color: var(--phone-cta-ink);
}
/* A refused sign-in: a red wash above the fields, as the prod banner is. */
.phone.appauth .notice {
  margin: 0;
  padding: var(--sp-3) var(--sp-4);
  list-style: none;
  background: rgb(var(--rgb-bad) / 12%);
  border: 1px solid rgb(var(--rgb-bad) / 45%);
  border-radius: 12px;
  box-shadow: none;
  color: var(--ink);
  font-size: var(--fs-4);
}

/* -- the app on a wider screen ------------------------------------------------

   The app's two steps, beside the console's ladder at the top of this file and
   keyed to the same rule (a width is written where its job is): **48rem** is
   where the phone column stops being the right shape -- a tablet held upright
   is 48rem, and below it the app is the phone it was drawn as -- and **64rem**
   is a laptop, wide enough for a campaign's two columns side by side. Both are
   `min-width` and scoped to `.phone`, so no console page meets either.

   From 48rem the column is `--phone-wide` with wider gutters; the header is a
   bar floating across the top with the nav inside it (the dock is spent); the
   front page's readouts and its cards share one grid of columns, two here and
   three from 64rem; a campaign is two columns, and so is the account page; the
   Stop dialog is a box in the middle of the screen; and the sign-in and the
   offline page are the mark, a title and one card, grouped in the middle. */
@media (min-width: 48rem) {
  .phone {
    max-width: var(--phone-wide);
    padding:
      calc(var(--sp-5) + env(safe-area-inset-top, 0px))
      calc(var(--sp-6) + env(safe-area-inset-right, 0px))
      calc(var(--sp-7) + env(safe-area-inset-bottom, 0px))
      calc(var(--sp-6) + env(safe-area-inset-left, 0px));
  }
  .phone h1 { margin-bottom: var(--sp-6); font-size: 1.75rem; }
  .apptitle { margin-bottom: var(--sp-6); }
  .phone .appcard { margin-bottom: var(--sp-5); }

  /* The bar: the mark, the nav beside it, the environment at the far end. */
  .apphead:has(> .tabbar) {
    position: sticky;
    top: calc(var(--sp-3) + env(safe-area-inset-top, 0px));
    z-index: 10;
    justify-content: flex-start;
    gap: var(--sp-5);
    margin: 0 0 var(--sp-6);
    padding: var(--sp-1) var(--sp-2) var(--sp-1) var(--sp-4);
    background: var(--phone-dock);
    border: 1px solid var(--rule-line);
    border-radius: 18px;
    box-shadow: var(--elev-2);
  }
  @supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
    .apphead:has(> .tabbar) {
      -webkit-backdrop-filter: blur(14px) saturate(140%);
      backdrop-filter: blur(14px) saturate(140%);
    }
  }
  .phone .apphead > .chip { margin-left: auto; }
  .apphead .tabbar {
    position: static;
    flex: 0 1 auto;
    max-width: none;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .apphead .tabbar a {
    flex: 0 0 auto;
    flex-direction: row;
    gap: var(--sp-3);
    min-height: var(--tap);
    padding: 0 var(--sp-4);
    border-radius: 12px;
    font: 600 var(--fs-4)/var(--lh-1) var(--font-sans);
    letter-spacing: 0;
    text-transform: none;
  }
  .apphead .tabbar svg { width: 18px; height: 18px; }

  /* The headline row and the cards under it are one grid of columns, so their
     column lines are the same lines: two columns here -- the hero across both,
     the two small readouts under it, the cards two to a row -- and three from
     64rem. The live figure a page leads with (the day's sums here, a
     campaign's visits on its own page) is a step above every other number. */
  .appstats { gap: var(--sp-5); margin-bottom: var(--sp-6); }
  .appstats .count b,
  .appcard .count.applead b { font-size: 2.75rem; line-height: 1; letter-spacing: -.03em; }

  .sitelist { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); }
  /* A card's header is its name over its chip on every card in the grid, so
     no card's chip wraps while its neighbour's stays beside the name; and the
     readouts sit at the card's foot, so a row stretched to its tallest card
     lines up its counts and meters instead of leaving a gap under the rest. */
  .sitelist .appcard { display: flex; flex-direction: column; }
  .sitelist .appcard .top { flex-direction: column; align-items: flex-start; gap: var(--sp-3); margin-bottom: auto; }

  .appstack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--sp-5); align-items: start; }
  .appduo { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); }
  /* Start, Stop, Sign out: a press's width rather than a wide card's. */
  .appactions > :is(button, .appbutton, .keep) { flex: 0 1 14rem; }

  /* The sign-in and the offline page: the mark, the title, a line and one
     card, as one group in the middle of the screen. The mark's row loses its
     hairline here: on a phone it heads the screen, and here it heads the card. */
  .phone.appauth,
  .phone.offline { display: flex; flex-direction: column; max-width: 30rem; }
  .appauth .apphead,
  .offline .apphead { margin: auto 0 var(--sp-5); padding-bottom: 0; border-bottom: 0; }
  .appauth .appmain,
  .offline .appmain { margin-bottom: auto; padding-bottom: 8vh; }
  .phone.appauth .launch,
  .phone.offline .appcard { padding: var(--sp-6); }
  .phone .modal { margin: auto; }
  /* The empty front page's way out, centred at a press's width. */
  .phone .appempty .appbutton { width: auto; min-width: 16rem; }
  .phone .appmain > [id] > .apptotal { margin-bottom: var(--sp-6); }
}
@media (min-width: 64rem) {
  .phone {
    padding-right: calc(var(--sp-7) + env(safe-area-inset-right, 0px));
    padding-left: calc(var(--sp-7) + env(safe-area-inset-left, 0px));
  }
  .phone h1 { font-size: 2rem; }
  .phone .appcard { padding: var(--sp-6); }
  .appstack { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 0 var(--sp-6); }
  .sitelist, .appstats { gap: var(--sp-6); }
  /* Three columns: the cards three to a row, and above them the hero across
     the first two with the small readouts stacked in the third -- each tile's
     edges on a card's edges. The hero is as tall as the two it stands beside,
     so its label stays at the top and its figure and meter sit at the foot. */
  .sitelist,
  .appstats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .appstats .hero { display: flex; flex-direction: column; grid-column: 1 / span 2; grid-row: 1 / span 2; }
  .appstats .hero > h2 { margin-bottom: auto; padding-bottom: var(--sp-4); }
  .appstats .hero .apptotal b { font-size: 3.5rem; }
}

/* Hover, for a pointer that has one: a card lifts, a press brightens, a tab
   lights. A touch screen gets the press's `:active` give instead, and a
   keyboard the focus ring, so nothing here is the only sign of anything. */
@media (hover: hover) {
  /* A card answers in its own tone: the border takes it and the lit edge
     brightens and runs further, which reads on the slate where a lift alone
     and a neutral border did not. */
  .phone a.appcard:hover { transform: translateY(-2px); border-color: rgb(var(--state-rgb) / 45%); }
  .phone a.appcard:hover > .edge {
    height: 3px;
    background: linear-gradient(90deg, var(--state-ink), rgb(var(--state-rgb) / 0%) 90%);
  }
  .phone .appbutton:not(.quiet, .danger):hover,
  .phone.appauth .actions button:hover { filter: brightness(1.08); }
  /* The quiet and the danger presses deepen their own fill. */
  .phone .appbutton.quiet:hover,
  .phone .btn-quiet:hover { background: rgb(var(--rgb-accent) / 8%); }
  .phone .appbutton.danger:hover,
  .phone .btn-danger:hover { background: rgb(var(--rgb-bad) / 24%); border-color: var(--bad); }
  /* A tab under the pointer is a neutral fill, never the current tab's teal. */
  .phone .tabbar a:not([aria-current]):hover { background: var(--rule-soft); }
  .phone .back:hover { text-decoration: underline; }
}

/* What moves, and only for somebody who has not asked for less: a live dot
   breathes, a bar eases to its new width on a poll, a press gives. Nothing
   depends on any of it. */
@media (prefers-reduced-motion: no-preference) {
  .phone .chip.live::before,
  .phone .visits a.live .dot,
  .phone .visits .entry.live .dot { animation: pulse 2.4s ease-in-out infinite; }
  .phone .meter .bar { transition: width .6s cubic-bezier(.2, .8, .2, 1); }
  .phone .appcard,
  .phone button,
  .phone .appbutton { transition: border-color .15s, box-shadow .15s, transform .12s, filter .12s, background-color .15s; }
  .phone .visits a { transition: background-color .15s; }
}
