/*
 * Admin interface stylesheet (SPECS.md > Admin UI requirements):
 * mobile-first, dark mode through prefers-color-scheme.
 *
 * A number of rules in here are defensive rather than decorative, and
 * each one closes a defect no test in this repository reported until a
 * guard was written for it. **They are marked DEFENSIVE where they sit,
 * and those markers are the inventory** — grep for them rather than
 * trusting any count written here or elsewhere, since a count goes stale
 * the first time a pass adds a marker without coming back.
 * .claude/rules/styling.md carries what each one closes, and never
 * delete one on the strength of a stated reason that no longer holds.
 *
 * The palette is not free: internal/assets/contrast_test.go checks every
 * foreground against every background it can land on, in both schemes,
 * before a browser is ever started. Colours are declared as opaque hex
 * because that is what it reads.
 */

/*
 * DEFENSIVE, and it comes first because the rules below are what make it
 * necessary. [hidden] is display:none in the user-agent stylesheet only,
 * so any author rule setting display on p or on [role="alert"] outranks
 * it by origin. Two passkey message slots (login.templ, account.templ)
 * are rendered hidden and filled by JavaScript later; without this they
 * become an empty tinted box, permanently, on the first screen anyone
 * sees. The existing guard asserts on the rendered string and stays green
 * while the element is painted.
 */
[hidden] {
    display: none !important;
}

/* Reset — the little of it this interface needs. */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
}

h1,
h2,
p,
ul,
ol,
dl,
dd {
    margin: 0;
}

ul,
ol {
    padding: 0;
}

/*
 * Colour tokens, light scheme. The dark block below reassigns these and
 * nothing else: every rule in the sheet is written once.
 *
 * Two values are the brand and are not free to move: --bg here and --bg
 * in the dark block. The accent is derived from a third — the brand
 * orange — which appears verbatim in neither scheme, both blocks
 * darkening it so their label can be white.
 * TestThePaletteIsBuiltOnTheBrandColours pins all four, and the rest of
 * the palette is derived to clear the bars around them.
 *
 * **--accent is darkened so its label can be white**, and that is not a
 * preference: white on the brand #f54b15 is 3.56:1 against a 4.5:1 bar,
 * and no lighter label exists to reach for, #ffffff being the ceiling.
 * Do not restore the brand value in either block while --accent-text is
 * white there.
 *
 * **The two blocks differ in how far they darken it, and the dark
 * surfaces are why.** A white label pulls the accent darker; clearing
 * 3:1 as a boundary pulls it lighter than every surface it lands on,
 * and the dark --surface-alt is the lightest of those — so the dark
 * block has the narrower band and stops short of this one.
 * .claude/rules/palette.md carries the band, the margins and the
 * alternatives that were weighed.
 *
 * color-scheme is what makes the browser follow the theme for the things
 * CSS cannot reach — scrollbars, the date picker of <input type="date">,
 * and the default rendering of every form control.
 */
:root {
    --bg: #ececec;
    --surface: #ffffff;
    --surface-alt: #e1e1e6;
    /*
     * The faintest surface there is: the fill of a table's header band
     * and the tint a row takes under the pointer. The mockups paint the
     * same value at both places, which is why it is one token.
     *
     * The light value is the mockups' own. **The dark one is derived** —
     * they draw no table in the dark scheme at all — and it is the
     * surface their dark screen lifts a quiet button to, i.e. the same
     * one-step lift this makes from --surface in the light half.
     */
    --surface-tint: #fafafb;
    /*
     * The fill of an addon -- the unit select joined to a number, the
     * separator between an allowance and its window. Furniture around a
     * value rather than a value, which is what the mockup says by
     * greying it.
     *
     * It carries text, so it is in backgrounds() and crossed with every
     * foreground and every edge like any other surface. The dark value
     * is derived, the mockups drawing no dark copy of this screen: the
     * same one-step lift from --surface the light value is.
     */
    --addon: #efefef;
    --text: #0f101d;
    --muted: #55596b;
    --link: #0b4fa8;
    --accent: #c43c11;
    --accent-text: #ffffff;
    --accent-bg: #fdece7;
    --accent-fg: #a8330e;
    --accent-border: #a8330e;
    /*
     * The soft edge of the accent tint, and the third accent boundary
     * token: --accent draws a focus ring on the page, --accent-border a
     * primary button's rim, and this one the edge of a box already
     * filled with --accent-bg — the build list's current filter chip.
     * Nothing checks it, for --line's reason and only that reason: the
     * fill inside it already sets the box off from the page.
     */
    --accent-line: #f3cfc2;
    --border: #6e7280;
    --line: #e3e4e9;
    --ok-bg: #dff0e5;
    --ok-text: #0e5c37;
    --warn-bg: #f7ecd6;
    --warn-text: #684508;
    --danger-bg: #fadfdc;
    --danger-text: #97190f;
    /*
     * Two more soft edges, on --accent-line's precedent and checked by
     * nothing for its reason: each bounds a box whose own fill or whose
     * own heading already sets it apart. --warn-line rims the standing
     * notice on a user's page, --danger-line the card holding the one
     * destructive action a screen offers.
     *
     * **Neither may be reached for as a control's rim.** A control is
     * found by its edge, so that one is held to 3:1 by boundaries() and
     * is --border; the mockups draw #dba79e on the delete button and
     * this palette refuses it, exactly as it refuses their chip edge.
     */
    --warn-line: #f0dcb4;
    --danger-line: #f0d3cd;

    /*
     * The fill a build list row takes for its state, and **not**
     * --danger-bg / --warn-bg under another name. Those two are badge
     * fills; the mockups tint a row at about 2 % and put the saturated
     * colour in the badge beside it, so using one for the other paints a
     * whole row the colour of an alarm.
     *
     * **The dark values are the badge fills, and that is the ruling.** The
     * mockups draw no table in the dark scheme at all, and a 2 % tint off
     * a #191b2b surface is nothing anyone can see — the same argument the
     * chronology's halos already settled one way. So the two schemes
     * differ in intensity on purpose; TestEveryRowTintIsItsOwnColor asks
     * the badge question of the light scheme only, and asks both schemes
     * for the part neither may fail.
     */
    --row-danger: #fdf7f6;
    --row-warn: #fdfaf8;

    /*
     * The shell's own strip, and the one surface that is the same colour
     * in both schemes: the state band is a console bar rather than a
     * panel of the page, and inverting it in the dark scheme would leave
     * the interface with no fixed point at all.
     *
     * --chrome-line is the hairline between the bar and the page, and it
     * is one of the two tokens in this file no contrast test checks: it
     * separates two blocks that are already distinguishable by their
     * fill, so it carries no information of its own. Anything that *does*
     * carry information there goes through --chrome-text, --chrome-muted
     * or one of the three dots, which are checked. --line above is the
     * other, and it is exempt for the same reason and only that reason:
     * it draws the edge of a card whose fill already sets it off from the
     * page. **An edge a reader needs in order to find a control is not
     * that** — an input's box, a quiet button's outline — and those keep
     * --border, which boundaries() holds to 3:1.
     *
     * --live-bad is the third dot, and it exists because the page's own
     * --danger-text is **2.13:1 on this bar** in the light scheme. It was
     * drawn there for a day: the token is checked against every surface
     * in backgrounds(), and this bar is deliberately in none of them, so
     * nothing said a word.
     */
    --chrome: #14151f;
    --chrome-text: #ffffff;
    --chrome-muted: #a9abb8;
    --chrome-line: #2c2e40;
    /*
     * The captured output, on the console card the build detail draws in
     * --chrome. The mockups set it one step below white deliberately: a
     * log is a wall of text nobody reads in full, and --chrome-text at
     * 21:1 makes every line shout as loudly as the error in it.
     *
     * **The same value in both schemes**, like --mark-run and for the
     * same kind of reason: the card is a console in both, so there is no
     * second appearance to derive a second value for.
     */
    --log-text: #d8d9e0;
    /*
     * The second bar the phone gets, one step lighter than the first.
     * Below 48em the mockups split the band in two — the brand and the
     * menu button above, what the site is doing below — and this is the
     * lower fill. It is a *surface that carries text*, unlike the two
     * line tokens beside it, so contrast_test.go lists everything the
     * state paints on it: phoneBandPairs() is that list, and it is not
     * the same as the one for --chrome.
     */
    --chrome-band: #1e2030;
    /*
     * **The bar has two line tokens and they do different jobs, so read
     * the job rather than the name.** --chrome-line above is the
     * *hairline under the band*, and the fill the menu button takes when
     * it is pressed. This one is the *rule between two statements* on
     * the band, and the menu button's edge — a step brighter, which is
     * what the mockups draw.
     *
     * Nothing checks it, for the reason --chrome-line is not checked
     * either: it separates two things their own content already tells
     * apart, and the button is found by its white glyph (18.15:1) rather
     * than by its outline.
     */
    --chrome-rule: #3a3c4c;
    /*
     * The signed-in name, one step brighter than --chrome-muted. The
     * mockups set the host name and the operator's name to two different
     * inks deliberately: what the site is doing and who is asking are
     * different questions, and on a bar with no room for headings the
     * ink is the only thing that says so.
     */
    --chrome-name: #c9cad3;
    --live-ok: #3ecf7e;
    --live-run: #f5a623;
    --live-bad: #ff7a6b;
    /*
     * The running build is a pill on this bar, not bare text — the one
     * thing on it that changes while an operator watches, and the
     * mockups give it a fill of its own so it can be found without
     * reading. The label lands on this fill and never on --chrome, which
     * is why the two are a pair of their own in contrast_test.go.
     */
    --live-run-bg: #33240f;
    --live-run-text: #f7c98a;
    /*
     * The brand square left of the product name, and the reason it is a
     * token of the bar rather than var(--accent): the mockups draw it in
     * the brand orange verbatim in **both** schemes, and --accent is
     * darkened in the light one so its label can be white. The bar is
     * the same fill in both schemes, so the mark on it has no reason to
     * change with the page.
     */
    --chrome-brand: #f54b15;

    /*
     * The navigation column's own palette: the mockups draw the column
     * as a quieter surface than the page rather than as another card.
     *
     * **--nav-title is deliberately not the mockups' #7a7d8c**, which
     * does not clear 4.5:1 on white and is drawn at 11px, so no
     * large-text concession applies. Do not take that value back. The
     * dark one is theirs unchanged.
     */
    --nav-surface: #ffffff;
    --nav-ink: #26283a;
    --nav-title: #6f7281;
    /* The two counter treatments; the rules below say what each is for. */
    --nav-alert-bg: #97190f;
    --nav-alert-text: #ffffff;
    --nav-notice-bg: #fdece7;
    --nav-notice-text: #a8330e;

    /*
     * Two surfaces the chronology and the failures panel draw, and that
     * no text ever lands on.
     *
     * **--mark-run is the same value in both schemes on purpose** — the
     * mockups write the running marker as this amber in the light screen
     * and in the dark one — so the dark block is not a copy somebody
     * forgot to adjust. It used to be --warn-text, which is #684508
     * here, a dark brown where the mockups draw amber: that token has to
     * stay legible as running text and this dot does not.
     *
     * **The three halos are their own tokens rather than the state
     * backgrounds, and the dark scheme is why.** In light they are the
     * mockups' values and also, by coincidence, --ok-bg / --danger-bg;
     * in dark those two sit within a few units of --surface, so the ring
     * reads as a thin dark rim instead of a halo. The mockups' own dark
     * values are lighter and warmer and actually read. Taking the
     * backgrounds again would silently undo that.
     *
     * **--mark-run is the one colour on this page nothing checks**, and
     * that is deliberate rather than an oversight: it is a 10px
     * aria-hidden dot whose state is written in French beside it, so no
     * contrast pair applies to it, exactly as none applies to --line.
     * The other three markers clear the bar only incidentally, their
     * tokens having another job. --alert-edge *is* checked, in
     * boundaries(). The ratios that settle all four are in
     * .claude/rules/palette.md.
     *
     * **It is the same hex as --live-run and must not be folded into
     * it**: that one is contrast-checked in phoneBandPairs() and this
     * one is not, so aliasing them would drag a checked token onto
     * --surface. They do not move together.
     */
    --mark-run: #f5a623;
    --mark-run-halo: #fdf1dd;
    --mark-ok-halo: #dff0e5;
    --mark-danger-halo: #fadfdc;
    --alert-edge: #97190f;

    color-scheme: light dark;

    /*
     * Three radii, where there used to be one. The mockups are explicit
     * and consistent about it: 8px on anything that is a card, 6px on
     * anything that is a control, 4px on a badge. Serving all three from
     * --radius made the cards too tight and the badges too round at the
     * same time.
     *
     * **--radius is the control one**, and it kept the bare name rather
     * than becoming --radius-control because two of its eight uses are
     * not controls: the status and alert banners, and the log <pre>. It
     * is the default of the three — what a box takes when it is neither
     * a card nor a badge — and the two named tokens are the departures.
     */
    --radius: 0.375rem;
    --radius-card: 0.5rem;
    --radius-badge: 0.25rem;
    --gap: 1rem;
    --tap: 2.75rem;
    /*
     * The state band's height, and the reason it is a token: the
     * navigation column subtracts it to stand exactly from under the
     * band to the foot of the window. Written twice, the two would be
     * free to drift and the drift would show as the way out sitting a
     * few pixels off the bottom — which reads as a rounding error rather
     * than as a stale value.
     */
    --band: 3.5rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f101d;
        --surface: #191b2b;
        --surface-alt: #23253a;
        --surface-tint: #1d1f2b;
        --addon: #212336;
        --text: #eceff7;
        --muted: #a4abc0;
        --link: #86b6f7;
        --accent: #d04012;
        --accent-text: #ffffff;
        --accent-bg: #2a1a12;
        --accent-fg: #ffb28c;
        --accent-border: #e2551f;
        --accent-line: #4a2a1a;
        --border: #79809a;
        --line: #2c2e40;
        --ok-bg: #0e2419;
        --ok-text: #6fd39d;
        --warn-bg: #2a2011;
        --warn-text: #e6b65f;
        --danger-bg: #2c1518;
        --danger-text: #f28e8d;
        /*
         * The dark counterparts of the two soft edges, on
         * --accent-line's own dark value: one step out of the tint they
         * bound, warm rather than grey, because the mockups draw no dark
         * screen carrying either box and a grey rim off these fills
         * reads as a seam rather than an edge.
         */
        --warn-line: #4a3a18;
        --danger-line: #4a2222;

        /*
         * The badge fills, deliberately — see the light block for the
         * ruling. A 2 % tint off --surface is invisible here, so the two
         * schemes differ in intensity rather than in kind.
         */
        --row-danger: #2c1518;
        --row-warn: #2a2011;

        /*
         * Repeated rather than inherited, and that is not redundancy:
         * TestBothSchemesDeclareTheSameTokens requires every name in both
         * blocks, because a token the dark half forgets falls back to the
         * light value silently. Here the two values happen to agree, which
         * is the point of the bar — see the light block.
         */
        --chrome: #14151f;
        --chrome-text: #ffffff;
        --chrome-muted: #a9abb8;
        --chrome-line: #2c2e40;
        --log-text: #d8d9e0;
        --chrome-band: #1e2030;
        --chrome-rule: #3a3c4c;
        --chrome-name: #c9cad3;
        --live-ok: #3ecf7e;
        --live-run: #f5a623;
        --live-bad: #ff7a6b;
        --live-run-bg: #33240f;
        --live-run-text: #f7c98a;
        --chrome-brand: #f54b15;

        /* Below --surface here, not equal to it as in the light block. */
        --nav-surface: #15161f;
        --nav-ink: #cdcfda;
        --nav-title: #8d90a2;
        --nav-alert-bg: #6d1109;
        --nav-alert-text: #ffd9d2;
        --nav-notice-bg: #3d2214;
        --nav-notice-text: #ffc9ae;

        /*
         * --mark-run repeats the light value deliberately; the light
         * block says why. Only the halo and the edge move.
         *
         * --alert-edge is the mockups' own dark value. It is a real step
         * down in contrast from the --danger-text it replaces here —
         * still well over the 3:1 an edge is held to, and checked, but
         * a drop on the one panel whose job is to be noticed.
         * .claude/rules/palette.md carries both ratios.
         */
        --mark-run: #f5a623;
        --mark-run-halo: #3a2a10;
        /*
         * Do not take --ok-bg / --danger-bg here, however much the light
         * block makes that look equivalent: those sit within a few units
         * of --surface in this scheme, and the halo becomes a ring that
         * is drawn, correct and invisible.
         */
        --mark-ok-halo: #123425;
        --mark-danger-halo: #45120c;
        --alert-edge: #d8503f;
    }
}

/* Page --------------------------------------------------------------- */

body {
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.5;
}

/*
 * DEFENSIVE, and the one that reaches furthest. The content holds
 * values this application did not choose and does not bound: an address
 * (checked by mail.ParseAddress and by nothing else), a webhook's name,
 * a passkey label, a user agent, an error returned by a remote release
 * source. Without a wrapping rule, one unbreakable run of characters
 * sets the min-content width of its box; the shell is a grid, and a
 * grid track's automatic minimum is min-content — so the whole page is
 * pushed past the window, and **the header and the footer go with it**,
 * carrying the logout button and the menu off the screen.
 *
 * A hyphen is a soft wrap opportunity where a dot and an at-sign are
 * not, so what a box demands is its longest hyphen-free run rather than
 * its length.
 *
 * **On main, and not on the elements one thinks of.** Written as
 * `td, dd, h1` it covered the users list, the definitions and the
 * detail headings, and left a passkey label in its bare <li> to do the
 * whole thing again — measured, 1434px of page and of header at a
 * 1280px window. overflow-wrap inherits, so naming the content root
 * covers every shape the interface renders a value in, including the
 * ones added after this comment.
 *
 * `anywhere` and never `break-word`: only the first is taken into
 * account when the intrinsic minimum is computed, which is the whole
 * quantity at issue here. Same declaration and same reason as `code`
 * and `.build-log`, which keep theirs — `.build-log`'s pairs with its
 * `white-space` and accessibility.md records what that pair buys.
 */
main {
    padding: var(--gap);
    overflow-wrap: anywhere;
}

/*
 * DEFENSIVE, and the day the comment above predicted. The rule on main
 * covered every shape a value was rendered in for as long as the shell
 * held nothing but the words "Hugo Frontend" — and the state band broke
 * that: it names the signed-in administrator, and create-first-user
 * stores the *address* as the account's name, so a 128-character
 * unbreakable run now renders in the header, where main's inherited rule
 * never reaches. Measured before this rule, with such an account:
 * 1160px of page at an 820px window and 1144px at 1050px.
 *
 * min-width: 0 is the second half, and it is the lever
 * .claude/rules/styling.md recorded as "not in the sheet, for the day an
 * element escapes the inherited wrap". A grid track's automatic minimum
 * is its content's min-content, so without it a box too wide for its
 * track stretches the whole shell — carrying the menu off the screen —
 * whatever the wrap does inside it.
 */
header,
nav[aria-label="Navigation principale"] {
    overflow-wrap: anywhere;
}

body.has-shell > * {
    min-width: 0;
}

/*
 * The content column is a flex column with a gap, which is what the
 * mockups draw, and the rhythm they draw is 14px rather than the 16 the
 * content rules give. The two mechanisms are not interchangeable: the
 * last block of a page carried a trailing margin inside main's padding,
 * where a gap is only ever *between* two blocks.
 *
 * **Both halves of this are load-bearing, and neither is obvious.**
 *
 * The reset is written `body.has-shell > main > *`, at (0,1,2), because
 * it has to outrank everything that margins a block of this column: the
 * content rules at (0,0,2) and the classes .page-head, .tiles, .split
 * and .chips at (0,1,0). Written `main > *` it would weigh (0,0,1) and
 * lose to every one of them — the gap would be *added* to each margin
 * rather than replacing it, and every block on every screen would sit
 * 30px from the next instead of 14. The four resets this sheet already
 * carries (.tile > *, td > :last-child, .panel-body > :last-child,
 * dialog[open] > *) all name a class for the same reason; this is the
 * first that would have had none.
 *
 * And it hangs off has-shell rather than on main, so the five public
 * screens keep their own rhythm: they are a card of prose with no
 * mockup behind them, and .claude/rules/styling.md records what that
 * block is doing.
 */
body.has-shell > main {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

body.has-shell > main > * {
    margin-bottom: 0;
}

/*
 * A bare inline element that becomes a flex item is blockified and then
 * stretched to the column's width — so "Retour à la liste", four words,
 * became a click target running the entire content column. Measured on
 * the uncovered shape: 992px at a 1280px window and 358px at 390.
 *
 * **The contract, not the list.** The first version of this rule named
 * the two detail pages' links and there were *four* such links — the
 * creation form's and the confirmation-required page's were missed,
 * which is the failure mode an enumeration has and a structural
 * selector does not. Any bare link closing a page wants its own width;
 * one that ever wants the column's can say so on itself.
 */
body.has-shell > main > a {
    align-self: start;
}

/*
 * The skip link is rendered and moved off-screen by position, never
 * display:none — an element that is not displayed can never take focus,
 * so :focus would not fire and the link would leave the tab order
 * altogether. The keyboard suite is what catches that one, and it does
 * catch it. DEFENSIVE.
 *
 * Being positioned takes it out of flow, which is also why the shell's
 * grid has four rows for five children.
 */
.skip-link {
    position: absolute;
    left: -100vw;
    top: 0;
    z-index: 10;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: var(--accent-text);
}

.skip-link:focus {
    left: 0;
}

/*
 * main is the skip link's target and carries tabindex="-1", so it takes
 * focus when the link is activated and matches :focus-visible in
 * Chromium, which is what gives the link its only feedback.
 * Neither outline:none nor a plain :focus rule: the first removes the
 * feedback, the second draws a box round the whole page on every click.
 */
main:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Public screens ------------------------------------------------------ */

/*
 * Every page reachable without a session — login, two-factor code,
 * activation, password reset — carries neither header nor nav, so its
 * form is alone on the page and <main> is drawn as a card centred in
 * the window.
 *
 * The hook is the *absence* of the class shellClass puts on an
 * authenticated body, which is the same hinge the desktop grid hangs
 * off; do not replace it with a per-page marker. 100dvh, never 100vh: a
 * phone's collapsing toolbar slides a vh-sized card under itself.
 */
body:not(.has-shell) {
    display: flex;
    min-height: 100dvh;
    padding: var(--gap);
}

/*
 * margin: auto, never align-items/justify-content on the parent:
 * alignment overflows *both* ends when the card is taller than the
 * window, and the top one cannot be scrolled to.
 *
 * This padding outranks the desktop query's `main` on specificity
 * (0,1,2 against 0,0,1), so it does not depend on declaration order —
 * do not fold the block into that query.
 */
body:not(.has-shell) > main {
    margin: auto;
    width: min(24rem, 100%);
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
}

/*
 * The logo crowning those pages; the file is drawn at 15rem.
 *
 * <picture> gets a display of its own because it has none in the
 * user-agent sheet: left inline around a block-level image, the auto
 * margins below centre against an anonymous block box instead of the
 * card, and no test observes the logo's own box.
 */
picture {
    display: block;
}

.public-logo {
    display: block;
    width: 15rem;
    max-width: 100%;
    height: auto;
    margin: 0 auto var(--gap);
}

/* Shell -------------------------------------------------------------- */

/*
 * The shell is a grid at every width, and its rows are named rather
 * than left to auto. Both halves of that are load-bearing.
 *
 * **Naming the rows is what keeps the band the same size from one
 * screen to the next.** align-content is normal, i.e. stretch, so
 * without this the height left over up to min-height is shared
 * *equally between the rows*, and the header grows by whatever the
 * page's content does not use — the emptier the screen, the fatter the
 * chrome. The page an operator is on must not be legible from the size
 * of the chrome around it, so the content takes the slack and nothing
 * else does.
 *
 * **And min-height with a 1fr content row is what makes the shell fill
 * a window the content does not** — which is what gives the desktop
 * sidebar a column to run down, rather than a rule stopping wherever
 * the text ran out.
 *
 * The skip link is a fourth child and is not a grid item: it is
 * absolutely positioned, so it is out of flow. Do not give it a
 * grid-area, and do not move it in the DOM to make room for one.
 *
 * 100dvh, never 100vh, for the reason the public card records: a
 * phone's collapsing toolbar slides a vh-sized box under itself.
 */
body.has-shell {
    display: grid;
    grid-template-areas:
        "header"
        "nav"
        "main";
    grid-template-rows: auto auto 1fr;
    min-height: 100dvh;
}

/*
 * DEFENSIVE, and the disclosure is what made it necessary. Rows alone
 * place items in source order, so the moment the menu folds away it
 * stops being a grid item and everything after it moves up a row —
 * main took the second `auto` and the row below it took the 1fr.
 * Measured when the shell still ended in a footer and the areas were
 * not named: a 38 px footer became 442 px at 820 px and 342 px at
 * 390 px, its top border across the middle of the window.
 *
 * The footer is gone, so that exact shape cannot recur; the mechanism
 * can, and it costs three declarations to close. Naming the areas pins
 * each child to its own row whatever the others do, so a missing item
 * leaves an empty row rather than shifting the rest.
 * TestTheShellHoldsItsShapeOnEveryScreen is what catches it.
 */
/*
 * The band stays on screen, which is what the numbers on it are for: an
 * operator watching a build run should not have to scroll back up to
 * see it change, and it is the fixed point every screen shares.
 *
 * **It is also what makes the navigation column's arithmetic exact.**
 * That column sticks under the band and sizes itself to one viewport
 * less --band; with the band scrolling away, the column's foot stopped
 * --band short of the bottom of the window at every scroll position but
 * the first. Now the two hold the same rule at any offset.
 *
 * z-index because the content column scrolls *under* the band, and a
 * positioned box with no z-index paints in document order — the band
 * comes first, so the content would win.
 */
body.has-shell > header {
    grid-area: header;
    position: sticky;
    top: 0;
    z-index: 2;
}

body.has-shell > nav {
    grid-area: nav;
}

body.has-shell > main {
    grid-area: main;
}

/*
 * The state band: what the site is serving, what the queue is doing, and
 * who is signed in. Dark in both schemes — it is a console strip rather
 * than a panel of the page, and it is the fixed point an operator finds
 * the state on whatever screen they are looking at.
 *
 * **The 56px floor is a floor and not a height**, and the two differ
 * where the band wraps: below 64em it carries the menu button, whose own
 * 44px target already makes it taller than this, and it grows further
 * when the host name and the signed-in address take a second line. Where
 * the floor binds is the desktop band, which measured 43.5px against the
 * 56 every mockup draws. Written as a fixed row on the grid instead, the
 * narrow band would be clipped rather than allowed to grow.
 */
header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem var(--gap);
    align-items: center;
    justify-content: space-between;
    min-height: var(--band);
    padding: 0.625rem var(--gap);
    background: var(--chrome);
    color: var(--chrome-text);
    border-bottom: 1px solid var(--chrome-line);
}

/*
 * DEFENSIVE. Everywhere else the focus ring is --accent; on this bar it
 * is --chrome-text, and the reason is legibility rather than compliance.
 * The accent does clear the bar here — 3.46:1 against --chrome in the
 * light scheme, measured — so this rule is not what keeps the header
 * conformant. What it buys is 18.15:1 instead of 3.46 on the one control
 * the band carries, against a fill darker than any surface in the page.
 *
 * **A previous version of this comment said 2.69:1 and called the accent
 * non-conformant here.** It is not, and the figure was never checked by
 * anything — --chrome is deliberately outside backgrounds(), so no test
 * could contradict it. Keep the rule for what it actually does; do not
 * restore the claim.
 *
 * internal/assets/contrast_test.go checks --chrome-text on --chrome by
 * name, so deleting this rule makes that check describe nothing rather
 * than fail.
 */
header :focus-visible {
    outline-color: var(--chrome-text);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin: 0;
    min-width: 0;
}

.brand-mark {
    flex: none;
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 2px;
    background: var(--chrome-brand);
}

.brand-name {
    font-weight: 650;
    font-size: 0.9375rem;
}

.brand-host {
    color: var(--chrome-muted);
    font-size: 0.8125rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.shell-live {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem 1.25rem;
    font-size: 0.875rem;
    min-width: 0;
}

/*
 * The two live indicators carry a coloured dot, and the dot is drawn
 * with ::before rather than with a background on the element: the text
 * beside it is the carrier of the state (WCAG 1.4.1), and a shape that
 * cannot be read has no business being the only difference between "le
 * site est servi" and "le lien ne désigne rien".
 */
.shell-served,
.shell-run {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

/*
 * The downstream consumer's slot, drawn only when it is behind. It takes
 * the same dot and the same running ink as the build in flight: both say
 * "something is not finished", and neither is the failure the published
 * link's --live-bad is reserved for.
 */
.shell-consumer {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.shell-served::before,
.shell-consumer::before,
.shell-run::before {
    content: "";
    flex: none;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--chrome-muted);
}

.shell-served--ok::before {
    background: var(--live-ok);
}

/*
 * --live-bad and never --danger-text. The page's failure colour is
 * 2.13:1 on this bar in the light scheme, and that is the state an
 * operator most needs to see: the published link points at nothing.
 */
.shell-served--broken::before,
.shell-served--unknown::before {
    background: var(--live-bad);
}

.shell-consumer::before,
.shell-run::before {
    background: var(--live-run);
}

/*
 * The one thing on the bar that changes while somebody is watching, and
 * the mockups make it a pill so it can be picked out of the row without
 * being read word by word. **The fill is not what carries the state**:
 * it is 1.21:1 on --chrome and nothing checks it, deliberately. What
 * carries it is the dot (7.40:1 on this fill, checked) and the words
 * inside, which is WCAG 1.4.1 and is why the fill is allowed to be as
 * quiet as it is.
 */
.shell-run {
    padding: 0.1875rem 0.625rem;
    border-radius: 999px;
    background: var(--live-run-bg);
    color: var(--live-run-text);
}

.shell-run-elapsed {
    font-variant-numeric: tabular-nums;
}

/*
 * The build number the bar names is an identifier like every other one
 * the interface renders, so it takes .ident — and gives back the weight
 * that class carries. The mockups monospace the figure and leave it at
 * the weight of the sentence around it; bolding it here would make the
 * band's quietest statement its loudest.
 */
.shell-served .ident {
    font-weight: inherit;
}

/*
 * The whole statement in one box, which is what puts the build number on
 * the same baseline as the words before it: as a second flex item it was
 * centred on its own line box, and a monospaced figure's line box is not
 * the sentence's. The gap between the dot and this box is the flex row's;
 * the space before the number is ordinary inline whitespace.
 */
.shell-served-label {
    min-width: 0;
}

/*
 * The signed-in name is set off from the state by a rule of its own,
 * because the two answer different questions — what the site is doing,
 * and who is asking. Run together they read as one sentence, which is
 * how "build 4128 en cours" and an address end up looking related.
 *
 * A pseudo-element carried by the name rather than an element of its
 * own: nothing renders when the state before it does not, and an empty
 * band would otherwise draw a hairline hanging off its own left edge.
 *
 * **It is a pseudo-element and no longer a border because of its
 * height.** A border-left runs the whole line box; the mockups draw a
 * 1×22px rule, centred on the row. The border had nothing to do with the
 * ellipsis this box takes past the shell breakpoint — the two coexisted —
 * so do not read the change as a repair of that.
 *
 * **position: relative is load-bearing.** Without it the nearest
 * positioned ancestor is <header>, which is sticky and therefore
 * positioned, and the rule lands in its top-left corner under the brand
 * mark, at every width. Nothing in the suite measures where it is.
 *
 * --chrome-name and not --chrome-muted: the host name beside the brand
 * is the muted one, and the mockups keep the operator's own name a step
 * brighter than a value they never chose.
 */
.shell-user {
    position: relative;
    color: var(--chrome-name);
    padding-left: 1.25rem;
    min-width: 0;
}

.shell-user::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 1.375rem;
    background: var(--chrome-rule);
}

/*
 * The menu button. It carries no background of its own until it is
 * pressed: the bar is already a strong shape, and a filled control in it
 * would read as the page's action rather than as a disclosure.
 *
 * The mockups draw a square of --tap by --tap holding a glyph and no
 * words, which is what the two rules below make of it.
 *
 * The bars are one element with two shadows rather than three spans:
 * fewer boxes to keep aligned, and the element is aria-hidden either way
 * — the button's name is the text beside it, which is still there and is
 * merely not shown.
 */
.nav-toggle {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    min-width: var(--tap);
    min-height: var(--tap);
    /*
     * **`padding: 0` is a cancellation, not an absence.** The page's
     * `button` rule pads every control 0.5rem 1rem, and this one is a
     * square holding a 16px glyph: left to inherit that, the box comes
     * out wider than the touch target the mockups draw, since padding
     * beats a min-width floor rather than being clamped by it.
     * assertThePhoneBandIsTwoBars is what reads it.
     *
     * `font: inherit` is insurance rather than description — the
     * button's own text is clipped, so nothing here is read at the size
     * it sets. It escapes the user agent's control font, and the page's
     * own button type with it, for the day the name is shown again.
     */
    padding: 0;
    font: inherit;
    color: var(--chrome-text);
    background: transparent;
    border: 1px solid var(--chrome-rule);
    border-radius: var(--radius);
    cursor: pointer;
}

.nav-toggle[aria-expanded="true"] {
    background: var(--chrome-line);
}

/*
 * The name stays text and stops being shown, rather than moving into an
 * aria-label. nav.js rewrites this node — "Ouvrir le menu" against
 * "Fermer le menu", because a repeated action needs names that differ —
 * and an aria-label would be a second name for the same control, free to
 * disagree with the one the script maintains.
 *
 * How it is hidden is `.clipped`, which it shares.
 */

.nav-toggle-bars {
    position: relative;
    width: 1rem;
    height: 2px;
    background: currentcolor;
    box-shadow: 0 -5px 0 currentcolor, 0 5px 0 currentcolor;
}

/*
 * Open, the three bars become the cross the mockups draw. **Both the
 * fill and the shadows have to go**: clearing one alone leaves an X
 * drawn over the bars it was meant to replace. The two strokes are
 * pseudo-elements of a span that is already aria-hidden, so they add
 * nothing a screen reader has to step over.
 */
.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
    background: transparent;
    box-shadow: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before,
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
    content: "";
    position: absolute;
    inset: 0;
    background: currentcolor;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
    transform: rotate(-45deg);
}

/* The navigation ------------------------------------------------------ */

nav[aria-label="Navigation principale"] {
    background: var(--nav-surface);
    border-bottom: 1px solid var(--line);
}

/*
 * The collapsed menu, and the class is only ever put there by nav.js.
 * **Never collapse the menu from the stylesheet alone**: the button that
 * would open it again is served hidden, so a browser running no script
 * would be left with no navigation at all. The progressive-enhancement
 * contract is that the script reveals the control and closes the menu in
 * the same breath, or neither happens.
 */
.shell-nav--collapsed {
    display: none;
}

nav[aria-label="Navigation principale"] ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    list-style: none;
    margin: 0;
    padding: 0.5rem var(--gap);
}

/*
 * The group headings are the redesign's own addition, and they are
 * <h2> rather than styled paragraphs because that is what a screen
 * reader navigates by.
 *
 * **One declaration, and that is the point of it.** This rule used to be
 * written twice — hidden visually here, restored past the shell
 * breakpoint — because the narrow layout drew the menu as a bar, where
 * three stacked headings were noise. The narrow layout draws a
 * full-height panel now, which is what the mockups put the headings in,
 * so the split has no subject left. Do not reintroduce it: only the last
 * copy carries a property both of them set, which is how the first
 * attempt at --nav-title measured --muted.
 * TestTheMenuHeadingIsStyledInOnePlace is the guard.
 */
.nav-group-title {
    padding: 0 0.625rem 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nav-title);
}

/*
 * An entry's type is the same in the bar and in the column — the
 * mockups write .9375rem and .375rem .625rem on both — so it is here
 * rather than in the desktop query. **Only the target height differs**,
 * and that one is in the query: a mouse is served by the column's
 * 2.25rem while a thumb is not, so rewriting this floor would shrink
 * every touch target on the way past.
 *
 * The floor is --tap, which is what the phone mockup asks of a menu
 * entry — the same 2.75rem every other control in this interface takes.
 * It was 2.5rem while the narrow menu was a bar nobody had measured
 * against that screen.
 *
 * --nav-ink and not --text: the mockups draw an entry a shade quieter
 * than body text, which is what stops a menu of eight links reading as
 * loud as the page it points at.
 */
nav[aria-label="Navigation principale"] a,
.nav-block--footer button {
    min-height: var(--tap);
    padding: 0.375rem 0.625rem;
    /*
     * The shorthand first and the size after it, in that order: the
     * button needs `font: inherit` to escape the user agent's control
     * font, and the shorthand resets every longhand it does not name —
     * so a size declared above it would be thrown away.
     */
    font: inherit;
    font-size: 0.9375rem;
    border-radius: var(--radius);
    color: var(--nav-ink);
}

/*
 * **The arrangement is the anchor's alone, and the way out must not
 * share it.** Making the logout button a flex container too looks like
 * tidying — the rule below already carries an inert justify-content —
 * and it puts the <form> around it over its own button in the hit test:
 * six acceptance tests then spend thirty seconds each failing to click
 * Se déconnecter, and none of them names the navigation. The button is
 * an inline-block that aligns its label with text-align.
 */
nav[aria-label="Navigation principale"] a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

/*
 * The colour is restated with the background, never left to be
 * inherited. This rule and the aria-current one below have identical
 * specificity (0,2,2) and are separated only by declaration order, so
 * setting one of the pair alone means a reorder leaves --accent-fg
 * painted on --surface-alt, which no test composes: the contrast test
 * checks that token against --accent-bg, the surface the cascade says
 * it lands on.
 */
nav[aria-label="Navigation principale"] a:hover {
    background: var(--surface-alt);
    color: var(--nav-ink);
}

/*
 * aria-current is the only marker the markup carries for the current
 * section, and it is what a screen reader reads. Hanging the visible
 * state off the same attribute keeps the two from ever disagreeing.
 */
nav[aria-label="Navigation principale"] a[aria-current="page"] {
    background: var(--accent-bg);
    color: var(--accent-fg);
    font-weight: 600;
    box-shadow: inset 2px 0 0 0 var(--accent);
}

/*
 * DEFENSIVE. **The label is the box that must not shrink**, and saying
 * so is what makes the ellipsis beside it work at all.
 *
 * Flex hands shrinkage to every item in proportion to its base size, so
 * an entry holding this label and an unbounded value gives *both* of
 * them away: the value clips, because it says how, and the label — eight
 * words the application chose — wraps instead, over as many lines as
 * `overflow-wrap: anywhere` will allow — so a two-word label comes out
 * several lines deep inside a one-target entry.
 *
 * Same shape, and the same correction, as the state band past the shell
 * breakpoint: giving one box an ellipsis does not spare the rest.
 */
.nav-label {
    flex: none;
}

/*
 * The signed-in name on the account entry, drawn by the phone alone —
 * the narrow band has no room for it and the mockups move it here. Past
 * that breakpoint the band shows the name itself and the column's
 * mockups draw no detail at all, so the base state is not drawn.
 *
 * The template renders it only when there is a name, so this is a rule
 * about *where* it is shown and never about whether there is one.
 */
.nav-detail {
    display: none;
}

/*
 * A counter is pushed to the far end of its entry. It is inside the
 * anchor, so it is read as part of the link's name — "Utilisateurs 1" —
 * which is what makes the badge mean something to a screen reader
 * instead of being a decoration only sighted users get.
 */
.nav-count {
    margin-left: auto;
    padding: 0 0.375rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
}

/*
 * Two badges rather than one: a flat red for a backlog of failures, the
 * accent tint for something waiting to be done.
 *
 * Both keep their own tints on the current entry, which neither could do
 * while that entry was a solid --accent fill — --danger-text on --accent
 * is 1.63:1 light and 1.53:1 dark. Do not restore that fill without
 * bringing back the exception it needed.
 *
 * The notice pair equals the current entry's own pair in the light
 * scheme, so the badge on /users merges into the entry it sits in. That
 * is the design's, not an oversight; .claude/rules/palette.md says so.
 */
.nav-count--alert,
.nav-count--notice {
    padding: 0.0625rem 0.4375rem;
    font-size: 0.6875rem;
    font-weight: 700;
}

.nav-count--alert {
    background: var(--nav-alert-bg);
    color: var(--nav-alert-text);
}

.nav-count--notice {
    background: var(--nav-notice-bg);
    color: var(--nav-notice-text);
}

/*
 * The account block is set off by a rule and pushed to the foot of the
 * menu, which is what the mockups draw in the column *and* in the phone
 * panel: "where I am in the application" reads down from the top, "what
 * I can do about my own session" sits apart from it at the bottom.
 *
 * **The auto margin is only ever worth anything inside a box that has a
 * height of its own**, and there are two such boxes now — .nav-inner,
 * which sticks under the band past the shell breakpoint, and the panel
 * below it, which takes the grid's free row. In the bar a browser
 * running no script is left with, it is inert and harmless.
 *
 * The rule is not: it draws in the bar too, above the account block,
 * which is one line more than that fallback used to have.
 */
.nav-block--footer {
    margin-top: auto;
    padding-top: 0.875rem;
    border-top: 1px solid var(--line);
}

/*
 * The way out is a form, so it is the one entry that is not an anchor.
 * It is drawn as one all the same: a filled button at the foot of a
 * menu of links reads as the page's primary action, which it is not.
 *
 * **text-align is what places the label**, and a justify-content here
 * would be read by nothing: this button is an inline-block, and the rule
 * above says why it must stay one.
 */
.nav-block--footer button {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
}

.nav-block--footer button:hover {
    background: var(--surface-alt);
}

/* Headings, text, links ---------------------------------------------- */

/*
 * 1.5rem at every width, and there is no larger step past a breakpoint.
 * The mockups draw their desktop screens at 1280px and write 1.5rem
 * there, so a heading that grew to 1.75rem past 48em was larger than the
 * design at the very width the design describes.
 */
h1 {
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: var(--gap);
}

/*
 * A card's title is the same size as its body text and is told apart by
 * its weight, which is what keeps a screen of small panels from reading
 * as a screen of sections.
 */
h2 {
    font-size: 1rem;
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

main p,
main ul,
main ol,
main dl,
main table,
main form,
main section,
main details {
    margin-bottom: var(--gap);
}

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

/*
 * A measure, so that prose stops before the eye has to hunt for the
 * start of the next line.
 *
 * **A rule of its own, never a declaration added to the group above.**
 * That group also names section, table, form and dl — capping those
 * would draw a 70ch card inside a full-width column and would undo the
 * width the tables are given, and no test in this repository would
 * report it.
 *
 * `ch` is the only font-metric-dependent length in this sheet, so the
 * bound is a number of characters and not a width: do not read the
 * value as a fixed number of pixels.
 *
 * The status and alert banners are paragraphs too, and are capped with
 * everything else on purpose: a tinted box a thousand pixels wide
 * holding five words reads as a mistake.
 */
main p {
    max-width: 70ch;
}

/*
 * The indent an ordered list's numbers are drawn in, given back.
 *
 * `ul, ol { padding: 0 }` at the top of the file is written for the
 * lists this interface draws itself — the menu, the panels, the access
 * keys — which take their markers away and lay their items out on their
 * own. An <ol> does neither: its numbers *are* the content, `1.` is
 * drawn outside the item box (`list-style-position: outside`), and with
 * no padding to draw it in it lands in the padding of the card. The
 * restore procedure on /backup is the one such list, and its steps are
 * numbered because the order is the instruction.
 *
 * On main rather than on a class, because every numbered list wants it.
 * The value is chosen for the markers this list draws, not inherited:
 * the user agent's own is 40 px, and the reset took it away on purpose.
 */
main ol {
    padding-left: 1.5rem;
}

section {
    padding: var(--gap);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
}

/* The content language ------------------------------------------------ */

/*
 * The page's own header: the heading, and the actions that belong to the
 * whole screen rather than to a row of it.
 *
 * The heading keeps its margin-bottom from the rule above, which would
 * push the actions out of line — hence the reset. It is written on the
 * child rather than as a `margin: 0` on every h1, because a heading
 * *outside* a page-head still needs its space.
 *
 * **The form is in that reset for a reason that does not look like the
 * heading's.** Where an action is a button rather than a link it is
 * wrapped in its own <form>, and that form is never a child of .page-head
 * but of .page-head-actions inside it. The row is as tall as the *margin*
 * box of the form it holds, so a form keeping its margin-bottom leaves a
 * --gap of nothing between its button and the row's bottom edge — and it
 * is the row that flex-end aligns with the foot of the title, never the
 * button. Nothing is misplaced; the visible thing is.
 *
 * All three selectors are descendant ones and have to be: two screens
 * wrap the heading in a <div> and two put their actions in a <p>, so a
 * child combinator here would silently stop covering them.
 */
.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem var(--gap);
    margin-bottom: var(--gap);
}

.page-head h1,
.page-head p,
.page-head form {
    margin-bottom: 0;
}

/*
 * The line under a page's heading: what the screen is about, in the ink
 * a caption takes. The mockups set it 3 px below the title, which is
 * closer than any gap in this sheet — the two belong to one block and
 * the block's own spacing is what separates it from the next.
 *
 * The reset above covers its bottom margin; this only has to say the
 * top one, since `main p` carries none.
 */
.page-sub {
    margin-top: 3px;
    font-size: 0.875rem;
    color: var(--muted);
}

/*
 * A row of controls, at the head of a page or at the foot of a dialog.
 * One rule, because a reader meets the same box in both places and a
 * second gap value would be a difference saying nothing.
 */
.page-head-actions,
.dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

/*
 * A row of figures at the top of a screen: what is served, which Hugo,
 * how the last hook went. Auto-fit rather than a fixed three columns, so
 * the row reflows on a phone and a screen carrying only two tiles does
 * not leave a gap where the third would be.
 */
.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 0.75rem;
    margin-bottom: var(--gap);
}

/*
 * A tile is a <section>, so it carries the content rules' bottom margin,
 * and a grid item's margin is drawn *inside* its own row: the row grows
 * by a --gap, and the grid's own margin-bottom is then added under it, so
 * the gap between the tiles and the panels comes out at twice --gap. Same
 * reset and same reason as `.split section` below; the grid arranges its
 * children itself and wants no margin of theirs.
 */
.tile {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 0;
    padding: 0.875rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
}

/*
 * A tile spaces its lines with the flex gap above, so nothing inside it
 * keeps the bottom margin the content rules hand it — whatever that
 * child turns out to be.
 *
 * **On every child rather than on the three classes below**, because the
 * two shapes a tile can also end with carry no class at all: the check
 * form on /hugo, and the bare <p> that replaces it where the update
 * checker is disabled. Naming the classes covered the three lines
 * somebody had thought of and left a whole --gap of blank under the one
 * button this screen has.
 */
.tile > * {
    margin-bottom: 0;
}

/*
 * The tile's caption. A <h2> so the screen has a heading structure a
 * screen reader can navigate, sized down rather than replaced by a
 * paragraph — the visual weight is the figure below it, not the word.
 */
.tile-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

/*
 * The figure itself, and the reason a tile is a flex column at all.
 *
 * The size and the tracking are the mockups' own. Note the figure is
 * *not* monospaced: a build number here is drawn proportional and
 * tabular, where the chronology draws the same number in `.ident`. The
 * two are different jobs — a column of figures to compare against a
 * column of identifiers to recognise.
 */
.tile-figure {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 1.625rem;
    letter-spacing: -0.02em;
    font-weight: 650;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

/*
 * A figure that is a state rather than a number wears it, and the two
 * that matter are the ones an operator opens this page to find: a link
 * pointing at a build that no longer exists, and one nobody could read.
 *
 * The colour is never the only carrier — the figure is a French sentence
 * saying the same thing — so this is emphasis. `--ok` is deliberately
 * absent: green on the ordinary case would make the normal state shout,
 * and then the two that matter would not.
 */
.tile-figure--broken,
.tile-figure--unknown,
.tile-figure--danger {
    color: var(--danger-text);
}

/*
 * A word inside a tile's meta line that is bad news — today the Hugo
 * tile's "Erreur de vérification" and "Erreur de mise à jour".
 *
 * On the word rather than on the line, so the instant beside it stays
 * ordinary muted text: what failed is the state, not the time it
 * happened at. Colour is never the only carrier here either — the word
 * says "erreur".
 */
.tile-state--danger {
    color: var(--danger-text);
    font-weight: 600;
}

/*
 * The amber counterpart, on the consumer card's line saying what this
 * application last managed to send. Amber and not the rule above for
 * the reason .tile--warn carries below. The sentence beside it says so
 * in French, so this tints emphasis rather than carrying anything.
 */
.tile-state--warn {
    color: var(--warn-text);
    font-weight: 600;
}

/*
 * A whole sentence that is the tile's verdict, where .tile-state--danger
 * above is one *word* inside a meta line. Two neighbouring names for two
 * boxes: this one is /hugo's "Succès" and "En échec depuis 38
 * tentatives", the mockup's own line, at the body size and 600.
 *
 * It takes no colour. The tile's leading edge below carries the state,
 * and a tinted sentence over a tinted edge says one thing twice.
 */
.tile-verdict {
    font-weight: 600;
}

/*
 * The success half of a tile's leading edge. Its alert counterpart is
 * grouped with .panel--alert below rather than written here, because
 * the two are the same declaration and a shared selector enforces that
 * where a comment claiming it only asserts it.
 *
 * **This one has no .panel counterpart, and that is the asymmetry worth
 * knowing.** A panel wears an edge only when it has bad news; /hugo's
 * update-check card has exactly two outcomes to report, and colouring
 * only the bad one would make the good state read as no state at all.
 * Two of its four states still wear nothing — never checked, and
 * checking switched off — and both would be a lie in colour.
 *
 * Colour is never the carrier: the card says "Succès" or "En échec" in
 * French right under its own heading.
 */
.tile--ok {
    border-left: 3px solid var(--ok-text);
}

/*
 * The amber half, for the downstream consumer's card. Amber and not the
 * alert edge below, which is red: a consumer that is behind is another
 * host's copy of a site being served perfectly well, and red would put
 * it in the same ink as a build that never published. Same asymmetry as
 * .tile--ok above, and the card says "En service" or "Dégradé" in words.
 */
.tile--warn {
    border-left: 3px solid var(--warn-text);
}

/*
 * max-width: none, because these are paragraphs and `main p`'s 70ch
 * measure would draw a fixed-width box under a two-word figure. The
 * rule this used to point at for that reason, .builds-served, is gone:
 * the build list stopped restating the published version.
 */
.tile-meta {
    max-width: none;
    font-size: 0.8125rem;
    color: var(--muted);
}

/*
 * A panel is a card with a titled bar: a list, a table or a timeline
 * under a heading and, usually, a link to the whole of it.
 *
 * The bar is padded and the body separately, rather than the card being
 * padded once, so the rule between them runs the full width — a rule
 * that stops short of the edges reads as a mistake rather than as a
 * separation.
 */
.panel {
    padding: 0;
    overflow: hidden;
}

.panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--line);
}

.panel-head h2 {
    margin-bottom: 0;
}

/*
 * The link out of a panel — "Historique complet", "Tout". Nothing sized
 * it, so it inherited the page's 16px beside a 16px heading and read as
 * a second title rather than as the way out of the card.
 */
.panel-head a {
    font-size: 0.875rem;
}


.panel-body {
    padding: 0.875rem 1rem;
}

/*
 * A panel body ends on its own padding, exactly like a table cell, and
 * for once the *rendered branch* is what decides whether it does: the
 * lists a panel draws (.failures, .timeline, .waiting) take their own
 * margin back, and the <p>, <dl> and <table> its other states end with
 * do not — so the same card had two different floors depending on
 * whether it had anything to show. `:last-child` rather than every
 * child, for the reason `td > :last-child` carries.
 */
.panel-body > :last-child {
    margin-bottom: 0;
}

/*
 * A card that carries the page's bad news wears it on its leading edge.
 * The colour is never the only carrier — the panel says "erreurs" in its
 * own heading, the tile says "En échec" — so this is emphasis rather
 * than information.
 *
 * **One rule for two components on purpose.** --alert-edge is the
 * #97190f the mockups write for both, and it is held to 3:1 by
 * boundaries(); the 3px is the only thing repeated, and a shared
 * selector is what keeps the two from drifting. .tile--ok is separate
 * above because it has no panel counterpart — see the comment there for
 * why the tile is the one component that colours its good state.
 */
.panel--alert,
.tile--alert {
    border-left: 3px solid var(--alert-edge);
}

/*
 * A flush panel has no rule under its heading: it holds a short list
 * rather than a table, and a full-width separator over three lines
 * makes the card read as two cards. The heading keeps its padding, so
 * the body is what closes the gap.
 *
 * The two classes do co-occur — a panel with failures on it wears both.
 * What is deliberate is that this one is applied *unconditionally* while
 * --alert is not: the coloured edge appears only when there is bad news
 * to wear, and a heading rule that came and went with it would make the
 * panel change shape between an installation that is fine and one that
 * is not.
 */
.panel--flush .panel-head {
    padding-bottom: 0;
    border-bottom: 0;
}

.panel--flush .panel-body {
    padding-top: 0.5rem;
}

/*
 * The card holding the one destructive action a screen offers. The edge
 * and the heading are the whole treatment: the fill stays --surface,
 * because a tinted card would read as an alarm about a state rather than
 * a warning about a control.
 *
 * Colour is not the carrier — the heading says "Zone sensible" — so this
 * is emphasis, exactly like --alert beside it.
 */
.panel--danger {
    border-color: var(--danger-line);
}

.panel--danger h2 {
    color: var(--danger-text);
}

/*
 * A note at the foot of a card: the sentence that stops a reader looking
 * for a control the screen deliberately does not offer.
 *
 * The rule above it is what separates it from the facts it qualifies,
 * and it is drawn in --line rather than --border for that group's
 * reason: it carries no information the words do not.
 */
.panel-note {
    max-width: none;
    padding-top: 0.5rem;
    border-top: 1px solid var(--line);
    font-size: 0.8125rem;
    color: var(--muted);
}

/*
 * DEFENSIVE. A panel whose body is a table gives that body its padding
 * back below the table breakpoint, and the two halves of this modifier
 * therefore live in different blocks — see the 48em query for the
 * padding and the phone query for the row's own margin. What sits here
 * is inert below 48em and load-bearing above it: past that width the
 * table carries its own border and its own radius, which is what makes
 * it a card on the three list screens, and a card drawn inside a card is
 * a doubled edge. Below 48em the border is on the <tr> instead, so this
 * rule matches a box that has none.
 *
 * Measured at 390 px on the shape this closes: 2 px of --line down the
 * left edge of the sessions card against 1 px on the account card beside
 * it, and 12 px of orphaned margin under the last row.
 */
.panel--table table {
    border: 0;
    border-radius: 0;
}

/*
 * The failures themselves: what broke on the left, how often on the
 * right, and the context under it. No bullets — the count is the
 * marker, and it is the column an operator scans.
 */
.failures {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-bottom: 0;
    list-style: none;
}

.failures li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.9375rem;
}

/*
 * The strong half of a row, wherever the interface draws one: what
 * broke, who is waiting, an access key, an open session. Same treatment
 * because they are one — a reader scans this line and drops to the muted
 * one below only once they have found what they came for, which is why
 * `.failure-context` and `.waiting-context` share a rule too.
 *
 * **Add the selector here rather than writing the pair again.** The
 * account pass of 2026-08-22 declared `.entry` separately with these
 * three declarations verbatim, 330 lines down, having correctly folded
 * its muted half into the group below.
 *
 * `min-width: 0` is the one that is not a value: it lets the box give
 * way, a flex item's automatic minimum otherwise being its min-content.
 * On the card rows it is belt and braces beside the wrap inherited from
 * `main`, which is what actually does the containing there.
 */
.failure-what,
.waiting-who,
.entry {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/*
 * The muted second line of a row, wherever the interface draws one: what
 * a failure was and when, the address of an account waiting for its
 * link, the address under a name in the users list. One rule, because
 * they are one treatment — a reader scanning the column reads the strong
 * line and drops to this one only when they have found what they came
 * for. **Add the selector here rather than writing the pair again**; it
 * was written a third time on 2026-08-21 and folded back in the same
 * pass.
 *
 * `.webhook-endpoint` is the one exception, and it is written down here
 * so the directive above does not send the next reader to add it: that
 * line carries `.literal` beside it in the markup, which already sets
 * this size, so it takes the ink alone. A selector here would declare
 * 0.8125rem twice with nothing saying which one is operative.
 */
.failure-context,
.waiting-context,
.entry-meta,
.user-email {
    font-size: 0.8125rem;
    color: var(--muted);
}

/*
 * A tally beside a heading: how many failures a group holds, how many
 * sessions or keys a card lists. One rule rather than two, on the
 * precedent of the muted second line above — the treatment is one and
 * only the box it sits in differs.
 */
.failure-count,
.panel-count {
    flex: none;
    font-size: 0.8125rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/*
 * The log panel is a terminal, and it is drawn as one in both schemes:
 * the output it holds was written by a program that assumed a dark
 * console, and reading it on white is the one place this interface's own
 * light scheme is the wrong choice.
 *
 * Its own tokens rather than a tint of --surface, so the text inside it
 * is checked against the bar's colours — the same pair the header uses,
 * already in contrast_test.go.
 *
 * **The whole block is the console since the conformance pass**, where
 * it was a white heading band over a dark body: the mockups draw one
 * card holding a small uppercase legend and the output under it, and two
 * fills stacked read as two cards around one thing to read. So the card
 * takes --chrome and the heading gives up its own fill and its rule.
 */
.panel--log {
    background: var(--chrome);
    border-color: var(--chrome);
}

.panel--log .panel-head {
    border-bottom: 0;
}

/*
 * The legend, in the bar's own muted ink — the mockups' #a9abb8 is
 * --chrome-muted to the byte. It is a caption inside a console rather
 * than a card's title, which is what the size, the capitals and the
 * tracking say; the words themselves still name the panel, so nothing
 * about the heading order changes.
 */
.panel--log .panel-head h2 {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--chrome-muted);
}

/*
 * The body gives up its padding so the <pre> can fill the card, and the
 * <pre> carries its own. **That is why the modifier is conditional in
 * the markup**: a build that printed nothing renders a sentence here
 * instead, and a sentence in an unpadded body touches all four edges of
 * the card. Without the log there is no log panel — only an ordinary
 * one.
 */
.panel--log .panel-body {
    padding: 0;
}

.panel--log .build-log {
    margin: 0;
    border-radius: 0;
    background: var(--chrome);
    color: var(--log-text);
}

/*
 * A breadcrumb: where this page hangs off. One level only, so it is a
 * sentence rather than a landmark — a <nav> here would be the third
 * navigation region on the page, and axe reports unnamed duplicates.
 */
/*
 * The breadcrumb above a build's heading. It carried a tighter
 * `margin-bottom: 0.5rem` than the rest of the column until the column
 * became a flex one: its only use site is a direct child of `main`, so
 * `body.has-shell > main > *` takes that margin back at (0,1,2) and the
 * gap draws 14px there like everywhere else. The declaration is gone
 * rather than kept as a value nothing reads — put it back only with a
 * selector that can win.
 */
.crumb {
    font-size: 0.875rem;
    color: var(--muted);
}

/*
 * A two-column content area: the wide half is the history, the narrow
 * half the things waiting for someone. It collapses to one column below
 * the table breakpoint, where two columns of anything are unreadable.
 */
.split {
    display: grid;
    gap: 0.75rem;
    margin-bottom: var(--gap);
}

/*
 * The narrow half stacks its own panels, and it has to say so: without
 * this the panels inside it are spaced by `main section`'s 1rem bottom
 * margin while the grid around them uses the 0.75rem above, so the two
 * columns disagree and the short one ends on a dangling margin.
 */
.split-side {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/*
 * The same column of cards, without the reordering.
 *
 * `.split-side` carries `order: -1` below the table breakpoint, which is
 * right on the Dashboard — the errors panel comes first on a phone — and
 * wrong wherever the two columns are simply a wide half and a narrow one.
 * On a user's page it would put the card holding the delete action above
 * the account's own facts. So the arrangement and the reordering are two
 * decisions, and a screen that wants only the first says so.
 */
.split-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.split section {
    margin-bottom: 0;
}

/*
 * DEFENSIVE, and it is the stack standing on its own that makes it
 * necessary. Every other .split-stack is a column of a .split, where
 * `.split section` above zeroes the cards' margins; /account's is the
 * page itself, so that rule never reaches it — and neither does
 * `body.has-shell > main > *`, the (0,1,2) reset written for exactly
 * this, since the cards are grandchildren of main there. Measured in
 * Chromium without it: 32 px between two cards where the mockup draws
 * 14, and 16 px of orphan margin under the last one, which is the
 * margin-versus-gap defect the 2026-08-18 pass removed everywhere else.
 *
 * The gap is the content column's own 0.875rem and not `var(--gap)`,
 * which is 1 rem: a stack that *is* the page keeps the page's rhythm,
 * and the two values differ by exactly the 2 px this whole rhythm was
 * changed for. Measured with the wrong one: 16 px between cards.
 *
 * The measure is the mockup's own, and it is the only max-width on any
 * <main> in that document — appended after `overflow`, i.e. deliberately
 * added to the shared recipe rather than a different one. **Nothing in
 * this repository can see it.** It first binds at a 1295 px window
 * (measured: the stack is 977 px inside a 1280 px one, against a 992 px
 * cap), and the suite reads 390, 820, 1050 and 1280 — so it is neither
 * asserted nor falsifiable here, and that is why this paragraph exists
 * rather than a test.
 */
body.has-shell > main > .split-stack {
    gap: 0.875rem;
    max-width: 62rem;
}

body.has-shell > main > .split-stack > * {
    margin-bottom: 0;
}

/*
 * The accounts waiting for someone to act. A list like the failures
 * beside it rather than a bulleted one — with the global `ul { padding:
 * 0 }` reset the markers would hang outside the item and into the
 * panel's own padding.
 *
 * **The acceptance suite does render this panel**, contrary to what
 * this comment claimed until 2026-08-19:
 * `TestResendActivationClearsPendingState` builds an account waiting for
 * a link and lands here twice in a real browser, which is where
 * `assertTheWaitingRowIsLaidOut` measures the row. Do not re-derive the
 * old claim from the shell's fixture, whose administrator is activated.
 */
.waiting {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-bottom: 0;
    list-style: none;
}

/*
 * One account: who on the left, the action on the right, exactly as the
 * failures beside it put the count on the right.
 *
 * There was no rule at all here, so the name, the address and the form
 * ran as three inline boxes and the button — a block, being a form's
 * child — dropped onto a line of its own, 231px wide under a 92px name.
 */
.waiting li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.9375rem;
}

/*
 * DEFENSIVE, and it had been shipping without this since the row was
 * given its layout. The action is wrapped in a <form>, `main form`
 * margins every form, and `li form { display: inline }` does not save it
 * here — a flex item's `display: inline` is blockified, so the inline
 * box that would have swallowed the vertical margin never exists.
 *
 * Measured on the Dashboard at 1280 px without it — the width
 * assertTheWaitingRowIsLaidOut actually reads, that helper resizing
 * nothing: the row 49 px tall against a tallest child of 42, i.e. the
 * button drawn 7 px above the row's own centre under
 * `align-items: center`. Nothing said so — the helper read the height
 * into a field and asserted nothing about it until 2026-08-22.
 *
 * Same class, same repair and the same reason as `.row-actions > *` and
 * the access-key rows.
 */
.waiting li > * {
    margin-bottom: 0;
}

/*
 * The registered access keys and the open sessions, on Mon compte, and
 * the same keys on a user's detail page. This is the rule .waiting was
 * written without: same card, same reset, same markers hanging into the
 * padding.
 *
 * **One grouped selector rather than two identical blocks**, on the
 * .panel--alert / .tile--alert precedent — the two lists answer the same
 * question, what can reach this account, and a coupling a comment merely
 * asserts is one a later pass breaks in silence.
 *
 * **Removing the marker is what costs a list its role in WebKit**, which
 * .claude/rules/tables.md records for the whole sheet rather than for
 * this rule: the lists here are drawn without markers, and the one
 * place that carries role="list" is the filter groups, where a name
 * hangs off the role and would name nothing without it.
 *
 * Count them with `grep -n 'list-style: none'` rather than from any
 * prose: this sheet said six against seven for as long as `.journal`
 * went unlisted, and the account pass of 2026-08-22 incremented the
 * wrong number before checking it.
 */
.passkeys,
.sessions {
    list-style: none;
}

/*
 * One row of either list: what it is over when it happened, and the
 * action at the end. The detail page renders no action, so its row is
 * the first box alone — one rule, both screens, which is what the scope
 * this rule used to carry (`.split-stack .passkeys li`) was standing in
 * for while /account drew its keys as bare spans.
 *
 * **align-items is flex-start and that is load-bearing.** Centred, the
 * action sits at the vertical middle of the row — and the row's height
 * is chosen by the value on its first line, which for a session is the
 * client string the caller sent. Measured in Chromium before the bound
 * on that value existed: a 4 000-character agent put the button that
 * ends the session at y=3229 at a 390 px width. Whoever signed in would
 * have been choosing where the control that evicts them is drawn.
 */
.passkeys li,
.sessions li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid var(--line);
}

.passkeys li:last-child,
.sessions li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

/*
 * DEFENSIVE. The row arranges its own children with a gap, so none of
 * them may carry a margin — and one of them does, invisibly: the action
 * is wrapped in a <form>, `main form` margins every form, and the
 * `li form { display: inline }` rule further down does not save it,
 * a flex item's `display: inline` being blockified. Measured in
 * Chromium without this: every icon 8 px above its row's optical centre
 * and every row 16 px taller than the 44 px target asks, at 1280 and at
 * 390, with an empty label and with a 128-character one.
 *
 * .claude/rules/styling.md inventories the class and every site of it.
 */
.passkeys li > *,
.sessions li > * {
    margin-bottom: 0;
}

.entry-name {
    font-size: 0.9375rem;
    font-weight: 600;
}

/*
 * A machine value that is a card's own fact rather than one quoted
 * beside prose. `.literal` takes the size down to 0.8125rem, which is
 * right where it sits next to a sentence and wrong here — it would
 * render the address smaller than the three values beside it in the same
 * grid. The family is what was wanted; the size comes back.
 */
.pairs .literal,
.facts .literal {
    font-size: inherit;
}

/*
 * The entry screen's grid of facts, and the stored payload's own grid
 * under it. One column at the base, two once a table is a table again,
 * four past the column breakpoint, which is where the mockup draws it.
 *
 * Every pair is wrapped in a div, as `.pairs` already wraps its own:
 * without that wrapper a dt and its dd are two independent grid items
 * and no class can make one pair span two tracks.
 *
 * The first two declarations restate the bare `dl` rule on purpose, and
 * are not redundancy to tidy away: `.split--detail dl` weighs one more
 * than a bare class and is what `.pairs` had to be re-scoped to win back
 * — see .claude/rules/components.md. A `.facts` carrying its own track is
 * the insurance against the day this grid is drawn inside that modifier.
 */
/*
 * The margin is the card's own inner rhythm and not `main dl`'s, which is
 * a column-of-prose value and too loose between a grid of pairs and the
 * block under it. Where the grid *is* the body's last child,
 * `.panel-body > :last-child` cancels it at a higher weight, so the card
 * still ends on its own padding.
 */
.facts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem 1.5rem;
    margin-bottom: 0.75rem;
}

.facts dt {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.facts dd {
    margin: 0;
}

/*
 * The payload's keys are the record's own spelling rather than words
 * this interface chose, so they are drawn as machine values.
 */
.facts--keys dt {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8125rem;
    text-transform: none;
    letter-spacing: 0;
}

/*
 * A stored value no cell can hold: the hook's captured streams, a
 * recipient list, a nested document.
 *
 * A bare div, which the content rules margin in neither direction, so it
 * carries its own spacing and its own rule -- that rule being what
 * separates it from the grid of pairs above.
 */
.long-value {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
}

.long-value-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.375rem;
}

.long-value-key {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8125rem;
    color: var(--muted);
}

.long-value-size {
    font-size: 0.8125rem;
    color: var(--muted);
}

/*
 * The mockup draws the block as a console, and it is bounded on purpose:
 * this screen unfolds a payload the list kept behind a disclosure, so a
 * value at the query's cap would paint tens of thousands of characters
 * at once. A bounded box that overflows is a scrollable region, which is
 * why the markup gives it a tabindex and a name -- without those, axe
 * reports it and a keyboard user cannot read past the fold.
 *
 * The pair of tokens is `.panel--log`'s, already validated together.
 */
.long-value pre {
    margin: 0;
    max-height: 24rem;
    overflow: auto;
    background: var(--chrome);
    color: var(--log-text);
}

/*
 * An account's own history: the date in a fixed track, what happened
 * beside it. A grid rather than a flex row, so every date starts at the
 * same x whatever its width — which is the whole reason the mockup gives
 * that column a measure.
 */
.journal {
    display: grid;
    grid-template-columns: 4.5rem 1fr;
    gap: 0.625rem 0.625rem;
    margin-bottom: 0;
    list-style: none;
    font-size: 0.875rem;
}

.journal li {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
}

.journal-when {
    color: var(--muted);
}

/*
 * What happened, and who did it under it when that is not the account
 * itself. A column rather than an inline run: the actor is an address,
 * which is long, and wrapping it beside the summary would leave the two
 * indistinguishable.
 */
.journal-what {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/*
 * The summary and, when the action failed, the word saying so. A wrapping
 * row on the baseline, like the chronology's own title: the badge belongs
 * beside the sentence rather than under it, and a long summary must be
 * able to take the line back.
 */
.journal-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.375rem;
}

/*
 * Status badges. The same four vocabularies as the table state hooks,
 * and deliberately the same tokens: a build that is "Échoué" in a badge
 * and pink in a row must be the one colour, or the two readings drift.
 */
.badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-badge);
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    background: var(--surface-alt);
    color: var(--muted);
}

.badge--ok {
    background: var(--ok-bg);
    color: var(--ok-text);
}

.badge--warn {
    background: var(--warn-bg);
    color: var(--warn-text);
}

.badge--danger {
    background: var(--danger-bg);
    color: var(--danger-text);
}

/*
 * Filter chips: what is in force on a list, as links that withdraw one
 * value each in a click.
 *
 * **The three lists draw this row and none of them applies a filter with
 * it any more.** `/activity`, `/builds` and — since 2026-08-24 —
 * `/users` all filter through the card above it, so every chip here is a
 * removal. The paragraphs below were written while the build history
 * carried two categories of *toggle* chips instead; what survives of
 * that arrangement is the box and its wrapping, not the two categories.
 *
 * Historical note, kept because the rules underneath still assume it:
 * two categories of chips used to carry every filter the page had,
 * cumulatively, and each
 * of them is a URL rather than a submission — which is what makes a
 * selection bookmarkable and what removes the need for a script.
 */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: var(--gap);
}

/*
 * The list of chips. It was one named list *per category* while the
 * build history drew toggle chips, which is why this box lays its own
 * chips out rather than leaving it to `.chips`: two lists would
 * otherwise stack. Every screen draws a single flattened row now — one
 * chip per value in force — so the arrangement is inherited rather than
 * required, and it is kept because a second group is one screen away
 * whenever a list is asked to say what it is *not* showing.
 *
 * Wrapping on both boxes is what keeps a category together on a narrow
 * screen: the groups wrap against each other first, and the chips inside
 * one only wrap once that group is alone on its line.
 *
 * DEFENSIVE: `margin-bottom: 0` is the twelfth site of the class this
 * file's own header points at. `main ul` margins every list in the
 * content column, and the cancellation that takes it back names
 * `body.has-shell > main > *` — which reaches the box around these two
 * and not the two themselves, now that the row is a wrapper. Measured
 * without it: 16px of dead space inside a 32px row, and 30px between the
 * chips and the table where the column draws 14.
 */
.chips-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0;
    padding: 0;
    list-style: none;
}

/*
 * The caption the journal's row of active filters opens with. It is the
 * <ul>'s own accessible name through aria-labelledby, so it is one name
 * rather than a visible word and an aria-label free to disagree with it.
 */
.chips-label {
    align-self: center;
    color: var(--muted);
    font-size: 0.8125rem;
}

.chips a {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-height: 2rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.875rem;
    color: var(--text);
    background: var(--surface);
}

/*
 * The selection in force. The mockups tint it and leave the label in the
 * accent's own ink; a solid accent fill with a white label reads as a
 * button standing in a row of links, which is the one thing a chip must
 * not look like.
 *
 * **--accent-line rather than --accent-border**, and the two are not
 * interchangeable: the second is a primary button's rim, dark enough to
 * be found against the page, and around a tint this pale it draws a
 * outline the mockups do not have.
 *
 * The quiet chips keep --border, which boundaries() holds to 3:1. That
 * is a divergence from the mockups' own #dcdde3 (1.35:1 on white) and it
 * is deliberate — .claude/rules/palette.md records the arbitration.
 */
.chips a[aria-current="true"] {
    background: var(--accent-bg);
    border-color: var(--accent-line);
    color: var(--accent-fg);
    font-weight: 600;
}

/*
 * There is no rule between two chip groups any more, and the deletion is
 * worth a line rather than silence. `.chips-group + .chips-group` drew a
 * 1px border between the build history's two categories — what a build
 * is, and what asked for it — and that page was the only one in the tree
 * ever to render two adjacent groups. Its filter card replaced them with
 * checkbox pills on 2026-08-24, and `/users` took the same card the same
 * day — so all three lists draw a single flattened row and the selector
 * matched nothing anywhere: a declaration describing nothing is worse
 * than an absent one, since the next reader measures against it.
 */

/*
 * The cross a chip in force carries. It is inside the link and is not a
 * control of its own — one thing to click per chip — so it takes the
 * label's own ink through currentColor and needs no colour here.
 *
 * **The size is a cancellation.** icons.templ writes width and height of
 * 16 as presentation attributes, which is the size a row of actions
 * wants; without this rule the glyph arrives at that size beside a
 * 14px label.
 */
.chips svg {
    width: 0.75rem;
    height: 0.75rem;
}

/*
 * The timeline. Four tracks per entry — when, a marker, what happened,
 * how long it took — so the markers and the durations line up down the
 * page whatever the text beside them does. That alignment is the only
 * reason this is a grid rather than a list, and the duration used to be
 * an inline span inside "what", where it could not line up with
 * anything.
 *
 * The connecting line is drawn on the marker column rather than as a
 * pseudo-element on the row, so the last entry can drop it without a
 * :last-child rule that a filtered list would get wrong.
 *
 * **minmax(5rem, auto) and not a flat 5rem.** The mockups give 80px and
 * every value this application writes fits in it, now that the dates are
 * relative — but without this, a stored timestamp `stored()` could not
 * parse renders verbatim and breaks over three lines in a fixed track.
 * The minimum is the design's; the maximum is for the row a restored
 * database can still produce.
 *
 * **The row gap stays 0**, where the mockups write `gap: 12px` — theirs
 * is both axes, and `.timeline li` already carries its own
 * `padding-bottom`. Without this the two are added and the rail between
 * markers doubles, above the phone breakpoint only, so the two layouts
 * stop sharing a rhythm.
 */
.timeline {
    display: grid;
    grid-template-columns: minmax(5rem, auto) 20px 1fr auto;
    gap: 0 0.75rem;
    margin-bottom: 0;
    padding: 0;
    list-style: none;
}

.timeline li {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    padding-bottom: 0.875rem;
}

.timeline li:last-child {
    padding-bottom: 0;
}

/*
 * The date and the duration: the same treatment in two different
 * tracks, the first and the last.
 *
 * **They are two classes and that is load-bearing, not tidiness.** The
 * markup carried `.timeline-when` on both, so the phone rule that drops
 * the date column would have taken every elapsed time with it —
 * including the running build's, which is the number an operator on a
 * phone is watching. Measured, both computed `display: none` and the
 * grid degraded cleanly, so there was nothing to see.
 */
.timeline-when,
.timeline-duration {
    font-size: 0.8125rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.timeline-when {
    text-align: right;
}

/*
 * The marker, and the line under it. aria-hidden in the markup: the
 * state it stands for is written in the entry beside it, and a screen
 * reader announcing "puce" between every two rows is noise.
 */
.timeline-mark {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 0.375rem;
}

/*
 * The halo is the tint's own background colour, laid as a ring rather
 * than as a border so it costs no layout: the dot stays 10px and the
 * markers stay on one axis down the column. It bleeds 3px into the
 * 0.75rem grid gap either side, which is why the gap is not narrower.
 *
 * It carries nothing a reader needs — the state is written beside it —
 * so no contrast pair applies to it, for the same reason --line has
 * none.
 */
.timeline-mark::before {
    content: "";
    flex: none;
    width: 0.6875rem;
    height: 0.6875rem;
    border-radius: 50%;
    background: var(--muted);
    box-shadow: 0 0 0 3px var(--surface-alt);
}

.timeline-mark::after {
    content: "";
    flex: 1;
    width: 2px;
    margin-top: 0.25rem;
    background: var(--line);
}

.timeline li:last-child .timeline-mark::after {
    background: transparent;
}

.timeline-mark--ok::before {
    background: var(--ok-text);
    box-shadow: 0 0 0 3px var(--mark-ok-halo);
}

/*
 * The running marker is the one that needed a token of its own. The
 * other three take --ok-text and --danger-text, which *are* the
 * mockups' values here; --warn-text is not — it is #684508, a brown
 * dark enough to be read as body text, where the mockups draw amber.
 */
.timeline-mark--warn::before {
    background: var(--mark-run);
    box-shadow: 0 0 0 3px var(--mark-run-halo);
}

.timeline-mark--danger::before {
    background: var(--danger-text);
    box-shadow: 0 0 0 3px var(--mark-danger-halo);
}

/*
 * The third track: the event on one line and its cause on the next.
 *
 * A block rather than the flex row it used to be, because the duration
 * has moved out to a track of its own and what is left is two stacked
 * lines. `min-width: 0` so a long trigger name shrinks this rather than
 * the whole grid.
 */
.timeline-what {
    min-width: 0;
    font-size: 0.9375rem;
}

/* The event itself. The badge beside it wants a baseline, hence flex. */
.timeline-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    font-weight: 600;
}

/*
 * The cause, and the row's link.
 *
 * **The two declarations below are what hold `main p` off**, and without
 * them every row grows by that paragraph's bottom margin and is capped
 * at the page's 70ch measure inside a column far narrower than one.
 *
 * On the class rather than on `.timeline-what p`: both win against
 * `main p`, and naming the element the markup names keeps one selector
 * for the rule and the tests instead of a class nothing reads.
 */
.timeline-detail {
    max-width: none;
    margin-bottom: 0;
    font-size: 0.8125rem;
    color: var(--muted);
}

/*
 * The build detail's course, which is the chronology minus its date
 * column. Additive, like `.split--detail`: `.timeline` is what makes this
 * a grid at all, what draws the marks and their halos, and what the phone
 * block is written against. Three declarations differ and each is the
 * mockup's own value.
 *
 * The step rows are spaced by `.timeline li`'s padding, so the pitch goes
 * to 10 px here where the chronology draws 14.
 *
 * **The rail is drawn away rather than left off**, because it belongs to
 * `.timeline-mark` and there is nowhere else to say so. The mockups of
 * this screen connect nothing: the steps are one card's worth of rows,
 * where the chronology is a sequence of separate events.
 */
.timeline--steps {
    grid-template-columns: 20px 1fr auto;
}

.timeline--steps li {
    padding-bottom: 0.625rem;
}

.timeline--steps .timeline-mark::after {
    background: transparent;
}

/*
 * A step that was never reached, in the mockups' quiet ink. The words are
 * what say so — "non exécutée" — and this only stops them reading as
 * something that happened.
 */
.timeline--steps .timeline-title--pending {
    color: var(--muted);
}

/*
 * A monospaced identifier — a build number, a commit, a token fragment.
 * It is <span> rather than <code> deliberately: <code> carries the
 * inherited wrap rule this file sets on it, and a build number has
 * nothing to wrap.
 */
.ident {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-weight: 600;
}

/*
 * A column of figures reads straight only if the digits are one width —
 * a date, a duration, a count. The class was a table cell's until a card
 * needed the same treatment for the same reason, so the rule is on the
 * class and `td.num` past the table breakpoint adds only the muted ink
 * a cell wants and a card's value does not.
 */
.num {
    font-variant-numeric: tabular-nums;
}

/*
 * A value the interface quotes rather than writes: the Gitlab event kind
 * a webhook answers to, the fragment of the receiving path drawn under
 * its name. Same family as .ident and deliberately not the same rule —
 * .ident is the *strong* form, for a value that is the subject of the
 * line it sits on (a build number in a heading). These are neither the
 * subject nor emphasis; they are literals beside prose, so they keep the
 * text's own weight and drop to the quiet size.
 *
 * <span>/<div> rather than <code> for .ident's reason: <code> carries
 * this file's inherited wrap rule, and none of these has anything to
 * wrap.
 */
.literal {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8125rem;
}

code {
    overflow-wrap: anywhere;
}

/* Messages ----------------------------------------------------------- */

/*
 * A standing statement about the screen, as opposed to the answer to an
 * action. The two look alike and are not the same thing: the banners
 * below hang off a live-region role, which is what has them announced,
 * and a permanent property of the page announced on every load is noise.
 * So this one is a class, and the markup gives it no role at all.
 *
 * **max-width: none is load-bearing** and would arrive silently
 * otherwise: this is a <p>, so `main p { max-width: 70ch }` caps it at
 * about 584 px over a 992 px column — measured — where the mockups draw
 * the band across the whole content width. The cap is deliberate for the
 * banners, which are prose; this is a strip.
 */
.notice {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    max-width: none;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    font-size: 0.875rem;
}

/* The dot the mockups put in front of the sentence. */
.notice::before {
    content: "";
    flex: none;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: currentcolor;
}

.notice--warn {
    background: var(--warn-bg);
    border-color: var(--warn-line);
    color: var(--warn-text);
}

.notice--ok {
    background: var(--ok-bg);
    border-color: var(--ok-text);
    color: var(--ok-text);
}

/*
 * A notice that is two sentences rather than one strip: the state, then
 * what happens anyway. The dot has to go back to the top, `center`
 * putting it half way down a paragraph.
 */
.notice--block {
    align-items: flex-start;
}

.notice--block::before {
    margin-top: 0.4375rem;
}

.notice--block strong {
    display: block;
    font-weight: 650;
}

/*
 * Text that is read and not seen.
 *
 * It exists because the alternative keeps being an aria-label on a
 * <span> carrying neither text nor role, which ARIA 1.2 prohibits and
 * axe reports — and where an engine ignores it, a coloured dot is left
 * as the only carrier of the information, which is 1.4.1. Moving the
 * words off screen keeps them in the accessibility tree and composes
 * them into the name of whatever link they sit in.
 *
 * By position and never by display: the same reasoning as the skip
 * link, one step milder — nothing here takes focus, but a display of
 * none would take the words out of the tree along with the picture,
 * which is the whole point of writing them.
 *
 * The menu button's own label is the same treatment and keeps its name,
 * which nav.js and the responsive suite both select on.
 */
.clipped,
.nav-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/*
 * There is no banner class in the markup: role is the hook, and it is
 * the right one, since it is also what decides whether the message is
 * announced. :not([hidden]) is what keeps the empty passkey slots from
 * being painted — see the guard at the top.
 */
[role="status"],
[role="alert"]:not([hidden]) {
    padding: 0.5rem 0.75rem;
    border-left: 4px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-alt);
}

[role="alert"]:not([hidden]) {
    border-left-color: var(--danger-text);
    background: var(--danger-bg);
    color: var(--danger-text);
}

/*
 * A page-level confirmation is a success; a role="status" deeper in the
 * tree is not. The settings page uses it for the value currently in
 * force, which is information rather than good news.
 */
main > [role="status"] {
    border-left-color: var(--ok-text);
    background: var(--ok-bg);
    color: var(--ok-text);
}

/* Forms -------------------------------------------------------------- */

label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    max-width: 28rem;
    min-height: var(--tap);
    padding: 0.5rem;
    font: inherit;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

input[type="checkbox"] {
    width: auto;
    min-height: 0;
    margin-right: 0.5rem;
}

/* The toggle nests its checkbox inside the label, meant to read inline. */
label:has(> input[type="checkbox"]) {
    display: flex;
    align-items: center;
}

input + label,
select + label,
p + label,
div + label {
    margin-top: var(--gap);
}

/*
 * aria-invalid is spread into a control only while a message is on
 * screen (internal/views/aria.go), and its empty branch is load-bearing,
 * so this cannot mark a clean field.
 */
[aria-invalid="true"] {
    border-color: var(--danger-text);
    border-width: 2px;
}

/*
 * `font: inherit` first, because the shorthand resets the size and the
 * weight — the two declarations after it are the mockups' own and have
 * to come second. 550 is not bold: WCAG 1.4.3's concession for large
 * text still does not apply here, which is what the palette's ruling on
 * --accent-text depends on.
 *
 * The edge is the accent one shade down, and it is what gives a filled
 * button a shape of its own on a tinted row. It was `transparent`, which
 * kept the 1px of geometry and drew nothing in it.
 *
 * min-height stays --tap where the mockups draw 2.25rem: a 44px target
 * is this project's choice and the design conformance audit of
 * 2026-08-17 records it as such, deliberate rather than conformant.
 */
button {
    min-height: var(--tap);
    padding: 0.5rem 1rem;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--accent-text);
    background: var(--accent);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius);
    cursor: pointer;
}

button:disabled {
    background: var(--surface-alt);
    color: var(--muted);
    border-color: var(--border);
    cursor: default;
}

/*
 * A secondary action. Two filled accent buttons side by side say the
 * page has two primary actions, which no screen here does — rebuilding
 * the site is the act, checking a version number is not.
 *
 * It keeps --border rather than taking a tint of its own: that token is
 * already checked against every surface it can land on, where a new one
 * would need its own row in the contrast test to mean anything.
 *
 * **The weight is back to normal, and the asymmetry is the mockups'
 * own**: every primary button in them carries 550 and no secondary one
 * carries a weight at all. It is the second thing telling the two
 * apart, after the fill.
 */
.button--quiet {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
    font-weight: 400;
}

.button--quiet:hover {
    background: var(--surface-alt);
}

/*
 * A link drawn as the page's action. It stays an <a> in the markup —
 * "Inviter un utilisateur" goes to a form, it does not submit one — and
 * a <button> there would announce an action to a screen reader and then
 * navigate instead.
 *
 * It is drawn as a button, so it carries the button's own typography and
 * edge: a link that looks like one and is a size apart reads as two
 * kinds of action rather than one.
 */
.button-link {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--accent-text);
    background: var(--accent);
    border: 1px solid var(--accent-border);
}

.button-link:hover {
    color: var(--accent-text);
}

/*
 * The same link drawn as a secondary action: the journal's "Tout
 * réinitialiser", which sits beside a submit and must not read as a
 * second primary.
 *
 * **Two classes rather than one, and that is the arithmetic rather than
 * taste.** `.button--quiet` weighs (0,1,0) exactly as `.button-link`
 * does and is declared above it, so `class="button-link button--quiet"`
 * loses every property the two share — the fill included. This weighs
 * (0,2,0) and therefore wins wherever it is written, which is the same
 * hazard `.button--small` right below answers by declaration order.
 */
.button-link.button--quiet {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
    font-weight: 400;
}

.button-link.button--quiet:hover {
    color: var(--text);
    background: var(--surface-alt);
}

/*
 * A control inside a narrow card, where the page's own 44px target
 * would be most of the row. The mockups draw the resend action this
 * size, and only that one.
 *
 * **Declared here and not beside .button--quiet, which is where it
 * belongs by subject.** `.button-link` above weighs the same (0,1,0) and
 * sets all three of these properties, so a `.button-link button--small`
 * declared before it would render at 44px with this rule doing nothing
 * and saying nothing. `.button--quiet` sets none of the three, so the
 * two compose cleanly wherever they are written.
 *
 * **The min-height is a cancellation, not a floor**, which is the
 * `.nav-toggle` shape this file records twice already: 21px of line box
 * plus 10 of padding plus 2 of border is 33px, so the declared 2rem is
 * never the operative constraint — and deleting it hands the box back to
 * `button`'s `var(--tap)`. Measure the box, never the declaration.
 *
 * It is not the first control under 44px: `.chips a` is 2rem, and the
 * menu's own entries drop to 2.25rem past the column breakpoint.
 */
.button--small {
    min-height: 2rem;
    padding: 0.3125rem 0.75rem;
    font-size: 0.875rem;
}

/*
 * A destructive control, and **the ink is what carries the meaning**.
 * The mockups rim it in #dba79e, which this palette refuses for the
 * reason it refuses their chip edge: a control is found by its edge, so
 * that edge is held to 3:1 by boundaries(), and #dba79e does not reach
 * it. The rim stays --border and the label takes --danger-text.
 *
 * Declared after `.button-link` for `.button--small`'s reason above:
 * both weigh (0,1,0) and that rule sets the same three properties, so
 * only the order decides. It is worn with `.button--quiet`, which sets
 * none of them.
 */
.button--danger {
    color: var(--danger-text);
    background: var(--surface);
    border-color: var(--border);
}

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

/*
 * The status column's badges, and the actions at the far end of the same
 * row. Two strips, one shape, and the shape is structural rather than
 * decorative in both cases.
 *
 * **Below 48em a cell is a two-track grid whose first item is the column
 * name drawn by ::before**, so a cell holding two children auto-places
 * the second in the next row, *in the label column*, under the word the
 * column is named by. Measured on the actions when the strip was taken
 * away: 56 px of displacement. Until the conformance pass of 2026-08-19
 * neither cell ever held two — the four row states were exclusive, and a
 * build wore one badge.
 *
 * Both arrange with a gap, so their children may carry no margin: the
 * contract every arranging box in this sheet has to state for itself,
 * `main form { margin-bottom: var(--gap) }` reaching a form nested one
 * level deeper than `td > :last-child` looks.
 */
.row-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

/*
 * The same strip in a build's own heading, which draws the same status
 * column and therefore the same one or two badges.
 *
 * **inline-flex, not flex**: the box sits in the <h1>'s inline run
 * after the build number, and the space separating it from that number
 * is a text node templ writes between two elements. A block-level box
 * would drop the badges onto a line of their own and eat that space.
 *
 * It carries no margin of its own for the same reason — the whitespace
 * is already there — and its baseline is its first badge's, so a
 * heading with one badge sits exactly where it sat when that badge was
 * written into the heading by hand.
 */
.head-status {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

/*
 * The strip of actions at the far end of a build row: the way into the
 * build, and whichever of servir and annuler the row can offer.
 *
 * **The wrapper is structural, not decorative.** Below 48em a cell is a
 * two-track grid whose first item is the column name drawn by ::before,
 * so two actions placed straight into the cell auto-place the second
 * under the word "Actions". The strip keeps the cell at two grid items
 * whatever the row can do.
 *
 * It arranges with a gap, so its children may carry no margin — the
 * contract every arranging box in this sheet has to state for itself,
 * `main form { margin-bottom: var(--gap) }` reaching a form nested one
 * level deeper than `td > :last-child` looks.
 */
.row-actions {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.row-actions > *,
.row-status > * {
    margin-bottom: 0;
}

/*
 * Who an account is, in one cell of two lines: the name, and the address
 * quietly under it.
 *
 * **The element is the point and this declaration is the default.** A
 * <div> is already display:block; what does the work is that the cell
 * has one child rather than two, exactly as for .row-actions and
 * .row-status above. Below the table breakpoint a cell is a two-track
 * grid whose first item is the column name drawn by ::before, so a
 * second child auto-places in the *label* track, under the word the
 * column is named by. The rule is kept because it is where that guard
 * is written; do not delete it as setting nothing, and do not read it
 * as load-bearing either.
 */
.row-identity {
    display: block;
}

/*
 * The journal's Message cell, which is the sixth of the same class.
 *
 * It holds the link into the entry, and only that: the payload's
 * disclosure used to sit under it and moved to the entry's own screen.
 * So the declaration is inert exactly as the five above it are, and the
 * box is what does the work — the day this cell gains a second child,
 * that child auto-places under the column's own name below the table
 * breakpoint. The cancellation this rule carried went with the
 * disclosure: an anchor has no margin to take back.
 */
.row-event {
    display: block;
}

/*
 * The same contract on the webhooks list's date cell, and it is the same
 * rule doing nothing for the same reason: the date and the result of the
 * last call are one sentence, so they are one box. Written straight into
 * the cell they are two grid items below the table breakpoint — three
 * with the ::before — and the result lands under the words "Dernier
 * appel" instead of after the date.
 *
 * Read the two together: **the day a cell gains a second child, or a
 * value that is a box rather than text, it gains a wrapper.** The
 * second half of that was added on 2026-08-22: a *lone* badge in a cell
 * is the only item of the value track and stretches its fill across the
 * whole card, which is the same mechanism showing a different symptom.
 * Text does not — an anonymous item has no fill to stretch. This is the
 * fourth cell in this interface to need a wrapper, after .row-actions,
 * .row-status and .row-identity; the Hugo history's outcome cell is the
 * fifth, and it reuses .row-status.
 */
.row-lastcall {
    display: block;
}

/*
 * The quiet second line under a webhook's name: the path the receiver
 * answers on, with the middle of its token elided.
 *
 * **Not in the muted-second-line group above**, which sets the size and
 * the ink together: .literal is written beside this class in the markup
 * and already gives the size, so only the ink is wanted here. Adding it
 * there would set 0.8125rem twice with nothing telling a reader which
 * declaration is the operative one.
 */
.webhook-endpoint {
    color: var(--muted);
}

/*
 * The receiving URL and its copy button, on the webhook's own page. The
 * mockup draws the address in a tinted mono box with the button beside
 * it; here the box is a readonly <input>, because a form control is the
 * only shape a keyboard can select the value out of when the button is
 * absent — see webhookdetail.templ for why that matters more than the
 * element the mockup names.
 */
/*
 * The margin is on this rule because nothing else would give it one. The
 * content rules margin `p`, `ul`, `ol`, `dl`, `table`, `form`, `section`
 * and `details` — a bare `div` is in none of them, so without this the
 * URL sits flush against the grid of facts under it, and no test that
 * reads a class list can tell. Measured at 0 px before it.
 *
 * It is `--gap` rather than the mockup's 12 px so the card's own rhythm
 * is the page's, and `.panel-body > :last-child` takes it back on any
 * card where this row happens to be last.
 */
.endpoint-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: var(--gap);
}

/*
 * **`overflow: hidden` is the load-bearing half, and `min-width: 0` is
 * deliberately absent.** Everywhere else in this sheet a flex item
 * holding an unbounded value carries the pair, because a flex item's
 * automatic minimum is its content. Here the overflow alone zeroes that
 * minimum, so the second declaration changes nothing: measured with it
 * deleted, the document's scroll width stays inside the viewport at
 * 1280 px, 390 px and 320 px. It was removed rather than kept, this
 * sheet's standard being that a rule describing nothing is worse than an
 * absent one.
 *
 * **What that does *not* mean is that the element saves the page.** A
 * first version of this comment said the floor came from the `<input>`'s
 * `size` attribute; measured, the field's min-content is 186 px and it
 * renders at 176.8 px in a 320 px viewport, so that floor never applies.
 * The overflow is the whole mechanism.
 *
 * **And adopting the mockup's `<code>` needs more than putting the pair
 * back.** Measured: `<code class="endpoint-url literal">` carrying the
 * same URL gives 680 px of document in a 390 px viewport, and adding
 * `min-width: 0` leaves it at 680 — the overflow then comes from the
 * grid track above, not from this box. Do not treat the pair as the
 * escape route; measure at a phone width.
 *
 * `max-width: none` takes back the 28 rem cap `input, select, textarea`
 * carries for the forms this interface is mostly made of, which arrives
 * here on the element's name alone. Without it the field stops at 448 px
 * inside a card half again as wide — measured 260.8 px of hole at a
 * 1600 px window, and nothing at 1280, where the column is too narrow
 * for the cap to bind.
 *
 * The value stays whole in the field whatever the ellipsis shows: it is
 * clipped, not truncated, so both the copy button and a keyboard
 * selection hand over the address in full.
 */
.endpoint-url {
    flex: 1;
    max-width: none;
    overflow: hidden;
    padding: 0.5rem 0.625rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-tint);
    color: var(--text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

/*
 * Where a copy says whether it worked. Rendered on every load and empty
 * until then, because a live region created at the moment of the message
 * is announced by nobody — the markup carries the role, this only sizes
 * it.
 */
.copy-status {
    max-width: none;
    margin-bottom: 0;
    font-size: 0.8125rem;
    color: var(--muted);
}

/*
 * The one figure a webhook's page leads with: how many of its recent
 * calls were accepted. The mockup's own sizes, and the label sits on the
 * baseline beside the number rather than under it — it is a sentence
 * read left to right, not a caption.
 */
.stat-figure {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    max-width: none;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 650;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--muted);
}

/*
 * The rejected tally, when there is one. `--danger-text` rather than a
 * fill: this is a figure in a list of figures, and the row beside it in
 * the history is where a refused call is already tinted.
 *
 * It outranks `td.num`'s muted ink by nothing — the two never meet, this
 * being a <dd> — so the pairing is safe wherever the class travels.
 */
.stat-alert {
    color: var(--danger-text);
    font-weight: 600;
}

/*
 * The secret sits at the foot of the entry-point card, behind the rule
 * `.panel-note` draws — it is a property of the endpoint above it rather
 * than a card of its own, which is what the mockup draws.
 *
 * `.panel-note` is 0.8125rem and muted, and the row inside it takes both
 * back: the value and its two controls are things to act on, not a
 * footnote. Only the label keeps the muted treatment.
 */
.endpoint-secret {
    font-size: inherit;
    color: inherit;
}

.endpoint-secret-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.625rem;
}

.endpoint-secret-label {
    font-size: 0.875rem;
    color: var(--muted);
}

/*
 * The regenerate form is the last item of that row and is pushed to the
 * far end, where the mockup puts it. `margin-left: auto` rather than
 * `justify-content: space-between`, because the row holds three items
 * and the first two belong together.
 */
.endpoint-secret-row form {
    margin-bottom: 0;
    margin-left: auto;
}

/*
 * The result of the last call, after the date it happened on. The three
 * inks are the badge tokens and deliberately so: a call that is "Rejeté"
 * here, pink in its row, and danger-badged on the webhook's own page has
 * to be the one colour, or the readings drift. Same vocabulary and same
 * tokens as .webhook-call--* on the detail page, which is the same fact
 * about the same call.
 *
 * A result this file has no rule for — which the receiver cannot
 * currently write — takes no modifier and wears whatever the cell wears,
 * rather than disappearing. **That is not the same ink at both widths**:
 * `td.num`'s muted colour is inside the 48em query, so below it such a
 * word comes out in the body ink at weight 600, i.e. louder than the
 * states that do have a colour. The fallback is intended; the asymmetry
 * is the price, and it is on a value nothing writes.
 */
.call-result {
    font-weight: 600;
}

.call-result--accepted {
    color: var(--ok-text);
}

.call-result--rejected {
    color: var(--danger-text);
}

.call-result--ignored {
    color: var(--warn-text);
}

/*
 * The name is the way into the account and is drawn as the mockups draw
 * it: the weight, not the link colour. That makes it the first link in
 * this interface with no resting affordance of its own — the three other
 * `text-decoration: none` sites each keep one (a menu entry inside its
 * landmark, a chip inside its pill, a filled button) — hence the
 * underline on hover, which costs the resting state nothing.
 *
 * Not a WCAG 1.4.1 failure: that criterion forbids colour being the
 * *only* means of conveying something, and `color: inherit` removes
 * colour as a means at all. It is a judgement, and it is recorded as one
 * in .claude/rules/palette.md.
 *
 * inline-block rather than block, so the click target is the name and
 * not the whole width of the cell.
 */
.user-name,
.webhook-name {
    display: inline-block;
    color: inherit;
    font-weight: 600;
    text-decoration: none;
}

.user-name:hover,
.webhook-name:hover {
    text-decoration: underline;
}

/*
 * DEFENSIVE. **Four of these six declarations are cancellations**, and
 * each of them holds a tag rule off rather than choosing a value: the
 * strip mixes an <a> with two <button>s, so without them the same three
 * icons come out as a blue chevron between two solid orange squares.
 * `button` sets background, colour, border and padding at (0,0,1) and
 * `a` sets colour at (0,0,1); this rule is (0,1,0) and beats both
 * whatever the declaration order — which is why the `.button--small`
 * ordering trap recorded above does *not* apply here, and why deleting
 * one of these as "it sets nothing" is the `.nav-toggle` mistake again.
 *
 * The ink is --link because that is what the mockups draw the row's
 * actions in: they are words there, and a word in an interface is an
 * action when it is that colour. An icon has to say the same thing with
 * less.
 *
 * **44px, where the mockups write words at 15px.** The project holds
 * every control to var(--tap) and has recorded that as a decision rather
 * than a conformance point; one of these three is destructive, and a
 * pass about colours and columns is not where that gets reopened.
 */
.row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--tap);
    min-height: var(--tap);
    padding: 0;
    color: var(--link);
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius);
}

.row-action:hover {
    color: var(--link);
    background: var(--surface-alt);
}

/*
 * A form wrapping one button is an action, not a section of the page.
 *
 * **`li form` reaches no live site today**, and that is worth knowing
 * before reading it as anything's cancellation: every <li> in this tree
 * holding a form is a flex container — the access keys, the sessions,
 * the pending-activation rows — and a flex item's `display: inline` is
 * blockified, so the inline box that would have swallowed the form's
 * vertical margins never exists there. What takes those margins back is
 * the `li > *` resets beside each of those lists, measured. The nav's
 * logout form is outside `main`, which is where the margin comes from at
 * all. So `td form` is carrying this rule; `li form` is kept for the
 * next list that is not a flex row.
 *
 * The third selector this rule carried named a session row by its test
 * identifier, back when such a row was a bare <div>. It is an <li> now.
 */
td form,
li form {
    display: inline;
}

/*
 * A cell ends on its own padding. The build list's Actions cell holds a
 * <form>, which would otherwise add a --gap to every row of that table.
 *
 * It had a second live case until the journal's conformance pass: the
 * disclosure on every row of the activity log. That cell holds a
 * `.row-event` box now, which carries no margin of its own, so the
 * cancellation moved one level in with the content — see that rule.
 *
 * **:last-child rather than every child**, because a cell is two boxes
 * depending on the width: a plain block above 48em, where a margin
 * between two of its blocks is ordinary spacing, and a grid with a gap
 * below it, where no child should carry one at all. The floor is the
 * only statement true at both, and it is the one the row's height is
 * made of.
 *
 * **The rule above is not this rule.** `display: inline` does make a
 * form's vertical margin inert — while the cell is a cell. Below 48em
 * the stacked layout turns it into a grid and blockifies its children,
 * which is exactly where the margin comes back, so a reader finding one
 * of these two must not delete the other as duplication.
 */
td > :last-child {
    margin-bottom: 0;
}

/*
 * The journal's filter card, which is the last <form method="get"> in the
 * interface: every other list filters through a row of links.
 *
 * The mockup draws a card in two strips — a bar carrying the toggle, and
 * a panel of fields under it — and the disclosure is a native <details>,
 * so folding it needs no script and nothing is added to the content
 * security policy. **A control inside a folded <details> is still
 * submitted**, which is what makes the fold free: the filtering does not
 * depend on the panel being open.
 */
/*
 * DEFENSIVE: `overflow: hidden`, for the reason `.panel` right above
 * carries it and a rounded table needs its corner cells rounded. The
 * panel is the card's last box and it carries a fill of its own; a
 * descendant's background is not clipped by an ancestor's radius and
 * paints after that ancestor's border, so without this the two bottom
 * corners are painted square whenever the disclosure is open — including
 * the refusal state, which is the one an operator sees least often and
 * looks at hardest.
 */
/*
 * The grid is what puts the search box and the Filtres button on one
 * line, which is the mockup's own shape and which nesting cannot give:
 * a form control inside the <summary> shares its activation, so a space
 * typed into the box would toggle the panel. The box therefore stays
 * outside the disclosure and the *layout* brings the two together.
 *
 * `display: contents` on the <details> is what makes its summary and its
 * panel grid items of this card rather than of a box of their own.
 * Selectors still see the DOM, so `.filter-card > *` below matches the
 * bar and the <details> and never the summary — the two trees differ
 * here and that is worth knowing before writing a rule against either.
 */
.filter-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
}

.filter-disclosure {
    display: contents;
}

.filter-panel {
    grid-column: 1 / -1;
}

/*
 * DEFENSIVE. Chrome wraps a <details>' content in a `::details-content`
 * box, so with `display: contents` on the disclosure *that* is the grid
 * item and the panel inside it is not — a `grid-column` written on the
 * panel alone places nothing, and the panel comes out one toggle
 * narrower than the card with a band of --surface down its right edge.
 * The rule above still covers an engine that generates no such
 * pseudo-element, where the panel is the item.
 *
 * **A rule of its own and never a selector list with the one above.** An
 * unknown pseudo-element invalidates the entire list it appears in, so
 * grouping the two would take the panel's own placement down in every
 * browser that has not shipped this one.
 */
.filter-disclosure::details-content {
    grid-column: 1 / -1;
}

/*
 * The button, drawn as one: the mockup puts it at the end of the bar
 * beside the search box, bordered like every other quiet control.
 * `list-style: none` and the WebKit pseudo-element are the two halves of
 * removing the disclosure triangle; the chevron beside the label is what
 * replaces it, and it turns rather than being swapped for a second
 * glyph, so the two states share one element.
 */
.filter-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: var(--tap);
    margin: 0.625rem 0.75rem 0.625rem 0;
    padding: 0 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    list-style: none;
    cursor: pointer;
}

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

.filter-toggle-label {
    font-weight: 600;
}

/*
 * The chevron this sheet has points *right* — it is drawn for the way
 * into a row — so a disclosure has to turn it a quarter before it reads
 * as one, and the open state turns it the other way rather than swapping
 * it for a second glyph. Both states are then one element, which is what
 * lets the transition say which way the panel is going.
 */
.filter-toggle svg {
    margin-left: auto;
    transform: rotate(90deg);
    transition: transform 0.15s ease;
}

.filter-disclosure[open] .filter-toggle svg {
    transform: rotate(-90deg);
}

/*
 * The count of what is in force, which is the whole reason the panel may
 * start folded: a card that says nothing about its own state reads as an
 * unfiltered page. The chip row under the card is the other half, and the
 * two are one computation in the template.
 */
.filter-count {
    padding: 0.0625rem 0.4375rem;
    background: var(--accent);
    border-radius: 999px;
    color: var(--accent-text);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

/*
 * The panel. A **grid** and not a wrapping flex row, which is what the
 * mockup draws and what the filter row it replaced used: with a flex row
 * the fields size themselves, so a panel of five is three on one line and
 * two on the next at some widths and four and one at others, and the
 * bottom alignment a form row wants puts an accepted date box half a
 * field below the refused one beside it. One column here; the mockup's
 * three past the table breakpoint.
 */
.filter-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0.875rem 0.75rem;
    background: var(--surface-tint);
    border-top: 1px solid var(--line);
}

/*
 * The mockup's own legend: small, spaced, upper case and quiet, which is
 * what tells a panel of filters from a form asking for values. It weighs
 * (0,2,1) against `.field label`'s (0,1,1), so it wins wherever it is
 * declared — and it is scoped, the filter row being the only place in
 * this interface the mockups draw a label this way.
 */
.filter-panel .field label,
.filter-axis legend,
.filter-range legend {
    margin-bottom: 0.4375rem;
    padding: 0;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/*
 * The always-visible strip above the disclosure: the search, and later
 * the relative period.
 *
 * DEFENSIVE: the padding is the rule, not the decoration. `.filter-card`
 * pads nothing and arranges nothing — its own comment says so — and the
 * content rules reach `p`, `ul`, `table`, `form` and friends but never a
 * bare `<div>`, so a strip added here has no spacing from anywhere and
 * sits flush against the card's border on three sides. Nothing measures
 * it either: the journal's box reading takes the card's *bottom*, which
 * this strip is not.
 */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.5rem 0.625rem 0.75rem;
}

/*
 * DEFENSIVE: `max-width: none` cancels the 28rem cap `input, select,
 * textarea` carries for the forms this interface is mostly made of. It
 * arrives here on the element's name alone, and it would stop the search
 * box halfway across a card that is as wide as the content column.
 */
.filter-search {
    flex: 1 1 20rem;
    min-width: 0;
    max-width: none;
}

/*
 * The relative period, the bar's third item and the mockup's own
 * arrangement: a caption beside its select rather than above it, the bar
 * being a row.
 *
 * `flex: 0 0 auto` is what keeps the pair whole. The search beside it
 * asks for 20rem and may shrink; a period that shrank with it would put
 * its caption on one line and its select on the next, which is the shape
 * the phone block already avoids for the state band. What gives way here
 * is the search, and below the table breakpoint the whole control wraps
 * to a line of its own rather than compressing.
 *
 * DEFENSIVE: `margin: 0` is a cancellation and is the whole reason this
 * rule is not decoration. The box is a `<label>`, so `label` and
 * `input + label` reach it on its tag alone — and it sits immediately
 * after the search input, templ writing no whitespace before a component
 * call. The bar centres the *margin* box, so without this the control
 * slides down by half the difference of those two margins, measured at
 * exactly 6px, while every range comparison a test can make on two
 * overlapping boxes stays satisfied. Same class as `.endpoint-row` and
 * `.notice`: a box that is one of the tags this sheet has habits about
 * inherits them whether or not it wants them.
 */
.filter-period {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.filter-period-label {
    font-size: 0.875rem;
}

/*
 * One axis of the panel, and the pair of date bounds beside it: a legend
 * naming the question, then its answers. A <fieldset> laid out as a flex
 * column, legend included, which is the mockup's own arrangement.
 *
 * One grouped selector rather than two identical blocks and a comment
 * asserting they match — a coupling is only enforced when the selector
 * is shared, which is the arbitration `.tile--alert` / `.panel--alert`
 * already settled.
 */
.filter-axis,
.filter-range {
    display: flex;
    flex-direction: column;
    gap: 0.4375rem;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
}

/*
 * The build family, drawn under its own heading inside the category
 * axis. It submits under the same key as the pills above it, so the two
 * rows are one question and not two.
 */
.filter-options--grouped {
    padding-top: 0.125rem;
}

.filter-sublabel {
    color: var(--muted);
    font-size: 0.8125rem;
}

/*
 * One value, as a pill holding its own checkbox.
 *
 * The mockup borders an unticked pill in #dcdde3, which is 1.35:1 on the
 * page behind it — a control bounded by nothing a reader can see. It
 * takes `--border` instead, which `boundaries()` holds to 3:1, exactly
 * as the removable chips above already do.
 */
.filter-option {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-height: 2rem;
    padding: 0.1875rem 0.625rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
}

.filter-option:has(:checked) {
    background: var(--accent-bg);
    border-color: var(--accent-line);
    color: var(--accent-fg);
    font-weight: 600;
}

/*
 * The box stays visible inside the pill, which is the mockup's own
 * arrangement and the accessible one: a box hidden behind a styled label
 * has to have its state and its focus ring reinvented, and both are
 * things a browser already does correctly.
 */
.filter-option input {
    width: 0.9375rem;
    height: 0.9375rem;
    margin: 0;
    accent-color: var(--accent);
}

/*
 * DEFENSIVE. The box arranges with a gap, so its children may carry no
 * margin — the contract every arranging box in this sheet states for
 * itself. Here it reaches the refusals: `dateRefusal` renders a bare
 * <p>, and `[role="alert"]` sets a fill and a padding and no margin, so
 * `main p` stands and each message adds a --gap inside a box spacing at
 * 7px. `.field-note` beside them already carried its own zero.
 *
 * Measured without it, at 390px on `?to=9999-12-31`: 16px under the last
 * refusal against a floor of nothing. Reachable in no other state, which
 * is why the guard navigates to that one.
 */
.filter-range > * {
    margin-bottom: 0;
}

.filter-range-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/*
 * `min-width: 0` and not only the basis: a date input's automatic
 * minimum is the widest its own placeholder and picker button can be, so
 * without it the pair pushes the panel past its column at a phone width.
 */
.filter-range-row input {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
}

.filter-range-arrow {
    color: var(--muted);
}

/*
 * The footer takes a line of its own, and the rule above it is the
 * mockup's.
 */
.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    grid-column: 1 / -1;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
}

.field {
    display: flex;
    flex-direction: column;
    flex: 1 1 12rem;
    max-width: 20rem;
}

.field label {
    margin-bottom: 0.25rem;
}

.field input,
.field select {
    max-width: none;
}

/*
 * The three password boxes of Mon compte, which the mockup draws on one
 * row. One column here and three past the table breakpoint: three tracks
 * on a phone leave 100 px apiece, which is not a field.
 *
 * The margin is the box's own, and it is the `.endpoint-row` lesson from
 * the other side: the content rules margin p, ul, ol, dl, table, form,
 * section and details, so a bare <div> between the grid and the button
 * under it gets nothing at all and the two run together.
 */
.field-grid {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

/*
 * The mockup's own value for a field label, and the only `font-size` on
 * a `label` in this sheet — so it is scoped rather than put on `label`,
 * where it would take the filter rows with it and those have no mockup
 * asking for it.
 */
.field-grid label {
    font-size: 0.875rem;
}

/*
 * A field in either grid — Mon compte's password row, the journal's
 * filter panel — is sized by its track, so the cap `.field` takes for a
 * field standing in a wrapping flex row, where it needs a ceiling of its
 * own, has to come back off.
 */
.field-grid .field,
.filter-panel .field {
    max-width: none;
}

/* The settings screen ------------------------------------------------ */

/*
 * The page is a form beside a jump list, and one column until there is
 * room for both. The list is written first in the document and placed
 * second, which is what makes it reachable by keyboard before the
 * twenty-three boxes it exists to jump over — `order` moves the picture
 * and never the tab sequence.
 */
.settings {
    display: grid;
    gap: var(--gap);
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

/*
 * DEFENSIVE. The form is a *grandchild* of main now, so
 * `body.has-shell > main > *` no longer reaches it and `main form`
 * gives it back a bottom margin — a block's worth of space between the
 * last card and the foot of the column, which is the orphan-margin
 * defect the content column was turned into a flex container to remove.
 *
 * **The descendant combinator is load-bearing.** Written
 * `.settings-form > *` this weighs (0,1,0), exactly what `.page-head`
 * weighs, so the head's own margin would be cancelled or not depending
 * on which rule came last in the file — 32 px against the 16 the
 * mockup draws, decided by declaration order. With `main` in front it
 * is (0,1,1) and wins whatever moves.
 */
.settings-form,
main .settings-form > * {
    margin-bottom: 0;
}

/*
 * The jump list. It is drawn only where there is a second column for
 * it: below that width it would push the form a screen down to offer
 * shortcuts into a page the reader can already scroll.
 *
 * display:none rather than a clip, and that is honest here — the
 * targets stay reachable, so nothing is removed from the page but a
 * convenience. It is not the skip link, whose :focus rule can never
 * fire if it is not displayed.
 */
.settings-nav {
    display: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: 0.75rem 0.5rem;
}

.settings-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.settings-nav a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: var(--tap);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--nav-ink);
    text-decoration: none;
}

.settings-nav a:hover {
    background: var(--surface-tint);
}

/* The dot the index puts beside a block that states something. */
.index-dot {
    flex: none;
    margin-left: auto;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: currentcolor;
}

/*
 * A card's fields, on a twelve-column grid so that a box holding four
 * characters can ask for a quarter of the row where the mockup draws
 * one. A span is a class and never an inline style: the admin answers
 * style-src 'self' with no 'unsafe-inline', so a style attribute is
 * dropped without a word.
 */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0.875rem 1.5rem;
    align-items: start;
}

/*
 * A field is a column of its own: the caption, the control, then
 * whatever is written under it. `align-items: start` above is what makes
 * that possible — stretched to the row, a cell holding one box would
 * push its label to wherever the tallest neighbour's happened to be.
 */
.setting {
    display: flex;
    flex-direction: column;
    grid-column: span 12;
    min-width: 0;
}

/*
 * A box fills the cell it is in, the track already being the measure.
 * The shared 28rem cap is for a field standing in a wrapping row and
 * needing a ceiling of its own; here it only ever leaves a gap on the
 * right of a column that is narrower than it.
 */
.setting input,
.setting select,
.setting textarea {
    max-width: none;
}

.setting--toggle label {
    min-height: var(--tap);
    margin-bottom: 0;
}

/*
 * The sentence that opens a sub-block, with the rule the mockup draws
 * above it. It spans the row, which is why it is a sibling of the
 * fields rather than a child of one — inside a cell the rule would run
 * under half the card.
 */
.settings-block-note {
    grid-column: 1 / -1;
    margin-bottom: 0;
    max-width: none;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
    font-size: 0.8125rem;
    color: var(--muted);
}

/*
 * A caption split across two labels, which is what lets each control of
 * a pair carry a name of its own while the reader still sees one
 * sentence. The labels are inline here; `label { display: block }`
 * would stack them.
 */
.field-caption {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: baseline;
}

.field-caption label {
    display: inline;
    margin-bottom: 0;
}

/*
 * A run of controls drawn as one box.
 *
 * The number takes the room that is left and the unit takes what it
 * needs: a select shrunk below its longest option renders its own text
 * clipped, arrow included, which is a control whose value cannot be
 * read.
 */
.control-join {
    display: flex;
    align-items: stretch;
    min-width: 0;
}

.control-join input {
    flex: 1 1 4rem;
    min-width: 0;
    border-radius: 0;
}

.control-join select {
    flex: none;
    width: auto;
    border-radius: 0;
    background: var(--addon);
}

/*
 * DEFENSIVE, and it is the *longhand* that matters. `border-right: 0` is
 * a shorthand: it sets the width **and the style**, and
 * `[aria-invalid="true"]` sets widths only — so a refused control in the
 * middle of a run would draw its red edge on three sides and nothing at
 * all on the shared one, whatever the declaration order. What a reader
 * sees is a box opening onto its neighbour, i.e. two boxes marked wrong
 * or none.
 */
.control-join > :not(:last-child) {
    border-right-width: 0;
}

.control-join > :first-child {
    border-start-start-radius: var(--radius);
    border-end-start-radius: var(--radius);
}

.control-join > :last-child {
    border-start-end-radius: var(--radius);
    border-end-end-radius: var(--radius);
}

/*
 * The separator, and the unit select beside it: both are furniture
 * around a value rather than a value, so they take the addon fill the
 * mockup gives them.
 */
.control-sep {
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    border: 1px solid var(--border);
    background: var(--addon);
    color: var(--muted);
    user-select: none;
}

/* A stored value the application is not applying. */
.control--stale {
    border-color: var(--danger-text);
    background: var(--row-danger);
}

/*
 * The lines under a box. `max-width: none` is deliberate and is the
 * departure from `main p { max-width: 70ch }`: these sit in a grid cell
 * that is already narrower than the measure, so the cap would only ever
 * make a note wrap sooner than its own column asks for.
 */
.field-note {
    margin-bottom: 0;
    max-width: none;
    font-size: 0.8125rem;
    color: var(--muted);
}

.field-note--stale,
.field-note--error {
    color: var(--danger-text);
}

/*
 * The test send, set apart from the boxes above it by the rule the
 * mockup draws: it is an action against what is *stored*, in a card
 * whose every other control edits what is not yet.
 */
.settings-testmail {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.875rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--line);
}

.settings-testmail p {
    flex: 1 1 20rem;
}

/*
 * The one card on this page that holds no setting: a title, a sentence
 * under it, and the way out of it centred against the pair.
 *
 * **Against the pair and not against the title**, which is what a
 * `.panel-head` gives — that box holds the heading alone, so a link in
 * it sits on the title's line and hangs above the middle of a card
 * whose description is underneath.
 *
 * Two class names in the selector, weighing (0,2,0), because the
 * padding it restores is set to zero by `.panel` at (0,1,0): a single
 * class would tie with that rule and leave declaration order to decide
 * whether this card has any padding at all.
 */
.panel.settings-database {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding: 0.875rem 1rem;
}

/*
 * The sentence gives up the room, and the link never does. A flex item's
 * base size is its content laid out on one line, so left to itself the
 * block on the left asks for the whole sentence and wraps the link onto
 * a line of its own — which is what centring it was meant to avoid.
 */
.settings-database > div {
    flex: 1 1 20rem;
    min-width: 0;
}

.settings-database h2 {
    margin-bottom: 0.25rem;
}

.settings-database a {
    flex: none;
}

/* The two actions at the foot of the form, and the date beside them. */
.settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem var(--gap);
    align-items: center;
}

/* Tables — stacked cards, which is the mobile-first arrangement ------- */

table {
    width: 100%;
    border-collapse: collapse;
}

table,
thead,
tbody,
tr,
th,
td {
    display: block;
}

/*
 * The column names come from data-label below this width, so the header
 * row is removed outright rather than hidden visually: kept in the
 * accessibility tree it would have every column announced twice.
 * internal/views/columnlabel_test.go is what keeps the two in step —
 * with no header row left, nothing else can contradict a wrong label.
 */
thead {
    display: none;
}

tbody tr {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
}

/*
 * DEFENSIVE. At this width a row is a card carrying its own bottom
 * margin, and `.panel-body > :last-child` cannot reach it — that
 * selector matches the <table>. So the last row of a table inside a
 * panel leaves 12px of margin under it on top of the body's own
 * padding, and the card ends deeper than it starts.
 *
 * Scoped to `.panel--table` rather than written on `tbody tr:last-child`
 * outright: a bare table carries its own trailing margin, and that is
 * what separates it from whatever follows.
 *
 * **The reason this used to give — "on the three list screens the table
 * *is* the card" — stopped being true when they were paged.** All three
 * put their table inside a card now, so the scope no longer distinguishes
 * a list screen from anything else; what it distinguishes is a table in a
 * card from a table that is not in one, of which this interface still has
 * several.
 */
.panel--table tbody tr:last-child {
    margin-bottom: 0;
}

td {
    display: grid;
    grid-template-columns: minmax(6rem, 35%) 1fr;
    gap: 0.75rem;
    padding: 0.25rem 0;
}

td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
}

/*
 * DEFENSIVE. td::before is unconditional: it draws the column's name in
 * front of every cell below the table breakpoint, whatever the cell
 * holds. Without this, a cell holding nothing grows a block containing
 * nothing but the word "Journal", or "Actions", and announces a cell
 * whose whole content is the name of its column.
 *
 * **Both cases it was written for are gone and two others have taken
 * their place**, which is this rule's own history in one line. The two
 * that went were a build row's Actions cell, empty whenever the build
 * was neither served, pruned nor cancellable, and the Journal column of
 * the build detail's hook-run table, empty when a run wrote no activity
 * entry to link to. The two that are live: the Hugo history's Détail
 * cell, empty on every ordinary "Hugo est à jour" row, and the journal's
 * Nom cell, empty for an entry nothing named — a scheduled check with no
 * job name, and every row a future writer leaves unattributed.
 *
 * **A live case is not what makes it necessary, and its absence would
 * not make it safe to delete.** What makes it necessary is the
 * unconditional ::before above, which is still there, and the next
 * conditional cell anybody writes lands on it silently. This rule is the
 * floor under it, not a workaround for a template that has moved on.
 */
td:empty {
    display: none;
}

td:empty::before {
    content: none;
}

/* Table state hooks --------------------------------------------------- */

/*
 * Every one of these is declared after the rule it has to outrank and
 * qualified the same way, so a state tint always wins: a state that
 * loses to another row fill is not merely a contrast question, it is a
 * state that stopped being shown. Past 48em that rule is the hover tint
 * and the *fills* are re-declared inside the query for it; it used to be
 * a zebra stripe, which the mockups do not have. Colour is never the only
 * carrier — each of these rows already spells its state out in French.
 *
 * DEFENSIVE. **The mark is an inset box-shadow and must never go back to
 * being a border.** A border declared on a <tr> is ignored outright in
 * the separated borders model the table takes past 48em, so `border-left`
 * here drew nothing at all on any desktop screen — while
 * getComputedStyle went on reporting `4px solid`, which is why it
 * survived a month. Measured out of a screenshot: the leading pixel of a
 * failed row read --danger-bg, i.e. the fill, and never the mark.
 * assertTheFailedRowIsMarked is the guard, and it reads pixels for
 * exactly this reason.
 *
 * **A box-shadow declaration replaces, it does not merge**, so a rule
 * here that wants a mark *and* something else says both in one comma
 * list or loses the other silently.
 *
 * **The journal is a deliberate departure from its own mockup, in one
 * direction only.** That mockup marks no row at all — the level lives in
 * the badge — and the success mark this sheet used to draw is gone for
 * exactly that reason: a journal is mostly successes, so an edge on
 * every one of them is an edge on the page. The failure fill stays,
 * because the entries an operator opens that page for are the failures
 * and a tint is what lets them be found by scrolling rather than by
 * reading. Do not "finish" the conformance by taking it out.
 */
tbody tr.build-row--failure,
tbody tr.activity-row--failure,
tbody tr.hugo-entry--failure,
tbody tr.webhook-call--rejected,
tbody tr.webhook-row--rejected {
    background: var(--row-danger);
    box-shadow: inset 3px 0 0 0 var(--danger-text);
}

/* A call that was ignored is not a failure and not a success. */
tbody tr.webhook-call--ignored {
    background: var(--row-warn);
    box-shadow: inset 3px 0 0 0 var(--warn-text);
}

tbody tr.build-row--cancelled {
    background: var(--surface-alt);
    box-shadow: inset 3px 0 0 0 var(--muted);
}

/*
 * Amber, not the accent: the mockups draw a running build in the same
 * ink as the state band's own running dot, and the accent is the brand
 * — a row in it reads as selected rather than as busy.
 *
 * Only the running one takes a fill. A queued build has not started, and
 * the mockups draw no queued row at all; giving it one would say the
 * queue is doing something.
 */
tbody tr.build-row--queued,
tbody tr.build-row--running {
    box-shadow: inset 3px 0 0 0 var(--mark-run);
}

tbody tr.build-row--running {
    background: var(--row-warn);
}

/*
 * A build the downstream content consumer was never told about. The same
 * amber as a running build, because it is the same reading: something is
 * not finished. It is not a failure — the site is generated, published
 * and being served — so it must never take --row-danger, which would put
 * a build that did everything right in the ink of one that published
 * nothing.
 *
 * Declared after the state fills and before the served build's mark, so
 * a served build that is behind keeps its green mark and gains the warm
 * fill. The badge beside it says so in French; this is the second
 * channel, never the only one (WCAG 1.4.1).
 */
tbody tr.build-row--warning {
    background: var(--row-warn);
    box-shadow: inset 3px 0 0 0 var(--mark-run);
}

/* The output is gone: the row stays readable but stops competing. */
tbody tr.build-row--pruned td,
tbody tr.build-row--pruned td::before {
    color: var(--muted);
}

/*
 * An account whose activation link has expired: amber, the same ink the
 * running build's mark takes, over the warm 2% row fill.
 *
 * **Only this one state is tinted, and that is the mockups' reading.** A
 * pending account is waiting, which is the normal state of an account
 * invited this morning; tinting it would say something is wrong with
 * every fresh invitation. The mockups draw no pending row at all.
 *
 * --mark-run on --row-warn is 1.91:1 and stays out of boundaries(), for
 * the reason the running build's mark already does: it is a 3px edge
 * whose state is written in French in the badge beside it.
 */
tbody tr.user-row--expired {
    background: var(--row-warn);
    box-shadow: inset 3px 0 0 0 var(--mark-run);
}

/*
 * The build being served, which outranks everything else on the row —
 * declared last, and tied with every rule above at (0,1,2).
 *
 * It carried an accent ring around the whole row as well until the
 * conformance pass of 2026-08-19. The mockups draw the mark alone, and
 * the ring was a second colour family on a row whose state is already
 * green in its mark and green in its badge.
 */
tbody tr.build-row--active {
    box-shadow: inset 3px 0 0 0 var(--ok-text);
}

/* Definition lists --------------------------------------------------- */

dl {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem 0.75rem;
}

dt {
    font-weight: 600;
    color: var(--muted);
}

dd {
    margin: 0 0 0.5rem;
}

/* Logs and payloads --------------------------------------------------- */

/*
 * A build log is captured from someone else's repository: it can be
 * 64 KiB on a single line with no newline anywhere, and <pre> does not
 * wrap, so the build detail page would scroll sideways for its whole
 * width. The container keeps the overflow local to the log.
 *
 * The two wrapping declarations are load-bearing for accessibility, not
 * only for layout: they are why the content never actually overflows,
 * which is why axe's scrollable-region-focusable does not fire on a
 * region that has no way to take focus. Change them and that rule comes
 * back, and the fix is a tabindex in the markup, not a rule here.
 */
/*
 * **The family is declared here and was declared nowhere at all**, so a
 * <pre> fell back to whatever the browser calls `monospace` — which is
 * not the face the rest of this interface writes an identifier in, and
 * is not the one hugo aligned its own summary table for. It covers the
 * activity log's captured payload as well as the build's, which is the
 * same kind of value: the output of a program.
 */
.build-log {
    overflow-x: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    padding: 0.75rem;
    background: var(--surface-alt);
    border-radius: var(--radius);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
}

/* Dialog -------------------------------------------------------------- */

/*
 * DEFENSIVE. Every rule here is scoped to dialog[open]. An unscoped
 * display on dialog beats the user-agent's dialog:not([open]) rule by
 * origin, which opens the confirmation dialog inline on the five
 * destructive pages — and stops axe skipping its two slots, which are
 * empty until confirm.js fills them: button-name, critical, on six of
 * the twenty-three screens the sweep walks.
 */
dialog[open] {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: min(30rem, calc(100vw - 2rem));
    padding: var(--gap);
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
}

dialog::backdrop {
    background: rgb(0 0 0 / 50%);
}

/*
 * The dialog is a flex column with a gap, so its four children are
 * spaced by that gap and by nothing else. Two of them carry a margin:
 * the <h2>, from the heading rule near the top of this file, and the
 * <p>, from the content rules — and the two values differ, so without
 * this the four rows are spaced three different ways.
 *
 * `.dialog-form` is the same box one level down — a form that arranges
 * its own children, one of which is the <p> a failed ceremony writes
 * into — so it takes the same reset rather than a second copy of it.
 *
 * Scoped to dialog[open] like every rule here, per the DEFENSIVE note
 * above. That scoping is about `display`, and the discipline is kept
 * whole rather than made an exception of for one property.
 */
dialog[open] > *,
.dialog-form > * {
    margin-bottom: 0;
}

dialog[open] button {
    align-self: start;
}

/*
 * The one dialog whose body is a form rather than a run of children: the
 * field a passkey registration needs a name in. The column and the gap
 * are the dialog's own, restated one level down because `dialog[open]`
 * arranges its children and this form is one of them.
 */
.dialog-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Details -------------------------------------------------------------- */

summary {
    cursor: pointer;
    padding: 0.25rem 0;
}

/* Pagination ------------------------------------------------------------ */

/*
 * The bar the mockups glue to the foot of every list's card — a fill, a
 * rule above it, and three groups pushed apart: how many entries the
 * selection holds, the numbered walk, and the size of a page.
 *
 * It is a class and was an attribute selector on a test id, the one rule
 * in this sheet keyed off one.
 *
 * The wrap is what stands in for a media query. The mockups carry none
 * at all for this bar, so on a narrow window the three groups fall onto
 * their own lines rather than being rearranged.
 *
 * **The fill is --surface-tint where the mockups write #fbfbfc**, one
 * unit off. That value occurs six times in the whole document against
 * the forty to two hundred a systematic one repeats, so it is a one-off
 * rather than a recipe and does not earn a token of its own —
 * .claude/rules/palette.md carries that arbitration and its precedent.
 */
.paging {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.75rem;
    background: var(--surface-tint);
    border-top: 1px solid var(--line);
}

/*
 * DEFENSIVE — the bar arranges its three groups with a gap, so no child
 * of it may carry a margin of its own. `.paging-size` is a <form>, which
 * `main form { margin-bottom: var(--gap) }` reaches on its tag alone, and
 * nothing takes it back: `body.has-shell > main > *` stops at the card,
 * and `.panel-body > :last-child` matches the table — the bar is the
 * body's *sibling*, not its child.
 *
 * `align-items: center` centres the *margin* box, so without this the
 * "Par page" group is drawn above the numbers beside it and the bar is
 * half again as tall as the mockup's. Measured at 1280 against a control
 * differing only by this declaration: 70px of bar against 54, the group
 * 8.5px out of line; at 390, 114px against 98.
 *
 * `> *` and not `:last-child`, per the rule for a box that *arranges*
 * rather than merely padding: the day the bar gains a fourth group, that
 * one needs the same reset and will not ask for it.
 *
 * The guard is a comparison of the two groups' **centres**. Overlap and
 * ordering are both satisfied by an 8.5px offset, which is how the
 * existing browser assertion stayed green over it.
 */
.paging > * {
    margin-bottom: 0;
}

.paging-range {
    font-size: 0.875rem;
    color: var(--muted);
}

/*
 * The two counts read as numbers rather than as words: tabular figures
 * keep a range from shifting under itself as the walk advances, which is
 * what the mockups use them for on every list.
 */
.paging-range strong {
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.paging-steps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
}

/*
 * One box for a step and for a number, which is what the mockups draw:
 * they differ by their width and by nothing else, a number being square
 * and a step being as wide as its word.
 *
 * **--border and not the mockups' #dcdde3**, which measures 1.35:1 on
 * white where boundaries() holds an edge to 3:1. Same divergence, same
 * reason, as the one `.chips a` already carries.
 */
.paging-step,
.paging-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    min-height: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 0.875rem;
    text-decoration: none;
}

.paging-step {
    padding: 0 0.625rem;
}

.paging-number {
    min-width: 2rem;
    padding: 0 0.5rem;
    font-variant-numeric: tabular-nums;
}

a.paging-step:hover,
a.paging-number:hover {
    background: var(--surface-tint);
}

/*
 * The page in force, drawn as the mockups draw it: the accent fill with
 * its own darker rim, which is the primary button's own pair of tokens
 * and their exact values here (#c43c11 on #a8330e).
 */
.paging-number--current {
    background: var(--accent);
    border-color: var(--accent-border);
    color: var(--accent-text);
    font-weight: 650;
}

/*
 * A step leading nowhere. The mockups ink it #a4a6b2, which measures
 * about 2.4:1 on this fill; contrast_test.go crosses every foreground
 * against every background and would refuse the token. --muted is the
 * quiet ink this palette already holds to the bar, and the box is still
 * plainly quieter than an offered step, which carries --text.
 */
.paging-step--off {
    color: var(--muted);
    border-color: var(--line);
}

.paging-gap {
    padding: 0 2px;
    color: var(--muted);
}

/*
 * The caption and its select stay on one line, which is the mockup's own
 * shape -- it wraps the bar and never this group. A caption stranded
 * above its control reads as a heading over the row below it rather than
 * as the name of the box beside it, and the bar's own wrap is the break
 * point that keeps the group whole on a narrow window.
 */
.paging-size {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted);
    white-space: nowrap;
}

.paging-size select {
    min-height: 2rem;
    padding: 0.1875rem 0.5rem;
}

/* Tables become tables ---------------------------------------------------- */

/*
 * There are **two** breakpoints, and they are two because the single
 * one used to do two unrelated jobs at once. This is the first: a
 * window wide enough for a table to be read as a table. The second,
 * below, is a window wide enough to spare 15rem for a navigation
 * column, which is a different and much larger amount of room.
 *
 * What belongs here is everything about the *content*: the tables, the
 * hover tint and every state tint, the cell metrics, the definition
 * lists, the padding of the content column. **The state tints in
 * particular may never be separated from the row fill they have to
 * outrank** — today that is the hover tint, and moving the tints to the
 * second query alone would leave a failed build taking the hover fill
 * between 768 and 1023px. The comment at the tints themselves says why
 * the order decides; this says where they have to live, and
 * .claude/rules/tables.md carries what was weighed when the fill they
 * had to beat was a zebra stripe.
 */
@media (min-width: 48em) {
    /*
     * The two are not the same, and the mockups draw them apart: the
     * content column breathes sideways against the navigation and stays
     * tight against the band above it.
     */
    main {
        padding: 1.25rem 1.5rem;
    }

    /*
     * A card's fields go two to a row at the width a table becomes a
     * table again, and the two short boxes take a quarter each — which
     * is the mockup's SMTP row, a host beside a port beside a mode.
     *
     * Below this the grid is one field per row: three tracks leave
     * about 100 px apiece, which is not a field, and the `.field-grid`
     * rule under this one is here for the same reason.
     */
    .setting {
        grid-column: span 6;
    }

    .setting--narrow {
        grid-column: span 3;
    }

    /*
     * A checkbox has no caption of its own, so beside a field that does
     * it starts a line higher and the two controls do not line up —
     * "keep every build" a line above the window it switches off. The
     * offset is the caption it does not draw: one line box at the
     * label's own size, plus the margin under it.
     *
     * Only where there is a neighbour to line up with. In one column
     * there is nothing above it and the space would be a hole.
     */
    .setting--toggle {
        padding-top: calc(1.5rem + 0.25rem);
    }

    /*
     * Tables become tables again — and a card, which they are not below
     * this width because each row is already one.
     *
     * `border-collapse: separate` is what lets the table carry a border
     * and a radius at all: collapsed, the cells' own borders replace the
     * table's and the corners cannot round. `border-spacing: 0` puts the
     * cells back edge to edge, which is what collapsing was doing.
     */
    table {
        display: table;
        border-collapse: separate;
        border-spacing: 0;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--radius-card);
    }

    /*
     * The last row's own rule would draw a second line just inside the
     * card's bottom edge.
     */
    tbody tr:last-child td {
        border-bottom: 0;
    }

    /*
     * **The four corner cells round themselves, and that is not
     * decoration.** A <table> takes no `overflow: hidden` — it is not a
     * scroll container — so the card's own radius clips its own
     * background and nothing else, and any fill drawn inside it lands
     * square over the two corners it reaches. The mockups get this for
     * free by wrapping the table in a <div>; a wrapper here would be
     * markup added for a rounding, on eight tables.
     *
     * **Why the cell is the right box even for a fill the row carries.**
     * The header band is genuinely painted by the th. The bottom pair
     * looks like it should be on the row instead — `tbody tr:hover` and
     * every state tint are declared on the row, deliberately — but in
     * the separated borders model a row's background is painted within
     * its cells' boxes, so the cell's radius clips the row's fill.
     * Measured: a last row in --danger-bg follows the 7px curve, and
     * with `border-radius: 0` forced on those two cells the same fill
     * runs square into the corner.
     *
     * One pixel less than the card's own radius, which is what the
     * border sits in: the inner edge of a 1px border on an 8px corner
     * describes a 7px one.
     */
    thead tr:first-child th:first-child {
        border-top-left-radius: calc(var(--radius-card) - 1px);
    }

    thead tr:first-child th:last-child {
        border-top-right-radius: calc(var(--radius-card) - 1px);
    }

    tbody tr:last-child td:first-child {
        border-bottom-left-radius: calc(var(--radius-card) - 1px);
    }

    tbody tr:last-child td:last-child {
        border-bottom-right-radius: calc(var(--radius-card) - 1px);
    }

    /*
     * DEFENSIVE — and it is the two rules above, taken back, not a
     * cosmetic tweak.
     *
     * Those exist because a <table> takes no `overflow: hidden` and so
     * clips nothing drawn in its own corners. Inside .panel--table the
     * card *does* clip — `.panel { overflow: hidden }` — and the last row
     * is no longer at the card's foot: the paging bar is. So the curve is
     * applied in the middle of a card, on whatever the row is tinted.
     * Measured at 1280: `border-bottom-left-radius: 7px` on a
     * --row-danger row directly above the bar's own top rule, faint in
     * light and plainly visible in dark, where --row-danger is #2c1518
     * against a #191b2b surface.
     *
     * The top pair is deliberately not cancelled: the header band really
     * is the top of the card and its curve is the card's own.
     *
     * Do not delete this by reading the rules above as harmless — they
     * are load-bearing for the tables that are *not* in a card, of which
     * this interface still has several.
     */
    .panel--table tbody tr:last-child td:first-child,
    .panel--table tbody tr:last-child td:last-child {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    thead {
        display: table-header-group;
    }

    tbody {
        display: table-row-group;
    }

    tr {
        display: table-row;
    }

    th,
    td {
        display: table-cell;
        text-align: left;
        border-bottom: 1px solid var(--line);
    }

    /*
     * The column names are the one text in the content that is not a
     * value — they are French written here, bounded, and the same on
     * every page. So they keep ordinary wrapping where main breaks
     * anywhere: with the inherited rule, a row holding a long
     * unbreakable value shrinks its column to one character and the
     * heading above it comes out as "Ét/at" over two lines. Nothing a
     * caller chooses reaches a th, so this costs no width.
     *
     * The header band is tinted, and its padding is tighter than a
     * cell's — both are the mockups', and the second is why the two
     * paddings could not stay in the rule above.
     *
     * The split also dropped `vertical-align: top` from the th, which
     * now inherits `middle` from its row like a cell. Stated because it
     * is a behaviour change and not only a reorganisation: it is
     * invisible today, column names being one line on every page, and
     * the mockups declare nothing there either.
     */
    th {
        padding: 0.5rem 0.75rem;
        color: var(--muted);
        font-size: 0.75rem;
        font-weight: 600;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        overflow-wrap: normal;
        background: var(--surface-tint);
    }

    /*
     * A cell is taller than its header and centres what it holds, which
     * is what puts a badge and a date on the same line as the action
     * beside them.
     */
    td {
        padding: 0.625rem 0.75rem;
        vertical-align: middle;
    }

    /*
     * An instant or a duration in the muted ink, so a wall of timestamps
     * does not compete with the values beside it.
     *
     * **The figures of one width are not declared here.** They come from
     * `.num` at the base, which the class has carried at every width
     * since a card wanted them too — restating them would be the same
     * value declared twice with nothing saying which is operative.
     *
     * **The ink is inside this query on purpose.** Below it a table is a
     * stack of cards where a value sits beside its own column name, and
     * `td::before` already draws that name in --muted, so muting the
     * value as well leaves the whole cell quiet.
     */
    td.num {
        color: var(--muted);
    }

    /*
     * The mockup's own quiet columns: the journal's trigger and its
     * name, which say who set an entry off rather than what happened.
     * Same ink and same reasoning as `td.num` right above — and it sits
     * in this query for the same reason, a stacked cell already drawing
     * its own column name in --muted.
     */
    td.quiet {
        color: var(--muted);
    }

    td::before {
        content: none;
    }

    td:empty {
        display: table-cell;
    }

    tbody tr {
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: var(--surface);
    }

    /*
     * The mockups stripe nothing: a row is told from the next one by its
     * rule, and the pointer says which one it is on. The tint is the
     * same faint surface the header band takes, which is how the
     * mockups write it too.
     *
     * On the row rather than on its cells, and that is the whole of what
     * makes the state tints below still visible: a cell's background
     * paints over its row's, so `tr:hover td` would take a failed row's
     * pink away whatever the order.
     */
    tbody tr:hover {
        background: var(--surface-tint);
    }

    /*
     * Re-declared inside the query, after the hover tint and qualified
     * the same way: `tbody tr:hover` and `tbody tr.build-row--failure`
     * are both (0,1,2), so only the order decides, and outside the query
     * these rules sit *above* it. A state is what the row is; a hover is
     * where the mouse is, and the first wins.
     *
     * **This block is not dead code**, and it looks it now that the
     * zebra stripe it used to outrank is gone. Delete it and a failed
     * build turns faintly grey under the pointer.
     * TestAStateTintOutranksTheHoverTint is the guard.
     *
     * **Only the fills are here.** Since the conformance pass of
     * 2026-08-19 the marks are inset box-shadows, and `tbody tr:hover`
     * sets no box-shadow — so a mark needs no copy, and the guard above
     * arbitrates backgrounds and nothing else. A rule that gains a fill
     * has to gain a line here too: that is what `--row-warn` on the
     * running build is, and leaving it out is the zebra defect exactly.
     */
    tbody tr.build-row--failure,
    tbody tr.activity-row--failure,
    tbody tr.hugo-entry--failure,
    tbody tr.webhook-call--rejected,
    tbody tr.webhook-row--rejected {
        background: var(--row-danger);
    }

    tbody tr.webhook-call--ignored,
    tbody tr.build-row--running,
    tbody tr.build-row--warning,
    tbody tr.user-row--expired {
        background: var(--row-warn);
    }

    tbody tr.build-row--cancelled {
        background: var(--surface-alt);
    }

    dl {
        grid-template-columns: minmax(8rem, 15rem) 1fr;
    }

    dd {
        margin-bottom: 0;
    }

    /*
     * The password boxes on one row, which is what the mockup draws.
     * The base rule is a single column, for the width where three tracks
     * would leave about 100 px apiece.
     */
    .field-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /*
     * The journal's filter panel, in the mockup's own three tracks. The
     * base rule is one column, for the width where three would leave a
     * date pair about 60 px per box.
     *
     * The range takes two of them because it holds two controls and an
     * arrow: given one track it is the only field on the panel that
     * cannot fit, and giving every field a wider track to suit it would
     * put three selects at half again the width of what they hold.
     */
    .filter-panel {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem 1.5rem;
    }

    .filter-range {
        grid-column: span 2;
    }

    /*
     * The category axis is the mockup's own two columns, and it needs
     * them: thirteen pills on one track wrap into a block taller than
     * the two axes beside it.
     */
    .filter-axis--wide {
        grid-column: span 2;
    }

    /*
     * The two-column content area, at the width a table becomes a table
     * again. Below it the two halves are stacked: the narrow one holds
     * the things waiting for someone, and it must not be squeezed into a
     * column too narrow to read them in.
     */
    .split {
        grid-template-columns: 1.35fr 1fr;
        align-items: start;
    }

    /*
     * The build detail's own proportion. Its narrow half holds four
     * short facts and a chronology of four steps, so it is a fixed
     * width and everything else goes to the console — where a share of
     * the page took ~425 px at 1280 and grew with the window, on a
     * column whose content does not.
     *
     * **The mockups fix it at 20 rem and this sets 30**, a departure
     * taken deliberately. `detailSideTrack` in
     * internal/acceptancetest/buildhistory_test.go reads this value
     * back in a browser, so the two move together or nothing says they
     * have not.
     *
     * **Declared after .split and tied with it at (0,1,0)**, so only
     * the order decides. And the template writes both classes: alone,
     * this rule sets a track on a box that is not a grid.
     */
    .split--detail {
        grid-template-columns: 1fr 30rem;
    }

    /*
     * The facts card, in the arrangement the mockups draw: the label on
     * the left in the quiet ink, the value hard against the right edge,
     * one line each.
     *
     * **It is a consequence of the track above and not a taste.** The
     * shared `dl` is `minmax(8rem, 15rem) 1fr`, which in the 20 rem
     * column this was first written against left an instant about
     * 35 px to render in: measured, every value
     * came out over **five** line boxes, one fragment per line —
     * `19/0` / `8/20` / `26` / `17:4` / `1`. Nothing had ever seen it,
     * because until the column was fixed the card was as wide as the
     * window happened to leave it.
     *
     * At (0,1,1) against the base rule's (0,0,1) it wins wherever it is
     * declared; it is here so the two halves of the same decision sit
     * together.
     */
    .split--detail dl {
        grid-template-columns: 1fr auto;
    }

    .split--detail dd {
        text-align: right;
    }

    /*
     * DEFENSIVE, and it is the trap of this whole layout. The two rules
     * immediately above are what give a facts card its
     * label-left/value-right shape for free — but they weigh (0,1,1),
     * and a bare `.pairs` weighs (0,1,0), so they beat it. Written that
     * way, a user's Compte card renders as two right-aligned columns
     * instead of the mockup's two-by-two grid, **with the whole suite
     * green**: no test in this repository reads a computed
     * `grid-template-columns` off it.
     *
     * `.split-stack .pairs` is (0,2,0) and its `dd` (0,2,1), which is
     * what wins the arbitration back. Do not shorten either selector.
     *
     * It sits in this query rather than at the base because two columns
     * of 156 px on a phone break a 28-character address over two lines;
     * below this width the base `dl { grid-template-columns: 1fr }` is
     * the right answer.
     */
    .split-stack .pairs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem 1.5rem;
    }

    .split-stack .pairs dd {
        text-align: left;
    }

    /*
     * The entry screen's grids take a second track here and their last
     * pair -- the entry's own message -- takes both, which is the
     * mockup's arrangement one breakpoint down from where it draws it.
     */
    .facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .facts-span {
        grid-column: span 2;
    }

    /*
     * The other half of `.panel--table`, and it is here rather than at
     * the base because below this width the border it takes the padding
     * away for is on the row instead of on the table — see the base
     * rule. Unconditional, this leaves the row-cards flush against the
     * card's own edge and doubles the line.
     */
    .panel--table .panel-body {
        padding: 0;
    }

    /*
     * DEFENSIVE. And what a body with no padding owes the one thing in
     * it that is not the table: the note under the call history, which
     * would otherwise touch both edges of the card. It is the rule this
     * file already states for `.panel--log`, applied to the other
     * modifier that strips a box's own spacing — with the *width* as the
     * condition rather than the rendered branch, since below 48em the
     * body keeps its padding and this rule has nothing to give back.
     */
    .panel--table .panel-note {
        padding-right: 1rem;
        padding-bottom: 0.875rem;
        padding-left: 1rem;
    }

    /*
     * Half of the pair that lets one template carry two wordings. The
     * other half is `.wide-only`, in the complement query below — read
     * them together, and never move one without the other.
     *
     * The server cannot know the viewport, so both wordings are
     * rendered and one is hidden. `display: none` is what makes that
     * honest: it removes the hidden copy from the accessibility tree,
     * so the heading announces one wording rather than both.
     * `textContent` still returns both at every width, which is why a
     * test about which one is *shown* has to read a computed style.
     */
    .narrow-only {
        display: none;
    }
}

/* The navigation column --------------------------------------------------- */

/*
 * The second breakpoint, and the only thing it decides is whether the
 * navigation is a column beside the content or a bar above it. It is
 * 64em rather than 48em because 15rem out of a 768px window is 31% of
 * it, and what is left does not read as a page: at 820px the content
 * had 548px, and it now has the whole 820. Below this width the nav is
 * the bar the phone gets. (The share was 27% while the column was
 * 14rem, which is the width that argument was first made at; the
 * conclusion only got stronger.)
 *
 * **That is a legibility decision and no longer an overflow fix**, so
 * do not restore 48em on the grounds that nothing overflows there any
 * more. It genuinely did — the grid refused to shrink below the widest
 * table and the page scrolled sideways — but the wrapping rule on main
 * closed that on its own, and with it in place a table at 48em
 * compresses to the 548px above instead. The two changes landed
 * together and only one of them was the cure.
 *
 * **This block is declared after the base nav rules and must stay
 * there.** `nav[…] ul` here and at the top of the sheet have identical
 * specificity, so only the order decides which of the column and the
 * bar wins where both apply.
 *
 * **The rows are restated because the areas below name two of them**
 * where the base block's template names three. Deleting that line
 * leaves a third row declared with nothing placed in it, and the 1fr
 * lands somewhere other than the content — which is how, while the
 * shell still ended in a footer, a 38px footer became 315px on a short
 * page. TestTheShellHoldsItsShapeOnEveryScreen catches it.
 *
 * The header spans the whole first row and the nav comes after it,
 * which is the one arrangement where the visual order and the focus
 * order agree: the DOM is skip link, header, nav, main, and a grid
 * cannot reorder the tab sequence to match a different picture.
 */
@media (min-width: 64em) {
    /*
     * DEFENSIVE. The state band is sticky at the top of every
     * authenticated page, so following an in-page link scrolls its
     * target to y=0 — under the band, which means the one thing the
     * reader jumped to is the one thing they cannot see. The settings
     * index is the first list of such links this interface has had.
     *
     * **It is scoped here and must not be hoisted to the base**, which
     * is where it was written first. Declared unconditionally it breaks
     * the phone menu's scroll restoration: measured on /settings at
     * 390 px, an offset of 3272 came back as 2850 — 422 px lost —
     * across one open and close of the panel, on a document that was
     * 4116 px tall at both ends and therefore never clamped anything.
     * Removing this one declaration and changing nothing else puts it
     * back. Scroll padding is part of what the anchoring algorithm
     * calls the optimal viewing region, and the panel hides and
     * restores `main` under it.
     *
     * Scoping costs nothing: the index is drawn only in this range, so
     * there are no in-page links below it, and the phone panel does not
     * exist above it.
     */
    html {
        scroll-padding-top: var(--band);
    }

    /*
     * The settings screen's second column, at the width the shell has
     * already taken one: past here the content box is 736 px at a
     * 1024 px window, and the jump list takes 14 rem of that, leaving
     * the form 496. It fits — a joined number and its unit ask 186 px
     * in a 223 px cell — and it is the price of the list.
     *
     * The consequence to know rather than rediscover: `input,select
     * { max-width: 28rem }` needs a 1474 px window to bind on this
     * screen and so binds on nobody's, the grid track being narrower
     * everywhere below that.
     *
     * `align-items: start` is what leaves the list something to travel
     * in. Stretched to the row it fills the page and sticky is inert.
     */
    .settings {
        grid-template-columns: minmax(0, 1fr) 14rem;
        gap: 1.5rem;
        align-items: start;
    }

    /*
     * The entry screen's four tracks, which is what the mockup draws.
     * The spanning pair keeps the two tracks it took one breakpoint
     * down: the mockup gives the message half the row and not all of it.
     */
    .facts {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    /*
     * The heading and the action sit on one line here, and the sentence
     * between them gives up the room. `.page-head` wraps by default,
     * and wrapping is what a flex row does *before* it shrinks: with the
     * index taking 14 rem the column is about 744 px, an intro capped at
     * the measure asks for some 520 and the button for 230, so the two
     * together miss by a few pixels and the button drops onto a line of
     * its own. Below this width there is no index, the column is wide
     * enough, and the wrap is the right answer on a phone anyway.
     */
    .settings-form .page-head {
        flex-wrap: nowrap;
    }

    .settings-form .page-head > :first-child {
        min-width: 0;
    }

    /* Three words on one line: the sentence is what gives, not this. */
    .settings-form .page-head-actions button {
        white-space: nowrap;
    }

    /*
     * DEFENSIVE, twice over.
     *
     * The offset is `--band` and not zero: the band is sticky at the
     * top of the page with a z-index of 2, so a list pinned to 0 spends
     * every scroll offset past the fold with its first entry and half
     * its second underneath it — 56 px of a list whose entries are 36.
     * This and `top: 0` on the band are one expression and move
     * together.
     *
     * And `top: auto` — the initial value — makes `position: sticky`
     * inert outright, which looks like the property having no effect
     * rather than like a missing offset.
     *
     * **No z-index here.** The band is positioned with 2 and this is
     * positioned with auto, so it paints underneath already; declaring
     * one is how that stops being true by accident.
     *
     * The height cap is the same shape `.nav-inner` carries: a list
     * taller than the space under the band has entries no scroll offset
     * can reach.
     */
    .settings-nav {
        display: block;
        position: sticky;
        top: var(--band);
        grid-column: 2;
        grid-row: 1;
        max-height: calc(100dvh - var(--band));
        overflow-y: auto;
    }

    body.has-shell {
        grid-template-columns: 15rem 1fr;
        grid-template-areas:
            "header header"
            "nav main";
        grid-template-rows: auto 1fr;
    }

    /*
     * The sidebar. The column carries the border and the scroll, not the
     * lists inside it: the menu is five blocks now rather than one, and a
     * border on each would draw four hairlines down the page.
     *
     * **min-height: 0 on the nav.** A grid item's automatic minimum is
     * its content, so a menu taller than the window pushes the row past
     * `1fr` and takes whatever follows off the bottom of the screen with
     * it — which is what a bar of eight flat entries never did and five
     * labelled blocks can.
     *
     * **The landmark stretches and the box inside it sticks**, which is
     * why there is a box inside it at all. `margin-top: auto` used to put
     * Mon compte and Se déconnecter at the foot of the column, and the
     * column is a grid item that stretches to its row — so on a page
     * taller than the window they sat at the foot of the *document*,
     * several screens down, on every screen that scrolls.
     *
     * The two cannot be one element: capping the landmark itself stops
     * its background and its divider where the menu ends, leaving a white
     * column two thirds of the way down a grey page. So the landmark
     * keeps the fill and the edge, and carries no layout.
     *
     * **display: flex stays, and it is not about layout.** nav.js
     * collapses the menu on every load whatever the width, and this
     * declaration at (0,1,1) is what outranks
     * `.shell-nav--collapsed { display: none }` at (0,1,0) and brings the
     * column back past the breakpoint. Dropping it while moving the
     * arrangement inwards left every desktop screen with no menu at all —
     * eight acceptance tests unable to click Se déconnecter.
     */
    nav[aria-label="Navigation principale"] {
        display: flex;
        min-height: 0;
        padding: 0;
        border-bottom: 0;
        border-right: 1px solid var(--line);
    }

    /*
     * DEFENSIVE. Past this width the band is exactly --band tall, and
     * the navigation column below subtracts that constant from the
     * viewport — so a band that grows puts the way out below the fold
     * by however much it grew, at rest, where nothing above the fold
     * says why.
     *
     * The band grows because it wraps, and it wraps on a value nothing
     * bounds: create-first-user stores the address as the account's
     * name, and the login handler records what an unauthenticated
     * caller typed. Measured with a 128-character address holding no
     * wrap opportunity: 76.5px at 1280 and 107.5px at 1050 against the
     * 56 the mockups draw, and the logout button 6.5px and 37.5px below
     * the window.
     *
     * So the two free-text values give up their second line here and
     * end in an ellipsis instead. **That is a narrowing of what the
     * band shows, deliberately**: the band is chrome, /account is where
     * an operator reads their own name in full, and a bar whose height
     * depends on a caller-chosen string is not a fixed point.
     *
     * **flex-wrap: nowrap is not enough on its own, and that was
     * measured the hard way.** It stops the items forming a second flex
     * *line*; it does nothing about the text inside them, and flex
     * distributes shrinkage over every item in proportion to its base
     * size — so the writing the application chose (the product name, the
     * published state) wrapped instead, and the band came out 66px at
     * 1280 and 84px at 1024 with only the ellipsis rules in place. The
     * boxes that must not shrink therefore say so, and what is left
     * falls entirely on the two that can end in an ellipsis.
     *
     * Below this width the band keeps its wrap: it carries the menu
     * button there, it is allowed to be two lines, and nothing
     * subtracts its height from anything.
     */
    header,
    .shell-live {
        flex-wrap: nowrap;
    }

    /*
     * **The two wrappers are not in this list, and must not be.** They
     * already carry min-width: 0, so shrinkage passes through them and
     * lands on the ellipsis boxes inside. Making a wrapper flex: none
     * would give it the host name's whole width as a base size and push
     * the *page* sideways instead — the defect one section up, from the
     * other direction.
     */
    .brand-name,
    .shell-served,
    .shell-run {
        flex: none;
        white-space: nowrap;
    }

    /*
     * **overflow is what keeps these two shrinkable, not only what
     * clips them.** A flex item's automatic minimum size is its
     * min-content, which white-space: nowrap makes the whole string —
     * and only a non-visible overflow takes that floor away. Measured
     * with a 51-character host name and this one declaration removed:
     * the band goes to 291px. min-width: 0 says the same thing twice,
     * on purpose, because the ellipsis is what a reader sees and the
     * floor is not.
     */
    .brand-host,
    .shell-user {
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /*
     * The box stands from under the band to the foot of the window, and
     * that height is what makes the account block's margin-top: auto
     * safe. The landmark around it stretches to the *document*, so
     * pushing to the bottom of *that* put the way out several screens
     * down; this box sticks, so its bottom is the window's.
     *
     * **top and height are one expression and must move together.** The
     * band is sticky at 0, so this box pins at exactly its height and
     * takes exactly what is left — at every scroll offset, which is what
     * an earlier version pinned at top: 0 could not do: it was right at
     * rest and --band short once the page had scrolled.
     *
     * **They name a constant, so the rule above that keeps the band to
     * one line at this width is part of this mechanism**, not a separate
     * piece of typography. A band taller than --band puts the way out
     * below the fold.
     *
     * overflow-y covers the day the menu outgrows the window, and only
     * then. Do not reach for a cap on the landmark, or align-self:
     * start there — .claude/rules/shellstyle.md records what each does.
     */
    .nav-inner {
        /*
         * **flex: 1 is what gives the column its width, and it is not
         * decoration.** The landmark around this box is a *row* flex
         * container with a single child, so that child is sized by its
         * content unless it is told to grow — measured, 151.5px of box
         * in a 240px track, which makes the current entry's tint a tag
         * around its label instead of the band across the column the
         * mockups draw. The height was right throughout, which is why
         * the symptom reads as an entry that is too small.
         */
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 0.875rem;
        position: sticky;
        top: var(--band);
        height: calc(100dvh - var(--band));
        overflow-y: auto;
        padding: 0.875rem 0.625rem;
    }

    /*
     * The wrap the base rule sets for the bar goes with the direction,
     * for the reason the phone panel's copy of this rule records: a
     * wrapping column takes its line's cross size from the line rather
     * than from the container, so one over-wide entry stretches the
     * lot. Inert here — nothing this column draws is unbounded — and
     * kept because the next value put in one will not be measured.
     */
    nav[aria-label="Navigation principale"] ul {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 0.125rem;
        padding: 0;
    }

    /*
     * The column's own target height. The bar below this width keeps the
     * taller one: a menu reached by thumb is not the same control as a
     * menu reached by pointer, and this is the mockups' own split.
     */
    nav[aria-label="Navigation principale"] a,
    .nav-block--footer button {
        min-height: 2.25rem;
    }

    /*
     * Past this width the column is always there, so the disclosure has
     * nothing to disclose.
     *
     * **Hiding the button is the whole rule, and the menu comes back on
     * its own.** The `nav[aria-label=…]` block above sets `display: flex`
     * at (0,1,1), which outranks the base `.shell-nav--collapsed` at
     * (0,1,0) whatever the declaration order — so a menu collapsed on a
     * phone reappears the moment the window widens, and nobody is
     * stranded with the control gone. A second rule restating that here
     * was written first and deleted: it changed nothing, and a "both
     * halves are needed" that the cascade contradicts is worse in this
     * sheet than no comment at all.
     */
    .nav-toggle {
        display: none;
    }
}

/* The narrow band ---------------------------------------------------- */

/*
 * Everything below here is a *complement*: `not all and (min-width: X)`
 * is exactly "the query above did not match", where a max-width would
 * leave a hairline of widths matching neither. Both blocks are declared
 * after the column's, so nothing here can be reordered into it — and
 * neither header text contains the spelling internal/assets'
 * cascade_test.go slices the table query on, which is a real hazard
 * worth knowing about before writing a comment between the two.
 *
 * **There are two complements and they are not the same subject.** The
 * phone's band is a phone's: the mockups draw it at 390 and the split
 * between 48em and 64em exists precisely because the band in between
 * does not read as a phone. The *panel* belongs to every width where the
 * column is not there, which is the wider of the two. So the band's
 * treatment stops at 48em and the menu's carries on to 64em.
 *
 * The band is two strips here, which is what the mockups draw: the brand
 * and the disclosure on the fill the desktop band uses, what the site is
 * doing on a step lighter below it.
 */
@media not all and (min-width: 48em) {
    /*
     * The header stops padding itself and each of the three parts pads
     * its own strip, so the lower one can run edge to edge with a fill
     * of its own. row-gap goes with it: a gap between the two strips
     * would show the fill underneath as a third colour.
     */
    header {
        padding: 0;
        row-gap: 0;
    }

    /*
     * DEFENSIVE, and it is the whole of what makes this two strips
     * rather than three.
     *
     * A flex line is filled by each item's *hypothetical* main size, and
     * `min-width: 0` does not enter that arithmetic — it only removes the
     * automatic minimum once the line is chosen. With the default
     * `flex-basis: auto` the brand is therefore as wide as its content,
     * host name included, and `server.admin_host` is an operator-chosen
     * name bounded by nothing: a long one pushes the *button* onto a
     * second line and the state onto a third. `flex: 1 1 0` makes the
     * base zero, so the first line is always the brand and the button.
     *
     * And the product name has to refuse to wrap, or shrinkage is shared
     * out in proportion and "Hugo Frontend" gives way instead of the
     * address — the same defect the desktop band measured at 66px and
     * 84px, on the other side of the breakpoint.
     *
     * **`white-space: nowrap` alone is what does that here**, without
     * the `flex: none` its twin past the shell breakpoint carries: with
     * the overflow left visible the automatic minimum *is* the whole
     * string, so nothing can shrink it below its own text. Measured by
     * deleting it: nothing moved.
     *
     * The asymmetry is not between the two blocks — it is between this
     * box and `.shell-served`/`.shell-run`, which declare `min-width: 0`
     * **on themselves** and so give that floor up. Those two need the
     * pair; a box holding a bare text node never did.
     */
    .brand {
        flex: 1 1 0;
        padding: 0.625rem 0.875rem;
    }

    .brand-name {
        white-space: nowrap;
    }

    /*
     * The host name is what gives way, and overflow is what lets it: a
     * flex item's automatic minimum is its min-content, which
     * white-space: nowrap makes the whole string, and only a non-visible
     * overflow takes that floor away.
     *
     * The mockups draw no host name on this band at all. It is kept
     * because it has nowhere else to go — unlike the signed-in name
     * below, which the menu takes over.
     *
     * **This pair and .brand-name's are written here and past the shell
     * breakpoint, and the band between the two gets neither.** That is
     * deliberate: there the band is allowed its second line, it carries
     * the menu button, and no mockup describes that width. Do not read
     * one copy as covering the other, and do not delete either on the
     * strength of the other existing.
     */
    .brand-host {
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-toggle {
        margin: 0.375rem 0.875rem 0.375rem 0;
    }

    /*
     * The lower strip. **order rather than a move in the markup**: the
     * button has to sit on the brand's line and it is written last, so
     * either the state moves after it or the button moves before the
     * state — and moving the button would put it in the middle of the
     * band's `space-between` at every width between the two breakpoints,
     * where it is still drawn. Nothing else in the band is focusable, so
     * the visual order and the focus order cannot disagree for anybody.
     */
    .shell-live {
        order: 1;
        flex-basis: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.1875rem;
        font-size: 0.8125rem;
    }

    /*
     * DEFENSIVE. The fill hangs off the modifier and never off the box,
     * because the box is unconditional and everything in it is
     * conditional: a state nobody could read would otherwise paint a
     * full-width strip of a second colour holding nothing, on all
     * fourteen screens at once. The stylesheet cannot see which branch
     * rendered — layout.templ writes the modifier, the same shape
     * panel--log takes.
     *
     * **The padding is on the modifier too, and that is not tidiness.**
     * The box is drawn either way; left on the base rule it gives an
     * unreadable state a strip of empty band, some 18px tall, on the
     * fourteen screens at once. With both here, a strip with nothing to
     * say has no height at all.
     */
    .shell-live--filled {
        padding: 0.5rem 0.875rem 0.625rem;
        background: var(--chrome-band);
    }

    /*
     * The running build gives up its pill here, and the reason the base
     * rule gives is why: a pill is what lets one thing be picked out of
     * a row without being read. This is a column of two lines, so the
     * fill buys nothing and the mockups draw none — the ink it already
     * carries does the work. contrast_test.go's phoneBandPairs() is what
     * checks that ink, and its dot, against this strip.
     */
    .shell-run {
        padding: 0;
        background: transparent;
    }

    /*
     * The signed-in name is not on this band. There is no room for it
     * beside a 44px target on a 390px screen, and the mockups move it
     * onto the menu's account entry instead — so the two declarations
     * are one decision and must move together.
     */
    .shell-user {
        display: none;
    }

    .nav-detail {
        display: block;
        margin-left: auto;
        min-width: 0;
        font-size: 0.8125rem;
        color: var(--muted);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* The Dashboard on a phone ---------------------------------------- */

    /*
     * The phone mockup tightens every metric of a tile: the card, its
     * caption and its figure. One screen, one set of values — this is
     * the only place in the sheet where `.tile*` is sized twice.
     */
    .tile {
        padding: 0.75rem 0.875rem;
        gap: 0.25rem;
    }

    .tile-label {
        font-size: 0.6875rem;
    }

    .tile-figure {
        font-size: 1.375rem;
    }

    /*
     * The phone mockup draws one tile — what the site is serving — and
     * puts the errors and the chronology under it. Hugo's version and
     * the hook's last run are what an operator opens a laptop for.
     *
     * **A class, never `:nth-child` and never a `data-testid`.** A
     * positional selector breaks the day a tile is added or reordered,
     * silently and in the direction that hides the wrong one; styling a
     * test identifier makes a selector meant for tests into a rendering
     * contract.
     */
    .tile--secondary {
        display: none;
    }

    /*
     * DEFENSIVE, and `flex-wrap` is the half that is not obvious — the
     * third time this sheet has paid for it, after `nav ul` and the
     * brand strip.
     *
     * The base rule is a wrapping row aligned on `flex-end`. Turning the
     * direction to column and stopping there carries both of those over:
     * a wrapping *column* takes each line's cross size from that line,
     * which is what put 963px of `<li>` in a 362px `<ul>` the last time,
     * and `flex-end` on a column aligns on the *inline* axis, so the
     * heading and the actions come out flush right. Neither is measured
     * by anything — the only `.page-head` assertion runs at 1280.
     */
    .page-head {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
    }

    /*
     * One action, full width, which is what the mockup draws. The second
     * button is not here at all — it carries `.wide-only`.
     */
    .page-head-actions {
        flex-direction: column;
    }

    /*
     * The link-drawn-as-a-button too, and not `button` alone: three of
     * the five screens carrying this row put an `<a class="button-link">`
     * in it (`/users`, `/webhooks`), which is an inline-flex box a
     * `button` selector never reaches — leaving a content-width action
     * in a column of full-width ones, on a phone, measured by nothing.
     */
    .page-head-actions button,
    .page-head-actions .button-link {
        width: 100%;
    }

    /*
     * The errors come before the chronology, as the mockup orders them:
     * what needs doing above what happened.
     *
     * `order` on the wrapper rather than on the three panels, because it
     * applies to grid items as they stand — `.split` is already a single
     * column here and switching it to flex would only change what its
     * gap interacts with. The consequence is that "En attente d'action"
     * rises with the errors, which the mockup does not draw at all; that
     * is the right side of the uncertainty, since an account waiting on
     * someone outranks a list of things that already happened.
     *
     * **What this cannot fix is the focus order.** A grid cannot reorder
     * the tab sequence, so on a phone the chronology's links are tabbed
     * before the errors panel that is drawn above them. The same trade
     * this sheet already records for the navigation column, and the
     * keyboard suite cannot see it: no flow runs at this width.
     */
    .split-side {
        order: -1;
    }

    /*
     * The chronology loses its date column, which the phone mockup does
     * too: three tracks, marker, event, duration.
     *
     * **This works only because the duration has a class of its own.**
     * Both cells wore `.timeline-when` until this pass, so the one rule
     * below would have taken every elapsed time with it — including the
     * running build's, the one number worth having on a phone — and
     * the grid would have degraded cleanly enough that nothing looked
     * wrong.
     */
    .timeline {
        grid-template-columns: 16px 1fr auto;
        gap: 0 0.625rem;
    }

    /*
     * The course narrows with the chronology, and it says so rather than
     * inheriting it. **Both rules compute the same value today**, so this
     * one is insulation and not a correction: the rule above wins here
     * whatever this says — both weigh (0,1,0), a media query adds no
     * specificity, and it is declared later — so the day the chronology's
     * phone track changes for a reason of its own, the course does not
     * follow it silently.
     *
     * The mark column is the same width in both because the mark is the
     * same 11 px dot; what the base rule gives the course and this takes
     * back is only the desktop gutter.
     */
    .timeline--steps {
        grid-template-columns: 16px 1fr auto;
    }

    .timeline-when {
        display: none;
    }

    /*
     * The other half of the pair; `.narrow-only` is in the complement
     * query and the two must always move together.
     *
     * **Last in this block on purpose.** It weighs (0,1,0), and so do
     * several `display` rules above it — `.nav-detail` sets `block`
     * here. Declared earlier it would lose the tie to any of them.
     */
    .wide-only {
        display: none;
    }
}

/* The menu as a panel ------------------------------------------------ */

/*
 * Below the column's breakpoint the menu is a disclosure, and what it
 * discloses is the screen: the mockups draw the brand strip and then the
 * menu to the foot of the window, with no content behind it.
 *
 * **Every rule is keyed on the button rather than on the menu's own
 * class, and that is what keeps a browser running no script usable.**
 * The button is served hidden with aria-expanded="false" and nav.js is
 * the only thing that opens it, so with no script none of this applies
 * and the menu stays the in-flow bar it has always been. Keyed on
 * `.shell-nav--collapsed` instead, the same browser would get a
 * full-screen panel over the page, permanently, with no way to close it.
 *
 * It is also what forces `:has()`: `.shell-live` is *inside* the header,
 * a preceding sibling of the nav, so no sibling combinator reaches it. A
 * class on <body> would do the same job and is not taken, because it
 * would be a third spelling of a fact that already has two — where this
 * derives from one of them. Where `:has()` is not understood the fall
 * back is the bar, not a broken page.
 */
@media not all and (min-width: 64em) {
    /*
     * Two rows, not three: the content gives up its row and the menu
     * takes the free one. The named areas still declare three, so the
     * third falls back to `auto`, receives nothing — main is not a grid
     * item at all once it is display: none — and computes to zero.
     *
     * **The panel's height comes from the 1fr and never from a
     * calc(100dvh - var(--band)).** A band that grew would then hang the
     * panel below the fold by exactly the excess, which is the failure
     * the column past this breakpoint has to guard against; here a taller
     * band simply leaves the panel less room. Do not tidy it into a calc.
     */
    body.has-shell:has(.nav-toggle[aria-expanded="true"]) {
        grid-template-rows: auto 1fr;
    }

    /*
     * DEFENSIVE, and the skip link is the half that is not obvious.
     *
     * main goes because that is what the mockup draws, and because it is
     * what keeps the focus out of content nobody can see — display: none
     * takes the whole subtree out of the tab order and the accessibility
     * tree at once. The skip link then points at a landmark that is not
     * rendered: left in place it is the first tab stop on the page and
     * it does nothing at all.
     *
     * **This is not the rule that says the skip link must never be
     * hidden with display.** That one is about its resting state, where
     * an element that is not displayed can never take the focus its
     * :focus rule is waiting for. Here it is exactly what is wanted, and
     * only while the panel is open.
     */
    body.has-shell:has(.nav-toggle[aria-expanded="true"]) > main,
    body.has-shell:has(.nav-toggle[aria-expanded="true"]) .skip-link,
    body.has-shell:has(.nav-toggle[aria-expanded="true"]) .shell-live {
        display: none;
    }

    /*
     * min-height: 0 is what lets a menu taller than the window scroll
     * inside its row instead of pushing the grid past the viewport —
     * a grid item's automatic minimum is its content. The border goes
     * because there is nothing under the panel for it to separate.
     */
    body.has-shell:has(.nav-toggle[aria-expanded="true"]) > nav {
        display: flex;
        min-height: 0;
        overflow-y: auto;
        border-bottom: 0;
    }

    /*
     * The same box the column uses, without the sticky arithmetic: it is
     * the single child of a *row* flex container, so `flex: 1` is what
     * gives it the width, and it stretches to the row's height, which is
     * what gives `margin-top: auto` on the account block something to
     * push into.
     */
    body.has-shell:has(.nav-toggle[aria-expanded="true"]) .nav-inner {
        flex: 1;
        /*
         * DEFENSIVE. `flex: 1` sets the base to zero and leaves the
         * *automatic minimum* — min-content — in place, and this box
         * holds a value nobody bounded: the account entry carries the
         * signed-in name here, and create-first-user stores an address
         * as the name. Without this the box comes out wider than the
         * column it sits in, so the entry's own ellipsis has nothing to
         * give way inside.
         *
         * The column past the shell breakpoint needs none of it, because
         * the entry's name is not drawn there — the band shows it. The
         * two are one decision and this is the half that pays for it.
         */
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 0.875rem;
        padding: 0.875rem;
    }

    /*
     * DEFENSIVE, and flex-wrap is the half that is not obvious. The base
     * rule wraps because it lays the bar out; a *wrapping column* takes
     * each line's cross size from that line's contents rather than from
     * the container, so an entry wider than the column stretches every
     * entry to its width instead of being made to give way. Wherever
     * this direction goes to column, the wrap has to go with it.
     */
    body.has-shell:has(.nav-toggle[aria-expanded="true"])
    nav[aria-label="Navigation principale"] ul {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 0.125rem;
        padding: 0;
    }
}
