/* ===== TOKENS AND THE TWO THEMES [tokens] =====
   The palette, the type scale, radii and space: light first, then the dark theme pinned and from the system.
*/

/* The AISM suite design system (owner direction 2026-08-26, matching the
   Workforce product): near-white ground, indigo accent, lavender data with
   orange for attention, a grotesque sans for content and a MONOSPACE for
   every piece of metadata. Navy/teal stay for the board packet's brand strip. */
:root {
  --bg: #f7f7f9; --surface: #ffffff;
  --ink: #16161d; --muted: #6b6b76; --line: #e8e8ee; --line-soft: #f1f1f5;
  --accent: #5b5bd6; --accent-hover: #4949c4; --accent-soft: #ececfb;
  --lav: #c9c9f2; --lav-soft: #e3e3f8;
  --attn: #e8833a; --attn-bg: #fdf1e6; --attn-line: #f2d0ad; --attn-ink: #9a5717;
  --gutter-w: 40px; --cut-w: 24px; /* measured by grid.js per container; these are the fallbacks */
  --teal: #00CAFF; --navy: #0C1834;
  --ok: #1f8a54; --ok-bg: #eaf7ef; --ok-line: #bfe6cd;
  --warn: #b5691f; --warn-bg: #fdf3e7; --warn-line: #f4dcbb;
  /* TEXT ON THE OK AND WARN TINTS (critique 2026-09-28), as --attn-ink is
     for the attention tint: --ok on --ok-bg measured 3.95:1 and --warn on
     --warn-bg 3.83:1, on the two tags that say whether a month can be
     trusted ("Attested", "revisions pending"). These clear 4.5:1 (5.2, 5.3). */
  --ok-ink: #17744a; --warn-ink: #935616;
  --err: #c0392b; --err-bg: #fdecea; --err-line: #f6cdc8;
  --topbar: #ffffff; --topbar-ink: #16161d;
  --sans: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --surface-2: #f4f5f8; --track: #eceef3; --sum-bg: #f8fafc;
  --ink-2: #3a3d46; --muted-2: #8b8d99; --accent-line: #cfcff5;
  --inverse: #16161d; --inverse-ink: #ffffff;
  /* A FILLED ACCENT CONTROL'S BACKGROUND (review 2026-09-08, 06-N18). The
     owner's theme rule settles the ink — white in both themes — so the
     background is what has to move: the dark `--accent` #8b8bf0 is a text
     surface, and white on it is about 3.0:1, under the 4.5:1 AA floor. In
     light this IS `--accent`; in dark it is the fill that clears 4.5:1.
     A test computes the ratio from these declarations. */
  --accent-fill: #5b5bd6; --accent-fill-hover: #4949c4;
  /* the forecast tint must out-rank the subtotal band and the row hover
     (both --surface-2 #f4f5f8) or a projection reads as an actual
     (review 2026-09-08, N7) */
  --fc-bg: #f1f1fb; --fc-bg-hover: #e9e9f7; --fav-ink: #1f8a54; --fc-ink: #4a4a7a;
  /* the chart palette (SPEC §6.37): read by viz.js at draw time, never a hex
     there. The reference order is actual > plan > prior year, and it has to
     read in GREYSCALE: --viz-plan and --viz-prior were 7% of luminance apart
     and were one tone in a photocopied packet (review 2026-09-08, 05-N8), so
     the plan was darkened to 4.07:1 against the prior year's 3.17:1 — a 35%
     luminance step, both still over WCAG 1.4.11's 3:1. */
  --viz-actual: #5b5bd6; --viz-plan: #7c7d8b; --viz-prior: #949181; --viz-rule: #e8833a;
  /* the ORIGINAL PLAN (SPEC §6.96): a slate teal between the plan and the
     prior year in tone, 3.88:1 on white; its dash-dot carries greyscale */
  --viz-original: #5a8a85;
  /* the gridlines describe the SAME relationship in both themes (review
     2026-09-08, 05-T11): the dark fix was raised past the light values it
     was matched to, so the CFO's default theme became the harder one to
     carry a mid-window point across — light 1.14:1 against dark 1.37:1.
     #d9dbe3 measures 1.38:1 on white and #b9bcc9, the zero line, 1.89:1,
     the dark pair's own ratios. */
  --viz-neg: #c0392b; --viz-grid: #d9dbe3; --viz-axis: #b9bcc9;
  /* the one-time-fee tail on a revenue bar is a SERIES, not an alarm: it wore
     --attn and was the longest element on the client-mix widget, which told a
     director something was wrong with the biggest client (review 2026-09-08,
     04-N4). A second sequential step off --viz-actual — same hue family,
     lighter — so the two read as one category split in two. */
  --viz-fee: #a3a3e8;
  /* THE PAPER PALETTE, DECLARED ONCE (review 2026-09-07, N14): the board
     sheet is paper-white in both themes, and its light values lived as three
     hand-maintained copies — here, in `.board-sheet`, and again as literal
     hexes in board_pdf.html, so a brand colour change would land on the app
     and not on the artifact the board receives. These aliases are the
     source: `.board-sheet` consumes them and routes.LIGHT_PALETTE carries
     the same pairs into the PDF. Four differ from the screen's own values on
     purpose — ink, muted and the two rules are a shade darker on paper. */
  --surface-light: #ffffff; --bg-light: #f7f7f9; --ink-light: #14161c; --ink-2-light: #3a3d46;
  --muted-light: #6b6f7c; --line-light: #e4e6ec; --line-soft-light: #eef0f4;
  --surface-2-light: #f4f5f8; --track-light: #eceef3; --sum-bg-light: #f8fafc;
  --muted-2-light: #8b8d99; --inverse-light: #16161d; --inverse-ink-light: #ffffff;
  --accent-light: #5b5bd6; --accent-hover-light: #4949c4; --accent-soft-light: #ececfb;
  --accent-line-light: #cfcff5; --lav-light: #c9c9f2; --lav-soft-light: #e3e3f8;
  --attn-light: #e8833a; --attn-bg-light: #fdf1e6; --attn-line-light: #f2d0ad;
  --attn-ink-light: #9a5717;
  --ok-light: #1f8a54; --ok-bg-light: #eaf7ef; --ok-line-light: #bfe6cd; --fav-ink-light: #1f8a54;
  --warn-light: #b5691f; --warn-bg-light: #fdf3e7; --warn-line-light: #f4dcbb;
  --err-light: #c0392b; --err-bg-light: #fdecea; --err-line-light: #f6cdc8;
  /* the CHART palette on paper (review 2026-09-08, 03-N17): board_pdf.html
     forked these as literal hexes under `.charts`, so a brand colour change
     landed on the app and not on the sheet. --viz-actual-light IS
     --accent-light; the other six had no twin anywhere. */
  --viz-actual-light: #5b5bd6; --viz-plan-light: #7c7d8b; --viz-prior-light: #949181;
  --viz-rule-light: #e8833a; --viz-neg-light: #c0392b; --viz-grid-light: #d9dbe3;
  --viz-axis-light: #b9bcc9; --viz-original-light: #5a8a85;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(22, 22, 29, .04), 0 4px 14px rgba(22, 22, 29, .05);
  /* THE KIT (redesign 2026-09-21, family 1 section A): the foundation the
     screen families are built on. The stylesheet carried 13 radii, 25 font
     sizes and no spacing rule at all, so every block invented its own. These
     are the scale; sections B (the pop-out) and C (the page head, tabs,
     filter bars) consume them BY NAME and declare none of their own. */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px;
  --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-pill: 999px;
  /* ONE control height, so a field, a button, a select and a filter sit on
     one baseline; raised on a coarse pointer at the end of this file */
  --ctl-h: 34px; --ctl-h-sm: 28px;
  --t-label: 11.5px; --t-sm: 12.5px; --t-table: 13px;
  /* THE CLOSED SCALES (UI rule 7, SPEC §6.124): one token per text size and
     the 4px radius, named by their size. --t-label, --t-sm and --r-sm are off
     the scale (legacy; the screen packages retire them). Weights and
     breakpoints stay literals: a media query cannot read a custom property. */
  --t-12: 12px; --t-13: 13px; --t-14: 14px; --t-16: 16px; --t-20: 20px; --t-28: 28px;
  --r-4: 4px;
  /* A FIELD'S EDGE IS A STEP STRONGER THAN --line: --line draws a card's
     hairline, and a slot a person types into has to read as a slot. */
  --field-line: #d3d4de;
  /* the scrim is NEUTRAL: the old rgba(15,23,42,.35) was navy, and over the
     dark ground it removed almost no luminance while adding a blue cast */
  --scrim: rgba(14, 14, 20, .46);
  /* a pop-out's lift. In dark a shadow is invisible, so the dark value adds a
     hairline of light at the panel's edge instead. */
  --shadow-pop: 0 18px 50px rgba(14, 14, 20, .20), 0 2px 8px rgba(14, 14, 20, .08);
  /* THE EDGE OF A SCROLLER (kit section D): the haze a cut body draws at its
     top and bottom, so a panel that continues past its own edge says so. */
  --shade-edge: rgba(14, 14, 20, .16);
  /* THE SHELL (redesign 2026-09-22, family 2). Two colours in the rail had no
     dark value at all. THE COMPANY'S MARK had `--navy`, which is declared once
     in `:root` and never redefined, so the chip dissolved into the dark rail
     and only the white initials floated; it gets a token of its own, because
     `--navy` is the console frame's brand colour and the board sheet's, and
     moving it would move those. The light value IS the old navy, so nothing
     changes in the default theme or inside the AISM frame's light palette.
     THE RAIL'S GROUND was `--surface` — the same value every content card
     wears — so the one element on screen that must never look like a card
     looked like a very tall one. It is a step off the page ground now: a
     shade below the cards in dark, a shade below the page in light. */
  --mark-bg: #0C1834;
  /* THE LIGHT VALUE IS A STEP, NOT A RUMOUR (review 2026-09-22): #f4f5f8 was
     within 3/255 of the page's own #f7f7f9, so the rail and the ground it sits
     on read as one surface and the mobile bar had a single hairline holding it
     apart from the page scrolling under it. #eff0f4 is a value a reader can
     see, and the content cards stay white above it. The dark value is
     unchanged. */
  --rail-bg: #eff0f4;
}

/* ==== THE LIST TABLES, FIFTH REVIEW (2026-09-08) ========================
   Rules that must win the cascade over the family's own dialects above, so
   they sit at the end of the list block. */

/* N8 — the last hard-coded white in this family. A filled accent control keeps
   white ink in BOTH themes (CLAUDE.md), which is not what `--inverse-ink`
   means (it flips with `--inverse`), so the ink gets its own token and the
   value stops being a literal. */
:root { --on-accent: #ffffff; }

@media (pointer: coarse) {
/* The product had ONE good field rule, scoped to `.login-box`, `.attest-form`
   and `#reason`, so every other form fell through to the user agent: the New
   decision pop-out's three fields, the help centre's search, the GL import's
   file button, the contract pop-out's plan rows. It had five filled-button
   treatments, white ink on the dark theme's `--accent` at about 3:1, and no
   focus ring of its own on most controls.

   Everything below is a BASELINE. The container lists are wrapped in
   `:where(...)`, so the block carries ZERO specificity and every rule already
   written for a surface still wins: the kit fills what is empty, it does not
   fight what is designed. The exceptions are named one by one — the button
   roles, whose treatment this section owns.

   THE CONTAINERS it reaches (a product form, a filter bar, a pop-out):
     .access-body .access-panel .form-grid .ctrl-row .pw-form .setup-form
     .ledger-filter .audit-filter .list-toolbar .help-find .ov-panel
     .settings-shell .dqm-record .dec-form .assign-bar .upload-bar
     .signoff-form .rate-add
   and the ones it must NEVER reach, whose cells the grid's JS measures:
     table.grid  .driver-grid  .lines-table  (the GL import's mapping table
     wears `.lines-table`, so it is out by the same guard) — plus any other
     table cell, which keeps a list page's row height exactly as it was. */

/* -- the pointer decides the control height ------------------------------- */
/* one token, so a field, a button, a select and a filter all grow together on
   a touch screen instead of each family inventing its own phone size */
  :root { --ctl-h: 40px; --ctl-h-sm: 34px; }
}

/* ------------------------------------ light / dark (owner request 2026-09-06) --- */
/* the system setting by default; the rail's toggle pins light or dark per
   browser (data-theme on <html>, set before the first paint) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #0b0c10; --surface: #17181d;
  --ink: #ecedf3; --muted: #9a9ba8; --line: #31323d; --line-soft: #272831;
  --accent: #8b8bf0; --accent-hover: #a3a3f5; --accent-soft: #24244a;
  --lav: #4a4a8a; --lav-soft: #2c2c4f;
  --attn: #f09a5c; --attn-bg: #3a2a1c; --attn-line: #5a3f24; --attn-ink: #f3b07a;
  --ok: #4fc784; --ok-bg: #17301f; --ok-line: #245c37;
  --warn: #e6a35a; --warn-bg: #34281a; --warn-line: #5a4225;
  --ok-ink: #4fc784; --warn-ink: #e6a35a;
  --err: #ef6b5c; --err-bg: #3a1f1c; --err-line: #6b2f29;
  --surface-2: #1d1e25; --track: #262730; --sum-bg: #1b1c22;
  --ink-2: #c8cad4; --muted-2: #6a6b78; --accent-line: #3c3c7a;
  --inverse: #ecedf3; --inverse-ink: #16161d;
  /* white text on the light-theme accent is 3.0:1 in dark: the FILL darkens,
     the ink stays white (owner theme rule; review 2026-09-08, 06-N18) */
  --accent-fill: #6666dd; --accent-fill-hover: #5555cc;
  --fc-bg: #26263f; --fc-bg-hover: #2e2e4b; --fav-ink: #4fc784; --fc-ink: #b8b8ea;
  /* the same order in dark: the plan brighter than the prior year, both
     over 3:1 on --surface (plan 4.55:1, prior 3.15:1); the prior year
     used to be the BRIGHTER of the two (review 05-N8). The gridlines
     were 1.10:1 on --surface and simply did not draw (review 05-N10):
     --viz-grid is 1.37:1 now and --viz-axis, the zero line, a clear
     step above it at 1.89:1. */
  --viz-actual: #8b8bf0; --viz-plan: #7f8090; --viz-prior: #6a6859; --viz-rule: #f09a5c;
  --viz-original: #4b807a;  /* the original plan, 3.94:1 on --surface */
  --viz-neg: #ef6b5c; --viz-grid: #303139; --viz-axis: #45464f;
  --viz-fee: #6a6ac0;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .35);
  /* THE KIT (2026-09-21, section A). --surface STAYS #17181d: the chart
     palette's contrast ratios are tuned against it. What moved is everything
     AROUND it — the ground a step darker, the rules a step lighter — so a
     card, a pop-out and a field each have an edge to be seen by. */
  --field-line: #3b3c48;
  --scrim: rgba(0, 0, 0, .64);
  --shadow-pop: 0 18px 50px rgba(0, 0, 0, .60), 0 0 0 1px rgba(255, 255, 255, .05);
  --shade-edge: rgba(0, 0, 0, .55);
  /* THE SHELL (2026-09-22, family 2): the company mark reads as a chip on the
     rail again — 10.47:1 against its white initials and 1.80:1 against the
     rail, where `--navy` measured 1.01:1 and simply was not there — and the
     rail sits a step BELOW the cards (1.06:1) instead of level with them. */
  --mark-bg: #3a3c63;
  --rail-bg: #101118;
  color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b0c10; --surface: #17181d;
  --ink: #ecedf3; --muted: #9a9ba8; --line: #31323d; --line-soft: #272831;
  --accent: #8b8bf0; --accent-hover: #a3a3f5; --accent-soft: #24244a;
  --lav: #4a4a8a; --lav-soft: #2c2c4f;
  --attn: #f09a5c; --attn-bg: #3a2a1c; --attn-line: #5a3f24; --attn-ink: #f3b07a;
  --ok: #4fc784; --ok-bg: #17301f; --ok-line: #245c37;
  --warn: #e6a35a; --warn-bg: #34281a; --warn-line: #5a4225;
  --ok-ink: #4fc784; --warn-ink: #e6a35a;
  --err: #ef6b5c; --err-bg: #3a1f1c; --err-line: #6b2f29;
  --surface-2: #1d1e25; --track: #262730; --sum-bg: #1b1c22;
  --ink-2: #c8cad4; --muted-2: #6a6b78; --accent-line: #3c3c7a;
  --inverse: #ecedf3; --inverse-ink: #16161d;
  /* white text on the light-theme accent is 3.0:1 in dark: the FILL darkens,
     the ink stays white (owner theme rule; review 2026-09-08, 06-N18) */
  --accent-fill: #6666dd; --accent-fill-hover: #5555cc;
  --fc-bg: #26263f; --fc-bg-hover: #2e2e4b; --fav-ink: #4fc784; --fc-ink: #b8b8ea;
  /* the same order in dark: the plan brighter than the prior year, both
     over 3:1 on --surface (plan 4.55:1, prior 3.15:1); the prior year
     used to be the BRIGHTER of the two (review 05-N8). The gridlines
     were 1.10:1 on --surface and simply did not draw (review 05-N10):
     --viz-grid is 1.37:1 now and --viz-axis, the zero line, a clear
     step above it at 1.89:1. */
  --viz-actual: #8b8bf0; --viz-plan: #7f8090; --viz-prior: #6a6859; --viz-rule: #f09a5c;
  --viz-original: #4b807a;  /* the original plan, 3.94:1 on --surface */
  --viz-neg: #ef6b5c; --viz-grid: #303139; --viz-axis: #45464f;
  --viz-fee: #6a6ac0;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .35);
  /* THE KIT (2026-09-21, section A). --surface STAYS #17181d: the chart
     palette's contrast ratios are tuned against it. What moved is everything
     AROUND it — the ground a step darker, the rules a step lighter — so a
     card, a pop-out and a field each have an edge to be seen by. */
  --field-line: #3b3c48;
  --scrim: rgba(0, 0, 0, .64);
  --shadow-pop: 0 18px 50px rgba(0, 0, 0, .60), 0 0 0 1px rgba(255, 255, 255, .05);
  --shade-edge: rgba(0, 0, 0, .55);
  /* THE SHELL (2026-09-22, family 2): the company mark reads as a chip on the
     rail again — 10.47:1 against its white initials and 1.80:1 against the
     rail, where `--navy` measured 1.01:1 and simply was not there — and the
     rail sits a step BELOW the cards (1.06:1) instead of level with them. */
  --mark-bg: #3a3c63;
  --rail-bg: #101118;
  color-scheme: dark;
}

/* ===== THE PAGE: ELEMENTS AND THE SHARED SMALL CLASSES [base] =====
   Elements with no class, and the state and utility classes any component wears (muted, num, neg, active, open).
*/

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--bg);
  font: 14px/1.5 "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; }
main { padding: 22px 28px 80px; max-width: 1440px; margin: 0 auto; }
/* the suite SHELL (redesign 2026-09-05): ONE shell on every signed-in page —
   a left rail with the company switcher, the jump search, grouped nav and the
   account chip at the foot; each page's own header carries only the controls
   that change that page. The ☰ collapses the rail to a 56px icon strip
   (remembered per browser); on phones it is a drawer behind the top bar. */
.shell { display: flex; align-items: flex-start; min-height: 100vh; }
.rail { width: 232px; flex: none; position: sticky; top: 0; height: 100vh;
  overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column;
  padding: 12px 12px 10px; background: var(--surface); border-right: 1px solid var(--line); }
.rail-head { display: flex; align-items: center; justify-content: space-between;
  padding: 2px 2px 10px 6px; }
.brand-logo { display: inline-flex; align-items: center; }
/* the inline icon set (_icons.html): 16px strokes painted in currentColor */
.ico { display: inline-block; vertical-align: -3px; flex: none; }
.rail-switch { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 9px;
  color: var(--ink); margin-bottom: 10px; min-width: 0; }
.rail-switch:hover { background: var(--line-soft); text-decoration: none; }
.rail-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--mark-bg); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; font-weight: 700; flex: none; }
.rail-entity-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 700; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-switch .ico { flex: none; color: var(--muted); }
.rail-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 6px 10px 6px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.side-nav a { position: relative; display: flex; align-items: center; gap: 10px; height: 34px;
  padding: 0 10px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--ink);
  white-space: nowrap; }
.side-count { margin-left: auto; font-family: var(--mono); font-size: 11px;
  font-weight: 600; background: var(--attn-bg); color: var(--attn-ink);
  border-radius: 999px; padding: 1px 8px; }
.rail-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.topbar-back { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px;
  border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--muted);
  background: var(--line-soft); margin-bottom: 12px; white-space: nowrap; overflow: hidden; }
.topbar-back:hover { background: var(--line); color: var(--ink); text-decoration: none; }
.side-toggle { display: inline-flex; width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid transparent; background: transparent; color: var(--muted);
  cursor: pointer; align-items: center; justify-content: center; flex: none; }
.side-toggle:hover { background: var(--line-soft); color: var(--ink); border-color: var(--line); }
.mobile-bar, .rail-backdrop { display: none; }

/* the page header: the title, a one-line purpose, and the controls that
   change THIS page — one row, never a second toolbar */
.page-head.suite { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap;
  margin: 0 0 18px; min-height: 40px; }
/* the crumb keeps the page's place for screen readers and tests; the rail
   already says where you are, so it does not paint */
.crumb { position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; }
.page-sub { margin: 0; color: var(--muted); font-size: 12.5px; }
/* the page's headline count is something a person READS, not a key or a
   timestamp: sans, 11.5px (CLAUDE.md; review 2026-09-08, 06-N8) */
.page-scope { font-family: var(--sans); font-size: 11.5px; color: var(--muted); }
.page-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
h1 { font-size: 21px; font-weight: 650; letter-spacing: -0.01em; margin: 6px 0 14px; }
h2 { font-size: var(--t-14); font-weight: 650; text-transform: uppercase; letter-spacing: .05em;
     color: var(--muted); margin: 30px 0 10px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); font-weight: 400; }
.error { color: var(--err); }

/* --------------------------------------------- the account chip ---- */
.year-nav { display: flex; align-items: center; gap: 2px; height: 34px; padding: 0 4px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.year-nav a { padding: 2px 8px; border-radius: 6px; color: var(--muted); }
.gear-btn { display: flex; width: 100%; align-items: center; padding: 0; border-radius: 8px;
  color: var(--muted); cursor: pointer; background: transparent; border: 1px solid transparent;
  font: inherit; text-align: left; }
.gear-btn:hover { background: var(--line-soft); color: var(--ink); }
.gear-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); min-width: 190px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15,23,42,.20); z-index: 50; display: none; }
.gear-user { padding: 6px 12px 8px; margin-bottom: 4px; font-size: 12px; font-weight: 600;
  color: var(--muted); border-bottom: 1px solid var(--line-soft); max-width: 240px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gear-menu a, .gear-menu .gear-signout { display: block; width: 100%; text-align: left;
  padding: 8px 12px; border-radius: 7px; font: inherit; font-size: 13.5px;
  color: var(--ink) !important; background: none; border: none; cursor: pointer; }
.gear-sep { height: 1px; margin: 4px 0; background: var(--line-soft); }

/* ------------------------------------------------------------ buttons ---- */
button.primary { background: var(--accent); color: #fff; border: none; border-radius: 8px;
  padding: 9px 18px; font: inherit; font-weight: 600; cursor: pointer;
  box-shadow: var(--shadow); transition: background .12s; }
table .linklike { color: var(--muted); font-size: 12.5px; }

/* -------------------------------------------------------------- forms ---- */
.login-box { max-width: 360px; margin: 90px auto; background: var(--surface); padding: 32px;
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.login-box input, .attest-form input, .attest-form select, #reason {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; margin-top: 4px; background: var(--surface); }
.login-box input:focus, .attest-form input:focus, .attest-form select:focus, #reason:focus,
.lines-table input:focus, .lines-table select:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.attest-form { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 24px 24px; margin-top: 14px; max-width: 520px; }
.attest-form .muted { font-weight: 400; }

/* ------------------------------------------------------------- toolbar --- */
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.chip { padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 550; }

/* ---------------------------------------------------------------- grid --- */
.grid-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); }
/* months before the company's start month: locked, visibly not-yet-existing */
.month-status.pre-start { color: var(--muted); font-style: italic; }
/* the hatch is a TOKEN, not a light hex (review 2026-09-08, N2): a bright
   white stripe on a #17181d row is not "locked", it is a rendering fault */
table.grid input[data-prestart], .driver-grid td.num input[data-prestart] { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--line-soft) 6px 8px); cursor: not-allowed; }

.col-head { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.month-label { font-weight: 650; font-size: 12.5px; font-variant-numeric: tabular-nums;
  letter-spacing: .01em; }
.month-status { font-size: 11px; min-height: 13px; font-weight: 600; white-space: nowrap; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num input { width: 100%; min-width: 90px; height: 32px; border: none; padding: 0 8px;
  font: inherit; font-size: 13px; text-align: right; background: transparent;
  outline-offset: -2px; font-variant-numeric: tabular-nums; color: var(--ink); }
td.num input.neg { color: var(--err); }
td.num input:focus { outline: 2px solid var(--accent); background: var(--surface); border-radius: 4px; }
td.num input.dirty { background: var(--accent-soft); font-weight: 600; }
td.num input.invalid { background: var(--err-bg); outline: 2px solid var(--err); border-radius: 4px; }
/* a valid number that needs a correction reason before it saves */
td.num input.needs-reason { background: var(--warn-bg); outline: 2px solid var(--warn-line);
  border-radius: 4px; }
/* .tag is the one badge, in tokens — see "LIST TABLES (2026-09-07)" at the
   end of this file (the pastel hexes glared on the dark table, review
   2026-09-07) */
.tag { margin-left: 6px; }
.bf-hint { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.gl { color: var(--muted); font-size: 11px; margin-left: 6px; font-variant-numeric: tabular-nums; }
.footnote { margin-top: 12px; max-width: 920px; font-size: var(--t-sm); }

/* -------------------------------------------------------------- notices -- */
.notice { padding: 12px 16px; border-radius: var(--radius); margin: 14px 0; font-size: 13.5px; }
.notice.ok { background: var(--ok-bg); border: 1px solid var(--ok-line); }
.notice.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); }
.notice.error { background: var(--err-bg); border: 1px solid var(--err-line); }

/* ---------------------------------------------------------------- cards -- */
.cards { display: flex; gap: 14px; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 18px; min-width: 168px; }
.card-label { font-size: 11.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); }
.card-value { font-size: var(--t-20); font-weight: 700; font-variant-numeric: tabular-nums;
  margin-top: 3px; letter-spacing: -0.01em; }
.card-value.neg { color: var(--err); }
.card .muted { font-size: 11.5px; }

/* --------------------------------------------------------------- tables -- */
.attest-table { border-collapse: separate; border-spacing: 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; }
.lines-table input, .lines-table select { border: 1px solid transparent; border-radius: 6px;
  padding: 5px 8px; font: inherit; font-size: 13px; background: transparent; }
.lines-table input:hover, .lines-table select:hover { border-color: var(--line); background: var(--surface); }
/* ---- Overview: business-health card (verdict + narrative + scorecard) ---- */
.health { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--muted);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px 20px; margin-bottom: 20px; }
.health.card-improving { border-left-color: var(--ok); }
/* four verdict tiers (board review 2026-08-24): watch = amber caution,
   softening (labeled "Act now") = the loud red escalation */
.health.card-watch { border-left-color: var(--warn); }
.health.card-softening { border-left-color: var(--err); }
.health.card-holding { border-left-color: var(--accent); }
.health.card-provisional { border-left-color: var(--muted); }
.verdict-draft { font-size: var(--t-12); font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted); border: 1px solid var(--line);
  border-radius: 4px; padding: 1px 5px; vertical-align: middle; opacity: 1; }
/* A QUIET LINE, NOT A FILLED BLOCK (review 2026-09-08, 04-S8): the banner
   repeated what each absent tile already says under its own dash — "not yet
   posted for Aug 2026", twice over — and the amber box was the largest
   coloured object on the card, heavier than the verdict it qualifies. It now
   says only what the tiles cannot (how many measures the verdict reads) at
   the weight of a tile's own comparison line. */
.health-coverage { margin: 8px 0 0; font-size: 12px; color: var(--ink-2); }
.health-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.board-link { margin-left: auto; font-size: var(--t-13); font-weight: 600; white-space: nowrap; }
.verdict { display: inline-flex; align-items: center; gap: 7px; font-size: 17px; font-weight: 700;
  letter-spacing: -.01em; }
.verdict-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.verdict-improving { color: var(--ok); }
.verdict-improving .verdict-dot { background: var(--ok); }
.verdict-watch { color: var(--warn); }
.verdict-watch .verdict-dot { background: var(--warn); }
.verdict-softening { color: var(--err); }
.verdict-softening .verdict-dot { background: var(--err); }
.verdict-holding { color: var(--accent); }
.verdict-holding .verdict-dot { background: var(--accent); }
.verdict-provisional { color: var(--muted); }
.verdict-provisional .verdict-dot { background: var(--muted); }
/* the written read: whitespace does the framing — no borders, a readable
   measure, a distinct lead sentence (owner feedback 2026-08-26) */
.narrative { margin-top: 12px; }
/* mono is for codes, keys, timestamps and figures — a BUTTON ("Regenerate")
   and a provenance label ("Computed read") are none of them, and nothing a
   person decides on is set in mono under 12px (review 2026-09-08, 04-T11) */
.narrative-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px;
  font-family: var(--sans); font-size: 11.5px; font-weight: 500; }
.narrative-foot .linklike { font-family: var(--sans); font-size: 11.5px; }
.narrative-gen { margin: 0; }
/* the measures — grouped reading vs dark (board design 2026-08-25) */
.measures-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  margin: 26px 2px 12px; }
.measures-title { font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); margin: 0; border: 0; }
.measures-head .muted { font-size: 12px; }
.tag-read, .tag-dark { font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; padding: 3px 9px; border-radius: 6px; }
.tag-dark { background: var(--line-soft); color: var(--muted); }
.signal { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.signal-top { display: flex; align-items: flex-start; gap: 8px; }
.signal-detail { margin: 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.signal-arrow { font-size: 12px; line-height: 1.4; color: var(--muted); }
.signal-improving { border-color: var(--ok-line); background: var(--ok-bg); }
.signal-improving .signal-arrow { color: var(--ok); }
.signal-softening { border-color: var(--warn-line); background: var(--warn-bg); }
.signal-softening .signal-arrow { color: var(--warn); }
.signal-label { font-family: var(--mono); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); }
.signal-head { font-size: var(--t-14); font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
/* a LEVEL signal (concentration, runway) shows a risk band, not a direction arrow */
.signal-band { font-size: var(--t-12); font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  padding: 1px 6px; border-radius: 4px; line-height: 1.5; white-space: nowrap;
  background: var(--line); color: var(--muted); }
.signal-band.band-improving { background: var(--ok-bg); color: var(--ok); }
.signal-band.band-softening { background: var(--warn-bg); color: var(--warn); }

.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 20px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px 14px; }

/* min(420px, 100%) lets a single column SHRINK below 420 on a phone instead of
   forcing an overflow that expands the layout past the mobile breakpoint */
.viz-grid { display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
/* revenue attribution — what moved by client */
.movers { display: flex; flex-direction: column; gap: 2px; }
.mover { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: baseline;
  padding: 7px 4px; border-bottom: 1px solid var(--line-soft); }
.mover:last-child { border-bottom: 0; }
.mover-name { font-weight: 600; font-size: 13.5px; }
.mover-flow { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
/* the one comparison pattern (.cmp): ink with a small dot, never a coloured
   triangle before bold coloured money (review 04-N11) */
.mover-delta { font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.viz-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px; position: relative; }
.viz-head { display: flex; align-items: baseline; justify-content: space-between;
  gap: 6px 14px; flex-wrap: wrap; margin-bottom: 6px; }
.legend { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend .key { display: inline-flex; align-items: center; gap: 6px; }
/* THE DRILL PANEL (owner request 2026-09-14): a month's breakdown under the
   chart, one open at a time, every row a link to where the figure lives */
.drill-panel { margin: 10px 0 0; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface-2); }
.drill-panel .drill-cmp { color: var(--ink-2); font-size: 12px; }
.drill-panel .drill-note { margin: 8px 0 0; font-size: 11.5px; }
/* mono is for FIGURES (the money axis and the plan endpoint); a month name is
   none of the things mono is for, and the PDF sets it in sans (review 05-N10) */
.viz-axis { font-family: var(--mono); font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.viz-month { font-family: var(--sans); font-size: 11px; fill: var(--muted); }
.viz-label { font-family: var(--mono); font-size: 11.5px; font-weight: 650; fill: var(--ink); }
.viz-empty { color: var(--muted); padding: 30px 0; text-align: center; }
.viz-tip { position: absolute; z-index: 30; background: #0f172a; color: #f1f5f9;
  border-radius: 8px; padding: 8px 12px; font-size: 12px; pointer-events: none;
  box-shadow: 0 4px 12px rgba(15,23,42,.25); min-width: 150px; }
.viz-table summary { font-size: 12px; color: var(--muted); cursor: pointer; margin-top: 8px; }

.hbars { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
/* the value and share columns are FIXED, so every row's track is the same
   length — a bar read against a ragged baseline mis-states the comparison it
   exists to make — and a long line name WRAPS to two lines instead of
   ellipsizing to "Marketing & B..." (review 04-N5) */
.hbar-row { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(40px, 1fr) 7.5ch 4ch;
  align-items: center; gap: 4px 10px; }
/* `overflow-wrap: anywhere` split any word at any character and printed
   "Training/Coachin" over "g" (review 2026-09-08, 04-T2). `break-word` breaks
   only a word that cannot fit its line on its own; three lines and a wider
   name column (1.9fr against the track's 1fr — the track is fixed, so the
   label costs bar LENGTH, never comparability) leave nothing clipped. */
.hbar-name { font-size: var(--t-sm); line-height: 1.3; overflow-wrap: break-word;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hbar-track { height: 12px; border-radius: 4px; background: var(--track); overflow: hidden; }
.hbar-fill { display: block; height: 100%; border-radius: 4px;
  background: var(--lav); min-width: 2px; }
.hbar-val { font-size: var(--t-sm); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar-pct { color: var(--muted); }

/* publication as a slim full-width RAIL (owner feedback 2026-08-26): one
   row — label, twelve compact month cells, legend — instead of a grid card
   that stranded the measures under a half-empty row */
.pub-rail { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap;
  margin: 4px 0 18px; padding: 10px 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pub-rail-label { font-family: var(--mono); font-size: var(--t-12); font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--ink); white-space: nowrap; }
.pub-cells { display: flex; gap: 4px; flex-wrap: wrap; }
.pub-pill { display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: var(--t-12); font-weight: 600;
  padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }
.pub-pill:hover { text-decoration: none; border-color: var(--accent); }
.pub-pill.attested { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.pub-pill.stale { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.pub-rail-legend { margin-left: auto; font-size: var(--t-12); color: var(--muted); }

/* ---- the cash bridge (board design 2026-08-25) -------------------------- */
.bridge-strip { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
  margin: 10px 0 0; padding: 10px 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; font-size: 12.5px; }
/* inside its own chart card (2026-08-26) the strip needs no second frame */
.viz-card .bridge-strip { border: 0; background: none; padding: 4px 0 0; margin: 0; }
/* the figure size rides the ITEM, never the <b> (review 2026-09-08, 04-T3):
   the closing term's anchor is expressed relatively so it scales with each
   surface, and a `:last-child b` rule can no longer be out-specified by a
   surface's own `b` size — which is how the sheet came to print its
   destination figure SMALLER than the four terms beside it. */
.bridge-strip .b-item { display: inline-flex; flex-direction: column; font-size: var(--t-14); }
/* sentence case, sans: a term of the bridge is a label, and uppercase mono
   labels are gone from this product (SPEC §6.37) */
.bridge-strip .b-lab { font-size: var(--t-12); font-weight: 600; letter-spacing: .02em;
  color: var(--muted); }
.bridge-strip .b-op { font-size: var(--t-16); font-weight: 700; color: var(--muted); }
.bridge-note { margin: 6px 2px 0; font-size: var(--t-12); color: var(--muted); line-height: 1.6; }
.bridge-warn { color: var(--warn); font-weight: 600; }

/* the client-mix comparison: ONE block per client — name + values on the
   header line, today's bar over the plan bar at FULL card width beneath.
   No fixed columns and no nowrap anywhere, so the card cannot overflow at
   any width (owner report 2026-08-26, permanent fix). */
.mix-pairs { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.mixp-row { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mixp-head { display: flex; align-items: baseline; justify-content: space-between;
  gap: 4px 14px; flex-wrap: wrap; margin-bottom: 2px; }
.mixp-name { font-size: var(--t-sm); font-weight: 600; overflow-wrap: anywhere; }
.mixp-vals { font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }
.mixp-track { display: flex; height: 7px; border-radius: 4px;
  background: var(--track); overflow: hidden; }
.mixp-fill { display: block; height: 100%; border-radius: 4px; min-width: 2px; }
.mixp-fill.now { background: var(--viz-actual); }
.mixp-fill.plan { background: var(--viz-plan); }
.mixp-arrow { color: var(--muted); margin: 0 5px; }
.hbar-track { display: flex; }
.hbar-fee { display: block; height: 100%; background: var(--attn); min-width: 2px;
  border-radius: 0 4px 4px 0; }

/* ---- the board packet sheet (owner request 2026-08-25) ------------------ */
/* THE SNAPSHOT COMPARISON PACKET (owner request 2026-09-16): the board sheet's
   own classes, plus the variance sub-line and the year band its tables add */
.tvn-sub { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.tvn-kind { font-size: 11px; color: var(--muted); white-space: nowrap; }
.bv-part-label { margin: 0 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.board-toolbar { display: flex; justify-content: space-between; align-items: center;
  max-width: 1000px; margin: 0 auto 14px; }
.board-sheet { max-width: 1000px; margin: 0 auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(12,24,52,.08), 0 12px 32px rgba(12,24,52,.10); }
/* the navy brand bar and its wordmark are RETIRED (owner request 2026-09-07:
   the firm's logo on a paper-white sheet) — the sheet's own rules below carry
   the header, and nothing here may bring a tinted band back */
.board-body { padding: 24px 30px 28px; }
.board-client { font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.board-sub { font-size: 12px; color: var(--muted); margin: 2px 0 16px; }
.bverdict { border-left: 6px solid var(--muted); background: var(--bg);
  padding: 14px 20px 16px; border-radius: 0 6px 6px 0; margin-bottom: 6px; }
.bverdict.v-improving { border-left-color: var(--ok); background: var(--ok-bg); }
.bverdict.v-watch { border-left-color: var(--warn); background: var(--warn-bg); }
.bverdict.v-softening { border-left-color: var(--err); background: var(--err-bg); }
.bverdict.v-holding { border-left-color: var(--accent); background: var(--accent-soft); }
.bv-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.bv-tag { font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; font-size: var(--t-14); }
.v-improving .bv-tag { color: var(--ok); }
.v-watch .bv-tag { color: var(--warn); }
.v-softening .bv-tag { color: var(--err); }
.v-holding .bv-tag { color: var(--accent); }
.bv-chip { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted); background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 9px; }
.bv-breach { margin: 8px 0 2px; font-size: 12.5px; font-weight: 600; color: var(--err); }
.bv-coverage { margin-top: 8px; font-size: var(--t-label); color: var(--warn); }
.board-h2 { color: var(--ink); font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.4px; border-bottom: 2px solid var(--line); padding-bottom: 5px;
  margin: 26px 0 12px; }
.bd-card { border-left: 4px solid var(--warn); background: var(--bg); padding: 10px 14px;
  margin: 8px 0; border-radius: 0 5px 5px 0; }
.bd-card.suggested { border-left-style: dashed; }
.bd-act { font-weight: 700; color: var(--ink); font-size: 13.5px; }
.bd-sug { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); margin-left: 6px; }
.bd-why { font-size: var(--t-13); color: var(--ink); margin-top: 2px; }
.bd-meta { font-size: 11px; color: var(--muted); margin-top: 5px; }
.board-measures { font-size: 12.5px; }
.bm-st { font-weight: 700; text-transform: lowercase; white-space: nowrap; }
/* SOFTENING and a HIGH level band are ATTENTION, not a loss (SPEC §6.37 gives
   --err to "a loss: a negative net income or money figure, a breached floor"
   and the behind-plan mark to --attn; review 2026-09-08, 03-N7). The packet
   printed "On plan SOFTENING" and "Client mix HIGH" in red on a company the
   same table describes as profitable — and once red means two things, the day
   a line genuinely goes negative the signal is already spent. */
.st-improving { color: var(--ok); }
.st-softening { color: var(--attn-ink); }
.st-holding { color: var(--muted); }
.st-unknown { color: var(--muted); opacity: .7; }
/* ONE COMPOSITION WITH THE PDF (review 2026-09-12, 05-X1). The page drew
   Revenue full width and the other two at half beneath it, so the same twelve
   months rose at two different slopes on the surface whose job is to proof
   the packet — which prints all three stacked at one width. One column, three
   equal cards, equal ladders, equal month labels. */
.board-charts { display: grid; grid-template-columns: 1fr; gap: 16px; }
/* the sheet's four tables all wear the `dt` primitive (review 2026-09-08,
   N15), so `.board-table` says only what is BOARD about them. It used to
   re-declare dt's width, collapse, size, header, alignment, padding and
   hairline for two of the three — which is how one rule came to outrank the
   total's reset on one table and not the other (N8). */
.board-table { border-collapse: collapse; }
.board-method { font-size: 11px; color: var(--muted); border-top: 1px solid var(--line);
  margin-top: 24px; padding-top: 9px; line-height: 1.65; }

/* ---- the account chip + jump palette (suite design 2026-08-26) ---------- */
.user-chip { width: 100%; padding: 4px 6px; gap: 8px; display: flex;
  align-items: center; height: 44px; border-radius: 8px; }
.chip-avatar { width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft);
  color: var(--accent); font-size: 11px; font-weight: 700; display: inline-flex;
  align-items: center; justify-content: center; letter-spacing: .02em; flex: none; }
.chip-id { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15;
  min-width: 0; flex: 1; }
.chip-name { font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap;
  max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.chip-role { font-size: 11px; font-weight: 500; color: var(--muted); text-transform: capitalize; }
.chip-caret { color: var(--muted); display: inline-flex; flex: none; }
.jump-btn { display: flex; width: 100%; align-items: center; gap: 8px; height: 32px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 8px;
  padding: 0 10px; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer;
  margin: 0 0 14px; }
.jump-btn:hover { color: var(--ink); border-color: var(--accent); }
.jump-palette { border: 0; border-radius: 14px; padding: 0; width: min(460px, 92vw);
  box-shadow: 0 10px 40px rgba(22, 22, 29, .3); }
.jump-palette input { width: 100%; border: 0; border-bottom: 1px solid var(--line);
  padding: 14px 16px; font: inherit; font-size: var(--t-14); outline: none; }
.jump-list { max-height: 320px; overflow-y: auto; padding: 6px; }

/* the queue page's status filter tabs + the overview strip's affordances */
.dq-filters { display: flex; gap: 4px; background: var(--track); border-radius: 10px;
  padding: 4px; width: fit-content; margin: 0 0 12px; }
.dq-open-queue { background: var(--inverse); color: var(--inverse-ink) !important; border-radius: 9px;
  padding: 7px 14px; font-size: var(--t-13); font-weight: 600; }
.dq-open-queue:hover { text-decoration: none; }
.dq-more { display: block; padding: 10px 16px; font-size: var(--t-13); font-weight: 600;
  color: var(--accent); border-top: 1px solid var(--line-soft); }
.dq-more:hover { background: var(--surface-2); text-decoration: none; }

/* table headers, everywhere tables render — the type is set in the
   "LIST TABLES (2026-09-07)" block at the end of this file (11.5px sans,
   sentence case: the mono uppercase headers were under the 11px floor) */

/* ---- the decisions QUEUE + detail modal (suite design 2026-08-26) ------- */
.dq-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; margin: 0 2px 10px; }
.dq-h2 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: var(--t-16);
  font-weight: 700; color: var(--ink); text-transform: none; letter-spacing: 0; border: 0; }
.dq-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.dq-counts { font-family: var(--mono); font-size: 11.5px; font-weight: 400;
  letter-spacing: 0; color: var(--muted); margin-left: 4px; }
.dq-tune { font-size: 12.5px; font-weight: 600; }
.dq-queue { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.dq-queue > .muted { padding: 14px 16px; margin: 0; }
.dq-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 13px;
  border-bottom: 1px solid var(--line-soft); border-left: 3px solid transparent;
  background: var(--surface); cursor: pointer;
  transition: background .12s ease, transform .12s ease; }
.dq-row:last-child { border-bottom: 0; }
.dq-row.sev-urgent { border-left-color: var(--err); }
.dq-row.sev-act { border-left-color: var(--attn); }
.dq-row.sev-manual { border-left-color: var(--accent); }
.dq-row.sev-housekeeping { border-left-color: var(--line); }
/* the severity is a COLOUR on the row's rule and its one chip; the word
   shows only in the detail panel's head (owner feedback 2026-09-07) */
.dq-sev { flex: none; font-size: var(--t-12); font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; border-radius: 999px; padding: 2px 8px;
  display: inline-flex; align-items: center; height: 18px; white-space: nowrap; }
/* the severity pill wears the tier's TINT, like `.badge.sev-*` and the row's
   own chip — a filled pill was white on amber at 2.6:1 (review 2026-09-08,
   06-F12); the tinted pair clears 4.5:1 in both themes */
.dq-sev.sev-urgent { color: var(--err); background: var(--err-bg); }
.dq-sev.sev-act { color: var(--attn-ink); background: var(--attn-bg); }
.dq-sev.sev-manual { color: var(--accent); background: var(--accent-soft); }
.dq-sev.sev-housekeeping { color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.dq-chip.sev-urgent { color: var(--err); border-color: var(--err-line); background: var(--err-bg); }
.dq-chip.sev-act { color: var(--attn-ink); border-color: var(--attn-line); background: var(--attn-bg); }
.dq-chip.sev-manual { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.dq-chip.sev-housekeeping { color: var(--muted); border-color: var(--line); background: transparent; }
.bd-sev { font-size: var(--t-12); font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin-right: 4px; }
.dq-row:hover { background: var(--surface-2); transform: translateX(3px); }
.dq-row.suggested { cursor: default; border-left-style: dashed; }
.dq-chip { font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px;
  background: var(--surface); flex: none; white-space: nowrap; }
.dq-main { flex: 1; min-width: 0; }
.dq-title { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.dq-title.dropped { text-decoration: line-through; color: var(--muted); }
.dq-meta { display: block; font-family: var(--mono); font-size: 11px;
  color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.dq-owner { font-family: var(--mono); font-size: 11px; color: var(--muted); flex: none; }
/* .dq-pill is gone (review 2026-09-07, F12): every open row wore an
   identical OPEN badge — one chip per row, the status ladder shows the
   state, and the queue's tabs filter by it */
.dq-review { color: var(--accent); font-size: 12.5px; font-weight: 600; flex: none; }
.dq-track-form { margin: 0; flex: none; }
.dq-track { border: 1px solid var(--line); background: var(--surface); color: var(--accent);
  font: inherit; font-size: 12.5px; font-weight: 600; padding: 5px 11px;
  border-radius: 8px; cursor: pointer; }
.dq-track:hover { border-color: var(--accent); }

.dq-modal { border: 0; border-radius: 14px; padding: 0; width: min(720px, 92vw);
  box-shadow: 0 10px 40px rgba(22, 22, 29, .25); }
.dqm-head { display: flex; align-items: center; gap: 8px; padding: 16px 20px 0; }
.dqm-close { margin-left: auto; border: 0; background: none; font-size: 22px;
  line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 6px; }
.dqm-close:hover { color: var(--ink); }
.dqm-title { margin: 8px 20px 2px; font-size: 17px; font-weight: 700; color: var(--ink); }
.dqm-meta { font-family: var(--mono); font-size: 11px; color: var(--muted); margin: 0 20px 14px; }
.dqm-body { display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  padding: 14px 20px; border-top: 1px solid var(--line-soft); }
.dqm-label { font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 8px; }
/* the mount for the charts' own strip (window.PnlViz.drawStrip — review
   2026-09-08, 06-N3): an SVG, not a row of bars. The hand-built bar columns
   this block used to style are gone with the fallback that drew them. */
.dqm-bars { display: block; min-height: 80px; }
.dqm-src { font-family: var(--mono); font-size: var(--t-12); color: var(--muted); margin-top: 8px; }
.dqm-copy { font-size: 13.5px; margin: 0 0 8px; }
.dqm-prov { font-size: var(--t-12); color: var(--muted); margin: 0 0 12px; }
.dqm-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dqm-assign summary, .dqm-open { display: inline-block; border: 1px solid var(--line);
  background: var(--surface); border-radius: 9px; padding: 6px 12px; font-size: var(--t-13);
  font-weight: 600; color: var(--ink); cursor: pointer; list-style: none; }
.dqm-assign summary:hover, .dqm-open:hover { border-color: var(--accent);
  text-decoration: none; }
.dqm-status { display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 12px 20px; border-top: 1px solid var(--line-soft); }
.st-pill { border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 6px 14px; font: inherit; font-size: var(--t-13); font-weight: 600;
  color: var(--ink); cursor: pointer; }
.st-pill:hover { border-color: var(--accent); }
.st-pill.on { background: var(--inverse); color: var(--inverse-ink); border-color: var(--inverse); cursor: default; }
.st-pill.drop { color: var(--muted); border-style: dashed; }
.dqm-notes { padding: 12px 20px 18px; border-top: 1px solid var(--line-soft); }
.dqm-note { display: flex; justify-content: space-between; gap: 14px; font-size: var(--t-13);
  padding: 6px 0; border-bottom: 1px dashed var(--line-soft); }
.dqm-note-by { font-family: var(--mono); font-size: var(--t-12); color: var(--muted); flex: none; }
.dqm-empty { font-size: var(--t-13); }
.dqm-record { display: flex; gap: 8px; margin-top: 10px; }
.dqm-record-btn { background: var(--inverse); color: var(--inverse-ink); border: 0; border-radius: 9px;
  padding: 8px 16px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }

/* ---- guardrail breaches + the interactive decision area (2026-08-25) ---- */
.health-breach { margin: 6px 0 2px; font-size: 13px; font-weight: 600; color: var(--err);
  background: var(--err-bg); border: 1px solid var(--err-line); border-radius: 8px;
  padding: 8px 12px; display: flex; flex-direction: column; gap: 3px; }
.decisions-block { margin: 4px 0 22px; }
.dec-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.dec-add { margin-top: 10px; }
.dec-add summary { cursor: pointer; font-size: 13px; }

/* ------------------------------------------------ cell notes & history --- */
td.has-note { position: relative; }
td.has-note::after { content: ""; position: absolute; top: 2px; right: 2px;
  width: 0; height: 0; border-style: solid; border-width: 0 7px 7px 0;
  border-color: transparent var(--accent) transparent transparent; }
.cell-panel { position: absolute; z-index: 60; width: 350px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(15,23,42,.18);
  font-size: 13px; }
.cell-panel-head { display: flex; gap: 8px; align-items: baseline; padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft); }
.cell-panel-close { margin-left: auto; color: var(--muted); }
.cell-panel-body { padding: 10px 14px 14px; max-height: 340px; overflow-y: auto; }
.cell-panel-sec { font-size: 11px; font-weight: 650; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); margin: 8px 0 4px; }
.cell-versions, .cell-notes { list-style: none; margin: 0; padding: 0; }
.cell-reason { color: var(--muted); font-style: italic; }
.cell-note-form { display: flex; gap: 6px; margin-top: 8px; }
.cell-note-form input { flex: 1; padding: 6px 9px; border: 1px solid var(--line);
  border-radius: 6px; font: inherit; font-size: 12.5px; }
/* hover breakdown — what composes a cell + forecast vs actual */
.cell-hover { position: absolute; z-index: 70; width: 300px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(15,23,42,.18);
  font-size: 12.5px; }
.hov-head { display: flex; gap: 8px; align-items: baseline; justify-content: space-between;
  padding: 8px 12px; border-bottom: 1px solid var(--line-soft); }
.hov-body { padding: 8px 12px 10px; max-height: 300px; overflow-y: auto; }
.hov-cmp { display: flex; justify-content: space-between; gap: 12px; }
.hov-var { font-weight: 650; margin: 2px 0 6px; font-variant-numeric: tabular-nums; }
.hov-var.pos { color: var(--ok); }
.hov-var.neg { color: var(--err); }
/* the cell detail is where the PLAN figure lives (F10), so it cannot be set in
   the two label treatments the system retired — sub-11px and uppercase
   (review 2026-09-08, T9). 11px sans, sentence case, --muted: the same rule
   the statement's own bands took. */
.hov-sec { font-family: var(--sans); font-size: 11px; font-weight: 600;
  text-transform: none; letter-spacing: .02em;
  color: var(--muted); margin: 8px 0 4px; }
.hov-items { width: 100%; border-collapse: collapse; font-size: 11.5px; margin-top: 4px; }
.hov-list { list-style: none; margin: 0; padding: 0; }
.hov-total { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0 0;
  font-weight: 650; }

/* -------------------------------------------------------------- report --- */
.report-actions { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.report-sheet { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px 40px; max-width: 900px; }
.report-head { display: flex; justify-content: space-between; gap: 24px;
  border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 18px; }
.report-entity { font-size: 12px; font-weight: 650; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); }
.report-title { margin: 2px 0 0; font-size: 19px; }
.report-meta { text-align: right; font-size: 12.5px; color: var(--ink-2); }
.report-foot { margin-top: 24px; font-size: 11.5px; }
/* ---- pricing scenario: the board proposal sheet ---- */
.scn-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.scn-toolbar .linklike { margin-right: auto; }
.up { color: var(--ok); font-weight: 600; }
.down { color: var(--err); font-weight: 600; }
.proposal-sheet { border: 1px solid var(--line); border-radius: 12px; padding: 26px 30px;
  background: var(--surface); max-width: 900px; box-shadow: var(--shadow); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
  border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 16px; }
.sheet-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); font-weight: 700; }
.sheet-title { margin: 4px 0 2px; font-size: 26px; }
.sheet-sub { font-size: 12.5px; }
.sheet-stamp { flex: 0 0 auto; text-align: center; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--err);
  border: 1.5px solid var(--err); border-radius: 8px; padding: 6px 10px; line-height: 1.35; }
.sheet-note { font-style: italic; color: var(--muted); margin: -4px 0 12px; }
.sheet-narrative { font-size: 15.5px; line-height: 1.55; margin: 6px 0 20px;
  padding-left: 14px; border-left: 3px solid var(--accent); }
.scard { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  background: var(--surface-2); }
.scard-k { font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); font-weight: 700; }
.scard-v { font-size: 22px; font-weight: 700; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.scard-v.scard-warn { font-size: 16px; color: var(--err); }
.scard-s { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sheet-h { font-size: var(--t-14); text-transform: uppercase; letter-spacing: .05em; color: var(--ink);
  border-bottom: 1px solid var(--line); padding-bottom: 5px; margin: 24px 0 10px; }
.sheet-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.sheet-fine { font-size: 11.5px; margin-top: 6px; }
.sheet-basis { font-size: 12.5px; line-height: 1.5; color: var(--ink-2); max-width: 820px; padding-left: 18px; }
.scn-tools { margin-top: 30px; padding-top: 20px; border-top: 2px dashed var(--line); }
.scn-goal-form { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; max-width: 720px; }
/* net-income trajectory chart (today's plan vs scenario) — inline SVG */
.scn-chart { display: block; width: 100%; max-width: 680px; height: auto; margin: 2px 0 6px; }
.scn-zero { stroke: var(--err); stroke-width: 1; stroke-dasharray: 4 3; opacity: .55; }
.scn-axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.scn-axis-zero { fill: var(--err); }
.scn-line-base { fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-dasharray: 5 4;
  stroke-linejoin: round; stroke-linecap: round; }
.scn-line-scen { fill: none; stroke: var(--accent); stroke-width: 2.4;
  stroke-linejoin: round; stroke-linecap: round; }
.scn-legend { display: flex; gap: 16px; align-items: center; font-size: 12px;
  margin-bottom: 10px; flex-wrap: wrap; }
.scn-key { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }

/* -------------------------------------------------------- intake wizard -- */
.stepper { display: flex; gap: 8px; list-style: none; padding: 0; margin: 4px 0 20px;
  counter-reset: step; }
.wiz-nav { display: flex; gap: 12px; align-items: center; margin-top: 20px; }
.tfa-col { text-align: center; white-space: nowrap; }
.tfa-form { display: inline; }
.tfa-toggle { width: 16px; height: 16px; cursor: pointer; vertical-align: -2px; }
.tfa-done { color: var(--ok); font-weight: 700; font-size: 15px; margin-left: 5px; }
.tfa-pending { color: var(--warn, #b45309); font-size: 11px; margin-left: 5px; }
.tfa-off { color: var(--line); }
.row-actions { display: flex; gap: 14px; align-items: center; }
.row-actions .linklike { color: var(--muted); font-size: 12.5px; }
/* compact org-wide 2FA toggle in the page header */
.require-2fa-toggle { display: inline-flex; }
.toggle-pill { display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; font: inherit; font-size: 12.5px; color: var(--muted);
  cursor: pointer; }
.toggle-pill:hover { border-color: var(--accent); }
.toggle-pill.on { color: var(--ok); border-color: var(--ok-line); }
.role-form { display: inline; }
.role-select { padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px;
  font: inherit; font-size: 13px; background: var(--surface); cursor: pointer; }
.role-select:disabled { color: var(--muted); background: var(--line-soft); cursor: default; }

/* access editor overlay */
.access-modal { position: fixed; inset: 0; z-index: 80; display: flex;
  align-items: flex-start; justify-content: center; }
.access-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .35); }
.access-head { flex: 0 0 auto; display: flex; gap: 10px; align-items: baseline;
  padding: 18px 24px 14px; border-bottom: 1px solid var(--line); }
.access-head .access-close { margin-left: auto; font-size: var(--t-20); line-height: 1;
  color: var(--muted); }
.access-foot { flex: 0 0 auto; padding: 12px 24px; border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.grant-components { display: flex; gap: 10px; flex-wrap: wrap; }
.grant-check { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.ledger-filter { display: flex; gap: 8px; align-items: center; margin: 8px 0 14px; flex-wrap: wrap; }
.ledger-pager { margin: 8px 2px 0; font-size: 12.5px; }
/* .type-pill is gone (review 2026-09-07, F11/F15): the register's kind is
   the one .badge, and the column is suppressed when one kind fills the page */
.grant-note { margin: 12px 2px 2px; font-size: 12px; }
.pw-reset summary { cursor: pointer; list-style: none; color: var(--muted); font-size: 12.5px; }
.pw-form { position: absolute; z-index: 30; left: 0; top: 22px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow);
  padding: 10px; display: flex; gap: 8px; }
/* a key and a recovery code ARE codes, and mono is the product's typeface for
   a code (redesign 2026-09-22, family 2 section B): the key was printed in
   Inter with 2px of tracking, the list carried its own hard-coded stack */
.totp-secret { display: inline-block; font-family: var(--mono); font-size: 13px;
  letter-spacing: .12em;
  background: var(--line-soft); padding: 8px 12px; border-radius: 8px; user-select: all;
  word-break: break-all; }
.recovery-codes { columns: 2; margin: 10px 0 0; padding-left: 20px;
  font-family: var(--mono); font-size: 13px; }
.month-tag { font-size: 11px; min-height: 13px; font-weight: 600; color: var(--accent); }

/* per-month projected/actual toggle (P&L grid header). Compact segmented
   control; the active half reads as selected, the other as a clickable hint. */
.series-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 6px;
  overflow: hidden; }
.series-toggle .seg-opt { border: 0; background: var(--surface); color: var(--muted);
  font: inherit; font-weight: 600; letter-spacing: 0; cursor: pointer; }
/* beat/miss vs the plan (actual months): green beat, red miss */
td.num input.fav { color: var(--fav-ink); font-weight: 600; }
td.num input.unfav { color: var(--err); font-weight: 600; }
.var-key { padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.var-key.fav { background: var(--ok-bg); color: #006300; }
.var-key.unfav { background: var(--err-bg); color: var(--err); }
/* publication is `.badge state` / `.badge warn` — the one badge family, in the
   "THE TABLES AND CHARTS SYSTEM" block */

/* -------------------------------------------------- in-grid line editing -- */
.drag-handle { display: inline-block; width: 10px; height: 16px; margin-right: 9px;
  vertical-align: middle; cursor: grab; opacity: .4; user-select: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='16'%3E%3Cg fill='%23667085'%3E%3Ccircle cx='3' cy='4' r='1.2'/%3E%3Ccircle cx='7' cy='4' r='1.2'/%3E%3Ccircle cx='3' cy='8' r='1.2'/%3E%3Ccircle cx='7' cy='8' r='1.2'/%3E%3Ccircle cx='3' cy='12' r='1.2'/%3E%3Ccircle cx='7' cy='12' r='1.2'/%3E%3C/g%3E%3C/svg%3E") no-repeat center; }
tr.dragging td { opacity: .45; }
/* line-col layout (grid formatting fix 2026-08-27): cost code | name (which
   truncates with an ellipsis + full-name tooltip) | tools pinned right — the
   name yields space so nothing ever bleeds into the amount columns. */
.line-cell { display: flex; align-items: center; gap: 7px; min-width: 0; }
.line-cell .gl { flex: none; margin-left: 0; }
.line-cell .line-name { flex: 1 1 auto; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
/* focusing a locked cell (click, tab) must not flash the editable ring */
td.num input[readonly]:focus { outline: 1px solid var(--line); background: transparent; }
.add-line-btn { font-size: 12px; margin-left: 10px; color: var(--accent); }
.line-editor .le-form { padding: 12px 14px; min-width: 300px; }
.le-field { display: block; margin: 8px 0; font-size: 12.5px; font-weight: 550; color: var(--ink-2); }
.le-field input, .le-field select { width: 100%; padding: 7px 9px; border: 1px solid var(--line);
  border-radius: 7px; font: inherit; margin-top: 3px; }
.le-check { display: block; margin: 8px 0; font-size: 13px; }
.le-actions { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.le-error { margin-top: 8px; font-size: 12.5px; }

/* ------------------------------------------------- contracts / expenses --- */
.page-head { display: flex; align-items: center; gap: 16px; }
.add-card { max-width: 620px; margin-bottom: 18px; }
/* month + year select pair (replaces the native month input) */
.mp { display: flex; gap: 6px; margin-top: 4px; }
.rate-list { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 10px; }
.rate-step { font-size: 13px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 7px; padding: 4px 10px; }
.rate-del { border: none; background: none; color: var(--err); cursor: pointer;
  font-size: 15px; line-height: 1; padding: 0 0 0 4px; }
.rate-add { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rate-add .rate-amt { width: 110px; border: 1px solid var(--line); border-radius: 6px;
  padding: 5px 8px; font: inherit; font-size: 13px; background: var(--surface); text-align: right; }
.ctrl-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; margin: 8px 0; }
.ctrl-row select { width: auto; margin-top: 0; padding: 4px 6px; font-size: 12.5px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }

/* compact products/modules picker (contract modals) — a bordered card with the
   size + running total in the header and a 2-column item grid */
.catalog-picker { border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 11px; margin: 8px 0 2px; background: var(--surface-2); }
.catalog-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.catalog-title { font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); }
.catalog-total { margin-left: auto; font-size: 12px; }
.fee-rows-head { font-size: 11px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; margin-bottom: 5px; }
.fee-row { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; flex-wrap: wrap; }
.fee-row .mp { margin-top: 0; }
.fee-row .mp select, .fee-row > select { width: auto; margin-top: 0; padding: 4px 6px;
  font-size: 12.5px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }

/* native month picker (contract modals) — matched to the other compact inputs */
.month-input { font: inherit; font-size: 12.5px; padding: 4px 6px; border: 1px solid var(--line);
  border-radius: 6px; background: var(--surface); color: inherit; }

/* the term as a small From / Until / Cancel table (contract edit modal) */
.dates-table { border-collapse: collapse; margin: 2px 0 6px; }
.dates-table .cm-na { font-size: 12.5px; padding: 4px 0; display: inline-block; }

/* one-time fees as a compact table: read-only rows with a pencil that swaps in
   the edit inputs, plus a reveal-on-demand add form */
.fee-block { margin-top: 12px; }
.fee-table { width: 100%; border-collapse: collapse; margin: 2px 0 6px; font-size: 12.5px; }
.tag-auto { font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.fee-edit-grid { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fee-edit-grid input, .fee-edit-grid select { box-sizing: border-box; border: 1px solid var(--line);
  border-radius: 6px; padding: 4px 6px; font: inherit; font-size: 12.5px; background: var(--surface); }
.fee-edit-grid select { max-width: 170px; }
.icon-btn { background: none; border: none; cursor: pointer; color: var(--muted); font-size: var(--t-14);
  line-height: 1; padding: 2px 5px; border-radius: 5px; }
.icon-btn:hover { color: var(--accent); background: var(--accent-soft); }
.fee-add-toggle { font-size: 12.5px; color: var(--accent); padding: 2px 0; }
.fee-add-form { border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; margin-top: 6px;
  background: var(--surface-2); }
.fee-add-grid input, .fee-add-grid select, .fee-add-grid .month-input { width: 100%; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 6px; padding: 4px 7px; font: inherit;
  font-size: 12.5px; background: var(--surface); }
.fee-add-foot { display: flex; gap: 10px; align-items: center; margin-top: 9px; }
.setup-line-ctrl select { width: auto; max-width: 230px; border: 1px solid var(--line);
  border-radius: 6px; padding: 4px 6px; font: inherit; font-size: 12.5px; background: var(--surface); color: var(--ink); }
.list-table .fee-total { cursor: help; border-bottom: 1px dotted var(--line);
  font-variant-numeric: tabular-nums; }
.list-table td.row-actions .icon-btn + .icon-btn, .list-table td.row-actions form + .icon-btn,
.list-table td.row-actions .icon-btn + form { margin-left: 2px; }
.st-draft, .st-open { background: var(--line-soft); color: var(--muted); }
.codes-table .gl { font-size: 11px; margin-left: 0; }
.codes-filter select { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px;
  font: inherit; font-size: 13.5px; background: var(--surface); }
.rate-add label.grow input { border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 10px; font: inherit; font-size: 13.5px; color: var(--ink); }
.settings-menu-mobile select { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); color: var(--ink); }
.settings-body { min-width: 0; }
.scn-tab:hover { color: var(--ink); }
.scn-tab.active { color: var(--accent); font-weight: 600; background: var(--surface);
  border-color: var(--line); margin-bottom: -1px; padding-bottom: 10px; }
.assign-bar select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; }
.st-active { background: var(--ok-bg); color: var(--ok); }
.st-projected { background: var(--accent-soft); color: var(--accent); }
.st-canceled { background: var(--err-bg); color: var(--err); }
.st-expired, .st-inactive { background: var(--line-soft); color: var(--muted); }
.ask-pill:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(22, 22, 29, .34); }
.ask-head .dqm-close { color: var(--muted-2); }
.ask-msg.me {
  align-self: flex-end; background: var(--accent-soft); color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-bottom-right-radius: 4px;
}
.ask-msg.bot {
  align-self: flex-start; background: var(--surface); border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.ask-msg.wait { color: var(--muted); font-style: italic; }
.ask-msg.err { border-color: color-mix(in srgb, var(--attn) 44%, transparent); color: var(--warn); }
.ask-form input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.btn-link:hover { text-decoration: none; }
/* .primary elsewhere is button-scoped; give the anchor CTA the same fill */
.btn-link.primary { background: var(--accent); color: #fff; font-weight: 600; }
/* a disclosure a PERSON reads is sentence-case sans, like every other label
   on these pages — mono is for codes, keys, timestamps and figures (SPEC
   §6.37; review 2026-09-08, 06-F12) */
.page-note summary {
  cursor: pointer; color: var(--muted); font-size: 12.5px;
  font-family: var(--sans); font-weight: 600; text-transform: none; letter-spacing: 0;
}
/* scoped to the toolbar container — a bare .chip would hijack the grid's
   existing .chip/.chip-forecast status badge (polish review 2026-08-26) */
.chips .chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  border-radius: 999px; padding: 5px 13px; font: inherit; font-size: 12.5px;
  font-weight: 600; cursor: pointer; transition: border-color .1s, color .1s;
}

/* the portfolio table: rows are doors — hover lift */
.portfolio-row { cursor: pointer; transition: background .1s; }
.portfolio-row:hover { background: var(--accent-soft); }
/* `.mono-cell` is gone from this table (review 2026-09-08, 06-N12): the month
   it set in monospace is `.col-date`, like every other month in the family. */
/* portfolio status dropdown (admin) */
.status-cell { white-space: nowrap; }
.status-select:hover { border-color: var(--accent); }
.status-select.is-archived { color: var(--muted); }
.branch-bar .chip { text-decoration: none; }

/* ---- Drivers (assumption series, GSB Phase 3) ---- */
.notice.info { background: var(--accent-soft); border: 1px solid var(--line); color: var(--ink); }
.driver-grid .series-col { text-align: left; padding: 6px 12px; font-weight: 600;
  white-space: nowrap; background: var(--surface); position: sticky; left: 0; z-index: 1; }
/* the WIDTH FLOOR is declared once, in the seventh-pass block at the end of
   this file (01-T1): 74px here clipped every seven-figure amount in the row */
.driver-grid td.num input { width: 100%; height: 34px; border: none;
  text-align: right; font: inherit; font-variant-numeric: tabular-nums;
  background: transparent; }
.driver-grid .computed-cell { color: var(--accent); font-variant-numeric: tabular-nums; }
.driver-grid .computed-badge { color: var(--accent); font-family: var(--mono); font-size: 11px;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: inline-block; vertical-align: bottom; }
.driver-grid .unit { color: var(--muted); font-weight: 400; font-size: 11.5px; }
.rate-add > summary { font-size: 12px; color: var(--accent); cursor: pointer; }
.calc-method .badge { font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.calc-cohort > summary { font-size: 12px; }
.calc-amt.exp { color: var(--muted); }
.setup-choice:hover { border-color: var(--accent); }
.setup-choice.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.setup-form input[type=text], .setup-form input[type=month], .setup-form select {
  font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--line);
  border-radius: 7px; background: var(--surface, #fff); color: inherit; }
.setup-form .count-new { display: block; margin-top: 5px; }
.fx-backdrop { position: fixed; inset: 0; background: rgba(15, 18, 25, .45); }
.fx-dialog { position: relative; z-index: 1; width: 100%; max-width: 580px;
  max-height: calc(100vh - 80px); overflow-y: auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px;
  box-shadow: 0 18px 50px rgba(15, 18, 25, .3); }
.fx-close:hover { color: inherit; }
.fx-panel-fc .calc-amt { font-size: 15px; }
.fx-add { border-top: 1px solid var(--line); padding-top: 12px; }
.cohort { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.cohort > summary { cursor: pointer; padding: 10px 14px; display: flex; flex-wrap: wrap;
  gap: 4px 12px; align-items: baseline; }
.cohort-body { padding: 4px 14px 14px; }
.kpi-card.status-ahead { border-left-color: var(--ok, var(--fav-ink)); }
.kpi-card.status-behind { border-left-color: var(--attn); }
.kpi-card.status-none { border-left-color: var(--line); }
.kpi-var { color: var(--ink-2); }
.status-select:hover { border-color: var(--accent); }
.inactive-line .status-select, .row-inactive .status-select { color: var(--muted); }
.score-green { background: #dcfce7; color: #166534; }
.score-yellow { background: #fef9c3; color: #854d0e; }
.score-red { background: #fee2e2; color: #991b1b; }
.fact-value.neg { color: var(--err); }   /* a loss, and nothing else, is red */
.period-pick select { font: inherit; padding: 3px 6px; border: 1px solid var(--line);
  border-radius: 6px; background: var(--surface); color: var(--ink); }
.widget { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px 14px; }
.widget.widget-warn { border-left-color: var(--warn); }
.widget-head .linklike { font-family: var(--mono); font-size: 11px; }
.cite:hover, .cite:focus-visible, .cite.cite-hot { background: var(--accent-soft); outline: none; }
/* a citation whose cell is not on THIS page does nothing, and must not look
   like it does */
.cite.cite-none { border-bottom: 0; cursor: auto; background: none; }
[data-fact-key].fact-hot { background: var(--accent-soft);
  box-shadow: 0 0 0 2px var(--accent); border-radius: 4px; transition: box-shadow .15s; }
.full-read summary { cursor: pointer; font-family: var(--mono); font-size: 11px;
  color: var(--muted); }
.ov-card-head .muted { font-size: 12px; }
/* the verdict band */
.health.band { display: grid; grid-template-columns: minmax(0, 1fr);
  padding: 0; overflow: hidden; margin: 0 0 18px; }
.band-tag.ok { background: var(--ok-bg); color: var(--ok); }
/* comparisons in INK with a small mark — never a column of red (design
   review 2026-09-07: red is for a loss) */
.figures .up, .figures .down, .figures .flat { color: var(--ink-2); font-weight: 600; }
.figures .cmp-sub { display: block; font-size: var(--t-12); font-weight: 400; }
.measures-card .measures-title { font-size: var(--t-16); text-transform: none; letter-spacing: -.01em; color: var(--ink); }
.mlist .signal { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 2px 10px;
  align-items: center; padding: 9px 0; border: 0; border-bottom: 1px solid var(--line-soft);
  border-radius: 0; background: none; }
.signal-improving .mdot { background: var(--ok); }
.signal-softening .mdot { background: var(--warn); }
.signal-holding .mdot { background: var(--accent); }
.signal-unknown .mdot { background: var(--line); }
.mlist .signal-label { font-family: var(--sans); font-size: 13px; font-weight: 600; text-transform: none;
  letter-spacing: 0; color: var(--ink); }
.mlist .signal-head { font-size: 13px; font-weight: 600; text-align: right; white-space: nowrap; }
/* the FIGURE is never the status colour: the row already carries a coloured
   .mdot for improving/softening, and "+$7,231 vs plan" printed green was a
   fourth way of saying "ahead" on a page that has one (review 2026-09-08,
   04-T8). Ink, like every other figure. */
.signal-improving .signal-head, .signal-softening .signal-head { color: var(--ink); }
.mlist .signal-detail { grid-column: 2 / 4; font-size: 12px; }
/* the beat/miss tick at FULL strength from the tokens (review 2026-09-07, F7):
   two equiluminant pastels differed by 6% in greyscale and vanished for a
   red-green reader. Amber for a miss, never red — red is a loss. */
td.num input.fav { color: inherit; font-weight: 500; box-shadow: inset 0 -2px 0 var(--ok); }
td.num input.unfav { color: inherit; font-weight: 500; box-shadow: inset 0 -2px 0 var(--attn); }
td.num input.neg { color: var(--err); }
.var-key { padding: 0 3px; border-radius: 0; background: none; color: var(--ink); }
.var-key.fav { background: none; color: var(--ink); box-shadow: inset 0 -2px 0 var(--ok); }
.var-key.unfav { background: none; color: var(--ink); box-shadow: inset 0 -2px 0 var(--attn); }
.month-label .yr { color: var(--muted); font-weight: 500; margin-left: 3px; }
.dq-track:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn:hover { border-color: var(--line); background: var(--line-soft); color: var(--ink); }
.dq-detail .dqm-close { display: none; }
/* the inbox list is narrow: the tier, the chip, the owner and the status
   share the first line; the title and its why take the second */
.dq-inbox .dq-row { flex-wrap: wrap; row-gap: 6px; }
.pub-strip .pub-rail-label { font-family: var(--sans); font-size: var(--t-12); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
/* NO LABEL UNDER 11px, HERE TOO (review 2026-09-09, 04-T5): the month and its
   mark were 9.5px and 8.5px — the one widget on the page under the floor the
   rest of the redesign holds to. The strip has the width for both. */
.pub-strip .pub-pill { display: inline-flex; flex-direction: column; align-items: center;
  justify-content: center; width: 34px; height: 32px; padding: 0; border-radius: 6px;
  font-family: var(--sans); font-size: var(--t-12); font-weight: 600; line-height: 1;
  gap: 1px; border: 1px solid var(--line); color: var(--muted); background: var(--surface); }
/* the marks, said once in the open (04-T5) */
.pub-strip .pub-rail-legend { font-size: var(--t-12); color: var(--muted); }
/* the .tag / .dq-chip color-scheme guard is gone: it never reached an
   author-set background, and those backgrounds are tokens now */
/* the ladder's lines are drawn CRISP: a 1px horizontal rule landing on a
   half-pixel is antialiased across two rows at half strength each, which
   took the dark gridline from its declared 1.37:1 to 1.24:1 on the render
   and was most of why it could not be seen (review 05-N10). They are
   horizontal, so nothing is lost by snapping them. */
.viz-grid-line { stroke: var(--viz-grid); shape-rendering: crispEdges; }
.viz-halo { fill: var(--surface); }
.theme-toggle:hover { background: var(--line-soft); color: var(--ink); border-color: var(--line); }
.ovw-bar .icon-btn { width: 26px; height: 26px; color: var(--accent); }
.ov-panel-head .muted { font-size: 12px; }
.ov-panel-sec .label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px; }
.ov-add-btn:hover, .ov-preset-btn:hover { border-color: var(--accent); color: var(--accent); }
.stat-num.neg { color: var(--err); }
.bf-num.neg { color: var(--err); }
.board-sheet .bverdict { background: none; border-left-width: 3px; border-radius: 0; padding: 4px 0 4px 18px; margin: 0 0 8px; }
.board-sheet .bv-chip { background: none; border-color: var(--line); color: var(--muted); font-weight: 600; }
.board-sheet .board-h2 { font-size: 11px; letter-spacing: .14em; color: var(--muted); border-bottom: 1px solid var(--line);
  padding-bottom: 6px; margin: 30px 0 12px; }
.board-sheet .bd-card { background: none; border-left: 3px solid var(--line); border-radius: 0;
  padding: 6px 0 6px 16px; margin: 0 0 12px; counter-increment: bd; }
/* (the size is `.badge`'s 11px — review 2026-09-08, 03-Q7) */
.board-sheet .bd-amount { color: var(--ink-2); font-weight: 600; font-size: 12px; margin-left: 8px; }
.board-sheet .bd-why { font-size: var(--t-13); color: var(--ink-2); margin-top: 3px; line-height: 1.5; }
.board-sheet .bm-detail { color: var(--ink-2); }
.line-cell .line-name { flex: 1 1 auto; min-width: 90px; }
/* EVERY control leaves the flow until the row is hovered (review 2026-09-08,
   F13 residual): the `.has-formula` exemption kept an fx button permanently
   in the cluster, and on a branch grid that alone truncated "Gain on Sale",
   "Loan Produ…", "Interest Exp…". */
/* the forecast control is an icon, never an ƒx glyph in a button */
/* 11px is the floor, .badge's own size (review 2026-09-08, N10) */
.line-cell .badge { flex: none; margin-left: 0; padding: 0 5px; }
.audit-json summary { font-size: 11.5px; color: var(--muted); cursor: pointer;
  list-style: none; display: inline-block; }
.audit-json summary { padding: 2px 4px; border-radius: 4px; }
.audit-run summary { font-size: 11.5px; color: var(--accent); cursor: pointer;
  font-weight: 600; list-style: none; display: inline-block; }
.rail-switcher > summary { list-style: none; cursor: pointer; margin-bottom: 0; }
.board-sections > summary { list-style: none; cursor: pointer; }
.how-to-read > summary { cursor: pointer; list-style: none; }
.head-more > summary { list-style: none; }

/* THE QUIET DISCLOSURE, one treatment for the four on this page: the
   register's note, the legacy charges, and the two guarded disclosures —
   "Imports on record · remove one" in the import pop-out and the ledger's
   "Everything on the ledger" (`.gl-clear`, landing on main as its own PR) —
   so the two guarded ones look alike when the branches meet. 12.5px, the
   kit's CSS chevron (never a glyph), turning down when open. */
.page-head.suite + details.page-note > summary,
#imported-charges > summary,
:is(.gl-undo, .gl-clear) > summary {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 3px 6px; margin: -3px -6px; border-radius: var(--r-sm);
  font: 600 var(--t-sm)/18px var(--sans); color: var(--muted);
  letter-spacing: 0; text-transform: none; list-style: none; cursor: pointer;
}
:is(#modal-metric-new, [id^="modal-metric-"]) label:has(> select[data-metric-insert]) > .muted {
  grid-column: 1 / -1; grid-row: 3;
}

/* -- 2. "WHY" IS SET IN THE BODY FACE --------------------------------------
   the health card's "Why" disclosures (the computed read and a written one,
   on the company card and the branch card) were IBM Plex Mono: nothing a
   person reads to decide is set in monospace. The body face at the page's
   small-text size; the card's accent and weight stand. */
.full-read summary { font-family: var(--sans); font-size: var(--t-sm); letter-spacing: 0; }

@media (max-width: 720px) {
  .board-body { padding: 18px 16px 22px; }
}

@media (max-width: 640px) {
  /* minmax(0,1fr) — NOT 1fr (= minmax(auto,1fr)): the auto/min-content floor
     lets a wide child hold the track open, inflating the layout viewport past
     the breakpoint in a loop that never reconverges. A 0 minimum can't exceed
     its container, so the column always collapses to the phone's width. */
  .viz-grid { grid-template-columns: minmax(0, 1fr); }
}

.sheet-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }

/* ------------------------------------------------------------ security --- */
.enroll-grid { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start;
  max-width: 660px; }

@media (max-width: 720px) {
.sheet-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  /* tiles go single-column on a phone (NOT 1fr 1fr): a KPI value is an
     unbreakable accounting string — a 7-figure "($1,234,567.89)" at 26px is
     ~230px, wider than a two-up half-column, and plain 1fr's min-content floor
     would push the whole page into horizontal scroll. One full-width column
     fits any realistic figure. */
  .tiles { grid-template-columns: minmax(0, 1fr); }
}

/* two-column form so the add-contract card stays short */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.fee-add-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }

@media (max-width: 640px) {
  /* hbar: the account name gets its own line, the bar + value share the next */
  .hbar-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
  .hbar-name { grid-column: 1 / -1; white-space: normal; }
  /* mover: client name on its own line, then the flow and the delta */
  .mover { grid-template-columns: 1fr auto; gap: 2px 10px; }
  .mover-name { grid-column: 1 / -1; }
  .dq-row { flex-wrap: wrap; }
  .dq-meta { white-space: normal; }
  .dqm-body { grid-template-columns: 1fr; }
  .dq-filters { width: 100%; overflow-x: auto; }
}

/* fixed header + scrolling body + fixed footer: a flex column that clips, so
   the company list can never scroll past the header or the Done button */
.access-panel { position: relative; z-index: 1; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(15,23,42,.28);
  margin: 60px 0; max-width: 760px; width: calc(100% - 40px); max-height: 85vh;
  display: flex; flex-direction: column; overflow: hidden; }
.access-body { flex: 1 1 auto; overflow-y: auto; padding: 4px 24px 8px; }

/* the access editor is a TABLE now (owner report 2026-09-09): see "THE
   ACCESS EDITOR" at the end of this file. The grid it replaced declared nine
   columns for rows of eight cells and wrapped every row one cell off. */
.access-grid-panel { max-width: 900px; }
/* the whole editor is one form; it becomes the growing flex child so the body
   scrolls under a sticky header and above the fixed footer */
.access-form { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.seg { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
/* where the auto setup fee posts (one-time section) */
.setup-line-ctrl { display: flex; align-items: center; gap: 8px; font-size: 12px; margin: 2px 0 7px; }

/* THE list table (owner request 2026-09-02: every list follows the Contracts
   table): full width; a bold name column with muted detail after it; dates
   muted + tabular; numbers right-aligned; a Status dropdown; and ONE trailing
   actions column holding icon buttons only (✎ edits in a pop-out). No inline
   edit rows, no text-link actions, no per-table max-widths. */
.list-table { width: 100%; }
.code-cat-kind { font-size: 12px; font-weight: 400; }
.code-cat-count { margin-left: auto; font-size: 12px; font-weight: 400; }
.codes-filter { display: flex; align-items: center; gap: 10px; margin: 14px 0 2px;
  max-width: 900px; }
.settings-head { display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; max-width: 860px; margin-bottom: 14px; }

/* the settings MENU: grouped pages in a sticky column beside the content
   (owner request 2026-09-02); a dropdown on narrow screens */
.settings-shell { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px;
  align-items: start; }
.settings-menu { position: sticky; top: 18px; display: grid; gap: 16px; padding-top: 4px; }
.settings-group { display: grid; gap: 1px; }
/* the settings menu's group names are navigation, not keys (06-N8) */
.settings-group-label { font-family: var(--sans); font-size: 11.5px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 10px 5px; }
.settings-menu-mobile { display: none; margin: 0 0 16px; }

/* in-page tabs on a scenario (client-side toggle; the compare is already loaded) */
.scn-tabs { display: flex; gap: 4px; margin: 4px 0 20px; border-bottom: 1px solid var(--line); }
.scn-tab { padding: 9px 16px; color: var(--muted); font-weight: 500; background: none;
  border: 1px solid transparent; border-bottom: none; border-radius: 8px 8px 0 0;
  cursor: pointer; font: inherit; font-size: var(--t-14); }
.assign-bar { display: flex; gap: 12px; align-items: end; margin: 12px 0 20px; }
.upload-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 12px 0 20px; }
/* GL-import reconciliation report */
.gl-recon { display: grid; gap: 14px; margin: 4px 0 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
.gl-recon-n { background: var(--warn-bg); color: var(--warn, #92400e);
  border-radius: 999px; padding: 1px 8px; font-size: 11.5px; font-weight: 650; }
.gl-recon-hint { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.gl-recon-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.gl-recon-tbl .mono, .mono { font-family: var(--mono); }
.check-row { display: block; margin: 6px 0; font-weight: 550; font-size: var(--t-13); color: var(--ink-2); }
/* contract status chips */
.st { padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650;
  text-transform: capitalize; white-space: nowrap; }

/* ---- the "Ask about these reports" assistant (suite design 2026-08-26) --- */
.ask-pill {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  background: var(--inverse); color: var(--inverse-ink); border: 0; border-radius: 999px;
  padding: 10px 18px 10px 14px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(22, 22, 29, .28);
  transition: transform .12s ease, box-shadow .12s ease;
}
.ask-glyph {
  display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 50%; background: var(--accent); color: #fff; flex: none;
}
.ask-text { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.ask-title { font-size: 13px; font-weight: 600; line-height: 1.2; }
.ask-ctx {
  font-family: var(--mono); font-size: 11px; color: var(--muted-2); line-height: 1.4;
  max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.ask-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 61;
  width: min(380px, calc(100vw - 40px));
  height: min(520px, calc(100vh - 96px));
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 48px rgba(22, 22, 29, .22); overflow: hidden;
}
.ask-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: 14px 16px; background: var(--inverse); color: var(--inverse-ink); flex: none;
}
.ask-h-title { font-size: var(--t-14); font-weight: 600; }
.ask-h-ctx { font-family: var(--mono); font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.ask-msgs {
  flex: 1; overflow-y: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 10px; background: var(--bg);
}
.ask-msg {
  max-width: 86%; padding: 9px 12px; border-radius: 12px;
  font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: break-word;
}
.ask-form {
  display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line);
  background: var(--surface); flex: none;
}
.ask-send {
  border: 0; border-radius: 8px; background: var(--accent); color: #fff;
  font: inherit; font-size: 13px; font-weight: 600; padding: 0 16px; cursor: pointer;
}

/* ---- suite polish: portfolio + contracts + ledger (2026-08-26) ----------- */
.page-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.btn-link { text-decoration: none; padding: 9px 16px; border-radius: 8px; display: inline-block; }

.page-note { margin: 10px 0 4px; max-width: 900px; }

.list-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin: 14px 0 10px;
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
/* THE SEARCH OWNS ITS GROUND (family 9, 2026-09-24; the shell's rule): with
   no background of its own the field took the browser's, a grey box under
   `color-scheme: dark` beside token-painted selects. The kit restated the
   ground in its filter-bar block; the control's own definition says it now,
   so no page can reach the field without it. */
.list-search {
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 11px;
  font: inherit; font-size: 13px; min-width: 230px;
  background: var(--surface); color: var(--ink);
}
.status-form { margin: 0; }
.status-select { font: inherit; font-size: 12.5px; padding: 3px 7px; border: 1px solid var(--line);
  border-radius: 6px; background: var(--surface, #fff); color: inherit; cursor: pointer; }

/* the computed read as labeled rows (owner feedback 2026-08-26): mono label
   column, one line per measure — same sentences, scannable */
.narrative-read { display: flex; flex-direction: column; gap: 8px;
  margin-top: 12px; max-width: 880px; }
.nr-row { display: grid; grid-template-columns: 122px minmax(0, 1fr);
  gap: 12px; align-items: baseline; }
.nr-label { font-family: var(--mono); font-size: var(--t-12); font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.nr-text { font-size: 13px; line-height: 1.55; color: var(--ink); }

/* ---- the grid's branch picker (GSB Phase 1, 2026-08-26) ------------------ */
.branch-bar { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
  margin: 10px 0 12px; }
.branch-bar-label { font-family: var(--mono); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.branch-bar-note { font-size: 12px; }
.driver-grid { border-collapse: collapse; font-size: 13px; width: 100%; }
/* `.series-kind` is GONE (review 2026-09-08, N10 / N13): a third pill on one
   page, printed identically on five consecutive rows. Those rows sit under a
   group band now, which is what a repeated label means. */
.save-bar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin: 6px 0 18px; }
.save-hint { color: var(--muted); font-size: 12.5px; }
.rate-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--line-soft);
  border-radius: 6px; padding: 2px 4px 2px 8px; font-size: 12px; font-variant-numeric: tabular-nums;
  margin: 0 4px 4px 0; }
.rate-add { display: inline-block; margin-left: 4px; }
.fc-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 6px; }
.calc-gl { font-size: 11px; color: var(--muted); }
.calc-method { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.calc-sentence { font-size: 13.5px; }
.calc-remove { display: inline; }
.calc-rates { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 0 0 2px 4px; }
.calc-amt { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.setup-q { margin: 0 0 10px; font-size: var(--t-14); }
.setup-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.setup-choice { text-align: left; cursor: pointer; padding: 10px 12px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 3px; }
.sc-title { font-weight: 600; font-size: 13px; }
.sc-eg { font-size: 12px; color: var(--muted); }
.setup-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin-top: 14px; }
.setup-manual { display: block; }
.setup-note { flex-basis: 100%; margin: 2px 0 0; font-size: 12px; }
/* grid-native forecast pop-out (fx) */
.fx-modal { position: fixed; inset: 0; z-index: 60; display: flex;
  align-items: flex-start; justify-content: center; padding: 40px 16px; }
.fx-close { position: absolute; top: 12px; right: 14px; font-size: 16px; line-height: 1;
  color: var(--muted); cursor: pointer; background: none; border: none; }
.fx-panel-head { display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding-right: 20px; margin-bottom: 12px; }
.fx-panel-title { font-size: 16px; font-weight: 600; }
.fx-panel-fc { text-align: right; white-space: nowrap; font-size: 12px; }
.fx-current { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.fee-list { display: flex; flex-direction: column; gap: 3px; margin: 2px 0 2px 4px; }
.fee-row { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; }
.fee-label { font-weight: 500; }
.fee-amt { font-variant-numeric: tabular-nums; }
.fee-win { margin-left: auto; font-size: 11.5px; }
.cohort-retune { display: flex; gap: 10px; align-items: center; }
/* KPI cards (Addition A) */
.kpi-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px; margin: 12px 0 18px; }
.kpi-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  background: var(--surface); border-left: 4px solid var(--line); }   /* the theme surface, never a white fallback (owner report 2026-09-07: invisible in dark) */
.kpi-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.kpi-label { font-weight: 600; font-size: 13px; }
.kpi-state { font-size: var(--t-12); text-transform: capitalize; }
.kpi-actual { font-size: 26px; font-weight: 680; font-variant-numeric: tabular-nums; margin: 8px 0 4px; }
.kpi-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.kpi-src { font-size: var(--t-12); margin-top: 6px; }
.kpi-series-field { display: inline-flex; }
/* blended current month (Phase 4) */

/* Status dropdowns (2026-09-02): every activate/deactivate control is a select
   in the row's Status column that submits on change */
.status-select { font: inherit; font-size: 12.5px; padding: 3px 24px 3px 8px; border: 1px solid var(--line);
  border-radius: 6px; background: var(--surface); color: var(--ink); cursor: pointer; max-width: 100%; }

/* the BRANCH READ (prospect request 2026-09-04): the grid's control and the
   overview's compensation-to-output table */
.branch-read-form { display: inline; margin-left: 8px; }
/* branch pro formas (feature 6) */
.score-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
/* the branch read card: a fact strip the prose is grounded in, the hedge,
   the narrative, the compensation-to-output table */
/* ONE FIGURE OBJECT FOR THE COMPANY STRIP AND THE BRANCH FACTS (review
   2026-09-08, 04-S10). The company card's four figures sit as unboxed columns
   under a hairline (`.stats`); the branch card's six sat as outlined, filled
   boxes with up to three sub-lines each, so a reader switching Consolidated →
   Fort Collins in the same select met the same object drawn two ways. This is
   `.stats` with three columns: the hairline, no box, three fixed slots, and
   the tiles' rows shared so every bottom edge lines up. */
.branch-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 20px; padding: 14px 0 4px; margin: 6px 0 12px;
  border-top: 1px solid var(--line-soft); }
.fact { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
/* the branch card wears the system's header type and comparison, like every
   other card, and now the STRIP's: 12px 500 sentence case (review 04-N1,
   04-S10) */
.fact-label { font: 500 12px/1.3 var(--sans); color: var(--muted); }
.fact-value { font-size: 22px; font-weight: 700; letter-spacing: -.02em;
  line-height: 1.15; font-variant-numeric: tabular-nums; }
.fact-sub { font-size: 12px; line-height: 1.4; color: var(--ink-2);
  font-variant-numeric: tabular-nums; }
.branch-hedge { font-size: 12.5px; color: var(--ink); margin: 0 0 6px; }
.hedge-tag { font: 600 11.5px/1.6 var(--sans); letter-spacing: .02em;
  color: var(--warn); background: var(--warn-bg); border-radius: 4px;
  padding: 0 7px; margin-right: 6px; }
/* the branch view's RANK LINE, the fact strip's heading and the period
   picker in the health card's head (SPEC §6.28) */
.branch-rank { font-size: 12.5px; margin: 2px 0 10px; color: var(--ink); }
.facts-head { font: 600 11.5px/1.3 var(--sans); letter-spacing: .02em; margin: 8px 0 5px; }
.period-pick { display: flex; align-items: center; gap: 6px; font-size: 12px; }
/* the branch view's drill-in WIDGETS: a headline figure, three rows, a
   flag, and the full table a click away in a pop-out */
/* money at stake is not a loss and never was: these carried --err until the
   overrides at the end of the file took it off them (review 2026-09-07, N14) */
.dq-amount { font-family: var(--mono); font-size: 11px; font-weight: 700;
  margin-left: 8px; white-space: nowrap; }
.bd-amount { font-family: var(--mono); font-size: 11px; font-weight: 700; margin-left: 6px; }
.widget-row { display: grid; gap: 16px; margin: 0 0 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); }
.widget-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.widget-stat { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin-top: 8px;
  font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.widget-of { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.widget-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.widget-rows { display: grid; gap: 5px; margin-top: 10px; font-size: 12.5px; }
.widget-flag { display: inline-block; margin-top: 10px; font-family: var(--mono); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--warn); background: var(--warn-bg);
  border-radius: 4px; padding: 2px 7px; }
.comp-table { font-size: 12.5px; }
.comp-note { font-size: 11.5px; margin: 8px 0 0; }
/* the pricing card: one column per month, branch vs peers with the delta */
.pricing-grid { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.league-foot { font-size: var(--t-12); color: var(--muted); max-width: 118ch; margin: 0 0 8px;
  line-height: 1.5; }
.league-sofar { font-size: 12px; margin: 0 0 4px; }

/* FACT CITATIONS (SPEC §6.30): a figure in a read points at the cell it came
   from; hovering or pinning it lights that cell */
.cite { border-bottom: 1px dotted var(--accent); cursor: pointer; border-radius: 2px; }
.full-read { margin: 0 0 10px; }
.figures { width: 100%; border-collapse: collapse; }
.branch-bar { display: inline-flex; align-items: center; gap: 8px; }
.branch-bar-note { margin: -8px 0 16px; font-size: 12.5px; }
.month-label { font-size: 12.5px; font-weight: 600; letter-spacing: 0; }
.month-status { font-size: 11px; }

/* --------------------------------------- Decisions (redesign 2026-09-05) --- */
/* a decision card is a title in Inter, the why in plain text, the dollars at
   stake in mono — nothing a person decides on is set in 11px monospace */
.dq-row { align-items: flex-start; padding: 14px 16px 14px 13px; gap: 12px; }
.stat-cmp .up, .stat-cmp .down, .stat-cmp .flat { font-weight: 600; color: var(--ink-2); }
.stat-cmp .cmp-sub { display: block; font-size: var(--t-label); font-weight: 400; }
.badge.state { color: var(--muted); border-color: var(--line); background: transparent; }
.badge.kind { color: var(--accent); background: var(--accent-soft); }
.badge.sev-urgent { color: var(--err); background: var(--err-bg); border-color: var(--err-line); }
.badge.sev-act { color: var(--attn-ink); background: var(--attn-bg); border-color: var(--attn-line); }
.badge.sev-manual { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.badge.sev-housekeeping { color: var(--muted); background: transparent; border-color: var(--line); }
/* ONE amber, everywhere the badge renders (review 2026-09-08, V12): the third
   pass retinted this pair behind `.grid-page`, so `revisions pending` was
   5.05:1 on the grid and the identical class shipped at 3.83:1 on the attest
   page the grid links to. --warn on --warn-bg is under the floor for 11px/600;
   the severity badges' own amber (--attn-ink on --attn-bg) is 5.05:1. Only the
   three colour values change — the class, its variants and its geometry are
   untouched. */
.badge.warn { color: var(--attn-ink); background: var(--attn-bg); border-color: var(--attn-line); }
.badge.ok { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
.badge.loss { color: var(--err); background: var(--err-bg); border-color: var(--err-line); }
.hov-mark.pos { color: var(--ok); }
.hov-mark.neg { color: var(--attn); }
.driver-grid .unit { font-size: 11.5px; }

/* --- N2: a dirty cell still reads inside an unlocked row ------------- */

/* --- N10: no label under 11px, no metadata in monospace under 12px --- */
.driver-grid .computed-badge { font-family: var(--sans);
  font-size: 11px; font-weight: 600; letter-spacing: .02em; }

/* --- F13 residual: the account NAME is never truncated at 1440 ------- */
/* Priority alone could not close this: with the controls out of flow and
   every badge yielding, "Interest Expense — Warehouse Lines" still needs
   more than the 216px the line column has at full width, and shrinking the
   badge cluster only clipped a badge instead ("COGS" read "CC"). So the
   name WRAPS — two lines inside the row's own 34px, clamped, with the full
   name still on the title. Nothing on the statement is now cut mid-word. */
.line-cell .line-name { display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; white-space: normal; overflow-wrap: break-word;
  line-height: 1.15; overflow: hidden; }

/* --- the plan behind a tick, reachable from the keyboard ------------- */
/* Enter or Space on a focused cell opens the same detail the pointer gets;
   the plan line names the plan, the actual and the gap in words. */
.hov-plan .hov-actual { color: var(--ink); }
.table-head .table-title { margin: 0; font-size: var(--t-14); font-weight: 650;
  letter-spacing: 0; text-transform: none; color: var(--ink); }
.footnote .proj { color: var(--fc-ink); font-weight: 600; }

@media (max-width: 900px) {
  .mobile-title { flex: 1; min-width: 0; font-size: 15px; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 860px) {
  .settings-shell { grid-template-columns: 1fr; gap: 0; }
  .settings-menu { display: none; }
  .settings-menu-mobile { display: block; }
}

@media (max-width: 640px) {
  .ask-panel {
    right: 0; bottom: 0; width: 100vw; height: min(78vh, 560px);
    border-radius: 14px 14px 0 0; border-left: 0; border-right: 0; border-bottom: 0;
  }
  .ask-pill { right: 12px; bottom: 12px; }
  .ask-ctx { max-width: 150px; }
  .page-side { align-items: flex-start; }
  .list-search { min-width: 0; width: 100%; }
  .nr-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  html:not(.embedded) body.has-side { --tabs-h: calc(65px + env(safe-area-inset-bottom, 0px)); }
  /* the page ends above the bar, and what was pinned to the foot of the
     screen stands on it */
  html:not(.embedded) body.has-side main { padding-bottom: calc(72px + var(--tabs-h)); }
}

@media (width <= 640px) {
  :is(#modal-metric-new, [id^="modal-metric-"]) label:has(> select[data-metric-insert]) > .muted { grid-row: 4; }
}

@media (max-width: 560px) {
.enroll-grid { grid-template-columns: 1fr; }
}

@supports (grid-template-rows: subgrid) {
  .branch-facts { grid-auto-rows: min-content; }
}

@media (min-width: 1200px) {
/* the charts: three trend cards across on a wide screen */
  .viz-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media print {
  main { padding: 0; }
}

/* ------------------------------------------ the shell on phones (≤900px) --- */
@media (max-width: 900px) {
  main { padding: 14px 14px 60px; }
}

@media (max-width: 640px) {
/* -- THE PHONE IS A DESIGNED WIDTH ---------------------------------------- */
/* 390px is not an afterthought (owner decision 2026-09-21): a 16px gutter,
   room under the last row for the mobile bar, and nothing the kit draws may
   be wider than the column it sits in. */
  main { padding: var(--s-4) var(--s-4) 72px; }
}

@media (max-width: 900px) {
  /* the skip link lands main clear of the sticky phone bar (52px), so the
     page title it skips to is not under it */
  main { scroll-margin-top: 52px; }
}

@media print {
  .report-sheet, .card, .attest-table { box-shadow: none !important; border-color: var(--line); }
  /* the board packet prints as a clean sheet (owner request 2026-08-25) */
  .board-sheet { box-shadow: none !important; border: 0; border-radius: 0; max-width: none; }
  /* the pricing proposal prints as a clean full-width sheet */
  .proposal-sheet { box-shadow: none !important; border: 0; border-radius: 0; max-width: none;
    padding: 0; }
  /* every tinted board surface force-prints its colors — Chrome's default
     background-graphics setting was dropping the navy table headers to
     white-on-white (board-panel review 2026-08-26) */
  .board-table th, .bverdict, .bm-st, .bd-card, .sig-warn,
  .tile-warn { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.sig-warn { font-family: var(--mono); font-size: 11px; font-weight: 650;
  text-transform: none; letter-spacing: 0; color: var(--warn); margin-left: 6px; }
/* a delta is the comparison pattern — ink with a 7px ok/attn dot, never a
   red pill for a basis-point gap (SPEC §6.37) */
.pdelta { display: inline-block; margin-top: 3px; font-size: 11.5px; font-weight: 600;
  font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-2); }
/* the BRANCH LEAGUE TABLE (CRO review 2026-09-04; the tables system
   2026-09-07): one partial on the Overview health card and on the printed
   board sheet. The gap is the anchor figure, the state is a badge beside the
   name, and every comparison is ink with a dot — red only for a loss.

   The table wears `dt league` (review 2026-09-07, N11): its font, header
   type, `.th-sub`, `.num`, `.sub`, `td.loss`, the anchor step and the total's
   1.5px ink rule are `table.dt`'s. What is left here is what is genuinely
   league-specific — cells that stack sub-lines, the ANCHOR PLACEMENT, the
   cost-centre band, the flags and the fold. */
.league-wrap { margin: 6px 0 14px; }
.lg-dash { color: var(--muted); }
.lg-flag { margin-left: 6px; }
.ov-card-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.band-main { padding: 20px 24px 16px; display: flex; flex-direction: column; gap: 10px;
  border-right: 1px solid var(--line-soft); min-width: 0; }
.band-kicker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.band-label { font-size: var(--t-12); font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); }
.band-tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.band-count { font-size: var(--t-13); color: var(--muted); }
.band-lead { margin: 0; font-size: 16px; font-weight: 500; line-height: 1.45; max-width: 60ch; }
.band-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px;
  font-size: var(--t-13); }
/* the figures: one aligned list beside the read */
.band-figures { padding: 8px 22px 10px; display: flex; align-items: center; }
.mlist { display: flex; flex-direction: column; }
.mgroup { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; font-size: 12.5px; font-weight: 600; }
.branch-bar-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.dq-chip { font-family: var(--sans); font-size: 11px; letter-spacing: .04em; padding: 0 7px;
  text-transform: uppercase; height: 18px; display: inline-flex; align-items: center; margin-top: 2px; }
.dq-title { font-size: var(--t-14); line-height: 1.35; }
.dq-amount { font-family: var(--mono); font-size: 12px; font-weight: 600; margin-left: 8px; }
.dq-meta { font-family: var(--sans); font-size: var(--t-sm); line-height: 1.45; color: var(--muted);
  white-space: normal; overflow: visible; text-overflow: clip; margin-top: 3px; }
.dq-owner { font-family: var(--sans); font-size: 12px; margin-top: 3px; }

@media (max-width: 900px) {
  .page-controls { margin-left: 0; width: 100%; }
  .band-main { border-right: 0; border-bottom: 1px solid var(--line-soft); }
}

@media print {
.cite { border-bottom: 0; }
.fact-hot { box-shadow: none; background: none; }
}

.ov-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 20px 16px; min-width: 0; margin: 0 0 18px; }
.mdot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.branch-pick { height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  font: inherit; font-size: 13px; font-weight: 500; padding: 0 8px; max-width: 280px; }

/* ------------------------------------------- the Grid (redesign 2026-09-05) --- */
/* one header row: statement, scope, year; the toolbar under it holds the
   legend and the save controls; blended month and branches are one-line
   strips. Beat/miss vs plan is a 2px tick under the figure, so red is
   reserved for a loss; forecast months are lavender, not a colour of alarm. */
.grid-tabs, .page-tabs { display: inline-flex; background: var(--track); border-radius: 8px; padding: 3px; gap: 2px; margin: 0; }
.dq-pill { font-family: var(--sans); font-size: 11px; letter-spacing: .04em; margin-top: 2px; }
.dq-review { margin-top: 2px; }

@media (max-width: 640px), (max-width: 900px) and (pointer: fine), (max-width: 900px) and (pointer: none) {
  .mobile-bar { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 10px;
    background: var(--surface); border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 40; }
  .rail { position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; width: 272px;
    height: 100vh; transform: translateX(-100%); transition: transform .15s ease-out;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .25); }
  .rail-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(22, 22, 29, .4); }
}

.dq-track { border-radius: 8px; padding: 6px 12px; font-weight: 600; font-size: 12.5px;
  background: var(--accent); color: #fff; border-color: var(--accent); }
.dq-counts { font-family: var(--sans); font-size: var(--t-13); }
.dq-open-queue { border-radius: 8px; }
.dq-filters { background: var(--track); border-radius: 8px; padding: 3px; }
.dqm-meta, .dqm-label, .dqm-src, .dqm-note-by, .dqm-prov { font-family: var(--sans); }
.dqm-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.dqm-meta { font-size: var(--t-sm); }
.dqm-note-by { font-size: 11.5px; }
.dqm-title { font-size: 18px; letter-spacing: -.01em; }
.dqm-copy { font-size: 13.5px; line-height: 1.55; }
.btn-secondary { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.cat-head { display: flex; align-items: center; gap: 10px; }
.cat-name { font-weight: 700; font-size: 13px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  padding: 0; border-radius: 7px; border: 1px solid transparent; }
.row-actions { white-space: nowrap; }

/* ---- the decisions INBOX: queue beside the picked decision's detail ---- */
.dq-inbox { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px; align-items: start; }
.dq-detail { min-width: 0; position: sticky; top: 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px 0 12px; }
.dq-detail-empty { padding: 20px; margin: 0; }

/* every raised decision is tracked (owner decision 2026-09-05) */
.dq-quiet { color: var(--warn); font-weight: 600; }
.dq-still { color: var(--accent); font-weight: 600; }
/* publication on the health card's label line (owner feedback 2026-09-07):
   three words at the right, nothing else */
.band-kicker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pub-mini { margin-left: auto; font-size: 11px; font-weight: 500; letter-spacing: 0;
  text-transform: none; color: var(--muted); }
.pub-summary { font-size: 12.5px; color: var(--muted); }
/* NO `.viz-halo-stroke` (review 2026-09-08, 05-W1): a class selector beats an
   SVG presentation attribute, so `stroke: var(--surface)` overrode the accent
   ring the geometry gives an UNATTESTED anchor — a surface-coloured disc with
   a surface-coloured ring on a surface-coloured card. Every screen chart in
   the evidence set drew no endpoint mark at all while the PDF drew a clean
   hollow ring, and the parity harness, which compared attributes, reported
   the two as agreeing. The circle's two colours are attributes now. */
.theme-toggle { display: inline-flex; align-items: center; gap: 8px; width: 100%; height: 32px;
  padding: 0 10px; margin: 6px 0 0; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; }
.viz-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.ovw-bar { display: none; align-items: center; gap: 8px; padding: 6px 10px; margin: 0 0 8px;
  border: 1px dashed var(--accent-line); border-radius: 8px; background: var(--accent-soft);
  font-size: 12px; font-weight: 600; color: var(--accent); }
.ov-panel { position: fixed; right: 20px; bottom: 20px; width: 320px; max-height: min(70vh, 640px);
  overflow-y: auto; z-index: 70; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 12px 40px rgba(15, 23, 42, .25); padding: 14px 16px; }
.ov-panel-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.ov-add, .ov-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.ov-add-btn, .ov-preset-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 5px 11px; font: inherit; font-size: var(--t-13); font-weight: 500; cursor: pointer; }
.ov-panel-note { margin: 0; font-size: 12.5px; }
.ov-panel-foot { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line-soft); }

/* ---- the Essentials Overview (design review 2026-09-07) ------------------ */
.band-branches { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); }
/* the ask pill is a small round button, never a two-line card over content */
.ask-pill { padding: 0; width: 44px; height: 44px; border-radius: 999px; justify-content: center; gap: 0; }
.stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-label { font-size: 12px; font-weight: 500; color: var(--muted); }
.stat-num { font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--ink);
  font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat-cmp { font-size: 12px; line-height: 1.4; color: var(--ink-2); }

/* ---- the board packet as a board-ready sheet (owner request 2026-09-07):
   the firm's logo, a paper-white page whatever the theme, hairlines for
   structure, whole dollars, the four figures first ---------------------- */
.board-sheet { color-scheme: light;
  /* ONE source for the paper palette (review 2026-09-07, N14): every pin is
     an alias declared in :root, so the page, the PDF and the app can never
     drift. A dark theme must not leak its tints onto the paper — that was
     near-black flag chips on a white sheet. */
  --surface: var(--surface-light); --bg: var(--bg-light); --ink: var(--ink-light);
  --ink-2: var(--ink-2-light); --muted: var(--muted-light);
  --line: var(--line-light); --line-soft: var(--line-soft-light);
  --surface-2: var(--surface-2-light); --track: var(--track-light); --sum-bg: var(--sum-bg-light);
  --muted-2: var(--muted-2-light); --inverse: var(--inverse-light);
  --inverse-ink: var(--inverse-ink-light);
  --accent: var(--accent-light); --accent-hover: var(--accent-hover-light);
  --accent-soft: var(--accent-soft-light); --accent-line: var(--accent-line-light);
  --lav: var(--lav-light); --lav-soft: var(--lav-soft-light);
  --attn: var(--attn-light); --attn-bg: var(--attn-bg-light); --attn-line: var(--attn-line-light);
  --attn-ink: var(--attn-ink-light);
  --ok: var(--ok-light); --ok-bg: var(--ok-bg-light); --ok-line: var(--ok-line-light);
  --fav-ink: var(--fav-ink-light);
  --warn: var(--warn-light); --warn-bg: var(--warn-bg-light); --warn-line: var(--warn-line-light);
  --err: var(--err-light); --err-bg: var(--err-bg-light); --err-line: var(--err-line-light);
  /* the charts on the sheet are drawn from the PAPER palette in both themes,
     like everything else on it (review 2026-09-08, 03-N17) */
  --viz-actual: var(--viz-actual-light); --viz-plan: var(--viz-plan-light);
  --viz-prior: var(--viz-prior-light); --viz-rule: var(--viz-rule-light);
  --viz-neg: var(--viz-neg-light); --viz-grid: var(--viz-grid-light);
  --viz-axis: var(--viz-axis-light); --viz-original: var(--viz-original-light);
  background: var(--surface-light); color: var(--ink); border: 1px solid var(--line); border-radius: 4px;
  box-shadow: 0 1px 2px rgba(12, 24, 52, .06), 0 14px 40px rgba(12, 24, 52, .10);
  font-feature-settings: "tnum" 1; }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 26px 40px 18px; border-bottom: 1px solid var(--ink); }
.board-logo { display: inline-flex; align-items: center; }
.board-id { text-align: right; display: flex; flex-direction: column; gap: 1px;
  font-size: var(--t-label); color: var(--muted); letter-spacing: .01em; }
.board-body { padding: 26px 40px 30px; }
.board-client { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; color: var(--ink); }
.board-sub { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.bf { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bf-label { font-size: var(--t-label); font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.bf-num { font-size: 24px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); line-height: 1.1;
  font-variant-numeric: tabular-nums; }
.bf-cmp { font-size: 12px; color: var(--ink-2); }
.bridge-flag { color: var(--warn); font-weight: 600; }
.board-decisions { list-style: none; margin: 0; padding: 0; counter-reset: bd; }
.board-foot { display: flex; justify-content: space-between; gap: 20px; padding: 14px 40px 18px;
  border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.board-actions { display: inline-flex; align-items: center; gap: 14px; }
.b-flag { color: var(--warn); }
.dm-h { margin: 8px 0 4px; font-size: var(--t-12); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dm-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
/* one fixed label height so every figure in the strip lands on ONE baseline
   (review 2026-09-07: two-word labels wrapped and dropped their numbers a
   line) — and no basis caption: the label carries the meaning on paper too */
.dm-tile-label { display: block; font-size: var(--t-12); color: var(--muted); line-height: 1.3;
  min-height: 2.6em; }
.dm-tile-num { display: block; font-size: var(--t-20); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; margin-top: 2px; }
/* a ratio a board cannot reproduce is a question in the meeting, not an
   answer: each states its basis, under its label (review 2026-09-07, N6) */
.dm-basis { display: block; font-size: var(--t-12); color: var(--muted); line-height: 1.35; }
.dm-basis-h { font-weight: 400; letter-spacing: 0; text-transform: none; margin-left: 8px; }
.dm-omitted { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 1240px) {
  .band-main { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .band-figures { padding: 6px 22px 8px; }
}

@media (max-width: 900px) {
  .dq-inbox { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1240px) {
  .dq-inbox { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1100px) {
  .viz-grid { grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); }
}

/* ------------------------- the configurable Overview (owner decision 2026-09-06) --- */
/* every section is a widget in a three-column flow: full-width ones span
   the page, chart-sized ones sit three across; Customize mode adds a
   toolbar to each and a panel that adds, presets, resets and saves */
/* STRETCH, so `.ov-widget > .viz-card { height: 100% }` has something to
   resolve against: three trend charts in a row on three different baselines
   read as a difference in the data (review 04-N9) */
/* SIX tracks, not three (review 2026-09-08, 04-S4): a third is two tracks, a
   half is three, and a full row is all six — so a row left with TWO widgets
   can fill the row instead of leaving a third of it empty background under
   the last thing on a branch view. Visually it is still a three-column grid;
   the extra tracks exist only so a half can be expressed. */
.ov-widgets { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; align-items: stretch; }

/* ---- the four figures as one strip under the verdict (2026-09-07) --------- */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px 20px;
  padding: 14px 0 4px; margin: 6px 0 0; border-top: 1px solid var(--line-soft); }
/* auto-fit, not five fixed tracks: the strip is four figures when nothing is
   tagged for EBITDA, and five never fitted a half-screen window (review
   2026-09-07: "$1,718,82250.5%") */
.board-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 16px 22px;
  padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 18px 0 6px; }

/* ---- the derived measures (SPEC §6.36): groups of small tables ------------ */
.dm-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; }
/* the sheet's appendix on screen: key-ratio tiles, three quiet columns */
.dm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 24px;
  padding: 8px 0 16px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }

@media (max-width: 760px) {
  .board-head, .board-body, .board-foot { padding-left: 20px; padding-right: 20px; }
}

@media print {
  .board-sheet { border: 0; box-shadow: none; }
  .board-head { padding: 0 0 12px; }
  .board-body { padding: 18px 0 0; }
  .board-foot { padding: 10px 0 0; }
}

/* one badge, three variants: state (outline), kind (tint), severity (tier tint) */
.badge { display: inline-block; font: 600 11px/1.6 var(--sans); letter-spacing: .02em;
  padding: 0 7px; border-radius: 4px; white-space: nowrap; vertical-align: middle;
  border: 1px solid transparent; }
/* the comparison: ink with a 7px ok / attn dot before it — never a red column */
.cmp { color: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
/* the strip names its period, above its own rule (review 2026-09-07) */
.bf-period { margin: 18px 0 6px; font-size: var(--t-label); font-weight: 600; letter-spacing: .02em;
  color: var(--muted); }
/* CASH on the total row is a BALANCE, not a sum: body weight, and it says so */
.tot-sub { display: block; font-size: var(--t-12); font-weight: 400; color: var(--muted); }
/* every row on one tier says so ONCE, above the list: a column of four
   identical grey words carries no information (review 2026-09-07) */
.bd-alltier { margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); }
/* an appendix tile that is a MOVEMENT carries the direction mark (SPEC §6.37).
   The figure itself stays INK: a fall in a ratio is not a loss (CLAUDE.md), so
   the mark carries the direction and --err is reserved. */
.dm-delta { color: var(--ink); }
/* a definition nobody can read is the defect F10 fixed wearing a hat
   (review 2026-09-08, N3): --muted-2 was 3.16:1 on --sum-bg */
.sum-sub { display: block; font-size: 11px; font-weight: 400; color: var(--muted);
  line-height: 1.2; margin-top: 2px; }
.month-status { font-size: 11px; }
.month-tag { font-size: 11px; }

/* --- the cell detail carries the plan (F10) --------------------------- */
.hov-plan { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 4px;
  margin-bottom: 4px; border-bottom: 1px solid var(--line-soft); }
.hov-mark { font-size: 11.5px; font-weight: 600; color: var(--muted); }

/* --- the legend states the density as a fact ------------------------- */
/* the demo's actuals genuinely run 5%+ off plan, so a branch grid carries a
   tick on most cells (F7 residual). The floor does not move; the legend
   COUNTS the marks, so a reader sees the density is the data. */
.tick-count { display: inline-block; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* the card head carries what used to sit inside the plot: the guardrail's
   label with any breach in words, and the month in progress ("Sep to date
   $6,500"). The line is ALWAYS reserved so a row of charts shares a baseline
   (review 04-N9 / 05-N12). */
/* TWO lines are reserved, not one: the guardrail caption now states the
   breach's size and whether it stands, and a balance chart adds its axis
   floor, so the cash card's head runs to two lines where the others run to
   one — and a row of small multiples whose plots start at different heights
   invites a comparison of the wrong things (review 04-N9 / 05-N12, kept
   through 05-N11 / 05-N12's longer wording). */
.viz-cap { flex: 0 0 100%; font-size: var(--t-label); color: var(--ink-2);
  font-variant-numeric: tabular-nums; margin-top: -2px; min-height: 2.8em;
  line-height: 1.4; }

/* ONE annotation per chart, muted and at normal weight, never over the month
   band (the old .viz-note rule made it the boldest text in the plot) */
/* a --surface halo, so a note that crosses the guardrail rule stays legible */
.viz-anno { font-size: 11px; font-weight: 400; fill: var(--muted);
  paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }

/* the bars: the value and the share in their own right-aligned columns, an
   absent value drawing NO bar, and a rounded data end no thicker than 12px */
.hbar-fill, .hbar-fee { border-radius: 0 4px 4px 0; }
.hbar-note { grid-column: 1 / -1; font-size: 11px; color: var(--muted); margin-top: -2px; }
.widget-flag { font-family: inherit; font-size: 11px; font-weight: 600;
  text-transform: none; letter-spacing: 0; }

/* the mini trend strip (window.PnlViz.drawStrip) — a chart without a card */
.viz-strip { width: 100%; height: auto; display: block; }

/* ---- the third pass (2026-09-08) -------------------------------------- */

/* the PRIOR YEAR's endpoint label — last December's figure, which was the one
   drawn series a reader had to estimate off the axis (review 05-N16). The
   series' own ink is for the STROKE, which needs 3:1 as a graphical object;
   this is 11px TEXT, which needs 4.5:1, and --viz-prior measures 3.17:1 on
   white and 3.15:1 in dark — so the label is set in --muted (5.0:1) like the
   plan's, and the reader associates it by position exactly as they already do
   there (review 2026-09-08, 05-T10 / 04-U4). Both renderers still drop it
   when it would collide with a label or a line already drawn. */
.viz-prior-label { font-family: var(--mono); font-size: 11px; font-weight: 500;
  fill: var(--muted); }

/* the AXIS FLOOR, on its own quiet line under the card head's caption: a
   balance chart that does not start at zero must say so (SPEC §6.37), but not
   as a fourth clause behind an alarm, its size and its state (review
   2026-09-08, 05-T8). */
.viz-axis-note { flex: 0 0 100%; font-size: 11px; color: var(--muted);
  font-variant-numeric: tabular-nums; margin-top: -4px; text-align: right;
  min-height: 1.35em; line-height: 1.35; white-space: pre; }

/* -- the one badge reaches the tag family and the queue's chip ------------ */
.tag { display: inline-block; font: 600 11px/1.6 var(--sans); letter-spacing: .02em;
  padding: 0 7px; border-radius: 4px; text-transform: none; vertical-align: middle;
  border: 1px solid transparent; }

/* ==== Explain in place (help review 2026-09-18, SPEC §6.60) ==============
   The sentences the screens themselves owe a reader: a forecast column with
   actuals behind it, an engine default that is in force all the same, what
   Regenerate asks for and replaces, the cost codes nobody tagged, and the
   hours a full-time equivalent is measured at. Each is a plain sentence in
   the page, never a tooltip, and each is quiet type in an existing token so
   nothing on the screen shouts. */
.gen-note { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.4; }

@media print {
  .gen-note { display: none; }
}

/* ===== THE SHELL: THE RAIL, THE TOP BAR, THE ACCOUNT CHIP [shell] =====
   The frame every page wears: the rail and its menus, the phone bar, the account chip and gear, the jump palette, the theme switch.
   --- kept from an old banner ---
   THE SHELL · A · the rail (2026-09-22)
   --- kept from an old banner ---
   THE SHELL · C · after the review (2026-09-22)
   --- kept from an old banner ---
   THE OVERVIEW · F · the critique's remainder (2026-09-29, SPEC §6.77)
   --- kept from an old banner ---
   HELP DOORS AND THE ASSISTANT (2026-10-02) · the help center on every rail, links in an answer (SPEC §6.87)
*/

.shell main { flex: 1; min-width: 0; }
.brand-logo img { height: 18px; width: auto; display: block; }
/* the icon is a CSS mask keyed by data-ico, painted in the link's own color,
   so the anchor's text IS the link (screen readers, tests) */
.side-nav a::before { content: ""; width: 16px; height: 16px; flex: none; opacity: .8;
  background: currentColor; -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.side-nav a[data-ico="overview"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3h8v8H3zM13 3h8v5h-8zM13 12h8v9h-8zM3 15h8v6H3z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3h8v8H3zM13 3h8v5h-8zM13 12h8v9h-8zM3 15h8v6H3z'/%3E%3C/svg%3E"); }
.side-nav a[data-ico="decisions"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); }
.side-nav a[data-ico="board"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2h9l5 5v15H6zM14 2v6h6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2h9l5 5v15H6zM14 2v6h6'/%3E%3C/svg%3E"); }
.side-nav a[data-ico="grid"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M3 9h18M3 15h18M9 3v18'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M3 9h18M3 15h18M9 3v18'/%3E%3C/svg%3E"); }
.side-nav a[data-ico="contracts"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 3h16v18H4zM8 8h8M8 12h8M8 16h5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 3h16v18H4zM8 8h8M8 12h8M8 16h5'/%3E%3C/svg%3E"); }
.side-nav a[data-ico="ledger"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h13a3 3 0 013 3v13H7a3 3 0 01-3-3zM4 17a3 3 0 013-3h13'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h13a3 3 0 013 3v13H7a3 3 0 01-3-3zM4 17a3 3 0 013-3h13'/%3E%3C/svg%3E"); }
.side-nav a[data-ico="audit"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.side-nav a[data-ico="settings"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h10M18 7h2M4 17h4M12 17h8'/%3E%3Ccircle cx='16' cy='7' r='2'/%3E%3Ccircle cx='10' cy='17' r='2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h10M18 7h2M4 17h4M12 17h8'/%3E%3Ccircle cx='16' cy='7' r='2'/%3E%3Ccircle cx='10' cy='17' r='2'/%3E%3C/svg%3E"); }
.side-nav a[data-ico="portfolio"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18M5 21V10l7-5 7 5v11M9 21v-6h6v6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18M5 21V10l7-5 7 5v11M9 21v-6h6v6'/%3E%3C/svg%3E"); }
.side-nav a[data-ico="users"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20a6.5 6.5 0 0113 0M16 4.5a3.5 3.5 0 010 7M21.5 20a6.5 6.5 0 00-4.5-6.2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20a6.5 6.5 0 0113 0M16 4.5a3.5 3.5 0 010 7M21.5 20a6.5 6.5 0 00-4.5-6.2'/%3E%3C/svg%3E"); }
.side-nav a[data-ico="shield"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 4.5-3.2 8-8 9-4.8-1-8-4.5-8-9V6z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 4.5-3.2 8-8 9-4.8-1-8-4.5-8-9V6z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); }
.side-nav a:hover { background: var(--line-soft); text-decoration: none; }
.side-nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-nav a.active::before { opacity: 1; }
.topbar-back span { overflow: hidden; text-overflow: ellipsis; }
/* THE TITLE BLOCK STACKS (family 9, 2026-09-24; the shell's rule): the h1,
   its purpose, then any metadata line — a count, an audience, a length —
   each on a line of its own, whatever the summary's length. A baseline row
   put the metadata beside a short summary and under a long one, so the
   head's rhythm changed from page to page. (The kit's
   `:not(:has(.grid-tabs))` rule had already stacked every head but the
   grid's; this makes it the shell's own.) THE GRID alone keeps one baseline
   row: its title block carries the statement tabs beside the h1, and it is
   matched by the tabs it holds, never by a `.grid-page` selector. */
.page-head.suite > div:first-child { display: flex; flex-direction: column;
  align-items: flex-start; gap: 2px; min-width: 0; flex-wrap: wrap; }
.page-head.suite h1 { margin: 0; font-size: var(--t-20); font-weight: 700; letter-spacing: -.01em; }
.year-nav a:hover { background: var(--line-soft); color: var(--ink); text-decoration: none; }
.kind-toggle { display: flex; background: var(--track); border-radius: 8px; padding: 3px; }

/* the account chip at the rail's foot + its menu (opens upward) */
.gear { position: relative; }
.gear-menu.open { display: block; }
.gear-menu a:hover, .gear-menu .gear-signout:hover { background: var(--accent-soft);
  color: var(--accent) !important; text-decoration: none; }
.gear-menu form { margin: 0; }
button.primary:hover { background: var(--accent-hover); }
button.primary:disabled { background: var(--accent-line); box-shadow: none; cursor: default; }
table button[type="submit"]:not(.linklike):not(.icon-btn):not(.primary) { background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer; }
table .linklike:hover { color: var(--err); }

.entity-list li .muted { font-size: 12.5px; }
table.grid { border-collapse: separate; border-spacing: 0; width: 100%; }
table.grid th, table.grid td { border-bottom: 1px solid var(--line-soft); padding: 0;
  font-size: 13px; }
.driver-grid th.pre-start { color: var(--muted); font-style: italic; }
/* the P&L view's year summary columns: YTD actual / remaining forecast / total */
table.grid th.sum-col, table.grid td.sum-col { background: var(--sum-bg); min-width: 104px;
  text-align: right; font-variant-numeric: tabular-nums; padding: 0 12px; }
table.grid td.sum-col { color: var(--ink); font-size: 13px; }
.attest-table th, .attest-table td { border-bottom: 1px solid var(--line-soft);
  padding: 8px 14px; font-size: 13px; text-align: left; }
.attest-table thead th { background: var(--sum-bg); font-size: var(--t-label); font-weight: 650;
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  border-bottom: 1px solid var(--line); }
.attest-table th.num, .attest-table td.num { text-align: right; }
.narrative p.lead { font-size: var(--t-16); font-weight: 500; line-height: 1.5; letter-spacing: -.005em; }
.viz-card.viz-span { grid-column: 1 / -1; }
.viz-plot svg { width: 100%; height: auto; display: block; }
.drill-panel .drill-fig { font-size: var(--t-20); font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 4px; }
.drill-panel table { width: 100%; border-collapse: collapse; margin: 10px 0 0; font-size: 12.5px; }
.drill-panel th { text-align: left; font-weight: 600; color: var(--muted); font-size: 11.5px; padding: 0 0 4px; }
.drill-panel th.num, .drill-panel td.num { text-align: right; font-variant-numeric: tabular-nums; }
.drill-panel td { padding: 4px 0; border-top: 1px solid var(--line-soft); }
.drill-panel .drill-links { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; }
.viz-table table { border-collapse: collapse; margin-top: 8px; width: 100%; }
.viz-table th, .viz-table td { font-size: 12px; padding: 3px 8px; border-bottom: 1px solid var(--line-soft); }
.viz-table th.num, .viz-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.bridge-strip b.neg { color: var(--err); }
.lines-table td.tvn-name { white-space: nowrap; }
.bv-part .bv-part-label + p { font-family: Georgia, "Times New Roman", serif; font-size: 16.5px; line-height: 1.45; }
.bv-read p:first-child { font-family: Georgia, "Times New Roman", serif; font-size: 16.5px;
  color: var(--ink); }
.jump-btn span { flex: 1; text-align: left; }
.jump-btn kbd { font-family: var(--mono); font-size: 11px; background: var(--line-soft);
  border-radius: 5px; padding: 1px 6px; }
.jump-palette::backdrop { background: rgba(22, 22, 29, .4); }
.jump-list a { display: block; padding: 8px 12px; border-radius: 8px;
  font-size: 13.5px; color: var(--ink); }
/* display:block above beats the UA's [hidden] rule — re-assert it so the
   palette's type-to-filter actually hides non-matches (same gotcha as
   .access-modal) */
.jump-list a[hidden] { display: none; }
.jump-list a:hover { background: var(--accent-soft); color: var(--accent);
  text-decoration: none; }
.dq-filters a { padding: 5px 14px; border-radius: 8px; font-size: 13px;
  color: var(--muted); font-weight: 500; }
.dq-filters a span { font-family: var(--mono); font-size: 11px; margin-left: 4px;
  color: var(--muted); }
.dq-filters a:hover { color: var(--ink); text-decoration: none; }
.dq-filters a.active { background: var(--inverse); color: var(--inverse-ink); font-weight: 600; }
.bd-card.sev-urgent .bd-sev { color: var(--err); }
/* the tier's word is ink on its badge: `--attn` is the dot's orange and read
   2.4:1 there ("Money at stake" on the management report, SPEC §6.181) */
.bd-card.sev-act .bd-sev { color: var(--attn-ink); }
.dq-row.suggested:hover { transform: none; }
.dq-row.closed { cursor: default; opacity: .7; }
.dq-row.closed:hover { transform: none; background: var(--surface); }
.dqm-status .dqm-label { margin: 0 6px 0 0; }
.dqm-dismiss, .dqm-status form:last-child { margin-left: auto; }
.dec-form button { border: 1px solid var(--line); background: var(--surface); font: inherit;
  font-size: var(--t-13); padding: 5px 11px; border-radius: 7px; cursor: pointer; }
.dec-form button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.cell-hover.wide { max-width: 640px; width: 640px; }
.hov-items th, .hov-items td { padding: 3px 6px; border-bottom: 1px solid var(--line); text-align: left;
  white-space: nowrap; }
.hov-items td.num, .hov-items th.num { text-align: right; font-variant-numeric: tabular-nums; }
.hov-items th { font-family: var(--sans); font-size: 11px; font-weight: 600;
  text-transform: none; letter-spacing: .02em; color: var(--muted); }
.cell-note-form button { background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 12px; font: inherit; cursor: pointer; }
.sheet-tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); font-weight: 700; padding: 4px 10px 6px 0; border-bottom: 1px solid var(--line); }
.sheet-tbl td.num, .sheet-tbl th.num { text-align: right; font-variant-numeric: tabular-nums;
  padding-right: 14px; }
.proforma .pf-less td { color: var(--muted); }
.proforma .pf-sub td { font-weight: 600; border-top: 1px solid var(--line); }
.proforma .pf-margin td { font-size: 12px; color: var(--muted); }
.proforma .pf-net td { font-weight: 700; border-top: 2px solid var(--ink); font-size: var(--t-14); }
.version-sheet th.tot, .version-sheet td.tot { border-left: 2px solid var(--line); padding-left: 12px; font-weight: 600; }
.tbl-scroll { overflow-x: auto; }
.stepper li.active { color: var(--ink); border-color: var(--accent); }
.tfa-toggle:disabled { cursor: default; }
.row-actions .inline-form { display: inline-flex; margin: 0; }
.row-actions .linklike:hover { color: var(--accent); }
.toggle-pill.on span { background: var(--ok-bg); color: var(--ok); }
.access-head .access-close:hover { color: var(--ink); }
.ledger-filter input[type="date"] { border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px;
  font: inherit; font-size: 13px; background: var(--surface); color: var(--ink); }
.ledger-filter .list-search { min-width: 260px; }
.ledger-filter button { background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 14px; font: inherit; cursor: pointer; }
.ledger-filter button:hover { border-color: var(--accent); color: var(--accent); }
.ledger-pager a { font-weight: 600; }
.ledger-table td.ledger-date { white-space: nowrap; font-variant-numeric: tabular-nums;
  color: var(--muted); }
.pw-reset summary:hover { color: var(--accent); }
.pw-form button { background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 12px; font: inherit; cursor: pointer; }
table.grid th.fc-first, table.grid td.fc-first { border-left: 2px solid var(--accent-line); }

/* ------------------------------------------------------------ portfolio -- */
.portfolio-table td, .portfolio-table th { white-space: nowrap; }
.portfolio-table .company a { color: var(--ink); }
.portfolio-table .company a:hover { color: var(--accent); text-decoration: none; }
.drag-handle:active { cursor: grabbing; }
.form-grid .span2 { grid-column: 1 / -1; }
.lines-table .mp { margin-top: 0; }
.lines-table .mp select { border-color: var(--line); background: var(--surface); padding: 4px 5px;
  font-size: 12.5px; }
.rate-base-hint { display: block; font-size: 11px; line-height: 1.2; margin-top: 2px; }
/* uniform stacked labels inside EVERY pop-out's form grid (the Contracts
   modals set the pattern; all lists edit in pop-outs since 2026-09-02) —
   inline-flow labels wrap raggedly (short ones inline, long ones stacked) */
.access-body .form-grid > label {
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.access-body .form-grid > label > .muted { font-size: 12px; }

/* condensed top of the contract modal: the name, then a flex row of compact
   controls (client / status / size / term) instead of a tall stacked grid */
.access-body .hdr-name { display: flex; flex-direction: column; gap: 4px;
  align-items: flex-start; margin: 4px 0 2px; }
.ctrl-row .mp { margin-top: 0; }
.ctrl-row .cm-wrap { display: block; margin-top: 4px; }

/* products / modules sub-headers inside the picker */
.catalog-subhead { font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); margin: 7px 0 1px; }
.fee-row > input { border: 1px solid var(--line); border-radius: 6px; padding: 4px 7px;
  font: inherit; font-size: 12.5px; background: var(--surface); }
.fee-row button { background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 9px; font-size: 12.5px; cursor: pointer; }
.fee-row button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.dates-table th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); padding: 0 16px 2px 0; }
.fee-table thead th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted); padding: 0 8px 3px 0;
  border-bottom: 1px solid var(--line-soft); }
.fee-table th.num, .fee-table td.num { text-align: right; padding-right: 12px;
  font-variant-numeric: tabular-nums; }
.fee-table .fee-auto td { color: var(--muted); }
.fee-table .fee-actions { text-align: right; white-space: nowrap; }
.fee-edit-grid .rate-amt { width: 92px; text-align: right; }
.fee-edit-grid .fee-lbl { width: 120px; }
.icon-btn.del { font-size: 16px; }
.fee-add-toggle:hover { text-decoration: underline; }
.fee-add-grid .rate-amt { text-align: right; }
.list-table td.col-date, .list-table th.col-date {
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.list-table td.col-date { color: var(--muted); font-size: 12.5px; }
.list-table td.row-actions { display: table-cell; white-space: nowrap; text-align: right; }
.list-table td.row-actions .icon-btn { font-size: 15px; padding: 2px 5px; }
/* A CHILD ROW IS VISIBLY A CHILD (review 2026-09-08, 06-N2): every one of
   these tables makes its first cell a `th scope="row"`, so a rule written for
   a `td` matched nothing and a banded group had no visible end. */
.list-table tr.child-row > :first-child { padding-left: 34px; }
a.icon-btn:hover { text-decoration: none; }

/* Company settings: one tab per settings area */

/* revenue trend (grid tab): read-only client × month figures — grid cells
   are built for inputs, so text cells carry their own padding; the year
   column reads as the row's total */
/* 96px a month less 2 x 5px of padding holds the widest month figure this
   product prints (85px of ink at 13px tabular); 12px a side cut it once the
   tab came under fixed layout (review 2026-09-08, T3) */
.rev-trend td.num { padding: 9px 5px; white-space: nowrap;
  font-variant-numeric: tabular-nums; }
/* the year column is PINNED, with its own gutter — the block at the end of
   this file (T3) */
.rev-trend tr.computed td { border-top: 2px solid var(--line); }
.inactive-line td:nth-last-child(2), .inactive-line .code-status-select { opacity: 1; color: var(--muted); }
.rate-add label.grow { flex: 1; display: flex; flex-direction: column; gap: 4px;
  font-size: 12.5px; color: var(--muted); }
.settings-menu a { display: block; padding: 6px 10px; border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0; color: var(--ink); font-size: 13.5px; text-decoration: none; }
.settings-menu a:hover { background: var(--bg); text-decoration: none; }
.settings-menu a.active { color: var(--accent); font-weight: 600; border-left-color: var(--accent);
  background: var(--accent-soft); }

.rate-add button { background: var(--surface); border: 1px solid var(--line); border-radius: 7px;
  padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.rate-add button:hover { border-color: var(--accent); color: var(--accent); }
/* a primary button in the row (e.g. settings' Add product) keeps its accent
   fill — the rule above would otherwise repaint the background white under
   button.primary's white text */
.rate-add button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.rate-add button.primary:hover { background: var(--accent-hover); color: #fff; }
.upload-bar .muted { flex: 1 1 260px; }
.gl-recon-tbl th { text-align: left; font-weight: 600; color: var(--muted);
  border-bottom: 1px solid var(--line); padding: 3px 6px; }
.gl-recon-tbl th.num, .gl-recon-tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* :not(.primary) so a primary button (e.g. the expenses Assign) keeps its
   accent background — this rule once painted it white-on-white */
.assign-bar button:not(.primary):not(.linklike) { background: var(--surface);
  border: 1px solid var(--line); border-radius: 7px;
  padding: 6px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.ask-head .dqm-close:hover { color: #fff; }
.ask-send:disabled { opacity: .5; cursor: default; }
.btn-link.primary:hover { background: var(--accent-hover); color: #fff; }
.page-note summary:hover { color: var(--accent); }
.list-toolbar .ledger-filter { margin: 0; }
.driver-grid-wrap { overflow-x: auto; margin: 10px 0 4px; }
.driver-grid th, .driver-grid td { border: 1px solid var(--line-soft); padding: 0; }
.driver-grid thead th { background: var(--line-soft); font-weight: 600; padding: 6px 10px;
  position: sticky; top: 0; }
.driver-grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
.rate-chip .rate-del button:hover { color: var(--err); }
.calc-remove button { color: var(--muted); font-size: 15px; line-height: 1; }
.setup-form .count-pick { min-width: 220px; }
.fee-head a { margin-left: auto; font-size: 12px; white-space: nowrap; }
/* sub-P&Ls (feature 5): nested chips in the branch picker */
.chip.chip-sub { margin-left: 14px; font-size: 12px; opacity: .9; }
.chip.chip-sub::before { content: "↳ "; color: var(--muted); }
.proforma-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.chip.chip-action { border-style: dashed; cursor: pointer; font: inherit; }
.health .head-actions { margin-left: auto; display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; }
.widget-rows span:first-child { color: var(--muted); }
.widget-rows .tie-off b { color: var(--warn); }
.comp-table td.num, .comp-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pricing-grid th, .pricing-grid td { padding: 8px 12px; border-bottom: 1px solid var(--line);
  text-align: right; vertical-align: top; }
.pricing-grid thead th { font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  color: var(--muted); }
.pricing-grid th.pmeasure { text-align: left; font-weight: 600; font-family: inherit; font-size: 13px;
  text-transform: none; letter-spacing: 0; color: var(--ink); width: 28%; }
.pricing-grid th.pmeasure .muted { font-weight: 500; font-size: 11.5px; }
.pricing-grid th.psub { padding-left: 26px; font-weight: 500; }
.pricing-grid tr.pgroup th { padding-top: 12px; border-bottom: none; }
.pricing-grid tr.pgroup td { border-bottom: none; }
.pcell .pv { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pcell .pv .muted { font-size: 12px; }
table.league .lg-name { font-weight: 600; }
/* ONE anchor (SPEC §6.37): the gap column is the answer, but only the
   FLAGGED branch's gap is a step larger — the table was marking five figures
   and weighting the company total heaviest of all (review 2026-09-07) */
table.dt.league .anchor { font-size: 13px; font-weight: 600; }
.board-table.league-sheet thead th { white-space: normal; }
.ov-card-head .narrative-gen { margin-left: auto; }
.health.band .verdict { font-size: var(--t-28); font-weight: 800; letter-spacing: -.025em; line-height: 1; gap: 12px; }
.health.band .verdict-draft { font-size: var(--t-12); padding: 3px 7px; border-radius: 5px;
  background: var(--warn-bg); color: var(--warn); letter-spacing: .04em; vertical-align: middle; }
.band-foot a { font-weight: 600; }
.band-foot .board-link { margin-left: auto; }
.figures th { text-align: left; font-size: var(--t-13); font-weight: 500; color: var(--muted);
  padding: 10px 0; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.figures tr:last-child th, .figures tr:last-child td { border-bottom: 0; }
.figures td.num { text-align: right; font-size: var(--t-20); font-weight: 700; letter-spacing: -.015em;
  white-space: nowrap; font-variant-numeric: tabular-nums; }
.figures td.cmp { font-size: 12px; text-align: right; white-space: nowrap; width: 46%; line-height: 1.35; }
.figures .cmp-sub.warn { color: var(--warn); font-weight: 600; }
.pub-cta .btn-link.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
/* the measures as one list */
.measures-card .measures-head { margin: 0 0 8px; }
.measures-card .kpi-actual { font-size: var(--t-16); }
.grid-tabs a:hover, .page-tabs a:hover { color: var(--ink); text-decoration: none; }
.grid-tabs a.active, .page-tabs a.active { background: var(--surface); color: var(--ink); font-weight: 600;
  box-shadow: 0 1px 2px rgba(22, 22, 29, .08); }
/* THE FORECAST WEARS THE FORECAST'S OWN INK (review 2026-09-08, V6): the
   selected F filled --accent, which SPEC §6.37's colour table gives to the
   ACTUAL. The column is lavender and its toggle was indigo while the actual
   column's toggle was black — two of the four column-state colours pointing
   the wrong way. --fc-ink against --fc-bg reads in both themes. */
th.fc .series-toggle .seg-opt.active { background: var(--fc-ink); color: var(--fc-bg); }
.dq-filters a.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(22, 22, 29, .08); }
.dq-filters a span { font-family: var(--sans); font-size: 11px; }
.codes-table .col-gl { width: 110px; }
.codes-table .col-status { width: 150px; }
.cat-head .code-cat-count { margin-left: 0; }
.cat-head .cat-edit { margin-left: auto; }
.icon-btn .ico { vertical-align: 0; }
.row-actions .icon-btn + .icon-btn, .row-actions form + form, .row-actions form + .icon-btn,
.row-actions .icon-btn + form { margin-left: 2px; }
.dq-list { min-width: 0; }
/* SELECTION STACKS WITH THE TIER, it does not replace it (review 2026-09-08,
   06-F11): the accent rule threw away the severity colour on the one row the
   reader is actually reading. The fill and a heavier rule say "selected"; the
   colour stays the tier's (the base `.dq-row.sev-*` sets it). */
.dq-inbox .dq-row.selected { background: var(--surface-2);
  border-left-width: 6px; padding-left: 10px; }
.dq-inbox .dq-main { flex: 1 1 100%; order: 2; }
.dq-inbox .dq-owner { margin-left: auto; }
.codes-table .col-used { width: 160px; }
.codes-table .used-by { font-size: 12px; white-space: nowrap; }
a.btn-secondary:hover { text-decoration: none; }

/* ---- the health card carries the read (owner feedback 2026-09-05) ---- */
.health.band .narrative { margin-top: 2px; }

/* ---- publication as one slim strip (owner feedback 2026-09-05) ---- */
.pub-rail.pub-strip { display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 0 0 18px; padding: 8px 16px; min-height: 44px; }
.pub-strip .pub-cells { display: inline-flex; gap: 3px; flex-wrap: nowrap; }
/* AN ATTESTED MONTH IS A STATE, NOT A WIN (review 2026-09-08, 04: `--ok`
   means ahead of plan and the strip's twelve green ticks were a fifth job for
   it). A neutral state chip carries it — the ✓ is the mark — and only the
   month that needs attention wears `--attn`, the product's one attention
   token. */
.pub-strip .pub-pill.attested { background: var(--surface-2); border-color: var(--line);
  color: var(--ink-2); }
.pub-strip .pub-pill.stale { background: var(--attn-bg); border-color: var(--attn-line);
  color: var(--attn-ink); }
.pub-strip .pub-pill.none { border-style: dashed; }
.pub-strip .pub-pill:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }

/* ---- half-screen windows (owner report 2026-09-05): every two-column row on
   the Overview stacks once the main column is narrow, and a comparison wraps
   rather than clips. The breakpoints allow for the 232px rail. ---- */
.figures td.cmp { white-space: normal; }
.figures th { width: 1%; padding-right: 10px; }
/* what the tokens cannot reach */
[data-theme="dark"] .brand-logo img, :root:not([data-theme="light"]) .dark-logo-fix { filter: brightness(0) invert(.92); }
.theme-toggle .ico-sun, .theme-toggle .ico-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-sun { display: inline-block; }
:root:not([data-theme="dark"]) .theme-toggle .ico-moon { display: inline-block; }
.ov-widget { min-width: 0; position: relative; grid-column: span 2; }
.ov-widget > .health.band, .ov-widget > .ov-card, .ov-widget > .pub-rail.pub-strip,
.ov-widget > .decisions-block { margin: 0; }
.ov-widget > .viz-card { height: 100%; }
.ovw-bar .ovw-btns { margin-left: auto; display: inline-flex; gap: 2px; }
.narrative .full-read > summary { font-size: var(--t-13); font-weight: 600; color: var(--accent); cursor: pointer; }
.ask-pill .ask-glyph { margin: 0; }
.stat-cmp .cmp-sub.warn { color: var(--warn); font-weight: 600; }
/* ONE SUB-LINE OF HEIGHT RESERVED ON EVERY TILE (review 2026-09-08, 04-N14):
   Revenue and Gross margin stopped at their comparison while Net income added
   the add-back hint and Cash the runway line, so four tiles in a row read as
   three different depths. The comparison slot always has room for one
   sub-line, said or not. */
.stat-cmp { min-height: 2.75em; }
.board-sheet .bv-tag { font-size: 13px; letter-spacing: .14em; }
.board-sheet .bv-read p { font-size: 13.5px; max-width: 72ch; }
.board-sheet .bridge-strip.on-sheet { padding: 4px 0 0; margin: 0; border: 0; background: none;
  flex-wrap: nowrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.board-sheet .bridge-strip .b-item { flex: 0 1 auto; }
.board-sheet .bridge-strip .b-lab { white-space: nowrap; line-height: 1.3; }
.board-sheet .bridge-strip .b-item { font-size: var(--t-20); }
.board-sheet .bridge-strip b { font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
/* the bridge labels are the sheet's own sans, as they are in the PDF */
.board-sheet .bridge-strip .b-lab { font-family: var(--sans); letter-spacing: .04em; }
.board-sheet .board-table thead th { background: none; color: var(--muted); border-bottom: 1px solid var(--ink);
  font: 600 var(--t-label)/1.3 var(--sans); letter-spacing: .02em; text-transform: none; padding: 6px 10px;
  vertical-align: bottom; }
.board-sheet .board-table td, .board-sheet .board-table tbody th { padding: 7px 10px;
  border-bottom: 1px solid var(--line-soft); }
.board-sheet .board-method { font-size: 11px; margin-top: 28px; }
/* the Overview's cash bridge: one row, five equal columns (2026-09-07) */
.ov-widget .bridge-strip { flex-wrap: nowrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ov-widget .bridge-strip .b-item { flex: 0 1 auto; }
.ov-widget .bridge-strip .b-lab { white-space: nowrap; line-height: 1.3; }
.ov-widget .bridge-strip .b-item { font-size: var(--t-16); }
.dm-group { min-width: 0; }
.dm-tbl thead th { font: 600 var(--t-12)/1.3 var(--sans); letter-spacing: .02em; color: var(--muted);
  padding-bottom: 3px; border-bottom: 1px solid var(--line); width: auto; }
.dm-tbl td.dm-detail { font-size: 12px; color: var(--muted); }
.dm-tile { min-width: 0; }
/* a line RETIRED from a month (SPEC §6.125): its cells from that month on are
   locked and empty, drawn as the months before the company's start */
table.grid input[data-retired] { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--line-soft) 6px 8px); cursor: not-allowed; }
table.dt th { font: 600 var(--t-label)/1.3 var(--sans); letter-spacing: .02em; color: var(--muted);
  text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: bottom; }

/* ==== BOARD PACKET AND LEAGUE (2026-09-07) ==== */
/* The health card's figure strip is FOUR figures when nothing is tagged for
   EBITDA and five when something is (the tile assembly in routes, review
   2026-09-07): auto-fit, so the strip fills whatever it is given instead of
   leaving a dead fifth track. */
.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
/* the sheet's tables wear the system's wrapper */
.board-sheet .tablewrap { margin: 0 0 6px; }
/* a "draft" badge in a table cell sits on the row's baseline */
.board-sheet .board-table .badge { margin-left: 6px; vertical-align: baseline; }
/* the packet's amounts are the sheet's own sans, on the page as in the PDF
   (review 2026-09-07: monospace here, Helvetica there) */
.board-sheet .bd-amount { font-family: var(--sans); }
/* a decision whose explanation is already printed above points back at it */
.board-sheet .bd-why.bd-same { color: var(--muted); }
/* a note that belongs to the table above it, not a section of its own: the
   two inline style attributes this replaces were the last on the sheet
   (review 2026-09-07, N14) */
.board-method.tbl-note { border-top: 0; margin-top: 4px; padding-top: 0; }

/* --- the header: two rows, one labelled menu (F12) -------------------- */
.col-head { gap: 4px; }

/* --- density: the mechanics behind a disclosure (F11) ----------------- */

/* --- the blended strip (F15) --- */

/* --- ONE table language: the metrics table from table.grid (F18) ------ */
.driver-grid { border-collapse: separate; border-spacing: 0; }
.driver-grid-wrap { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); }

/* --- N15: the metrics table is an open sheet, like the P&L ----------- */
.driver-grid-wrap { border: 0; border-radius: 0; }
.viz-cap .cap-rule { display: inline-block; width: 14px; height: 0; vertical-align: middle;
  border-top: 1px dotted var(--viz-rule); margin-right: 5px; }
.hbar-row .hbar-pct { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums;
  white-space: nowrap; min-width: 34px; }
.hbar-track.empty { background: none; }

/* the branch widgets: a value column that is numbers only, and controls in
   sans at 12px (mono under 12px is for codes, not for a control) */
.widget-head .linklike { font-family: inherit; font-size: 12px; font-weight: 600; }
.widget-foot { font-size: 11.5px; margin: 8px 0 0; }

/* the branch card's comparison is the system's .cmp, at the fact strip's own
   size (review 04-N1) */
.fact-sub.cmp { font-size: 11.5px; }

/* the KPI card's variance is the ONE comparison pattern, dot and all — it
   used to be the only "behind" on the page written without one (review
   04-T8). `.cmp` carries the ink and the mark; this keeps its size. */
.kpi-meta .kpi-var.cmp { font-size: 12px; }

/* --err IS A LOSS AND NOTHING ELSE (SPEC §6.37; review 2026-09-08, 04-U9).
   The branch card opened on a red "Act now" verdict eight lines above a red
   ($78,432) — the same ink for a state and for a loss on the product's
   most-read card. The verdict tier wears the attention ink; the word beside
   the dot is what separates Act now from Watch. */
.verdict-softening { color: var(--attn-ink); }
.verdict-softening .verdict-dot { background: var(--attn); }
.health.card-softening { border-left-color: var(--attn); }
/* and --accent is the actual and the interactive, never a fourth status:
   Gross margin's measure dot read indigo beside a green and an amber one */
.signal-holding .mdot { background: var(--muted); }
.fact-base { font-size: 11.5px; margin-top: 2px; color: var(--muted);
  font-variant-numeric: tabular-nums; }

/* the runway's caveat is VISIBLE, not a `title` a mouse has to find */
.stat-cmp .sub-why { color: var(--muted); }
/* the headline strip's caveat, on the sheet as on the card (04-U1), in the
   ONE attention ink */
.bf-hint.bf-warn { color: var(--attn-ink); font-weight: 600; }

/* A CARD IS NOT STRETCHED TO ITS NEIGHBOUR (review 2026-09-08, 04-U12): the
   pricing card's content ended two-thirds of the way up a box sized to the
   eleven-line comp table beside it, which manufactured the largest void on
   the branch view. `align-items: stretch` stays on `.ov-widgets`, where three
   chart captions do have to share a baseline. */
.widget-row { align-items: start; }

/* ---- the fifth pass: the charts and the Overview (2026-09-08) ---------- */

/* (the chart pair's 1240 stack is gone with the pair: `.board-charts` is one
   column at every width now — review 2026-09-12, 05-X1.) */

/* THE AXIS FLOOR RIDES THE TITLE ROW, not a reserved line of its own (review
   2026-09-08, 05-V13): the cash card's head ran to three lines — a two-line
   guardrail caption and `axis from $1.0M` under it — over a plot the same
   pass had cut to 68px. The caption keeps its own reserved height so a row of
   small multiples still shares one baseline. */
.viz-head .viz-axis-note { order: 1; flex: 0 0 auto; margin-left: auto;
  margin-top: 0; min-height: 0; text-align: right; }

/* --attn MEANS ATTENTION AND NOTHING ELSE (SPEC §6.37; review 2026-09-08,
   04-N4). The one-time-fee tail on the client bars wore the product's alarm
   colour, and on the aism Overview it was the LONGEST element in the widget —
   a neutral revenue category telling a director something was wrong with the
   biggest client. It is a chart series, so it takes a --viz-* token: a second
   sequential step off --viz-actual, declared in both palettes. */
.hbar-fee { background: var(--viz-fee); }
.kpi-card { display: flex; flex-direction: column; }
.kpi-card .kpi-meta { margin-top: auto; }
.kpi-card .kpi-var { flex-basis: 100%; }

/* the one figure form in the measures column (review 2026-09-08, 04-N7): the
   window and the comparison base ride a sub-label, so the right-hand column
   holds a figure and nothing else */
.signal-head .sig-unit { display: block; font-size: var(--t-12); font-weight: 400;
  color: var(--muted); }
/* ==== LIST TABLES (2026-09-07) ====================================
   The list-table family — Contracts, the General ledger, Cost codes, the
   Fees and KPI tabs, the Decisions queue and inbox, the Audit trail, the
   attest schedule, the monthly report and the portfolio home — adopts the
   system above (SPEC §6.37). One badge, one header type, one absent glyph,
   hierarchy by weight and rule. Every colour here is a token.
   ================================================================ */

/* -- headers: 11.5px sans, sentence case; the uppercase mono look is gone -- */
.attest-table th, .lines-table th, .settings-table th {
  font-family: var(--sans); font-size: var(--t-label); font-weight: 600;
  letter-spacing: .02em; text-transform: none; color: var(--muted); }
.attest-table thead th { font-size: var(--t-label); font-weight: 600;
  text-transform: none; letter-spacing: .02em; }
/* a line's tag says what KIND of line it is — one tint (SPEC §6.37). Red is a
   loss and nothing else, so "required before attesting" is a STATE outline,
   never an error tint. */
.tag-cogs, .tag-cash, .tag-computed, .tag-comp, .tag-pl {
  background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.tag-req { background: transparent; color: var(--muted); border-color: var(--line); }
/* the decision chip keeps its tested class name and wears the badge grammar */
.dq-chip { font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: .02em; text-transform: none; border-radius: 4px;
  padding: 0 7px; line-height: 1.6; background: transparent; }
.dq-sev { font-size: var(--t-12); letter-spacing: .02em; border-radius: 4px;
  text-transform: none; padding: 0 7px; height: auto; line-height: 1.6; }
/* no label under 11px on these surfaces (owner rule; review 2026-09-07, F8) */
.dq-filters a span, .dqm-label, .dqm-src, .dqm-note-by,
.dates-table th, .fee-table thead th, .catalog-subhead, .tag-auto,
.rate-base-hint { font-size: 11px; }
/* money at stake is not a loss: ink, never red (SPEC §6.37 colour table) */
.dq-amount { color: var(--ink-2); font-weight: 600; }
.dq-open-queue:hover { background: var(--ink-2); text-decoration: none; }
.group-add { border: 0; background: transparent; color: var(--accent); cursor: pointer;
  font: 600 12.5px/1 var(--sans); padding: 3px 7px; border-radius: 6px; }
.group-add:hover { background: var(--accent-soft); }
.cat-head .qa-reveal { margin-left: auto; }
.cat-head .cat-edit { margin-left: 0; }
.j-leg { color: var(--muted); font-size: 11.5px; }

/* -- fees / contracts: what used to live only in a tooltip --------------- */
/* a qualifier under a figure is a BLOCK sub-line, never a trailing phrase
   inside the num cell: twenty-two figures right-aligned at the column edge and
   two stopping 70px short is the one column whose digits did not line up
   (review 2026-09-07, N13) */
.rate-steps { display: block; font-size: 11.5px; color: var(--muted);
  font-weight: 400; line-height: 1.3; }
.tcv-parts { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400;
  line-height: 1.3; }
.audit-json[open] { display: block; margin: 4px 0 0; }
.audit-json summary:hover { color: var(--accent); }
.audit-filter { display: flex; gap: 8px; align-items: center; margin: 8px 0 14px;
  flex-wrap: wrap; }
.audit-filter input[type="date"], .audit-filter select { border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 9px; font: inherit; font-size: 13px;
  background: var(--surface); color: var(--ink); }
.audit-filter .list-search { min-width: 240px; }
/* the refusals a compliance reader came for, stated before the table
   (review 2026-09-07, N5) */
.audit-refused { margin: 0 0 10px; font-size: 12.5px; color: var(--ink-2); }
.audit-filter button { background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 14px; font: inherit; cursor: pointer; }
.audit-filter button:hover { border-color: var(--accent); color: var(--accent); }

/* -- the monthly report: paper-white in both themes, and it prints -------- */
.report-sheet { color-scheme: light;
  --surface: #ffffff; --bg: #f7f7f9; --ink: #14161c; --ink-2: #3a3d46; --muted: #6b6f7c;
  --line: #e4e6ec; --line-soft: #eef0f4; --surface-2: #f4f5f8; --track: #eceef3; --sum-bg: #f8fafc;
  --muted-2: #8b8d99; --inverse: #16161d; --inverse-ink: #ffffff;
  --accent: #5b5bd6; --accent-hover: #4949c4; --accent-soft: #ececfb; --accent-line: #cfcff5;
  --lav: #c9c9f2; --lav-soft: #e3e3f8;
  --attn: #e8833a; --attn-bg: #fdf1e6; --attn-line: #f2d0ad; --attn-ink: #9a5717;
  --ok: #1f8a54; --ok-bg: #eaf7ef; --ok-line: #bfe6cd; --fav-ink: #1f8a54;
  --warn: #b5691f; --warn-bg: #fdf3e7; --warn-line: #f4dcbb;
  --err: #c0392b; --err-bg: #fdecea; --err-line: #f6cdc8;
  background: #fff; color: var(--ink); }
.report-actions a.primary:hover { background: var(--accent-fill-hover); }
/* the browser's print is the FALLBACK and reads as a link, not a second
   button (there is no base .linklike rule) */
.report-actions .linklike { border: 0; background: transparent; color: var(--accent);
  font: inherit; font-size: 13px; font-weight: 600; padding: 0; cursor: pointer; }
.report-stale { margin: 0 0 16px; padding: 10px 14px; border-radius: 8px;
  background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn);
  font-size: var(--t-13); font-weight: 600; }
/* THE ONE FAILURE RED HAS EARNED ON THIS SHEET (review 2026-09-08, 06-N1):
   a balance sheet that does not reconcile. `--err` is a loss elsewhere; an
   out-of-balance statement is the same class of fact, and printing it in the
   ink of a clean $0 is the false all-clear this product's first rule names. */
.report-outofbalance { margin: 0 0 16px; padding: 10px 14px; border-radius: 8px;
  background: var(--err-bg); border: 1px solid var(--err-line); color: var(--err);
  font-size: 12.5px; font-weight: 600; }
/* what the sheet says on every printed page */
.report-pagefoot { display: none; }

/* -- the decisions queue: every tier is a TREATMENT, never an absence ----- */
/* housekeeping wore --line, the row-divider colour, so the tier read as "no
   rule at all" — quiet is a 2px --muted-2 rule (review 2026-09-07, N16) */
.dq-row.sev-housekeeping { border-left-color: var(--muted-2); border-left-width: 2px;
  padding-left: 14px; }
.audit-json summary:hover { background: var(--surface-2); }

/* -- the guardrails: set versus the engine's own default ----------------- */
/* review 2026-09-08, 06-N5: "set" against "in force by default" is a WEIGHT
   difference, not present against absent. The em dash stays what it is
   everywhere else in this product — we do not have this figure. */
.kpi-default { color: var(--muted); font-weight: 500; }

/* -- cost codes: the tag legend ------------------------------------------ */
/* what WAGES or DEP means was hover-only (review 2026-09-07, F21) */
.codes-legend { margin: 0 0 10px; line-height: 2; font-size: 12.5px; }

/* -- the decision strip IS the charts' strip ------------------------------ */
/* review 2026-09-08, 06-N3/N9/N10: the panel drew its own bars because the
   deferral looked for `window.pnlhubViz`, a name nothing defines. It now
   draws through `window.PnlViz.drawStrip` on the server's own geometry — one
   renderer, one ladder, one money format, ONE label at the endpoint, and an
   absent month draws nothing rather than a stub bar and a dash. */
.dqm-metric .viz-strip { margin-top: 2px; }
.months-off { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums;
  white-space: nowrap; }
/* the revenue trend's own total takes `tr.total-row` in the markup, so it
   wears the statement's 700 under a 1.5px ink rule — one treatment for one
   thing (review 2026-09-08, V9). No rule of its own is needed here. */

/* ==== BOARD PACKET: THE BRIDGE, THE STRIP AND THE APPENDIX (2026-09-08) ====
   The third review's board-table findings. Every rule here was checked
   against the rendered pixel, not the declaration.
   ================================================================ */

/* the out-of-balance line stands ABOVE the strip on the sheet too, in --warn:
   red is a LOSS in this product (review 04-N15), and the bridge's own terms
   now carry the figure the note used to repeat (03-N14) */
.board-sheet .bridge-warn { display: block; margin: 0 0 8px; font-size: 12px;
  font-weight: 600; color: var(--warn); }

/* the appendix's group heading is a heading again (03-N9): with each group
   whole in its column there is nothing for a repeated table head to explain */
.board-sheet .dm-h { margin: 0 0 4px; padding-bottom: 4px;
  border-bottom: 1px solid var(--ink); }
/* the six largest figures on the sheet state their basis, like the nineteen
   below them (review 2026-09-08, N6); the label keeps its fixed height so the
   figures still land on one baseline across a row */
.dm-tile .dm-basis { margin-top: 3px; }

/* F12 — the severity pill's outline, so a tinted pill still reads as a pill
   (its ink and fill are the tier's, declared with the pill itself above). */
.dq-sev.sev-urgent { box-shadow: inset 0 0 0 1px var(--err-line); }
.dq-sev.sev-act { box-shadow: inset 0 0 0 1px var(--attn-line); }

/* N9 — mono is for the FIGURE; the words beside it are the row's own type */
.dq-stake { font-family: var(--sans); font-weight: 400; color: var(--ink-2); }

/* N4 — a decision with no series of its own has no metric panel, and the
   recommended action takes the width */
.dqm-body.dqm-solo { grid-template-columns: 1fr; }

/* N7 — the Status column is sized by what it SHOWS ("Active"), not by the
   widest option in a list nobody sees: 270px of the contracts table went to
   one word while the contract names wrapped to three lines. The pop-up list
   still sizes itself to its options. */
.contracts-table .status-select { width: 8.5rem; }
.board-sheet .v-watch .bv-tag { color: var(--attn-ink); }
.board-sheet .bv-coverage { color: var(--attn-ink); }
.board-sheet .bridge-strip b.bridge-flag, .board-sheet .bridge-warn { color: var(--attn-ink); }

/* --- N4: the mask cuts the FRAGMENT, never the card ------------------ */
/* `.edge-fade`'s mask is applied to the scroll container, and the scroll
   container WAS the card — so on the balance sheet, which pins nothing at its
   right edge, the guard razored 78px off the card: its 1px border, its corner
   radius and its ground, leaving a hard vertical cut 78px short of the P&L's
   card on the same page shell. The card's chrome moves to a shield around the
   container: the mask now fades the content onto the shield's own surface,
   and the border and the radius survive. */
.grid-shield { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); }
.grid-shield > .grid-wrap { background: transparent; border: 0;
  border-radius: inherit; box-shadow: none; }
/* 02-N12 — THE HALF-SCREEN SHEET PREVIEWS WHAT THE PDF PRINTS. The board
   page is the preview of the board packet, and at the owner's 960px width it
   folded six of the nine columns the PDF prints: what he approved was not
   what he sent. The CARD keeps the fold (it is a widget in a column); the
   SHEET keeps every column and scrolls inside the `.tablewrap` it already
   has. */
.league-scroll { display: none; }

/* --- S4: the statement's one judgement is keyed on the page ---------- */
/* Folded into a closed disclosure, green-versus-amber became the only
   difference between "we beat the board plan" and "we missed it" — two
   identical grey underlines in a screenshot or on paper. Two words, two
   swatches and the count, on the publication line; the mechanics stay in the
   disclosure. */
/* ...and it is SET OFF from the publication sentence: separated by whitespace
   alone, a status sentence and a key read as one clause (S11's lesson, which
   the counter used to break) */

/* --- S16 / S11: one line above every table — its name, and what is off  */
/* "OPERATING METRICS" was the only uppercase text on the page and the
   statement above it carried no visible title at all, so the page's
   SECONDARY table was the one that was named. Both tables take the same
   line: the table's name in sentence case at the left, the off-screen
   counter at the right, immediately above the table it counts. */
.table-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin: 0 0 6px; }
.table-head .months-off { margin-left: auto; }

/* --- S13: the reorder handle is a button ---------------------------- */
/* It was an empty `<span>`: no accessible name, no focus, no keyboard path.
   As a button it takes the browser's own chrome, so the grip is restated
   here and the focus ring is the page's. */
.drag-handle { border: 0; padding: 0; background-color: transparent; }

/* 02-S10 — A FIGURE IS A SIZE ABOVE ITS COMPARISON. On the board page the
   league's `$6,979` and its `−$1,032` were both 12px, so a cell read as two
   measures; the card and the PDF both step down. */
.board-table.league-sheet .lg-cmp,
.board-table.league-sheet .lg-sub { font-size: var(--t-12); }

/* 03-Q11 — THE YEAR'S PLAN IS A CAPTION ABOVE THE TABLE, not the fourth line
   of the note under it. It is the figure a reader hunts for. */
.board-sheet .tbl-lede { font-size: var(--t-12); color: var(--ink-2); margin: 0 0 6px; }

/* 03-Q6 — THE APPENDIX'S TWO COLUMNS ARE ASSIGNED, NOT DISCOVERED. The
   groups are wrapped in two `.dm-col` blocks whose contents `_metrics.html`
   balances by row count, so the grid's items are the columns and a group
   reads down its own column on the screen as it does on paper. */
.dm-col { min-width: 0; }

/* ==== THE RAIL'S COMPANY SWITCHER (owner request 2026-09-09) ============
   The switcher lists every company the user can open, so moving between
   companies is one click from any page. A <details> whose summary is the
   old switch row; the menu floats over the page in the rail's own surface,
   flies out beside the collapsed icon strip, and is tokens only. */
.rail-switcher { position: relative; margin-bottom: 10px; }
.rail-switcher[open] > summary { background: var(--line-soft); }
.rail-switcher[open] > summary .ico { transform: rotate(180deg); }
.rail-menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; gap: 2px;
  max-height: min(60vh, 420px); overflow-y: auto; }
.rail-menu-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px;
  border-radius: 8px; color: var(--ink); font-size: 13px; line-height: 1.25; min-width: 0;
  text-decoration: none; }
.rail-menu-item:hover, .rail-menu-item:focus-visible { background: var(--line-soft); text-decoration: none; }
.rail-menu-item[aria-current="page"] { font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }
.rail-menu-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-menu-home { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); }
.rail-mark-home { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }

/* ==== THE ACCESS EDITOR (owner report 2026-09-09) ========================
   Company | Access | one column per module, on the `table.dt` primitive. The
   header sticks inside the scrolling body, the company is the row header,
   the module columns are one width, and a company with no access fades its
   module boxes so the eye reads the rows that matter. */
.access-table { width: 100%; }
.access-table select.gg-role { min-width: 124px; }   /* never a clipped word at any width */
.access-table select.gg-role { width: 100%; padding: 5px 8px; border: 1px solid var(--line);
  border-radius: 7px; font: inherit; font-size: 12.5px; background: var(--surface);
  color: var(--ink); cursor: pointer; }
.bs-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 300px;
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(15,23,42,.18); text-align: left; }
.bs-opt { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px;
  cursor: pointer; white-space: normal; }
.bs-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.bs-err { margin: 8px 0 0; font-size: 12px; }
.board-left-out { margin: -6px 0 10px; font-size: 12.5px; color: var(--ink-2); }
.board-versions { margin: 0 0 18px; max-width: 1100px; }
.board-sheet .tbl-grid .cell-sub { display: inline; margin-left: 4px; font-weight: 400; font-size: var(--t-12); color: var(--muted); }
.board-sheet .tbl-grid .gl { color: var(--muted); font-size: var(--t-12); }
.board-sheet .tbl-grid .abstain { color: var(--muted); }

/* THE CONTRACT POP-OUTS ARE WIDE (owner request 2026-09-11: no scrolling to
   reach the fields): three columns of fields on a 1040px panel, most of the
   height allowed, two columns again on a narrow screen */
.contract-panel { max-width: 1040px; max-height: 92vh; }
.contract-panel .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.contract-panel .unit-pricing .form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.contract-panel .access-body { padding-top: 0; }
.contract-panel { max-height: 96vh; margin: 2vh 0; }
.contract-panel .access-head { padding: 12px 24px 10px; }
.contract-panel .access-head { padding: 10px 24px 8px; }
.contract-panel .access-body { padding-bottom: 2px; }

/* the client band's rename pencil (owner request 2026-09-11) */
.group-row .band-edit { margin-left: 6px; vertical-align: middle; opacity: .55; }

/* the "+ add operating metric" picker under a formula field (owner request 2026-09-11) */
select.metric-insert { margin-top: 6px; max-width: 280px; font-size: 12.5px; }

/* THE THREE STAGES OF A CONTRACT (owner request 2026-09-11, SPEC §6.41) */
.contract-form { display: block; }
.contract-form .wiz-nav { margin-top: 14px; justify-content: flex-end; }
.plan-note { margin: 4px 0 8px; font-size: 12.5px; }
.plan-table .fx-in { min-width: 180px; font-family: var(--mono, ui-monospace, monospace); font-size: 12px; }
/* a formula field with its saved-formula picker and its Save (owner request 2026-09-17) */
.fx-wrap { display: inline-flex; align-items: center; gap: 4px; }
.fx-wrap .fx-pick { max-width: 110px; font-size: 12px; }
.fx-wrap .fx-save { font-size: 11px; }
/* DIRECT COSTS AS SENTENCES (SPEC §6.165): the rows beside the four
   figures; a row is its line and tags, then the sentence and the month's
   figure, then its caption. On a phone each sentence wraps under its line
   and the figures go below the rows. Shared by the people rows. */
.plan-split { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: var(--s-5);
  align-items: start; }
.plan-main { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.plan-side .stats { grid-template-columns: minmax(0, 1fr); row-gap: var(--s-2); }
.plan-sec-head { display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--s-2); font-weight: 600; margin-top: var(--s-2); }
.plan-sec-total { display: inline-flex; align-items: baseline; gap: var(--s-2); }
.plan-sents { display: flex; flex-direction: column; gap: var(--s-2); }
.plan-sent { border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4); display: flex; flex-direction: column; gap: var(--s-2);
  background: var(--surface); }
.plan-sent-head { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap;
  font-size: var(--t-13); font-weight: 600; }
.plan-sent-head .plan-line { max-width: 260px; font-weight: 600; }
.plan-sent-head .plan-label { flex: 1 1 120px; min-width: 0; max-width: 220px; }
.plan-sent-head .plan-del { margin-left: auto; }
.plan-sent-body { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap;
  color: var(--ink-2); }
.plan-sent-body .plan-amt { width: 104px; }
.plan-sent-body .plan-count-what { width: 120px; }
.plan-field { display: inline-flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.plan-sent-res { margin-left: auto; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums; }
.plan-sent-cap { margin: 0; font-size: var(--t-13); color: var(--muted);
  font-variant-numeric: tabular-nums; }
.plan-sent-adv .fx-in { min-width: 180px; font-family: var(--mono); font-size: var(--t-13); }
.plan-add { align-self: flex-start; max-width: 260px; }
.review-table .th-sub { display: block; font-weight: 500; font-size: 11px; letter-spacing: 0; text-transform: none; }
.review-notes { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; }
.signoff { margin-top: 10px; font-size: 13px; }
.signoff-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 6px; }
.setup-group-label { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; color: var(--muted); margin: 0 0 6px; }

/* GUIDED SETUP + HELP (simplification phase 3, 2026-09-12) */
.setup-steps { list-style: none; padding: 0; margin: 0; max-width: 760px; }
.setup-step { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.setup-mark { flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%; margin-top: 5px;
  border: 2px solid var(--line); background: transparent; }
.setup-body { flex: 1 1 auto; min-width: 0; }
.setup-title { font-weight: 600; margin-right: 8px; }
.setup-step.st-done .setup-title { color: var(--ink-2); }
.setup-detail { margin: 2px 0 0; font-size: 13px; }
.help-drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(420px, 100vw); z-index: 40;
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 18px 22px; overflow: auto; }
.help-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.help-close { font-size: var(--t-20); line-height: 1; }
.help-list { margin: 0; }
.help-foot { margin-top: 16px; font-size: 13px; }

/* the comp widget's writer-only hint (FOLLOWUPS item 8) */
.widget-hint { margin: 10px 0 0; font-size: 12.5px; line-height: 1.45; }
.sum-short { display: block; font-size: 11px; font-weight: 400; line-height: 1.1;
  color: var(--muted); margin-top: 1px; font-variant-numeric: tabular-nums; }
.footnote .nodef-key { text-decoration: underline dotted var(--muted);
  text-underline-offset: 3px; font-weight: 600; color: var(--ink-2); }
.driver-grid-wrap { border: 1px solid transparent; border-width: 0 1px; }
.close-month .close-warn { border-left: 3px solid var(--attn); }
.close-month .close-warn h3 { margin: 0 0 4px; font-size: 13px; }
.close-month .close-ok { color: var(--muted); }
.close-reason { display: block; margin: 10px 0; max-width: 620px; }

/* THE REGISTER'S SCOPE, above its table (M-5): the range it opened on, how
   many rows it holds and what they add to — the register opens on the
   CURRENT MONTH, so the line is what tells a reader why it is short. */
.ledger-filter select { max-width: 220px; }
.ledger-side .access-panel { margin: 0; width: min(480px, 100vw); max-width: 100vw;
  height: 100dvh; max-height: 100dvh; border-radius: 0; }
.gl-foot-acts:not([hidden]) { display: flex; gap: var(--s-2); margin-right: auto; }
/* ==== Phase B: the plan spine (2026-09-17, SPEC §6.51) ==== */
/* THE BASIS, SAID ONCE per surface: which plan the figures are measured
   against, what it covers, what it filled and what it misses. On the health
   card it sits directly under the label line, above the verdict, because a
   reader must know the basis before the verdict it produced. */
.health .plan-basis { margin: 2px 0 10px; font-size: 12px; line-height: 1.45;
  color: var(--muted); max-width: 76ch; }
.book-line .book-later { display: block; color: var(--muted); font-size: 12.5px; }
/* a saved default is a SUGGESTION on a preloaded row (C-2): the formula sits
   in the field's placeholder, and "Use" is what fills it */
.fx-wrap .fx-use { font-size: 11px; color: var(--accent); }
/* the save-formula pop-out (O-23), in place of the browser's dialogs */
.fx-save-formula { margin: 0 0 10px; font-size: 12.5px; word-break: break-all; }

/* ==== Phase C: the audit trail, the measures, the packet foot, the layout ==== */
/* (adversarial review 2026-09-17, W-2 to W-5) */

/* --- the audit trail's toolbar (W-2) ------------------------------------- */
/* three pickers and a checkbox beside the search: the row wraps rather than
   pushing the date fields off the toolbar */
.audit-filter { flex-wrap: wrap; row-gap: 8px; }
.audit-filter select { max-width: 280px; }
.audit-filter .audit-only { display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.board-foot { flex-wrap: wrap; row-gap: 6px; }

/* ==== Phase D: data out (SPEC §6.58) ===================================== */
/* DOWNLOAD DATA on the grid: a LINK, so the browser saves the file, wearing
   the page controls' own pill so it sits with the year arrows and the fold
   chip rather than reading as body copy. */
.page-controls .grid-dl { display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font-size: 12px;
  font-weight: 550; text-decoration: none; white-space: nowrap; }
.page-controls .grid-dl:hover { border-color: var(--accent); color: var(--accent); }

/* THE API TOKEN SCREEN (Admin). The secret is printed once and never again,
   so it is set large enough to read off the screen and to select in one
   gesture; it is a key, which is what mono is for. */
.tokens-section { margin-top: 34px; }
.tokens-section .page-head { margin-bottom: 4px; }
/* the section's own add button sits at the right edge, where + New user sits */
.tokens-section .page-head h2 { margin: 0 auto 0 0; }
.token-secret { display: block; font: 600 14px/1.5 var(--mono); letter-spacing: .01em;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 12px; word-break: break-all; user-select: all; }
/* ==== Phase D: the second signature (2026-09-18, SPEC §6.59) ==============
   With a company's second-signature switch on, an open request OWNS the foot
   of the close page: the publish button is not there to press, and what
   stands in its place is the decision a second person makes. It reuses the
   attest form's own block, so nothing here is a new primitive — only the
   spacing between two forms that sit in one panel and the attention rule
   that says the month is waiting on a person. */
.sig-decide { border-left: 3px solid var(--attn); padding-left: 14px; }
.sig-check .muted { display: block; margin: 2px 0 0 22px; font-size: 12px; }
.th-sort:hover { color: var(--accent); text-decoration: none; }
.th-sort.is-sorted { color: var(--ink); font-weight: 700; }

/* the company an insight belongs to, under its title on the Insights of
   every company (SPEC 6.143) */
.pq-company { font-weight: 600; }

/* H-2 the platform standard, inside the Customize panel */
.ov-panel-std { border-top: 1px solid var(--line); padding-top: 12px; }
.ov-panel-std .ov-panel-note { margin: 2px 0 8px; }

/* ==== Help center: area A (SPEC §6.60) ==================================
   The index, the article and the six writer's macros. Every colour is a
   token, so both themes come for free; the article prints as it reads. */

/* the rail: one door on the platform nav, one quiet link in the foot */
.side-nav a[data-ico="help"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9.5 9.5a2.5 2.5 0 015 0c0 1.5-2.5 2-2.5 3.5M12 17h.01'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9.5 9.5a2.5 2.5 0 015 0c0 1.5-2.5 2-2.5 3.5M12 17h.01'/%3E%3C/svg%3E"); }
.help-foot-more { margin-top: 6px; }

/* ---- the index --------------------------------------------------------- */
.help-find { display: inline-flex; gap: 8px; align-items: center; }
.help-find input[type="search"] { min-width: 200px; }
.help-groups { display: flex; flex-direction: column; gap: 22px; }
.help-rows { border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); overflow: hidden; }
a.help-row { display: flex; gap: 16px; align-items: baseline;
  justify-content: space-between; padding: 12px 16px; color: inherit;
  text-decoration: none; border-top: 1px solid var(--line-soft); }
.help-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.help-row-meta { display: flex; gap: 8px; align-items: center; flex: 0 0 auto;
  white-space: nowrap; }
.help-empty { padding: 18px 2px; }

/* ---- the article ------------------------------------------------------- */
.help-meta { display: flex; gap: 8px; align-items: center; margin: 8px 0 0; }
.help-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr);
  gap: 28px; align-items: start; }
.help-toc { position: sticky; top: 18px; font-size: 12.5px; }
.help-terms dt:first-child { border-top: 0; }
.help-step-body { border-left: 2px solid var(--line); padding-left: 20px;
  margin-left: 10px; }
.help-shot img { display: block; max-width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.help-shot-soon { display: flex; flex-direction: column; gap: 4px;
  justify-content: center; padding: 26px 18px; border: 1px dashed var(--line);
  border-radius: 8px; background: var(--surface-2); }

.help-note { display: flex; gap: 12px; align-items: baseline; margin: 14px 0;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface-2); }
.help-note-tip { border-color: var(--accent-line); background: var(--accent-soft); }
.help-note-tip .help-note-k { color: var(--accent); }
.help-note-careful { border-color: var(--attn-line); background: var(--attn-bg); }
.help-note-careful .help-note-k { color: var(--attn-ink); }
.help-note-careful .help-note-t { color: var(--attn-ink); }

.help-next { margin: 16px 0; padding: 10px 14px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); }
.help-related { margin-top: 30px; border-top: 1px solid var(--line);
  padding-top: 14px; }
.help-unclear { margin-top: 26px; font-size: 12.5px; }
.codes-untagged { margin: 4px 0 12px; max-width: 900px; }

/* ---- The ledger's entry number (migration 0116, owner request 2026-09-21) ----
   the accounting system's own number beside the description, in the quiet
   mono the GL code wears */
.ledger-desc .entry-no { margin-left: 6px; white-space: nowrap; }

/* ---- The import's cost codes step (owner request 2026-09-21) ----
   the GL codes a file needs, added or renamed before it posts */
.gl-codes-h { margin: 14px 0 2px; font-size: 13px; }
.access-head .access-close .ico, .fx-close .ico { vertical-align: 0; }
.list-toolbar select, .ledger-filter select,
.audit-filter select, .help-find select {
  width: auto; min-width: 9rem; max-width: 18rem;
}
/* --- 11. THE DETAIL PANEL IN THE PAGE (SPEC 6.132) -------------------------
   Its title is the insight's sentence, never a label: no capitals, no
   letter spacing (the bare `h2` rule sets both), bold. Its size is on the
   scale (`--t-16`): the grid's redraw retired the stylesheet's last size
   under 11px (10.5px, SPEC 6.136), which paid for it, so the count of
   distinct sizes is where it was. The head, the title and the dollars sit
   flush with the body: the panel's own padding is the only inset.
   `_kit.html` detail_panel with `back_href`. */
.dqm-title.dqm-title-sentence { font-size: var(--t-16); font-weight: 700; line-height: 1.35;
  text-transform: none; letter-spacing: normal; }
.rail-label { margin: 14px 8px 4px; }
.side-nav { margin-bottom: 2px; }
#theme-toggle { width: var(--ctl-h-sm); height: var(--ctl-h-sm); min-height: 0;
  flex: none; margin: 0; padding: 0; justify-content: center;
  border-radius: var(--r-md); }
.help-drawer:not([hidden]) { display: flex; flex-direction: column; }
.help-list dt:not([hidden]) { display: flex; align-items: center; gap: 8px;
  margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line-soft);
  font-size: 13.5px; font-weight: 650; counter-increment: helpn; }
.jump-palette::backdrop { background: var(--scrim); }
.jump-palette input { background: var(--surface); color: var(--ink); }
.jump-palette input::placeholder { color: var(--muted-2); }
/* The four doors. Sign-in said nothing about what it was a door to, parked a
   360px card at `margin: 90px auto` with 700px of grey beneath it, and gave
   the autofocused Email a 2px ring while Password carried a hairline so faint
   it read as no control at all. The code step nested a <form> inside a <p>
   and stacked three things of three different weights in one 12.5px
   paragraph. Enrolment set a base32 key in Inter and put the QR and its own
   fallback in two equal columns. /security wore the Close-the-month form's
   class as a generic card and buried the one number a person acts on — the
   recovery-code count — mid-sentence.

   Nothing here changes a word. The frame, the three tiers, the numbered
   procedure and the rows are layout; the templates carry the same sentences
   in the same order. Every colour is a token. */

/* -- ONE AUTH FRAME (Relume): the mark above a card, centred ------------- */
/* the sign-in page has no rail, so `main`'s page padding is the only thing
   between the frame and the viewport edge — the frame owns that gutter */
main:has(> .auth-page) { padding: 0; max-width: none; }
.topbar-back span { min-width: 0; overflow: visible; text-overflow: clip; }

/* --- 4. THE REGENERATE NOTICE ------------------------------------------
   (Rendered on Contracts and the General ledger after Regenerate.) What was
   posted is a statement of fact and its counts are figures: a `--line` edge
   and tabular numerals, not a green ground that reads as an all-clear over
   a list nobody has checked yet. The conflicts case keeps its attention
   ground: there a person has to act. */
.notice.gen-result { line-height: 1.55; font-variant-numeric: tabular-nums; }
/* the amounts were borderless figures on the grid's cell rule (`td.num
   input`): in a form they are fields like their neighbours */
.contract-panel .plan-table td.num input.rate-amt,
.several-rows td.num input {
  height: auto; min-height: var(--ctl-h-sm); padding: 0 8px;
  border: 1px solid var(--field-line); border-radius: var(--r-sm);
  background: var(--surface); font-size: var(--t-sm); text-align: right;
}
.contract-panel .review-table tr.review-sub th[scope="row"] {
  position: relative; padding-left: 22px; color: var(--muted); font-weight: 400;
}

/* WHAT THE REVIEW FOUND AND THIS BLOCK LEAVES, and why. The four tabs sit
   TWO BY TWO under 420px: a scrolling strip cut the open tab ("Pending
   approval · 1", the last of four) out of view at rest, and a strip whose
   open tab is off screen is worse than a second row — the kit's track and
   pills are kept, only the wrap differs, and only on this page. The
   assignment table stays 560px wide: at full width its one select would run
   850px so that the remove × aligns with the other tables'. The status
   control on a desktop shows its caret on hover, as the brief asked; the
   pending row's status wears the tint of its lifecycle (active) beside the
   amber sign-off badge that says it counts nothing — two axes, two marks
   (words). The review's notes stay inside the card as a footnote (the
   wrapper carries the surface and the markup is pinned). The band and foot
   labels are not frozen on the phone: a sticky colspan cell would cover the
   figures scrolling under it. */

/* THE CONTRACT INTERVIEW (SPEC §6.147): the questions on the left, the draft
   beside them; under them below 900px. */
.interview:not([hidden]) {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: var(--s-5); align-items: start;
}
.access-body:has(> form.gl-form), #modal-gl-import .access-body { padding-bottom: 0; }
.settings-shell > .page-head { grid-area: head; }
.settings-shell > .settings-menu { grid-area: menu; }
.settings-shell > .settings-menu-mobile { grid-area: mobile; }
.settings-shell > .settings-body { grid-area: body; }
/* the Company tab reads as a column of settings, not a sheet */
.set-block.set-card { max-width: 760px; }
/* a month picker is two selects, never the card's whole width */
.set-block-body .mp { max-width: 320px; }

/* --- 5. ALERT LEVELS AND TRACKED MEASURES BREATHE (ElevenLabs, Sentry) -----
   Two blocks, each a card; a 44px row with the rule clause on its own
   11.5px `--muted` line; the figure pulled in from the far edge by the
   block's width, so the clause and its figure are one reach apart. */
.set-block:has(> .tablewrap > :is(.kpi-levels, .kpi-measures)),
.set-block:has(> .set-block-empty) { max-width: 760px; }

/* --- 6. THE HELP INDEX DRAWS ONE EDGE BETWEEN VISIBLE ROWS -----------------
   `a.help-row:first-child` counted the rows the live filter had hidden, so a
   group whose first row was filtered out drew its first visible row's rule
   under the card's own edge: a doubled top. The hairline is drawn only
   between two visible rows, as the glossary's list already does. */
a.help-row { border-top: 0; }

/* THE DOORS: the platform rail's Portfolios item, a case drawn like every
   rail icon (a mask in the link's own colour); the All companies head lists
   them in its overflow menu (SPEC 6.143) */
.side-nav a[data-ico="portfolios"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M9 7V4h6v3M3 13h18'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M9 7V4h6v3M3 13h18'/%3E%3C/svg%3E"); }

/* --- DATA INTEGRITY (the plan of 2026-10-26) --- */
/* The page at /e/SLUG/integrity and the Overview's Data integrity widget,
   on the kit: the field, the three button roles, one table grammar. The
   figures are a strip of four with ONE anchor a step larger; the money at
   stake is a line of two named figures under it; the list is a dt table
   banded by kind of finding. Tokens only, in both themes; red is a loss
   and nothing here is one, so attention takes the attention ink. */

/* the rail's door: a document with a check, on the rail's 24-box at 1.8 */
.side-nav a[data-ico="integrity"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2h9l5 5v15H6zM14 2v6h6M9 14.5l2 2 4-4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2h9l5 5v15H6zM14 2v6h6M9 14.5l2 2 4-4'/%3E%3C/svg%3E"); }
.mobile-title .ico { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo img { filter: brightness(0) invert(.92); }
}

@media (max-width: 1240px) {
  .figures td.num { font-size: var(--t-16); }
/* a loss is red on the blended card too (review 2026-09-08, N5) */

/* --- N14: the half screen gives the line column the width it asks for  */
  /* `nowrap` min-content beat `max-width: 200px` and the column rendered
     ~254px — most of a sixth month. The name floor drops. The GL code
     stepped out here too until the owner asked for it back (2026-11-18,
     SPEC §6.158): it shows down to a phone's width now. */
  .line-cell .line-name { min-width: 70px; }
/* half-screen: TWO columns, so four figures make a clean 2x2 instead of three
   plus a stranded fourth (SPEC §6.37's half-screen rule; review 04-N8). It
   sits here, after the auto-fit rule above, or it never applies. */
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* the branch strip folds the same way, because it is the same object
     (review 2026-09-08, 04-S10) */
  .branch-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ...and half a screen gets half the indent: a name column squeezed to
   120px on the settings tabs wrapped to four lines to pay for 34px of air.
   A child still reads as a child (SPEC §6.37's half-screen rule). */
  .list-table tr.child-row > :first-child { padding-left: 18px; }
}

@media screen and (max-width: 1240px) {
  .board-sheet .league-scroll { display: block; font-size: var(--t-12); color: var(--muted);
    margin: -4px 0 8px; }
}

@media (max-width: 1100px) {
  .ov-panel { left: 12px; right: 12px; width: auto; }
  .contract-panel .form-grid, .contract-panel .unit-pricing .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .pub-strip .pub-cells { flex-wrap: wrap; }
  /* A TAP TARGET IS 40px ON A PHONE. The theme control is an icon button at
     the account chip's right (the owner's decision) and on a desktop that is
     28px of quiet chrome; on a touch width it was the smallest thing in the
     drawer. The icon does not change — the hit area does. */
  #theme-toggle { width: 40px; height: 40px; }
  .interview:not([hidden]) { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .figures td.num { font-size: 16px; }
}

.dm-tbl td.num { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); padding-right: 12px; }
.dm-tbl td.dash { color: var(--muted); font-weight: 400; }

@media (max-width: 640px) {
  /* A NAME FOR A SCREEN READER NEVER WIDENS THE PAGE (SPEC §6.171, found
     2026-11-19): set out of the flow, the hidden name of a table's last
     column ("Actions") escaped the table's scroll box and stood where the
     column stands, hundreds of pixels past the screen. A phone lays the
     bottom bar out against the page's full width, so on Contracts, the
     report's history, Snapshots and KPIs the bar fell below the screen. In a
     table's scroll box the name stays in the flow, still one pixel and still
     read aloud. */
  .tablewrap .sr-only { position: static; display: inline-block; margin: -1px; clip-path: inset(50%);
    vertical-align: top; }
}

.audit-refused .badge { margin: 0 3px; }
.codes-legend .tag { margin-right: 3px; }

/* N17 — a pop-out's table is a table: it wraps like every other one */
.access-panel .tablewrap { margin: 0; }
/* THE PLAN TABLE'S GAP COLUMN (05-T3) speaks the league's grammar: the figure
   in ink, its side and size on a line under it with the ok/attn dot. */
/* ... and it WRAPS: a `nowrap` qualifier inherited from `.num` is what makes
   a nine-column table wider than its page (the fifth pass's first lesson) */
.board-sheet .pm-cmp { display: block; font-size: var(--t-12); color: var(--ink-2);
  font-weight: 400; line-height: 1.35; white-space: normal; }
/* 03-N7 — ONE ATTENTION INK ON THE SHEET, AND STATE WORDS IN --muted. Three
   oranges did "attention" on one page (`--warn` #b5691f on the bridge's
   residual, `--attn-ink` #9a5717 on SOFTENING, `--attn` #e8833a on the
   league's dot), and five of seven State cells printed IMPROVING in --ok —
   the mirror of the column of red the owner ruled out. SPEC §6.37 names four
   tokens: `--attn` is the MARK, `--attn-ink` the TEXT, and a state is neither
   a mark nor a direction. */
.board-sheet .st-improving, .board-sheet .st-holding, .board-sheet .st-unknown {
  color: var(--muted); opacity: 1; }
.board-sheet .sig-warn { color: var(--attn-ink); }
/* 05-V3 — last year's figure, under the figure it compares, naming its own
   month: the packet's prior-year listing keyed 2025's figures onto 2026's
   months and totalled FY2025 under a heading that said 2026 */
.board-sheet .pm-prior { display: block; font-size: var(--t-12); color: var(--muted);
  font-weight: 400; line-height: 1.35; white-space: normal; }

/* 03-Q9 — ONE AMBER ON BOTH SURFACES. `--warn` is gone from the printed
   packet and was still the ink of the bridge's "unposted · Aug 2026" on the
   page the owner proofs, so the sheet carried three ambers on screen and two
   on paper. */
.board-sheet .b-flag { color: var(--attn-ink); }
.access-body .tablewrap { margin: 0 -4px; }

/* --- the packet foot names the attestation (W-4) ------------------------- */
/* the foot is a flex row of short spans; this one is a sentence, so it takes
   the width and the others sit under it */
.board-foot .bfoot-att { flex: 1 1 100%; order: -1; line-height: 1.45;
  color: var(--ink-2); }
.sig-decide .btn-secondary { margin-left: 8px; }
.attest-form .sig-note { max-width: 640px; margin: 10px 0 6px; }

@media (max-width: 640px) {
  .plan-sent-head .plan-line, .plan-sent-head .plan-label { max-width: none; flex: 1 1 100%; }
}

/* ---- Overview on a phone (re-grade item #3) — placed AFTER the base overview
   rules above so these overrides win: a media query adds no specificity, so a
   later same-specificity base rule (e.g. .hbar-row) would otherwise beat it.
   The fixed-min grids force whole-page horizontal scroll below ~420px. ---- */
  /* topbar: a phone can't fit brand + tabs + controls + gear on one row, so
     let it wrap instead of forcing the whole page wider than the viewport.
     The tab strip gets its own full-width line and scrolls horizontally. */
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 8px 16px; row-gap: 10px; column-gap: 14px; }
  .subnav { flex: 1 1 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .subnav::-webkit-scrollbar { display: none; }
  .contract-panel .access-head { padding-left: 16px; padding-right: 16px; }
  /* a multi-column form grid is one column on a phone */
  .form-grid, .contract-panel .form-grid,
  .contract-panel .unit-pricing .form-grid { grid-template-columns: minmax(0, 1fr); }

/* --- 5. THE CONTRACT'S TERM ON A PHONE ----------------------------------
   From / Until / Cancel is three columns of a month-and-year pair. On the
   full-width sheet they ran past 390px: the header read "CANCE" and the
   cancel column's em dash sat half in the gutter. The table fits the sheet,
   and each month-and-year pair stacks inside its own column. */
  .contract-panel .dates-table { width: 100%; table-layout: fixed; }
  html:not(.embedded) .mobile-bar .side-toggle { display: none; }
  html:not(.embedded) .mobile-title .ico { display: block; flex: none; color: var(--muted); }
  html:not(.embedded) body:not(.side-open) .rail { visibility: visible;
    box-shadow: 0 -2px 8px var(--shade-edge); }
  html:not(.embedded) body:not(.side-open) .rail > :not(.mobile-tabs) { display: none; }
  /* open, the rail is the sheet: the whole screen, scrolling over the bar */
  html:not(.embedded) body.side-open .rail { top: 0; height: 100dvh; padding: 14px 12px 0;
    overflow-y: auto; z-index: 60; transition: none; box-shadow: none; }
  html:not(.embedded) body.side-open .rail-backdrop { display: none; }
  html:not(.embedded) body:not(.side-open) .mobile-tabs { margin: 0; }
  /* a door in the bar is not listed a second time in the sheet, and a group
     the bar empties loses its word */
  html:not(.embedded) .rail:has(.mobile-tabs[data-doors~="overview"]) .side-nav a[data-ico="overview"],
  html:not(.embedded) .rail:has(.mobile-tabs[data-doors~="decisions"]) .side-nav a[data-ico="decisions"],
  html:not(.embedded) .rail:has(.mobile-tabs[data-doors~="board"]) .side-nav a[data-ico="board"],
  html:not(.embedded) .rail:has(.mobile-tabs[data-doors~="grid"]) .side-nav a[data-ico="grid"],
  html:not(.embedded) .rail:has(.mobile-tabs[data-doors~="contracts"]) .side-nav a[data-ico="contracts"],
  html:not(.embedded) .rail:has(.mobile-tabs[data-doors~="ledger"]) .side-nav a[data-ico="ledger"],
  html:not(.embedded) .rail:has(.mobile-tabs[data-doors~="integrity"]) .side-nav a[data-ico="integrity"],
  html:not(.embedded) .rail:has(.mobile-tabs[data-doors~="audit"]) .side-nav a[data-ico="audit"],
  html:not(.embedded) .rail:has(.mobile-tabs[data-doors~="settings"]) .side-nav a[data-ico="settings"],
  html:not(.embedded) .rail:has(.mobile-tabs[data-doors~="help"]) .side-nav a[data-ico="help"],
  html:not(.embedded) .rail:has(.mobile-tabs[data-doors~="portfolio"]) .side-nav a[data-ico="portfolio"],
  html:not(.embedded) .rail:has(.mobile-tabs[data-doors~="portfolios"]) .side-nav a[data-ico="portfolios"],
  html:not(.embedded) .rail:has(.mobile-tabs[data-doors~="users"]) .side-nav a[data-ico="users"],
  html:not(.embedded) .rail:has(.mobile-tabs[data-doors~="shield"]) .side-nav a[data-ico="shield"] { display: none; }
  html:not(.embedded) .rail-label:not(:has(+ .side-nav > a:not([data-ico="grid"]):not([data-ico="contracts"]))) {
    display: none; }
}

@media (max-width: 640px), (max-width: 900px) and (pointer: fine), (max-width: 900px) and (pointer: none) {
  .mobile-bar .side-toggle { width: 40px; height: 40px; }
}

/* --- T4: a badge never renders a different word --------------------- */
/* `.line-cell { overflow: hidden }` cut the one balance-sheet row carrying
   two tags by a couple of pixels, and REQ read "REC" — a real and different
   word in finance, asserting a control this product does not perform. The
   labels keep their own width; the NAME yields the space instead (it wraps
   inside the row's own 34px, and its full text stays on the title). */
.line-cell .badge { min-width: max-content; }
/* THE MONTH COLUMNS LINE UP (owner direction 2026-09-14, "the monthly columns
   should align"): the page's script copies the statement's rendered column
   widths onto this table's header, sizes the filler to the statement's
   summary columns, and scrolls the two containers together. The filler is
   invisible: no border, no ground. */
.driver-grid .align-filler { border: 0; background: transparent; padding: 0; width: 0; }
/* the search is the one control that earns width */
.list-toolbar .list-search, .ledger-filter .list-search,
.audit-filter .list-search, .help-find input[type="search"] {
  flex: 1 1 220px; min-width: 220px; max-width: 360px;
}
.rail-menu-item .rail-mark { width: 24px; height: 24px; font-size: 11px; }

@media (max-width: 640px), (max-width: 900px) and (pointer: fine), (max-width: 900px) and (pointer: none) {
  .rail-head #side-toggle { display: none; }
}

#modal-save-formula .fx-save-foot {
  display: flex; justify-content: flex-end; align-items: center; gap: 8px;
  margin: 12px -20px -16px; padding: 12px 20px; border-top: 1px solid var(--line);
}

/* --- 3. IMPORT GL IS ONE COLUMN THAT ENDS ON ITS FOOT (incident.io) -------
   The body is a column; each step's form steps out of the box
   (`display: contents`, the DOM is untouched) so its foot can be the last
   thing in the pop-out, after the explanation that follows the form in the
   markup. `flex-shrink: 0` everywhere: a scroller in a column would
   otherwise shrink to nothing. */
#modal-gl-import .access-body { display: flex; flex-direction: column; }

/* THE STEP RAIL: three numerals joined by hairlines, no words (lead
   decision) — the current one filled, a done one tinted; the step's own line
   under it is its label */
#modal-gl-import .gl-steps {
  display: flex; align-items: center; list-style: none;
  margin: 0 0 16px; padding: 0; counter-reset: gl-step;
}
#series-manage .metric-name {
  display: grid; grid-template-columns: 18px 24px minmax(0, 1fr);
  column-gap: 4px; align-items: center;
}

@media (max-width: 640px), (max-width: 900px) and (pointer: fine), (max-width: 900px) and (pointer: none) {
  body.side-open .rail { transform: none; }
  body.side-open .rail-backdrop { display: block; }
}

@media (width <= 640px) {
  .set-block-body .mp { max-width: none; }
}

@media screen and (max-width: 640px) {
  .list-toolbar .list-search, .ledger-filter .list-search,
  .audit-filter .list-search, .help-find input[type="search"] {
    flex: 1 1 100%; min-width: 0; max-width: none;
  }
  /* the help center's is a SEARCH form, not a filter over a table: its one
     short picker and its button share the row under the field */
  .help-find select { flex: 1 1 auto; max-width: none; }
}

@media (width > 640px) and (width <= 1240px) {
/* All companies shows three figures: they stay one row here, where two
   columns would strand the third (SPEC §6.143) */
  .stats:has(> [data-figure="open-months"]) { grid-template-columns: repeat(3, minmax(0, 1fr)); } /* collapsed: a 56px icon strip, every door still one click away */
}

@media (min-width: 901px), (min-width: 641px) and (pointer: coarse) {
  body.side-collapsed .rail { width: 56px; padding: 12px 8px 10px; }
  body.side-collapsed .rail-head { justify-content: center; padding: 2px 0 10px; }
  body.side-collapsed .rail-head .brand-logo, body.side-collapsed .rail-entity-name,
  body.side-collapsed .rail-switch .ico, body.side-collapsed .rail-label,
  body.side-collapsed .jump-btn span,
  body.side-collapsed .jump-btn kbd, body.side-collapsed .chip-id,
  body.side-collapsed .chip-caret, body.side-collapsed .topbar-back span { display: none; }
  body.side-collapsed .rail-switch { justify-content: center; padding: 6px 0; }
  body.side-collapsed .jump-btn { width: 40px; margin: 0 auto 10px; padding: 0; justify-content: center; }
  body.side-collapsed .topbar-back { justify-content: center; padding: 0; }
  body.side-collapsed .side-nav a { justify-content: center; padding: 0; width: 40px; margin: 0 auto;
    font-size: 0; } /* the text folds away; the mask icon keeps its 16px */
  body.side-collapsed .side-count { position: absolute; top: 3px; right: 2px; margin: 0;
    padding: 0 5px; font-size: 11px; line-height: 14px; }
}

/* the sub-line and the comparison each own a line under their figure, and a
   figure's qualifier never breaks across two ("3-mo avg" broken at its hyphen
   read as a stray "3") */
table.league .lg-sub, table.league .lg-cmp { display: block; line-height: 1.35;
  font-variant-numeric: tabular-nums; white-space: nowrap; }
table.dt .sub { display: block; font-size: var(--t-label); color: var(--muted); font-weight: 400; line-height: 1.3; }

.admin-2fa .toggle-pill span {
  position: relative; display: inline-flex; align-items: center; justify-content: flex-end;
  box-sizing: border-box; width: 52px; height: 26px; padding: 0 9px 0 0;
  border: 1px solid var(--field-line); border-radius: var(--r-pill);
  background: var(--track); color: var(--muted);
  font: 650 11px/1 var(--sans); letter-spacing: .02em;
  transition: background .12s ease, border-color .12s ease;
}

@media (min-width: 901px), (min-width: 641px) and (pointer: coarse) {
  body.side-collapsed .user-chip { padding: 3px; justify-content: center; width: 40px; margin: 0 auto; }
}

/* the toolbar's button is the sheet's ink-filled control, declared once at
   the end of this file — the navy rule here was overridden and dead */
.board-toolbar button.primary { font: inherit; font-size: 13px; font-weight: 600;
  padding: 8px 15px; border-radius: 9px; cursor: pointer; }
.wiz-nav button:not(.primary) { background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 16px; font: inherit; cursor: pointer; }
.fee-edit-grid button.primary { background: var(--accent); color: #fff; border: 1px solid var(--accent);
  border-radius: 6px; padding: 4px 12px; font-size: 12.5px; cursor: pointer; }
.fee-add-foot button.primary { background: var(--accent); color: #fff; border: 1px solid var(--accent);
  border-radius: 6px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; }
.rate-chip .rate-del button { color: var(--muted); font-size: 13px; line-height: 1; padding: 0 2px; }
.calc-remove button:hover { color: var(--err); }
.board-toolbar button.primary { background: var(--inverse); border-color: var(--inverse); color: var(--inverse-ink); }

/* -- filled accent controls clear 4.5:1 in dark -------------------------- */
/* review 2026-09-08, 06-N18: white 13px/600 on the dark theme's `--accent`
   (#8b8bf0) is about 3.0:1. The ink rule stands (white in both themes), so
   the FILL moves — `--accent-fill`, which in light is `--accent` itself. The
   list family's own primary controls: the page heads' "+ New …", the new
   decision form, the fee tab's saves. */
.page-head.suite button.primary, .dec-add button.primary,
.fee-row button.primary, .fee-add-foot button.primary,
.fee-edit-grid button.primary, .rate-add button.primary {
  background: var(--accent-fill); }
.page-head.suite button.primary:hover, .dec-add button.primary:hover,
.fee-row button.primary:hover, .fee-add-foot button.primary:hover,
.fee-edit-grid button.primary:hover, .rate-add button.primary:hover {
  background: var(--accent-fill-hover); color: #fff; }

@media (min-width: 901px), (min-width: 641px) and (pointer: coarse) {
  body.side-collapsed .gear-menu { left: 0; min-width: 190px; }
  body.side-collapsed .theme-toggle { width: 40px; margin: 6px auto 0; padding: 0; justify-content: center; }
}

.board-toolbar a.primary { display: inline-block; background: var(--inverse); color: var(--inverse-ink);
  font-size: 13px; font-weight: 600; padding: 8px 15px; border-radius: 9px; text-decoration: none; }
table.dt .anchor { font-size: 15px; font-weight: 650; color: var(--ink); }
table.dt td.loss, table.dt .loss { color: var(--err); }

/* the "View as table" twin: whole dollars, Jan 2026 months, a plan column */
.viz-table th[scope="row"] { text-align: left; font-weight: 500; color: var(--ink); }

/* the cash bridge: the out-of-balance warning is a LINE ABOVE the strip, and
   the strip itself stays one line of terms. The warning is --warn, not --err:
   red is a LOSS in this product, and the General ledger already paints the
   identical condition amber (review 04-N15). The CLOSING term is the figure
   the bridge exists to deliver, so it carries the anchor treatment. */
.viz-card p.bridge-warn { display: block; margin: 0 0 8px; font-size: 12px;
  font-weight: 600; color: var(--warn); }
/* the export is the primary control and it is a LINK to /report/{month}.pdf
   (review 2026-09-07, N8) — the same treatment button.primary carries */
/* the ink is a TOKEN, white in both themes like every filled accent control
   (review 2026-09-08, 06-N8: the last hard-coded white in this stylesheet) */
.report-actions a.primary { display: inline-block; background: var(--accent-fill); color: var(--on-accent);
  border: 1px solid var(--accent-fill); border-radius: var(--r-md); padding: 0 14px;
  min-height: var(--ctl-h); line-height: calc(var(--ctl-h) - 2px); box-sizing: border-box;
  font-size: var(--t-table); font-weight: 600; text-decoration: none; white-space: nowrap;
  box-shadow: none; }
/* an unexplained term that DOMINATES the residual is the one figure in the
   strip that is a question rather than a fact, so it carries the attention
   colour — on screen as in the PDF. `.bridge-flag` alone (0,1,0) lost to
   `.bridge-strip b`'s ink (0,1,1) and painted nothing. */
.bridge-strip b.bridge-flag { color: var(--warn); font-weight: 600; }
.access-table th.gg-company { font-weight: 600; color: var(--ink); text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.access-table th.gg-mod, .access-table td.gg-mod { text-align: center; width: 84px; }
.access-table th.gg-mod { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 04-T8 — ONE AMBER. `--warn` #b5691f and `--attn` #e8833a did the one
   attention job within 6cm of each other: the strip's behind-plan dot and
   the league's marks in `--attn`, the bridge's unexplained term and the
   out-of-balance line in `--warn`. SPEC §6.37 names four tokens; this was a
   fifth, at a different hue, meaning the same thing. The bridge speaks the
   sheet's own attention ink on every surface now. `--warn` stays DECLARED
   and in use for the Watch verdict and the softening family, which is a
   state and not a mark. */
.bridge-warn, .viz-card p.bridge-warn { color: var(--attn-ink); }
.ledger-table button.rep-toggle { background: none; border: 0; padding: 0;
  color: var(--accent); font: inherit; cursor: pointer; text-align: left; }
.ledger-table tr.rep-child > * { background: var(--surface-2); }
td.vcov .linklike { white-space: normal; text-align: left; line-height: 1.35; }
a.help-about:hover { text-decoration: none; }
.grid-tabs > a.active, .page-tabs > a.active,
.kind-toggle > a.active, .dq-filters > a.active { font-weight: 600; }
:is(.set-codes, .set-metrics, .set-fees, .set-avg) > .set-block-head > p {
  max-width: 68ch; font-size: var(--t-sm); line-height: 20px; color: var(--muted);
}
.set-block-foot > span.muted { font-size: var(--t-sm); line-height: 18px; color: var(--muted); }

@media (min-width: 901px), (min-width: 641px) and (pointer: coarse) {
  body.side-collapsed .rail-switcher > summary { margin-bottom: 0; }
  body.side-collapsed .rail-menu { left: 0; right: auto; width: 232px; } /* --- 6. THE COLLAPSED RAIL KEEPS ITS STRUCTURE -------------------------
   At 56px the three groups the expanded rail spends three labels
   establishing were gone entirely and eight icons ran as one column, which
   reads as a toolbar. Each hidden group word leaves a rule where it was,
   so the clusters survive; the company's mark keeps a small caret under
   it, so it still reads as a control and not a logo; and the foot's two
   doors — visible again, above — collapse to icons on the one axis. */ /* the rule is `--line`, not `--line-soft`: on the rail's own ground a soft
     hairline was invisible in light on the first render of this block, and a
     divider nobody can see is not a cluster */
  body.side-collapsed .rail-label:not([hidden]) {
    display: block; height: 1px; width: 24px; margin: 14px auto 10px; padding: 0;
    overflow: hidden; font-size: 0; line-height: 0; color: transparent;
    background: var(--line); }
  body.side-collapsed .rail-switch { flex-direction: column; gap: 1px; padding: 4px 0 2px; }
  body.side-collapsed .rail-switch .ico:not([hidden]) {
    display: inline-flex; width: 10px; height: 10px; }
  body.side-collapsed .rail-foot { margin-top: auto; }
}

.set-block-head h2 + :is(.set-block-desc, .ledger-kindnote),
.set-block-desc + .ledger-kindnote,
.set-block-head .ledger-kindnote + .ledger-kindnote { margin-top: 6px; }
:is(.set-codes, .set-metrics, .set-fees, .set-avg) > .set-block-head h2 {
  margin: 0; font-size: 15px; font-weight: 650; line-height: 22px;
  letter-spacing: -.005em; text-transform: none; color: var(--ink);
}

@media (min-width: 901px), (min-width: 641px) and (pointer: coarse) {
  body.side-collapsed .rail-foot-links { align-items: center; }
  body.side-collapsed .rail-foot-id { flex-direction: column; gap: 6px; }
  body.side-collapsed .rail-foot-id .gear { flex: none; width: 100%; }
  body.side-collapsed .rail-foot-id #theme-toggle { margin: 0 auto; }
  body.side-collapsed .side-nav.rail-help:not([hidden])::before {
    content: ""; display: block; width: 24px; height: 1px; margin: 0 auto 10px;
    background: var(--line);
  } /* -- 9. THE RAIL'S MENUS ARE NOT CLIPPED -------------------------------------
   the rail scrolls when it is taller than the window (`overflow-y: auto`),
   and a scroller clips what it holds: folded to its 56px strip (under 1100px
   since §6.75) the account menu and the company switcher were cut at the
   strip's edge, and on the open rail their pop-out shadow stopped in a hard
   line on its border. Where the browser can anchor one box to another, an
   open menu is FIXED to the window and placed against its own control, so
   it is not the rail's to clip: the rail keeps its own scrolling, and the
   menu follows its control when the rail scrolls. While a menu is open the
   rail is lifted over the page, which paints after it: the page's cards
   would draw over the part of the menu that crosses them. The phone's
   drawer holds both menus whole and keeps them as they were, and so does a
   browser that cannot anchor. */
}

@supports (anchor-name: --a) {
  @media (min-width: 901px), (min-width: 641px) and (pointer: coarse) {
  .rail .gear { anchor-name: --rail-gear; }
  .rail .gear .gear-menu { position: fixed; position-anchor: --rail-gear;
      top: auto; bottom: calc(anchor(top) + 8px); left: anchor(left); right: anchor(right); }
  .rail .rail-switcher { anchor-name: --rail-switch; }
  .rail .rail-switcher .rail-menu { position: fixed; position-anchor: --rail-switch;
      top: calc(anchor(bottom) + 4px); bottom: auto; left: anchor(left); right: anchor(right); }
  .rail:has(.gear-menu.open, .rail-switcher[open]) { z-index: 65; }
  }
}

@supports (animation-timeline: scroll()) {
/* -- 5. THE PALETTE SAYS IT HAS MORE ROWS --------------------------------------
   with a company open the jump palette's list runs past its 420px, and the
   Platform group (with the portfolio queue and the Help center since this
   pass) sat below the fold with nothing saying so. The kit's own cue
   (section D, rule 3): a strip pinned to the list's foot, faded by the
   scroll itself, so it shows while there is more below and never where the
   list fits. */
  .jump-list:not([hidden])::after {
    content: ""; display: block; position: sticky; bottom: 0; z-index: 3;
    height: 10px; margin-top: -10px; opacity: 0; pointer-events: none;
    background: linear-gradient(transparent, var(--shade-edge));
    animation: kit-shade-bottom linear both;
    animation-timeline: scroll(); animation-range: calc(100% - 12px) 100%; }
}

@supports (grid-template-rows: subgrid) {
/* THE STRIP ENDS ON ONE BASELINE (review 2026-09-08, 04-N14): Revenue and
   Gross margin stopped at their comparison line while Net income carried the
   add-back hint and Cash the runway lines, so four tiles in a row had three
   different depths and the eye stopped at each one. The tiles share their
   three rows — label, figure, comparison — so the comparison row is as tall
   as the tallest tile's and every tile's bottom edge lines up, whatever the
   sub-lines say. Where `subgrid` is not supported the strip is exactly what
   it was. */
  .stats { grid-auto-rows: min-content; }
  .stats .stat { display: grid; grid-template-rows: subgrid; grid-row: span 3;
    gap: 2px; align-content: start; }
}

@media print {
  .topbar, .sidebar, .no-print { display: none !important; }
  .league a { color: inherit; text-decoration: none; }
}

.grid-tabs a, .page-tabs a { padding: 5px 12px; border-radius: 6px; font-size: var(--t-sm); font-weight: 500;
  color: var(--muted); white-space: nowrap; }
.dq-filters a { border-radius: 6px; font-size: 12.5px; }
/* M9 — A LINK CHIP IS NOT THE STATE CHIP BESIDE IT. `behind plan` is inert;
   `pricing` and `comp tie` navigate, so they wear a link's underline at rest
   and fill on hover and focus. Each names its branch in its aria-label. */
a.lg-flag { text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 2px; }
a.help-about { text-decoration: none; }
.help-toc a { display: block; padding: 4px 10px; color: var(--ink-2);
  text-decoration: none; }

a.help-screen, .help-screen.off { display: inline-flex; gap: 5px;
  align-items: center; padding: 1px 8px 2px; border-radius: 6px;
  border: 1px solid var(--accent-line); background: var(--surface);
  font-size: 13px; white-space: nowrap; }
a.help-screen { color: var(--accent); text-decoration: none; }
.help-screen.off { color: var(--muted); border-color: var(--line);
  border-style: dashed; }

@media print {
  /* .tablewrap scrolls on a screen and CLIPS on paper: the browser's
     print-to-PDF fallback must not lose the league's right-hand columns */
  .tablewrap { overflow: visible; }
}

.tablewrap { overflow-x: auto; }

@media print {
  /* inside .report-sheet, so the paper palette's own tokens reach it */
  .report-pagefoot { display: block; position: fixed; bottom: 0; left: 0; right: 0;
    font-size: 7.5pt; color: var(--muted); border-top: 1px solid var(--line);
    padding-top: 4px; }
}

.bridge-flag, .b-flag, .bridge-strip b.bridge-flag { color: var(--attn-ink); }

/* ==== Phase C: contracts ==== */
/* THE BOOK RECONCILED (C-6): one line under the head — what the signed
   contracts bill a month once every one of them is in force, and what they
   bill in the month the Overview reads. */
.book-line { color: var(--ink-2); font-size: 13px; line-height: 1.5; }

/* --- the tracked card's fractional count (W-3) --------------------------- */
/* "290.33 = 67 units x 52/12": how the figure above was made */
.kpi-how { display: block; font-size: 11px; color: var(--muted);
  font-variant-numeric: tabular-nums; margin-top: 2px; }
/* 2FA IS REQUIRED OF NEW ACCOUNTS: one checkbox on the New user form, with
   its consequence in a line under it. The components row's own check class
   is `nowrap`, which is right for one-word component names and wrong for a
   sentence. */
.sig-check { font-size: 13px; color: var(--ink-2); }
/* ==== Phase D: the portfolio console and the platform standard ============ */
/* H-1 the console (SPEC §6.57). The portfolio home is a table a reader sorts,
   so every header is a link and the sorted one says which way it points. The
   arrow is the only mark: no second colour, no second weight. */
.th-sort { color: inherit; text-decoration: none; display: inline-flex; gap: 2px;
  align-items: baseline; }
.th-arrow { font-size: 11px; color: var(--muted); }
.help-group-h { font-size: 13px; font-weight: 700; letter-spacing: .01em;
  margin: 0 0 8px; color: var(--ink); }
.help-row-t { font-size: var(--t-14); font-weight: 650; color: var(--ink); }
.help-row-s { font-size: 12.5px; color: var(--muted); }
.help-row-kind { font-size: 11.5px; color: var(--muted); }
.help-missing { border: 1px solid var(--attn-line); background: var(--attn-bg);
  color: var(--attn-ink); border-radius: 10px; padding: 10px 14px; margin: 0 0 18px; }
.help-toc-k { display: block; font-size: 11.5px; font-weight: 600;
  color: var(--muted); margin-bottom: 6px; }
.help-body { max-width: 68ch; font-size: var(--t-14); line-height: 1.62;
  color: var(--ink-2); }
.help-step-n { display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-size: 12px;
  font-weight: 700; font-family: var(--mono); }
.help-shot-k { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.help-shot-a { font-size: 12.5px; color: var(--ink-2); }
.help-note-k { flex: 0 0 auto; font-size: 11.5px; font-weight: 700;
  color: var(--muted); }
.help-note-t { font-size: 13.5px; color: var(--ink-2); }
.help-next-k { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.help-related-s { display: block; font-size: 12.5px; color: var(--muted); }

@media print {
a.lg-flag { text-decoration: none; }
}

.grid-tabs > a, .page-tabs > a, .kind-toggle > a, .dq-filters > a {
  display: inline-flex; align-items: center; gap: 5px;
  height: 28px; padding: 0 12px; border-radius: var(--r-sm);
  font-size: var(--t-sm); font-weight: 500; color: var(--muted);
  white-space: nowrap;
}
.side-nav a { padding: 0 8px; }
.help-foot a { font-weight: 600; }
.jump-list a { padding: 6px 12px; font-size: 13px; }
.settings-menu a {
  padding: 6px 12px; font-size: 13.5px; line-height: 1.35; color: var(--ink-2);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

@media print {
.help-drawer, .help-btn { display: none !important; }
  .help-body { max-width: none; }
  .help-step-body { border-left: 0; padding-left: 0; margin-left: 0; }
}

/* -- THREE BUTTON ROLES, ONE GEOMETRY ------------------------------------- */
/* TWO RULES THIS BLOCK LEARNED THE HARD WAY, both visible in the first
   render: a baseline may set a FLOOR and never a ceiling (`height` on a
   zero-specificity rule cut the contract stepper's two-line buttons to one
   line), and any rule that declares `display` must exclude `[hidden]` (an
   author `display` outranks the user agent's `[hidden] { display: none }`,
   so the contract pop-out's hidden `Back` and `Submit for sign-off` appeared
   on stage one). `:where(:not([hidden]))` adds no specificity. */
/* primary (accent fill, one per view), secondary (a bordered surface) and
   quiet (`.linklike`, text only). Named controls are addressed at their own
   specificity — this section owns their treatment — and any bare <button>
   inside a kit container gets the secondary role as a baseline, because
   "Generate with AI", the contract pop-out's "Close" and "save" and
   "+ Add one-time fee" render as raw browser buttons today. */
button.primary:where(:not([hidden])), .btn-link:where(:not([hidden])),
.btn-link.primary:where(:not([hidden])), .btn-secondary:where(:not([hidden])),
.exp-actions button:where(:not([hidden])),
.ledger-filter button:where(:not([hidden])),
.audit-filter button:where(:not([hidden])),
.rate-add button:where(:not([hidden])) {
  min-height: var(--ctl-h); padding: 0 14px; border-radius: var(--r-md);
  font: inherit; font-size: var(--t-table); font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; box-shadow: none; cursor: pointer;
}
/* secondary: a surface with an edge */
.btn-secondary, .btn-link, .exp-actions button, .ledger-filter button,
.audit-filter button, .rate-add button,
table button[type="submit"]:not(.linklike):not(.icon-btn):not(.primary) {
  background: var(--surface); border: 1px solid var(--field-line);
  color: var(--ink);
}
table button[type="submit"]:not(.linklike):not(.icon-btn):not(.primary) {
  border-radius: var(--r-sm);
}
.btn-secondary:hover, .btn-link:hover, .exp-actions button:hover,
.ledger-filter button:hover, .audit-filter button:hover,
.rate-add button:hover {
  border-color: var(--accent); color: var(--accent);
}
/* primary: WHITE ON THE ACCENT FILL, in both themes. The owner's theme rule
   settles the ink, so the fill is what moves — `--accent-fill`, which in the
   default theme IS `--accent` (review 2026-09-08, 06-N18). Every filled
   `.primary` in the product said `color: #fff` over `--accent`, about 3.0:1
   in dark; they all read from the two tokens now. */
button.primary, .btn-link.primary, .dec-form button.primary,
.exp-actions button.primary, .fee-row button.primary,
.fee-edit-grid button.primary, .fee-add-foot button.primary,
.rate-add button.primary, .pub-cta .btn-link.primary,
.page-head.suite button.primary, .dec-add button.primary {
  background: var(--accent-fill); color: var(--on-accent);
  border: 1px solid var(--accent-fill);
}
button.primary:hover, .btn-link.primary:hover, .dec-form button.primary:hover,
.exp-actions button.primary:hover, .fee-row button.primary:hover,
.fee-edit-grid button.primary:hover, .fee-add-foot button.primary:hover,
.rate-add button.primary:hover, .pub-cta .btn-link.primary:hover,
.page-head.suite button.primary:hover, .dec-add button.primary:hover {
  background: var(--accent-fill-hover); color: var(--on-accent);
  border-color: var(--accent-fill-hover);
}
/* disabled, every role: no fill a person could read as available. THE INK IS
   `--muted`, not `--muted-2` (review 2026-09-21): a disabled control still has
   to be READ — its label says what will become available, and why it is not
   yet. `--muted-2` on `--track` is 2.8:1 in light; `--muted` is 4.5:1 there
   and 5.4:1 in dark, on the same fill. */
button.primary:disabled, .btn-secondary:disabled, .exp-actions button:disabled,
.ledger-filter button:disabled, .audit-filter button:disabled,
.rate-add button:disabled {
  background: var(--track); color: var(--muted); border-color: var(--track);
  box-shadow: none; cursor: default;
}
.access-backdrop, .fx-backdrop { background: var(--scrim); }

/* -- the panel ----------------------------------------------------------- */
.access-panel {
  border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-pop); margin: 6vh auto; max-height: 88vh;
}
/* the contract pop-out is a three-stage form and keeps its own height; it
   takes the shared frame like every other panel */
.contract-panel { margin: 2vh auto; max-height: 96vh; }
/* the grid's fx dialog, css-only: the same frame, its own ids and contents */
.fx-dialog {
  border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-pop); padding: 16px 20px 20px;
}

/* -- head, body, foot ---------------------------------------------------- */
/* the head is the panel's own bar: the title, its qualifier and the close,
   on one centred row. It stays put while the body scrolls under it because
   the panel is a clipping flex column and the body is the only scroller —
   NOT because the head is `position: sticky`, which would slide down its
   own containing block in the unclipped state the help-shot script renders
   a panel in. */
.access-head { align-items: center; padding: 16px 20px; background: var(--surface); }
.access-head .muted { font-size: var(--t-sm); }
.access-body { padding: 16px 20px; }
.access-foot {
  padding: 12px 20px; background: var(--surface);
  border-top: 1px solid var(--line);
}

/* -- ONE CLOSE CONTROL --------------------------------------------------- */
/* a quiet 28px icon button, the language `.icon-btn` already speaks. It
   replaces four treatments: a bare `×` glyph falling through to the user
   agent's button chrome (a bordered grey square), a 20px muted glyph, the
   fx dialog's unboxed glyph, and admin's icon. */
.access-head .access-close, .fx-close {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; width: 28px; height: 28px; padding: 0;
  background: none; border: 1px solid transparent; border-radius: var(--r-md);
  color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer;
}
.access-head .access-close { margin-left: auto; }
/* Five reviewers opened 45 before/after pairs of sections A, B and C. What
   they found, one sentence each: a quiet button lost every cue that it was
   pressable; a pop-out with no foot became a full-height phone sheet with its
   submit stranded in the top third; a disabled control's label fell to 2.8:1;
   a tab strip stopped hugging its tabs; the contract sheet cut "CANCEL" at
   the viewport edge; and one select on the portfolio queue never met the
   field primitive at all. Each rule below answers one of those.
   No word changes, no hook moves, and every colour is a token. */

/* --- 1. A QUIET BUTTON IN A TOOLBAR IS STILL A BUTTON --------------------
   Section A gave `.linklike` its first base rule — text only, `--accent` —
   and that is right for a row action inside a table ("reopen", "revoke",
   "add") and for the fx pop-out's inline "+ price change". It is wrong for
   the controls that sit in a toolbar, a page head, a publication line or a
   pop-out's foot: "Generate with AI" above its own helper sentence read as a
   heading; "Reset to the built-in Essentials" wrapped across two lines beside
   a 34px Save; "+ section" lost its box while "+ add line" three rows below
   it kept one.

   The ROLE does not change — these stay quiet, text only and accent. What
   they take back is the CONTROL GEOMETRY: the kit's one height, a radius, a
   hit area wider than the glyphs and a ground under the pointer, so they read
   as pressable and land on the baseline of the secondary beside them. Scoped
   by CONTAINER, never by a bare `.linklike`, so nothing inside a table and
   nothing inline in a sentence is touched. */
:is(.page-controls, .page-side, .toolbar, .access-foot,
    .board-toolbar, .report-actions, .narrative-gen, .ov-panel-foot)
:is(button, summary).linklike {
  min-height: var(--ctl-h); padding: 0 10px; border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; white-space: nowrap;
  font-size: var(--t-table); font-weight: 600;
  list-style: none;
}
/* the ground IS the affordance here, so an underline would be a second one */
:is(.page-controls, .page-side, .toolbar, .access-foot,
    .board-toolbar, .report-actions, .narrative-gen, .ov-panel-foot)
:is(button, summary).linklike:hover {
  background: var(--surface-2); text-decoration: none;
}
.status-line > .badge { margin-left: var(--s-1); vertical-align: 1px; }
.how-to-read-body > :last-child { margin-bottom: 0; }
.rail-entity-name:not([hidden]) {
  font-size: 12.5px; line-height: 1.15; font-weight: 650;
  white-space: normal; text-overflow: clip; overflow: hidden;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}

/* --- 3. THE GROUP WORDS ARE SPOKEN, NOT SHOUTED ------------------------
   The read / The book / Setup are copy, and they are pinned as copy. Only
   the CASE RENDERING moves: 12px sentence case (which is how the template
   already writes them) instead of 10.5px uppercase with .08em of tracking
   — three shouts in a 400px column — set tight against their own lists. */
.rail-label { font-size: 12px; font-weight: 600; letter-spacing: 0;
  text-transform: none; color: var(--muted); }
.rail-foot .help-btn:hover, .rail-foot .help-about:hover {
  background: var(--line-soft); color: var(--ink); border-color: transparent; }
.jump-group:first-child { border-top: 0; }
.rail-switch:hover, .side-nav a:not(.active):hover, .side-toggle:hover,
.gear-btn:hover, .rail-switcher[open] > summary, #theme-toggle:hover,
.rail-foot .help-btn:hover, .rail-foot .help-about:hover {
  background: var(--line); }
.topbar-back .ico { flex: none; margin-top: 1px; }

/* the ITEM surface. `.viz-card` is scoped to the Overview's own widgets: the
   board sheet and the snapshot packet render the same class and are another
   family's paper. A column makes the card's FOOT sit on one line across a
   row of charts. */
.ov-widget > .viz-card {
  border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: none; padding: 14px 16px;
  display: flex; flex-direction: column; }
/* a closed row is not a door: three columns, no chevron, no reserved gutter */
.dq-row.closed { grid-template-columns: auto minmax(0, 1fr) auto;
  padding-right: 16px; min-height: 48px; }
/* the inbox row is narrow: the chip and the owner share the first line, the
   title and its one line of why take the second. The door and the control
   are the pane itself, so neither is drawn here. */
.dq-inbox .dq-row { grid-template-columns: auto minmax(0, 1fr);
  row-gap: 6px; padding: 12px 14px 12px 13px; min-height: 0; }
.viz-foot > .viz-note { margin: 0; margin-left: auto; text-align: right; }
/* the total's sub-line wraps INSIDE its column, right-aligned under its
   figure — it ran back under End as one 190px nowrap line */
.contracts-table .tcv-parts { white-space: normal; line-height: 15px; margin-top: 1px; }

/* --- 4. ONE HEADING GRAMMAR IN THE POP-OUT (Xero / Melio) ----------------
   A block's name is a 12.5px sentence-case heading in ink; what it explains
   is a quiet line of its own under it. The whole block was uppercase, so its
   explanatory sentence — the longest in the product — was shouted too. The
   column heads join the list tables' grammar (11.5px sans 600, `--muted`,
   sentence case); a column's definition under its name is 11px, the floor. */
.contract-panel .fee-rows-head {
  margin: 0 0 8px; color: var(--ink);
  font-size: var(--t-sm); font-weight: 600; line-height: 18px;
  letter-spacing: 0; text-transform: none;
}
/* the pop-out's tables sat 4px outside the fields above them */
.contract-panel .tablewrap { margin: 0; }
.contract-panel .review-table tr.review-sub:has(+ tr.review-sub) > * { border-bottom: 0; }
/* the margin beside it, a step quieter, and the equivalents' note */
.contract-panel .review-table tbody tr:last-child:not(.total) > * {
  padding-top: 0; padding-bottom: 6px; border-bottom: 0;
  font-size: var(--t-sm); color: var(--ink-2);
}
.page-head.suite + details.page-note > summary:hover,
#imported-charges > summary:hover,
:is(.gl-undo, .gl-clear) > summary:hover { color: var(--accent); background: var(--surface-2); }
.page-head.suite + details.page-note[open] > summary,
#imported-charges[open] > summary,
:is(.gl-undo, .gl-clear)[open] > summary { color: var(--ink-2); }
.ledger-filter .lf-date:where(:not([hidden])) {
  display: inline-flex; flex-direction: column; gap: var(--s-1); margin: 0;
}
.ledger-filter .list-search {
  height: var(--ctl-h); padding: 0 11px;
  border: 1px solid var(--field-line); border-radius: var(--r-md);
  font-size: var(--t-table);
}

/* the GL code is the account's CODE, not the end of its name: a quiet mono
   chip (the entry number too), outlined so it reads on a band's ground */
.ledger-table .gl {
  display: inline-block; margin-left: 6px; padding: 0 4px; vertical-align: 1px;
  border-radius: 4px; box-shadow: inset 0 0 0 1px var(--line);
  font: 400 var(--t-label)/16px var(--mono); color: var(--muted);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* --- 6. THE PAGER (the kit's toolbar grammar) --------------------------------
   The count, the page and the two steps on one row, the steps as the kit's
   compact secondary control; the note on the type filters under it. The
   template wraps each phrase; the interpuncts between them stay in the text
   at zero size. The note's own leading " · " hangs outside its line and is
   clipped (family 5's join marks), so it opens on its first word. The audit
   trail's pager shares the class and is untouched: it has no `.lp-count`. */
.ledger-pager:has(> .lp-count) {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-3);
  margin: var(--s-3) 0 0; font-size: 0; line-height: 0;
}
/* Family 6, section B of the Mobbin redesign: LOOK, LAYOUT and HIERARCHY on
   the General ledger's pop-outs — Journal entry, the per-journal and
   per-charge edits, and Import GL through its three steps — and on the
   reconciliation the import prints on the page. No word moves, no hook
   moves, no behaviour changes, and every colour is a token with a dark value.
   Built on the kit: the field primitive and its compact variant, the three
   button roles, the one pop-out chrome and the ITEM surface of family 3.

   WHAT WAS WRONG, one line each: double entry was invisible — two identical
   stacked selects, the one amount a 13px peer of Memo; the rarest field
   (Repeat monthly until) sat third, above the accounts, printing a
   `--------- ----` mask; the submit had no foot, no Cancel, and hung under a
   six-line paragraph; Import GL never said it had three steps, put its action
   inline and its biggest block (the explanation) under it; "Imports on
   record", the one irreversible bulk act, had the weight of a footnote and a
   label that broke into three lines; the mapping and cost-codes tables set
   their choices as borderless text; "Set every category at once" was a
   full-width select under a table; the explanation printed BELOW the
   mapping step's own action.

   THE MARKUP gained wrappers and classes only (`.gl-form`, `.gl-anchor`,
   `.gl-pair`, `.gl-repeat`, `.gl-foot`, `.gl-steps`, `.gl-codes-card`,
   `.gl-preview`, `.gl-about`, the mapping table's `.tablewrap`) and the three
   moves the lead named: the repeat goes below the accounts in a <details>
   whose summary is its own label (its field the `month_picker` macro, which
   posts the same `repeat_until`), and each pop-out's acts sit in the kit's
   `.access-foot` INSIDE their form — the busy-state scripts find the submit
   with `f.querySelector('button[type="submit"]')`. Cancel is the product's
   existing word and closes through the existing `[data-close]` handler.

   `.gl-undo`'s summary, fields, button and hint are section A's shared rule
   (with `.gl-clear`); this block places the section in the pop-out only. */

/* --- 1. THE FOOT IS THE POP-OUT'S FOOT ------------------------------------
   A hairline, the surface, the acts at the right with the primary last. It
   is a descendant of the form and sticks to the bottom of the scrolling
   body, full bleed; where nothing scrolls it simply sits at the end. The
   kit's "the body runs on" shade moves above it, not under it. */
.access-body .gl-foot {
  position: sticky; bottom: 0; z-index: 4;
  display: flex; justify-content: flex-end; align-items: center; gap: 8px;
  margin: 20px -20px 0; padding: 12px 20px;
  background: var(--surface); border-top: 1px solid var(--line);
}

/* --- 3. THE BLOCK --------------------------------------------------------- */
.set-block {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  margin: 0 0 var(--s-5); overflow: clip;
}
.set-block-head.settings-head:not([hidden]), .set-block-head:not([hidden]) {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 8px 20px; max-width: none; margin: 0; padding: 16px 20px 14px;
}
.set-block-head > a.linklike { font-size: var(--t-table); font-weight: 600; line-height: 20px; }

/* a table in a block sits flush under the head: its own frame goes, its
   header band is the rule between the two, and its first and last columns
   take the head's 20px inset so the words line up down the block */
.set-block > .tablewrap { margin: 0; border-top: 1px solid var(--line); }

/* --- 10. THE POP-OUTS IN THIS FILE: one foot, inside its form ------------
   Every Save sits in the pop-out's `.access-foot`; where two forms share a
   pop-out the second's act is the foot's quiet act at the LEFT. */
.access-foot > .set-remove { margin-right: auto; }
.access-body .kpi-typing { margin: 10px 0 0; font-size: 12px; line-height: 1.5; }
.access-body .kpi-history-h {
  margin: 18px 0 8px; font-size: 12.5px; font-weight: 600; letter-spacing: 0;
  text-transform: none; color: var(--ink-2);
}
.access-body .set-note { margin: 12px 0 0; font-size: 12px; line-height: 1.5; }
/* Family 7, section B of the Mobbin redesign: LOOK, LAYOUT and HIERARCHY on
   the three tabs of Company settings a person types into — Cost codes,
   Operating metrics, Planned expenses — and on their pop-outs. No word
   moves, no hook moves, no behaviour changes, no script changes, and every
   colour is a token with a dark value (no token is declared here). Built on
   the kit: the field primitive and its compact variant, the three button
   roles, the one pop-out chrome, the list-table grammar, family 6's foot.

   WHAT WAS WRONG, one line each: five preamble blocks of equal weight stood
   between the tab and its first row, the headline counts buried in prose;
   the tag legend was a run-on sentence with a separator orphaned at a line
   end; the codes table's Tags column held a 200px gutter; the category
   band's pencil and every row's pencil sat at full ink; in dark the Required
   tag lost its chip; an inactive row was faded by opacity, under the
   contrast floor; the metrics list never said its order out loud and its
   grip was a 10px ghost; a formula and "counted from contracts" wrapped out
   of their column onto the table's edge; the metric pop-out was a 460px
   document whose selects cut their own options; every Save sat in the
   scrolling body; a planned expense was a band over a single row, six times.

   THE MARKUP gained wrappers and classes only: `section.set-block` with a
   `.set-block-head` on each tab (the family's one wrapper idiom, the SAME
   class names as the other tabs), `.set-block-title` / `.set-counts` in the
   codes head, `.col-tags`, `.legend-item` / `.legend-gloss` / `.legend-sep`
   inside the pinned legend `<p>`, `.metric-name` / `.metric-kind` and the
   metrics table's `.tablewrap`, caption, `scope` and column classes,
   `.access-foot` on each pop-out's submit, `.fee-sec` / `.fee-sec-note` in
   place of inline spacing. The two fold notes of the fees tab and the codes
   tab's one moved into their block head with their class attributes and
   their lines byte for byte. Every inline script is untouched.

   Every rule is scoped to these three tabs (`.set-codes`, `.set-metrics`,
   `.set-fees`, `.set-avg`, `#series-manage`, the pop-outs by id). The two
   selectors this family shares with the grid — `.drag-handle` and
   `.cell-panel.line-editor` — are never restyled bare: the handle under
   `#series-manage`, the editor's actions row only on a page that holds the
   codes table. */

/* --- 1. THE BLOCK HEAD ----------------------------------------------------
   The title, its one-line purpose and the tab's one add action on one row;
   the description a step quieter under the title, at a reading measure; the
   fold notes under it as footnotes, not leads. The head spans the table's
   width, so the add action ends on the table's right edge. Every line box is
   a whole pixel. */
:is(.set-codes, .set-metrics, .set-fees, .set-avg) > .set-block-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--s-5); row-gap: 6px; align-items: start;
  max-width: none; margin: 0 0 var(--s-4);
}
.help-body :is(p, li, dd, figcaption) { max-width: 68ch; }
.help-shot > a { display: block; width: fit-content; max-width: 100%; border-radius: var(--r-md); }
.help-toc a {
  margin-left: -2px; padding: 5px 8px 5px 12px; border-left: 2px solid transparent;
  border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: var(--t-sm); line-height: 18px;
}

/* OPEN THIS SCREEN: the chip sits in the sentence as a word does — on its
   baseline, with a hair of air either side, so the stop after it closes the
   sentence instead of hanging off a button (the stray space before it came
   from the macro's own line end, now trimmed in `_parts.html`) */
a.help-screen, .help-screen.off { margin: 0 1px; padding: 0 7px; line-height: 20px;
  vertical-align: 1px; border-radius: var(--r-sm); }
.admin-sec > .add-card :is(h2, h3) {
  margin: 0 0 2px; font: 650 14px/20px var(--sans);
  letter-spacing: 0; text-transform: none; color: var(--ink);
}
.admin-users > * > tr > :first-child { padding-left: 20px; }
.admin-users > * > tr > :last-child { padding-right: 20px; }

/* a legacy account's "convert" is the kit's quiet role: accent words, no
   box (inside `.lines-table` the kit's own `.linklike` rule does not reach,
   and the table's red hover is a loss's colour, which this is not) */
.admin-users :is(td, th) .linklike {
  -webkit-appearance: none; appearance: none; padding: 0; margin: 0 0 0 6px; border: 0;
  background: transparent; font: 500 var(--t-sm)/20px var(--sans); color: var(--accent); cursor: pointer;
}

/* the three selects — Role, Status, Signs off contracts — are VALUES at
   rest: no box, the body's ink, the word where the column's header puts
   it. The pointer or the keyboard shows the field's edge and a caret (a CSS
   mask drawn by the cell: a select paints no pseudo-element). Scoped to
   `.admin-users`: the shell's `select.status-select[data-status-submit]` is
   the contracts' and the settings' control too. */
.admin-users select:is(.role-select, .status-select) {
  -webkit-appearance: none; appearance: none;
  box-sizing: border-box; height: 30px; min-height: 0; margin: 0 0 0 -9px;
  padding: 0 24px 0 8px; max-width: none;
  border: 1px solid transparent; border-radius: var(--r-sm);
  background: transparent; color: var(--ink);
  font: 400 var(--t-table)/28px var(--sans); cursor: pointer;
}
.admin-users .pw-form input {
  box-sizing: border-box; width: 190px; height: var(--ctl-h-sm); padding: 0 10px;
  border: 1px solid var(--field-line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); font: 400 var(--t-sm) var(--sans);
}
.admin-users .pw-form button {
  height: var(--ctl-h-sm); min-height: 0; padding: 0 12px;
  border: 1px solid var(--field-line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); font: 600 var(--t-sm) var(--sans); cursor: pointer;
}
.admin-tokens > * > tr > :first-child { padding-left: 20px; }

/* --- 5. THE COST CODES STEP: ONE CARD PER QUESTION (Attio / Klaviyo) -----
   Each card is the ITEM surface: its heading and count, the bulk control at
   the right of the SAME row, the sentence, then the table edge to edge
   under a hairline. The select-all checkbox stays where it is — in the
   header of the checkbox column, which is the card's first table row: it
   has no visible label to carry into the head. */
#modal-gl-import .gl-codes-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; column-gap: 16px;
  margin: 0 0 12px; padding: 14px 16px 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
}

@media (max-width: 900px) {
  .mobile-title { font-size: 14.5px; font-weight: 600; color: var(--ink-2);
    cursor: default; }
}

@media (width <= 900px) {
  .admin-users > * > tr > :first-child,
  .admin-tokens > * > tr > :first-child {
    position: sticky; left: 0; z-index: 2; background: var(--surface);
    box-shadow: inset -1px 0 0 var(--line-soft);
  }
}

@media (max-width: 640px) {
/* THE REFERENCE POP-OUT, New decision, is a template change and needs no
   rule of its own: its form now wears `.access-form`, so the panel's flex
   column runs head / scrolling body / foot, and the submit sits in the foot
   at the right while staying inside its own form. */

/* -- a pop-out on a phone is a full-screen sheet ------------------------- */
  .access-panel, .contract-panel {
    margin: 0; width: 100%; max-width: none;
    height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0;
  }
  .fx-dialog {
    margin: 0; width: 100%; max-width: none;
    height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0;
    padding-left: 16px; padding-right: 16px;
  }
  .access-head, .access-body, .access-foot { padding-left: 16px; padding-right: 16px; }
}

/* --- 3. ONE TAB STRIP ---------------------------------------------------
   `.grid-tabs`, `.page-tabs`, `.kind-toggle` and `.dq-filters` are four
   class names for one control: a track, a pill per item, the chosen one
   lifted onto the surface. All four names stay; the geometry is stated
   once. The active pill's ground, ink and 1px lift are already declared
   per family and are left exactly as they are. */
.grid-tabs, .page-tabs, .kind-toggle, .dq-filters {
  display: inline-flex; align-items: center; gap: 2px;
  height: var(--ctl-h); padding: 3px; border-radius: var(--r-md);
  background: var(--track); max-width: 100%; min-width: 0;
}

/* --- 4. ONE FILTER BAR --------------------------------------------------
   the register's, the audit trail's, the help center's and the book's
   toolbar: one wrapping row at one control height. The search is the
   control that is used; it grows. A select is sized by what it shows, not
   by the row. */
.list-toolbar, .ledger-filter, .audit-filter, .help-find {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
/* The rail is the one surface a person never leaves, and five things were
   wrong with it. The company's own name was the only word on screen that was
   CUT. The foot gave a display preference the same weight as who you are
   signed in as. Two doors vanished when the rail was collapsed. The three
   group words shouted in 10.5px uppercase while four icon columns started at
   four different insets. And the rail wore the ground every content card
   wears, so the one element that must never look like a card looked like a
   very tall one.

   LOOK, LAYOUT AND HIERARCHY ONLY. Every id, class, data attribute and word
   is where it was; the two markup moves — the foot's two groups and the
   palette's four — carry their children unchanged. Tokens come from the
   Foundation kit and from the two this family declares (`--mark-bg`,
   `--rail-bg`, both with a dark value); no colour is a hex here. */

/* --- 1. ONE LEFT AXIS --------------------------------------------------
   The logo, the company's mark, the jump field's magnifier and every nav
   icon started at four different insets down one 232px column, which is
   what made the rail feel loose beside a very tidy content column. One
   inset, 20px from the rail's edge, for all four — and the jump field's
   own label lands on the nav labels' baseline column while it is there. */
.rail-head { padding: 2px 2px 12px 8px; }
.rail-switch { padding: 6px 8px; gap: 8px; border-radius: var(--r-md); }
.jump-btn { padding: 0 8px; gap: 12px; }

/* --- 4. THE RAIL READS AS CHROME ---------------------------------------
   It was `--surface`, the value every content card uses, over a page that
   is `--bg` — a 1.5% difference in light, and in dark the rail and the
   cards were the SAME colour. A step off the page ground in both themes
   (`--rail-bg`), with the card hairline as its edge. */
.rail { background: var(--rail-bg); border-right: 1px solid var(--line); }

/* --- 5. THE FOOT IS A HIERARCHY ----------------------------------------
   Four rows, four jobs, one treatment: a drawer opener, a contextual help
   link, a display preference and the signed-in identity were all 32px,
   muted and full-width. And the foot was pinned to the bottom of the
   window with about 180px of nothing above it, so it read as furniture
   bolted to the frame rather than as the end of the list.

   Now: two quiet 28px doors under a hairline, then the identity row with
   its own rule above it, the chip at 40px as the anchor and the theme
   control as a 28px icon button at its right (the kit's quiet icon-button
   treatment, the one the pop-out heads wear). THE FOOT STAYS PINNED TO THE
   BOTTOM (lead's decision 2026-09-22, as every reference rail does — Linear,
   Base44): the gap under the nav is the rail's, and a chip floating
   mid-rail on a tall window is worse than the gap. `#help-btn`,
   `.help-about`, `#theme-toggle`, its `.theme-toggle` class,
   `#gear-btn`/`#gear-menu` and every word are untouched — which is also
   what keeps `html.embedded .theme-toggle` hiding exactly what it hid
   before inside the console's frame. */
.rail-foot { margin-top: auto; padding-top: 0; border-top: 0; }

/* --- 7. THE HELP DRAWER ------------------------------------------------
   It had no scrim and no elevation step: the page behind stayed fully lit
   and the panel sliced the page header's controls mid-word, so nothing
   said whether what it covered was still live. The scrim is the mechanism
   `#rail-backdrop` already uses, driven here by the drawer's own `hidden`
   property — the existing toggle, the close button and the Escape path
   keep the state and no script moved.

   Inside, a panel titled "Six things to know" gave the reader no six: one
   500-word column of dt/dd pairs. The six become separated bands with a
   counter (generated content — the pairs, their order and their words are
   pinned by three tests and are untouched), and the three foot links a
   divided cluster with the arrow outside the link. The close is already
   the kit's icon button. */
.help-drawer { z-index: 70; padding: 0; box-shadow: var(--shadow-pop);
  border-left: 1px solid var(--line); }
.help-head { margin: 0; padding: 14px 20px; background: var(--surface);
  border-bottom: 1px solid var(--line); }
.help-foot { margin: 0; padding: 10px 20px; font-size: 12.5px; line-height: 1.45;
  color: var(--muted); background: var(--surface);
  border-top: 1px solid var(--line-soft); }

/* --- 8. THE JUMP PALETTE -----------------------------------------------
   A flat twelve-row list in which the company's name was printed twelve
   times, so the distinguishing word was always last. The name is printed
   ONCE in the dialog's head, each row leads with its destination, and the
   rows sit under the rail's OWN group words — no new noun anywhere. The
   name stays in every row as clipped accessible text, so the filter, which
   matches on each anchor's textContent, finds exactly what it found
   before; a group word hides when everything under it is filtered out. */
.jump-palette { background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-pop); }
.jump-head { padding: 12px 16px 0; font-size: var(--t-label); font-weight: 600;
  color: var(--muted); }
.jump-group { padding: 4px 0; border-top: 1px solid var(--line-soft); }
.jump-group-h { padding: 4px 12px 2px; font-size: var(--t-label);
  font-weight: 600; color: var(--muted); }

/* --- 5. THE MAGNIFIER LANDS ON THE AXIS --------------------------------
   Block A put the logo, the mark, the jump field and every nav icon on one
   inset — one BOX inset. The magnifier is a 14px glyph whose circle starts
   2.3px inside its own box while the nav icons' strokes start 0.7px inside
   theirs, so the one icon a person reads as a field still sat right of the
   eight above it. Optical, not geometric: the box moves 2px left and the
   gap takes the 2px back, so the LABEL stays on the nav labels' column. */
.jump-btn { padding-left: 6px; gap: 14px; }

/* the FIGURES as a strip with a rhythm (Later / Sprig): even tracks, a
   hairline between tiles so the eye reads five cells rather than a run of
   words, and the tiles' three rows still shared through the pinned subgrid so
   every bottom edge lines up whatever the Cash tile's runway lines say. The
   hairline is `--line-soft`, the same weight as the strip's own top rule. */
/* the strip's own top padding moves INTO the tiles, so each hairline meets
   the rule above it instead of starting 14px below it. Every tile carries
   the same vertical padding, so the shared subgrid rows still line up. */
.stats, .branch-facts { column-gap: 0; padding-top: 0; }
.dq-owner { justify-self: end; margin-top: 0; white-space: nowrap;
  color: var(--muted); }

/* the detail's own body: the read's text gets the width and the metric panel
   only the height its strip needs. `.dqm-body` keeps ONE class' worth of
   specificity so `.dqm-body.dqm-solo` still wins for a decision with no
   series of its own. */
.dqm-body { grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  align-items: start; gap: 18px 24px; }
.ledger-filter { align-items: flex-end; gap: var(--s-2); }

@media (max-width: 900px) {
  .dqm-body { grid-template-columns: minmax(0, 1fr); }
}

@media screen and (max-width: 760px) {
/* --- 5. the strips and the filter bar on a narrow screen ----------------
   under 760px a strip scrolls inside itself rather than being cut off by
   the column; under 640px the filter bar gives the search the whole row and
   keeps the date pair together. */
  .grid-tabs, .page-tabs, .kind-toggle, .dq-filters {
    display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%;
    scrollbar-width: none;
  }
}

/* the Customize panel's foot: three actions, one row, one baseline. The panel
   was 320px wide and "Reset to the built-in Essentials" could not sit beside
   Save and Cancel at any type size, so the panel is what gives — it never
   exceeds the viewport, and the foot may still wrap on a narrow phone rather
   than run off its edge. */
.ov-panel { width: min(400px, calc(100vw - 32px)); }
.rail-foot-links { display: flex; flex-direction: column;
  padding-top: 6px; border-top: 1px solid var(--line-soft); }
.rail-foot-id { display: flex; align-items: center; gap: 6px;
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
/* WHAT SITS ON THE RAIL'S GROUND FOLLOWS IT. `--line-soft` (#f1f1f5) was
   chosen against the WHITE rail this family replaced, where it was fourteen
   values darker; on `--rail-bg` it is within two values of the ground, so the
   foot's hairline reads as nothing (and now the WRONG way round, two values
   LIGHTER) and every hover on the rail — the switcher, the eight
   destinations, the two doors, the account chip, the theme control — became a
   ground a person cannot see. They take `--line`, which is what the back link
   on the same ground has always used, and which the collapsed strip's group
   rules already found they needed. Nothing outside the rail is touched. The
   one exception is the row you are already on: `--line` over `--accent-soft`
   would take the current page's own tint away under the pointer, so the
   active destination keeps it. */
.rail-foot-links { border-top-color: var(--line); }

/* --- 6. THE CHART CARD GETS A FOOT (ElevenLabs / YNAB) ------------------
   "View as table" was a bare disclosure triangle at the card's bottom-left
   with no control affordance, so it read as leftover text under the plot.
   The foot is a strip of its own under a hairline: the twin as a real
   control at the left, the card's basis note at the right. It stays a
   `<details>`/`<summary>` on screen — the PDF renders the open variant — and
   the wrapper lives in `overview.html`, never inside `_viz_twin.html`. */
.viz-foot { display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px 14px; margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--line-soft); }

/* -- 3. ONE POP-OUT SHADOW, AND THE RADIUS SCALE ---------------------------
   the gear menu and the Customize panel wore the old navy-tinted shadow,
   which vanished on a dark page; they wear the kit's `--shadow-pop` (in dark
   it carries a 1px ring). The docked panel already did; the rule under it
   had not. The rail's company menu is the gear menu's twin and takes the
   same chrome, so the rail's two menus are one; the assistant's panel takes
   what family 3 gave the insight dialog, the kit's pop-out radius and
   shadow. The 5, 7, 9 and 10px corners land on the scale: a
   control is `--r-md` like the dialog controls beside it (the owner field,
   its Save, "Assign owner…", the dialog's "Open" links), an icon button
   `--r-sm` (the widget toolbar's move and hide buttons), a menu `--r-lg`
   with its rows `--r-sm`, 6px inside a 6px inset, so the corners stay
   concentric. A TAG IS A BADGE (review 2026-09-29): the verdict's "draft"
   and "revisions pending" take the 4px corner `.badge` and the insight
   chip wear, which the scale has no token for. */
.ov-panel, .gear-menu, .rail-menu { box-shadow: var(--shadow-pop); }

/* THE PHONE'S SHELL IS A BOTTOM BAR (owner decision 4 of 2026-11-19, UI rule
   23, SPEC §6.171). `_nav.html` draws the bar inside the rail, so on a phone
   the rail is two things: closed, it is the bar at the foot of the screen
   (four doors and More); open, it is the sheet More shows, the whole screen,
   with the bar still at its foot. The top bar's menu button gives way to
   More, and the company's name there opens the sheet on the switcher. No
   other width draws the bar. A hub framed by the console keeps its menu
   button and drawer: how the console frames a phone is not known here. */
.mobile-tabs { display: none; } /* --- 9. THE PHONE ------------------------------------------------------
   The drawer opens with the company switcher first under the thumb (the
   firm's mark is already in the bar above it and the collapse control is
   the desktop's), it is a full dynamic viewport tall and it scrolls, so
   the foot is reachable. The bar's own title is the company's NAME and it
   never was a control: it takes a label's weight so it stops reading as
   tappable. The switcher is NOT rendered a second time in the bar. */

@media (max-width: 640px) {
/* --- 2. A POP-OUT ON A PHONE GROWS WITH ITS CONTENT ----------------------
   Section B made a phone pop-out a full-screen sheet at `height: 100dvh`.
   For the New decision pop-out — head, scrolling body, pinned foot — that is
   the right shape. For the ten pop-outs that carry no `.access-foot` it left
   a three-field form filling an 844px screen with 500px of empty ground and
   its primary floating in the top third.

   A sheet from the TOP, only as tall as what it holds, answers both: a short
   form ends where it ends, and a panel WITH a foot still pins it, because the
   panel is a flex column capped at the height of the screen. */
  .access-panel, .contract-panel, .fx-dialog { height: auto; max-height: 100dvh; }
}

@media screen and (max-width: 760px) {
/* --- 4. A TAB STRIP HUGS ITS TABS ---------------------------------------
   Section C's narrow-screen rule set `display: flex` over the base
   `inline-flex`, which made the track a block: at 390px the board packet's
   two-item switch became a 366px grey bar with 200px of empty track beside
   it. The track is as wide as its tabs and no wider — and it still scrolls
   inside itself when the tabs are wider than the column. */
  .grid-tabs, .page-tabs, .kind-toggle, .dq-filters {
    width: max-content; max-width: 100%;
  }
}

.how-to-read-body {
  position: absolute; z-index: 30; top: calc(100% + var(--s-1)); right: 0;
  width: min(420px, calc(100vw - 32px)); padding: var(--s-3) var(--s-4);
  font-size: var(--t-13); line-height: 1.5; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
}
.help-list { flex: 1 1 auto; min-height: 0; overflow-y: auto;
  padding: 2px 20px 14px; counter-reset: helpn; }
/* four group words cost four rows, so the rows themselves give some back:
   thirteen destinations and their groups now stand without scrolling */
.jump-list { max-height: 420px; }
/* The reviewers opened the family's pairs at 1440 and at a true 390. What
   they found, one line each: nothing in the help drawer said which of its
   three parts owned the overflow; the security page put its two "Current
   code" forms on two different horizontal axes and hung a badge 550px from
   the label it belongs to; the foot's two doors read at the nav's own
   weight; the light rail's ground was within three values of the page's, so
   the phone's sticky bar leaned its whole separation on one hairline; the
   back link still cut the company's name; the jump field's magnifier sat two
   pixels right of the axis every other icon in the rail shares; the theme
   control became a 28px target on a phone; and the code step's escape read as
   a caption rather than a control.

   LOOK, LAYOUT AND HIERARCHY ONLY, like the two blocks above: no word, id,
   class, attribute or form action moved, and every colour is a token with a
   dark value. */

/* --- 1. ONE SCROLLER IN THE HELP DRAWER, DECLARED -----------------------
   The review read the sixth concept as lost, because at 1440x900 "Board
   packet" is cut mid-line by the foot and on a 390px phone the fifth is.
   It is not lost — driving `.help-list` to its end shows the sixth whole and
   all three foot links under it — but nothing in the CSS SAID which of the
   three parts owned the overflow: the panel still carried the base rule's
   `overflow: auto`, so on a short window it could scroll as well as its
   list, and the head and the three foot paragraphs were ordinary flex items
   with no floor of their own.

   Declared now: the panel is the dynamic viewport tall and never scrolls
   itself, the head and each foot paragraph are `flex: none`, and the list —
   which already carried `flex: 1 1 auto; min-height: 0; overflow-y: auto` —
   is the only part that moves. The scroll shade the list already draws
   (`@supports (animation-timeline: scroll())`, block A) is what says there
   is more, and the foot's own `--line` hairline is the boundary the list is
   cut against. */
.help-drawer { height: 100dvh; overflow: hidden; }

/* --- 4. THE BACK LINK KEEPS THE COMPANY'S NAME -------------------------
   "← Northgate Services (DE…". The switcher above it was given its name
   back in block A and this row was not, so the same name was whole in one
   row of the rail and cut in the next. It wraps, like the switcher's, and
   the arrow stays on the first line. */
.topbar-back { align-items: flex-start; height: auto; min-height: 34px;
  padding: 6px 10px; line-height: 1.2; white-space: normal; }

/* --- 3. THE DECISIONS QUEUE (Deel) --------------------------------------
   Every row a definite grid — chip | main | owner | control — at one height,
   with a control that looks like one and a door affordance that says the row
   opens. The tier stays exactly where CLAUDE.md puts it: the colour of the
   chip and of the left rule, never a word in the list. */
.dq-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center; column-gap: 14px; row-gap: 0;
  min-height: 58px; position: relative;
  padding: 10px 34px 10px 13px; }
.dq-main { min-width: 0; }
/* the row's action is a CONTROL, not a word floating at the right edge: the
   kit's quiet geometry, the same shape down the whole column */
.dq-review { display: inline-flex; align-items: center; justify-self: end;
  min-height: var(--ctl-h-sm); padding: 0 11px; margin-top: 0;
  border: 1px solid var(--field-line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--accent);
  font-size: var(--t-sm); font-weight: 600; }
.head-more-body, .grid-page .row-menu-body {
  position: absolute; z-index: 30; top: calc(100% + var(--s-1)); right: 0;
  min-width: 200px; padding: var(--s-1); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); }

@media (max-width: 640px) {
  /* the term is a native `input[type="month"]`, whose intrinsic width is
     about 144px — half again the column it now has, and a table cell does
     not clip, so the second field ran over the third and hid its em dash */
  .contract-panel .dates-table :where(input, select) {
    width: 100%; min-width: 0; max-width: 100%; padding-left: 6px; padding-right: 4px;
  }
}

/* --- 8. THE HELP DRAWER'S CLOSE IS THE PRODUCT'S CLOSE -------------------
   It was a 20px `×` typed into the markup, drawn in `--accent` because
   `.linklike` now colours it: two close controls where the kit promised one.
   The glyph is `icon('close')` in the template, and the box is the same 28px
   quiet icon button every pop-out head wears. */
.help-head .help-close {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; width: 28px; height: 28px; min-height: 0; padding: 0;
  background: none; border: 1px solid transparent; border-radius: var(--r-md);
  color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer;
}
.dqd > .dqm-head, .dqd > .dqm-title, .dqd > .dqm-meta { padding-left: 0; padding-right: 0;
  margin-left: 0; margin-right: 0; }

/* --- 2. THE COMPANY NAME GETS ITS WIDTH BACK ---------------------------
   "Northgate Servic…". After a 28px mark, a 10px gap, a 14px chevron and
   12px of padding the 13.5px/700 name had about 150px of a 232px rail, and
   the company you are in is the highest-value word in the shell. The mark
   drops to 24px (the size the switcher's own menu rows already use), the
   chevron to 12px, the padding tightens, and the name WRAPS to two lines
   instead of ellipsing. The rail's width does not move, so nothing in the
   content column beside it moves either. */
.rail-switch .rail-mark { width: 24px; height: 24px; border-radius: 7px; font-size: 11px; }
.rail-switch .ico { width: 12px; height: 12px; }
.rail-foot .help-btn, .rail-foot .help-about {
  /* `--muted` at rest, not `--ink-2` (review 2026-09-22): at `--ink-2` the two
     doors read at the nav's own weight and competed with the eight
     destinations above them. They are quiet until the pointer is on them. */
  height: 28px; min-height: 0; margin: 0; padding: 0 8px; gap: 10px;
  font-size: 13px; color: var(--muted); border-radius: var(--r-md); }
.rail-foot-id .gear { flex: 1 1 auto; min-width: 0; }
.rail-foot-id .user-chip { height: 40px; }
.ov-widget > .viz-card > * { flex: 0 0 auto; }
.dq-modal .dqm-close { width: 28px; height: 28px; display: inline-flex;
  align-items: center; justify-content: center; border-radius: var(--r-md);
  font-size: 18px; }
.head-more-item:not([hidden]), .grid-page .row-menu-item:not([hidden]) {
  display: flex; align-items: center; gap: var(--s-2); width: 100%;
  padding: var(--s-2) var(--s-3); border: 0; border-radius: var(--r-md);
  background: none; color: var(--ink); font: inherit; font-size: var(--t-13);
  text-align: left; white-space: nowrap; cursor: pointer; text-decoration: none; }
.head-more-item:hover, .grid-page .row-menu-item:hover,
.head-more-item:focus-visible, .grid-page .row-menu-item:focus-visible {
  background: var(--accent-soft); color: var(--accent); }
.head-more-item[aria-pressed="false"] { color: var(--muted); }
.head-more-item[aria-current] { font-weight: 600; }
.book-facts > .book-line {
  margin: 0; max-width: none; padding: 1px 0 1px var(--s-3);
  border-left: 2px solid var(--line);
  font-size: var(--t-sm); line-height: 20px; color: var(--ink-2);
}

/* --- 3. ONE TOOLBAR ROW ---------------------------------------------------
   The tabs at the left, the search at the right, and between them the fold
   note as the row's quiet status line — it had been the widest sentence on
   the page, between the tabs and the table it describes. `data-tab` is the
   book's toolbar only (the register and the audit trail share the class). */
.list-toolbar[data-tab] {
  flex-wrap: nowrap; justify-content: flex-start; gap: var(--s-2) var(--s-3);
  margin: 0 0 var(--s-3);
}
.contracts-table .status-select {
  -webkit-appearance: none; appearance: none;
  display: inline-block; vertical-align: middle; box-sizing: border-box;
  height: 24px; min-height: 0; margin: 0; padding: 0 22px 0 8px;
  font: 600 var(--t-label)/22px var(--sans); letter-spacing: .01em;
  border: 1px solid var(--line); border-radius: 4px;
  background: transparent; color: var(--muted); cursor: pointer;
  text-overflow: ellipsis;
}
/* a reader sees the same state as a badge (no control, no caret) */
.contracts-table .st {
  display: inline-block; padding: 0 8px; border-radius: 4px;
  font: 600 var(--t-label)/20px var(--sans); letter-spacing: .01em;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
}
.ledger-pager > :is(.lp-count, .lp-long, .lp-page, .lp-note) {
  font-size: var(--t-sm); line-height: 20px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
:is(.gl-undo, .gl-clear) .gl-recon-hint {
  margin: var(--s-2) 0 0; max-width: 72ch;
  font-size: var(--t-sm); line-height: 18px; color: var(--muted);
}
.gl-recon .gl-recon-hint {
  margin: 0 0 10px; max-width: 80ch; font-size: var(--t-sm); line-height: 18px; color: var(--muted);
}
.access-body .price-grid { width: 100%; }

@media (pointer: coarse) {
  /* on a touch screen every target in the row is the kit's small control */
  .contracts-table .status-select { height: var(--ctl-h-sm); line-height: calc(var(--ctl-h-sm) - 2px); }
}

@media (max-width: 640px) {
  .how-to-read-body { position: fixed; top: auto; left: 16px; right: 16px; width: auto; }
  /* ONE COLUMN. A figure strip two across at 390px wrapped every comparison
     ("$1,249 under plan (Jul)") onto a second line under a 26px figure. */
  .stats, .branch-facts { grid-template-columns: minmax(0, 1fr); row-gap: 14px;
    padding-top: 14px; }
  /* the tiles stack, so nothing needs a reserved sub-line to end level with:
     the space the strip keeps for a comparison it may not print is 18px of
     air between every pair of figures on a 390px screen */
  .stat-cmp { min-height: 0; }
  /* a queue row stacks: chip over title, then the owner and the control */
  .dq-row { grid-template-columns: auto minmax(0, 1fr); row-gap: 8px;
    padding: 12px 26px 12px 13px; }
  .dq-main { grid-column: 1 / -1; }
  .dq-owner { grid-column: 1; justify-self: start; }
  .dq-review { grid-column: 2; justify-self: end; }
  .dq-row.closed { grid-template-columns: auto minmax(0, 1fr); }
  .viz-foot > .viz-note { margin-left: 0; text-align: left; }
}

.contract-panel :is(.catalog-subhead, .catalog-title) {
  font-size: var(--t-label); font-weight: 600; letter-spacing: 0; text-transform: none;
  color: var(--muted);
}
.interview-log .interview-said { color: var(--muted); margin-top: var(--s-1); }

/* --- 2. THE FILTER ROW ON ONE CONTROL LANGUAGE (Quicken, Mercury) ----------
   Five controls in four languages: the search on `--line`, the two dates on
   an older rule with 6px padding and the weak edge, the account on the kit,
   "from" and "to" floating between them as bare words. Every field is the
   kit's now — `--field-line`, `--r-md`, `--ctl-h` — and the two words name
   their dates from above, 11.5px muted, the table-header size. The row
   aligns on the fields' bottom edge, so a labelled date and an unlabelled
   search sit on one line. Apply is the row's one FILLED control, in the
   accent's tint: the page's one solid accent stays "+ Journal entry". */
.list-toolbar:has(> .ledger-filter) { margin: 0 0 var(--s-3); align-items: flex-end; }
/* the lift only while it shows: at rest its shadow tinted every page's
   top-left corner */
.skip-link:focus, .skip-link:focus-visible { transform: none; text-decoration: none;
  box-shadow: var(--shadow-pop); }

@media (max-width: 640px) {
  .access-body .gl-foot { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  body.side-open .mobile-tab.active:not(.mobile-more) { color: var(--muted); }
  .mobile-tab-count { position: absolute; top: 4px; left: calc(50% + 4px); margin: 0;
    padding: 0 5px; line-height: 14px; }
  html:not(.embedded) .mobile-bar { padding: 0 16px; }
  html:not(.embedded) .mobile-title { min-height: 40px; color: var(--ink); cursor: pointer; }
  html:not(.embedded) .mobile-tabs { display: flex; flex: none; order: 99; position: sticky;
    bottom: 0; margin: auto -12px 0; padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--rail-bg); border-top: 1px solid var(--line); }
  .mobile-tab.active, body.side-open .mobile-more { color: var(--accent); }
}

@media (max-width: 640px), (max-width: 900px) and (pointer: fine), (max-width: 900px) and (pointer: none) {
  body:not(.side-open) .rail { visibility: hidden; box-shadow: none; }
  body.side-open .rail { visibility: visible; transition: transform .15s ease-out; }
}

@media (max-width: 640px) {
  /* closed, the rail is the bar and nothing else of it is drawn */
  html:not(.embedded) .rail { top: auto; right: 0; width: auto; height: auto; padding: 0;
    overflow: visible; transform: none; transition: none; z-index: 40; border-right: 0; }
}

@media (max-width: 640px), (max-width: 900px) and (pointer: fine), (max-width: 900px) and (pointer: none) {
  .rail-backdrop { background: var(--scrim); }
  .mobile-bar { background: var(--rail-bg); } /* --- 3. THE LIGHT RAIL IS A STEP, AND THE PHONE'S BAR CASTS ONE ---------
   `--rail-bg`'s light value is `#eff0f4` above (a visible step under the
   page's `#f7f7f9`, the cards still white above both; the dark value is
   untouched). That leaves the phone, where the same token grounds the
   STICKY bar and the page scrolls underneath it: a hairline alone cannot
   say which surface is in front. The bar keeps its `--line` border and
   gains a shade built from the kit's own edge token — no second hairline,
   because the border is already there. */
  .mobile-bar { box-shadow: 0 2px 8px var(--shade-edge); }
  .rail-head { display: none; }
  .rail { height: 100dvh; padding-top: 14px; box-shadow: var(--shadow-pop); } /* -- 2. A CLOSED DRAWER IS NOT THERE --------------------------------------
   under 900px (a phone, or a desktop at 200% zoom) the rail is a drawer slid
   off screen by a transform, which kept its sixteen links in the tab order
   and its lift's shadow bleeding down the left edge of every page. Closed,
   it is hidden (out of the tab order and the accessibility tree) and casts
   nothing; the visibility change waits out the slide when it closes. */
  .rail { transition: transform .15s ease-out, visibility 0s linear .15s; }
}

@media (width <= 640px) {
  .ledger-filter:where(:not([hidden])) {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px var(--s-2); width: 100%;
  }
  .ledger-filter > * { grid-column: 1 / -1; min-width: 0; max-width: none; }
}

.setup-bar {
  -webkit-appearance: none; appearance: none;
  flex: none; box-sizing: border-box; width: 132px; height: 6px; margin: 0;
  border: 0; border-radius: var(--r-pill); overflow: hidden;
  background: var(--track); color: var(--ok);
}
.mobile-title-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

@media (width <= 640px) {
  .ledger-pager > :is(.lp-count, .lp-long, .lp-step, .lp-page) { margin-right: 12px; }
}

.access-body .price-wrap { max-width: 390px; margin: 6px 0 0; }
:is(.set-codes, .set-metrics, .set-fees, .set-avg) > .set-block-head > * {
  grid-column: 1; min-width: 0; margin: 0;
}
/* Two things the help center gained. A company's rail carries a Help
   center item after its last group (`.side-nav.rail-help`). No group word
   stands over it, so it keeps a group word's distance from the group above,
   and on the collapsed strip it draws the short rule a hidden group word
   leaves, so the clusters still read. An assistant answer may now carry
   links into the help center, built as anchors by assistant.js: in running
   text colour alone does not say link, so they are underlined. Tokens
   only; the one rule that sets `display` leaves `[hidden]` alone. */
.side-nav.rail-help { margin-top: 14px; }

@media (width <= 640px) {
/* --- 12. THE PHONE (390px is a designed width) ---------------------------
   The cards stack at the full width, a block's head wraps its action under
   the title, every table scrolls inside its wrapper with the shade, and the
   pop-outs are the kit's sheet with the foot pinned. */
  .set-block { margin-bottom: var(--s-4); border-radius: var(--r-md); }
}

.close-ready > * + * { border-top: 1px solid var(--line-soft); }
/* The critique of 2026-09-28 (SPEC §6.74) found the verdict out of the
   heading outline, a closed drawer still in the tab order, rows that were
   buttons holding links, and the two tags that say whether a month can be
   trusted under 4.5:1. Nothing here moves a figure or a word; the markup
   changes are in overview.html, _decisions.html, _assistant.html and
   base.html. */

/* -- 1. ONE STOP PAST THE RAIL ---------------------------------------------
   the skip link is off screen until the keyboard reaches it, then sits over
   the page's top-left corner. `main` takes no tabindex: following a link to
   its id moves the next Tab's starting point there, and a tabindex on it
   would make every page read as a read-only grid to the grid's own test */
.skip-link { position: absolute; left: var(--s-3); top: var(--s-2); z-index: 100;
  display: inline-flex; align-items: center; min-height: var(--ctl-h); padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); color: var(--accent); font-weight: 600;
  transform: translateY(-300%); }
.gear-menu, .rail-menu { border-radius: var(--r-lg); }
.gear-menu a, .gear-menu .gear-signout, .rail-menu-item { border-radius: var(--r-sm); }
.mobile-title { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; border: 0;
  background: none; font-family: inherit; line-height: inherit; text-align: left; }

@media (max-width: 640px) {
  .mobile-tab { position: relative; display: flex; flex: 1 1 0; flex-direction: column;
    align-items: center; justify-content: flex-start; gap: 2px; min-width: min-content; min-height: 64px;
    margin: 0; padding: 10px 2px 2px; border: 0; border-radius: 0; background: none;
    color: var(--muted); font-family: inherit; font-size: var(--t-12); font-weight: 600;
    line-height: 1.15; text-align: center; text-decoration: none; cursor: pointer; }
}

@media (641px <= width <= 900px) and (pointer: coarse) {
  /* A TABLET HELD UPRIGHT (owner decision 5 of 2026-11-19, SPEC §6.177): the
     rail is its icon strip and is not opened here, so the control that opens
     it is not drawn. Turned on its side, the tablet draws it again. */
  .rail-head #side-toggle { display: none; }
}

/* ===== THE KIT: THE PAGE HEAD [kit-page-head] =====
   A page's head: title, the line under it, its controls and its one overflow menu (head-more).
   --- kept from an old banner ---
   THE KIT · C · page head, tabs, filter bar, tables on a phone
   (screen redesign 2026-09-21, Family 1 — the Foundation kit)

   Four primitives every page wears, fixed once so the screen families
   after this one are layout and nothing else. Nothing here changes a
   word, a hook or a behaviour; the tokens are declared by the kit's
   token block.
*/

/* THE READING PAGES ARE ON THE TYPE SCALE (the phone and tablet build plan's
   wave 6, SPEC §6.180; UI rule 7). The Overview, Insights, the close page and
   the management report on screen wear `page-reading` on their `<main>`. There
   the two legacy size tokens are the scale's own: 11.5px is 12px and 12.5px is
   13px, so every rule written with a legacy token is on the scale on these
   pages and unchanged on every other. A chart's own text is `viz.js`'s, held
   to the PDF's renderer, and keeps the sizes it was drawn with. */
main.page-reading { --t-label: var(--t-12); --t-sm: var(--t-13); }
main.page-reading svg { --t-label: 11.5px; --t-sm: 12.5px; }

.page-head.suite:has(.grid-tabs) > div:first-child { flex-direction: row;
  align-items: baseline; gap: 12px; }
.dqm-status form { margin: 0; }
.page-head h1 { margin-right: auto; }
.page-note p { margin: 8px 0 0; color: var(--muted); font-size: 13px;
  padding: 10px 12px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; }
.rate-add form { display: inline-flex; gap: 6px; margin-top: 6px; align-items: center; }

/* --- 1. the page head: a title BLOCK, and the actions beside it ---------
   `.page-head.suite > div:first-child` laid the h1 and a ninety-character
   `.page-sub` on ONE baseline row, so the row was full before the page's own
   actions reached it and every page pushed them to a second line (Contracts,
   the ledger, Decisions, the portfolio). The title block stacks instead —
   title over its one-line purpose — and `.page-side` / `.page-controls` sit
   at the right of the SAME row.

   THE GRID IS THE EXCEPTION: its head carries the statement tabs and the
   publication line as well, and a column there pushed the branch and year
   controls onto a row of their own. It is matched by the TABS IT HOLDS, never
   by a `.grid-page`-scoped selector — test_grid_presentation asserts that no
   such selector is written for this element anywhere in this file. */
.page-head.suite:not(:has(.grid-tabs)) > div:first-child {
  flex-direction: column; align-items: flex-start; gap: 2px;
}
.page-head.suite:not(:has(.grid-tabs)) .page-sub {
  font-size: 13px; line-height: 1.45; color: var(--muted); max-width: 72ch;
}
/* the actions keep the top line: a two-line title block must not drag them
   to its middle */
.page-head.suite > .page-side,
.page-head.suite > .page-controls { margin-left: auto; align-self: flex-start; }

/* --- 7. THE GRID'S CONTROL ROW SHARES ITS BASELINE ----------------------
   Section C top-aligns a page head's actions so a two-line title block cannot
   drag them to its middle. The grid's head is the exception it already names:
   its first column is the title AND the statement tabs, and on the Revenue
   trend tab that column is 3px taller than the control row, which left the
   year stepper floating above the strip. */
.page-head.suite:has(.grid-tabs) > .page-controls { align-self: center; }
/* the head's ONE overflow menu: an icon button, its items on a card */
.head-more { position: relative; }
.head-more-body > form { margin: 0; }
/* Family 5, section A: the Contracts page from its head to the end of the
   book, and the client's pop-out. LOOK, LAYOUT and HIERARCHY only — every
   word, every hook the tests and the help shots read, every behaviour is as
   it was. The template gained two wrappers (`.book-facts`, the client
   pop-out's `.access-form` / `.access-foot`), two inline wrappers in the
   saved-formulas table, the trash icon in place of a `×` glyph, and the fold
   note moved into the toolbar; nothing else moved.

   Every line box set here is a WHOLE pixel (family 4's lesson: a fractional
   line box above a table moves every figure in it), so line heights are in
   px, never a multiplier of a 12.5px or 11.5px size. */

/* --- 1. THE HEAD ---------------------------------------------------------
   The kit already stacks the title over its sentence with the primary and
   the counts on the title's row. The counts are a caption beside the button,
   never two lines, and the purpose sentence stops at a reading measure. */
.page-head.suite:has(~ .book-facts) { margin-bottom: var(--s-3); }
/* Family 6, section A: the General ledger from its head to the end of the
   register, the pager and the legacy imported-charges block. LOOK, LAYOUT
   and HIERARCHY only — every word, every hook the tests, the help shot and
   the page's own script read, every behaviour is as it was. The template
   gained wrappers and classes and nothing else: a `<label>` around each of
   the two dates, one span per phrase of the scope line and of the pager, a
   class on an Entry badge, and the empty state's two phrases as buttons on
   the page's own `[data-modal]` handler.

   THE REGISTER'S TABLE LANGUAGE WAS RIGHT and is kept: 34px rows, 13px
   body, tabular figures, one em dash, the description as the row's name.
   What changes is what surrounds it and how its three kinds of row — an
   ordinary row, a journal with its legs, a repeated row — tell themselves
   apart. Every line box set here is a WHOLE pixel (family 4's lesson). */

/* --- 1. THE HEAD -----------------------------------------------------------
   The kit stacks the title over its sentence with the two actions at the
   right. The sentence's 13px x 1.45 was an 18.85px line and moved the whole
   page below it off the pixel grid; the note under it was loose between
   the buttons and the filter. It is the head's third line now: 8px under
   the sentence, a quiet disclosure with the kit's chevron, and its bordered
   card when open. `.page-note summary` (pinned) is untouched: these rules
   are its own, scoped to the note that follows a page head. */
.page-head.suite:has(+ details.page-note) { margin-bottom: var(--s-2); }
.page-head.suite:has(+ details.page-note) .page-sub { line-height: 19px; }
.page-head.suite + details.page-note { margin: 0 0 var(--s-4); }
.page-head.suite + details.page-note > p { margin-top: var(--s-2); line-height: 20px; }
table.codes-table td .tag:first-child, table.codes-table td .badge:first-child { margin-left: 0; }
main:has(> section.close-month) > .page-head.suite { margin-bottom: var(--s-4); }

@media (max-width: 900px) {
  .page-head.suite { align-items: flex-start; }
}

@media (width <= 640px) {
/* -- 5. ON A PHONE, CUSTOMIZE JOINS THE CONTROL ROW ------------------------
   at 390px the row is 358px: the year (118px), the window (201px) and a
   labelled Customize (117px) need just over 456px with their 10px gaps, so
   Customize took a row of its own. Where the row is 356 to 459px wide,
   Customize is its icon (its name, "Customize", is still its text), the
   gaps are the kit's 8px and the year stepper's three paddings give up 2px
   a side: 353px, one row. Wider, the label fits as it is; narrower (360 and 375px phones),
   the labelled button takes its own row as before. The Trailing 12 window
   has no year, and its row already fits. THE ICON IS SQUARE (review
   2026-09-29): it is `--ctl-h` wide, the control height, so a touch screen
   (40px) does not draw it 34 by 40; there the two gaps give up 2px each to
   keep the row at 355px. */
  .page-head.suite:has(> .page-controls > #ov-customize) { container: ovhead / inline-size; }
}

@media screen and (max-width: 640px) {
  /* 6. the page head on a phone: the title block, then the controls on a
     row of their own at full width */
  .page-head.suite > div:first-child { width: 100%; }
  .page-head.suite:not(:has(.grid-tabs)) .page-sub { max-width: none; }
  .page-head.suite > .page-side, .page-head.suite > .page-controls {
    margin-left: 0; width: 100%; justify-content: flex-start; align-self: stretch;
  }
}

@container ovhead (356px <= width <= 459.98px) {
  .page-controls:has(> .year-nav) { gap: 8px; }

  @media (pointer: coarse) {
    .page-controls:has(> .year-nav) { gap: 6px; }
  }
}

/* ===== THE KIT: BUTTONS [kit-buttons] =====
   The button roles (primary, secondary, link), icon buttons, the segmented switch and the toggle pill.
*/

table button[type="submit"]:not(.linklike):not(.icon-btn):not(.primary):hover {
  border-color: var(--accent); color: var(--accent); }
.toggle-pill span { font-weight: 650; padding: 1px 8px; border-radius: 999px;
  background: var(--line-soft); color: var(--muted); }
.icon-btn.del:hover { color: var(--err); background: none; }
a.icon-btn { text-decoration: none; display: inline-block; }
.linklike.danger { color: var(--err); }
.linklike.danger:hover { text-decoration: underline; }
.icon-btn.del:hover { color: var(--err); background: var(--err-bg); border-color: var(--err-line); }
/* a `<summary>` whose `display` is not `list-item` drops its own marker; the
   webkit pseudo is named as well so no engine draws a second one */
:is(.page-controls, .page-side, .toolbar, .access-foot,
    .board-toolbar, .report-actions, .narrative-gen, .ov-panel-foot)
:is(button, summary).linklike::-webkit-details-marker { display: none; }
.narrative-gen .linklike { min-height: var(--ctl-h-sm); padding: 0 8px;
  font-size: var(--t-sm); font-weight: 600; }
.ovw-bar .icon-btn { width: 24px; height: 24px; }
.period-pick .linklike { display: inline-flex; align-items: center; min-height: 24px; }

/* ===== THE KIT: FIELDS AND FORMS [kit-fields] =====
   Labels, inputs, the form grid and its sections, field help, the upload bar.
   --- kept from an old banner ---
   THE KIT · A · tokens, fields, buttons, focus (2026-09-21)
*/

.login-box label, .attest-form label { display: block; margin: 14px 0; font-weight: 550;
  font-size: 13px; color: var(--ink-2); }
.cell-versions li, .cell-notes li { padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.hov-list li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0;
  border-bottom: 1px solid var(--line-soft); }
.stepper li { flex: 1; padding: 10px 14px 10px 40px; position: relative; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  font-size: 13px; font-weight: 600; }
.stepper li::before { counter-increment: step; content: counter(step); position: absolute;
  left: 12px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px;
  border-radius: 50%; background: var(--line-soft); color: var(--muted);
  display: grid; place-items: center; font-size: 12px; }
.stepper li.active::before { background: var(--accent); color: var(--on-accent); }
.pw-reset summary::-webkit-details-marker { display: none; }
.pw-reset { position: relative; }
.pw-form input { padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px;
  font: inherit; font-size: 12.5px; }
.form-grid > label { margin: 9px 0; }
/* form section micro-headings + inline radio groups (the contract form) */
.form-grid .form-section { font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line-soft); padding-bottom: 4px; margin-top: 8px; }
.access-body .form-grid > label > input,
.access-body .form-grid > label > select { align-self: stretch; }
.ctrl-row > label { display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
  font-size: 12px; color: var(--ink-2); }
.ctrl-row > label.grow { flex: 1 1 150px; }
.ctrl-row > label.grow > select { align-self: stretch; }
.ctrl-row .mp select { margin-top: 0; }

/* -- ONE FIELD PRIMITIVE -------------------------------------------------- */
:where(.access-body, .access-panel, .form-grid, .ctrl-row, .pw-form,
       .setup-form, .ledger-filter, .audit-filter, .list-toolbar, .help-find,
       .ov-panel, .settings-shell, .dqm-record, .dec-form, .assign-bar,
       .upload-bar, .signoff-form, .rate-add)
:where(input[type="text"], input[type="number"], input[type="date"],
       input[type="month"], input[type="search"], input[type="email"],
       input[type="password"], input[type="tel"], input[type="url"],
       input:not([type]), select, textarea):where(:not(table.grid *, .driver-grid *, .lines-table *,
       td *, th *)) {
  min-height: var(--ctl-h); padding: 0 11px;
  font: inherit; font-size: var(--t-table);
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--field-line); border-radius: var(--r-md);
}
/* a textarea is the one field that is not a single line */
:where(.access-body, .access-panel, .form-grid, .ctrl-row, .pw-form,
       .setup-form, .ledger-filter, .audit-filter, .list-toolbar, .help-find,
       .ov-panel, .settings-shell, .dqm-record, .dec-form, .assign-bar,
       .upload-bar, .signoff-form, .rate-add)
:where(textarea):where(:not(table.grid *, .driver-grid *, .lines-table *,
       td *, th *)) {
  min-height: 72px; height: auto; padding: 8px 11px; line-height: 1.45;
  resize: vertical;
}
:where(.access-body, .access-panel, .form-grid, .ctrl-row, .pw-form,
       .setup-form, .ledger-filter, .audit-filter, .list-toolbar, .help-find,
       .ov-panel, .settings-shell, .dqm-record, .dec-form, .assign-bar,
       .upload-bar, .signoff-form, .rate-add)
:where(input[type="text"], input[type="number"], input[type="date"],
       input[type="month"], input[type="search"], input[type="email"],
       input[type="password"], input[type="tel"], input[type="url"],
       input:not([type]), select, textarea):where(:not(table.grid *, .driver-grid *, .lines-table *,
       td *, th *))::placeholder { color: var(--muted-2); }
/* the pseudo-classes are wrapped too, so a surface that already designs its
   own hover or focus (the register's search, a role select) still wins */
:where(.access-body, .access-panel, .form-grid, .ctrl-row, .pw-form,
       .setup-form, .ledger-filter, .audit-filter, .list-toolbar, .help-find,
       .ov-panel, .settings-shell, .dqm-record, .dec-form, .assign-bar,
       .upload-bar, .signoff-form, .rate-add)
:where(input[type="text"], input[type="number"], input[type="date"],
       input[type="month"], input[type="search"], input[type="email"],
       input[type="password"], input[type="tel"], input[type="url"],
       input:not([type]), select, textarea):where(:not(table.grid *, .driver-grid *, .lines-table *,
       td *, th *)):where(:hover:not(:disabled)) {
  border-color: var(--muted-2);
}
/* the focus ring is the product's own, unchanged: 2px accent, inset by 1 */
:where(.access-body, .access-panel, .form-grid, .ctrl-row, .pw-form,
       .setup-form, .ledger-filter, .audit-filter, .list-toolbar, .help-find,
       .ov-panel, .settings-shell, .dqm-record, .dec-form, .assign-bar,
       .upload-bar, .signoff-form, .rate-add)
:where(input[type="text"], input[type="number"], input[type="date"],
       input[type="month"], input[type="search"], input[type="email"],
       input[type="password"], input[type="tel"], input[type="url"],
       input:not([type]), select, textarea):where(:not(table.grid *, .driver-grid *, .lines-table *,
       td *, th *)):where(:focus) {
  outline: 2px solid var(--accent); outline-offset: -1px;
  border-color: var(--accent);
}
:where(.access-body, .access-panel, .form-grid, .ctrl-row, .pw-form,
       .setup-form, .ledger-filter, .audit-filter, .list-toolbar, .help-find,
       .ov-panel, .settings-shell, .dqm-record, .dec-form, .assign-bar,
       .upload-bar, .signoff-form, .rate-add)
:where(input[type="text"], input[type="number"], input[type="date"],
       input[type="month"], input[type="search"], input[type="email"],
       input[type="password"], input[type="tel"], input[type="url"],
       input:not([type]), select, textarea):where(:not(table.grid *, .driver-grid *, .lines-table *,
       td *, th *)):where(:disabled) {
  background: var(--surface-2); color: var(--muted); cursor: default;
}
/* ATTENTION, never red: `--err` is a loss and nothing else (SPEC 6.37) */
:where(.access-body, .access-panel, .form-grid, .ctrl-row, .pw-form,
       .setup-form, .ledger-filter, .audit-filter, .list-toolbar, .help-find,
       .ov-panel, .settings-shell, .dqm-record, .dec-form, .assign-bar,
       .upload-bar, .signoff-form, .rate-add)
:where([aria-invalid="true"]):where(:not(table.grid *, .driver-grid *, .lines-table *,
       td *, th *)) { border-color: var(--attn); }
:where(.access-body, .access-panel, .form-grid, .ctrl-row, .pw-form,
       .setup-form, .ledger-filter, .audit-filter, .list-toolbar, .help-find,
       .ov-panel, .settings-shell, .dqm-record, .dec-form, .assign-bar,
       .upload-bar, .signoff-form, .rate-add)
:where(input[type="checkbox"], input[type="radio"]) {
  accent-color: var(--accent);
}
/* the file control: the native button is a light-grey slab that glows in dark */
:where(.access-body, .access-panel, .form-grid, .ctrl-row, .pw-form,
       .setup-form, .ledger-filter, .audit-filter, .list-toolbar, .help-find,
       .ov-panel, .settings-shell, .dqm-record, .dec-form, .assign-bar,
       .upload-bar, .signoff-form, .rate-add)
:where(input[type="file"]) {
  font: inherit; font-size: var(--t-table); color: var(--ink); max-width: 100%;
}
:where(.access-body, .access-panel, .form-grid, .ctrl-row, .pw-form,
       .setup-form, .ledger-filter, .audit-filter, .list-toolbar, .help-find,
       .ov-panel, .settings-shell, .dqm-record, .dec-form, .assign-bar,
       .upload-bar, .signoff-form, .rate-add)
:where(input[type="file"])::file-selector-button {
  height: var(--ctl-h-sm); margin: 0 10px 0 0; padding: 0 12px;
  border: 1px solid var(--field-line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: var(--t-sm); font-weight: 600; cursor: pointer;
}
:where(.access-body, .access-panel, .form-grid, .ctrl-row, .pw-form,
       .setup-form, .ledger-filter, .audit-filter, .list-toolbar, .help-find,
       .ov-panel, .settings-shell, .dqm-record, .dec-form, .assign-bar,
       .upload-bar, .signoff-form, .rate-add)
:where(input[type="file"]):where(:hover)::file-selector-button {
  border-color: var(--accent); color: var(--accent);
}
/* the stack's own 4px gap now does this spacing; the month picker's top
   margin would add a second one */
:where(.access-body, .form-grid, .pw-form, .setup-form) label > .mp {
  margin-top: 0;
}
/* "Pay is (staff only)": the qualifier rides the label's line */
:is(#modal-metric-new, [id^="modal-metric-"]) form.form-grid > label:has(> .muted + select):not([hidden]) { display: block; }
:is(#modal-metric-new, [id^="modal-metric-"]) form.form-grid > label:has(> .muted + select) > .muted { display: inline; }
:is(#modal-metric-new, [id^="modal-metric-"]) form.form-grid > label:has(> .muted + select) > select {
  display: block; width: 100%; margin-top: 4px;
}
/* THE FORMULA and its "+ add operating metric…" picker share a row inside
   the SAME label (pickers.js finds the field from the picker's label); the
   helper line runs under both */
:is(#modal-metric-new, [id^="modal-metric-"]) form.form-grid > label:has(> select[data-metric-insert]):not([hidden]) {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 8px; row-gap: 4px; align-items: center;
}
:is(#modal-metric-new, [id^="modal-metric-"]) form.form-grid > label:has(> select[data-metric-insert])::after {
  content: ""; order: 1; flex: 0 0 100%; height: 0;
}
:is(#modal-metric-new, [id^="modal-metric-"]) form.form-grid > label:has(> select[data-metric-insert]) > * { order: 2; }
:is(#modal-metric-new, [id^="modal-metric-"]) form.form-grid > label:has(> select[data-metric-insert]) > input[name="formula"] {
  flex: 1 1 340px; min-width: min(340px, 100%); width: auto;
}
:is(#modal-metric-new, [id^="modal-metric-"]) form.form-grid > label:has(> select[data-metric-insert]) > select[data-metric-insert] {
  flex: 0 1 auto; width: auto; max-width: 100%;
}
:is(#modal-metric-new, [id^="modal-metric-"]) form.form-grid > label:has(> select[data-metric-insert]) > .muted {
  flex: 0 0 100%;
}

@media (width <= 640px) {
  :is(#modal-metric-new, [id^="modal-metric-"]) form.form-grid > label:has(> select[data-metric-insert]):not([hidden]) {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ===== THE KIT: THE TAB STRIP [kit-tabs] =====
   The tab strip under a page head and the smaller tab rows.
*/

.kind-toggle a { padding: 4px 12px; border-radius: 6px; font-size: 12.5px; font-weight: 500;
  color: var(--muted); white-space: nowrap; }
.kind-toggle a:hover { text-decoration: none; color: var(--ink); }
.kind-toggle a.active { background: var(--surface); color: var(--ink); font-weight: 600;
  box-shadow: 0 1px 2px rgba(22, 22, 29, .08); }
.builder-tabs .bt.on { background: var(--accent); border-color: var(--accent); color: #fff; }
/* plan/actual toggle on the drivers grid (Addition B) */
.vk-toggle { display: flex; align-items: center; gap: 6px; margin: 8px 0 4px; }
.vk-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ===== THE KIT: THE FILTER ROW [kit-filter-row] =====
   The search and the filters above a list.
*/

.plan-side .stats > .stat { border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4); }

.series-toggle .seg-opt + .seg-opt { border-left: 1px solid var(--line); }
.series-toggle .seg-opt:hover { color: var(--accent); }
.series-toggle .seg-opt.active { background: var(--accent); color: #fff; }
.list-search:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.branch-bar .chip:hover { text-decoration: none; }
.calc-method .badge.manual { background: var(--line-soft); color: var(--muted); }
.calc-method .badge.fee { background: var(--ok-bg); color: var(--ok); }
.series-toggle .seg-opt.active { background: var(--inverse); color: var(--inverse-ink); }
.chip.sum-fold[aria-pressed="false"] { opacity: .6; text-decoration: line-through; }

/* PROVENANCE (simplification phase 2, 2026-09-12): what plans a line, on the
   line; the ledger-average badge in the planning panel */
.calc-method .badge.avg { background: var(--attn-bg); color: var(--attn-ink); }
.setup-steps.compact .setup-step { padding: 7px 0; }
/* the verdict wears the one badge family; the health read's own colour comes
   from `.verdict-*`, which every surface already shares */
.console-table .badge[class*="verdict-"] { font-weight: 650; }
.access-head .access-close:hover, .fx-close:hover {
  color: var(--ink); background: var(--line-soft); border-color: var(--line);
}
/* it had no ground of its own, so it went grey in dark */
.list-search { background: var(--surface); color: var(--ink); }
.help-head .help-close:hover {
  color: var(--ink); background: var(--line-soft); border-color: var(--line);
}
.stats > .stat + .stat, .branch-facts > .fact + .fact {
  border-left: 1px solid var(--line-soft); }
.stats > .stat:first-child, .branch-facts > .fact:first-child { padding-left: 0; }
.branch-facts > .fact:nth-child(3n+1) { border-left: 0; padding-left: 0; }
.dq-row:hover .dq-review { border-color: var(--accent); }
.dq-row.closed:hover { background: var(--surface); }
.dq-modal .dqm-close:hover { background: var(--line-soft); color: var(--ink); }
.fx-panel-fc .calc-amt.exp { color: var(--muted); }
.list-toolbar[data-tab] > .page-tabs { flex: none; }
.list-toolbar[data-tab] > .list-search:hover { border-color: var(--muted-2); }
.list-toolbar[data-tab] > .list-search:focus { border-color: var(--accent); }
.list-toolbar[data-tab] > .list-search::placeholder { color: var(--muted-2); }
/* Family 9, section A: the audit trail, and the three shell rules the
   owner asked to be fixed once for every screen (2026-09-24). LOOK, LAYOUT
   and HIERARCHY only, with the owner's one exception on this page: the When
   cell is two lines, the date over the time. No word, no hook and no
   behaviour moves; the template gained wrappers and classes, and the export
   moved from the page head into the filter strip it exports.

   THE THREE SHELL FIXES live IN PLACE, in the rules that define them, each
   with its reason (the lead is told the lines):
   1. `.list-search` — the shell's definition declares its own ground,
      `--surface` / `--ink` (the kit had restated it; the definition says it).
   2. `tr.inactive-line td` — muted ink at full strength replaces
      `opacity: .45`; the `td:last-child` exception is gone with it.
   3. `.page-head.suite > div:first-child` — the title block stacks, so a
      head's metadata is always a line of its own; the grid alone keeps its
      one baseline row, matched by `:has(.grid-tabs)`.

   WHAT ALREADY WORKED STAYS: a sentence per row as its name, the folded
   constant columns with their stated reason, the one `.badge state`
   outcome, the 11.5px sentence-case headers and the `th-sub` under "What
   happened". Every line box set here is a whole pixel (family 4). */

/* --- 1. ONE STRIP FOR THE FILTERS (Vanta, Employment Hero) -----------------
   Three look-alike selects, a floating checkbox and a wrapped second line of
   from / to / Apply, with nothing to say which filter was set, and the
   export in the page's corner, 150px from the filters it carries. One
   bordered strip now: WHAT to show on the first line (the search takes the
   slack, the three pickers keep their natural width, the publications
   switch a control like them), WHEN on the second as one dated control with
   Apply — the row's one filled control, in the accent's tint as on the
   register — and the export at the strip's right end. The form has no
   legend, so the strip carries no leading label: a new noun is not ours. */
.list-toolbar:has(> .audit-filter) {
  margin: 0 0 var(--s-4); padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

@media (max-width: 1240px) {
/* --- 8. THE PHONE IS A DESIGNED WIDTH -----------------------------------
   The rules below live in their own media queries: the `@media (max-width:
   1100px)` block that folds the cash bridge is asserted verbatim and is not
   touched, and the `1240` fold that takes the strips to two columns is where
   the tiles' hairlines have to be re-drawn per row. */
  /* two columns: every odd tile opens a row, so it carries no left rule */
  .stats > .stat:nth-child(2n+1), .branch-facts > .fact:nth-child(2n+1) {
    border-left: 0; padding-left: 0; }
  .branch-facts > .fact:nth-child(2n) { border-left: 1px solid var(--line-soft); }
}

@media (width <= 700px) {
  .list-toolbar[data-tab] { flex-wrap: wrap; }
  .list-toolbar[data-tab] > .page-tabs { flex: 0 1 auto; }
}

@media (max-width: 640px) {
  .stats > .stat + .stat, .branch-facts > .fact + .fact {
    border-top: 1px solid var(--line-soft); padding-top: 14px; }
}

/* ONE BADGE, ITS TWO VARIANTS (SPEC §6.37). A method badge was a 10px
   uppercase accent pill of its own, and the contracts badge wore `--ok`,
   which is the ahead mark and nothing else. Every answer to "what plans
   this line" is a KIND (the accent tint); the ledger's average and "by
   hand" are readings of the line's state, so they take the STATE outline. */
.fx-panel .calc-method .badge {
  font: 600 11px/1.6 var(--sans); letter-spacing: .02em; text-transform: none;
  padding: 0 7px; border-radius: 4px; border: 1px solid transparent;
  color: var(--accent); background: var(--accent-soft);
}
/* the search is the kit's field: its edge is `--field-line`, which `--line`
   was not — in dark the control all but disappeared into the surface */
.list-toolbar[data-tab] > .list-search {
  flex: 0 1 240px; min-width: 200px; max-width: 360px; margin-left: auto;
  height: var(--ctl-h); padding: 0 11px; border: 1px solid var(--field-line);
  border-radius: var(--r-md); font-size: var(--t-table);
}

@media (width <= 700px) {
  .list-toolbar[data-tab] > .list-search {
    order: 2; flex: 1 1 100%; min-width: 0; max-width: none; margin-left: 0;
  }
}

@media (width <= 640px) {
/* --- 4. THE PHONE -----------------------------------------------------------
   The strip stacks: the search at the full width, the pickers two to a row,
   the dated control at the full width, then Apply and the export. The table
   keeps a readable measure and scrolls inside its wrapper, rather than
   breaking "Dana Reyes" into three pieces a word wide; the cut edge says so
   with the kit's scroll-driven shade, which cannot claim a column that is
   not there. The wrapper is the containing block at this width (family 6:
   an sr-only caption must not reach past it). */
  .list-toolbar:has(> .audit-filter) { padding: 10px; }
}

@media (width <= 420px) {
/* FOUR TABS ON A PHONE: "Active · 3", "Projected · 3", "Ended · 1" and
   "Pending approval · 1" need 404px and a phone's column is 358px, so the
   strip cut the last one — the open tab, on Pending — mid-word. Under 420px
   the strip is two by two: every tab whole, the open one always in view.
   The track, the pills and the open pill's lift are the kit's. */
  .list-toolbar[data-tab] > .page-tabs {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%; height: auto; overflow: visible;
  }
}

@media (pointer: coarse) {
  /* Contracts' tabs stand two by two on a narrow phone: the rows part by what
     the two reach, so no tab takes its neighbour's tap */
  .list-toolbar[data-tab] > .page-tabs { row-gap: 6px; }
}

@media (width <= 420px) {
  .list-toolbar[data-tab] > .page-tabs > a { justify-content: center; }
}

/* ===== THE KIT: TABLES [kit-table] =====
   The list table and its scroll box: heads, sort arrows, row actions and menus, totals, the scroll shades.
   --- kept from an old banner ---
   THE TABLES AND CHARTS SYSTEM (adversarial review 2026-09-07, SPEC §6.37)
   — the primitives every table and chart surface is built from. One badge,
   one comparison pattern, one data-table grammar, one wrapper.
*/

/* --- 4. THE CONSOLE'S CUT EDGE SAYS SO ----------------------------------
   At 390px the console scrolls inside its wrapper and "revisions pending" was
   cut mid-word straight into the page ground: the kit's cue there is the thin
   scrollbar, which a screenshot never shows and a touch screen only paints
   while a finger is down.

   The kit's OTHER cue is the one to borrow (section D, rule 3, reused by the
   shell for the help drawer): a sticky strip faded by the scroll itself. Here
   it runs on the INLINE axis. The wrapper becomes a flex row so the strip can
   stretch to the table's height and stick to the scrollport's right edge; it
   is declared at `opacity: 0`, so where the table fits, the timeline is
   inactive, the animation never applies and no shade is ever drawn. It cannot
   claim a column that is not there.

   Only the RIGHT edge is drawn. The left edge of this table is the frozen
   Company column, which is itself the cue that the figures have moved past
   it; a shade there would sit on top of the names. `kit-shade-bottom`
   (1 -> 0) is the kit's own keyframe: with `both` fill, the strip is at full
   before the last 12px of travel and gone at the end. */
.tablewrap:has(> .console-table) { display: flex; }

/* --- 12. THE PHONE (and the kit's right-edge shade) ------------------------
   The book keeps its columns and scrolls inside its wrapper; the contract a
   row is about stays under the thumb (the console's pattern, family 3); the
   cut edge says so with the kit's scroll-driven shade, which cannot claim a
   column that is not there. The toolbar stacks: the tabs, the search at the
   full width, the status line under it. */
.tablewrap:has(> .contracts-table) { display: flex; }

/* --- 9. THE PHONE -------------------------------------------------------------
   At every width the register scrolls inside its wrapper with the kit's
   right-edge shade — which cannot claim a column that is not there — and
   under 900px (the shell's drawer) the strip wraps. The description is NOT
   frozen: a
   journal's band and its legs name themselves in cells that span two
   columns (pinned), and a frozen two-column cell is wider than a phone, so
   it would cover the figures it names. Under 640px the head's two actions
   stack at the full width and the filter becomes a grid: the search, the
   two dates side by side, then the account and Apply. */
.tablewrap:has(> .ledger-table) { display: flex; }
/* an off-screen column says so: the kit's scroll-driven right-edge shade */
.set-block > .tablewrap { display: flex; }

/* --- 6. PHONE (≤640px) ------------------------------------------------------
   The codes table keeps its columns and scrolls inside its wrapper with the
   code's name frozen under the thumb (`overflow: clip` on the table:
   `hidden` would make it its own scroller and sticky would never stick —
   family 5) and the category band's controls pinned into view; the
   metrics and fees tables scroll with the kit's right-edge shade; the
   filter is a grid; the legend one column; the pop-outs the kit's sheet
   with one-column forms and the foot pinned. */
.tablewrap:has(> :is(.codes-table, .series-manage, .fees-table)) { display: flex; }

table.grid thead th.line-col, td.line-col, table.grid tbody th.line-col {
  text-align: left; position: sticky; left: 0;
  background: var(--surface); z-index: 1; min-width: 200px; max-width: 264px; }
table.grid thead th.line-col { padding-top: 8px; padding-bottom: 8px; }
table.grid thead th.sum-col { font-size: 11px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .05em; padding: 8px 12px; vertical-align: bottom; white-space: nowrap; }
td.line-col, table.grid tbody th.line-col { vertical-align: middle; white-space: nowrap; }
/* a row header carries the row's identity, not a heading's weight */
table.grid tbody th.line-col { font-weight: 500; font-size: 13px; color: var(--ink);
  letter-spacing: 0; }
/* the per-column status words are gone (F12) — the publication strip above
   the table says it once, and only "revisions pending" is a badge (N4) */
.col-actions { display: flex; gap: 4px; }
table.grid tr.section-row td { background: var(--bg); font-weight: 650;
  padding: 8px 12px 8px 24px; font-size: 12px; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-2); border-top: 1px solid var(--line); }
tr.computed td { background: var(--sum-bg); font-weight: 650; padding: 7px 10px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.attest-table tbody tr:last-child td { border-bottom: none; }
.attest-table tbody tr:hover td { background: var(--surface-2); }
.lines-table td { vertical-align: middle; }
/* AN INACTIVE ROW IS MUTED INK, NEVER A FADED ONE (family 9, 2026-09-24; the
   shell's rule, for every list table): `opacity: .45` took every word of an
   off row under the contrast floor in dark, could not be themed, and its
   `td:last-child` exception lit the one row nobody should act on with the
   brightest actions on the page. The cells read in `--muted` at full
   strength; a link, a badge and a status control keep their own ink. The
   families' local rules (settings, cost codes, metrics, planned expenses)
   already said the same and now agree with it. */
tr.inactive-line td { color: var(--muted); }
.viz-card[data-drill-base] .viz-table tbody tr[data-month]:hover th,
.viz-card[data-drill-base] .viz-table tbody tr[data-month]:hover td { background: var(--surface-2); }
table.board-table tr.tvn-year td, table.board-table tr.tvn-year th { font-weight: 600; background: var(--surface-2); }
.sheet-tbl tbody tr:last-child td { border-bottom: none; }
.version-sheet tr.section-row .muted { font-weight: 400; margin-left: 8px; font-size: 12px; }
.row-actions .icon-btn:disabled { opacity: .3; cursor: default; }
.ledger-table tfoot td { border-top: 2px solid var(--line); }

/* ------------------------------------- unified grid: plan vs actual ------ */
/* forecast months are tinted, with a divider where actuals hand off */
table.grid th.fc, table.grid td.fc { background: var(--surface-2); }
.lines-table .mp + .mp { margin-top: 3px; }
.fee-table tbody td { padding: 5px 8px 5px 0; border-bottom: 1px solid var(--line-soft);
  vertical-align: middle; }
.fee-table tbody tr:last-child td { border-bottom: none; }
.list-table td.row-actions form { display: inline; }
.list-table th.col-act { width: 1%; }
.list-table tr.group-row td { background: var(--bg); font-size: 12.5px; }

/* the balance sheet's two side headers (Assets / Liabilities and RE) */
tr.side-row td { font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink); background: var(--line-soft); }
.driver-grid thead th.num { text-align: right; }
table.league tr.cost-centre td, table.league tr.cost-centre th { color: var(--muted); }
.figures td.num.neg { color: var(--err); }
/* the group band is the SYSTEM's band (review 2026-09-08, N9): 600/11.5px
   sans, sentence case, a light track — the same rule the list tables carry
   (`.list-table tr.group-row td`). Uppercase 700 monospace-ish bands were the
   type treatment SPEC §6.37 retired, and this is the page's most repeated
   element. */
table.grid tr.section-row td { background: var(--bg); font: 600 11.5px/1.3 var(--sans);
  letter-spacing: .02em; text-transform: none; color: var(--muted);
  padding: 7px 12px 7px 20px; border-bottom: 1px solid var(--line); }
tr.computed td { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.health.band .narrative p { max-width: 70ch; }
.health.band .notice { margin: 4px 0; }
.board-sheet .board-table tbody th { font-weight: 500; color: var(--ink); font-size: 13px;
  border-bottom: 1px solid var(--line-soft); letter-spacing: 0; text-align: left;
  vertical-align: top; }
.dm-tbl thead th.num { text-align: right; }
/* the data table: hierarchy by weight and rule, never by colour alone */
table.dt { width: 100%; border-collapse: collapse; font-size: 13px; }
table.dt th .th-sub { display: block; font-weight: 400; font-size: 11px; }
table.dt th.num, table.dt td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.dt td { padding: 0 10px; height: 34px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.dt tbody th[scope="row"] { font-weight: 500; color: var(--ink); padding: 0 10px; height: 34px;
  border-bottom: 1px solid var(--line-soft); vertical-align: middle; font-size: 13px; letter-spacing: 0; }
table.dt tr.group-row td, table.dt tr.group-row th { background: var(--bg); font: 600 var(--t-label)/1.3 var(--sans);
  color: var(--muted); letter-spacing: .02em; height: 30px; }
table.dt tr.subtotal td, table.dt tr.subtotal th { font-weight: 600; background: var(--surface-2); }
table.dt tr.total td, table.dt tr.total th { font-weight: 700; border-top: 1.5px solid var(--ink); border-bottom: 0; }
.report-table tr.zero-run .sub { display: block; font-size: 11.5px; color: var(--muted);
  font-weight: 400; }
.attest-schedule tfoot tr.total td.anchor { font-size: var(--t-16); font-weight: 700; }
.attest-schedule tfoot tr.total:hover td { background: var(--surface); }

/* N6 — ONE ANCHOR IN EVERY FOOT IN THIS FAMILY, the treatment the attest
   schedule already carries: the secondary row is a subtotal (600 on the fill,
   a hairline), the total is 700 under the one ink rule, and its anchor figure
   is one step larger. */
/* the attest schedule already has this treatment, tuned to its own six rows
   (F8) — these rules must not reach into it */
.list-table:not(.attest-schedule) tfoot tr.subtotal th[scope="row"],
.list-table:not(.attest-schedule) tfoot tr.subtotal td {
  font-weight: 600; background: var(--surface-2); color: var(--ink);
  border-top: 1px solid var(--line); border-bottom: 0; }
.list-table:not(.attest-schedule) tfoot tr.subtotal:hover th[scope="row"],
.list-table:not(.attest-schedule) tfoot tr.subtotal:hover td { background: var(--surface-2); }
.list-table:not(.attest-schedule) tfoot tr.total td.anchor {
  font-size: 15px; font-weight: 700; }
.driver-grid tr.group-row .band-inner { position: sticky; left: 12px;
  display: inline-block; font: 600 11.5px/1.3 var(--sans); color: var(--muted);
  letter-spacing: .02em; }
.board-sheet tr.pm-planband .tot-sub { display: block; font-size: var(--t-12);
  font-weight: 400; color: var(--muted); white-space: normal; }

/* "Not used by this company" (SPEC §6.53) — the chart of accounts keeps the
   code and says the company has no figure for it. A state, so the outline
   badge the other states wear, never a tint that reads as a warning. */
.codes-table tr.not-used-line .code-name { color: var(--ink-2); }
/* REPEATED ROWS COLLAPSE to one line with their count and subtotal; the
   toggle opens the rows it stands for, in place, so every row stays
   reachable. */
.ledger-table tr.ledger-repeat .rep-n { color: var(--muted); font-size: 11.5px;
  margin-left: 6px; font-variant-numeric: tabular-nums; }
.th-sort.is-sorted .th-arrow { color: var(--accent); }
th[aria-sort="none"] .th-arrow { visibility: hidden; }
th:hover .th-arrow { visibility: visible; }
/* a compact field for the controls INSIDE a pop-out's tables — the contract
   plan, the fee rows, the term dates, the review — where 34px a row would
   double the height of a table that is read, not filled in */
:where(.plan-table, .fee-table, .dates-table, .review-table, .several-rows, .interview-type)
:where(input[type="text"], input[type="number"], input[type="date"],
       input[type="month"], input[type="search"], input[type="email"],
       input[type="password"], input[type="tel"], input[type="url"],
       input:not([type]), select, textarea):where(:not(table.grid *, .driver-grid *, .lines-table *)) {
  min-height: var(--ctl-h-sm); padding: 0 8px; font-size: var(--t-sm);
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--field-line); border-radius: var(--r-sm);
}
:where(.plan-table, .fee-table, .dates-table, .review-table, .several-rows, .interview-type)
:where(input[type="text"], input[type="number"], input[type="date"],
       input[type="month"], input[type="search"], input[type="email"],
       input[type="password"], input[type="tel"], input[type="url"],
       input:not([type]), select, textarea):where(:not(table.grid *, .driver-grid *, .lines-table *))::placeholder { color: var(--muted-2); }
:where(.plan-table, .fee-table, .dates-table, .review-table, .several-rows, .interview-type)
:where(input[type="text"], input[type="number"], input[type="date"],
       input[type="month"], input[type="search"], input[type="email"],
       input[type="password"], input[type="tel"], input[type="url"],
       input:not([type]), select, textarea):where(:not(table.grid *, .driver-grid *, .lines-table *)):where(:hover:not(:disabled)) {
  border-color: var(--muted-2);
}
:where(.plan-table, .fee-table, .dates-table, .review-table, .several-rows, .interview-type)
:where(input[type="text"], input[type="number"], input[type="date"],
       input[type="month"], input[type="search"], input[type="email"],
       input[type="password"], input[type="tel"], input[type="url"],
       input:not([type]), select, textarea):where(:not(table.grid *, .driver-grid *, .lines-table *)):where(:focus) {
  outline: 2px solid var(--accent); outline-offset: -1px;
  border-color: var(--accent);
}
:where(.plan-table, .fee-table, .dates-table, .review-table, .several-rows, .interview-type)
:where(input[type="text"], input[type="number"], input[type="date"],
       input[type="month"], input[type="search"], input[type="email"],
       input[type="password"], input[type="tel"], input[type="url"],
       input:not([type]), select, textarea):where(:not(table.grid *, .driver-grid *, .lines-table *)):where(:disabled) {
  background: var(--surface-2); color: var(--muted); cursor: default;
}

/* -- the label above the field -------------------------------------------- */
/* a label that wraps a checkbox or a radio is a ROW, not a stack, and keeps
   whatever its own family gave it */
:where(.access-body, .form-grid, .pw-form, .setup-form, .settings-shell,
       .ov-panel, .signoff-form)
:where(label:not([hidden]):not(:has(> input[type="checkbox"],
                                     > input[type="radio"]))) {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: var(--s-1); font-size: var(--t-sm); font-weight: 550; color: var(--ink-2);
  /* `1fr` is `minmax(auto, 1fr)`: without this the column can never be
     narrower than an <input>'s 20-character intrinsic width plus the kit's
     padding, and a two-column pop-out runs out past the panel, which clips */
  min-width: 0;
}
:where(.access-body, .form-grid, .pw-form, .setup-form, .settings-shell,
       .ov-panel, .signoff-form)
:where(label) > :where(input, select, textarea, .mp) {
  align-self: stretch; max-width: 100%;
}
:where(.access-body, .form-grid, .pw-form, .setup-form, .settings-shell,
       .ov-panel, .signoff-form)
:where(label) > :where(.muted),
:where(.access-body, .form-grid, .pw-form, .setup-form, .settings-shell,
       .ov-panel, .signoff-form) :where(.field-help) {
  font-size: 12px; font-weight: 400; color: var(--muted);
}

/* -- ONE FOCUS RING ------------------------------------------------------- */
/* for everything interactive that has none of its own; anything that designs
   its own ring (.dq-row, .drag-handle, a.lg-flag, .cite, the chart's hit
   areas) outranks this and is untouched. The radius is declared at ZERO
   specificity, so a control with a radius of its own keeps it and only a
   control with none gets a rounded ring — no shape jump on focus. */
:where(a:focus-visible, button:focus-visible, summary:focus-visible,
       [role="button"]:focus-visible, [tabindex]:focus-visible) {
  border-radius: var(--r-sm);
}
:where(.access-body, .access-panel, .access-foot, .form-grid, .ctrl-row,
       .pw-form, .setup-form, .list-toolbar, .ov-panel, .signoff-form,
       .fee-rows, .plan-block)
:where(button:not([class]):not([hidden])):where(:not(table.grid *, .driver-grid *, .lines-table *)) {
  min-height: var(--ctl-h); padding: 0 14px; border-radius: var(--r-md);
  font: inherit; font-size: var(--t-table); font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--field-line);
  color: var(--ink);
}
:where(.access-body, .access-panel, .access-foot, .form-grid, .ctrl-row,
       .pw-form, .setup-form, .list-toolbar, .ov-panel, .signoff-form,
       .fee-rows, .plan-block)
:where(button:not([class]):not([hidden])):where(:hover:not(:disabled)) {
  border-color: var(--accent); color: var(--accent);
}
/* quiet: there has never been a base `.linklike` rule, so a quiet button
   rendered as a raw browser button wherever a family had not written one.
   NOT inside the three tables whose rows the grid's JS measures: `+ add line`
   wears `.linklike` in a `table.grid` section band, and taking the browser's
   chrome off it shortened every band and moved every row on the P&L. */
:where(.linklike):where(:not(table.grid *, .driver-grid *, .lines-table *)) {
  -webkit-appearance: none; appearance: none;
  border: 0; background: transparent; padding: 0; margin: 0;
  font: inherit; color: var(--accent); text-align: inherit; cursor: pointer;
}
:where(.linklike):where(:not(table.grid *, .driver-grid *, .lines-table *)):where(:hover) {
  text-decoration: underline;
}
:where(.access-body, .access-panel, .access-foot, .form-grid, .ctrl-row,
       .pw-form, .setup-form, .list-toolbar, .ov-panel, .signoff-form,
       .fee-rows, .plan-block)
:where(button:not([class]):not([hidden])):where(:disabled) {
  background: var(--track); color: var(--muted); border-color: var(--track);
  cursor: default;
}

/* --- 2. ONE SIZE for the controls that change this page -----------------
   the year stepper, the window toggle, the statement tabs, the branch
   picker, the download pill and the pressed chips sat at 28, 31 and 34px on
   one row, at two radii. They are all one control height now. */
:where(.page-controls, .page-side) { gap: 8px; }
/* a pill that is now a control height needs its ink centred in it */
:where(.page-controls, .page-side) :where(.chip, .grid-dl) {
  display: inline-flex; align-items: center;
}

/* --- 3. A BODY THAT IS CUT SAYS SO ---------------------------------------
   The New metric pop-out at 1440x900 ends on a half-clipped select with no
   rule, no shadow and no submit in view, so the form reads as though it has
   none. The body scrolls; nothing said so.

   The cue is drawn by the content itself: two `--surface` covers attached to
   the SCROLLING content, and two shades pinned to the BOX. At the top of the
   scroll the cover sits over the shade and hides it; as the content moves the
   cover goes with it and the shade appears. It cannot lie — where there is
   nothing to scroll, the covers never move. */
/* The FIRST attempt was the `background-attachment: local` technique on the
   body itself. It renders, and it is invisible: every field inside a pop-out
   paints an opaque `--surface` ground over the container's background, so the
   shade at the cut edge sat behind the very select it was meant to point at.
   The cue has to paint ABOVE the content, which means a positioned child.

   Two sticky strips, one at each end of the scroller, faded by the scroll
   itself: at the top of the scroll the top strip is at zero and the bottom
   one is at full, and each crosses over in the last 12px of travel. Where
   there is nothing to scroll the timeline is inactive, the animation never
   applies, and both strips stay at the `opacity: 0` they are declared with —
   so the panel can never claim a fold it does not have. A browser without
   scroll-driven animations gets no strips at all rather than two that lie. */
@keyframes kit-shade-top { from { opacity: 0; } to { opacity: 1; } }
@keyframes kit-shade-bottom { from { opacity: 1; } to { opacity: 0; } }
.help-head .help-close .ico { vertical-align: 0; }
/* the way back leads the head from the left (the dialog's close button sits
   at the right by an auto margin, which would push the tags there too), and
   the dollars start where the title does */
.dqd > .dqm-head > .dqd-back { margin-left: 0; }
.dqd > .dqm-meta > .dq-amount { margin-left: 0; }
.rail-foot .help-btn > span:not([hidden]),
.rail-foot .help-about > span:not([hidden]) { display: inline-flex; align-items: center; }
.rail-foot .help-btn > span:first-child,
.rail-foot .help-about > span:first-child { color: var(--muted); }
th.fc .col-head .month-tag { padding: 0 5px; border-radius: 4px;
  font-weight: 600; background: var(--fc-bg-hover); }

/* ONE COLUMN, ONE KIND OF FIGURE. A counted figure was drawn in `--accent`,
   so the rows a formula or a contract fills read as a different table from
   the rows a person types, on a surface whose point is that they are the
   same counts. The figure takes the column's ink; the dotted rule alone
   says there is a breakdown, and it turns to the accent under the pointer
   or the keyboard (Attio: the control is quiet at rest). The row header's
   `.computed-badge` still names the rows, once per row. */
.driver-grid td.num .computed-cell { color: var(--ink); }
.fx-add .setup-form > label .muted { font-weight: 400; }
.contracts-table td.num > .muted { white-space: normal; }

/* --- 7. THE ROW ACTIONS ---------------------------------------------------
   The pencil opens the whole contract and was a 14px grey glyph with no
   target; the trash beside it on some tabs changed the column's width. Both
   are the kit's quiet icon button — a 24px target (the WCAG 2.2 minimum),
   `--ink-2` at rest, the accent under the pointer, the kit's ring — and the
   pencil keeps ONE place on every row: where there is no trash, its slot is
   held empty rather than letting the pencil slide into it. */
.contracts-table td.row-actions .icon-btn {
  width: 24px; height: 24px; padding: 0; font-size: 15px;
  border: 1px solid transparent; border-radius: var(--r-sm); color: var(--ink-2);
}
.contracts-table td.row-actions .icon-btn,
.contracts-table td.row-actions .inline-form { vertical-align: middle; }
.contract-panel :is(.dates-table, .fee-edit-grid, .fee-add-grid) input.month-input {
  border-color: var(--field-line); border-radius: var(--r-sm);
}
/* the per-unit preview line was a 15px paragraph among 12.5px helpers */
.contract-panel .unit-pricing p.muted { font-size: var(--t-sm); line-height: 18px; }

/* --- 3. ONE FOOTER FOR THE THREE POP-OUTS --------------------------------
   `.wiz-nav` is the New contract's foot: a hairline, the surface, the primary
   at the right, pinned to the bottom of the scrolling body while a stage runs
   long (it is a descendant of the form, so it sticks inside the body; in the
   help pictures' unclipped frame nothing scrolls and it sits where it is). */
.contract-panel .access-body:has(> form[data-stages]) { padding-bottom: 0; }
.contract-panel .plan-table :is(th, td).num { padding-right: 12px; }
.contract-panel .plan-table td.plan-cost, .contract-panel .plan-table td.staff-cost {
  color: var(--ink-2); font-size: var(--t-sm);
}
.ledger-filter :is(input[type="date"], .list-search):hover { border-color: var(--muted-2); }
.ledger-filter :is(input[type="date"], .list-search):focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
.ledger-filter button[type="submit"]:hover {
  background: var(--accent-fill); color: var(--on-accent); border-color: var(--accent-fill);
}
.ledger-table td.num > .muted { color: var(--muted-2); }
.ledger-table td.row-actions > .muted { margin-right: 6px; font-size: 12px; vertical-align: middle; }
.gl-form > .gl-pair > label:not([hidden]) {
  display: grid; grid-template-columns: 7.5rem minmax(0, 1fr);
  align-items: center; column-gap: 12px; margin: 0;
  font-size: var(--t-sm); font-weight: 600; line-height: 18px; color: var(--ink-2);
}
/* the h1's line box and the menu's first group label start on one top edge */
.settings-shell > .page-head.suite { margin: 0 0 20px; min-height: 0; }
.settings-shell > .page-head.suite h1 { line-height: 25px; }
.settings-menu a.active:hover { background: var(--surface-2); color: var(--accent); }
.set-block > .tablewrap > table.attest-table {
  border: 0; border-radius: 0; box-shadow: none; overflow: visible;
}
.set-block-body label.span2 > .muted { margin-top: 2px; }
.set-block table.version-table > * > tr > :first-child { padding-left: 20px; }
.set-block table.version-table > * > tr > :last-child { padding-right: 12px; }
.version-table td.col-date .muted { display: block; font-size: 11.5px; }
/* a sub-P&L and a module sit one step in under their parent, drawn by an
   elbow in the stylesheet — never a glyph, which Windows paints as a warm
   colour emoji (the four-colour rule gives warm to attention) */
:is(.branch-table, .catalog-table) tr.child-row > td:first-child { position: relative; }
:is(.branch-table, .catalog-table) tr.child-row > td:first-child::before {
  content: ""; position: absolute; left: 28px; top: 0; width: 9px; height: 50%;
  border-left: 1px solid var(--muted-2); border-bottom: 1px solid var(--muted-2);
  border-bottom-left-radius: 3px; pointer-events: none;
}
/* the Company tab's rows (SPEC 6.149): the Access block's two adds wrap at
   the head's right; a setting's name keeps a fixed share of the row */
.set-block-head > .co-adds:not([hidden]) {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-2); flex: 0 1 auto;
}
:is(.set-codes, .set-metrics, .set-fees, .set-avg) > .set-block-head > :is(button, .btn-secondary) {
  grid-column: 2; grid-row: 1; align-self: start; white-space: nowrap;
}

/* the codes head: the title and its two counts on one baseline — the counts
   are figures, so they read as figures */
.set-codes > .set-block-head > .set-block-title {
  display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 12px;
}

/* AN INACTIVE ROW IS MUTED INK, never faded: opacity took an available
   code's name and figures under the contrast floor in both themes. The same
   rule on the three tables of this family. */
table:is(.codes-table, .series-manage, .fees-table) tbody tr.inactive-line > :is(td, th) {
  opacity: 1; color: var(--muted);
}
table:is(.codes-table, .series-manage, .fees-table) tbody tr.inactive-line strong { color: var(--muted); }
.set-codes .codes-legend .legend-item {
  display: grid; grid-template-columns: 13.5rem minmax(0, 1fr);
  align-items: baseline; column-gap: var(--s-3);
  padding: 6px 0; border-top: 1px solid var(--line-soft);
}
[id^="modal-fee-"] .rate-add > .mp { display: inline-flex; margin: 0; }
.wiz-step .attest-form input:hover { border-color: var(--muted-2); }
.wiz-step .attest-form input:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
.report-actions > a.primary:hover { border-color: var(--accent-fill-hover); }
.board-toolbar > a:first-child:hover { text-decoration: underline; }

/* --- 5. AN INACTIVE ROW'S NAME IS MUTED TOO ----------------------------------
   The shell's inactive-row rule muted the cells but not the row's header, so
   a deactivated contract kept its name in full ink (the list tables' own
   `th[scope="row"]` ink outranks a bare `th`). Every list table's row header
   now reads muted with its row; a badge, a tag and a status control keep
   their own state colour (family 5's grammar). The settings and admin
   tables already said this locally. */
tr.inactive-line > th,
table.dt tbody tr.inactive-line > th[scope="row"] { color: var(--muted); }

/* -- 8. EVERY PLACEHOLDER CLEARS 4.5:1 ------------------------------------------
   `--muted-2` was 3.4:1 against its field in both themes, on every form;
   `--muted` is about 5:1 in both. The shared rules and each local one. */
::placeholder { color: var(--muted); opacity: 1; }
table.grid tbody tr:hover td, table.grid tbody tr:hover th { background: var(--surface-2); }
table.grid tbody tr:hover td.line-col,
table.grid tbody tr:hover th.line-col { background: var(--surface-2); }
table.dt tbody tr:hover td, table.dt tbody tr:hover th[scope="row"] { background: var(--surface-2); }
#imported-charges > h3 .muted { font-weight: 400; }
#imported-charges .assign-bar > label {
  display: inline-flex; flex-direction: column; gap: var(--s-1); min-width: 0;
  font: 550 var(--t-sm)/16px var(--sans); color: var(--ink-2);
}
body.ov-edit #ov-widgets { margin-right: min(400px, calc(100vw - 32px)); }
#league-card table.league > thead > tr > th { padding-bottom: 9px; }
#series-manage th.col-act { width: 76px; }
#series-manage .metric-name > strong {
  grid-column: 3; grid-row: 1; font-weight: 600; line-height: 20px; overflow-wrap: anywhere;
}
/* the provenance and the per-hour figure wrap as a unit, inside their own
   column, never letter by letter */
#series-manage td.metric-kind { line-height: 18px; }
#series-manage td.num { white-space: normal; line-height: 18px; }
/* pencil and trash quiet at rest, full ink with the row, the trash set a
   step apart; where an inactive metric has no pencil its slot stays empty */
#series-manage td.row-actions { font-size: 0; text-align: right; padding: 0 8px 0 4px; }
#imported-charges .assign-bar select {
  height: var(--ctl-h); max-width: 100%; padding: 0 11px;
  border: 1px solid var(--field-line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); font-size: var(--t-table); font-weight: 400;
}
#imported-charges > form:last-child > p { margin: 0 0 var(--s-2); font-size: var(--t-sm); line-height: 18px; }
#modal-gl-import .gl-steps li { display: flex; align-items: center; margin: 0; padding: 0; }
#modal-gl-import table.gl-map { table-layout: fixed; width: 100%; box-shadow: none; }
/* the preview: a quiet disclosure, its table in a bordered scroller */
#modal-gl-import details.gl-preview > summary {
  display: inline-flex; align-items: center; gap: 7px; list-style: none;
  margin: 0 -6px; padding: 4px 6px; border-radius: var(--r-sm);
  font-size: var(--t-sm); font-weight: 600; line-height: 18px; color: var(--muted);
}
#modal-gl-import .gl-undo-form > label > :is(select, input) {
  display: block; box-sizing: border-box; width: 100%; max-width: none; margin-top: 4px;
}
#stepper li.active { color: var(--ink); }
#stepper li.done { color: var(--ink-2); }
#new-codes th:first-child, #new-codes td:first-child { width: 64px; }
#new-codes thead th:nth-child(2) { width: 80px; }
#new-codes thead th:nth-child(4), #new-codes thead th:nth-child(5) { width: 22%; }
#new-added thead th:first-child { width: 80px; }
#new-added thead th:nth-child(3) { width: 96px; }

.settings-head > button, .settings-head > form > button { flex: none; white-space: nowrap; }
/* sentence-case headers with the definition as a sub-label, never a title
   attribute (F10) — and never a 10.5px uppercase label (F21) */
table.grid thead th.sum-col { font-size: 11px; font-weight: 600; color: var(--muted);
  text-transform: none; letter-spacing: 0; white-space: normal; line-height: 1.25;
  padding: 6px 8px; }

/* --- the columns: the account NAME comes first (F13) ------------------ */
table.grid thead th[data-month] { width: 96px; min-width: 96px; padding: 7px 6px; }
.contract-steps li > button { display: block; width: 100%; text-align: left; padding: 9px 12px 9px 40px;
  background: none; border: 0; font: inherit; color: inherit; cursor: pointer; border-radius: 8px; }
table.gl-codes select { max-width: 220px; }
.driver-grid tbody tr { height: 34px; }
.contract-steps li > button {
  display: inline-block; flex: 0 1 auto; min-width: 0; width: auto; min-height: 32px;
  margin: 0 0 0 4px; padding: 6px; border: 0; border-radius: var(--r-sm);
  background: none; color: inherit; text-align: left;
  font: inherit; font-size: var(--t-sm); font-weight: 600; line-height: 20px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Family 8, section A of the Mobbin redesign: LOOK, LAYOUT and HIERARCHY on
   Close the month (`attest.html`) and the monthly report's page
   (`report.html`). No word changes, no hook moves, and every colour is a
   token with a dark value. Two owner decisions of 2026-09-24 are the
   exceptions, and both are in the templates: the publish form sits ABOVE the
   folded lock schedule, and the Change column takes the true minus
   (`money0_delta(minus=True)`).

   THE CLOSE ON ONE MEASURE (Deel, Gusto): three widths stacked down one
   column — the figures at 720px, the warning at the pane's 1150px, the form
   at 520px — and nothing shared a right edge. Every block is one 760px
   column now (the inline max-widths are gone from the template), and every
   block is a card of the family 7 idiom: the figures, the readiness (the
   gates the signer reads, with the warning as its last band), the branch
   readiness, the publish form with its action in a foot, the schedule.

   THE SECOND SIGNATURE (Aboard, Remote) is a two-row trail — the request, in
   the muted state outline, then the wait, in attention; never green, which
   is the ahead mark.

   THE REPORT keeps its paper (held until its PDF moves): its action row takes
   the board toolbar's shape — Print the secondary, Download PDF the one
   primary, at the sheet's right edge, the caption under the bar.

   PINNED AND UNTOUCHED: `.close-month .tablewrap` is still the five figures
   (a help picture crops the first one); `form.attest-form`, `.close-warn`,
   `p.notice.ok`, `p.notice.warn`, `details.lock-list` and
   `table.attest-schedule tfoot` still frame what they framed;
   `.report-actions a.primary { display: inline-block; background:
   var(--accent-fill)` is edited IN PLACE with that opening kept; this block's
   media queries use the range form only. */

/* --- 1. ONE COLUMN --------------------------------------------------------- */
main:has(> section.close-month) > * { max-width: 760px; }
fieldset.status-pick:not([hidden]) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px; }
.viz-foot > details.viz-table { min-width: 0; }
.contract-steps li:not(:last-child) { flex: 1 1 auto; }

/* THE ACTIONS ARE QUIET AND NEVER HIDDEN (lead decision): reverse and delete
   are the page's consequential acts, so the three icons stay in view — at
   `--muted-2` in a fixed slot, full ink on the row under the pointer or
   holding the keyboard, the accent under the pointer itself (never the red
   of a loss). The slot is three 24px targets wide on every row, right-
   aligned, so a trash is always in the same place. The column's header is
   sr-only; its ground is the surface and its rule is gone, so the header's
   band ends at Credit's right edge, as do the two foot rules. */
.ledger-table th.col-act {
  width: 80px; padding: 0 8px 0 4px; background: var(--surface); border-bottom-color: transparent;
}
.ledger-pager > a.lp-step {
  display: inline-flex; align-items: center; height: var(--ctl-h-sm); padding: 0 10px;
  border: 1px solid var(--field-line); border-radius: var(--r-md); background: var(--surface);
  font: 600 var(--t-sm)/1 var(--sans); color: var(--ink); text-decoration: none;
}

/* --- 2. THE JOURNAL IS A PAIR (QuickBooks Split, the conservative reading) -
   The form is a wrapping flex row rather than the two-column grid: a grid
   item is its own sticky container, so a foot inside a grid cannot stick. */
.access-body > form.gl-form {
  display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: 20px;
}
.dqd-act form > button, .dqd-act .dqm-drop > summary { width: 100%; }
.dqd-notes .dqm-record input { min-width: 0; }

table.grid th.line-col, table.grid td.line-col { padding-left: 20px; padding-right: 16px;
  width: 252px; max-width: 252px; }
.driver-grid td.num:not(:has(input)) { padding: 6px 10px; }
table.grid th.fc, table.grid td.fc { background: var(--fc-bg); }
.codes-table tr.cat-row td { background: var(--bg); border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line); padding: 8px 12px; }
.dm-tbl tr:last-child th, .dm-tbl tr:last-child td { border-bottom: 0; }
table.dt tr.empty td { color: var(--muted); height: 44px; }

/* --- the year's answer, always on screen (F6) ------------------------ */
/* ONE summary column pins to the RIGHT edge — Year total, the year's
   answer — exactly as the line column pins to the left. Pinning all three
   cost 336px of the window, which is nearly FOUR MONTHS (review 2026-09-08,
   N1 trade-off): YTD actual and Remaining forecast scroll with the months
   they are made of, and are read at the end of the year, where they sit. */
table.grid th.sum-col, table.grid td.sum-col { z-index: 1;
  width: 112px; min-width: 112px; max-width: 112px; background: var(--sum-bg);
  padding: 0 8px; }
/* 120px, not 106: at 106 the answer column's sub-label broke after "as" and
   left "shown" alone on a fourth line — the one header the redesign says is
   always on screen (review 2026-09-08, S14). It still leaves eight months at
   1440 and five at 960. */
table.grid th.sum-t, table.grid td.sum-t { position: sticky; right: 0;
  width: 120px; min-width: 120px; max-width: 120px; padding: 0 6px;
  box-shadow: -7px 0 7px -7px rgba(22, 22, 29, .18); }
.driver-grid thead th.num { text-align: right; }

/* -- hierarchy: group bands, subtotals and the foot ---------------------- */
.list-table tr.group-row td, .attest-table tr.group-row td {
  background: var(--bg); font: 600 var(--t-label)/1.3 var(--sans); color: var(--muted);
  letter-spacing: .02em; }
/* the last body row's own bottom border must go, or a collapsed table breaks
   the ink rule under the row-header column: 1.5px rounds to 1 device pixel,
   and the tie goes to the cell above */
.attest-table tbody tr:last-child th[scope="row"],
.list-table tbody tr:last-child th[scope="row"] { border-bottom: none; }
.attest-table tr.subtotal td, .list-table tr.subtotal td {
  font-weight: 600; background: var(--surface-2); }
.attest-table tr.empty td, .list-table tr.empty td { color: var(--muted); }

/* -- ledger: journal legs read as one entry ------------------------------ */
.ledger-table tr.group-row td, .ledger-table tr.group-row th { background: var(--surface-2); color: var(--ink);
  font: 600 12.5px/1.3 var(--sans); letter-spacing: 0; }

/* ==== THE LIST TABLES, FOURTH PASS (2026-09-08) ==========================
   Rules from the fourth review's list-tables report. Each has to WIN the
   cascade — the primitives above declare the same properties — so they carry
   the dialect in the selector and sit at the end of the file. */

/* F15 — THE TOTAL ROW'S NAME IS A ROW HEADER. Every line row in the report is
   a `th scope="row"` and the total row — the one a screen reader most needs
   named — was a bare `td`. A tfoot `th` would otherwise inherit the COLUMN
   header's 11.5px muted type from `.attest-table th`. */
.attest-table tfoot th[scope="row"], .list-table tfoot th[scope="row"] {
  font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: 0;
  text-transform: none; color: var(--ink); text-align: left;
  border-top: 1.5px solid var(--ink); border-bottom: 0; background: var(--surface); }
.attest-table tfoot tr:hover th[scope="row"],
.list-table tfoot tr:hover th[scope="row"] { background: var(--surface); }
.contract-panel .ctrl-row > label > select { align-self: stretch; width: 100%; }
.review-table tr.review-sub td { color: var(--muted); }
.review-table tr.total th, .review-table tr.total td { font-weight: 700; border-top: 1.5px solid var(--ink); }

/* ==== Phase B: the month close (2026-09-17, SPEC §6.52) ================
   A PLACEHOLDER ZERO SAYS SO (M-3). The 0.00 the bulk "Fill blanks" wrote
   is not a posted figure, and on the grid it read exactly like one. It
   takes this product's own "there is an explanation here" mark — the
   dotted rule the computed cells and the two non-absent states wear
   (SPEC §6.37) — in the muted ink, so a posted zero and a placeholder are
   told apart without a colour that means something else. */
table.grid td.num input[data-ph] { color: var(--muted);
  text-decoration: underline dotted var(--muted); text-underline-offset: 3px;
  cursor: help; }
.contracts-table > thead th:first-child { width: 17rem; }
.contracts-table > thead th:nth-child(2) { width: 10rem; }
.contracts-table > thead th.col-date { width: 6rem; }
.contracts-table > thead th.num { width: auto; }
.contracts-table > thead th.col-act { width: var(--bk-act-w); }
.gl-form > details.gl-repeat > summary {
  display: inline-flex; align-items: center; gap: 7px; list-style: none; cursor: pointer;
  margin: 0 -6px; padding: 4px 6px; border-radius: var(--r-sm);
  font-size: var(--t-sm); font-weight: 600; line-height: 18px; color: var(--ink-2);
}
.attest-table tfoot tr:hover td, .list-table tfoot tr:hover td { background: var(--surface); }
.access-table tbody tr:hover td, .access-table tbody tr:hover th { background: var(--line-soft); }
#modal-gl-import .access-body > form { display: contents; }
:is(#modal-metric-new, [id^="modal-metric-"]) label:has(> select[data-metric-insert]) > input[name="formula"] {
  grid-column: 1; grid-row: 2; width: 100%; min-width: 0;
}
:is(#modal-metric-new, [id^="modal-metric-"]) label:has(> select[data-metric-insert]) > select[data-metric-insert] {
  grid-column: 2; grid-row: 2; margin: 0; width: auto; max-width: 220px;
}

.legend .key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.widget-rows .tie-row small { display: block; font-size: 11px; line-height: 1.2; }
/* a league cell carries a figure and a sub-line under it: the cells align to
   the TOP and grow with their content, where a `dt` row is one 34px line.
   (These few carry `dt` in the selector so the dialect out-ranks the
   primitive wherever the two are declared.) */
table.dt.league td, table.dt.league tbody th[scope="row"] { padding: 8px 8px;
  height: auto; vertical-align: top; }
.figures.ytd th, .figures.guard th { width: auto; }
body.ov-edit .ovw-bar { display: flex; }
.console-table th.company { min-width: 15ch; }
.console-table th:first-child, .console-table td:first-child { padding-left: 14px; }
.console-table th:last-child, .console-table td:last-child { padding-right: 14px; }
/* room above each widget for the control that now overlaps its top edge */
body.ov-edit .ov-widgets { row-gap: 30px; padding-top: 8px; }
/* the name column asks for the slack; every other column is as wide as what
   it prints. The percentage is a PREFERENCE, not a cap: a company whose name
   runs longer than a quarter of the table wraps inside its column instead of
   pushing every figure off the right edge, which is what letting it wrap is
   for. */
/* (widened after the review, 2026-09-22 — see section C, rule 7: 27% / 17ch
   narrowed the name column instead of widening it, and a 38-character demo
   company wrapped onto a second line at 1440) */
.console-table th.company { width: 30%; min-width: 22ch; }

/* --- 4. THE LEAGUE ON THE OVERVIEW CARD --------------------------------
   Scoped to `#league-card`, which only the Overview renders: the board page
   and the PDF print the same partial and are a later family's. */
/* the table's first and last columns share the card's own left and right
   edge, so the branch names start under the card's title instead of 8px
   inside it — and the nine columns get those 16px back */
#league-card table.league > thead > tr > *:first-child,
#league-card table.league > tbody > tr > *:first-child { padding-left: 0; }
#league-card table.league > thead > tr > *:last-child,
#league-card table.league > tbody > tr > *:last-child { padding-right: 0; }

/* --- 7. THE STRAGGLER TABLES, ONE GRAMMAR -------------------------------- */
/* branches: the three words of "Reports as" read down one muted column */
.branch-table th.col-reports, .branch-table td.col-reports { width: 13rem; }

/* -- 6. THE PICKERS' GO ----------------------------------------------------
   the branch picker gained a Go and wrapped the branch view's head at 1440
   (799px of controls in 775): the select is capped, a long name is still
   whole in its list. The month's Go is a 24px target like the controls
   beside it. */
form.branch-bar .branch-pick { max-width: 200px; }
.console-table td.col-top { min-width: 20ch; max-width: 24ch; }

/* two more columns (SPEC §6.104) fit the 1440 page: the company column gives
   up its 30% to a floor, and the top insight wraps inside its own width */
.console-table th.company { width: auto; min-width: 15ch; }

.several-rows td[data-col="customer"], .several-rows td[data-col="label"] { min-width: 12rem; }
.set-block > .tablewrap > table { flex: 1 0 auto; }
.codes-filter input[type="search"] { flex: 1; max-width: 340px; border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 12px; font: inherit; font-size: 13.5px; background: var(--surface); }
.rate-add input[name="rate"] { width: 90px; }
table.grid .badge { vertical-align: 1px; }
/* A BALANCE is a bigger number than a month of flow — a warehouse line runs
   to eight figures — and the balance sheet has no summary block to make room
   for, so its months are 104px: enough for 23,985,500.00, which 96px cut to
   "23,985,500.0". Eight months still read at 1440. */
table.grid.bs-grid thead th[data-month] { width: 104px; min-width: 104px; }
.attest-table th .th-sub { display: block; font-weight: 400; font-size: 11px;
  letter-spacing: 0; text-transform: none; }

/* -- the attest schedule: the balance-sheet bands start under their own rule */
/* 2px, not 1.5: a collapsed table rounds 1.5px to one device pixel and the tie
   goes to the cell ABOVE, whose --line-soft would win (the same trap the
   tfoot rule documents) */
.attest-table tr.statement-break td { border-top: 2px solid var(--ink);
  font: 600 var(--t-12)/1.3 var(--sans); letter-spacing: .02em; color: var(--muted);
  background: var(--surface); height: 30px; }

/* --- T3: the revenue trend gets the P&L's three treatments ----------- */
/* The tab pinned nothing, declared nothing, and sorted alphabetically: at
   1440 the whole visible table was em dashes and the year total — the
   table's answer, and the only figure a reader came for — was off screen,
   header included. It now takes the statement's own layout: fixed widths
   (declared above), the year column pinned to the right edge with the same
   gutter the P&L's block carries, and the clients sorted by what they earn
   (the grid handler, which leaves the engine's own order alone). */
.rev-trend th.year-col, .rev-trend td.year-col { position: sticky; right: 0; z-index: 1;
  width: 124px; min-width: 124px; max-width: 124px; padding: 9px 8px;
  background: var(--sum-bg); border-left: 1px solid var(--line);
  box-shadow: -7px 0 7px -7px rgba(22, 22, 29, .18); }
.access-table td.gg-role { width: 150px; min-width: 132px; }
/* the edit pop-out's control row: Client, Status and Size share the width
   (owner report 2026-09-11: the client dropdown ran across the whole panel) */
.contract-panel .ctrl-row > label { flex: 1 1 0; min-width: 0; }
.plan-block .plan-table select { width: 100%; max-width: none; }
.review-table th[scope="row"] { font-weight: 500; }
.signoff-form label.grow { flex: 1 1 220px; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
/* a column's definition sits UNDER its name, as in every other table of this
   family: the plan tables ran "Cost" and "a month" together into "COSTA
   MONTH" (and "FORMULAINSTEAD OF AN AMOUNT") */
.plan-table th .th-sub { display: block; font-weight: 500; font-size: 11px;
  letter-spacing: 0; text-transform: none; }
.auth-page .login-box input { width: 100%; min-height: var(--ctl-h);
  padding: 0 11px; margin-top: var(--s-1);
  font: inherit; font-size: var(--t-table);
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--field-line); border-radius: var(--r-md); }
/* quiet, and never `--err`: red is a loss and nothing else (SPEC 6.37) */
.sec-form button.linklike { min-height: var(--ctl-h); padding: 0 10px;
  display: inline-flex; align-items: center; border-radius: var(--r-md);
  font-size: var(--t-table); font-weight: 500; color: var(--muted); }
.calc-card .calc-cohort > summary { padding: 0; font-size: var(--t-sm); }
/* the kit's COMPACT field for a control inside a card */
.calc-card .cohort-retune input,
.calc-card .rate-add input {
  min-height: var(--ctl-h-sm); height: var(--ctl-h-sm); padding: 0 8px;
  font-size: var(--t-sm); color: var(--ink); background: var(--surface);
  border: 1px solid var(--field-line); border-radius: var(--r-sm);
}
.book-facts > .book-line strong {
  font-size: 15px; font-weight: 650; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.contracts-table > tbody .badge, .contracts-table > tbody .tag {
  line-height: 16px; vertical-align: top;
}
.contract-panel .fee-edit-grid input, .contract-panel .fee-edit-grid select,
.contract-panel .fee-add-grid input, .contract-panel .fee-add-grid select {
  min-height: var(--ctl-h-sm); border-color: var(--field-line); border-radius: var(--r-sm);
}
/* the edit pop-out's controls row and its type: the kit's field, one width */
.contract-panel .ctrl-row select {
  padding: 0 11px; font-size: var(--t-table);
  border-color: var(--field-line); border-radius: var(--r-md);
}

/* --- 9. THE SIGN-OFF (Airwallex / Aboard) --------------------------------
   The state leads (`--attn`, correctly: it asks for a person), who submitted
   it is a quiet line under it, and the note and the two acts share one row at
   the right. */
.contract-panel div.signoff {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  color: var(--ink-2); font-size: var(--t-sm); line-height: 1.5;
}
/* a band is a row: one rhythm down the register (the bands were 30px) */
table.dt.ledger-table tr.group-row > :is(td, th) { height: 34px; letter-spacing: 0; }
.set-block table.kpi-levels tbody th[scope="row"],
.set-block table.kpi-levels tbody td,
.set-block table.kpi-measures tbody th[scope="row"],
.set-block table.kpi-measures tbody td { height: 44px; padding-top: 6px; padding-bottom: 6px; }
.version-table th.col-name { width: 130px; }
.version-table th.col-date { width: 88px; }
.version-table th.vcov { width: auto; min-width: 0; }
.version-table th.col-cells { width: 44px; }
.version-table th.col-money { width: 104px; }
.version-table th.col-plan { width: 170px; }
.version-table th.col-status { width: 72px; }
.version-table td.tvn-name { white-space: normal; line-height: 18px; padding-top: 8px; padding-bottom: 8px; }
.version-table td.vcov { min-width: 0; padding-top: 8px; padding-bottom: 8px; line-height: 18px; }
table.codes-table .col-gl { width: 88px; }
table.codes-table .col-tags { width: 34%; }
table.codes-table .col-status { width: 140px; }
table.codes-table .col-used { width: 160px; }
/* the amount column holds its figure and the sub-lines under it */
.fees-table th.num { width: 200px; }
.fees-table th.col-act { width: 48px; }
.fees-table td.row-actions { text-align: center; padding: 0 6px; }
.wiz-step .attest-form input {
  box-sizing: border-box; width: 100%; min-height: var(--ctl-h); margin: 0; padding: 0 11px;
  font: inherit; font-size: var(--t-table); font-weight: 400; color: var(--ink);
  background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--r-md);
}
.wiz-step .new-units legend { margin: 0 0 var(--s-1); padding: 0; font-weight: 600; }
.close-ready > .close-warn ul { margin: 0 0 8px; padding-left: 18px; }
.close-branches > p.muted {
  margin: 0; padding: 12px 20px 14px; border-top: 1px solid var(--line);
  font-size: var(--t-sm); line-height: 19px;
}
.report-actions > button.linklike {
  order: 1; padding: 0 14px; background: var(--surface);
  border: 1px solid var(--field-line); color: var(--ink);
}
.proposal-sheet .sheet-tbl th {
  padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: bottom;
  font: 600 var(--t-label)/1.3 var(--sans); letter-spacing: .02em; text-transform: none;
  color: var(--muted); text-align: left;
}
.proposal-sheet .sheet-tbl td {
  height: 34px; padding: 0 10px; border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.scn-lever-table td.scn-set { padding-top: 0; padding-bottom: 0; }
.audit-filter > .af-what > select {
  flex: 0 1 auto; width: auto; min-width: 0; max-width: 13rem; padding: 0 8px 0 11px;
}
/* the head's one action keeps the title's first line */
.admin-sec > .set-block-head > :is(button, form) { flex: none; }
.admin-users select.role-select { width: 9.5rem; }

/* the 2FA column: the box that REQUIRES it for this person, at the kit's
   accent — never the brightest object on the row in dark — and the state
   beside it at a weight a person can read: set up, pending (attention: it
   is required and not done), or not set up */
.admin-users > * > tr > .tfa-col { width: 96px; text-align: left; }

/* --- 7. THE ACCESS EDITOR: WHAT EACH ROLE GRANTS --------------------------
   One sentence per role under the row's control (owner decision
   2026-09-24). All four are in the row; the one the select holds shows —
   `:has(option:checked)` follows a change with no script. The table's
   structure (one cell per column, the row header, the per-cell labels) is
   untouched. */
.access-table td.gg-role { width: 216px; }
.admin-tokens > * > tr > :last-child { padding-right: 20px; }
.admin-tokens td.row-actions { width: 1%; white-space: nowrap; text-align: right; }

/* EACH ROW A TWO-COLUMN GRID (Intercom, Vanta): the title and its summary
   take the width, the audiences drop to a line of their own under them, and
   "Walkthrough · 5 min" starts at ONE x on every row instead of wherever the
   badges before it ended. `.help-row-meta` stops being a box so its two
   parts can sit in the two places; the row is a door, and says so with the
   queue's CSS chevron (empty content: it reaches no reader as a word). */
a.help-row:not([hidden]) {
  display: grid; grid-template-columns: minmax(0, 1fr) 9.5rem;
  grid-template-areas: "main kind" "aud kind";
  column-gap: 24px; row-gap: 6px; align-items: start;
  position: relative; padding: 12px 46px 12px 18px;
}
a.help-row .help-row-kind {
  grid-area: kind; padding-top: 1px; line-height: 20px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* a list of states (the three a cell can be in, the verdict's four words):
   one bordered list, each state a row under a hairline */
.help-body dl.help-states {
  max-width: calc(68ch + 34px); padding: 2px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
}

/* EVERY WORD, ON THE LIST GRAMMAR: one card, a row per term under a hairline,
   the term in a column of its own and its meaning at the reading measure */
.help-body dl.help-terms {
  padding: 0 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
}
.pat-table td.pat-th { min-width: 30ch; text-align: left; }

.calc-card .rate-add form {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: 6px;
}
table.grid tbody tr:hover td.sum-col { background: var(--track); }

/* every data row is the same height, contents vertically centered */
table.grid tbody tr.line-row td, table.grid tbody tr.line-row th {
  height: 34px; box-sizing: border-box; vertical-align: middle; }
table.grid tbody tr:hover td.fc { background: var(--fc-bg-hover); }
table.grid tbody tr:hover td.fc { background: var(--fc-bg-hover); }
/* a printed sheet has no pointer: the row hover the `dt` primitive gives the
   app is not a behaviour a board packet has (review 2026-09-08, N15) */
.board-sheet table.dt tbody tr:hover td,
.board-sheet table.dt tbody tr:hover th[scope="row"] { background: none; }
table.dt tbody tr.group-row:hover td, table.dt tbody tr.total:hover td { background: inherit; }
table.grid td.num input { min-width: 0; padding: 0 4px; }
table.grid.rev-trend thead th.year-col { z-index: 3; }

/* --- V8: a computed row's definition wraps inside its own column ----- */
/* `td.line-col, table.grid tbody th.line-col { white-space: nowrap }` sent
   "Check · Total Assets − Total Liabilities and RE" straight across January's
   figures. The computed rows wrap instead, so a definition that does not fit
   beside its name takes a second line and the short one (Gross margin ·
   % of revenue) keeps the single line T14 gave it. */
table.grid tbody tr.computed th.line-col { white-space: normal; line-height: 1.25; }

/* --- V4 / V9: the answer column's sub-label, and the months off screen  */
/* the sub-label under a THEAD header is a block (it names the column's span);
   the one inside a row header stays inline, so the row keeps its height */
table.grid thead th.line-col .sum-sub, table.grid thead th.year-col .sum-sub {
  display: block; margin: 2px 0 0; font-weight: 400; }
table.grid.rev-trend thead th.year-col { font-size: 11px; font-weight: 600;
  color: var(--muted); white-space: normal; line-height: 1.25; vertical-align: bottom; }

/* F8 — ONE ANCHOR IN THE ATTEST FOOT. Six rows at 700 under six identical
   1.5px ink rules gave the signer six equal claims and buried the one they
   are looking for. The reconciling flows and the two sides are subtotals
   (600 on the fill, hairlines); one ink rule opens the block and one carries
   the Check, which is the only figure a step larger. */
.attest-schedule tfoot tr td, .attest-schedule tfoot tr th[scope="row"] {
  font-weight: 600; background: var(--surface-2); color: var(--ink);
  border-top: 0; border-bottom: 1px solid var(--line-soft); }
.attest-schedule tfoot tr:first-child td,
.attest-schedule tfoot tr:first-child th[scope="row"] {
  border-top: 1.5px solid var(--ink); }
.attest-schedule tfoot tr.total td, .attest-schedule tfoot tr.total th[scope="row"] {
  font-weight: 700; background: var(--surface);
  border-top: 1.5px solid var(--ink); border-bottom: 0; }
.attest-schedule tfoot tr:hover td, .attest-schedule tfoot tr:hover th[scope="row"] {
  background: var(--surface-2); }
.access-table td.gg-mod input { width: 15px; height: 15px; cursor: pointer; vertical-align: -2px;
  accent-color: var(--accent); }

/* --- 01-T1: a money cell is never narrower than its figure ---------- */
/* `.driver-grid td.num input` was 74px wide with 10px of padding a side: 54px
   for a string that needs 92px, so every cell of the branch's Funded volume
   row printed `6,930,00` — a seven-figure amount with its last characters cut
   off, on the surface where it is typed. `text-overflow` does not apply to an
   input, so the width is the only guard. The cell takes the statement's own
   floor (92px of ink at 13px tabular, the widest balance this product prints,
   plus the padding) and the table then scrolls with the off-screen counter
   and the edge fade the consolidated page already had. */
.driver-grid td.num { min-width: 96px; }
.driver-grid td.num input { min-width: 96px; padding: 0 2px; }
/* the badge rides a `.line-tools` wrapper that never shrinks, so the words
   ran off the column instead of wrapping inside it */
table.grid tbody tr.section-total th.line-col,
table.grid tbody tr.section-total td.line-col { white-space: normal; }
.calc-card .cohort-retune input { width: 96px; }

/* ---- BRANCHES CASH (2026-09-30): where the roll stops, said in the cell -----
   A company's cash can roll from profit — a branches company's from the
   branches' combined profit, on the company's balance sheet (SPEC §6.80).
   Where the roll stops, or cannot start, the cash line SAYS so under its
   state — text on the screen, never only a title. The row header is
   `nowrap`, which would run the sentence across the months, so it wraps at
   the column's own width (300 / 240 / 200px), in the footnote's size and
   ink, on whole-pixel lines so every row under it keeps its pixel phase.
   Only this row grows, and not on hover: the sheet does not move when the
   row's controls appear.
   THE SWITCH IS REACHABLE BY KEYBOARD: where the row has nothing else to
   focus — the consolidated balance sheet, whose cells take no tab — the act
   (`.at-rest`) stays on screen at rest instead of waiting for a hover or a
   focus inside the row, and the cluster keeps its rest width on hover, so
   CASH and REQ share the first line over the act and the name never wraps
   when the pointer arrives. */
table.grid tbody th.line-col .cash-stop {
  display: block; margin: 2px 0 4px; white-space: normal; overflow-wrap: break-word;
  text-wrap: pretty; font-size: 11px; font-weight: 400; line-height: 14px;
  letter-spacing: 0; color: var(--muted); }

/* ON A READING PAGE A SHARED COMPONENT TAKES THE SCALE'S SIZE (SPEC §6.180).
   These rules are written for components other pages also draw, so the
   component's own rule is left as it is and every other page with it. */
main.page-reading table.dt th .th-sub { font-size: var(--t-12); }

@media (pointer: coarse) {
  .contracts-table td.row-actions .icon-btn { width: var(--ctl-h-sm); height: var(--ctl-h-sm); }
}

@media (width <= 1300px) {
  .contracts-table > thead th:first-child { width: auto; }
}

@media (max-width: 1240px) {
  table.grid thead th.line-col, td.line-col, table.grid tbody th.line-col { min-width: 200px; }
  /* the month keeps its width on the half screen: 84px would hold the header
     but clip a seven-figure amount inside its own cell, which is the defect
     the pinned block's gutter exists to prevent */
  table.grid thead th[data-month] { width: 96px; min-width: 96px; padding: 7px 4px; }
}

/* `table.dt tbody th[scope="row"]` is (0,2,3): the cells are addressed as
   `:is(th, td)` so the card's inset reaches the row headers too */
table.dt.close-figs > * > tr > :is(th, td) { padding-left: 12px; padding-right: 12px; }
table.dt.close-figs thead th { padding-top: 12px; padding-bottom: 8px; }
form.attest-form > label > :is(input[type="date"], input[type="text"]) {
  height: var(--ctl-h); margin-top: 0; padding: 0 11px;
  font-size: var(--t-table); color: var(--ink); background: var(--surface);
  border: 1px solid var(--field-line); border-radius: var(--r-md);
}

@media (max-width: 1240px) {
/* --- half-screen (F19): the decision columns stay --------------------- */
  table.grid th.line-col, table.grid td.line-col { width: 200px; max-width: 200px;
    padding-left: 12px; padding-right: 10px; }
  table.grid th.sum-col, table.grid td.sum-col { width: 96px; min-width: 96px; max-width: 96px;
    padding: 0 6px; font-size: 12.5px; }
}

/* --- N13: five identical badges are a group band -------------------- */
.driver-grid tr.group-row th { background: var(--bg); text-align: left;
  padding: 6px 12px; }

/* --- S1 / S5: an abstaining figure is never set like a figure -------- */
/* The rule matched `tr.computed` only, so the three LINE rows that decline
   to foot printed their `—` at the column's full ink — visually a value, not
   a withholding — while the balance sheet's totals printed theirs muted. One
   treatment, wherever a cell abstains. */
table.grid td.abstain { color: var(--muted); font-weight: 500; }

/* --- 01-T3: the answer column carries a figure AND its basis --------- */
/* Making every total over a short line abstain (S1) left the branch grid's
   pinned Year total reading `—` for revenue, cost, expenses, margin and net
   income, over twelve months of printed figures. A summary figure foots the
   cells printed beside it, and its sub-line says how many it covers — the
   11px muted sub-label the column headers already use, with line heights
   sized so a row that carries one is the same 34px as every other row. */
table.grid td.sum-col { line-height: 1.25; }

/* --- 01-T2: one mark per meaning ------------------------------------ */
/* Three arithmetic rules met under one em dash: a blank counted as nothing
   across a row and as unknowable at the end of it, a total that abstains on
   one tab and sums on the next, a margin with no revenue to divide by, and a
   month no contract covers. The P&L foots what it has (above), so the plain
   glyph is left to mean ABSENT — and the two states that are NOT an absence
   the reader must act on take a mark of their own: the same em dash under a
   dotted rule, keyed in the footnote under its own table. */
/* the dotted rule is this product's own "there is an explanation here" mark —
   the metrics table's computed cells wear it (`cursor: help` and all) */
table.grid td.nodef, table.grid td.nocover { color: var(--muted); font-weight: 500;
  text-decoration: underline dotted var(--muted); text-underline-offset: 3px;
  cursor: help; }
/* ==== Phase B: the balance sheet ties and the ledger (2026-09-17) =======
   O-13 — THE REASON A TOTAL ABSTAINS IS VISIBLE TEXT. The balance sheet's
   side totals, Check and every balance section's subtotal printed the one
   absent glyph with their reason in a `title` and in a sentence under the
   table; a reader scanning the column saw a dash and nothing else. The
   count rides the cell, under the dash, exactly as `.sum-short` carries
   what a summary column foots. 11px is the floor for a label, and a month
   column is ~100px, so the line WRAPS rather than running over the figures
   beside it. */
table.grid td .tot-why { display: block; font-size: 11px; font-weight: 400;
  line-height: 1.15; color: var(--muted); margin-top: 1px;
  white-space: normal; }
.contract-steps li > button:hover { color: var(--ink); }
.contract-panel :is(.fee-table thead th, .dates-table th) {
  color: var(--muted); font-size: var(--t-label); font-weight: 600; line-height: 16px;
  letter-spacing: 0; text-transform: none; vertical-align: top;
}
.board-sheet .tbl-grid tbody th { white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 1240px) {
  .several-rows tr:not([hidden]) {
    position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--s-3) var(--s-3); padding: var(--s-3); margin: 0 0 var(--s-2);
    border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
  }
  /* a card's cell is as tall as what it holds (the table's cell is 34px) and
     reads from the left, a figure cell included */
  .several-rows td:not([hidden]), .several-rows th:not([hidden]) {
    display: block; grid-column: 1 / -1; min-width: 0; height: auto; padding: 0; border: 0;
    text-align: left;
  }
  /* the pinned column keeps room for a nine-figure year total */
  table.grid th.sum-t, table.grid td.sum-t { width: 120px; min-width: 120px; max-width: 120px; }
}

.driver-grid thead th.num { width: 96px; }

@media (max-width: 1240px) {
  .access-table th.gg-mod, .access-table td.gg-mod { width: 76px; }
  .several-rows td[data-col="customer"] { padding-right: var(--s-6); }
}

@media screen and (max-width: 1240px) {
/* half-screen: the decision columns stay, the rest fold away (the badge
   beside the name carries the verdict, so nothing is lost) */
table.league .fold { display: none; }
}

@media (width <= 900px) {
  /* the frozen column keeps a name's width; the address wraps inside it */
  .admin-users > * > tr > :first-child { min-width: 200px; max-width: 220px; }
  .admin-tokens > * > tr > :first-child { min-width: 150px; }
}

@media (width <= 860px) {
  .settings-shell > .page-head.suite { margin-bottom: 14px; }
}

@media screen and (max-width: 760px) {
/* --- 7. TABLES ON A PHONE ----------------------------------------------
   `.tablewrap` already scrolls its table sideways, and nothing said so: the
   scrollbar is an overlay one that is painted only while a finger or a
   pointer is on it, so a column past the right edge simply is not there.

   The cue has to be honest — a mark that claims a hidden column where the
   table fits is the same defect as a total that reads zero because a line is
   missing. A THIN SCROLLBAR is the one cue the browser draws only when the
   container really can scroll: no script, no guess, and it is the affordance
   as well as the sign. Its colours are the page's own, so it reads in both
   themes, and it is left to the platform on a desktop, where the pointer
   already reveals one.

   (A fade on the cut edge, the way the grid's `edge-fade` masks a sheared
   month, is not available here: the grid knows from its script how much is
   off screen, and a list table has no such script. A container-background
   fade is never seen at all, because the table, its head and its banded rows
   each paint an opaque ground over it.) */
  .tablewrap { scrollbar-width: thin; scrollbar-color: var(--muted-2) transparent; }
}

@media (width <= 700px) {
  .contracts-table > thead th:first-child { width: 10rem; }
}

.contract-panel .plan-table td :is(select, input) { width: 100%; max-width: none; min-width: 0; }

@media (max-width: 640px) {
  :where(.access-body, .access-panel, .form-grid, .ctrl-row, .pw-form,
       .setup-form, .ledger-filter, .audit-filter, .list-toolbar, .help-find,
       .ov-panel, .settings-shell, .dqm-record, .dec-form, .assign-bar,
       .upload-bar, .signoff-form, .rate-add)
  :where(input[type="text"], input[type="number"], input[type="date"],
       input[type="month"], input[type="search"], input[type="email"],
       input[type="password"], input[type="tel"], input[type="url"],
       input:not([type]), select, textarea):where(:not(table.grid *, .driver-grid *, .lines-table *,
       td *, th *)) { max-width: 100%; }
}

:where(.page-controls, .page-side) :where(.year-nav, .kind-toggle, .grid-tabs,
.page-tabs, .dq-filters, .branch-pick, .grid-dl, .chip, .btn-secondary) {
  height: var(--ctl-h);
}
:where(.list-toolbar, .ledger-filter, .audit-filter, .help-find)
:where(input:not([type="checkbox"]):not([type="radio"]), select, button, .btn-secondary) {
  height: var(--ctl-h);
}

/* --- 6. THE CONTROLS IN A PAGE HEAD ARE FIELDS TOO -----------------------
   The field primitive listed the product's forms and its filter bars; a
   select that IS the page's one control — the portfolio queue's owner filter
   — sits in `.page-controls`, met no rule at all, and kept the user agent's
   square grey box. Selects and text fields only: the year stepper and the tab
   strips in the same row are not fields and must not become them. */
:where(.page-controls, .page-side)
:where(input[type="text"], input[type="number"], input[type="date"],
       input[type="month"], input[type="search"], input[type="email"],
       input[type="tel"], input[type="url"], input:not([type]),
       select):where(:not(table.grid *, .driver-grid *, .lines-table *, td *, th *)) {
  min-height: var(--ctl-h); padding: 0 11px;
  font: inherit; font-size: var(--t-table);
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--field-line); border-radius: var(--r-md);
}
:where(.page-controls, .page-side)
:where(input[type="text"], input[type="number"], input[type="date"],
       input[type="month"], input[type="search"], input[type="email"],
       input[type="tel"], input[type="url"], input:not([type]),
       select):where(:not(table.grid *, .driver-grid *, .lines-table *, td *, th *)):where(:hover:not(:disabled)) {
  border-color: var(--muted-2);
}
:where(.page-controls, .page-side)
:where(input[type="text"], input[type="number"], input[type="date"],
       input[type="month"], input[type="search"], input[type="email"],
       input[type="tel"], input[type="url"], input:not([type]),
       select):where(:not(table.grid *, .driver-grid *, .lines-table *, td *, th *)):where(:focus) {
  outline: 2px solid var(--accent); outline-offset: -1px;
  border-color: var(--accent);
}

@media (max-width: 640px) {
  body.ov-edit #ov-widgets { margin-right: 0; }
  /* the mapping and the cost codes scroll inside their own wrappers */
  #modal-gl-import table.gl-map { min-width: 540px; }
  #modal-gl-import table.gl-codes { min-width: 520px; }
  /* the head keeps the names of the figure columns, over them */
  #main table:is(.ledger-table, .audit-table, .contracts-table, .codes-table, .series-manage, .plan-kpis, .kpi-measures, .kpi-levels, .pat-table, .version-table, .catalog-table, .board-version-list, .board-measures, .acc-people, .acc-tokens) > thead > tr {
    display: flex; justify-content: flex-end; gap: var(--s-2); padding: var(--s-2) var(--s-4);
    border-bottom: 1px solid var(--line); }
  #main table:is(.ledger-table, .audit-table, .contracts-table, .codes-table, .series-manage, .plan-kpis, .kpi-measures, .kpi-levels, .pat-table, .version-table, .catalog-table, .board-version-list, .board-measures, .acc-people, .acc-tokens) > thead:not(:has(th.num)) { display: none; }
  #main table:is(.ledger-table, .audit-table, .contracts-table, .codes-table, .series-manage, .plan-kpis, .kpi-measures, .kpi-levels, .pat-table, .version-table, .catalog-table, .board-version-list, .board-measures, .acc-people, .acc-tokens) > thead > tr > th { display: none; }
  #main table:is(.ledger-table, .audit-table, .contracts-table, .codes-table, .series-manage, .plan-kpis, .kpi-measures, .kpi-levels, .pat-table, .version-table, .catalog-table, .board-version-list, .board-measures, .acc-people, .acc-tokens) > :is(tbody, tfoot) > tr > :is(th, td) {
    display: block; order: 4; flex: 0 1 auto; position: static; width: auto; min-width: 0; max-width: none;
    height: auto; padding: 0; border: 0; background: none; box-shadow: none; color: var(--muted);
    font-size: var(--t-sm); line-height: 1.35; text-align: left; white-space: normal;
    visibility: visible; overflow: visible; }
  #main table:is(.ledger-table, .audit-table, .contracts-table, .codes-table, .series-manage, .plan-kpis, .kpi-measures, .kpi-levels, .pat-table, .version-table, .catalog-table, .board-version-list, .board-measures, .acc-people, .acc-tokens) > :is(tbody, tfoot) > tr > th {
    order: 1; flex: 1 1 100%; color: var(--ink); font-size: var(--t-14); }
  #main table:is(.ledger-table, .audit-table, .contracts-table, .codes-table, .series-manage, .plan-kpis, .kpi-measures, .kpi-levels, .pat-table, .version-table, .catalog-table, .board-version-list, .board-measures, .acc-people, .acc-tokens) > :is(tbody, tfoot) > tr > td.num {
    order: 2; flex: 0 0 76px; color: var(--ink); font-size: var(--t-13); text-align: right; }
  #main table:is(.ledger-table, .audit-table, .contracts-table, .codes-table, .series-manage, .plan-kpis, .kpi-measures, .kpi-levels, .pat-table, .version-table, .catalog-table, .board-version-list, .board-measures, .acc-people, .acc-tokens) > :is(tbody, tfoot) > tr > td.row-actions {
    order: 5; margin-left: auto; }
  #main table:is(.ledger-table, .audit-table, .contracts-table, .codes-table, .series-manage, .plan-kpis, .kpi-measures, .kpi-levels, .pat-table, .version-table, .catalog-table, .board-version-list, .board-measures, .acc-people, .acc-tokens) > :is(tbody, tfoot) > tr > td:empty { display: none; }
  /* a row with figures: the name leaves them their columns */
  #main table:is(.ledger-table, .audit-table, .contracts-table, .codes-table, .series-manage, .plan-kpis, .kpi-measures, .kpi-levels, .pat-table, .version-table, .catalog-table, .board-version-list, .board-measures, .acc-people, .acc-tokens) > :is(tbody, tfoot) > tr:has(> td.num) > th {
    flex-basis: calc(100% - 84px); }
  #main table:is(.ledger-table, .audit-table, .contracts-table, .codes-table, .series-manage, .plan-kpis, .kpi-measures, .kpi-levels, .pat-table, .version-table, .catalog-table, .board-version-list, .board-measures, .acc-people, .acc-tokens) > :is(tbody, tfoot) > tr:has(> td.num ~ td.num) > th {
    flex-basis: calc(100% - 168px); }
  /* a token's two dates say which is which: the head's names, as above */
  #main table.acc-tokens > tbody > tr > td[data-label]:not(.row-actions)::before {
    content: attr(data-label) " "; color: var(--muted); font-size: var(--t-sm); }
  #main table:is(.version-table, .catalog-table, .series-manage) > tbody > tr > td.num[data-label]::before {
    content: attr(data-label) " "; color: var(--muted); font-size: var(--t-sm); }
  #main table:is(.version-table, .catalog-table, .series-manage) > tbody > tr:has(> td.num) > :is(th, td:first-child) { flex-basis: 100%; }
  /* over a figure column only its name: what a desk says under it is in "How to read this" */
  #main table:is(.ledger-table, .audit-table, .contracts-table, .codes-table, .series-manage, .plan-kpis, .kpi-measures, .kpi-levels, .pat-table, .version-table, .catalog-table, .board-version-list, .board-measures, .acc-people, .acc-tokens) > thead > tr > th.num > span { display: none; }
  /* a table with one figure column gives it more room */
  #main table:is(.ledger-table, .audit-table, .contracts-table, .codes-table, .series-manage, .plan-kpis, .kpi-measures, .kpi-levels, .pat-table, .version-table, .catalog-table, .board-version-list, .board-measures, .acc-people, .acc-tokens) > thead:not(:has(th.num ~ th.num)) > tr > th.num,
  #main table:is(.ledger-table, .audit-table, .contracts-table, .codes-table, .series-manage, .plan-kpis, .kpi-measures, .kpi-levels, .pat-table, .version-table, .catalog-table, .board-version-list, .board-measures, .acc-people, .acc-tokens) > :is(tbody, tfoot) > tr:not(:has(> td.num ~ td.num)) > td.num { flex-basis: 112px; }
  #main table:is(.ledger-table, .audit-table, .contracts-table, .codes-table, .series-manage, .plan-kpis, .kpi-measures, .kpi-levels, .pat-table, .version-table, .catalog-table, .board-version-list, .board-measures, .acc-people, .acc-tokens) > :is(tbody, tfoot) > tr:has(> td.num):not(:has(> td.num ~ td.num)) > th { flex-basis: calc(100% - 120px); }
  .contract-steps li:not(.active) > button {
    width: 22px; margin-left: -22px; padding: 0; overflow: hidden; color: transparent;
  }
  #main table.console-table > :is(tbody, tfoot) > tr:not([hidden]) { display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2) var(--s-3); align-items: start;
    margin-bottom: var(--s-3); padding: var(--s-4); border: 1px solid var(--line);
    border-radius: var(--r-lg); background: var(--surface); }
  #main table:is(.ledger-table, .audit-table, .contracts-table, .codes-table, .series-manage, .plan-kpis, .kpi-measures, .kpi-levels, .pat-table, .version-table, .catalog-table, .board-version-list, .board-measures, .acc-people, .acc-tokens) > :is(tbody, tfoot) > tr:not([hidden]) {
    display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s-2); row-gap: var(--s-1);
    height: auto; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line-soft); }
  .contract-panel .dates-table th, .contract-panel .dates-table td {
    padding-right: 6px;
  }
  #main .tablewrap:has(> :is(table.sh-kpis, table.sh-acc, table.ev-table, table.tbl-clients, table.tbl-billed, table.close-figs))::after { display: none; }
  /* the close's figures stand in a card of their own: the rows keep off its edge */
  #main .tablewrap:has(> table.close-figs) { padding: 0 var(--s-3); }
  #main :is(table.sh-kpis, table.sh-acc, table.ev-table, table.tbl-clients, table.tbl-billed, table.close-figs) > * > tr > :is(th, td) { display: block; flex: 1 1 0; position: static; width: auto;
    min-width: 0; max-width: none; height: auto; padding: 0; border: 0; background: none; box-shadow: none;
    text-align: right; white-space: normal; }
  #main :is(table.sh-kpis, table.sh-acc, table.ev-table, table.tbl-clients, table.tbl-billed, table.close-figs) > * > tr > :is(:first-child, td[colspan]) { flex: 0 0 100%; text-align: left; }
  #main :is(table.sh-kpis, table.ev-table) > * > tr > :is(th, td) { grid-row: 2; }
  #main :is(table.sh-kpis, table.ev-table) > * > tr > :first-child { grid-column: 1 / -2; grid-row: 1; }
  #main :is(table.sh-kpis, table.ev-table) > * > tr > td[colspan] { grid-column: 1 / -1; grid-row: 2; text-align: left; }
  .board-sheet table.board-table.tbl-grid > tbody > tr > :is(th, td) { border: 0; background: none; }
  /* the strip of months stays under the top bar while the lines scroll */
  :is(.grid-page :is(table.grid, table.driver-grid), table.board-table.tbl-grid) > thead {
    position: sticky; top: 52px; z-index: 3; background: var(--surface);
    border-bottom: 1px solid var(--line); }
  :is(.grid-page :is(table.grid, table.driver-grid), table.board-table.tbl-grid) > thead > tr {
    display: flex; gap: var(--s-2); padding: var(--s-2) var(--s-3);
    overflow-x: auto; scrollbar-width: none; }
  :is(.grid-page :is(table.grid, table.driver-grid), table.board-table.tbl-grid) > thead > tr > th { display: none; }
  :is(.grid-page :is(table.grid, table.driver-grid), table.board-table.tbl-grid) > thead > tr > th[data-month] {
    display: flex; flex: 0 0 auto; flex-direction: column; align-items: center;
    justify-content: center; gap: 2px; position: relative; width: auto; min-width: 60px;
    max-width: none; height: auto; min-height: 44px; padding: var(--s-1) var(--s-2);
    border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
    box-shadow: none; color: var(--ink-2); font-size: var(--t-13); text-align: center;
    white-space: nowrap; cursor: pointer; }
  :is(.grid-page :is(table.grid, table.driver-grid), table.board-table.tbl-grid) > thead > tr > th.at-month {
    border-color: var(--accent-fill); background: var(--accent-fill); color: var(--inverse-ink); }
  /* each row: its name, and the month's figure at the right */
  :is(.grid-page :is(table.grid, table.driver-grid), table.board-table.tbl-grid) > tbody > tr {
    display: flex; flex: none; align-items: center; gap: var(--s-3); height: auto; min-height: 48px;
    padding: var(--s-2) var(--s-4); border-bottom: 1px solid var(--line-soft); }
  :is(.grid-page :is(table.grid, table.driver-grid), table.board-table.tbl-grid) > tbody > tr > :is(th, td) {
    display: none; position: static; width: auto; min-width: 0; max-width: none; height: auto;
    padding: 0; border: 0; background: none; box-shadow: none; }
  :is(.grid-page :is(table.grid, table.driver-grid), table.board-table.tbl-grid) > tbody > tr > :first-child {
    display: block; flex: 1 1 auto; text-align: left; white-space: normal; }
  /* a finger leaves no wash behind: a desk tints a row's cells under the pointer */
  :is(.grid-page :is(table.grid, table.driver-grid), table.board-table.tbl-grid) > tbody > tr:is(:hover, :focus-within) > :is(th, td) {
    background: none; }
  #main details:is(.full-read, .lock-list) > summary { padding-top: var(--s-3); padding-bottom: var(--s-3); }
  #main :is(.head-more-item, .ov-widget details.viz-table > summary) { min-height: var(--ctl-h); }
}

@media (width <= 640px) {
/* Family 6, block C: what the adversarial review of sections A and B found,
   as the lead took it — one blocker, five should-fix, six nits. LOOK, LAYOUT
   and HIERARCHY only: no word, no hook, no behaviour moves. The template
   gained one class (the fold note's Entry badge). Every earlier rule stands;
   these extend them. */

/* --- 1. THE PHONE REGISTER NEVER PANS SIDEWAYS (the blocker) ---------------
   The actions column's header is sr-only: `position: absolute`, and nothing
   between it and <body> was positioned, so its containing block was the
   page, the wrapper's `overflow-x: auto` never clipped it, and the table's
   44rem phone floor put it 631px out — the whole page scrolled 242px into
   blank ground. The wrapper is its containing block now, at the width where
   that floor applies. Not wider: a positioned wrapper holding the sticky
   shade is rastered on a layer of its own, and on the desktop the
   register's text lost its subpixel antialiasing (measured in Edge at
   1440: every glyph, nothing moved); from 641px up the page never panned
   (probed at 641, 700, 800, 900 and 1024). The shade is unchanged. */
  :is(.branch-table, .catalog-table) tr.child-row > td:first-child::before { left: 22px; }
  :is(.set-codes, .set-metrics, .set-fees, .set-avg) > .set-block-head > :is(button, .btn-secondary) {
    grid-column: 1; grid-row: auto; justify-self: start; margin-top: 6px;
  }
}

/* Family 7, block C: the integration of sections A, B and C and what the
   three reviewers found. LOOK, LAYOUT and HIERARCHY only: no word, hook or
   behaviour moves, no hex, no important flag, every colour a token with a
   dark value, and every rule of this block that sets `display` on a row, a
   form part, a step or a pop-out part carries `:not([hidden])`. The two
   media queries are the range form. Earlier rules are never edited: each
   fix below is a later rule on a selector at least as specific.

   THE HEAD SLOT: section B's three tabs now fill section A's page head
   from inside their partials (`set_head.sub` / `set_head.controls`), so the
   block heads below carry no title and no action, and lay out as ONE
   column: the description, then the fold notes under it at full width. */

/* --- 1. THE INPUT TABS' BLOCK HEADS: one column, no second title --------
   A's `.set-block-head.settings-head:not([hidden]) { display: flex }`
   (0,3,0) beat B's grid (0,2,0) on Operating metrics and Planned expenses,
   so the description and each fold note stood side by side as 160-350px
   columns five lines deep. The grid is restated above both, with one
   column now that the action has moved to the page head; the air between
   the head and what follows is the head's own 14px, as on A's tabs. */
:is(.set-metrics, .set-fees) > .set-block-head.settings-head:not([hidden]),
:is(.set-codes, .set-avg) > .set-block-head:not([hidden]) {
  display: grid; grid-template-columns: minmax(0, 1fr);
  column-gap: 0; row-gap: 6px; align-items: start; margin: 0;
}
.close-month > .notice.error { margin: 0 0 var(--s-3); }
.sig-wait > .sig-trail:not([hidden]) {
  display: flex; flex-direction: column; gap: 6px; position: relative;
  margin: 0 0 8px;
}
.close-ready > .close-gate .badge { margin-right: 4px; vertical-align: 1px; }
.sig-decide > form:not(.form-grid):not([hidden]),
.sig-decide .sig-foot:not([hidden]) {
  display: flex; justify-content: flex-end; align-items: center; gap: 8px;
  margin: 0 -20px -16px -17px; padding: 12px 20px 12px 17px;
  border-top: 1px solid var(--line);
}

@media (width <= 640px) {
  /* the kit's right-edge shade on every table wrapper in the pop-out, the
     preview's scroller among them (it cut a figure mid-number with no cue) */
  #modal-gl-import :is(.tablewrap, details.gl-preview > div):where(:not([hidden])) { display: flex; }
}

/* --- 2. THE PREVIEW'S BOX SHOWS WHERE IT SCROLLS ON THE DESKTOP TOO -------
   Its headers wrap and its cells keep their line (a wrapped cell broke
   every date at its hyphens), so a file wider than the demo's still
   scrolls the box: the kit's right-edge shade says so at every width,
   not only on a phone (the box pads its table by 10px each side). */
#modal-gl-import details.gl-preview > div:where(:not([hidden])) { display: flex; }

@media (width <= 640px) {
  :is(#modal-metric-new, [id^="modal-metric-"]) label:has(> select[data-metric-insert]) > select[data-metric-insert] {
    grid-column: 1; grid-row: 3; max-width: none; width: 100%;
  }
}

@media (max-width: 640px) {
  #main table.tbl-plan > * > tr > :is(th, td):not(.fold) { display: block; position: static; width: auto; min-width: 0;
    max-width: none; height: auto; padding: 0; border: 0; background: none; box-shadow: none;
    text-align: right; white-space: normal; }
  #main table.tbl-plan > * > tr > :is(:first-child, td[colspan]) { grid-column: 1 / -1; grid-row: 1; text-align: left; }
}

@media (width <= 640px) {
  .fees-table th.num { width: 120px; }
}

/* ---- THE PATTERNS BLOCK (2026-10-31, SPEC §6.105): Company settings -> KPIs.
   One table, one Save: each shape's switch, its thresholds as short labelled
   fields that wrap inside their cell, and its rule in force. On the kit's
   tokens; no `--err`, no hex, `:not([hidden])` on every visible display. */
.pat-table th[scope="row"] { min-width: 15ch; }

@media (width <= 640px) {
  .admin-users > * > tr > :first-child, .admin-tokens > * > tr > :first-child { padding-left: 16px; }
}

@media screen and (max-width: 640px) {
  .ledger-filter input[type="date"], .audit-filter input[type="date"] {
    flex: 1 1 30%; min-width: 0;
  }
}

.ledger-filter input[type="date"] {
  height: var(--ctl-h); min-height: var(--ctl-h); padding: 0 8px 0 11px;
  border: 1px solid var(--field-line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: var(--t-table); font-variant-numeric: tabular-nums;
}
.access-body > form.gl-form > * { flex: 1 1 100%; min-width: 0; }
/* The critique of 2026-09-28 left a list of minor observations; the owner's
   answers of 2026-09-29 settled what this pass builds. Nothing here moves a
   figure or a word. The markup is the templates' (the urgent chip's icon,
   the closes as icons) and the scripts' (viz.js, drill.js, layout.js,
   cite.js); the grid's branch picker moves on its Go (grid.html). */

/* -- 1. URGENT IS MORE THAN A HUE ------------------------------------------
   an urgent insight's chip opens on the alert icon, its first child,
   wherever the chip prints: the queue row, the resolved row, the dialog, the
   inbox pane (a copy of the dialog) and the portfolio queue. The chip is an
   18px inline-flex box, so the icon centres on its capitals; it strokes
   `currentColor`, so it is drawn in the chip's own ink, with 4px before the
   word. */
.dq-chip > svg.ico { flex: none; align-self: center; width: 12px; height: 12px;
  margin: 0 4px 0 0; color: inherit; }
.dqd-pic svg:not([hidden]) { display: block; width: 100%; height: 48px; }
/* the explanation stays in view, a step quieter, under the fields */
.gl-form > p.muted {
  padding-top: 8px; max-width: 72ch;
  font-size: 12px; line-height: 18px; color: var(--muted);
}

@media screen and (width <= 640px) {
  a.help-row:not([hidden]) {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main main" "aud kind";
    column-gap: 10px; padding: 12px 34px 12px 14px;
  }
  a.help-row .help-row-kind { align-self: center; padding-top: 0; }
  .help-body dl.help-states { padding: 2px 14px; }
}

:is(.move-arrivals, .move-people) > * > tr > :first-child { padding-left: 20px; }
:is(.move-arrivals, .move-people) > * > tr > :last-child { padding-right: 20px; }
.move-months > li:not([hidden]) {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px;
  padding: 10px 0; border-top: 1px solid var(--line-soft);
  font-size: var(--t-table); line-height: 19px; color: var(--ink-2);
}

@media (width <= 480px) {
  #stepper li:not(.active), #stepper li.done { font-size: 0; }
}

@media (641px <= width <= 1240px) and (pointer: coarse) {
  /* A HIDDEN LABEL STAYS IN ITS TABLE'S BOX ON A TABLET TOO (SPEC §6.171's
     fix, §6.177): beside the icon strip a table that scrolls inside its box
     is narrower than the screen it was sized for, and the hidden name of its
     last column, placed absolutely, escaped the box and widened the page. */
  .tablewrap .sr-only { position: static; display: inline-block; margin: -1px; clip-path: inset(50%);
    vertical-align: top; }
  /* ALL COMPANIES ON A TABLET IS TWO LINES A COMPANY (owner decision 5 of
     2026-11-19, SPEC §6.177). The table is the one a desk gets. Its first
     seven columns fit a tablet held upright and stay columns under their
     heads, which still sort. The rest (the count of insights, the top
     insight, since last week, setup, the last entry) stand on a second line
     under the company, each under its column's name, which `list_rows.js`
     hands down from the head. Nothing scrolls sideways and nothing is
     hidden; the row is still the door to its company. */
  #main .tablewrap:has(> .console-table) { display: block; overflow: visible; }
}

@media (max-width: 640px) {
  /* ALL COMPANIES ON A PHONE IS A CARD FOR EACH COMPANY (owner decision 2 of
     2026-11-19, UI rule 21, SPEC §6.174). The table is the one a desk gets. A
     row is laid out as a card: its name and verdict, when it closed, its
     figures three to a line under their columns' names, then its top insight.
     A cell is placed by the column it is (`data-col`) and says that column's
     name (`data-label`); both are the head's, handed down by `list_rows.js`.
     The head itself is not drawn, so the list keeps the order the page
     opened in: worst first. */
  #main .tablewrap:has(> .console-table) { display: block; overflow: visible; border: 0; border-radius: 0;
    background: none; box-shadow: none; }
  /* THE P&L AGAINST PLAN, MONTH BY MONTH: a month's name, then revenue,
     expenses and net income side by side, each actual over its gap. The plan
     columns a narrow desk folds stay folded. */
  #main .tablewrap:has(> .tbl-plan) { display: block; overflow: visible; }
}

@media (641px <= width <= 1240px) and (pointer: coarse) {
  #main .tablewrap:has(> .console-table)::after { display: none; }
}

@media (max-width: 640px) {
  #main .tablewrap:has(> .console-table)::after { display: none; }
  #main .tablewrap:has(> .tbl-plan)::after { display: none; }
}

@media (641px <= width <= 1240px) and (pointer: coarse) {
  #main table.console-table, #main table.console-table > :is(thead, tbody, tfoot) { display: block; width: auto; min-width: 0; }
}

:is(#new-codes, #new-added, #new-people) :is(input[type="text"], input[type="email"], select) {
  box-sizing: border-box; width: 100%; min-height: var(--ctl-h-sm); margin: 0; padding: 0 8px;
  font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--r-md);
}

@media (min-width: 901px), (min-width: 641px) and (pointer: coarse) {
  body.side-collapsed .rail-foot .help-btn,
  body.side-collapsed .rail-foot .help-about {
    width: 32px; padding: 0; justify-content: center; }
}

.fx-add .setup-form :is(input[type="text"], input[type="month"], select) {
  padding: 0 11px; font-size: var(--t-table); color: var(--ink);
  background: var(--surface); border-color: var(--field-line); border-radius: var(--r-md);
}
.contract-form .wiz-nav button:not(.primary) {
  min-height: var(--ctl-h); padding: 0 14px; border: 1px solid var(--field-line);
  border-radius: var(--r-md); background: var(--surface); color: var(--ink);
  font-size: var(--t-table); font-weight: 600;
}
.contract-panel .plan-table :is(th.fee-actions-h, td.fee-actions) { padding-right: 0; }
.contract-panel .review-table th[scope="row"] {
  width: 44%; padding: 7px 12px 7px 0; text-align: left;
  color: var(--ink); font-weight: 500;
}
.contract-panel .review-table :is(th, td).num { padding-right: 0; }
.contract-panel .review-table tr.review-sub > * { font-size: var(--t-sm); }
.contract-panel .review-table tr.total > * {
  padding-top: 10px; padding-bottom: 8px; border-top: 1.5px solid var(--ink); border-bottom: 0;
  font-size: 15px; font-weight: 700; color: var(--ink);
}
.set-codes .codes-filter :is(input[type="search"], select) {
  min-height: var(--ctl-h); height: var(--ctl-h); padding: 0 11px;
  font: inherit; font-size: var(--t-table); color: var(--ink);
  background: var(--surface); border: 1px solid var(--field-line);
  border-radius: var(--r-md);
}
.set-codes .codes-filter input[type="search"] { flex: 1 1 220px; min-width: 220px; max-width: 360px; }
table.codes-table td.row-actions .icon-btn, table.codes-table .cat-head .cat-edit {
  width: 24px; height: 24px; padding: 0; vertical-align: middle;
  border: 1px solid transparent; border-radius: var(--r-sm); color: var(--muted-2);
}
table.codes-table .cat-head .qa-reveal {
  display: inline-flex; white-space: nowrap; align-items: center; min-height: var(--ctl-h-sm);
  padding: 0 8px; border-radius: var(--r-sm);
  font: 600 var(--t-sm)/1 var(--sans); color: var(--accent);
}
.fees-table td.row-actions .icon-btn {
  width: 24px; height: 24px; padding: 0; vertical-align: middle;
  border: 1px solid transparent; border-radius: var(--r-sm); color: var(--muted-2);
}
[id^="modal-fee-"] .access-body > p.fee-sec-note {
  margin: 0 0 10px; max-width: 64ch; font-size: 12px; line-height: 18px; color: var(--muted);
}
/* secondary: the kit's bordered surface at the control height */
.wiz-step .wiz-nav button:not(.primary) {
  min-height: var(--ctl-h); padding: 0 14px;
  border: 1px solid var(--field-line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: var(--t-table); font-weight: 600; cursor: pointer;
}
.board-toolbar .board-actions > a.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--ctl-h); padding: 0 14px; border-radius: var(--r-md);
  border: 1px solid var(--accent-fill); background: var(--accent-fill);
  color: var(--on-accent); font-size: var(--t-table); font-weight: 600;
  line-height: 1; white-space: nowrap; text-decoration: none;
}
section.board-versions > .tablewrap:not([hidden]) {
  display: flex; margin: 0; border-top: 1px solid var(--line);
}

/* the table: a card on the page, the list-table header, 34px rows, the
   figures tabular, the line names frozen while the months scroll, and the
   right-edge shade on the cut */
.tablewrap:has(> table.version-sheet):not([hidden]) {
  display: flex; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
}

@media (width <= 640px) {
  .set-codes .codes-filter :is(input[type="search"], select) {
    width: 100%; min-width: 0; max-width: none;
  }
}

.tablewrap:has(> table.version-sheet) + .footnote { margin-top: var(--s-3); max-width: 72ch; }

@media screen and (width >= 1241px) {
/* THE BALANCE SHEET'S LINE COLUMN IS WIDER (lead decision 2026-09-22): the
   sheet pins no summary column at its right edge, so the room the P&L
   spends on the year's answer is room these names need — "Retained
   Earnings — Prior Years", and the Cash row's three tags. The P&L's own
   252 / 200px rules are untouched. At 1440 with the rail open the sheet
   still shows eight whole months beside it, as it did at 252px; at 960
   with the rail collapsed it shows five, one fewer than at 200px — the
   price of names that read whole on the sheet a reader scrolls least. */
  table.grid.bs-grid thead th.line-col,
  table.grid.bs-grid tbody th.line-col,
  table.grid.bs-grid td.line-col {
    width: 300px; min-width: 300px; max-width: 300px; }
}

@media screen and (width <= 1240px) {
/* under 1240 the cost code comes off the cell and the half-screen rule
   caps every cluster at 40px, which is narrower than any provenance: the
   cap is measured the same way as above — 10px of handle, 90px of name, two
   gaps — so "Fleet Washing Revenue" keeps both its lines and the label is
   what gives way, as it does at full width */
  /* the half-screen rule caps every cluster at 40px, which stacked the
     Cash row's three labels one per line; this one is sized above */
  /* ...and the subtotal's own "cost of doing the work" tag, which it stood
     one word to a line, five lines deep */
  table.grid.bs-grid thead th.line-col,
  table.grid.bs-grid tbody th.line-col,
  table.grid.bs-grid td.line-col {
    width: 240px; min-width: 240px; max-width: 240px; }
}

.access-body table.price-grid td, .access-body table.price-grid tbody th[scope="row"] { height: 40px; }
/* the file is the row's one action: a secondary button at the right edge */
table.board-version-list td:last-child { width: 1%; text-align: right; }

@media (max-width: 640px) {
  :is(.grid-page :is(table.grid, table.driver-grid), table.board-table.tbl-grid),
  :is(.grid-page :is(table.grid, table.driver-grid), table.board-table.tbl-grid) > :is(thead, tbody) {
    display: block; width: auto; min-width: 0; }
}

.audit-table td:nth-child(2) { max-width: 260px; overflow-wrap: anywhere; }

@media (width > 640px) {
  .tablewrap:has(> table.audit-table) { overflow: visible; }
}

@supports (animation-timeline: scroll()) {
  .tablewrap:has(> .console-table)::after {
    content: ""; flex: none; align-self: stretch;
    width: 18px; margin-left: -18px;
    position: sticky; right: 0; z-index: 3;
    opacity: 0; pointer-events: none;
    background: linear-gradient(to left, var(--shade-edge), transparent);
    animation: kit-shade-bottom linear both;
    animation-timeline: scroll(nearest inline);
    animation-range: calc(100% - 12px) 100%; }
  .tablewrap:has(> .contracts-table)::after {
    content: ""; flex: none; align-self: stretch;
    width: 18px; margin-left: -18px;
    position: sticky; right: 0; z-index: 3;
    opacity: 0; pointer-events: none;
    background: linear-gradient(to left, var(--shade-edge), transparent);
    animation: kit-shade-bottom linear both;
    animation-timeline: scroll(nearest inline);
    animation-range: calc(100% - 12px) 100%; }
  .tablewrap:has(> .ledger-table)::after {
    content: ""; flex: none; align-self: stretch;
    width: 18px; margin-left: -18px;
    position: sticky; right: 0; z-index: 3;
    opacity: 0; pointer-events: none;
    background: linear-gradient(to left, var(--shade-edge), transparent);
    animation: kit-shade-bottom linear both;
    animation-timeline: scroll(nearest inline);
    animation-range: calc(100% - 12px) 100%;
  }
}

@supports (field-sizing: content) {
/* an entry cell is as wide as the figure it holds (the 96px floor stays);
   where the browser cannot size a field to its content the input keeps its
   old width and clips rather than overprints */
  #metrics-grid td.num input { field-sizing: content; width: auto; }
}

@media (max-width: 640px) {
  #main table:is(.ledger-table, .audit-table, .contracts-table, .codes-table, .series-manage, .plan-kpis, .kpi-measures, .kpi-levels, .pat-table, .version-table, .catalog-table, .board-version-list, .board-measures, .acc-people, .acc-tokens),
  #main table:is(.ledger-table, .audit-table, .contracts-table, .codes-table, .series-manage, .plan-kpis, .kpi-measures, .kpi-levels, .pat-table, .version-table, .catalog-table, .board-version-list, .board-measures, .acc-people, .acc-tokens) > :is(thead, tbody, tfoot) {
    display: block; width: auto; min-width: 0; table-layout: auto; }
  /* THREE FIGURES OR MORE DO NOT FIT AS COLUMNS: each folds under the name and
     keeps its column's name before it (list_rows.js copies it from the head) */
  #main table:is(.version-table, .catalog-table, .series-manage) > thead { display: none; }
  #main table.console-table, #main table.console-table > :is(tbody, tfoot) { display: block; width: auto; min-width: 0;
    border: 0; border-radius: 0; background: none; overflow: visible; }
  #main table.console-table > thead { display: none; }
  #main :is(table.sh-kpis, table.sh-acc, table.ev-table, table.tbl-clients, table.tbl-billed, table.close-figs), #main :is(table.sh-kpis, table.sh-acc, table.ev-table, table.tbl-clients, table.tbl-billed, table.close-figs) > :is(thead, tbody, tfoot) { display: block; width: auto; min-width: 0; }
  #main :is(table.sh-kpis, table.sh-acc, table.ev-table, table.tbl-clients, table.tbl-billed, table.close-figs) > * > tr { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s-2);
    height: auto; padding: var(--s-2) 0; border-bottom: 1px solid var(--line-soft); }
  /* six months of plan accuracy share a line: the scale's smallest size */
  #main table.sh-acc > * > tr { column-gap: var(--s-1); }
  /* a KPI's status and a month's state stand beside the name, at the right,
     and the figures take the line under them */
  #main :is(table.sh-kpis, table.ev-table) > * > tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #main table.tbl-plan, #main table.tbl-plan > :is(thead, tbody) { display: block; width: auto; min-width: 0; }
  #main table.tbl-plan > colgroup { display: none; }
  #main table.tbl-plan > * > tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto auto auto; grid-auto-flow: column; gap: 2px var(--s-2); height: auto;
    padding: var(--s-2) 0; border-bottom: 1px solid var(--line-soft); }
}

/* ===== THE KIT: TAGS AND BADGES [kit-tag] =====
   The one tag (state, kind, read), the badge, the status pill and the chips row.
*/

.tag-read { background: var(--ok-bg); color: var(--ok); }

/* expenses: header actions, date-range filter, combined ledger, type pills */
.pill-count { display: inline-block; margin-left: 6px; background: var(--surface); color: var(--warn);
  border: 1px solid var(--warn-line); border-radius: 999px; padding: 0 7px; font-size: 12px;
  font-weight: 700; }
.chips .chip:hover { border-color: var(--accent); color: var(--accent); }
.chips .chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.list-toolbar[hidden], .chips[hidden] { display: none; }
/* the score speaks the badge grammar in the tokens of its own three words:
   green is the ahead ink, yellow the attention amber, red the loss red —
   the fixed pastel hexes had no dark value */
.score-chip {
  display: inline-block; padding: 0 7px; border-radius: 4px; border: 1px solid transparent;
  font: 600 11px/1.6 var(--sans); letter-spacing: .02em; text-transform: none;
}
.score-chip.score-green { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.score-chip.score-yellow { background: var(--attn-bg); color: var(--attn-ink); border-color: var(--attn-line); }
.score-chip.score-red { background: var(--err-bg); color: var(--err); border-color: var(--err-line); }
main.page-reading .badge, main.page-reading .tag { font-size: var(--t-12); }

/* ===== THE KIT: THE STATUS LINE [kit-status-line] =====
   The one line that says where a page stands, and its act.
*/

.gl-recon-tbl td { padding: 3px 6px; border-bottom: 1px solid var(--line-soft); }
/* the ledger names its own debit/credit gap */
.ledger-imbalance td { color: var(--err); font-size: 12px; font-weight: 600;
  border-top: 1px solid var(--err); }
.driver-grid thead th { background: var(--surface); font: 600 11.5px/1.3 var(--sans);
  color: var(--muted); letter-spacing: .02em; text-transform: none;
  border-bottom: 1px solid var(--line); padding: 8px 10px; vertical-align: bottom; }
.ledger-imbalance td { color: var(--warn); font-weight: 600; }

/* --- 9. THE STATUS LINE (UI rule 8, SPEC §6.124) --------------------------
   The one line under a page title that says how far the company is closed:
   the state in the body's second ink, its one caveat as a tag, its one act
   as a quiet link. `_kit.html` status_line. */
.status-line {
  margin: var(--s-1) 0 0; font-size: var(--t-13); line-height: 1.45; color: var(--ink-2);
}
.status-line-act { margin-left: var(--s-2); font-weight: 600; }
.gl-recon-tbl thead th {
  padding: 6px 8px; font-family: var(--sans); font-size: var(--t-label); font-weight: 600;
  line-height: 16px; letter-spacing: 0; text-transform: none; color: var(--muted);
  white-space: nowrap; border-bottom: 1px solid var(--line);
}
.gl-recon-tbl td, .gl-recon-tbl tbody th {
  padding: 7px 8px; line-height: 18px; border-bottom: 1px solid var(--line-soft);
}
.admin-users > * > tr > :is(th, td) { padding: 0 12px; vertical-align: middle; }
.admin-tokens > * > tr > :is(th, td) { padding: 0 12px; vertical-align: middle; }
.help-terms > div > dt { margin: 0; padding: 0; border-top: 0; line-height: 22px; }
/* The Overview as drawn (SPEC 6.137): ONE card (the verdict, the kit's
   status line and the one filled button, the four figures as the kit's
   tiles) and ONE ranked list (the kit's insight rows, the two lines under
   it, the detail panel over the page). Every colour is a token; the kit's button
   roles and field primitive do the controls; nothing here names an id. The
   health card, the Insights queue and the plan status header keep their own
   rules above: they are the library's now. */
.state-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px 14px; border-left: 4px solid var(--line); }
.state-head:not([hidden]) { display: flex; }
.state-head { align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
fieldset.status-pick-3:not([hidden]) { grid-template-columns: repeat(3, minmax(0, 1fr)); }

table.version-sheet td, table.version-sheet tbody th[scope="row"] {
  height: 34px; padding: 0 12px; border-bottom: 1px solid var(--line-soft);
  white-space: nowrap; vertical-align: middle; background: var(--row-bg);
}

@media (max-width: 640px) {
/* --- 11. ON A PHONE ------------------------------------------------------
   The pop-outs are the kit's full-screen sheet. The rail keeps one line (the
   stage's purpose folds away under 860px; its words stay in the DOM), the
   form is one column, the choice tiles stack, and the plan's tables keep
   their columns and scroll inside their own `.tablewrap`. */
  .contract-steps li > button { padding: 6px 4px; margin-left: 2px; }
}

:is(.move-arrivals, .move-people) > * > tr > :is(th, td) { padding: 0 12px; vertical-align: middle; }
fieldset.status-pick legend { grid-column: 1 / -1; padding: 0; margin-bottom: 6px;
  font-size: var(--t-sm); font-weight: 500; color: var(--ink-2); }

@media (max-width: 640px) {
  fieldset.status-pick:not([hidden]) { grid-template-columns: minmax(0, 1fr); }
}

/* ===== THE KIT: FIGURE TILES [kit-figures] =====
   The figure tiles: a number, its label and its comparison.
*/

/* a tile's label is a WORD, not a code: sans (review 2026-09-08, 06-N8) */
.tile-label { font-family: var(--sans); font-size: 11.5px; font-weight: 650; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); }
.tile-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 4px; }
.tile-value.neg { color: var(--err); }
.tile-delta { font-size: 12.5px; margin-top: 4px; font-weight: 600; }
.tile-delta.up { color: var(--ok); }
.tile-delta.down { color: var(--err); }
.tile-delta.flat { color: var(--muted); }
.tile-delta .muted { font-weight: 400; }
.sheet-tbl td { padding: 5px 10px 5px 0; border-bottom: 1px solid var(--line-soft); }

.admin-users td { vertical-align: middle; }

/* ---- board-panel musts (2026-08-26) -------------------------------------- */
/* a figure on a costs-incomplete month says so ON the figure */
.tile-warn { margin-top: 6px; font-family: var(--mono); font-size: 11px;
  font-weight: 650; color: var(--warn); }
/* demo companies quarantined below the real book */
/* the divider band wears the group-row grammar — see "LIST TABLES
   (2026-09-07)" at the end of this file */
.portfolio-demo-head td { padding-top: 18px; border-bottom: 0; }
.driver-grid td.num input:focus { outline: 2px solid var(--accent); background: var(--surface); border-radius: 4px; }
.driver-grid td.num input.dirty { background: var(--accent-soft); font-weight: 600; }
.proforma-narrative td { border-top: none; padding-top: 0; }
.figures td { padding: 10px 0 10px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: baseline; }
.figures .up::before, .figures .down::before { content: ""; display: inline-block; width: 7px; height: 7px;
  border-radius: 999px; margin-right: 6px; vertical-align: 1px; }
table.grid tr.section-row .muted { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 8px; }
.figures td.cmp > span:first-child { white-space: nowrap; }
.stat-cmp .up::before, .stat-cmp .down::before { content: ""; display: inline-block; width: 7px; height: 7px;
  border-radius: 999px; margin-right: 6px; vertical-align: 1px; }

/* the headline strip: one anchor figure a step larger, nothing else
   emphasised (SPEC §6.37) */
.stats .stat:first-child .stat-num { font-size: 26px; }

/* -- the portfolio home -------------------------------------------------- */
.tile-value.attn { color: var(--attn); }

/* -- 3. THE ANCHOR IS THE LEAD'S FIGURE --------------------------------------
   one figure a step larger (SPEC §6.37), and it is the one the sentence
   above it is about: the strip marks it `.anchor` (`_headline_figures`).
   Only a strip that CARRIES an anchor gives up its first figure's step: the
   snapshot packet's strip marks none and keeps its larger first figure, as
   its PDF does. */
.stats:has(> .stat.anchor) > .stat:first-child:not(.anchor) .stat-num { font-size: 22px; }
.state-card .stats { margin-top: var(--s-3); }
/* the four figures are one size, as drawn: the strip's first-tile emphasis is the
   health card's, never this card's */
.state-card .stats > .stat:first-child .stat-num { font-size: var(--t-20); }
main.page-reading .stat-num,
main.page-reading .stats:has(> .stat.anchor) > .stat:first-child:not(.anchor) .stat-num { font-size: var(--t-20); }

@media (max-width: 640px) {
  /* a phone: the card, then the list, in one column; the four figures two
     by two (SPEC 6.137) */
  .state-card .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-4); }
  .state-card .stats > .stat:nth-child(2) { border-top: 0; padding-top: 0; }
}

/* ===== THE KIT: THE INSIGHT ROW [kit-insight-row] =====
   One insight in a list: severity, title, stake, owner and its review.
   --- kept from an old banner ---
   THE READ'S WINDOW IN WORDS (2026-09-28, SPEC §6.76)
*/

.dq-filters a.active span { color: var(--muted-2); }
.dq-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.dq-modal::backdrop { background: var(--scrim); }
.codes-table .code-name { font-weight: 600; }
.dq-filters a.active span { color: var(--muted); }
.dq-detail[hidden] { display: none; }
.dq-inbox .dq-row.suggested { cursor: pointer; }
.dq-inbox .dq-row.suggested:hover { background: var(--surface-2); }
.dq-inbox .dq-review { display: none; }
.dq-inbox .dq-row:hover { transform: none; }
.dqs-label { margin: 0 20px 6px; }
.dqs-why { margin: 0 20px 14px; padding: 12px 14px; background: var(--bg); border-radius: 10px;
  font-size: 13.5px; line-height: 1.55; }
.dqs-btns { margin: 0 20px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.help-foot:first-of-type { border-top: 1px solid var(--line); }
.help-arrow { color: var(--muted-2); }
.ov-card-head .muted, .measures-head .muted, .measures-sub {
  font-size: var(--t-sm); }
.stats > .stat, .branch-facts > .fact { padding: 14px 16px 0; }
.dq-row:hover { transform: none; background: var(--surface-2); }
.dq-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px;
  border-radius: var(--r-sm); }
.dq-chip { margin-top: 0; align-self: center; }
/* THE DOOR (Squarespace): the row opens a decision and nothing on it said so.
   A chevron drawn in CSS, empty content so it reaches no reader as a word,
   and it leans in under the pointer. */
/* `a.dq-row` is the portfolio queue's row — `.pq-row` wears both classes and
   IS an anchor, so it is a door too. It is named by its element rather than
   by that class, so section B's `.pq-row` selectors keep their namespace. */
.dq-row[data-dialog]::after, .dq-row[data-detail]::after, a.dq-row::after {
  content: ""; position: absolute; right: 15px; top: 50%;
  width: 7px; height: 7px; margin-top: -4px;
  border-right: 1.5px solid var(--muted-2); border-top: 1.5px solid var(--muted-2);
  transform: rotate(45deg); transition: right .12s ease, border-color .12s ease; }
.dq-row[data-dialog]:hover::after, .dq-row[data-detail]:hover::after,
a.dq-row:hover::after { right: 12px; border-color: var(--accent); }
.dq-title { font-weight: 600; }
.dq-meta { margin-top: 3px; }

/* --- 4. THE INBOX (the Decisions page) ----------------------------------
   A list and a detail, not an unresolved 50/50 split: a fixed list column, a
   detail that keeps the rest and stays with the reader as the page scrolls,
   and both panes sharing one top edge and one height so the list never ends
   in a void beside a detail twice its length. */
.dq-inbox { grid-template-columns: 380px minmax(0, 1fr); align-items: stretch; }
.dq-list { display: flex; flex-direction: column; }
.dq-list > .dq-queue { flex: 1 1 auto; }
.dq-inbox .dq-chip { grid-row: 1; grid-column: 1; }
.dq-inbox .dq-owner { grid-row: 1; grid-column: 2; justify-self: end; }
.dq-inbox .dq-main { grid-row: 2; grid-column: 1 / -1; }
.dq-inbox .dq-row[data-dialog]::after, .dq-inbox .dq-row[data-detail]::after {
  content: none; }
/* the labels: the product's own 11.5px sans header. Uppercase, letter-spaced
   micro-type was the last of its kind on a page whose table rule reads "no
   uppercase headers", and the longest of them wrapped to two lines in it. */
.dqm-label { font-family: var(--sans); font-size: var(--t-label);
  font-weight: 600; letter-spacing: .02em; text-transform: none;
  color: var(--muted); margin-bottom: 6px; line-height: 1.35; }
/* the status ladder's pills on the same height as everything else in the pane */
.dqm-status .st-pill { min-height: var(--ctl-h-sm); padding: 0 13px;
  display: inline-flex; align-items: center; }
/* MODAL-ONLY: the pane is a copy of the dialog's innerHTML, so a rule meant
   for the pop-out is scoped under `.dq-modal` or it lands in the pane too */
.dq-modal { border-radius: var(--r-xl); box-shadow: var(--shadow-pop); }
.ov-add-btn { display: flex; align-items: center; justify-content: flex-start;
  width: 100%; min-height: 36px; padding: 0 10px; text-align: left;
  border: 1px solid transparent; border-radius: var(--r-md);
  background: transparent; color: var(--ink);
  font-size: var(--t-table); font-weight: 500; }
.ov-panel-note { color: var(--muted); }

/* THE WIDGET'S OWN CONTROL SITS ON ITS CORNER (Xero), not as a full-width
   tinted band with the label at one end and the three icons a screen away at
   the other. The band becomes a light outline on the widget's top-left edge;
   the widget itself shows that it is being arranged through the dashed
   outline it already wears. Every class and `data-act` in `_widget_bar.html`
   is exactly as it was — layout.js delegates on them, never on position. */
.ovw-bar { position: absolute; top: -13px; left: 12px; z-index: 5;
  margin: 0; padding: 0 4px 0 10px; gap: 4px;
  border: 1px solid var(--accent-line); border-radius: var(--r-pill);
  background: var(--surface); box-shadow: var(--shadow);
  font-size: var(--t-label); font-weight: 600; color: var(--accent); }
/* THE RANK LINE is the branch view's one sentence about the league table it
   links to: the rank and the share are its figures, the rest is the basis */
.branch-rank { color: var(--ink-2); }
/* Three reviewers opened 43 before/after pairs of sections A and B — fold,
   full and the true 390px phone, light and dark. Seven findings, one rule
   group each below. Two of them are sections A and B landing on the SAME
   element: the portfolio queue's row wears `dq-row` and `pq-row` together, so
   A's door chevron and B's control-borne caret both drew, and A's chip
   alignment and B's fought over the same track.

   LOOK, LAYOUT AND HIERARCHY ONLY, as in A and B: no word moves, no hook
   moves, no behaviour changes, every colour is a token with a dark value.
   Nothing here restates a pinned rule — `.dq-row.sev-act`, the two `.dq-sev`
   fills, `.dq-inbox .dq-row.selected`, `.dq-stake`'s family, the FIRST
   `.stats {` block's `border-top`, `repeat(6,` on `.ov-widgets`, `span 3` on
   `.w-half` and the `@media (max-width: 1100px)` bridge rules are untouched.

   TWO RULES ARE EDITED IN PLACE, in section B, because a later rule of mine
   would have out-ranked B's own phone override and re-imposed the desktop
   value at 390px:
     - `.console-table th.company` — 27% / 17ch becomes 30% / 22ch (rule 7).
     - `.console-table thead th:first-child` — the frozen header cell takes
       `--sum-bg`, the header row's own ground, instead of `--surface`
       (rule 4). */

/* --- 2. THE CHIP SITS ON THE TITLE'S FIRST LINE -------------------------
   The chip is the row's classifier, and centring it in the row paired it with
   whatever fragment a wrapped title happened to put at the row's middle —
   "SUSTAINED LOSS" beside "(8-mo avg)". It aligns to the top of the main
   column instead. The 1px is optical: an 18px chip holds an 11px uppercase
   cap and the 14px/1.35 title's cap sits about a pixel lower in its line box,
   so the two cap heights land on one line. The owner and the control stay
   centred — they are the row's, not the title's. */
.dq-queue .dq-row > .dq-chip { align-self: start; margin-top: 1px; }
.ov-add-btn { min-height: var(--ctl-h); padding: 0 10px;
  border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--ink);
  box-shadow: inset 2px 0 0 var(--accent-line);
  transition: background .12s ease, box-shadow .12s ease; }
/* the second block of a tab stands apart from the first */
.set-fees + .set-avg { margin-top: var(--s-6); padding-top: var(--s-5);
  border-top: 1px solid var(--line-soft); }

/* --- 2. COST CODES READS AS A LIST (Midday, Quicken) ----------------------
   THE FILTER is the kit's filter bar: its fields at the control height on
   the kit's edge (visible in dark), the search the one control that grows. */
.set-codes .codes-filter {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  max-width: none; margin: 0 0 var(--s-3);
}

/* THE LEGEND IS ITS OWN BLOCK under the table it explains: "What the tags
   mean:" as its label line, then one row a tag — the pill in a column of
   its own, what it means beside it. The run-on separators step aside. */
.set-codes .codes-legend {
  margin: var(--s-4) 0 0; padding: 10px var(--s-4) 8px; max-width: 760px;
  font-size: var(--t-sm); line-height: 20px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
}
/* what an untagged code leaves dark: the legend's own footnote */
.set-codes .codes-untagged {
  margin: var(--s-3) 0 0; max-width: 88ch;
  font-size: 12px; line-height: 18px; color: var(--muted);
}
.fees-table .gl { margin-left: 4px; }
[id^="modal-fee-"] .rate-list { gap: 6px 8px; margin: 0 0 10px; }
[id^="modal-fee-"] .rate-step {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: var(--ctl-h-sm); padding: 0 10px; font-size: var(--t-sm);
  font-variant-numeric: tabular-nums;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.setup-steps .setup-step {
  position: relative; align-items: flex-start; gap: 12px;
  padding: 11px 14px; border: 1px solid transparent;
  border-bottom-color: var(--line-soft);
}
/* THE MARK: a hollow ring still to do, a half-filled amber ring partly done,
   a filled green disc with its tick done (the tick is drawn, not a glyph) */
.setup-steps .setup-mark {
  position: relative; box-sizing: border-box; flex: none;
  width: 16px; height: 16px; margin-top: 2px;
  border: 1.5px solid var(--muted-2); border-radius: 50%; background: transparent;
}
.setup-steps .setup-title {
  grid-column: 1; grid-row: 1; justify-self: start; margin: 0;
  font-size: var(--t-table); font-weight: 600; line-height: 20px; color: var(--ink);
}
.setup-steps .setup-status { grid-column: 2; grid-row: 1; justify-self: end; }
.setup-steps .setup-detail {
  grid-column: 1; grid-row: 2; margin: 0; max-width: 96ch;
  font-size: var(--t-table); line-height: 19px; color: var(--ink-2);
}
/* A COMPANY FROM ITS LEDGER (SPEC §6.140): guided setup is two short lists
   under their headings; the wizard's cost codes are one data table grouped
   by what each account counts as, a compact field in each cell, with the
   tick count under it; categories and lines added, and the people, are the
   same table grammar. On a phone the tables scroll in their wrapper. */
.setup-list + .setup-list { margin-top: var(--s-5); }
.setup-list-title {
  margin: 0 0 var(--s-2); font-size: var(--t-13); font-weight: 600; line-height: 18px;
  color: var(--ink);
}

/* --- 3. THE CODES CARD'S BODY TAKES THE CARD'S INSET (5.5) ----------------
   The filter, the New category card, the legend and the untagged footnote
   sat on the card's edge (A's card has no padding, for its tables). They
   take the head's 20px. The legend is a SECTION of the card under a top
   hairline, never a card inside the card; the footnote has air under it. */
.set-codes > .codes-filter { padding: 0 20px; margin: 0 0 var(--s-3); }
.set-codes > .codes-untagged {
  margin: 0; padding: 0 20px 16px; max-width: calc(88ch + 40px);
}

/* -- 3. THE REVIEW BUTTON -------------------------------------------------
   the row's action is a real button now: the geometry above stands, the
   button's own type and pointer are set here. In the Insights page's inbox
   the pane beside the queue is the review, so the button stays out of sight
   until the keyboard reaches it, and the row it belongs to wears the ring. */
/* the row's own line height, so the label sits in the box where the old
   span's did: the box is where it was, and the label, a pixel lower, is
   nearer its centre */
button.dq-review { font-family: inherit; line-height: inherit; cursor: pointer; }
.dq-inbox .dq-row { position: relative; }
.dq-inbox .dq-review { display: inline-flex; position: absolute; width: 1px; height: 1px;
  min-height: 0; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%);
  border: 0; white-space: nowrap; }
.dq-inbox .dq-row:has(> .dq-review:focus-visible) { outline: 2px solid var(--accent);
  outline-offset: -2px; }

/* -- 4. TEXT ON A TINT CLEARS 4.5:1, AT THE 11PX FLOOR ---------------------
   the ok and warn tints now carry their own ink (--ok-ink, --warn-ink), and
   the tags under the product's own 11px floor come up to it */
.band-tag, .health.band .verdict-draft, .verdict-draft, .signal-band { font-size: var(--t-12); }
.band-tag.ok, .signal-band.band-improving { color: var(--ok-ink); }
.health.band .verdict-draft, .signal-band.band-softening, .hedge-tag,
.widget-flag { color: var(--warn-ink); }

/* -- 5. WHITE TEXT ON A FILL WEARS THE FILL TOKEN --------------------------
   the assistant's Ask and the league flag's hover put ink on the TEXT accent
   (3.0:1 and 2.5:1 in dark, 3.35:1 for the flag in light); --accent-fill is
   the fill that clears 4.5:1 under --on-accent in both themes */
.ask-send { background: var(--accent-fill); color: var(--on-accent); }
/* the branch card's Month form sits on its label line since the one-verdict
   pass (SPEC §6.75), which leaves it the whole row at 960 */
/* an insight's at-stake note names its window in words, "(3-month avg)", and
   on a phone (360-390px) the queue row broke it as "(3-" / "month avg)" or
   "(3-month" / "avg)". The window is one phrase: it moves to the next line
   whole, and the note still wraps before it. The company queue and the
   portfolio queue both print it (`_decisions.html`, `portfolio_decisions.html`). */
.dq-window { white-space: nowrap; }
.sig-text { flex: 0 1 auto; min-width: 0; margin: 0; font-size: 13px; line-height: 1.45;
  color: var(--ink); text-wrap: pretty; }
.verdict-holding { color: var(--ink); }

/* -- 4. "OPEN THE QUEUE" IS QUIET ---------------------------------------------
   an ink-filled button whose act is to leave the page was the heaviest thing
   above the fold; the card's close is the one filled action now */
.dq-open-queue { background: none; color: var(--accent) !important; padding: 0;
  border-radius: 0; font-weight: 600; }
.dq-open-queue:hover { background: none; text-decoration: underline; }

/* -- 4. A CHANGE THAT FAILED SAYS SO IN THE INSIGHT'S OWN INSET ---------------
   decisions.js (`failed()`) puts one `.notice.warn.dq-save-err` in the
   insight, above the part whose form failed — in the Overview's dialog or
   the Insights page's pane — or after the resolved row whose reopen failed.
   The dialog and the pane carry no padding of their own (their parts are
   inset 20px) and a notice brings a 14px 0 margin, so it ran from edge to
   edge between two ruled parts: it takes the parts' inset, as the Customize
   panel's `#ov-save-err` does (block F). Under a resolved row it keeps the
   list's own edge. A failed owner Save puts it by its own form, before the
   insight's buttons (`.dqm-btns`, review 2026-09-30), inside a column the
   body already insets: it keeps that edge and sits 12px above the
   buttons. */
.dq-modal > .dq-save-err, .dq-detail > .dq-save-err { margin: 0 20px 12px; }

/* the money at stake: two named figures on one line */
.ig-money { margin: 8px 0 0; font-size: var(--t-sm); line-height: 20px; color: var(--ink-2); }
.deck-counts { font-size: var(--t-sm); font-weight: 400; color: var(--muted); margin-left: 6px; }
.deck-label { font-size: var(--t-label); font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 3px; }
.deck-line { margin: var(--s-1) 0 0; font-size: var(--t-13); line-height: 1.5; color: var(--ink-2); }
.deck-line-k { font-weight: 600; color: var(--ink); margin-right: var(--s-1); }
.ig-sync-state:not([hidden]) {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  min-width: 34px; padding-top: 1px; font-weight: 600; color: var(--ink);
}
.ig-bar:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 0 20px 12px; }
.ig-showoff:not([hidden]) {
  display: inline-flex; align-items: center; gap: 6px; margin-left: auto;
  font-size: var(--t-sm); color: var(--ink-2); white-space: nowrap;
}
.ig-pop-edit:not([hidden]) {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 14px 0 0;
  padding: 10px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  font-size: var(--t-table); color: var(--ink-2);
}
.ig-pop-figs:not([hidden]) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0 0; }
.ig-pop-figs .l { font: 500 12px/16px var(--sans); color: var(--muted); }
.ig-pop-figs .n { font: 600 18px/24px var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.ig-pop-kv:not([hidden]) {
  display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 12px; margin: 14px 0 4px;
  font-size: var(--t-sm);
}
.ev { flex-direction: column; gap: 10px; margin: 12px 0 0; font-size: var(--t-14); line-height: 1.5;
  color: var(--ink-2); }
.ev-rule { margin: 0; color: var(--ink); }
.ev-part-amt { font-variant-numeric: tabular-nums; color: var(--ink); }

/* --- 2. THE TABS AND THE EDITOR ------------------------------------------ */
.ig-tabs:not([hidden]) {
  display: flex; gap: 18px; padding: 8px 20px 0; border-bottom: 1px solid var(--line);
}
/* The Insights page groups its rows under what they are about (a band per
   area, the queue's order inside it); every row carries its since-last-week
   mark (new is attention, still flagged ink, no longer flagged muted: never
   a loss); the All companies console prints each company's top insight and
   that mark; the management report prints the evidence under each insight
   as the deck does, restyled from the sheet's own selector. On the kit's
   tokens; after the FORMULA HELP header: no `--err`, no hex, `:not([hidden])`
   on every visible display. */
.dq-area { border-bottom: 1px solid var(--line); }
.dq-area:last-child { border-bottom: 0; }
.dq-area-h { margin: 0; padding: 9px 16px 6px; font: 600 var(--t-12)/16px var(--sans);
  letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  background: var(--surface-2); border-bottom: 1px solid var(--line); }
.dq-area-n { margin-left: 4px; font-weight: 500; color: var(--ink-2);
  font-variant-numeric: tabular-nums; }
.dq-area .dq-row:last-child { border-bottom: 0; }
.dq-since { white-space: nowrap; }
.dq-area-word { color: var(--ink-2); }
/* FOLLOW THROUGH (SPEC §6.123): a passed due date and "Looks fixed" are the
   kit's tag (`.badge warn`, `.badge ok`), never a colour of their own;
   "Looks fixed" takes the eased word's place on a worked row, and the row's
   one "Close it" sits under its sentence; the line after an act carries its
   Undo beside it; the insight's own "Not a problem" opens its four reasons
   in a column */
.dq-overdue, .dq-fixed { margin-left: 4px; }
.dq-close-it { grid-column: 2; justify-self: start; margin: 4px 0 0; }
.dq-notice:not([hidden]) { display: flex; align-items: baseline; flex-wrap: wrap;
  gap: 4px 12px; }
.dq-notice form { margin: 0; }
/* THE INSIGHTS PAGE AS DRAWN (SPEC §6.132): one list, one detail. A row is
   one link (`.dq-pick`): the title with its dollars at the right on the first
   line, the type as its caption, the person and the overdue tag beside it */
.dq-inbox .dq-row.dq-pick { color: inherit; text-decoration: none; cursor: pointer; }
.dq-inbox .dq-pick .dq-main { grid-row: 1; grid-column: 1 / -1; }
.dq-inbox .dq-pick .dq-chip { grid-row: 2; grid-column: 1; justify-self: start; }
.dq-inbox .dq-pick .dq-owner { grid-row: 2; grid-column: 2; }
.dq-inbox .dq-pick .dq-meta { grid-row: 3; grid-column: 1 / -1; margin: 0; }
.dq-pick .dq-title:not([hidden]) { display: flex; align-items: baseline; gap: var(--s-3); }
.dq-pick .dq-title-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
/* in the list beside the detail the column is narrow: the window sits under
   the dollars, and both stay clear of the row's chevron */
.dq-inbox .dq-pick .dq-fig { padding-right: var(--s-3); }
.dq-inbox .dq-pick .dq-fig .dq-window:not([hidden]) { display: block; }
/* the group headings are words, not labels: the bare `h2` rule's capitals off */
.dq-area > h2.dq-area-h { text-transform: none; letter-spacing: normal; }
.dq-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.dq-inbox .dq-empty { padding: var(--s-4); margin: 0; }
main.page-reading .dq-chip, main.page-reading .dq-filters a span { font-size: var(--t-12); }

@media (max-width: 1240px) {
  .dq-inbox { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .dq-detail { position: static; }
}

@media (max-width: 1240px) {
  .dq-detail { position: static; }
}

/* `align-self: start` is what lets it stay sticky inside a stretch row; no
   inner scroller, because the help centre's picture crops this element and a
   capped pane would crop with it */
.dq-detail { align-self: start; position: sticky; top: 16px;
  border-radius: var(--r-lg); padding: 4px 0 14px; }

@media (max-width: 1240px) {
  .dq-detail { position: static; max-height: none; }
}

@media (max-width: 900px) {
  .dq-detail:not([data-open]) { display: none; }
}

@media (max-width: 640px) {
  .stats > .stat, .branch-facts > .fact {
    border-left: 0; padding: 0; }
  .dq-row[data-dialog]::after, .dq-row[data-detail]::after { right: 11px; }
  .ig-showoff:not([hidden]) { margin-left: 0; }
}

@media (width <= 640px) {
  .set-block-head.settings-head, .set-block-head { flex-wrap: wrap; padding: 14px 16px 12px; }
  .set-codes .codes-legend { padding-left: 12px; padding-right: 12px; }
}

.set-codes > .codes-legend {
  margin: 0; padding: 12px 20px 12px; max-width: none;
  background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0;
}

@media (width <= 640px) {
  .setup-steps .setup-status { grid-column: 1; grid-row: 2; justify-self: start; margin: 2px 0; }

/* --- 14. THE PHONE (390px is a designed width) ---------------------------- */
  .set-codes > .codes-filter { padding: 0 16px; }
  .set-codes > .codes-legend { padding-left: 16px; padding-right: 16px; }
  .set-codes > .codes-untagged { padding-left: 16px; padding-right: 16px; }
}

@media screen and (max-width: 640px) {
/* --- THE PHONE ---------------------------------------------------------- */
  /* 1, on the phone: the stacked row shows ONE chevron, centred on the row's
     right. The gutter comes down to A's 26px and the glyph to A's 11px, so
     both queues' doors sit at the same x at this width too. */
  a.dq-row::after { right: 11px; }
  a.dq-row:hover::after { right: 8px; }
}

@media print {
  .setup-steps .setup-step { break-inside: avoid; }
}

@media (width <= 640px) {
  .setup-steps .setup-step { padding: 12px 10px; }
}

.ig-tabs > [role="tab"] {
  appearance: none; background: none; border: 0; border-bottom: 2px solid transparent;
  margin-bottom: -1px; padding: 6px 0 10px; font: inherit; font-size: var(--t-table);
  font-weight: 500; color: var(--muted); cursor: pointer;
}
/* the figure and its window at the right of the title: the window may drop
   under the dollars at a narrow width, never into the title's room */
.dq-pick .dq-fig { flex: 0 0 auto; margin-left: auto; text-align: right; white-space: nowrap; }
.dq-pick .dq-amount { margin-left: 0; white-space: nowrap; }

/* ===== THE KIT: THE DETAIL PANEL [kit-detail] =====
   The panel beside a list that holds one item's detail.
*/

.notice ul { margin: 8px 0 0; padding-left: 20px; }
.dqm-assign summary::-webkit-details-marker { display: none; }
.dqm-record input { flex: 1; border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 12px; font: inherit; font-size: 13px; }
.dec-form input { border: 1px solid var(--line); border-radius: 7px; padding: 5px 9px;
  font: inherit; font-size: 13px; }
.ask-form input {
  flex: 1; border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 11px; font: inherit; font-size: 13px; min-width: 0;
}
.contract-steps li { padding: 0; }
.dqm-title { margin-top: 10px; }
.dqm-copy { line-height: 1.55; }
/* a decision's record field on the kit's own primitive, and its control on
   the kit's geometry */
.dqm-record { align-items: center; gap: var(--s-2); }
.dqm-record input { min-height: var(--ctl-h); padding: 0 11px;
  border: 1px solid var(--field-line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); }
.dqm-record-btn { min-height: var(--ctl-h); padding: 0 16px;
  border-radius: var(--r-md); }
.contract-steps li {
  flex: 0 1 auto; display: flex; align-items: center; min-width: 0;
  margin: 0; padding: 0; background: none; border: 0; border-radius: 0;
  color: var(--muted); font-size: var(--t-sm); font-weight: 600;
}
.dqm-action > .dq-save-err { margin: 0 0 12px; }
.ig-tabs > [role="tab"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dqm-drop { margin-left: auto; }
.dqm-drop > summary { list-style: none; cursor: pointer; }
/* the window after a figure is the UI face, muted: the row's and the detail's */
.dq-pick .dq-stake, .dqd .dq-stake { font-family: var(--sans); font-weight: 400;
  color: var(--muted); }
.dqd .dq-stake { white-space: nowrap; }
/* the detail in the page: the kit's panel parts without the dialog */
.dqd { padding: 0 var(--s-4) var(--s-2); }
.dqd .dqm-head:not([hidden]) { display: flex; align-items: center; gap: var(--s-2); }
.dqd .dqm-title { line-height: 1.3; outline: none; }
.dqd .dqm-title:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dqd .dqm-body { padding: 0; }
.dqd-pic { margin: var(--s-3) 0 0; }
.dqd-pic rect { fill: var(--accent); opacity: .45; }
.dqd-pic rect.fired { opacity: 1; }
.dqd-pic-ends:not([hidden]) { display: flex; justify-content: space-between;
  font-size: var(--t-13); color: var(--muted); margin-top: var(--s-1); }
.dqd-clears { margin: var(--s-3) 0 0; line-height: 1.5; }
/* LAYOUT B, A CASE FILE (owner decision 2026-11-16, SPEC 6.156). The detail
   sizes itself, not the window: beside the Insights list, full width under
   1240px, in the Overview's narrow panel. 640px of detail or more: the
   finding and its numbers on the left, where it stands, the next step and
   the notes in a column on the right. Narrower: the side first under the
   title, so the next step stays near the top (D4), then the main, then the
   notes. The markup is in that order, so the keyboard reads it as seen. */
.dqd { container: insight / inline-size; }
.dqd-grid:not([hidden]) { display: grid; gap: var(--s-4); margin-top: var(--s-3);
  grid-template-columns: minmax(0, 1fr); grid-template-areas: "side" "main" "notes"; }
.dqd h3.dqm-label { margin: 0 0 var(--s-2); }
.dqd-side:not([hidden]) { grid-area: side; display: flex; flex-direction: column;
  gap: var(--s-4); padding: var(--s-3) var(--s-4); background: var(--sum-bg);
  border: 1px solid var(--line-soft); border-radius: var(--r-md); }
.dqd-main:not([hidden]) { grid-area: main; min-width: 0; display: flex;
  flex-direction: column; gap: var(--s-4); }
.dqd-main > section { min-width: 0; }
.dqd-facts:not([hidden]) { display: grid; grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s-2) var(--s-3); margin: 0; font-size: var(--t-13); }
.dqd-facts dt { color: var(--muted); }
.dqd-facts dd { margin: 0; min-width: 0; }
.dqd-owner:not([hidden]) { display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: var(--s-1) var(--s-2); }
.dqd-owner .dqm-assign > summary { cursor: pointer; }
.dqd-owner .dqm-assign[open] { flex-basis: 100%; }
.dqd-nobody { color: var(--warn-ink); font-weight: 600; }
.dqd-acts:not([hidden]) { display: flex; flex-direction: column; align-items: stretch;
  gap: var(--s-3); margin: 0; padding: 0; border: 0; }
.dqd-acts form { margin: 0; }
.dqd-act:not([hidden]) { display: flex; flex-direction: column; gap: var(--s-1); }
.dqd-acts .dqm-drop { margin-left: 0; }
.dqd-acts .dqm-drop > summary:not([hidden]) { display: inline-flex; align-items: center;
  justify-content: center; min-height: var(--ctl-h); padding: 0 var(--s-3);
  border-radius: var(--r-md); box-sizing: border-box; }
.dqd-acts .dqm-open { margin-left: 0; align-self: flex-start; }
.dqd-hint { font-size: var(--t-13); color: var(--muted); }
.dqd-finding { margin: 0; font-size: var(--t-16); line-height: 1.5; }
.dqd-asof { margin: 0 0 var(--s-2); }
.dqd-resolves { padding: var(--s-3) var(--s-4); background: var(--sum-bg);
  border: 1px solid var(--line-soft); border-radius: var(--r-md); }
.dqd-clears { margin: 0; line-height: 1.5; }
.dqd-ways { margin: var(--s-2) 0 0; line-height: 1.5; }
.dqd-ways-label { font-weight: 600; }
.dqd-why { margin: 0; }
.dqd-why > summary { cursor: pointer; }
.dqd-why-body { margin-top: var(--s-2); font-size: var(--t-13); line-height: 1.55; }
.dqd-why-body .dqm-label:not([hidden]) { display: block; margin-bottom: var(--s-1); }
.dqm-notes.dqd-notes { grid-area: notes; margin: 0; padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line-soft); border-radius: var(--r-md); }
.dqd-notes .dqm-record { margin: 0 0 var(--s-3); }
.dqd-notes .dqm-note:not([hidden]) { flex-direction: column; gap: var(--s-1); }
.dqd-family { margin: var(--s-3) 0 0; }
.dqd-family ul { margin: var(--s-1) 0 0; padding-left: var(--s-4); }
.dqd-family li { margin: 0 0 var(--s-1); line-height: 1.5; }
/* THE INSIGHTS OF EVERY COMPANY (SPEC 6.143): the way from an insight's
   detail to its company's own page */
.dqd-company { margin: var(--s-3) var(--s-4) var(--s-2); }
main.page-reading .dqm-label, main.page-reading .dqm-src, main.page-reading .dqm-note-by { font-size: var(--t-12); }
main.page-reading .dqm-copy { font-size: var(--t-14); }
main.page-reading .dqm-title:not(.dqm-title-sentence) { font-size: var(--t-20); }

@media (max-width: 900px) {
  .dq-detail[data-open] .dqd-back:not([hidden]) { display: inline-flex; align-items: center;
    justify-content: center; min-width: var(--ctl-h); min-height: var(--ctl-h); }
}

@container insight (min-width: 640px) {
  .dqd-grid:not([hidden]) { grid-template-columns: minmax(0, 1fr) 248px;
    grid-template-rows: auto 1fr; grid-template-areas: "main side" "main notes";
    align-items: start; }
}

/* ===== THE KIT: THE SAVE BAR [kit-save-bar] =====
   The bar that holds a form's save and what it will do.
*/

/* `.chip-forecast` is GONE (review 2026-09-08, N10): the one static label
   wearing it — the revenue trend's "actuals → forecast" — is a `.badge kind`,
   the page's one label primitive. `.chip` is left to the pressed filters. */
/* the plan of record is a STATE, not an achievement — neutral (F8) */
#save-state { font-size: 13px; }

/* ===== THE KIT: HOW TO READ THIS [kit-how-to-read] =====
   The page's one panel of definitions.
   --- kept from an old banner ---
   THE KIT · D · after the review (2026-09-21)
*/

/* --- 10. "HOW TO READ THIS" (UI rule 5, SPEC §6.124) ----------------------
   The page's one panel of definitions: a `<details>` whose summary is the
   quiet control in the page head (section D, 1, gives it the control's
   geometry there), closed on load. The body drops under the control on a
   card's ground; on a phone it spans the screen between the gutters, from
   where the control sits. `_kit.html` how_to_read. */
.how-to-read { position: relative; }

/* ===== THE KIT: NOTICES AND EMPTY STATES [kit-notice] =====
   A notice (information, warning, refusal) and the empty state of a list.
*/

/* attest branch readiness (GSB Phase 1) */
.warn-text { color: var(--warn); font-weight: 600; }
.notice.gen-result.ok { background: var(--surface); border-color: var(--line); }
.notice.gen-result p { margin: 8px 0 0; }
.notice.gen-result ul { margin: 6px 0 0; }
.notice.gen-result li { margin-bottom: 2px; }

/* --- 8. THE FOOT IS A SUMMARY BAR (Zendesk Sell) --------------------------
   The open tab's subtotal on `--surface-2` at 600, the whole book on the
   surface under the pinned 1.5px ink rule at 700 — the two pinned rule heads
   above stand, these extend them. In dark `--surface-2` is LIGHTER than the
   surface, so the subtotal sat raised over the total it leads to; in both
   themes it is now a step BELOW the surface, the band a reader passes on the
   way to the anchor. A subtotal with no figures (a one-row tab) is a
   caption, not a band. */
:root[data-theme="dark"] .contracts-table > tfoot > tr.subtotal > :is(td, th),
:root[data-theme="dark"] .contracts-table > tfoot > tr.subtotal:hover > :is(td, th) {
  background: color-mix(in srgb, var(--surface) 60%, var(--bg));
}
/* the anchor: the one figure a step larger, under the 1.5px ink rule — the
   row above gives up its hairline, which won the collapsed-border tie */
.contract-panel .review-table tbody tr:has(+ tr.total) > * { border-bottom: 0; }
.contract-panel div.signoff > p { margin: 0 0 4px; }

/* A JOURNAL AND ITS LEGS ARE ONE OBJECT (Deel). The band carries the pair's
   figures at 600 — the total — and its legs the same money one row down at
   400 in `--ink-2`, the parts; band and legs share one ground and one 2px
   accent rule down their left edge, so the three rows read as one entry.
   The rule is `--accent-line`: `--accent-soft` is a FILL, and on the band's
   `--surface-2` it measures 1.07:1 (1.13:1 dark) and does not draw; the
   line token is 1.39:1 (1.68:1). It is drawn by
   the first cell of each row (the pinned empty `td.leg-date` on a leg), 1px
   in from the card's edge, and runs 1px over the row's own hairline, so it
   never breaks between rows. */
table.dt.ledger-table tr.ledger-journal > :is(td, th),
table.dt.ledger-table tr.child-row[data-journal] > :is(td, th) { background: var(--surface-2); }

/* A REPEATED ROW IS A DOOR (Quicken, Airtable). It stands for the rows it
   folds, so it is set as a row — the surface, the row's own weights, its
   subtotal at 600 — with a 16px chevron (the `::before` mechanism kept, a
   mask for the glyph) that turns down when open. The whole name cell is the
   button's target, and the band answers the pointer: the one row on the
   page that opens is the one row that says so. A journal's band has no
   chevron and no door; it is already open. */
table.dt.ledger-table tr.ledger-repeat > :is(td, th) {
  background: var(--surface); font: 400 var(--t-table)/18px var(--sans); color: var(--ink);
}

/* --- 7. THE SUMMARY AND THE RECONCILIATION (Customer.io) ----------------
   The result is one comma-spliced sentence, not nine separable counts, so
   it stays a sentence (lead decision) and takes the notice grammar family 4
   gave the schedules' result: a `--line` edge, tabular figures, and a
   surface where it reports and nothing needs a person. The review case keeps
   its attention ground. Scoped to the one page that holds the import. */
main:has(#modal-gl-import) > div.notice:is(.ok, .warn):not(.gen-result) {
  line-height: 20px; font-variant-numeric: tabular-nums;
}
main:has(#modal-gl-import) > div.notice:is(.ok, .warn):not(.gen-result) > strong {
  font-weight: 650; color: var(--ink);
}
/* the child row keeps its step under its parent: 20px plus the list's 24 */
.set-block > .tablewrap > table.list-table > tbody > tr.child-row > :first-child { padding-left: 44px; }
.set-block table.proforma-table tr.proforma-narrative p { max-width: 90ch; line-height: 1.5; }
main:has(> section.close-month) > p.notice.ok a { font-weight: 600; }

main:has(> section.close-month) > .notice { margin: 0 0 var(--s-3); }
main.page-reading .notice { font-size: var(--t-14); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .contracts-table > tfoot > tr.subtotal > :is(td, th),
  :root:not([data-theme="light"]) .contracts-table > tfoot > tr.subtotal:hover > :is(td, th) {
    background: color-mix(in srgb, var(--surface) 60%, var(--bg));
  }
}

.contracts-table > tfoot > tr.subtotal > th[scope="row"]:only-child,
.contracts-table > tfoot > tr.subtotal:hover > th[scope="row"]:only-child {
  padding-top: 7px; padding-bottom: 7px;
  font-size: 12px; font-weight: 400; line-height: 16px; color: var(--muted);
  background: var(--surface); border-top: 1px solid var(--line-soft);
}

@media (width <= 700px) {
  .contracts-table > tbody > tr.contract-row:hover > th[scope="row"] { background: var(--surface-2); }
}

/* Family 5, the fix block. Three Opus reviewers read the merged renders
   against the family 4 baseline (1440 light and dark, a true 390px phone,
   the pop-outs opened to every stage) and found no blocker: four
   should-fixes and a run of nits, answered here in CSS, appended. What is
   accepted as it stands is written down at the end. */

/* --- THE FOOT'S SUBTOTAL IS THE TOKEN, IN BOTH THEMES ------------------ */
/* The research called the dark foot "inverted"; section A measured the
   baseline and found the subtotal LIGHTER than the total, then made it
   darker on purpose. The review read the darker band as sunken below the
   header, the rows and the total. There was no inversion to fix: a
   subtotal band is `--surface-2`, the one step off the surface the grid's
   totals and every list table use, and the dark palette already says what
   that step is. The figure-less one-row caption keeps its surface (section
   A's more specific rule). */
:root[data-theme="dark"] .contracts-table > tfoot > tr.subtotal > :is(td, th),
:root[data-theme="dark"] .contracts-table > tfoot > tr.subtotal:hover > :is(td, th) {
  background: var(--surface-2);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .contracts-table > tfoot > tr.subtotal > :is(td, th),
  :root:not([data-theme="light"]) .contracts-table > tfoot > tr.subtotal:hover > :is(td, th) {
    background: var(--surface-2);
  }
}

@media (max-width: 640px) {
  #main :is(table.sh-kpis, table.ev-table) > * > tr > :is(.sh-status, .ev-state, th:last-child:not(.num)) { grid-column: -2 / -1; grid-row: 1;
    color: var(--muted); font-size: var(--t-12); text-align: right; }
}

@media (width <= 640px) {
  .set-block > .tablewrap > table.list-table > tbody > tr.child-row > :first-child { padding-left: 38px; }
}

/* --- 2. THE NOTICES ON THE KIT'S GRAMMAR ------------------------------------
   A month already published is a statement of fact that asks nothing of a
   person: the surface, a `--line` edge, its four facts a line each (the words
   and the one `<p>` unchanged; each fact is a span). The record of a warning
   it was published over is the same neutral card. */
main:has(> section.close-month) > p.notice.ok,
main:has(> section.close-month) > p.notice:not(.ok):not(.warn):not(.error) {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 12px 20px 13px;
  font-size: var(--t-table); line-height: 20px; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

/* ===== THE KIT: POP-OUTS AND THE CONFIRM [kit-popout] =====
   The pop-out shell every dialog wears (access-modal), the named dialogs and the in-page confirm.
   --- kept from an old banner ---
   PRODUCT GROUPS (SPEC §6.110) · the catalog's bands fold
   PLAN ROWS PER JOB AND A PERCENT OF A COST CODE (SPEC §6.115)
      The staffing row's hours cell carries what the hours are under the figure;
      a percent row's second picker sits under its basis; "How often is the work
      done?" opens the plan and is hidden on a per-unit contract, which says it
      in its pricing.
*/

.year-nav strong { padding: 0 6px; font-variant-numeric: tabular-nums; }
table.grid thead th { position: sticky; top: 0; background: var(--surface); z-index: 2;
  padding: 8px 8px; text-align: right; min-width: 90px; vertical-align: bottom;
  border-bottom: 1px solid var(--line); }
/* an author `display:flex` overrides the UA `[hidden]{display:none}`, so the
   attribute must be re-asserted or the modal renders (open) on page load and
   toggling `hidden` never actually hides it */
.access-modal[hidden] { display: none; }
.catalog-total strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.pdelta::before { content: ""; display: inline-block; width: 7px; height: 7px;
  border-radius: 50%; margin-right: 5px; vertical-align: 1px; background: var(--line); }
.health.band .narrative p.lead { font-size: var(--t-16); }
.pub-summary strong { color: var(--ink); font-weight: 600; }
.dm-delta::before { content: ""; display: inline-block; width: 7px; height: 7px;
  border-radius: 50%; margin-right: 6px; vertical-align: 3px; }
tr.line-row:hover .line-cell .line-name{ min-width: 0; }

/* --- S12: the band carries the unit its rows share ------------------- */
.driver-grid tr.group-row .band-inner .unit { font-weight: 400;
  color: var(--muted); }
.access-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); }

/* a computed metric cell invites the hover that explains it (owner request 2026-09-11) */
.driver-grid td.num .computed-cell[data-bd-series] { cursor: help; border-bottom: 1px dotted var(--muted); }
/* ==== Phase C: the words (2026-09-17, SPEC §6.55) ==== */
/* COGS BECAME WORDS (owner decision 2026-09-17). The grid's classify badge
   used to be four characters and is now four words, so inside the 252px line
   column it was clipped to "cost of doing the wo". It wraps instead: the
   line name gives way first, then the badge takes two short lines. The type
   size is unchanged — nothing here goes under 11px. */
table.grid .line-cell .badge.kind { white-space: normal; line-height: 1.25;
  text-align: left; flex: 0 1 auto; min-width: 0; }
.book-line strong { color: var(--ink); font-variant-numeric: tabular-nums; }
/* THE KIT · B · the pop-out                                                 */
/* This block DECLARES no token: `--scrim`, `--shadow-pop`, `--r-xl`,
   `--r-md` and `--t-sm` come from section A of the Foundation kit. */

/* ONE CHROME for every pop-out in the product. Before this block there were
   two: `.access-panel` (twenty-eight pop-outs) and the grid's own
   `#fx-modal .fx-dialog`. They disagreed on the scrim, the radius, the
   shadow and the close control, and in dark neither separated from the page
   — a navy scrim over a near-black ground removes almost no luminance and a
   `rgba(15,23,42,.28)` shadow is invisible on it. Separation in dark now
   comes from the border and the hairline ring inside `--shadow-pop`, not
   from a shadow nobody can see. */

/* -- the overlay and its scrim ------------------------------------------- */
/* `.dec-add { margin-top: 10px }` is a leftover from the days when a new
   decision was an inline disclosure. On a `position: fixed; inset: 0`
   overlay it pushes the whole box down, so the Decisions page dimmed the
   viewport from y=10 and left a lit band across the top of the rail and the
   page head. An overlay has no margin. */
.access-modal { margin: 0; }
.access-head strong { font-size: 15px; font-weight: 650; line-height: 1.25; }
#ov-reset:hover { color: var(--accent); }
#league-card .league-wrap { margin: 10px 0 12px; }
/* the footnote carries what only a footnote can (the plan's name, the
   contribution basis, the whole behind-plan rule) and it is READ: 11.5px was
   the smallest type on the card. Three lines or fewer at 12px (SPEC §6.37). */
#league-card .league-foot { font-size: 12px; line-height: 1.5;
  max-width: 96ch; margin: 0 0 6px; }
#league-card .league-sofar { font-size: 12.5px; margin: 0 0 8px; }
/* a two-tag row's name floor is 70px, so its cluster may have 20px more */
/* THE ONE EXCEPTION, and the arithmetic for it. A provenance BESIDE a tag
   wants 56 + 4 + 35px at best and 75 + 4 + 35px at worst, and 76px exist.
   Ellipsing to "7 …" answers "was this cut?" and destroys "cut from what?".
   So a cluster carrying BOTH sets the tag under the label — inside the
   row's own 34px, two 14px lines, no row moves — and both are whole. It is
   a COLUMN at rest, not a wrapped line, so the cluster is as wide as its
   longer label and no wider: a wrapped flex line keeps the width of both
   labels end to end, which at the half screen took the name's second line
   ("Bin Cleaning Revenue" read "Bin / Cleaning…"). With the row's controls
   showing it is one line again, as every hovered row is. */
/* The label reserves nothing and hugs its text, so the cluster's own
   `justify-content` keeps it flush right on a row whose tag has dropped
   below it. (`text-align: right` here costs the ellipsis: the line box then
   overflows at the START and the mark is never drawn.) */
/* a badge may wrap at a space; it may never be cut inside a word. The
   four-word classify tag keeps the wrap the words pass gave it —
   `min-content` is its longest word, not its whole string — and "REQ" and
   "CASH" stop rendering as "RE" and "CA". */
table.grid .line-cell .badge.kind { min-width: min-content; }
/* the row's own controls — unlock, plan, settings, and the roll-forward's
   act — are the kit's quiet icon button at the row's scale: they took the
   browser's grey chrome inside the sheet (the kit's quiet role stops at
   `table.grid`) and a 32 x 22px box that crowded the name the moment a row
   was hovered. 18 x 16px, no box, the accent under the pointer. */
table.grid .line-cell .cash-roll > .linklike {
  -webkit-appearance: none; appearance: none;
  align-items: center; justify-content: center; gap: 4px;
  min-width: 18px; height: 16px; margin: 0; padding: 0 1px;
  border: 0; border-radius: var(--r-sm); background: transparent;
  color: var(--muted); font: inherit; font-size: 12px; font-weight: 500;
  line-height: 1; white-space: nowrap; cursor: pointer; }
.driver-grid td.num .computed-cell[data-bd-series] { border-bottom-color: var(--muted-2); }
.fx-add .setup-form :is(input[type="text"], input[type="month"], select):focus {
  border-color: var(--accent);
}
table.grid .col-head .month-switch:hover { border-color: var(--accent); color: var(--accent); }

/* --- 10. THE CLIENT POP-OUT ------------------------------------------------
   The family's one footer (the template now wraps Save in `.access-foot`,
   the kit's reference arrangement), and the decision the panel exists for
   reads as one: "Growth assumption" at 13px/600 in ink, its explanation on
   its own line under it at 12.5px, muted — they were one three-line
   paragraph at one size and colour. The words are verbatim. */
.access-modal[id^="modal-client-"] .form-grid > label.check-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  column-gap: var(--s-2); align-items: baseline;
  margin: var(--s-3) 0 var(--s-1);
  font-size: var(--t-table); font-weight: 600; line-height: 20px; color: var(--ink);
}
.access-modal[id^="modal-client-"] .access-body { padding-bottom: var(--s-4); }
#modal-save-formula .fx-save-formula {
  width: fit-content; max-width: 100%; margin: 0 0 6px; padding: 5px 10px;
  background: var(--surface-2); border-radius: var(--r-sm);
  color: var(--ink-2); font-size: var(--t-sm);
}
#imported-charges .assign-bar { flex-wrap: wrap; gap: var(--s-2) var(--s-3); margin: var(--s-3) 0 var(--s-4); }
.access-body:has(> form.gl-form)::after,
#modal-gl-import .access-body::after { bottom: calc(var(--ctl-h) + 25px); }
#modal-gl-import .access-body > *,
#modal-gl-import .access-body > form > * { flex-shrink: 0; }
#modal-gl-import .access-body::before { order: -1; flex-shrink: 0; }
#modal-gl-import .access-body::after { order: 4; flex-shrink: 0; }

/* THE FILE: the native control, set in a well a file can be dropped on (a
   file input takes a drop); it turns solid once a file is chosen — the
   `required` field is `:valid` then. Its button is the kit's secondary. */
#modal-gl-import .upload-bar > input[type="file"] {
  display: block; box-sizing: border-box; width: 100%; max-width: none; margin: 0;
  padding: 20px 16px; border: 1px dashed var(--field-line); border-radius: var(--r-lg);
  background: var(--surface); color: var(--muted);
  font-size: var(--t-table); line-height: 20px; cursor: pointer;
}
#modal-gl-import .upload-bar > input[type="file"]:hover {
  border-color: var(--accent); background: var(--accent-soft);
}
#modal-gl-import .upload-bar > input[type="file"]:valid {
  border-style: solid; border-color: var(--accent-line); color: var(--ink);
}
#modal-gl-import .upload-bar > input[type="file"]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
#modal-gl-import .upload-bar > input[type="file"]::file-selector-button {
  height: var(--ctl-h); margin-right: 12px; padding: 0 14px; font-size: var(--t-table);
}

/* the step's own line, and the explanation a step quieter under the action */
#modal-gl-import .access-body > p.muted:not(.gl-about) {
  font-size: var(--t-table); line-height: 20px; color: var(--muted);
}
#modal-gl-import .access-body > p.muted:not(.gl-about) strong { font-weight: 600; color: var(--ink); }
#modal-gl-import .access-body > form > p.muted {
  font-size: var(--t-sm); line-height: 18px; color: var(--muted);
}

/* --- 4. THE MAPPING STEP (Klaviyo) ----------------------------------------
   Three columns that keep their places whatever a label runs to: the field
   and its note on two lines, the column a real (compact) field — it was
   borderless text inside `.lines-table` — and the first row in mono. */
#modal-gl-import .access-body > form > .tablewrap { margin: 0; }
#modal-gl-import :is(table.gl-map select, table.gl-codes select, table.gl-codes input[type="text"]):hover:not(:disabled):not(:focus) {
  border-color: var(--muted-2);
}
#modal-gl-import :is(table.gl-map select, table.gl-codes select, table.gl-codes input[type="text"]):focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
#modal-gl-import :is(table.gl-map select, table.gl-codes select, table.gl-codes input[type="text"]):disabled {
  background: var(--surface-2); color: var(--muted);
}
main:has(#modal-gl-import) > div.notice.ok:not(.gen-result) {
  background: var(--surface); border-color: var(--line);
}
/* an archived scenario had no chip at all (a bold bare word beside a draft's
   pill): it takes the quiet state outline a past state wears */
.set-block table.scenario-table .st.st-archived {
  background: transparent; color: var(--muted); border: 1px solid var(--line);
}

/* --- 9. EVERY CONTROL ON THESE TABS HAS AN EDGE IN DARK -------------------
   The status selects and the pop-out's row fields were drawn in `--line`,
   about 1.3:1 off the card in dark; they take the kit's `--field-line`. The
   selects in the Snapshots table are the compact height. */
/* the pop-outs of THIS file only: the planned-expense pop-outs wear
   `.rate-add` too, and they are section B's */
.access-modal:is([id^="modal-size-"], [id^="modal-kpi"], [id^="modal-branch-"])
.rate-add :is(input:not([type="hidden"], [type="checkbox"], [type="radio"]), select) {
  min-height: var(--ctl-h); height: auto; padding: 0 11px; font-size: var(--t-table);
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--field-line); border-radius: var(--r-md);
}
.set-codes #code-filter-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* --- 5. THE POP-OUTS ARE FORMS, NOT DOCUMENTS (Attio) ---------------------
   The metric pop-outs and Add planned expense: the form is a wrapping flex
   row rather than the two-column grid (a grid item is its own sticky
   container, so a foot inside a grid cannot stick — family 6), each field's
   explanation one quiet line under it, and the submit in the kit's foot,
   INSIDE its form, stuck to the bottom of the scrolling body. */
:is(#modal-add-fee, [id^="modal-metric-"]) .access-body > form.form-grid {
  display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: var(--s-4);
}
:is(#modal-add-fee, [id^="modal-metric-"]) .access-body > form.form-grid > label:not(.span2) {
  flex: 0 1 calc(50% - 8px);
}
:is(#modal-add-fee, [id^="modal-metric-"]) .access-body > form > .access-foot {
  position: sticky; bottom: 0; z-index: 4;
  display: flex; justify-content: flex-end; align-items: center; gap: 8px;
  margin: 6px -20px 0; padding: 12px 20px;
  background: var(--surface); border-top: 1px solid var(--line);
}
:is(#modal-add-fee, [id^="modal-metric-"]) .access-body:has(> form > .access-foot) { padding-bottom: 0; }
:is(#modal-add-fee, [id^="modal-metric-"]) .access-body:has(> form > .access-foot)::after {
  bottom: calc(var(--ctl-h) + 25px);
}
[id^="modal-fee-"] .access-body > .form-grid > label > .muted { line-height: 17px; }
.wizard > #wizard-error { margin: 0 0 var(--s-4); }
#new-made .notice { margin: 0 0 var(--s-4); }

/* --- 6. THE METRIC POP-OUT'S FORMULA FIELD (5.9) -------------------------
   An input never clips its placeholder (family 4): the formula field keeps
   340px, and the "+ add operating metric…" picker sits beside it where the
   row has room and wraps under it where it has not — inside the SAME
   label, which pickers.js reads. The label's own word keeps its line (a
   zero-height break ordered after it), the helper line runs under both. */
:is(#modal-metric-new, [id^="modal-metric-"]) .access-body > form.form-grid > label:has(> select[data-metric-insert]):not([hidden]) {
  display: flex; flex-direction: row; flex-wrap: wrap; align-items: center;
  column-gap: 8px; row-gap: 4px;
}
.access-table > tbody > tr > :is(th, td) { vertical-align: top; padding-top: 9px; padding-bottom: 9px; }
main.page-reading .access-head strong { font-size: var(--t-16); }

@media (max-width: 640px) {
  #modal-save-formula .fx-save-foot {
    margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px;
  }
}

/* --- THE CONTRACTS PAGE ASKS ON THE PAGE (2026-11-12) ---------------------
   One confirm pop-out in the kit's chrome; its foot is the save-formula
   pop-out's. */
#modal-confirm [data-ask-text] { margin: 0; color: var(--ink); }

@media (max-width: 640px) {
  #modal-gl-import .upload-bar > input[type="file"] { padding: 16px 12px; }
  /* A SMALL TABLE OF FIGURES IS A ROW FOR EACH ITEM (UI rule 21, SPEC
     §6.174): the KPIs against plan, plan accuracy, the months behind an
     insight, the two customer tables of the report and the close page's
     figures. An item's name takes
     a line; its figures share the next one in equal columns, under the
     head's names. Nothing is hidden and nothing scrolls sideways. */
  #main .tablewrap:has(> :is(table.sh-kpis, table.sh-acc, table.ev-table, table.tbl-clients, table.tbl-billed, table.close-figs)) { display: block; overflow: visible; }
}

@media (width <= 640px) {
  .ledger-filter .lf-date > input[type="date"] { width: 100%; min-width: 0; }
}

.gl-form > details.gl-repeat > .muted {
  display: block; max-width: 64ch; margin-top: 6px;
  font-size: 12px; line-height: 18px; color: var(--muted);
}

/* THE PER-FEE POP-OUT: the fields, then Rate changes and Skipped months as
   two sections under hairlines, and its Save in the panel's own foot — it
   posts the out-of-table form by `form=`, so it sits where every pop-out's
   primary sits and stays in view while the ladder below it scrolls */
[id^="modal-fee-"] .access-body > .form-grid > label { margin: 0 0 14px; }

@media (width <= 640px) {
  :is(#modal-add-fee, [id^="modal-metric-"]) .access-body > form.form-grid > label:not(.span2) {
    flex-basis: 100%;
  }
  :is(#modal-add-fee, [id^="modal-metric-"]) .access-body > form > .access-foot {
    margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px;
  }
}

@supports (animation-timeline: scroll()) {
  .access-body::before, .access-body::after {
    content: ""; display: block; position: sticky; z-index: 3;
    height: 10px; opacity: 0; pointer-events: none;
  }
  .access-body::before {
    top: 0; margin-bottom: -10px;
    background: linear-gradient(var(--shade-edge), transparent);
    animation: kit-shade-top linear both;
    animation-timeline: scroll(); animation-range: 0 12px;
  }
  .access-body::after {
    bottom: 0; margin-top: -10px;
    background: linear-gradient(transparent, var(--shade-edge));
    animation: kit-shade-bottom linear both;
    animation-timeline: scroll(); animation-range: calc(100% - 12px) 100%;
  }
}

/* ===== THE CHARTS [charts] =====
   The chart card, its axes, labels and keys, the bars and the small charts (SPEC 6.37).
   --- kept from an old banner ---
   CHARTS · THE ORIGINAL PLAN (SPEC §6.96)
   The trend charts draw the original business plan as a THIRD line while a
   snapshot holds the role: 1.25px, a dash-dot (6 3 1.5 3) the swatch repeats,
   in --viz-original. Its endpoint label is 11px text, which needs 4.5:1, so
   it is set in --muted at weight 500 like the prior year's.
*/

.tile .kspark { height: 34px; margin: 6px 0 2px; overflow: hidden; }
.tile .kspark svg { max-width: 100%; display: block; }
.viz-card h3 { margin: 0; font-size: var(--t-14); font-weight: 650; }
.legend .key i.key-dash { height: 3px; border-radius: 2px; width: 14px; }
.viz-card[data-drill-base] .viz-table tbody tr[data-month] { cursor: pointer; }
.viz-label.neg { fill: var(--err); }   /* a loss is red wherever it appears */
.viz-axis-line { stroke: var(--viz-axis); shape-rendering: crispEdges; }

/* ==== CHARTS AND OVERVIEW WIDGETS (2026-09-07) ====================
   SPEC §6.37: one geometry for the two renderers, the palette read from
   tokens, the guardrail's label and the month in progress in the card HEAD,
   the bars fluid, and no red outside a loss. ================== */

/* the series palette is pinned to LIGHT on the board sheet, like every other
   token there — the packet is paper-white in both themes and viz.js reads
   these at draw time. --viz-plan, --viz-prior and --viz-rule were darkened
   2026-09-08 to clear WCAG 1.4.11's 3:1 for a meaningful graphical object
   (they measured 2.75 / 2.04 / 2.71 on white; review 05-N9 / 04-N7). */

/* legend swatches from the tokens — never an inline hex in a template. On a
   LINE chart the key is a line and it carries the series' own dash, because
   dash pattern is the only greyscale-safe channel separating actual from plan
   (review 05-N11); a BAR chart's key stays a square. */
.legend .key i.key-actual { background: var(--viz-actual); }
.legend .key i.key-plan { background: var(--viz-plan); }
.legend .key i.key-prior { background: var(--viz-prior); }
.legend .key i.key-fee { background: var(--attn); }
.legend .key i.key-recurring { background: var(--lav); }
/* 22px, not 14px: at 14px a `2px dashed` border collapses to ONE dash and the
   Plan key rendered as a solid grey bar — the key whose dash pattern is the
   whole greyscale-safe channel was the key that did not show it (review
   2026-09-08, 04-T12). The swatch is drawn as a repeating gradient, so the
   dash rhythm is the SVG's own (`5 4` for the plan, `2 4` for the prior) and
   not the browser's idea of "dashed". */
.legend .key i.key-dash { height: 2px; width: 22px; border-radius: 1px; }
.legend .key i.key-dash.key-plan { height: 2px; border-radius: 0; background:
  repeating-linear-gradient(to right, var(--viz-plan) 0 5px, transparent 5px 9px); }
.legend .key i.key-dash.key-prior { height: 2px; border-radius: 0; background:
  repeating-linear-gradient(to right, var(--viz-prior) 0 2px, transparent 2px 6px); }
/* THE HOLLOW ENDPOINT'S KEY (review 2026-09-08, 05-W1): the mark that
   separates a provisional month from a settled one had no key on any surface.
   The swatch IS the mark — a ring in the actual's ink on the card's own
   surface — and the word beside it is one word; the sentence it stands for is
   said once for the chart group, not in three card heads (05-W7). */
.legend .key i.key-hollow { width: 9px; height: 9px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--viz-actual); }
.viz-head h3 { flex: 0 0 auto; }
.viz-table caption { text-align: left; }

/* A MONTH'S VALUE IS REACHABLE BY KEYBOARD (review 04-F13 residual): each
   month's hit area on a line chart is a focus stop, and focus tints the
   column so the reader can see which month the tooltip is about. */
.viz-hit { outline: none; }
.viz-hit:focus-visible { fill: var(--accent-soft); stroke: var(--accent);
  stroke-width: 1; }
.viz-head .viz-axis-note[hidden] { display: none; }
.viz-head .viz-cap { order: 2; }
.legend .key i.key-fee { background: var(--viz-fee); }

/* ==== THE LIST TABLES, SIXTH REVIEW (2026-09-08) ========================
   06-S7 — THE STRIP'S ENDPOINT DOT READS AGAINST ITS MONTH LABEL. On the
   decisions inbox the last point of a losing series sits at the foot of the
   plot, exactly where the axis prints its last month: the 4px dot landed on
   the "g" of "Aug" with "($78K)" beside it, in both themes and at both widths
   captured. The strip's chrome carries classes for this (CLAUDE.md: chart
   chrome is restyled from CSS), so the two pieces of type a reader uses take
   a surface halo and read OVER the mark rather than through it. The dot's own
   surface ring is `drawStrip`'s, in viz.js. */
.dqm-bars .viz-month, .dqm-bars .viz-label {
  paint-order: stroke fill; stroke: var(--surface); stroke-width: 3px;
  stroke-linejoin: round; }
:where(a, button, summary, [role="button"]:not(.viz-hit), [tabindex]):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.viz-foot > details.viz-table[open] { flex: 1 1 100%; }

/* -- 6. ACTUALS ARE NOT LAVENDER ---------------------------------------------
   Revenue by client and Where the money goes draw the anchor month's ACTUALS,
   and lavender is the forecast's colour (four colours, four meanings): the
   recurring bar and its legend key take the actual's `--viz-actual`, which
   has a dark value in both dark blocks. The one-time-fee segment keeps
   `--viz-fee`, the lighter step off the actual it was designed to be. Where
   the money goes falls back to a FORECAST month when no month carries costs
   yet; a container marked `data-series="forecast"` keeps the lavender. */
.hbar-fill { background: var(--viz-actual); }
.legend .key i.key-recurring { background: var(--viz-actual); }
.hbars[data-series="forecast"] .hbar-fill { background: var(--lav); }
.hbar-fill + .hbar-fee { box-shadow: inset 1px 0 0 var(--surface); }
.legend .key i.key-dash.key-original { height: 2px; border-radius: 0; background:
  repeating-linear-gradient(to right, var(--viz-original) 0 6px, transparent 6px 9px,
    var(--viz-original) 9px 10.5px, transparent 10.5px 13.5px); }
.viz-original-label { font-family: var(--mono); font-size: 11px; font-weight: 500;
  fill: var(--muted); }
main.page-reading .viz-axis-note { font-size: var(--t-12); }

/* ===== THE OVERVIEW [overview] =====
   The Overview: the state line, the deck, the cards and widgets, the read, the league and the publication strip.
   --- kept from an old banner ---
   THE OVERVIEW · A · cards, queue, widgets (2026-09-22)
   --- kept from an old banner ---
   THE OVERVIEW · B · league, bridge, console (2026-09-22)
   --- kept from an old banner ---
   THE OVERVIEW · C · after the review (2026-09-22)
   --- kept from an old banner ---
   THE OVERVIEW · D · the read's keyboard path and contrast (critique 2026-09-28)
   --- kept from an old banner ---
   THE OVERVIEW · E · the signed card and the half-screen (critique P2s, 2026-09-28)
   --- kept from an old banner ---
   SPEC LEFTOVERS · G (2026-09-30)
   --- kept from an old banner ---
   INSIGHTS FIRST (SPEC §6.101) · the state line, the deck, where you stand
*/

/* "Needs attention" at a badge's size takes the amber's ink: `--warn` read
   4.2:1 on the row, under what small text needs (SPEC §6.181). The Overview's
   28px verdict keeps the amber. */
.console-table .badge.verdict-watch { color: var(--warn-ink); }

.dqd-acts .dqm-drop[open] .dec-form { margin-top: var(--s-2); }

/* ------------------------------------------------------------ overview --- */
.overview-note { margin: 2px 0 16px; }
/* a draft-anchor verdict reads tentatively via the 'draft' tag + the
   "draft (unattested)" text — the dashed rail read as noise, not signal
   (owner feedback 2026-08-26) */
.verdict.draft { opacity: .8; }
.health-coverage b { color: var(--ink); font-weight: 600; }
.health-sub { font-size: 13px; color: var(--ink); }
.narrative p { margin: 0 0 10px; font-size: var(--t-14); line-height: 1.65; max-width: 76ch; color: var(--ink); }
.measures-grid { display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.m-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.m-card-title { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 700;
  color: var(--ink); }
.drill-panel .drill-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.drill-panel h4 { margin: 0; font-size: 13px; }
.viz-tip b { font-variant-numeric: tabular-nums; }
.pub-state { font-size: var(--t-12); }
.bridge-strip b { font-size: 1em; font-variant-numeric: tabular-nums; color: var(--ink); }  /* theme ink, never the brand navy (invisible in dark — owner report 2026-09-07) */
.dec-card.suggested { border-left-style: dashed; background: var(--line-soft);
  box-shadow: none; }
.dec-card.closed { border-left-color: var(--line); opacity: .75; box-shadow: none;
  padding: 8px 15px; }
.dec-title.dropped { text-decoration: line-through; color: var(--muted); }
.dec-closed { margin-top: 12px; }
.dec-closed summary { cursor: pointer; font-size: 12.5px; }
.nr-row.motion .nr-label { color: var(--accent); }
.branch-code { font-family: var(--mono); font-size: 11px; opacity: .75; margin-left: 3px; }

.branch-bar .chip.branch-off { opacity: .6; }
.mode-chips { margin-left: 12px; }
.branch-rank b { font-variant-numeric: tabular-nums; }
.widget-head h3 { margin: 0; font-size: 13.5px; font-weight: 650; }
.widget-rows > div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 5px; }
.widget-rows b { font-variant-numeric: tabular-nums; text-align: right; }
.comp-section { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.comp-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.comp-head h3 { margin: 0; font-size: 13.5px; }
.comp-head .muted { font-size: 12px; }
.comp-table tr.comp-flag td { background: var(--warn-bg); }
.pdelta.good::before { background: var(--ok); }
.pdelta.bad::before { background: var(--attn); }
table.league thead th { padding: 0 8px 7px; }
/* a nine-column table has to FIT the card: the header labels wrap (the
   figures never do), so a column is as wide as its widest figure and not as
   wide as "Cost per funded loan" (review 2026-09-08, M3 — the ninth column
   pushed the card into a horizontal scrollbar at 1440) */
table.dt.league thead th { white-space: normal; }
table.dt.league tr.flagged .anchor { font-size: var(--t-16); font-weight: 650; }
/* the branch cell's notes are prose — they wrap. The units cell's base is one
   figure and its qualifier again ("of 29 planned"), so it stays on its line:
   units per LO has its own column (review 2026-09-08, M3). */
table.league .lg-branch .lg-sub { white-space: normal; }
table.dt.league.league-sheet td, table.dt.league.league-sheet th { padding: 6px 6px; }
/* NO QUALIFIER BREAKS MID-PHRASE ON THE SHEET (fourth review, N4). Letting
   them wrap printed `of 64 / planned`, `−2 bps vs / peers`, `+$12,122 vs /
   branches` and — exactly the case the rule above names — `volume- /
   weighted` on the company total. The width comes from the qualifiers
   themselves: each says the figure it compares to and nothing the column
   header already says (_league.html). The branch cell's notes are prose and
   still wrap. */
table.dt.league.league-sheet .lg-sub,
table.dt.league.league-sheet .lg-cmp { white-space: nowrap; }
table.dt.league.league-sheet .lg-branch .lg-sub { white-space: normal; }
table.dt.league.league-sheet tr.flagged .anchor { font-size: var(--t-14); }

/* ------------------------------------- the Overview (redesign 2026-09-05) --- */
/* the page answers first: a verdict band, then decisions beside publication,
   the league, the read beside the measures, then the charts */
.ov-row { display: grid; gap: 18px; margin: 0 0 18px; align-items: start; }
.ov-row-7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.ov-col { min-width: 0; }
.ov-row .ov-card { margin: 0; }
.ov-card-head h2, .ov-card-head h3 { margin: 0; font-size: var(--t-16); font-weight: 700;
  letter-spacing: -.01em; text-transform: none; color: var(--ink); }
.health.band .health-head { margin: 0; align-items: center; gap: 12px; }
.health.band .verdict-dot { width: 14px; height: 14px; }
.health.band .health-coverage, .health.band .health-breach { margin: 0; }
.figures .up::before { background: var(--ok); }
.figures .down::before { background: var(--attn); }
.health.band { grid-template-columns: minmax(0, 1fr); }
/* publication as a card: twelve cells, a legend, the one action */
.pub-card .pub-rail { display: block; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
.pub-card .pub-rail-label { font-family: var(--sans); font-size: 15px; font-weight: 700;
  text-transform: none; letter-spacing: -.01em; }
.pub-card .pub-cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.pub-card .pub-pill { justify-content: center; height: 40px; border-radius: 8px; font-family: var(--sans);
  font-size: 12.5px; font-weight: 600; padding: 0 4px; }
.pub-card .pub-pill.none { border-style: dashed; }
.pub-card .pub-pill.anchor { outline: 2px solid currentColor; outline-offset: 1px; }
.pub-card .pub-rail-legend { margin: 10px 0 0; font-size: 12px; }
.pub-cta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; font-size: 12.5px; }
.pub-cta .btn-link { background: var(--surface); border: 1px solid var(--line); font-weight: 600; padding: 8px 14px; }
/* the decisions strip inside the row */
.ov-col .decisions-block { margin: 0; }
/* the read */
.read-card .narrative { margin-top: 0; }
.read-card .narrative p.lead { font-size: 14.5px; }
.measures-head-sub { margin-top: 16px !important; }
.measures-head-sub .measures-title { font-size: 13px; }
.mlist .signal:last-child { border-bottom: 0; }
table.grid tr.section-row .add-line-btn { text-transform: none; letter-spacing: 0; font-weight: 500; margin-left: 10px; }
.branch-read-form { margin: 0; }
.health.band .narrative-foot { margin-top: 6px; }
/* the measures at full width: the list in two columns, the tracked KPIs four across */
.measures-card .mlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.measures-card .mgroup { grid-column: 1 / -1; }
.pub-strip .pub-pill .pub-state { font-size: var(--t-12); line-height: 1; min-height: 11px; }
.pub-strip .pub-pill.anchor { outline: 2px solid currentColor; outline-offset: 1px; }
/* no `.pub-cta-link`: the strip's action link WAS the queue's decision, said
   a second time (review 2026-09-08, 04-N13) */
.decisions-block { margin: 0 0 18px; }
.ov-widget.w-half { grid-column: span 3; }
.ov-widget.w-full { grid-column: 1 / -1; }
body.ov-edit .ov-widget { outline: 1px dashed var(--accent-line); outline-offset: 6px; border-radius: 12px; }
.ov-panel[hidden] { display: none; }
.ov-panel-sec { margin-bottom: 12px; }
.band-branches b { color: var(--ink); }
.dec-closed { margin-top: 10px; }
.dec-closed-head { font-size: 12px; font-weight: 600; padding: 6px 0; }
.stat-cmp .up::before { background: var(--ok); }
.stat-cmp .down::before { background: var(--attn); }
/* the strip's half-screen break lives in the CHARTS block at the end of this
   file, after the auto-fit rule that would otherwise override it (review
   04-N8: the duplicated block was there because the first one never applied) */
/* the opened "Why" runs the width of the card (owner feedback 2026-09-07:
   the 70ch cap left the right of the widget blank); only the one-sentence
   lead keeps its measure */
.health.band .narrative .full-read p, .health.band .narrative .full-read .narrative-read,
.health.band .narrative .full-read .nr-row { max-width: none; width: 100%; }
.ov-widget .bridge-strip b { white-space: nowrap; }
table.grid tr.computed .badge { font-weight: 600; }
.widget-rows b { white-space: nowrap; }
.widget-rows > div > span:first-child small { display: block; font-size: 11px;
  line-height: 1.3; }
.bridge-strip .b-item:last-child b { font-size: var(--t-20); font-weight: 700; }

/* THE BRANCH CARD HAS AN ANCHOR, like the company card (SPEC §6.37: one
   figure a step larger, nothing else emphasised; review 2026-09-08, 04-U5).
   Six tiles at one size read as a data dump, and the comparison base moved
   off the comparison line so each sub-line carries one figure. */
.branch-facts .fact:first-child .fact-value { font-size: 26px; }

/* THE PROMOTED WIDGET'S WIDTH GOES TO THE BARS (review 2026-09-08, 04-N6):
   `Where the money goes` was widened to fill its row and 43% of the card
   opened up between the names and the tracks, because the name column is a
   1.9fr share. Full width caps the names in characters so the track — the
   part that carries the meaning — takes the promotion. */
.ov-widget.w-full .hbar-row { grid-template-columns: minmax(0, 22ch) minmax(0, 1fr) 7.5ch 4ch; }
/* M6 — THE NEUTRAL MARK IS VISIBLE. A comparison under the materiality floor
   (5% of its base, or 5 bps) keeps its ink and takes this dot instead of an
   attention colour; `--line` at 1.1:1 on white read as a smudge in both
   themes, which is a mark that is not one. */
/* ... and it CLEARS 1.4.11 (fourth review, N6): `--muted` at 50% composites
   to 2.0:1 on white and 2.7:1 in dark, and the mark now carries a decision —
   "this comparison is under the materiality floor" — rather than decoration.
   `--muted-2` is 3.30:1 light and 3.35:1 dark at full strength. */
table.dt.league .cmp.flat::before { background: var(--muted-2); }
a.lg-flag:hover, a.lg-flag:focus-visible { background: var(--accent);
  border-color: var(--accent); color: var(--inverse); text-decoration: none; }
a.lg-flag:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 02-N11 — THREE COMPARISON STATES, THREE SHAPES. Since the fourth pass the
   neutral mark carries a decision ("this comparison is under the materiality
   floor"), so it is information — and information carried by hue alone is
   gone on a photocopier and gone for a colour-blind reader. --ok #1f8a54,
   --muted-2 #8b8d99 and --attn #e8833a are three near-identical greys in
   mono. The neutral one is a RING; the two material ones stay filled. */
table.dt.league .cmp.flat::before { background: transparent; box-sizing: border-box;
  border: 2px solid var(--muted-2); }
/* a deactivated branch keeps its row, quietly */
table.league tr.lg-inactive .lg-name { color: var(--muted); }
.setup-card .viz-head { display: flex; justify-content: space-between; align-items: baseline; }

/* ==== THE BAND LINE (seventh-pass leftovers, 2026-09-12) ================
   SPEC §6.34 gives the branches ONE line. The fact, its window, the clause
   that fired and the link are ~85 characters; the read's prose measure
   (76ch) wrapped them to two. The line is a fact, not prose: it takes the
   card's width. */
.health.band .narrative p.band-branches { max-width: none; }
.console-table td.col-verdict { white-space: normal; }
/* eleven columns and a Status control inside 1,180px of content: the gutter
   comes down a step so nothing is cut off at 1,440 */
.console-table th, .console-table td { padding-left: 9px; padding-right: 9px; }
.guard-default { margin: 8px 0 0; }
.ov-panel-foot { flex-wrap: wrap; row-gap: 6px; }
:where(.page-controls, .page-side) .branch-pick { border-color: var(--field-line); }
.help-head strong { font-size: 15px; font-weight: 650; }
/* Family 3, section A of the Mobbin redesign: LOOK, LAYOUT and HIERARCHY on
   the health card, the decisions queue and its inbox, the Customize panel,
   the chart cards and the small widgets. No words move, no hook moves, no
   behaviour changes, and every colour is a token with a dark value.

   THE ONE THING THE PAGE NEEDED. Five container treatments were doing one
   job: the health card was an accent-ruled panel, the decisions block was an
   unbounded section whose ROWS were the cards, the league and the measures
   were `.ov-card`, the charts were a shadowed `.viz-card`, and the portfolio
   strip a `.tile`. They differed in radius, border weight, head type and
   inner padding, so the page read as five systems stacked rather than as one
   document, and nothing told the eye which container was a SECTION and which
   an ITEM inside one. This block declares three surfaces and maps every
   container in the family onto one of them:

     SECTION   the health card, `.ov-card` (the league, the measures, More
               measures) and the decisions block — the page's own statements.
               `--surface`, 1px `--line`, `--r-lg`, `--shadow`, and a head of
               a 15px/650 title with a 12.5px `--muted` qualifier beside it.
     ITEM      `.dq-row`, `.viz-card`, `.widget`, the tracked measure cards —
               one object inside or beside a section. `--surface`, 1px
               `--line`, `--r-md`, NO shadow, a 14px/650 head. (`.tile`, the
               portfolio strip's, is section B's to apply: the numbers are
               radius `--r-md`, 1px `--line`, no shadow, 14px/650 head.)
     PANEL     `.ov-panel` and `.dq-detail` — something that docks or floats
               over the page. `--surface`, 1px `--line`, `--shadow-pop`.

   In dark the kit's darker `--bg` (#0b0c10) under an unchanged `--surface`
   (#17181d) is what makes a section read as a section; the hairline is the
   second cue and the shadow the third. Nothing here adds a colour.

   PINNED AND UNTOUCHED: the verdict rules (`.verdict-softening`,
   `.health.card-softening`, `.signal-holding .mdot`, `.measures-card
   .kpi-card.status-behind`), the two `.dq-sev` fills, `.dq-row.sev-act`'s
   tier colour, `.dq-inbox .dq-row.selected`'s 6px rule,
   `.dqm-body.dqm-solo`, the type floors (26 / 22 / 12 / 11px), the
   `border-top` on the FIRST `.stats {` and `.branch-facts {` blocks,
   `repeat(6,` on `.ov-widgets`, `span 3` on `.w-half`, `subgrid` on
   `.stats .stat`, and every dead name the strip renderer left behind. */

/* --- 1. THE THREE SURFACES ---------------------------------------------
   The health card and `.ov-card` are already the section surface (they were
   the two that got it right), so only their HEADS are restated here. The
   decisions block, which had no surface at all, becomes one; the charts and
   the branch widgets step down to the item surface so a chart stops
   out-weighing the statement it illustrates. */

/* the SECTION head: one title size, one qualifier size, actions at the right
   on the title's own baseline */
.ov-card-head h2, .ov-card-head h3, .measures-card .measures-title, .dq-h2 {
  font-size: var(--t-16); font-weight: 650; letter-spacing: -.01em; }
.ov-card-head { align-items: baseline; gap: 6px 10px; margin: 0 0 12px; }

/* the DECISIONS BLOCK becomes a section: its head and its rows are one card
   instead of a floating heading over a second card. `.dq-queue` keeps its
   class (a help shot crops it) and gives up its own frame — inside a section
   a second border is a second box. The Decisions PAGE is not touched: there
   the block is the whole page and the inbox lays it out. */
.ov-widget > .decisions-block {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 16px 0 4px; }
.ov-widget > .decisions-block > .dq-head { margin: 0 20px 10px; }
.ov-widget > .decisions-block > .dq-queue {
  background: none; border: 0; border-radius: 0; box-shadow: none; }
.ov-widget > .decisions-block > .dq-queue > .muted { padding: 10px 20px 14px; }
.ov-widget .viz-card h3 { font-size: var(--t-14); font-weight: 650; letter-spacing: -.01em; }
.ov-widget .viz-head h3 .muted { font-size: var(--t-sm); font-weight: 500; }
.ov-widget .viz-head { align-items: baseline; gap: 4px 14px; margin-bottom: 8px; }

/* the branch view's two drill-in widgets. The 4px accent rule was the only
   place on the page `--accent` was used as decoration: SPEC §6.37 gives it
   the actual and the interactive. Attention keeps its own rule, because that
   one means something. */
.widget { border: 1px solid var(--line); border-left: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: none; padding: 14px 16px; }
.widget.widget-warn { border-color: var(--attn-line);
  border-left: 3px solid var(--attn); padding-left: 14px; }
.widget-head h3 { font-size: var(--t-14); font-weight: 650; letter-spacing: -.01em; }

/* --- 2. THE HEALTH CARD -------------------------------------------------
   The label line, the verdict, the read, then the figures: the order is the
   owner's (2026-09-07) and does not move. What moves is the weight of the
   Regenerate cluster, which sat between the read and the figures with a
   heavier outline than the "Why" disclosure above it — the least important
   thing on the card in its most prominent position — and the rhythm of the
   strip, whose five tiles were bare columns under a hairline with no
   alignment cue at all. */

/* the read's own foot: ONE quiet row, the provenance word, the control and
   the sentence that says what the control costs on a single line. The markup
   does not move (`test_league` slices the read up to `narrative-foot`) and
   `.gen-note` stays a text node with its own rule — a tooltip would not be
   the sentence. No rule of its own above it: the strip's pinned `border-top`
   is 40px below, and two hairlines that close read as clutter. */
.health .narrative-foot { margin: 14px 0 0; padding-top: 0;
  align-items: baseline; flex-wrap: wrap; gap: 4px 10px;
  font-size: var(--t-label); color: var(--muted); }
.health .narrative-gen { display: inline-flex; align-items: baseline;
  flex-wrap: wrap; gap: 4px 8px; }
.health .narrative-foot .gen-note { display: inline; margin: 0;
  font-size: var(--t-label); color: var(--muted); }

/* --- 5. THE CUSTOMIZE PANEL DOCKS (Evernote / Xero) ---------------------
   It was a floating aside sitting ON TOP of the right third of the page,
   covering the Cash tile and the right end of every widget — exactly the
   content a person is deciding whether to keep — with no relationship to the
   layout it edits. It docks at the right edge instead and the page gives it
   the room, so nothing is hidden and every change previews live.
   Every id layout.js binds stays exactly where it is. */
body.ov-edit .ov-panel:not([hidden]) {
  position: fixed; inset: 0 0 0 auto; width: min(400px, calc(100vw - 32px));
  max-height: none; height: auto; padding: 0; z-index: 70;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 0; border-left: 1px solid var(--line);
  border-radius: 0; box-shadow: var(--shadow-pop); }
/* …and so does everything above the grid, or the dock covers the year, the
   window and the control that opened it */
body.ov-edit main > .page-head.suite {
  padding-right: min(424px, calc(100vw - 8px)); }
/* the figure strip is `auto-fit`, so a narrower grid drops a tile onto a row
   of its own — with a row-opening hairline and a 16px indent that nothing
   else on the card carries. A smaller track floor keeps the five figures on
   one line while the dock has the page's right 400px. */
body.ov-edit .stats { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
body.ov-edit .stats > .stat { padding: 0 11px; }
.ov-panel-head { flex: none; gap: 2px; margin: 0;
  padding: 16px 20px 12px; border-bottom: 1px solid var(--line); }
.ov-panel-head strong { font-size: var(--t-16); font-weight: 650; letter-spacing: -.01em; }
.ov-panel-body { flex: 1 1 auto; min-height: 0; overflow-y: auto;
  padding: 14px 20px 16px; }
.ov-panel-sec { margin: 0 0 18px; }
.ov-panel-sec:last-child { margin-bottom: 0; }
.ov-panel-sec .label { font-size: var(--t-label); font-weight: 600;
  letter-spacing: .02em; text-transform: none; color: var(--muted);
  margin-bottom: 8px; }
/* ADD A WIDGET is a chooser, not a chip cloud: eleven pills wrapped one and
   two to a ragged row and read as the same control as the presets directly
   beneath them. One column of full-width rows, the presets left as chips, so
   the two lists can never be mistaken for one. The button markup is
   layout.js's own ("+ " + the widget's label) and is untouched. */
.ov-add { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.ov-add-btn:hover { background: var(--surface-2); border-color: var(--line);
  color: var(--ink); }
.ov-presets { gap: 6px; }
.ov-preset-btn { min-height: var(--ctl-h-sm); padding: 0 12px;
  display: inline-flex; align-items: center; border-radius: var(--r-pill); }
/* the foot RANKS its actions: the primary last in the reading order it wins,
   the secondary beside it, and the least-used, most-destructive control
   quiet, on one line, and never wider than Save */
.ov-panel-foot { flex: none; margin: 0; padding: 12px 20px;
  border-top: 1px solid var(--line); background: var(--surface); }
#ov-reset { margin-left: auto; white-space: nowrap;
  font-size: var(--t-sm); font-weight: 500; color: var(--muted); }
body.ov-edit .ovw-bar:not([hidden]) { display: inline-flex; align-items: center; }
.ovw-bar .ovw-btns { margin-left: 2px; }
/* the bar cards' twin is built by `viz.js` and appended as the card's last
   child, so it gets the same foot from the card rather than from a wrapper
   the macro never renders for it — one treatment for "View as table"
   wherever it appears on this page */
.ov-widget > .viz-card > details.viz-table { margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--line-soft); }
.ov-widget .viz-card details.viz-table > summary {
  display: inline-flex; align-items: center;
  gap: 6px; min-height: var(--ctl-h-sm); padding: 0 10px; margin: 0;
  border: 1px solid var(--field-line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink-2);
  font-size: var(--t-sm); font-weight: 600; list-style: none; }
.ov-widget .viz-card details.viz-table > summary::-webkit-details-marker { display: none; }
.ov-widget .viz-card details.viz-table > summary::after { content: ""; width: 6px; height: 6px;
  margin: -3px 0 0 1px; border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); }
.ov-widget .viz-card details.viz-table[open] > summary::after { margin-top: 2px;
  transform: rotate(-135deg); }
.ov-widget .viz-card details.viz-table > summary:hover { border-color: var(--accent);
  color: var(--accent); }
.ov-widget .viz-card details.viz-table > summary:hover::after { border-color: var(--accent); }

/* --- 7. THE MEASURES AND THE SMALL WIDGETS ON ONE PITCH (Todoist) -------
   A measure row, a widget row and a tracked measure card carry the same
   three things — a label, a figure and one line of support — at three
   different vertical rhythms. One pitch, one grammar. */
.mlist .signal { min-height: 44px; padding: 10px 0; align-content: center; }
.mlist .signal-label { font-size: var(--t-table); }
.mlist .signal-head { font-size: var(--t-table); }
.mlist .signal-detail { margin-top: 2px; }
.widget-rows { gap: 0; }
.widget-rows > div { min-height: 40px; align-items: center; padding: 8px 0 7px;
  border-top: 1px solid var(--line-soft); }
.widget-rows > div:first-child { border-top: 0; }
.widget-stat { margin-top: 6px; }
/* Family 3, section B of the screen redesign. Four surfaces that all print
   rows of figures and had four different ideas of how a row is built: the
   portfolio console, the portfolio decisions queue, the branch league on the
   Overview's card, and the cash bridge.

   LOOK, LAYOUT AND HIERARCHY ONLY. No word moves, no hook moves, no
   behaviour change, every colour a token with a dark value.

   TWO THINGS THIS BLOCK MAY NOT TOUCH, and does not:
   - `_league.html` and `_bridge.html` are rendered by `board_pdf.html` out of
     its own inline <style>, and `tests/test_board_pdf_classes.py` fails both
     ways — a class in a partial the PDF does not style, or a class the PDF
     styles that the partial no longer emits. So nothing here adds a class to
     either partial: the league is styled through `#league-card`, which only
     the Overview renders, and the bridge through `.ov-bridge`, a class on the
     CALL SITE in `overview.html`. Neither reaches the packet or the sheet.
   - the `@media (max-width: 1100px)` fold that turns the bridge into an
     equation is asserted rule by rule, so the strip's own layout below is
     written at `min-width: 1101px` and can never out-rank it. */

/* --- 1. THE CONSOLE BREATHES -------------------------------------------
   Eleven columns, a Status control and `white-space: nowrap` on EVERY cell
   inside about 1,180px of content: the gutter had already come down to 9px to
   buy room, and the one cell that could not give was the company's name — the
   word a reader arrives for. The figures keep nowrap, because a figure broken
   across two lines is read as two figures; the words let go of it. */
.console-table th, .console-table td,
.console-table tbody th[scope="row"] { white-space: normal; }
.console-table td.num, .console-table th.num,
.console-table td.col-date, .console-table .status-cell { white-space: nowrap; }
/* a column header is a label, not prose: it keeps its line and its own
   sub-label keeps the one under it */
.console-table thead th { white-space: nowrap; }
/* a figure with its reason under it had no room above or below the pair: the
   cell is 34px tall and the sub-line ate the padding. Every row gets the same
   air, whether it carries one line or two. (`table.dt td` is 0,1,2 — a
   `.console-table td` of 0,1,1 loses to it, which is why the dialect carries
   `table.dt` in the selector here, as the league's does.) */
table.dt.console-table td,
table.dt.console-table tbody th[scope="row"] {
  padding-top: 6px; padding-bottom: 6px;
}
/* the sorted header is ONE object: a column's name and the arrow that says
   which way it points, in one ink. The arrow was `--accent` beside `--ink`,
   which reads as a link inside a heading. */
.console-table .th-sort { padding: 2px 4px; margin: -2px -4px;
  border-radius: var(--r-sm); }
.console-table .th-sort:hover { background: var(--surface-2); color: var(--accent); }
.console-table .th-sort.is-sorted .th-arrow { color: inherit; }
#league-card .league-foot:last-child { margin-bottom: 0; }
.branch-rank b { color: var(--ink); }
/* the itemisation is the working under the equation, not a fifth term of it */
.ov-bridge .bridge-note { margin-top: 12px; padding-top: 9px;
  border-top: 1px solid var(--line-soft); }

/* --- 3. THE ADD-A-WIDGET ROWS READ AS CHOOSABLE -------------------------
   One column of full-width rows was the right shape and it arrived with no
   affordance at all: no border, no ground, no separator, nothing at rest —
   eleven lines of plain text sitting directly above four outlined preset
   chips, inside one panel. A row list does not need a box each; it needs the
   list grammar the product's own tables use: one pitch, a hairline between
   rows, a ground under the pointer, and a mark at the leading edge.

   The mark is that leading edge itself, in `--accent-line` at rest and
   `--accent` under the pointer — the accent the brief wanted on the "+" that
   opens each label. The "+" is the first character of a text node layout.js
   writes, and there is no way to colour one character of it without
   `::first-letter` or a new element, so the rule that carries the accent is
   the one drawn beside it. The rows keep `--ink`; the presets keep their
   pills, and the two lists can still never be mistaken for one. */
.ov-add { gap: 0; }
.ov-add-btn + .ov-add-btn { border-top: 1px solid var(--line-soft); }
.ov-add-btn:hover { background: var(--surface-2); color: var(--ink);
  box-shadow: inset 2px 0 0 var(--accent); }
/* the ring is INSET: the panel body is a scroller, and an offset ring on a
   full-width row is clipped by it */
.ov-add-btn:focus-visible { outline: 2px solid var(--accent);
  outline-offset: -2px; border-radius: var(--r-sm); }

/* --- 5. A FOOT FOLLOWS A LIST, AND PINS UNDER A PLOT --------------------
   `margin-top: auto` lines the three chart cards' feet up on one baseline,
   which is what a row of same-height PLOTS wants. The bar-list cards have no
   plot: "Revenue by client" is three rows, and pinning its twin to the bottom
   of a card sized by its neighbours left 140px of empty ground above the
   control — a card that reads as though it failed to load its rest.
   A card whose content is a bar list lets its foot follow that list. Scoped
   by what the card CONTAINS, so no markup moves and no mount id is hard-coded
   into the cascade. */
.ov-widget > .viz-card:has(.hbars) > details.viz-table { margin-top: 0; }

/* --- 6 is phone-only; see the media query at the foot of this block ------ */

/* --- 7. THE COMPANY COLUMN GETS THE SLACK -------------------------------
   30% and 22ch on their own changed nothing, and a render proved it: eleven
   columns of nowrap figures had already saturated the table, so the auto
   layout had no excess to hand the name and a width PREFERENCE with no slack
   to draw on is not honoured. The slack is the gutter — 10px a side across
   eleven columns is 220px of an 1150px table. 8px, the figure the league
   already uses and the one the console itself uses on a phone, gives 44px
   back, and the 30% preference sends it to the name, which now sits on one
   line at 1440. The figures keep `nowrap` and their right alignment, and the
   door's 26px cell keeps its own rule.
   (`table.dt td` is 0,1,2 and `table.dt tbody th[scope="row"]` 0,2,2, so the
   dialect carries `table.dt` here exactly as section B's row-height rule
   does: without it a longhand loses to the shorthand it is trimming.) */
table.dt.console-table th, table.dt.console-table td,
table.dt.console-table tbody th[scope="row"] {
  padding-left: 8px; padding-right: 8px; }
.branch-table td.col-reports { white-space: nowrap; font-size: var(--t-sm); }
.branch-table td.mono-cell { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
/* the neutral band ("Moderate", "—") was --muted on its --line ground,
   4.3:1 at 11px */
.signal-band:not(.band-improving):not(.band-softening) { color: var(--ink-2); }
/* a draft verdict is tentative in its DOT alone: dimming the whole verdict
   dimmed the "draft" tag with it, the one word that says the month is not
   yet published, to 3.6:1 */
.verdict.draft { opacity: 1; }
.verdict.draft .verdict-dot { opacity: .8; }
#league-card a.lg-flag:hover, #league-card a.lg-flag:focus-visible {
  background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); }

/* -- 2. ONE VERDICT ----------------------------------------------------------
   the branch card's verdict at the company card's size under the same label
   line, and Holding steady's word in ink: indigo means clickable everywhere
   else. Its card rule takes the muted neutral (a 4px ink rule read heavier
   than any verdict's, and bright grey in dark) and its dot `--ink-2`, so it
   no longer wears Provisional's exact dot and rule */
.health:not(.band) > .band-kicker { margin: 0 0 12px; }
.health:not(.band) .verdict { font-size: 32px; font-weight: 800; letter-spacing: -.025em;
  line-height: 1; gap: 12px; }
.health:not(.band) .verdict-dot { width: 14px; height: 14px; }
.health:not(.band) .verdict-draft { padding: 3px 7px; border: 0; border-radius: 5px;
  background: var(--warn-bg); color: var(--warn-ink); letter-spacing: .04em;
  vertical-align: middle; }
.verdict-holding .verdict-dot { background: var(--ink-2); }
.health.card-holding { border-left-color: var(--muted); }

/* -- 6c. THE CARD'S FOOT NOTES ---------------------------------------------------
   the plan basis and the coverage note are one group of two sentences
   about how the card was read */
.health.band .card-notes { display: flex; flex-direction: column; gap: 4px; }
.dqm-assign summary, .dqm-open, .dec-form input, .dec-form button { border-radius: var(--r-md); }
.ovw-bar .icon-btn { border-radius: var(--r-sm); }
.health.band .verdict-draft, .health:not(.band) .verdict-draft { border-radius: 4px; }

/* -- 7. THE FAILED SAVE SITS IN THE PANEL'S INSET ---------------------------
   `#ov-save-err` (layout.js) stands between the Customize panel's body and
   its foot, and it ran from edge to edge while both of them are inset 20px:
   it takes their inset, and it keeps its height when the body scrolls. */
#ov-save-err { flex: none; margin: 0 20px 12px; }
.dec-closed > .dq-save-err { margin: 8px 0; }
.state-card.card-softening { border-left-color: var(--attn); }
.state-card.card-watch { border-left-color: var(--attn); }
.state-card.card-improving { border-left-color: var(--ok); }
.state-card.card-holding { border-left-color: var(--ink-2); }
.state-card .verdict { font-size: var(--t-28); letter-spacing: -0.02em; font-weight: 800; margin: 0;
  text-transform: none; flex-wrap: wrap; }
.state-card .verdict .verdict-dot { width: 11px; height: 11px; }

/* the deck */
.deck-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px 14px; }
.deck-head:not([hidden]) { display: flex; }
.deck-head { align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 0 0 8px; }
.deck-h2 { margin: 0; font-size: var(--t-16); font-weight: 650; letter-spacing: -0.01em; }
.deck-all { font-size: 13px; }
.deck-label:not([hidden]) { display: block; }
.deck-list { margin: 0; }
.deck-lines { margin: var(--s-3) 0 0; }
.deck-detail .dqd { padding-top: var(--s-3); padding-bottom: var(--s-4); }
.dq-since.since-new { color: var(--attn-ink); font-weight: 600; }
.dq-since.since-same { color: var(--ink-2); }
.dq-since.since-eased { color: var(--muted); }
/* the week-on-week marks (SPEC §6.106): dollars up or the subject back is
   attention, like a new row; down reads in ink */
.dq-since.since-up, .dq-since.since-back { color: var(--attn-ink); font-weight: 600; }
.dq-since.since-down { color: var(--ink-2); }
.console-table .top-insight:not([hidden]) { display: block; }
.console-table .top-insight { color: var(--ink); text-decoration: none; font-size: 12.5px;
  line-height: 1.35; }
.console-table .top-insight:hover, .console-table .top-insight:focus-visible {
  text-decoration: underline; }
.console-table td.col-since { white-space: nowrap; }
.dqm-drop .dec-form:not([hidden]) { flex-direction: column; align-items: flex-start; }
.dqm-drop .dec-form input[type="radio"] { padding: 0; }
/* LIST AND DETAIL SIDE BY SIDE FROM 900 UP: the list keeps about 340px, the
   detail the rest, and stays with the reader as the page scrolls */
.decisions-block > .dq-inbox { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
.decisions-block > .dq-inbox > .dq-detail { position: sticky; top: var(--s-4); }
.decisions-block > .list-toolbar { margin: 0 0 var(--s-3); }

/* THE OVERVIEW'S LIST (SPEC 6.137) lays its rows out as this page does: the
   title with its dollars at the right, the type under the title at its own
   width, the chevron at the far right */
.deck-list .dq-row.dq-pick { grid-template-columns: minmax(0, 1fr); row-gap: 6px;
  min-height: 0; color: inherit; text-decoration: none; cursor: pointer; }
.deck-list .dq-pick .dq-main { grid-row: 1; grid-column: 1; }
.deck-list .dq-pick .dq-chip { grid-row: 2; grid-column: 1; justify-self: start; }
/* ITS DETAIL IS A SIDE PANEL (owner decision 2): the right edge, full height,
   the page behind dimmed and inert (a modal dialog); under 900 it covers the
   page, as the detail does here */
dialog.deck-detail { margin: 0 0 0 auto; width: min(480px, 100vw); max-width: 100vw;
  height: 100dvh; max-height: 100dvh; border-radius: 0; overflow-y: auto; }
/* THE TOTAL WEARS ONE RULE — the ink rule above it, nothing below (review
   2026-09-08, N8). This closing hairline named `td` and not `tbody th`, and
   outranked the total's own reset (0,3,3 over 0,3,2), so every total on the
   sheet printed underscored from the middle of the table to its right edge
   and open under its label, while the PDF drew it full width: the page and
   the packet disagreed about the shape of their most important row. */
.board-sheet .board-table tbody tr:last-child:not(.total) td,
.board-sheet .board-table tbody tr:last-child:not(.total) th {
  border-bottom: 1px solid var(--line); }
.board-sheet .board-table tbody tr.total td,
.board-sheet .board-table tbody tr.total th { border-bottom: 0; }

/* ==== THE BRANCH LEAGUE TABLE (third review, 2026-09-08) ==================
   Four rules that have to WIN the cascade or resolve to nothing, so they sit
   after the `table.dt` primitive and carry `dt` in the selector. */
/* M4 — THE TOTAL'S INK RULE PAINTS EDGE TO EDGE ON THE CARD. The reset used
   to be declared with the dialect, ABOVE `table.dt tbody th[scope="row"]`
   and at equal specificity, so the branch cell kept its hairline and the one
   rule separating the company from its branches painted pale for the first
   quarter of the table and ink for the rest. */
table.dt.league tr.pre-total td,
table.dt.league tr.pre-total th[scope="row"] { border-bottom: 0; }
/* M5 — THE COST-CENTRE RULE IS A BORDER ON THE ROW, NOT A SPACER SPANNING
   THE COLUMNS. A `colspan` counted the folded columns too, so at 960px the
   rule ran a third past the table it divided. A border on the first
   cost-centre row's cells folds away exactly with them. */
/* N11 (fourth review) — AND A READER CAN SEE IT. `--line` against the rows'
   `--line-soft` is a ten-value step at 1px: what actually separated the band
   was its top padding. Ink at 1px reads as the middle of three tiers — rows
   hairline, band 1px ink, total 1.5px ink. */
table.dt.league tr.league-rule td,
table.dt.league tr.league-rule th[scope="row"] { border-top: 1px solid var(--ink);
  padding-top: 14px; }
table.dt.league tr.pre-rule td,
table.dt.league tr.pre-rule th[scope="row"] { border-bottom: 0; }
/* ==== THE BOARD SHEET AND THE LEAGUE, FIFTH PASS (2026-09-08) ============
   Rules from the fifth review's league (02) and board-tables (03) reports.
   They sit at the end so they win the cascade over the dialect above. */

/* 02-N5 — THE TOTAL'S RULE IS VISIBLY HEAVIER THAN THE COST-CENTRE BAND.
   Both resolved to exactly one pixel of ink at 1x (measured on the rendered
   card and on the board sheet), so the three tiers the code describes — rows
   hairline, band ink, total ink-and-a-half — read as two. The band says
   "these rows are not ranked with the others"; the total says "everything
   above adds to this", and a reader should not have to infer either. */
table.dt.league tr.total td,
table.dt.league tr.total th[scope="row"] { border-top: 2px solid var(--ink); }
main.page-reading .health.band .stats .stat:first-child .stat-num,
main.page-reading .health.band .stats .stat.anchor .stat-num { font-size: var(--t-28); }

@media screen and (max-width: 1240px) {
  table.dt.league.league-sheet td,
  table.dt.league.league-sheet th { padding: 6px 5px; }
}

@media (max-width: 1100px) {
  /* one column: every widget takes the row, whatever span it was given */
  .ov-widgets { grid-template-columns: minmax(0, 1fr); }
  .ov-widget, .ov-widget.w-half, .ov-widget.w-full { grid-column: 1 / -1; }
/* below 1100px the sheet is too narrow for the equation on one line. It does
   NOT wrap into rows with the operators stranded at the right (owner rule:
   the bridge is one line, and a wrapped one invites adding the wrong terms) —
   it becomes a two-column LIST, the operator leading its own label
   (review 2026-09-07). */
  /* THE WIDGET FOLDS THE WAY THE SHEET DOES (review 2026-09-08, 04-U2). It
     wrapped into rows of three instead, so on a half-screen window the
     Overview read `Cash · Jan $1,872,938 + P&L $1,326,151` and then a
     stranded `+` at the right of the row, with the `=` two rows above the
     figure it introduces. The bridge is the only line in the product that
     prints an `=`, so it is the one line a director checks. */
  .ov-widget .bridge-strip { display: grid; grid-template-columns: 1fr auto;
    align-items: baseline; gap: 2px 16px; row-gap: 6px; }
  .ov-widget .bridge-strip b { grid-column: 2; text-align: right; }
}

@media (max-width: 900px) {
  .ov-row-7-5 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1240px) {
  .ov-row-7-5 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .health.band { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1240px) {
  .health.band { grid-template-columns: minmax(0, 1fr); }
}

/* -- 6. THE STRIP AT HALF-SCREEN ------------------------------------------------
   the 1240px rule took five figures to two columns whatever the card's
   width, so Cash sat alone on a third row. The card is the container now:
   one row only where every comparison fits on one line under its figure,
   from 900px of card for five figures and for four (at 833px and 797px each
   comparison wrapped in its 140px tile, and a seven-digit anchor crossed the
   next tile's rule); below that five read three and two, four two by two.
   Customize's dock keeps family 3's strip (`body.ov-edit .stats`), so the
   page beside the dock is still a preview of the page. */
.health.band { container: healthcard / inline-size; }

@media (max-width: 900px) {
  .measures-card .mlist { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1100px) {
  .measures-card .mlist { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
/* under 900 (a phone, a narrow window): the list is the page; a row opens
   its detail OVER the list, with the way back */
  .decisions-block > .dq-inbox { grid-template-columns: minmax(0, 1fr); }
  .dq-detail[data-open]:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 65;
    overflow-y: auto; border: 0; border-radius: 0; box-shadow: none; padding-top: var(--s-2); }
  dialog.deck-detail { width: 100vw; }
}

@media (max-width: 640px) {
/* ON A PHONE THE TITLE HAS THE ROW (owner report 2026-11-15, "insights on
   the overview look terrible on mobile"): the dollars kept their one line
   beside the title, "$7,200/mo at stake (from Jul 2026)" took most of the
   row, and the title broke a few letters a line. Under 640px the dollars go
   under the title, at its left, and may wrap; wider, the row is as drawn. */
  .deck-list .dq-pick .dq-title:not([hidden]) {
    flex-direction: column; align-items: stretch; gap: var(--s-1); }
  .deck-list .dq-pick .dq-fig { margin-left: 0; text-align: left; white-space: normal; }
  .measures-grid { grid-template-columns: minmax(0, 1fr); }
  /* decision cards stack their actions under the text on a phone */
  .dec-card { flex-direction: column; gap: 8px; }
  .dec-actions { padding-top: 0; }
  .ov-widget > .decisions-block > .dq-head { margin: 0 14px 10px; }
  .ov-widget > .decisions-block > .dq-queue > .muted { padding: 10px 14px 14px; }
  /* the dock becomes the phone's own full-screen sheet */
  body.ov-edit .ov-panel:not([hidden]) { inset: 0; width: 100%;
    max-width: none; border-left: 0; }
  body.ov-edit main > .page-head.suite { padding-right: 0; }
  .ov-widget > .viz-card { padding: 12px 14px; }
  #main table.console-table > :is(tbody, tfoot) > tr > :is(th, td) { display: block; grid-column: 1 / -1; order: 1;
    position: static; width: auto; min-width: 0; max-width: none; height: auto; padding: 0; border: 0;
    background: none; box-shadow: none; font-size: var(--t-14); line-height: 1.35; text-align: left;
    white-space: normal; }
  /* the name, and the verdict beside it: a word here, not a pill */
  #main table.console-table > :is(tbody, tfoot) > tr > th { grid-column: 1 / 3; font-size: var(--t-16); }
  #main table.console-table > :is(tbody, tfoot) > tr > td[data-col="verdict"] { grid-column: 3; text-align: right; }
  #main table.console-table td[data-col="verdict"] > .badge { padding-left: 0; padding-right: 0; white-space: normal; }
  /* a figure is a third of the card, under its column's name: the three a
     person compares first, then the rest in the table's order */
  #main table.console-table > :is(tbody, tfoot) > tr > td:is(.num, .col-date) { grid-column: auto; order: 3;
    font-weight: 600; white-space: normal; }
  #main table.console-table > :is(tbody, tfoot) > tr > td:is([data-col="revenue"], [data-col="net_income"], [data-col="cash"]) { order: 2; }
  #main table.console-table > :is(tbody, tfoot) > tr > td[data-label]:not([data-col="verdict"])::before {
    content: attr(data-label); display: block; color: var(--muted); font-size: var(--t-12); font-weight: 400; }
  #main table.console-table > :is(tbody, tfoot) > tr > td[data-label]:is([data-col="published"], [data-col="since"])::before {
    display: inline; margin-right: var(--s-2); }
  /* the top insight closes the card, under a hairline */
  #main table.console-table > :is(tbody, tfoot) > tr > td:is([data-col="top"], [data-col="since"], .status-cell) { order: 4; }
  #main table.console-table .top-insight { font-size: var(--t-14); }
  #main table.console-table :is(.badge, .tcv-parts, .dq-since) { font-size: var(--t-12); }
  /* a company's count of insights is a door of its own: a finger's height */
  #main table.console-table td[data-col="decisions"] > a { display: block; margin: calc(-1 * var(--s-2)) 0; padding: var(--s-2) 0; }
  #main table.console-table .status-select { min-height: var(--ctl-h); }
}

@media (width <= 640px) {
/* -- 7. THE PHONE -------------------------------------------------------------
   one column, so no tile carries a left rule: the 1240px rules left one
   beside the second and fourth figures */
  .stats > .stat + .stat, .branch-facts > .fact + .fact { border-left: 0; }
}

@media screen and (max-width: 640px) {
  #league-card .league-foot { max-width: none; }
  /* 6. ONE LEFT EDGE UNDER THE READ. The row wraps at 390px, so the quiet
     button's own 10px of padding indented "Generate with AI" from "Computed
     summary" above it and the note below it — and an accent word stepped out
     of a row whose whole point is that it is quiet. The padding goes at this
     width only; the control keeps its height, its ground under the pointer
     and its role. */
  .health .narrative-gen .linklike { padding-left: 0; }
}

@media (641px <= width <= 1240px) and (pointer: coarse) {
  #main table.console-table > * > tr:not([hidden]) { display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(6, minmax(0, 1fr)); gap: var(--s-1) var(--s-3);
    align-items: start; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line-soft); }
  #main table.console-table > * > tr > :is(th, td) { display: block; position: static; width: auto; min-width: 0;
    max-width: none; height: auto; padding: 0; border: 0; background: none; box-shadow: none;
    white-space: normal; }
  #main table.console-table > thead > tr > th:is([data-col="decisions"], [data-col="top"], [data-col="since"], [data-col="setup"], [data-col="last_entry"], [data-col="runway"], :not([data-col])) { display: none; }
  #main table.console-table > :is(tbody, tfoot) > tr > td:empty { display: none; }
}

@media (max-width: 640px) {
  #main table.console-table > :is(tbody, tfoot) > tr > td:empty { display: none; }
}

@media (641px <= width <= 1240px) and (pointer: coarse) {
  #main table.console-table > tbody > tr > td[colspan] { grid-column: 2 / -1; }
  /* the second line: the top insight widest, each under its column's name */
  #main table.console-table > :is(tbody, tfoot) > tr > td:is([data-col="decisions"], [data-col="top"], [data-col="since"], [data-col="setup"], [data-col="last_entry"], [data-col="runway"], .status-cell) { order: 3; text-align: left; }
  #main table.console-table > :is(tbody, tfoot) > tr > td[data-col="top"] { grid-column: span 3; order: 1; max-width: none; }
}

@media (max-width: 640px) {
  #main table.console-table > :is(tbody, tfoot) > tr > td[data-col="top"] { margin-top: var(--s-1); padding-top: var(--s-3);
    border-top: 1px solid var(--line-soft); }
}

@media (641px <= width <= 1240px) and (pointer: coarse) {
  #main table.console-table > :is(tbody, tfoot) > tr > td[data-col="since"] { order: 2; }
  /* the verdict is a word here, as on a phone: a seventh of the row holds it */
  #main table.console-table td[data-col="verdict"] > .badge { padding-left: 0; padding-right: 0; white-space: normal; }
  #main table.console-table > :is(tbody, tfoot) > tr > td:is([data-col="decisions"], [data-col="top"], [data-col="since"], [data-col="setup"], [data-col="last_entry"], [data-col="runway"])[data-label]::before { content: attr(data-label);
    display: block; color: var(--muted); font-size: var(--t-12); font-weight: 400; }
}

@media (min-width: 901px) and (max-width: 1100px) {
/* -- 6b. THE WIDGETS AT HALF-SCREEN ------------------------------------------
   with the rail folded (901 to 1100px) the page has room for two across:
   two charts share a row, a half widget pairs with its twin, and a run of
   three charts ends on one that takes the whole row rather than half of
   it. A rail the person opened keeps the one-column page, and so does
   Customize: with the dock holding the right 400px two across squeezed each
   chart to 62%. */
  body.side-collapsed:not(.ov-edit) .ov-widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.side-collapsed:not(.ov-edit) .ov-widget:not(.w-full) { grid-column: auto; }
  body.side-collapsed:not(.ov-edit) .ov-widget:not(.w-third)
    + .ov-widget.w-third:not(:has(+ .ov-widget.w-third:not([hidden]))),
  body.side-collapsed:not(.ov-edit) .ov-widget:not(.w-third) + .ov-widget.w-third + .ov-widget.w-third
    + .ov-widget.w-third:not(:has(+ .ov-widget.w-third:not([hidden]))) { grid-column: 1 / -1; }

/* -- 3. AT HALF-SCREEN ANY ODD RUN OF THIRDS ENDS ON A FULL ROW ---------------
   with the rail folded (901 to 1100px) the widgets go two across, and
   block E ends a run of one or three thirds after a non-third on a widget
   that takes the row. A server render leaves every run of thirds a
   multiple of three long (`_overview_spans` widens the rest), and so do
   Customize's Save and Reset, which recompute the spans the same way
   (layout.js `spansFor`): a run of NINE can reach the page as well as one
   of three, since a company scope can place ten thirds, and a run of three
   can OPEN the page, with no widget before it. Runs of five and seven
   cannot form today — a widget a link or the address reveals in place
   keeps its registry span, and every such widget is a full one (the
   league, the queue, the health card, a branch's widgets) — so their rules
   are defensive, kept so that a third revealed in place later still pairs.
   Block E's guards stand: never with Customize's dock open, and a hidden
   third after the run does not continue it. */
  body.side-collapsed:not(.ov-edit) .ov-widget:not(.w-third) + .ov-widget.w-third
    + .ov-widget.w-third + .ov-widget.w-third
    + .ov-widget.w-third + .ov-widget.w-third:not(:has(+ .ov-widget.w-third:not([hidden]))),
  body.side-collapsed:not(.ov-edit) .ov-widget:not(.w-third) + .ov-widget.w-third
    + .ov-widget.w-third + .ov-widget.w-third
    + .ov-widget.w-third + .ov-widget.w-third
    + .ov-widget.w-third + .ov-widget.w-third:not(:has(+ .ov-widget.w-third:not([hidden]))),
  body.side-collapsed:not(.ov-edit) .ov-widget:not(.w-third) + .ov-widget.w-third
    + .ov-widget.w-third + .ov-widget.w-third
    + .ov-widget.w-third + .ov-widget.w-third
    + .ov-widget.w-third + .ov-widget.w-third
    + .ov-widget.w-third + .ov-widget.w-third:not(:has(+ .ov-widget.w-third:not([hidden]))),
  body.side-collapsed:not(.ov-edit) .ov-widget.w-third:first-child:not(:has(+ .ov-widget.w-third:not([hidden]))),
  body.side-collapsed:not(.ov-edit) .ov-widget.w-third:first-child + .ov-widget.w-third
    + .ov-widget.w-third:not(:has(+ .ov-widget.w-third:not([hidden]))),
  body.side-collapsed:not(.ov-edit) .ov-widget.w-third:first-child + .ov-widget.w-third
    + .ov-widget.w-third + .ov-widget.w-third
    + .ov-widget.w-third:not(:has(+ .ov-widget.w-third:not([hidden]))),
  body.side-collapsed:not(.ov-edit) .ov-widget.w-third:first-child + .ov-widget.w-third
    + .ov-widget.w-third + .ov-widget.w-third
    + .ov-widget.w-third + .ov-widget.w-third
    + .ov-widget.w-third:not(:has(+ .ov-widget.w-third:not([hidden]))),
  body.side-collapsed:not(.ov-edit) .ov-widget.w-third:first-child + .ov-widget.w-third
    + .ov-widget.w-third + .ov-widget.w-third
    + .ov-widget.w-third + .ov-widget.w-third
    + .ov-widget.w-third + .ov-widget.w-third
    + .ov-widget.w-third:not(:has(+ .ov-widget.w-third:not([hidden]))) { grid-column: 1 / -1; }
}

@media (width > 640px) {
  @container healthcard (max-width: 899.98px) {
    body:not(.ov-edit) .health.band .stats:has(> .stat:nth-child(5)) > .stat:nth-child(3n+1) {
      border-left: 0; padding-left: 0; }
    body:not(.ov-edit) .health.band .stats:has(> .stat:nth-child(5)) > .stat:not(:nth-child(3n+1)) {
      border-left: 1px solid var(--line-soft); padding-left: 16px; }
    body:not(.ov-edit) .health.band .stats:not(:has(> .stat:nth-child(5))) > .stat:nth-child(2n+1) {
      border-left: 0; padding-left: 0; }
    body:not(.ov-edit) .health.band .stats:not(:has(> .stat:nth-child(5))) > .stat:nth-child(2n) {
      border-left: 1px solid var(--line-soft); padding-left: 16px; }
  }

  @container healthcard (min-width: 900px) {
    body:not(.ov-edit) .health.band .stats:has(> .stat:nth-child(5)) {
      grid-template-columns: repeat(5, minmax(0, 1fr)); }
    body:not(.ov-edit) .health.band .stats:not(:has(> .stat:nth-child(5))) {
      grid-template-columns: repeat(4, minmax(0, 1fr)); }
  }

  @container healthcard (max-width: 899.98px) {
    body:not(.ov-edit) .health.band .stats:has(> .stat:nth-child(5)) {
      grid-template-columns: repeat(3, minmax(0, 1fr)); }
    body:not(.ov-edit) .health.band .stats:not(:has(> .stat:nth-child(5))) {
      grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }

  @container healthcard (min-width: 900px) {
    body:not(.ov-edit) .health.band .stats > .stat + .stat {
      border-left: 1px solid var(--line-soft); padding-left: 16px; }
  }
}

@media screen and (min-width: 1101px) {
/* --- 5. THE CASH BRIDGE'S RHYTHM ---------------------------------------
   `justify-content: space-between` spread four terms of very different widths
   across the whole card, so each `+` sat wherever the slack left it and the
   equation read as four labels and a figure rather than as a sum. Equal
   tracks for the terms, the operators quiet and narrow between them, the
   destination figure on the card's right edge under its own `=`.

   Written at `min-width: 1101px` ON PURPOSE: below that the strip becomes a
   two-column equation, and those rules are asserted verbatim. */
  .ov-bridge .bridge-strip { justify-content: flex-start; gap: var(--s-3);
    padding-top: 8px; }
}

@media screen and (min-width: 1241px) {
/* 02-N6 — THE COLGROUP GOVERNS THE SCREEN SHEET TOO. `table-layout: auto`
   made the declared widths suggestions, and the widest cell in the table —
   the answer column's `nowrap` comparison — took a quarter of it, squeezing
   the branch names to 13% so "Colorado / Springs" wrapped at 1440. Fixed
   layout, and the answer column's comparison wraps rather than overflowing
   (the PDF's own lesson: a nowrap string in a fixed column overprints its
   neighbour). */
  table.dt.league.league-sheet { table-layout: fixed; }
}

@media screen and (max-width: 1240px) {
/* 02-S2 — ... AND THE ANSWER COLUMN SURVIVES THE FOLD (review 2026-09-08).
   Restoring the nine columns inside the sheet's 590px content column laid the
   table out at `min-width: 900px` and pushed Gap vs plan off the page: Fort
   Collins read "behind plan · loss" with `$108,465` nowhere on screen, while
   the note under it named two columns further right as the ones to scroll
   for. SPEC §6.37 is explicit — under 1240px a wide table keeps the name, the
   answer and the flag. The sheet folds exactly as the card does, and the note
   says what went. */
  table.dt.league.league-sheet { font-size: var(--t-12); }
}

@media screen and (min-width: 1241px) {
  table.dt.league.league-sheet td.lg-gap .lg-cmp,
  table.dt.league.league-sheet td.fold .lg-sub,
  table.dt.league.league-sheet td.fold .lg-cmp { white-space: normal; }
}

@supports (grid-template-rows: subgrid) {
  .branch-facts .fact { display: grid; grid-template-rows: subgrid; grid-row: span 4;
    gap: 2px; align-content: start; }
/* ... AND THE FIGURES SHARE ONE BASELINE: a 26px anchor in a middle tile sat
   4px below the 22px figures beside it. The card's strip already shares its
   rows through the pinned subgrid, so the number row aligns on its baseline
   (measured in Edge: 4px apart before, 0 after). The packet's tiles are
   columns of their own, so every number box there is one height with its
   baseline one distance down, held by a strut taller than either figure
   rises: the figures and the comparisons under them both line up (4px and
   4.4px apart before, 0 after). */
  .health.band .stats > .stat > .stat-num { align-self: baseline; }
}

@container ovhead (356px <= width <= 459.98px) {
  .page-controls:has(> .year-nav) > #ov-customize { width: var(--ctl-h); padding: 0; gap: 0;
    justify-content: center; font-size: 0; margin-left: auto; }
}

#modal-confirm .confirm-foot:not([hidden]) {
  display: flex; justify-content: flex-end; align-items: center; gap: 8px;
  margin: 16px -20px -16px; padding: 12px 20px; border-top: 1px solid var(--line);
}

/* ===== INSIGHTS AND THEIR EVIDENCE [insights] =====
   The Insights page and the evidence under a finding.
   --- kept from an old banner ---
   THE PATTERN ENGINE (SPEC §6.103) · the evidence under a finding
*/

.attest-table tfoot td, .list-table tfoot td { font-weight: 700;
  border-top: 1.5px solid var(--ink); border-bottom: 0; background: var(--surface); }

/* in the detail the table's last column wraps rather than run past the edge */
.dqd .ev-table .ev-state { white-space: normal; min-width: 96px; }

table.grid td.sum-col.neg { color: var(--err); }
tr.computed td.num.neg { color: var(--err); }
.assign-bar button:not(.primary):not(.linklike):hover {
  border-color: var(--accent); color: var(--accent); }
/* the month the packet is about carries its own weight; the table foots */
.board-sheet .board-table tr.is-anchor td, .board-sheet .board-table tr.is-anchor th { font-weight: 600; }
.board-sheet .board-table tr.total td, .board-sheet .board-table tr.total th {
  border-top: 1.5px solid var(--ink); font-weight: 700; }
.board-sheet .dm-sheet .dm-tbl tbody th { font-weight: 400; width: auto; }
/* THE TOTAL'S RULE PAINTS. In a collapsed border the total's 1.5px ink top
   and the previous row's 1px hairline resolve to the same device width and
   the tie goes to the earlier cell, so every "total" on the sheet was
   separated by the same hairline as every other row (review 2026-09-07).
   The row above gives up its edge instead of trying to outrank it. */
.board-sheet .board-table tr.pre-total td, .board-sheet .board-table tr.pre-total th {
  border-bottom: 0; }
/* the sheet is HAIRLINES, NOT TINTED BLOCKS (CLAUDE.md): the comparison row
   of the plan table takes the primitive's 600 weight and a rule, not the
   `--surface-2` band — and the PDF's copy of the rule says the same, so the
   two surfaces cannot drift (03-N13) */
.board-sheet .board-table tr.subtotal td, .board-sheet .board-table tr.subtotal th {
  background: none; border-top: 1px solid var(--line); }

/* 03-Q5 — THE PLAN-ONLY MONTHS ARE THEIR OWN BLOCK. The bold total sat under
   a plan column that added to half as much again, because four forecast-only
   months printed above it. The settled months close on their total; the
   months with no actual follow under a band that says so. */
.board-sheet tr.pm-planband th { font-weight: 600; color: var(--ink-2);
  background: var(--surface-2); padding-top: 7px; padding-bottom: 7px; }
.board-sheet tr.pm-plan-only td, .board-sheet tr.pm-plan-only th { color: var(--ink-2); }
.board-version-list th[scope="row"] { white-space: nowrap; }
.board-sheet .tbl-grid tr.subtotal td, .board-sheet .tbl-grid tr.subtotal th { font-weight: 600; background: var(--surface-2); }
.board-sheet .tbl-grid tr.check-row td, .board-sheet .tbl-grid tr.check-row th { font-style: italic; }
table.board-version-list td, table.board-version-list th { white-space: nowrap; }
table.board-version-list td.mono { font-size: 12px; color: var(--ink-2); }
.sh .sh-row th { font-weight: 600; color: var(--ink); }
/* The months paired as a table under the deck's card and inside the insight
   pop-out, the rule in words, the lines behind a rollup's miss, where to
   look. On the kit's tokens: a fired month is attention, never a loss; a
   month that sits out is muted; every colour is a token. Nothing here names
   an id, and nothing after the FORMULA HELP header names `--err`. */
.ev:not([hidden]) { display: flex; }
.ev-tablewrap { margin: 0; }
.ev-table { width: 100%; font-size: var(--t-table); }
.ev-table tbody th { font-weight: 500; color: var(--ink); white-space: nowrap; }
.ev-table tr.ev-fired td.num { color: var(--attn-ink); font-weight: 600; }
.ev-table tr.ev-out td, .ev-table tr.ev-out th { color: var(--muted); font-weight: 400; }
.ev-table .ev-state { color: var(--muted); font-size: var(--t-sm); white-space: nowrap; }
.ev-table tfoot th, .ev-table tfoot td { font-weight: 700; border-top: 1.5px solid var(--ink); }
.ev-key, .ev-note { margin: 0; font-size: var(--t-sm); }
.ev-parts, .ev-links { margin: 0; }
.ev-why { margin: 0; }
.dqm-action .ev { margin-top: 14px; }
.dqm-action .ev-table { font-size: var(--t-13); }
.deck-proof .ev { margin-top: 14px; }
.pat-table td.pat-th .pat-field:not([hidden]) { display: flex; flex-direction: row;
  flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 8px;
  margin: 3px 0; text-align: left; font-weight: 400; }
.pat-table td.pat-th .pat-label { color: var(--ink-2); font-size: 12px; font-weight: 400;
  text-align: left; }
.pat-table .pat-val { font-variant-numeric: tabular-nums; }
.pat-table .pat-rule { color: var(--ink-2); font-size: 12.5px; line-height: 1.45;
  max-width: 60ch; }
.dqd-why .ev-rule-wrap > .deck-label { display: none; }
.sh table.sh-kpis th, .sh table.sh-kpis td, .sh table.sh-acc th, .sh table.sh-acc td {
  padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line-soft); text-align: left;
  vertical-align: baseline; }

@media (max-width: 640px) {
  .ev-table .ev-state { white-space: normal; }
  .pat-table .pat-rule { max-width: none; }
  .sh table.sh-kpis th, .sh table.sh-kpis td, .sh table.sh-acc th, .sh table.sh-acc td {
    padding-right: 8px; }
}

.ev-table tr.ev-fired th { border-left: 3px solid var(--attn); padding-left: 7px; }

@media (max-width: 640px) {
  #main table.ev-table:not(:has(th.num ~ th.num ~ th.num)) > * > tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (width <= 640px) {
  :is(.move-arrivals, .move-people) > * > tr > :first-child { padding-left: 16px; }
  :is(.move-arrivals, .move-people) > * > tr > :last-child { padding-right: 16px; }
}

.sh .sh-cat th { padding-left: 14px; font-weight: 400; color: var(--ink-2); }
.ev-table th.num, .ev-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ===== THE GRID AND THE OPERATING METRICS [grid] =====
   The monthly grid: its bands, rows and cells, the summary columns, the cell detail, the balance sheet, the metrics table and the formula pop-out.
   --- kept from an old banner ---
   THE GRID (2026-09-07) — the entry surface rebuilt to the system.
   The year's answer pinned in view, one header row per month, a single
   publication line, a material beat/miss tick, one table language.
   --- kept from an old banner ---
   THE GRID — second fix pass (2026-09-08). The sheared figure at the
   pinned block, the entry row that went blank in dark, the balance
   sheet's two levels, the actual/forecast boundary, and the seams the
   first pass left.
   --- kept from an old banner ---
   THE GRID — fourth pass (2026-09-08). The revenue trend's answer
   column, a badge that never renders a different word, both balance
   sheet sides in one treatment, a Check that says it does not balance,
   and the preamble that took half of the first screen.
   --- kept from an old banner ---
   THE GRID — sixth pass (2026-09-08). One abstention rule per column,
   the beat/miss key back on the page, one counter placement and one
   titling register for the two tables.
   --- kept from an old banner ---
   THE GRID · A · preamble and statements (2026-09-22)
   --- kept from an old banner ---
   THE GRID · B · metrics table and fx pop-out (2026-09-22)
   --- kept from an old banner ---
   THE GRID · C · after the review (2026-09-23)
   --- kept from an old banner ---
   PLAN STATUS HEADER · the red dot (2026-10-28, SPEC §6.95)
   Decision 6 of the management report plan: `--err` is a LOSS everywhere
   else, and colours ONLY the 7px status dot of a red KPI and of the band
   (the word "Off plan" or "Red" always prints beside it). The rest of the
   header's rules are the block at the end of this file; this one rule sits
   here because nothing after the FORMULA HELP header names `--err`.
   --- kept from an old banner ---
   W2a + D1: grid fixes (SPEC §6.118)
*/

/* the balance sheet's Check row is a row of its table (SPEC §6.181). It wears
   `check-row`, which is also a form's checkbox label (`.check-row { display:
   block; ... }`), so the row was a block: the browser set the whole row in
   the first column, that column was 1,177px in a 918px sheet, and no month's
   figure of the balance sheet could be seen on a desk. The label's size,
   weight and ink do not belong to it either. */
.board-sheet .tbl-grid tr.check-row { display: table-row; margin: 0; font-size: inherit; font-weight: inherit; color: inherit; }

/* the grid uses the full window width — no wasted side margin, fewer h-scrolls */
main.grid-page { max-width: none; padding-left: 20px; padding-right: 20px; }
#reason { max-width: 440px; margin-top: 0; }
table.grid th.sum-col:first-of-type, table.grid td.sum-col:first-of-type {
  border-left: 2px solid var(--line); }
tr.computed td.line-col { background: var(--sum-bg); }
.cell-versions b { font-variant-numeric: tabular-nums; }
.hov-cmp b { font-variant-numeric: tabular-nums; }
.hov-list li b, .hov-total b { font-variant-numeric: tabular-nums; }
.scn-goal-form label { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
tr.line-row:hover .drag-handle, tr.series-row:hover .drag-handle { opacity: .7; }
.drag-handle:hover { opacity: 1 !important; }
.line-cell .drag-handle { flex: none; margin-right: 0; }
/* the row-unlock pencil: cells are locked at rest, ✎ opens the row */
/* unlocking a row for entry must not blank it (review 2026-09-08, N2): a
   hard-coded #f5f7ff put --ink at 1.09:1 on every dark-theme row the pencil
   opened. The unlocked row wears the accent's own soft tint, in both themes. */
/* inset shadow, not a border — the inputs are borderless and a border would
   shift the 32px cell box */
table.grid input[data-line][readonly] { cursor: default; caret-color: transparent; }
.seg .check-row { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.fee-add-grid > label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--ink-2); }
.check-row input { margin-right: 8px; }
.manage-series .series-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin: 10px 0 14px; }
.manage-series .series-add input, .manage-series .series-add select { height: 32px;
  border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; }
.manage-series .series-add input[name="name"] { flex: 1 1 220px; }
.series-manage .rename-form { display: flex; gap: 6px; align-items: center; }
.series-manage .rename-form input { height: 28px; border: 1px solid var(--line);
  border-radius: 5px; padding: 0 6px; font-size: 12.5px; }
.rate-add input { height: 28px; border: 1px solid var(--line); border-radius: 5px;
  padding: 0 6px; font-size: 12.5px; }
/* Forecast page: per-line calculation cards */
.fc-section { margin: 22px 0 8px; }
.fc-head h2 { margin: 0; font-size: 17px; }
.fc-sub-label { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); margin: 16px 2px 8px; }
.calc-sentence b { font-weight: 600; }
.calc-cohort { margin: 2px 0 2px 4px; }
.setup-form > label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.fx-modal[hidden] { display: none; }
body.fx-open { overflow: hidden; }
/* revenue cohorts */
.cohort-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 14px; }
.cohort-grid { margin-top: 4px; }
.cohort-retune label { font-size: 12px; color: var(--muted); display: inline-flex; gap: 5px; align-items: center; }
.cohort-retune input { width: 84px; height: 28px; border: 1px solid var(--line);
  border-radius: 5px; padding: 0 6px; font-size: 12.5px; }
.measures-card .kpi-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.measures-card .kpi-card { padding: 10px 12px; }
table.grid td.fc input { color: var(--fc-ink); }
tr.computed td.line-col { background: var(--surface-2); }
.grid-page .toolbar { flex-wrap: wrap; }
.sec-title { margin: 0 0 4px; font-size: 17px; font-weight: 700; letter-spacing: -.01em;
  text-transform: none; color: var(--ink); }
.measures-card .kpi-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
table.grid thead th.sum-t { z-index: 3; }
table.grid tr.computed td.sum-col { background: var(--surface-2); }
/* THE NAME IS NEVER THE FIRST THING TRUNCATED: it holds a floor of 90px
   (~13 characters), and the row's CONTROLS — which were reserving ~60px
   apiece behind `visibility: hidden` — are out of the flow until the row is
   hovered. Only then may the name shrink further. */
.line-cell { overflow: hidden; }

/* --- one publication line, one legend (F10, F12) ---------------------- */
/* THE PUBLICATION LINE IS STATE, NOT AN ALARM (review 2026-09-08, N4):
   `has-stale` painted all three clauses --warn — a fifth colour, at 3.89:1,
   on the most consequential sentence on the page. The strip reads in --ink-2;
   only the pending clause is a badge, which grid.js writes. */
.grid-page .toolbar { margin-bottom: 10px; }
.hov-plan b { font-variant-numeric: tabular-nums; }

/* --- the tick underlines THE FIGURE ----------------------------------- */
/* An inset shadow ran the full width of the input, so two marked months side
   by side read as one continuous rule. A FIXED 44px mark was the other half
   of the same defect (review 2026-09-08, V7): under a right-aligned figure it
   started at whatever character sat 50px in — `156,`810.78 — so the mark read
   as emphasis on those digits, and its boundary moved row to row. It is sized
   to the cell's own figure area instead, inset 6px each side so two marked
   months never touch, and the legend's key underlines a whole word the same
   way. */
table.grid td.num input.fav, table.grid td.num input.unfav {
  box-shadow: none; background-repeat: no-repeat;
  background-position: 6px calc(100% - 5px); background-size: calc(100% - 12px) 2px; }
table.grid td.num input.fav { background-image: linear-gradient(var(--ok), var(--ok)); }
table.grid td.num input.unfav { background-image: linear-gradient(var(--attn), var(--attn)); }

/* --- the statement's own hierarchy ------------------------------------ */
/* the row the statement exists to deliver is 700 under a 1.5px ink rule; a
   SIDE total merely closes a side and stays at 600 under a hairline
   (review 2026-09-08, N8) */
table.grid tr.side-total td, table.grid tr.side-total th.line-col { font-weight: 600;
  border-top: 1px solid var(--line); }
table.grid tr.total-row td, table.grid tr.total-row th.line-col { font-weight: 700;
  border-top: 1.5px solid var(--ink); }
.driver-grid th, .driver-grid td { border: 0; border-bottom: 1px solid var(--line-soft); }
.driver-grid tbody th.series-col { font-weight: 500; font-size: 13px; color: var(--ink);
  letter-spacing: 0; }
.driver-grid tbody tr:hover td, .driver-grid tbody tr:hover th { background: var(--surface-2); }

/* --- N1: a month figure is NEVER sheared by the pinned block --------- */
/* The three summary columns float over the scrolling months, and the cell
   underneath was cut at an arbitrary character AT FULL OPACITY — `211,460.0`
   is a plausible figure and nothing on the page said it was a fragment. An
   opaque gutter fades the covered cell out before its glyphs reach the
   block. Its colour follows the row (a custom property inherits into the
   pseudo-element), so it leaves no seam on a computed band or a hovered
   row, and it takes no pointer events, so the header's controls stay
   clickable underneath it. */
table.grid { --gutter-bg: var(--sum-bg); }
table.grid tr.computed { --gutter-bg: var(--surface-2); }
table.grid tbody tr:hover { --gutter-bg: var(--track); }
/* THE GUTTER IS EXACTLY AS WIDE AS WHAT THE BLOCK COVERS (review 2026-09-08,
   V3): 40px was a guess, and at 960 it left ~45px of `1,801,657.70` on screen
   at FULL ink, reading as `1,801`. The script at the foot of grid.html measures
   the visible remainder of the month column the block is covering and sets
   --gutter-w to it, so a cut cell is HIDDEN rather than cut, and the gutter is
   0 when the boundary is clean — the month beside the block is never touched.
   It is drawn only while the container is scrolled short of its end (at the end
   the block sits in its own place and covers nothing). The 40px fallback is
   what a reader without the script gets. */
.grid-wrap:not(.at-end) table.grid th.sum-t::before,
.grid-wrap:not(.at-end) table.grid td.sum-t::before { content: "";
  position: absolute; top: 0; bottom: 0;
  left: calc(-1 * var(--gutter-w, 40px)); width: var(--gutter-w, 40px);
  pointer-events: none;
  background: linear-gradient(to right, transparent 0, var(--gutter-bg) 8px); }

/* --- N6: the computed rows carry ROW HEADERS ------------------------- */
/* Total Assets, Total Liabilities and RE, Check, Net income and every
   subtotal are `<th scope="row">` now; the tinted band and the weight that
   used to ride `tr.computed td` follow them. */
table.grid tr.computed th.line-col { background: var(--surface-2); color: var(--ink);
  font-size: 13px; font-weight: 650; letter-spacing: 0;
  padding-top: 7px; padding-bottom: 7px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
table.grid tr.total-row th.line-col { font-size: 14.5px; }
table.grid tbody tr.computed:hover th.line-col { background: var(--track); }

/* --- N8: the balance sheet reads as TWO SIDES ------------------------ */
/* the side band and the section band were byte-identical — the reader could
   not tell a side from the section inside it. The side is a step larger, in
   --ink, on its own band. */
table.grid tr.side-row td { font: 600 12.5px/1.3 var(--sans); letter-spacing: .04em;
  text-transform: none; color: var(--ink); background: var(--surface-2);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* --- N7: where the actuals hand off to the projection ---------------- */
/* the tint alone is a 7% step and the row hover out-ranked it; the first
   forecast month carries a rule down the whole statement (grid.js re-draws
   it when a per-month toggle moves the handoff) */
table.grid th.fc-first, table.grid td.fc-first { border-left: 2px solid var(--lav); }

/* --- how many months a reader can actually see ----------------------- */
/* The declared column widths were fiction: with auto table layout the
   month column's PREFERRED width is the text input's own intrinsic size
   (20 characters, ~177px), so every month rendered ~106px however narrow the
   header asked to be, and only seven months fitted beside the pinned block.
   Fixed layout makes the declared widths the rendered ones — 96px a month,
   which holds this product's widest month figure (85px of ink at 13px
   tabular) with room to spare, and puts EIGHT months on screen at 1440 with
   the rail open, five at 960. EVERY tab, the revenue trend included (review
   2026-09-08, T3): left on auto layout its client column took whatever the
   longest client name asked for and pushed the year total — the table's
   answer — off the screen entirely. */
table.grid { table-layout: fixed; }

/* --- the scroll container's own right edge --------------------------- */
/* The P&L's pinned Year total covers the edge and fades what runs under it.
   The BALANCE SHEET and the REVENUE TREND pin nothing there, so a month cell
   half-scrolled off the container was cut mid-digit at full opacity — the
   same defect N1 fixed on the P&L, one surface over. A 24px fade at the
   container's right edge says "there is more", and no fragment reads as a
   figure. It lifts once the container is scrolled to the end (grid.html
   toggles `at-end`), so the LAST month is never dimmed, and it never
   touches the left-pinned line column. The `#000` is a MASK channel, not a
   colour: it means "keep this opaque", and it reads the same in both
   themes.
   THE RULE IS NOT SCOPED TO `.grid-wrap` (review 2026-09-08, T1): the
   Operating metrics table is a scroll container too, and its money rows carry
   no decimals, so a sheared `43` was indistinguishable from a complete `43`.
   Every scroll container the page emits carries `edge-fade`.
   THE FADE IS AS WIDE AS THE CUT (review 2026-09-08, V3): 24px was a guess
   too, and a month is 96-104px wide — the digits beyond the ramp read at full
   ink. The script measures the visible remainder of the column the container
   cuts and sets --cut-w to it, so the fragment is HIDDEN rather than dimmed:
   the ramp is 8px at the START of the cut column and transparent from there,
   because a ramp across the whole fragment leaves its first digits at full
   ink, which is the defect and not the guard. 24px is the fallback for a
   reader without the script. */
.edge-fade:not(.at-end) {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - var(--cut-w, 24px)),
    transparent calc(100% - var(--cut-w, 24px) + 8px));
  mask-image: linear-gradient(to right, #000 calc(100% - var(--cut-w, 24px)),
    transparent calc(100% - var(--cut-w, 24px) + 8px)); }
/* the popover is appended to the body and never takes focus, so this outline
   is the ONLY difference between the keyboard path and the pointer path — it
   has to clear WCAG 1.4.11's 3:1. --accent-line measured 1.51:1 on --surface
   (review 2026-09-08, T10); --accent is the product's own focus ring, 7.0:1. */
.cell-hover[aria-live] { outline: 2px solid var(--accent); }

/* ---- the fourth pass (2026-09-08) ------------------------------------- */

/* ONE MARK PER STATE ON A TRACKED MEASURE (review 2026-09-08, 04-U8): each
   card carried a 4px amber left rule, an amber dot beside the word "Behind"
   and a third amber dot on the variance — twelve marks in a row of four
   cards, for four facts. The rule goes neutral; the chip says the state and
   the comparison says its size, which are two different facts. */
.measures-card .kpi-card.status-ahead, .measures-card .kpi-card.status-behind,
.measures-card .kpi-card.status-none { border-left-color: var(--line); }

/* ONE MARK PER STATE ON A TRACKED MEASURE (review 2026-09-08, 04-N11): each
   card printed an amber dot beside the word "Behind" AND a second on the
   variance below it — eight marks in a row of four cards for four facts. The
   chip's tint is the state; the dot stays on the comparison, which is a
   different fact. And every card gets the same three slots, so four cards in
   one row end on one baseline. */
.kpi-card .kpi-state.cmp::before { display: none; }
.kpi-card .kpi-state { font-weight: 600; }
.kpi-card .kpi-state.up { color: var(--ok); }
.kpi-card .kpi-state.down { color: var(--attn-ink); }
/* the source line is a slot on every card, empty or not, so the four cards
   in a row are the same height */
.kpi-card .kpi-src { min-height: 1.35em; }
/* ONE BADGE FAMILY (review 2026-09-07, consistency): `.pub-badge` carried the
   same state/warning pair under a second class name and is gone — the
   portfolio's publication cell, the attest schedule's readiness and the audit's
   outcome all wear `.badge state` / `.badge warn`. */
.kpi-status { font-size: 11px; font-weight: 600; letter-spacing: .02em;
  text-transform: none; border-radius: 4px; padding: 0 7px; line-height: 1.6; }
.list-table tr.group-row td.num, .attest-table tr.group-row td.num {
  color: var(--ink-2); font-variant-numeric: tabular-nums; }
.list-table tr.group-row:hover td, .attest-table tr.group-row:hover td { background: var(--bg); }
.ledger-table tr.group-row:hover td, .ledger-table tr.group-row:hover th { background: var(--surface-2); }
.rev-trend tr.computed td.year-col { background: var(--surface-2); }
.grid-wrap:not(.at-end) table.rev-trend th.year-col::before,
.grid-wrap:not(.at-end) table.rev-trend td.year-col::before { content: "";
  position: absolute; top: 0; bottom: 0;
  left: calc(-1 * var(--gutter-w, 40px)); width: var(--gutter-w, 40px);
  pointer-events: none;
  background: linear-gradient(to right, transparent 0, var(--gutter-bg) 8px); }
/* under fixed layout a long client name would run into the first month */
.rev-trend tbody th.line-col .line-name { display: block; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }

/* --- T5 / V12: one amber, and the most consequential badge is legible  */
/* "revisions pending" says the published figures are stale, and it was the
   least legible text on the page. The retint now lives on `.badge.warn`
   itself, with the badge primitives — a grammar that only holds on one page
   is a patch, not a system (review 2026-09-08, V12). --warn is retired from
   this page and from every other surface the badge reaches. */

/* --- T7: a sheet that does not balance never reads like one that does - */
/* Check is the row the balance-sheet tab exists to deliver, and a September
   of 703,759.90 was printed in the same ink, at the same weight, under the
   same rule as eight months of 0.00. The cell wears attention (--err stays a
   LOSS, per the colour table) and the row header says the words once. */
table.grid tr#tot-check td.off-balance { background: var(--attn-bg);
  color: var(--attn-ink); font-weight: 700; }
.check-flag { margin-left: 8px; vertical-align: 1px; }

/* --- T13: the preamble that took half of the first screen ------------ */
/* Seven stacked bands stood between the page head and the first figure of
   the statement — three of them prose explaining how the grid works. The
   tick's mechanics moved into "How this grid works" (the legend keeps the
   key and the count), and the plan of record and "Save a version" ride the
   publication line's own row: they are facts about the same thing. */
/* "Save a version" is a `.linklike` button and there is no base `.linklike`
   rule — it takes its look from its container, and in the toolbar it took the
   browser's, which paints a light grey block on a dark page. Beside the plan
   chip it wears the chip's own outline, in both themes. */

/* --- T14: the one row of the summary that is not dollars ------------- */
/* Gross margin prints a percent in the money columns. The unit is declared
   where the row is NAMED, in the summary headers' own sub-label — inline in
   the line column, so the row keeps its height. */
table.grid th.line-col .sum-sub { display: inline; margin: 0 0 0 6px;
  font-size: 11px; font-weight: 500; color: var(--muted); }

/* --- V1: a total that abstains says so, and says why ----------------- */
/* An abstaining total prints the one absent glyph in --muted: it is not a
   figure, and it must not read as one. The reason rides the cell's title and
   the note under the table, which grid.js writes with the months and the
   counts. */
/* (the treatment is declared for EVERY abstaining cell in the sixth-pass
   block at the end of this file — scoped to `tr.computed` it reached the
   totals and left a LINE's own `—` in full ink, review 2026-09-08, S5) */
.balance-absent:empty { display: none; }
.balance-absent { margin-top: 8px; }
/* the section band is one colspan cell with no line column of its own, so a
   scrolled sheet cut its NAME at the container's edge — "Liabilities and
   Retained Earnings" read "d Retained Earnings". The name rides the scroll
   instead, the way the line column does. */
/* the WHOLE band rides the scroll, not the name alone (review 2026-09-08,
   N2): with only `.sec-name` sticky, a scrolled statement slid the name
   across the qualifier printed beside it. */
table.grid tr.section-row .band-inner { position: sticky; left: 20px;
  display: inline-flex; align-items: baseline; gap: 10px; }
table.grid tr.section-row .sec-name { display: inline-block; }
.months-off:empty { display: none; }

/* --- N11: a total's rule crosses the row's own name ------------------ */
/* `table.grid tr.computed th.line-col`'s 1px hairline is declared LATER in
   this file at the same specificity as `tr.total-row th.line-col`'s 1.5px ink
   rule, so it won: the statement's strongest hierarchy signal began at the
   right edge of the sticky line column and read as a rule over the figures
   instead of a total. Declared last, it crosses the name. */
table.grid tr.total-row th.line-col { border-top: 1.5px solid var(--ink); }

/* --- N5: a computed row's name is never clamped --------------------- */
/* `.line-cell .line-name`'s two-line clamp is right for an account name and
   wrong for a subtotal: at 960 "Total cost of production & funding" read
   "Total cost of / production &…" with the rest in a `title`. A total row's
   label is the one row a reader must be able to identify. */
table.grid tr.computed th.line-col .line-name { display: block; overflow: visible;
  -webkit-line-clamp: none; }

/* --- N6: the plan of record says what it is for --------------------- */
/* every tick on the statement is measured against this version, and the fact
   lived in a `title`. The `.sum-sub` pattern, inside the chip. */

/* --- T13: the publication line rides the header --------------------- */
/* It was a band of its own between the head and the first figure. It is the
   header's last line instead: a full-width flex item, so the title, the
   statement tabs and the page controls keep the ONE row they had. */
.grid-page .page-head.suite { margin-bottom: 12px; row-gap: 4px; }
/* the reason under the table, the balance sheet's own pattern */
.absent-note { margin-top: 8px; }
.absent-note:empty { display: none; }
.drag-handle:focus-visible { outline: 2px solid var(--accent);
  outline-offset: 1px; opacity: 1; }
/* the row-name column's sub-label says why the table has no answer column */
.driver-grid thead th.series-col { white-space: normal; line-height: 1.3; }
.driver-grid thead th.series-col .sum-sub { max-width: 260px; }

/* --- S2: the revenue trend's third state ---------------------------- */
/* A month only a PROJECTED deal covers is a figure the engine holds, and it
   printed the absent glyph under a footnote that said the glyph meant the
   opposite. It reads in the forecast ink — the same ink the F columns use —
   on an actual-basis column, and the footnote keys it. */
table.grid.rev-trend td.proj { color: var(--fc-ink); }

/* --- S9: a run of wholly absent months is one column ----------------- */
table.grid.rev-trend th.rev-gap, table.grid.rev-trend td.rev-gap {
  width: 104px; min-width: 104px; background: var(--bg); color: var(--muted); }
table.grid.rev-trend th.rev-gap .month-label { color: var(--muted); }
.access-table select.gg-role:hover, .access-table select.gg-role:focus-visible { border-color: var(--accent); }
.access-table tr.no-access td.gg-mod { opacity: .35; }
/* each module's level (SPEC §6.155): a compact select fills its column */
.access-table td.gg-mod select.gg-level { width: 100%; min-width: 0; padding: 0 2px; font-size: var(--t-sm); }
.access-table select.gg-level:hover, .access-table select.gg-level:focus-visible { border-color: var(--accent); }
.bs-opt input { accent-color: var(--accent); }
.group-row:hover .band-edit, .group-row .band-edit:focus-visible { opacity: 1; }
.driver-grid td.num .computed-cell[data-bd-series]:focus-visible { outline: 2px solid var(--accent); border-radius: 3px; }

/* ONE CONTROL PER MONTH (simplification review 2026-09-11): the series word
   beside the menu, the switch inside it; the summary columns fold */
th.fc .month-tag { color: var(--fc-ink); }
table.grid.sums-folded .sum-a, table.grid.sums-folded .sum-f { display: none; }
/* a partial figure is a FIGURE: it keeps the column's ink, and only the
   sub-line under it is muted. An abstention is the dimmed one. */
table.grid td.sum-col.partial { color: var(--ink); font-weight: 400; }
table.grid td.sum-col.partial.neg { color: var(--err); }

/* THE METRICS TABLE SHARES THE STATEMENT'S GEOMETRY (owner report 2026-09-14:
   "my operating metrics table needs to be the same width as the P&L table,
   I should not have to scroll to see December"). Auto layout let the name
   column grow to 477px around the formula badges, so twelve 104px months
   overran a page the statement fit. Fixed layout, the statement's own 252px
   name column (names wrap, the formula badge sits under the name), and the
   month floor above: 252 + 12 x 104 = 1,500px, always narrower than the
   statement's 1,716, so wherever the P&L shows December this table does. */
.driver-grid { table-layout: fixed; }
.driver-grid .series-col { width: 252px; max-width: 252px; white-space: normal; }
.driver-grid .computed-badge { display: block; max-width: 100%; }
/* A CELL TYPED ON ONE SIDE AND COUNTED ON THE OTHER (owner request
   2026-09-16): the table's data-vkind is the side the switch is on; the
   other side's control is hidden, not removed, so the save still finds it */
.driver-grid:not([data-vkind="actual"]) .side-actual,
.driver-grid[data-vkind="actual"] .side-plan { display: none; }

/* The month word carries the DRAFT qualifier (M-1): one tag, the word for
   the series and, on an unpublished actual, what it is. */
.month-tag { white-space: nowrap; }
/* on the grid the same sentence is the plan chip, so it wraps like prose
   instead of running the header off the page */
/* the Snapshots tab's Window column carries coverage, the as-of date, the
   filled note and the offer — each on its own line */
td.vcov, th.vcov { min-width: 220px; }
td.vcov { font-size: 12.5px; color: var(--muted);
  font-variant-numeric: tabular-nums; }
td.vcov form { margin: 3px 0 0; }
table.grid tbody tr.section-total .line-cell { align-items: flex-start; }
/* a CHECKBOX label in a pop-out's grid keeps its box beside its words: the
   grid's stacked-label rule was standing the box over the sentence */
.access-body .form-grid > label.check-row { display: block; }
.access-body .form-grid > label.check-row > input { align-self: auto; width: auto; }

/* --- RED IS A LOSS ONLY (W-5) -------------------------------------------- */
/* A negative BALANCE is not a loss: an overpaid payable, a credited card, a
   contra account. On the balance sheet a negative reads as ink in
   parentheses — the accounting form — and `--err` is kept for the one row
   that IS a loss, Profit, the year-to-date net income. */
table.grid.bs-grid td.num input.neg { color: var(--ink); }
table.grid.bs-grid tr.computed:not(#tot-profit) td.num.neg { color: var(--ink); }
/* the console runs wide: a figure and its reason must not wrap the column
   open, so the reason wraps inside it instead (the portfolio table sets
   nowrap, which is right for a figure and wrong for a sentence) */
.console-table .tcv-parts { white-space: normal; max-width: 16ch; }
/* …except a sub-line that is itself a FIGURE ("65.9% under", "2 urgent",
   "1 of 2 with a plan"): it sets its column's width like the figure above
   it, rather than wrapping the row two lines taller */
.console-table .tcv-parts.tight { white-space: nowrap; max-width: none; }
.console-table .tcv-parts.attn { color: var(--attn-ink); }
.coverage-note { margin-top: 10px; }
.fte-note { white-space: normal; }
/* the grid's pop-out sat at 60 — the same layer as the rail's drawer on a
   phone, and above it only because of document order */
.fx-modal { z-index: 80; }
.fx-close { position: absolute; top: 10px; right: 12px; }
/* the fx dialog's head runs under the close control, so it reserves the
   control's width and not the old glyph's */
.fx-panel-head { padding-right: 44px; }
/* a count inside a tab is a quiet sans figure, never a second label */
.grid-tabs > a span, .page-tabs > a span,
.kind-toggle > a span, .dq-filters > a span {
  font-family: var(--sans); font-size: 11px; color: var(--muted);
}
/* ONE OUTLINE ON ONE BASELINE: the year stepper and the branch picker are
   shells around a control, drawn in `--line` — the card's hairline — while
   every field and the secondary button beside them now carry `--field-line`.
   Three edge weights in one row; one weight now. */
.year-nav { border-color: var(--field-line); }

/* a tracked measure is an item inside the measures section */
.measures-card .kpi-card { border: 1px solid var(--line);
  border-left-width: 1px; border-radius: var(--r-md); box-shadow: none; }
.measures-card .kpi-card { padding: 12px 14px; }
.measures-card .kpi-label { font-size: var(--t-table); }
.measures-card .kpi-actual { margin: 6px 0 4px; }
.console-table .tcv-parts { margin-top: 1px; }
/* Family 4, section A of the screen redesign. LOOK, LAYOUT AND HIERARCHY
   ONLY: not one word, hook, attribute or behaviour moves, and nothing
   inside a cell changes — the figures, the beat/miss ticks, the dotted
   placeholder mark and every abstention render exactly as they did.

   What the adversarial pass found above the first figure: five bands
   costing 280px of the fold; a plan chip drawn as a button beside a real
   one; a 440px Reason field and a disabled Save as the loudest cluster on a
   page where nothing is usually dirty; a blended-month card louder than the
   statement it introduces, bordered in a hard-coded lavender with no dark
   value. And inside the sheet: a provenance label cut mid-word, a REQ tag
   clipped to "RE" / "REC", a Cash row whose three tags would not seat,
   section bands quieter than the "+ add line" button beside them, a
   forecast column that in dark was a 1.04:1 step against the surface, and
   twelve boxed controls in a header whose subject is figures.

   Everything here is APPENDED. The pinned declarations above — the month
   widths, the gutter and the shear guard, `.month-strip`'s margin,
   `.pub-row`'s display, the section band's font shorthand and its position
   before `tr.side-row`, the two total rules and their order, `.line-cell
   .badge`, `.line-name`'s clamp, `.band-inner`'s sticky offset — are
   untouched and still say what each thing IS. These rules say what it looks
   like. Two earlier rules were edited in place because this section names
   them: the blended card's hard-coded border, and the three conflicting
   sizes of `.series-toggle .seg-opt`. */

/* --- 1. ONE CONTROL STRIP ABOVE THE SHEET (Mixpanel, Customer.io) ------ */
/* The publication sentence, the beat/miss key and the plan of record are
   three facts about one page, and they read as a 130-character run-on
   followed by a stranded chip: the key sat at the right end of the first
   line and "beat and miss compare to this" at the left end of the second.
   The DOM order and the membership of `.pub-row` are pinned, so the
   grouping is DRAWN: the publication sentence has the first line to itself;
   the key and the basis it is measured against share the second, side by
   side, each a two-line block at one size — the swatches over the count,
   the plan over "beat and miss compare to this" — so the sub-label sits
   beside the count under the swatches it explains, on the same two lines,
   and the plan's 2px rule is the one divider between them. The bands'
   margins close on selectors more specific than the pinned ones, so
   `.month-strip { margin: 0 0 10px; … }` stays byte for byte what the test
   reads. */
main.grid-page .page-head.suite { margin-bottom: var(--s-2); row-gap: 4px; }
/* the count is the key's second line, at the sub-label's size, so the two
   blocks read as one table: what the marks are, and what they compare to.
   A GRID, not a wrapping flex line: a flex container is as wide as all its
   items laid end to end, which left 130px of nothing between the count and
   the plan's rule. An empty count (no cell has a plan) is a row of nothing. */
/* the legend inside "How this grid works" keeps the band margin it was
   given when it WAS a band of its own */
/* a branches company's one-line note (consolidated, or all-in) sat on the
   plan's sub-label: its -8px pull-up was sized for the head's old 12px
   margin. It keeps the strip's rhythm, 8px either side. */
.grid-page .branch-bar-note { margin: 0 0 var(--s-2); }

/* --- 2. THE PLAN CHIP IS A FACT, NOT A CONTROL ------------------------- */
/* Two objects with one silhouette, one of them inert: a two-line rounded
   rectangle with a 1px border sat against "Save a snapshot", a real button
   of almost the same size. The class is literally `chip` and is pinned in
   two tests, so the LOOK is overridden for this one instance (lead
   decision): a two-line labelled fact behind a 2px `--line` rule, no pill.
   The sub-label keeps its own pinned rule. */
/* "Save a snapshot" IS a button: the kit's secondary role, at the kit's one
   control height, so the single control on the strip is the one that acts */

/* --- 3. THE TOOLBAR EARNS ITS WEIGHT (Shopify, Vercel) ----------------- */
/* A 440px Reason field on a white ground was the largest, highest-contrast
   control on the page at all times, including the visits where nothing is
   dirty — and the Save beside it was disabled, so the loudest cluster was
   also the most inert, and it took a band of its own between the blended
   card and the table. The field is NEVER hidden (a change needs a reason,
   and it stays reachable and focusable): while `#save` is disabled it loses
   its ground and its field edge, and Save wears the kit's disabled
   treatment; the moment `grid.js` enables the button the field takes its
   ground back, Save is the page's one primary, and `#save-state`'s count
   sits beside it.

   340px, not the 220px the brief proposed: the placeholder is a pinned
   sentence 317px wide at this size, and an input CLIPS its placeholder
   rather than ellipsing it — "Reason (required when ch" is the same defect
   as a badge that renders a different word. The width does not move
   between the two states, so nothing on the row shifts when a cell is
   typed into. */
.grid-page .toolbar { gap: var(--s-2); margin-bottom: var(--s-2); }
.grid-page .toolbar #reason {
  width: 340px; max-width: 100%; height: var(--ctl-h); padding: 0 11px;
  border-radius: var(--r-md); border-color: var(--field-line); font-size: 13px; }
.grid-page .toolbar:has(#save:disabled) #reason {
  background: transparent; border-color: var(--line); }
.grid-page .toolbar:has(#save:disabled) #reason::placeholder { color: var(--muted); }
.grid-page .toolbar #save-state { font-size: 12.5px; color: var(--muted); }
.grid-page .toolbar #save-state:empty { display: none; }

/* --- 4. THE BLENDED MONTH IS A NOTE ABOUT ONE COLUMN (Fey, Causal) ----- */
/* A full-bleed accent-tinted panel with a filled pill was the loudest
   object on a page whose subject is a table of figures, and in dark its
   hard-coded #d9d9f0 border read as a bright outline on a dark ground — a
   surface colour with no dark value, which CLAUDE.md forbids (the hex is
   gone from the earlier rule too). It is a quiet card now, as wide as what
   it says, carrying at its left the 2px lavender rule the sheet draws at
   the actual/forecast boundary, which is the column it is about. Every
   class, every sentence and the card's place before the toolbar are
   unchanged. */
/* as wide as its first line: three columns — the tag, the headline, the
   figures — and the foot across all three. (A wrapping flex card is as wide
   as every item laid end to end, so it could never hug its content.) */
/* the tag is the page's one label primitive, `.badge kind`, at its size */
/* the foot is the card's own sentence, on its own line and at its own
   weight — it was pushed to the right edge by `margin-left: auto` */

/* --- 5. ONE ROW RHYTHM DOWN BOTH TABLES (Xero, Quicken) ---------------- */
/* 34px is the statement's row, and the number the operating-metrics table
   below it now shares (section B writes no row height of its own): its
   typed rows were 34px (the input's own height) and its read-only "from
   contracts" rows 30px, so one table had two pitches and the two tables
   had three. 34px holds the two-line clamped account name (2 x 13px x 1.15
   = 29.9px in a cell with no vertical padding) and a summary figure over
   its `.sum-short` sub-line (16.3 + 12.1 + 1 = 29.4px). It is a FLOOR, not
   a ceiling: a computed row whose name is unclamped by a pinned rule, and a
   total whose `.tot-why` needs a second line, still take the height they
   need. The bands are held to it too: the "+ add line" control is 18px,
   so a band with the control and a band without are the same height. */
table.grid tbody tr { height: 34px; }
.driver-grid tbody tr > td, .driver-grid tbody tr > th {
  box-sizing: border-box; vertical-align: middle; }

/* --- 6. THE LINE COLUMN: nothing is cut mid-word ----------------------- */
/* "7 contracts" rendered as "7 contract:" and "1 rule · 1 cohort" as
   "1 rule · 1 cc"; REQ beside a provenance was clipped to "RE" or dropped
   off the column altogether — a truncated label that still looks like a
   complete one, the defect two earlier passes closed for the REQ badge and
   for the account name. The provenance label takes the same guard, in the
   order the column's own rules already set: a BADGE never renders a
   different word, a NAME wraps inside the row, and what gives way is the
   provenance — with a real ellipsis instead of the cell's scissors, and
   the whole label back on hover, where the name yields as it always has.

   A cluster that carries a provenance does not shrink; instead it may not
   be WIDER than what is left once the name has had its pinned floor — 10px
   of handle, 36px of cost code, 90px of name and three 4px gaps, 148px of
   the 224px this column gives. (Shrinking the two against each other
   cannot do this: at any ratio the label loses a rounding sliver on a
   crowded row, and 0.01px of it prints "ledger avera…".) A cluster with no
   provenance keeps the rule it had. */
table.grid .line-cell { gap: 4px; }

/* THE CASH ROW (balance sheet): CASH, "rolls from profit" and REQ want
   185px in one line and the column cannot give it, so the old cluster
   sliced "CASH" to "CA" and wrapped "rolls from profit" over the name. They
   take two lines inside the row's own height instead, as narrow as the
   widest label: the two short TAGS on the first, the roll-forward STATE on
   the second — and the account name keeps a whole line beside them. The
   state stays on screen always (a state is never only a tooltip); the ACT
   (stop rolling, or roll from profit where there is no rule yet) appears
   with the row, like every other control in this column. */
/* with the row's controls showing, the cluster is as wide as its first line
   (the two tags between the row's two controls) and the roll-forward keeps
   the second: still two 16px lines inside the row's own 34px, so hovering
   the row does not move the sheet */
table.grid .line-cell .cash-roll:not([hidden]) {
  order: 1; flex: none; display: inline-flex; align-items: center;
  gap: 4px; margin: 0; }
table.grid .line-cell .cash-roll .badge.kind { white-space: nowrap; }
table.grid .line-cell .cash-roll > .linklike:hover {
  background: var(--track); color: var(--accent); }
table.grid .line-cell .cash-roll > .linklike:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px; }
table.grid tr.line-row .line-cell .cash-roll > .linklike { display: none; }
table.grid tr.line-row .line-cell .cash-roll:not(:has(.badge)) { display: none; }
table.grid tr.line-row:hover .line-cell .cash-roll:not([hidden]),
table.grid tr.line-row:focus-within .line-cell .cash-roll:not([hidden]),
table.grid tr.line-row:hover .line-cell .cash-roll > .linklike:not([hidden]),
table.grid tr.line-row:focus-within .line-cell .cash-roll > .linklike:not([hidden]) {
  display: inline-flex; }
/* the gutter between the name column and the first figure was 16px; two
   figures give each other 20px (6px of header padding and 4px of input
   padding a side), and 8px here puts the first figure at 18px from the
   names — inside the sheet's own rhythm, and 8px the labels need. The
   pinned 20px on the left, which the section band's sticky offset is
   measured from, is untouched. */
main.grid-page table.grid th.line-col,
main.grid-page table.grid td.line-col { padding-right: 8px; }

/* --- 7. THE SECTION BAND IS THE STATEMENT'S STRUCTURE (Xero, Quicken) -- */
/* Hierarchy inversion: the section name was 11.5px/600 in --muted and the
   "+ add line" beside it a filled browser button — in dark the brightest
   thing in the row. The structural label of the statement was quieter than
   an editing affordance most readers never use. The band's own `td` rule is
   pinned, so the children carry the change: the name to --ink, the
   qualifier a step quieter, the button to a ghost that gains its edge on
   the band's hover and on focus — keyboard-reachable, and with a declared
   height so the band does not move when the browser's chrome comes off it. */
table.grid tr.section-row .sec-name { color: var(--ink); }
table.grid tr.section-row .muted { font-size: 11px; }

/* THE BALANCE SHEET'S TWO LEVELS (Quicken): a side and the categories
   inside it were told apart only by --surface-2 against --bg and 12.5px
   against 11.5px, which in dark is a few points of nothing — scrolled past
   "Liabilities and Retained Earnings" a reader could not tell which side he
   was on. Indent, weight and ink carry it instead: the side band opens
   under a 2px rule at full ink, the categories inside it are set in 12px
   one step in (32px, where the side's own name sits at 20px) and a step
   quieter. The side band keeps the sticky `left: 20px` the scroll depends
   on; the category band rides the scroll at its own indent. */
table.grid.bs-grid tr.side-row td { padding-top: 9px; padding-bottom: 9px;
  border-top: 2px solid var(--line); }
table.grid.bs-grid tr.side-row .sec-name { font-weight: 650; }
table.grid.bs-grid tr.section-row:not(.side-row) td { padding-left: 32px; }
table.grid.bs-grid tr.section-row:not(.side-row) .band-inner { left: 32px; }
table.grid.bs-grid tr.section-row:not(.side-row) .sec-name { color: var(--ink-2); }

/* A NAME DOES NOT NEED SAYING TWICE AT FULL VOICE: "Total cost of doing the
   work" wears a "cost of doing the work" tag 40px away, in the tag's full
   weight. The tag stays (it is a real classification, and the grid's badge
   system is ONE variant — `badge kind`, never `badge state`), demoted by
   weight inside that variant. Not by opacity: at .75 the tag's ink on its
   own tint measured 2.97:1, under the floor for text. */
table.grid tr.section-total .line-cell .badge.kind { font-weight: 500; letter-spacing: 0; }

/* --- 8. THE FORECAST COLUMN, AND THE WORD THAT NAMES IT (Fey) ---------- */
/* The series word rendered in accent ink, which in this system means
   interactive — but it is a LABEL; the control is the menu beside it. It
   reads as a quiet neutral word now, and on a forecast column it is a tag
   in the forecast's own ink on the forecast's own ground, so the column is
   marked by its HEADER as well as by its tint: on the balance sheet, where
   the current month is nearly empty, there are no figures to carry the
   lavender ink at all. (The dark `--fc-bg` itself is deepened in both dark
   blocks: #1b1b2a measured 1.04:1 against `--surface`, so the most
   consequential distinction on the sheet was drawn by one hairline. It is
   #26263f now, 1.21:1 — a step more than the light theme's own 1.12:1 —
   and `--fc-ink` reads 7.7:1 on it.) The word sits against the menu (the
   glyph carries 3px of its own air) so
   "actual · draft" stays inside its own 96px column. */
.col-head .month-tag { font-size: 11px; font-weight: 500; color: var(--ink-2);
  letter-spacing: 0; }

/* --- 9. THE COLUMN CONTROLS ARE QUIET UNTIL THEY ARE USED (Attio) ------ */
/* Twelve small boxed controls sat in the header of a table whose subject is
   figures, each at rest, none of them acted on. The box goes (lead
   decision); the glyph and its whole hit area stay at full strength, so the
   control is as reachable by a finger as it was. It draws itself on hover,
   on focus-visible and while its menu is open — and the header cell of an
   open menu takes a ring, so the column being acted on is unmistakable.
   The menu's actions read from the left edge, icon over icon; they were
   centred, so the two icons sat 12px apart. */

/* ONE SIZE FOR THE SERIES SWITCH. `.series-toggle .seg-opt` was declared
   three times with conflicting sizes (9.5px, 10px and 11px, and 11.5px
   again inside a menu) for one control shared by the column menus, the
   revenue trend's basis switch and the metrics table's Plan / Actual
   switch. The earlier sizes are gone; this is the one declaration, 11px,
   and inside a menu it keeps the roomier hit area a menu item deserves.
   The pinned `th.fc .series-toggle .seg-opt.active` colours are
   untouched. */
.series-toggle .seg-opt { font-size: 11px; padding: 2px 8px; line-height: 1.4; }
/* Family 4, section B of the screen redesign (SPEC §6.63): the Operating
   metrics table under the statement, the fx planning pop-out ("How is this
   line planned?") and the Regenerate notice. LOOK, LAYOUT and HIERARCHY
   only: no word moves, no hook moves, no behaviour changes, every colour is
   a token with a dark value, and 390px is a designed width.

   WHAT THE REVIEW FOUND, one line each: a table head set a ninety-character
   sentence on the title's own line, so it read as a paragraph with a heading
   buried in it; the metrics table sat on the page ground with square corners
   and no edge while the statement it multiplies sat in a card; a counted
   figure stopped eight pixels short of the typed figure above it and was
   drawn in the accent, so one column read as two kinds of table; the fx
   panel listed seven amounts left-aligned after labels of seven lengths; its
   answer cards wrapped into a layout nobody authored; its fields fell to a
   2022 rule instead of the kit's; and its head, the line's name and its
   forecast, scrolled away with the body.

   WHAT IS NOT TOUCHED. Section A owns the statement, the preamble, the ROW
   HEIGHT of both tables and `.seg-opt`: nothing here sets a row height or
   names `.seg-opt` (the Plan / Actual switch is only PLACED). The cells'
   mechanics stay as they are: the metrics input's width floor and padding,
   `td.num`'s min-width, the pre-start hatch (one rule for both tables),
   `.align-filler`, the `[data-vkind]` side switch, the computed cells'
   `data-bd-*`, the band's font and sticky, the wrap's `overflow-x` and its
   later `border: 0` override, and every id and class `alignMetrics()`, the
   edge guard, the breakdown popover and `_fx_setup.html`'s own script read.
   A selector that could collide with a pinned rule is written with `>`, so
   the pinned text stays the only copy of itself in the file. */

/* --- 1. A TABLE HEAD IS NOT A PARAGRAPH (Customer.io) -------------------
   The head carries what the table IS at the left and its status at the
   right; the prose goes underneath. Nothing moves in the DOM: the sentence
   is ordered last and given the whole row, so the counter keeps the title's
   line. The pinned `margin-left: auto` on the counter does the pushing; the
   switch after it takes the auto margin only when the counter is empty.
   No `max-width` on the sentence: a max-width clamps the item's
   hypothetical size, which is what the line-breaking step measures, and let
   the sentence back onto the title's line on a narrow head. */
.grid-page .table-head { row-gap: 3px; column-gap: 12px; }
.grid-page .table-head > .table-title { order: 1; }
.grid-page .table-head > .badge { order: 2; }
.grid-page .table-head > .months-off { order: 3; }
.grid-page .table-head > .series-toggle { order: 4; margin-left: auto; }
.grid-page .table-head > .months-off:not(:empty) ~ .series-toggle { margin-left: 0; }
.grid-page .table-head > .muted {
  order: 9; flex-basis: 100%; margin: 0;
  font-size: var(--t-sm); line-height: 1.45; color: var(--muted);
}

/* --- 2. THE OPERATING METRICS TABLE, THE STATEMENT'S COMPANION ----------
   THE CARD. The statement sits in a `.grid-shield`; this table sat on the
   page ground with square corners and, in dark, no edge. The shield carries
   the card, and the scroll container keeps everything it is measured by:
   its `overflow-x`, the edge guard, and the 1px inset the column alignment
   shares with the statement (the shield's border replaces the wrap's
   transparent one, so both tables still start 1px in from their card). */
.metrics-shield {
  margin: 10px 0 4px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.metrics-shield > .driver-grid-wrap {
  margin: 0; background: transparent; border: 0;
  border-radius: inherit; box-shadow: none;
}

/* A READ-ONLY FIGURE ENDS WHERE A TYPED ONE ENDS. An entry cell's input
   keeps its figure 2px from the cell's edge; a read-only cell's 10px of
   side padding stopped a counted figure eight pixels short of the typed
   one above it, so one column had two right edges. The side padding moves
   onto the figure, the entry input's own 2px; the cell's vertical padding
   is left to the row height section A owns. The span stays inline: the
   dotted "there is a breakdown behind this" rule hugs the text. */
.driver-grid tbody td.num:not(:has(input)) { padding-left: 0; padding-right: 0; }
.driver-grid tbody td.num > span { padding: 0 2px; }
.driver-grid td.num .computed-cell[data-bd-series]:hover,
.driver-grid td.num .computed-cell[data-bd-series]:focus-visible {
  color: var(--accent); border-bottom-color: var(--accent);
}

/* THE STAFF BAND IS A SECTION BAND (Quicken: grade a hierarchy by weight
   and ink). Its font, its sticky label and its `--bg` ground are untouched;
   it gains the hairline that separates a group from the rows above it, and
   its NAME takes `--ink` while the unit it carries for the band stays
   quiet, the pair the statement's section name and its qualifier make. */
.driver-grid tr.group-row th { border-top: 1px solid var(--line); }
.driver-grid tr.group-row th > .band-inner { color: var(--ink); }

/* --- 3. THE FX POP-OUT (Asana, Midday, Copilot Money), centred ---------
   THE CHROME. The dialog was the scroller, so the line's name, its forecast
   and the way out scrolled away together. The dialog becomes a clipping
   column and its BODY the scroller, and the panel's head sticks to the top
   of that body. The body has no top padding: Chromium measures a sticky
   `top` from the scroller's padding edge inward, so a padded body parked
   the head 16px down, over the first card. The help-shot script
   (`scripts/help_shots/w2.json`) sets the dialog's `overflow` to visible and
   its `max-height` to none: the column then grows to its content, the body
   never scrolls, and the head renders where it stands. The dialog is 60px
   wider so a contract's name, its amount and its term sit on one line. */
.fx-dialog { display: flex; flex-direction: column; overflow: hidden; max-width: 640px; }
.fx-close { z-index: 3; }
.fx-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  margin: -16px -20px -20px; padding: 0 20px 20px;
}
/* the head fills the dialog's padding box, so it carries the dialog's inner
   radius: clipped it makes no difference, but the help shot renders the
   dialog UNCLIPPED and a square bar would paint over the rounded corner */
.fx-panel-head {
  position: sticky; top: 0; z-index: 2;
  margin: 0 -20px 14px; padding: 13px 44px 11px 20px;
  background: var(--surface); border-bottom: 1px solid var(--line);
  border-radius: calc(var(--r-xl) - 1px) calc(var(--r-xl) - 1px) 0 0;
  align-items: baseline; gap: var(--s-3);
}
.fx-panel-title { font-size: 15px; font-weight: 650; letter-spacing: -.01em; line-height: 1.3; }
.fx-panel-fc { font-size: var(--t-sm); color: var(--muted); }
/* the line's forecast is the subject's figure; an expense keeps the quiet
   it has carried since the panel was built */
.fx-panel-fc .calc-amt { font-size: 15px; font-weight: 650; color: var(--ink); }

/* WHAT PLANS THE LINE TODAY: one card per method. A rule, its price steps
   and its cohort editor were three siblings in the panel's column, so two
   rules read as six unrelated rows. The card is the redesign's ITEM (1px
   `--line`, `--r-md`, no shadow), grounded `--surface-2` because the dialog
   it sits in is `--surface` and the answers below are `--surface` controls:
   what IS planned sits a step off what CAN be. */
.fx-current { gap: var(--s-2); margin-bottom: var(--s-4); }
.calc-card {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 10px 12px;
}
.fx-panel .calc-method { gap: var(--s-2); }
.fx-panel .calc-sentence { font-size: var(--t-table); line-height: 1.45; }
/* the remove control sits at the card's corner, not after the sentence */
.calc-card .calc-remove { margin-left: auto; }
.calc-card .calc-rates { margin: 8px 0 0; }
/* the cohort editor is a disclosure INSIDE the card, not a second box */
.calc-card .calc-cohort {
  margin: 8px 0 0; background: none; border: 0; border-radius: 0;
}
.calc-card .cohort-body { padding: 8px 0 0; }
/* the cohort's own month table sits in the card as a framed table, led by a
   year label rather than the metrics table's 252px name column (it shares
   `.driver-grid`'s fixed geometry, which left room for three months) */
.calc-card .driver-grid-wrap {
  margin: 0 0 4px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-sm);
}
.calc-card .cohort-grid .series-col { width: 72px; }
.calc-card .cohort-retune {
  flex-wrap: wrap; align-items: flex-end; gap: var(--s-2) var(--s-3);
}
.calc-card .cohort-retune label {
  flex-direction: column; align-items: flex-start; gap: var(--s-1);
  font-size: var(--t-sm); font-weight: 550; color: var(--ink-2);
}
.fx-panel .calc-method .badge.avg,
.fx-panel .calc-method .badge.manual {
  color: var(--muted); background: transparent; border-color: var(--line);
}
/* the ledger's average and "nothing plans this line yet" are readings of
   the line, not plans on it: a quiet band, not a card */
.fx-panel .calc-band { padding: 2px 0 2px 12px; border-left: 2px solid var(--line); }
.fx-panel .calc-band .calc-sentence { color: var(--ink-2); }

/* THE ONE QUESTION AND ITS ANSWERS. `auto-fit` wrapped the groups into one
   full-width card, then two of unequal width, then one half-width card
   alone: a layout nobody authored. A fixed two-column grid gives every
   answer one width and every row one height. An answer is a CONTROL, so it
   takes the kit's field edge and hover; the chosen one is bordered
   `--accent-line` over the accent's own soft ground. */
.fx-add { border-top: 1px solid var(--line); padding-top: var(--s-4); }
.fx-add .sc-title { font-size: var(--t-table); font-weight: 600; color: var(--ink); }
.fx-add .sc-eg { font-size: 12px; line-height: 1.4; color: var(--muted); }
/* Family 4, the fix block. Three Opus reviewers read the merged renders
   against the family 3 baseline (1440 light and dark, a true 390px phone)
   and this block answers what they found, in CSS, appended. Nothing inside
   a cell is restyled: what moves is the WHOLE-PIXEL origin of the sheet, so
   a figure lands the same way in every row.

   THE SHEET SNAPS TO WHOLE PIXELS. The three blockers were one thing: a
   sub-line inside a year-total cell 1px lower, a total's figure 1px off the
   month figures beside it, two computed rows trading 33 and 34. No cell
   rule had changed; the sheet's ORIGIN had. The family 3 baseline put the
   table at y = 296.28 (a 12.5px strip at line-height 1.5 is 18.75px tall,
   the card's foot 17.25 …) and the merged branch at 227.59, so every glyph
   snapped from a different fraction. The line boxes above the sheet are
   whole pixels now, and so are the header's: the month label 18, the
   series word 16, the summary headers 14 over a 13px sub-label. The pinned
   1.5px total rule still makes a half-pixel of its own under each total;
   that is the sheet's arithmetic and it stays. What that leaves is the
   sticky year column: its text and the inputs' text still round apart by
   a pixel on the rows a total's rule puts on a half-pixel phase — in the
   family 3 baseline too, in other rows (13 of them on the lender demo,
   3 now), invisible at 100% — and the cells it would take to close it
   are pinned. It is written down here and not chased. */
.grid-page .table-head > .muted { line-height: 18px; }
.grid-page .col-head .month-label { line-height: 18px; }
/* A MONTH'S NAME CLOSES THAT MONTH (SPEC §6.159): a link in the header's own
   ink, underlined so it reads as one before the pointer reaches it */
.grid-page .col-head .month-label a.month-close {
  color: inherit; text-decoration: underline; text-decoration-color: var(--muted-2);
  text-decoration-thickness: 1px; text-underline-offset: 3px; }
.grid-page .col-head .month-label a.month-close:hover {
  color: var(--accent); text-decoration-color: currentColor; }
.grid-page .col-head .month-tag { line-height: 16px; }
.grid-page table.grid thead th.num { line-height: 14px; }
.grid-page table.grid thead th.num .sum-sub { line-height: 13px; }

/* --- THE STACKED TAG HAS AIR ------------------------------------------ */
/* A provenance over its REQ tag filled the row — 16.5 + 17.6px in a 33px
   box, the tag on the hairline. Each takes the line box its text needs, 13
   and 14px, and the pair sits centred with 3px either side. The row is
   still 34px. */
/* the Cash row's own stack — two tags over the roll-forward state — takes
   the same line boxes, so its boxes no longer touch each other or the
   rules (round 2 found it on the phone) */

/* --- THE PROVENANCE STAYS 10.5px AND THE CODE KEEPS ITS 4px ----------- */
/* Two of the review's nits were answered and taken back after the next
   render. Raising the provenance to the 11px floor and giving the cost
   code 4px more from the name cost "ledger average" its last letters on
   every row it appears ("ledger aver…") and wrapped the balance sheet's
   "Cash — Operating": the cluster's cap is arithmetic on the name's pinned
   90px floor, so the only free pixels were those. Section A's caps stand
   (148 / 128 / 108), the label reads whole at its old size, and the 4px
   between the code and the name is the column's one gap. The 11px floor
   for this label is a follow-up that needs a wider column. */

/* --- THE COLUMN CONTROL LINES UP WITH ITS MONTH ----------------------- */
/* With the box gone the glyph sat 4px in from the month name's right edge
   (the transparent border and the centring stayed). The control keeps its
   20 x 18 hit area and pulls 4px right, so the glyph's edge is the name's
   edge and the box, when it draws, uses the header cell's own padding; the
   series word gets 2px of air from it and no longer starts inside the open
   cell's ring. */

/* --- THE BALANCE SHEET'S SIDE BANDS ARE ONE HEIGHT -------------------- */
/* "Assets" carries "+ add line" (18px) and "Liabilities and Retained
   Earnings" does not, so one side band was 39px and the other 37.25. The
   side's name takes the control's line box and both are 39: a 2px rule,
   9px, an 18px line, 9px, the hairline. */
table.grid.bs-grid tr.side-row .sec-name { line-height: 18px; }

/* --- THE PLAN / ACTUAL SWITCH IS THE KIT'S STRIP ---------------------- */
/* Brief B2 asked for it: section B could not write a `.seg-opt` rule and
   section A's one-size rule did not restyle this instance. The metrics
   table's own switch (`#metrics-side`) takes the statement tabs' grammar —
   a `--track` well, the active segment a `--surface` pill on the card
   shadow — at section A's one size. The column menus' switches and the
   pinned `th.fc … .active` colours are untouched. */
.grid-page #metrics-side.series-toggle {
  border: 0; overflow: visible; background: var(--track);
  border-radius: var(--r-md); padding: 2px; gap: 2px; }
.grid-page #metrics-side .seg-opt {
  background: transparent; color: var(--muted); font-weight: 500;
  border-radius: var(--r-sm); }
.grid-page #metrics-side .seg-opt + .seg-opt { border-left: 0; }
.grid-page #metrics-side .seg-opt:hover { color: var(--ink); }
.grid-page #metrics-side .seg-opt.active {
  background: var(--surface); color: var(--ink); font-weight: 600;
  box-shadow: var(--shadow); }

/* WHAT THE REVIEW FOUND AND THIS BLOCK LEAVES, and why. The companion
   card's right edge shows the same fade tail the balance sheet's does (the
   edge fade's cut width is set inline by the guard script and its mask is
   pinned): the lead's call on the balance sheet stands for its companion.
   "Blended month", "Contracts" and the method badges read in sentence case
   because `text-transform: uppercase` came off with the badge grammar —
   every literal is unchanged (family 2's rule: case by transform only).
   The contracts badge no longer wears `--ok`, the ahead mark. A metric
   whose name takes two lines keeps a 48px row: a floor cannot make it 34.
   On a phone no month column shows on the P&L (the sticky year total and
   the 200px line column fill 366px) and the column menu opens under the
   sticky column — both older than this family and a layout decision for
   the owner, logged as a follow-up. */

/* TYPING SAVES WHAT HAPPENED (SPEC §6.133). A started month's empty cell
   shows its forecast as the input's placeholder: italic in the muted ink, so
   it never reads as an entered figure and does not rest on colour alone
   (opacity 1: one engine dims a placeholder on its own). The key under the
   table shows the same style beside its words. The reason field is no
   longer always on the bar: it and its label show only while a closed
   month's saved figure is changed, so the label is plain bar text. */
.grid-page table.grid td.num input::placeholder {
  color: var(--muted); font-style: italic; opacity: 1; }
.grid-page .footnote .key-hint { color: var(--muted); font-style: italic; }
.grid-page .toolbar .reason-label {
  font-size: var(--t-13); font-weight: 600; color: var(--ink-2); }

/* THE GRID AS DRAWN (SPEC §6.136): a reading state and an editing state.
   What shows only while editing carries `data-edit-only` and `hidden`; an
   author `display` would beat the UA's [hidden], so it is restored here. */
.grid-page [data-edit-only][hidden], .grid-page .save-bar[hidden] { display: none !important; }
/* reading, a line's name wraps in full: no clamp ("Edit line" shows the
   whole name while editing, where the row keeps its clamp) */
body:not(.grid-editing) table.grid tbody tr.line-row .line-cell .line-name {
  display: block; -webkit-line-clamp: none; overflow: visible; }
/* a line's one menu, while editing: at the end of its label */
.grid-page .row-menu { position: relative; flex: none; margin-left: auto; }
.grid-page .row-menu > summary { list-style: none; }
.grid-page .row-menu > summary::-webkit-details-marker { display: none; }
.grid-page .row-menu-body { left: 0; right: auto; }
/* AN OPEN ROW MENU IS SEEN WHOLE (owner report 2026-11-14, "that icon doesn't
   work"): the menu is built inside the line's cell, which clips a long name,
   so it opened clipped to nothing; and each pinned name cell below, stacked
   alike, sat over the rest. While a menu is open its cell lets it out and its
   row's name cell stands above the rows and cells around it, still under the
   pinned header. */
.grid-page .line-cell:has(> details.row-menu[open]) { overflow: visible; }
.grid-page table.grid tbody th.line-col:has(details.row-menu[open]) { z-index: 2; }
/* a month header's one switch, while editing: the series it shows, pressed
   for the forecast */
table.grid .col-head .month-switch {
  margin-top: 2px; padding: 0 var(--s-1); border: 1px solid var(--line);
  border-radius: var(--r-md); background: var(--surface); color: var(--ink-2);
  font: inherit; font-size: inherit; font-weight: 600; line-height: 1.4;
  white-space: normal; cursor: pointer; }
table.grid th.fc .col-head .month-switch { color: var(--fc-ink); }
/* while editing, an entry cell looks like a field (the inset ring the
   unlocked row used to wear), and the save bar rides the foot of the screen */
.grid-editing table.grid input[data-line]:not([disabled]) {
  box-shadow: inset 0 0 0 1px var(--accent-line); border-radius: var(--r-md); }
.grid-page .save-bar#grid-save-bar {
  position: sticky; bottom: 0; z-index: 20; margin: var(--s-4) 0 0;
  padding: var(--s-2) var(--s-3); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); }
.grid-page .save-bar .reason-label { font-size: var(--t-13); font-weight: 600; color: var(--ink-2); }
.grid-page .save-bar #save-state { margin-right: auto; }
/* the keys in "How to read this": each mark drawn as the table draws it */
.grid-page .how-to-read-body .key-hint { color: var(--muted); font-style: italic; }
.grid-page .how-to-read-body .nodef-key { text-decoration: underline dotted var(--muted); }
.grid-page .how-to-read-body .fc-key { padding: 0 var(--s-1); background: var(--fc-bg); }
.grid-page .how-to-read-body .dirty-key { padding: 0 var(--s-1); background: var(--accent-soft); font-weight: 600; }
.grid-page .how-to-read-body .ph-key { color: var(--muted); text-decoration: underline dotted var(--muted); }
.grid-page .page-controls .notice#edit-why { margin: 0; }
/* the metrics table keeps the statement's pinned year-total place, empty,
   so its months sit under the statement's */
.grid-page .driver-grid .align-pin { padding: 0; width: 0; border: 0; }
.grid-page .driver-grid.has-pin .align-pin {
  position: sticky; right: 0; z-index: 1; background: var(--surface);
  border-left: 1px solid var(--line); }
.access-modal[id^="modal-client-"] .form-grid > label.check-row > input {
  grid-row: 1; margin: 0; align-self: center;
}
.access-modal[id^="modal-client-"] .form-grid > label.check-row > .muted {
  grid-column: 2; display: block; margin-top: 2px;
  font-size: var(--t-sm); font-weight: 400; line-height: 18px; color: var(--muted);
}

/* --- 10. SAVE THIS FORMULA -----------------------------------------------
   The formula it names is a value, on a chip; the two acts are the pop-out's
   foot like every other one — a hairline, the primary last at the right. */
#modal-save-formula .fx-save-formula:empty { display: none; }
#modal-save-formula .fx-save-foot .linklike {
  min-height: var(--ctl-h); padding: 0 10px; border-radius: var(--r-md);
  font-size: var(--t-table); font-weight: 600;
}
#modal-save-formula .fx-save-foot .linklike:hover { background: var(--surface-2); text-decoration: none; }
.access-modal[id^="modal-client-"] .form-grid > label.check-row > .muted {
  text-indent: -1.2813em; overflow: clip;
}

/* RETIRE FROM A MONTH (SPEC §6.125): the form visits the line's pop-out
   (`#modal-line`, SPEC §6.141) under its Save; its month and year share the
   row and shrink to it, and its one button answers at the right. */
#modal-line .le-retire .le-field:not([hidden]) {
  display: block; margin-top: 12px;
}
#modal-line .le-retire .mp:not([hidden]) {
  display: flex; gap: var(--s-2); margin-top: var(--s-1);
}
#modal-line .le-retire .mp select {
  flex: 1 1 0; min-width: 0;
}
#modal-line .le-retire .le-retired-tag {
  margin-right: auto;
}

/* --- 3. THE METRICS LIST SHOWS ITS ORDER (Zendesk, Monarch) ---------------
   A fixed grid, so a formula or a provenance never wraps out of its column:
   the position printed down the first column (a counter — the order IS the
   list), the grip visible at rest in a 24px hit area around its 10px glyph,
   the name, and the formula as a block sub-line under the name. */
/* under ~780px of table (a narrow window, the rail open) the list scrolls
   inside its wrapper rather than squeezing the name column to a word */
#series-manage { table-layout: fixed; min-width: 780px; }
#series-manage .col-unit { width: 10%; }
#series-manage .col-kind { width: 25%; }
#series-manage .col-pay { width: 20%; }
#series-manage .col-status { width: 116px; }
#series-manage tbody { counter-reset: metric-pos; }
#series-manage tbody tr.series-row { counter-increment: metric-pos; }
#series-manage tbody th[scope="row"] { padding-top: 5px; padding-bottom: 5px; }
#series-manage .metric-name::before {
  content: counter(metric-pos); grid-column: 1; grid-row: 1;
  font: 500 11.5px/16px var(--sans); color: var(--muted);
  font-variant-numeric: tabular-nums; text-align: right;
}
#series-manage .metric-name > .drag-handle {
  grid-column: 2; grid-row: 1; width: 24px; height: 24px; margin: 0;
  border-radius: var(--r-sm); opacity: .75;
}
#series-manage tr.series-row:is(:hover, :focus-within) .metric-name > .drag-handle { opacity: 1; }
#series-manage .metric-name > .drag-handle:hover { background-color: var(--surface-2); }
#series-manage td.metric-kind .muted, #series-manage td.num .muted { white-space: nowrap; }
/* the status select: the list's quiet control, the field's edge on hover */
#series-manage .status-select { max-width: 100%; }
#series-manage td.row-actions .icon-btn {
  width: 24px; height: 24px; padding: 0; vertical-align: middle; font-size: 15px;
  border: 1px solid transparent; border-radius: var(--r-sm); color: var(--muted-2);
}
#series-manage td.row-actions .inline-form { vertical-align: middle; margin-left: 12px; }
#series-manage tr:is(:hover, :focus-within) > td.row-actions .icon-btn { color: var(--ink); }
#series-manage td.row-actions .icon-btn:hover {
  color: var(--accent); background: var(--accent-soft); border-color: transparent;
}
/* WHILE A ROW IS DRAGGED it is the insertion point: the script moves the
   row itself as the pointer travels (`.dragging`, which it already sets), so
   a 2px accent rule on its top edge marks where it will land, over the
   accent's tint instead of a fade */
#series-manage tbody tr.series-row.dragging > :is(td, th) {
  opacity: 1; background: var(--accent-soft); box-shadow: inset 0 2px 0 var(--accent);
}

/* --- 5. THE OPERATING METRICS LIST (5.12, 5.19) --------------------------
   The row's Status select had no edge at rest (the list table's
   transparent field border): it takes the kit's field edge, as Branches'
   and Snapshots' do. The name cell sits on the row's middle like every
   other cell, so a two-line name (a formula under it) reads as one row. */
#series-manage .status-select {
  min-height: var(--ctl-h-sm); padding-top: 0; padding-bottom: 0; font-size: 12.5px;
  color: var(--ink); background: var(--surface);
  border-color: var(--field-line); border-radius: var(--r-md);
}
#series-manage tr.inactive-line .status-select { color: var(--muted); }
#series-manage .status-select:hover { border-color: var(--accent); }
#series-manage > tbody > tr.series-row > th[scope="row"] { vertical-align: middle; }
/* a company's name is the row's header: it wraps, it is never cut */
.access-table > tbody > tr > th.gg-company {
  vertical-align: top; padding-top: 15px; line-height: 18px;
  white-space: normal; overflow: visible; text-overflow: clip; max-width: none;
}
.access-table > tbody > tr > td.gg-mod { padding-top: 16px; }
table.grid tr.line-row .line-cell .cash-roll.at-rest:not([hidden]),
table.grid tr.line-row .line-cell .cash-roll.at-rest > .linklike:not([hidden]) {
  display: inline-flex; }
.fx-preview .fx-preview-head { margin: 0; font-weight: 600; color: var(--ink-2); }
.fx-preview.refused .fx-preview-head { font-weight: 400; color: var(--ink); }
.fx-preview .fx-preview-months:not([hidden]):not(:empty) {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px var(--s-4); margin: 6px 0 0;
}
.fx-preview .fx-preview-months > div:not([hidden]) {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0 var(--s-2); min-width: 0;
}
.fx-preview .fx-preview-months dt { color: var(--muted); white-space: nowrap; }
.fx-preview .fx-preview-months dd {
  margin: 0 0 0 auto; font-family: var(--mono); font-size: var(--t-table);
  font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap;
  color: var(--ink);
}
.fx-preview .fx-preview-months dd.none { color: var(--muted); }
.fx-preview .fx-preview-notes { margin: 6px 0 0; }
.fx-preview .fx-preview-head:empty,
.fx-preview .fx-preview-months:empty,
.fx-preview .fx-preview-notes:empty { display: none; }

/* THE UNDO rides the cell's detail as its first line, in the plan line's
   own shape (a row over a `--line-soft` rule): what the cell held before
   the change, and a quiet word that puts it back — the kit's `.linklike`,
   never a glyph. A long figure lets the word wrap under it. Opened from the
   keyboard, the line names the key path instead of a button Tab cannot
   reach, in the muted ink of an instruction. */
.cell-hover .hov-undo:not([hidden]) {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 2px 12px;
  padding-bottom: 4px; margin-bottom: 4px;
  border-bottom: 1px solid var(--line-soft); color: var(--ink-2);
}
.cell-hover .hov-undo .hov-undo-do { flex: none; font-weight: 600; white-space: nowrap; }
.cell-hover .hov-undo .hov-undo-key { color: var(--muted); }
/* A FORECAST NAMES ITS SOURCE (SPEC §6.134): one muted line where the parts
   do not already carry it; a person's forecast cell then offers its one act,
   "Return to plan", as the kit's secondary button, set on its own row. */
.cell-hover .hov-src { margin: var(--s-2) 0 0; color: var(--muted); overflow-wrap: anywhere; }
.cell-hover .hov-return:not([hidden]) {
  display: flex; justify-content: flex-end; margin-top: var(--s-2);
}
#modal-confirm .confirm-foot .linklike:hover { background: var(--surface-2); text-decoration: none; }
/* the name column keeps the statement's width: a formula badge is clipped
   with its title (as before), never allowed to widen the column */
#metrics-grid .computed-badge { max-width: 228px; }
/* auto layout would squeeze the name column to its longest word: it keeps
   the statement's 252px (the page's script sets the statement's rendered
   width, which wins where the columns tighten) */
#metrics-grid .series-col { min-width: 252px; }
/* a figure never wraps: no truncation, no second line */
#metrics-grid td.num { white-space: nowrap; }

/* A TOTAL ROW'S NAME WEARS ITS ROW'S WEIGHT (assessment 2026-11-10, T1: found when the
   grid's styles were first read in a browser, `scripts/check_grid_styles.py`).
   `table.grid tr.computed th.line-col` sets 650 and is declared after the
   side-total (600) and total-row (700) rules at the same specificity, so the
   NAME of "Total Assets", "Check" and "Net income" read 650 while their figures
   read 600 and 700 (review 2026-09-08, N8). Declared again here, as the total
   row's ink rule was for the same reason (N11). */
table.grid tr.side-total th.line-col { font-weight: 600; }
table.grid tr.total-row th.line-col { font-weight: 700; }

:is(#new-codes, #new-added, #new-people) { table-layout: fixed; width: 100%; }
/* A FIGURE IS NEVER DRAWN OVER ITS NEIGHBOUR (usability review 2026-11-12).
   The metrics table ran `table-layout: fixed` with each month's width copied
   from the statement above it, so a nine-figure balance ("877,000,000.00",
   wider than the statement's ~96px month) spilled out of its cell and
   printed across the next month's figure. Auto layout sizes every month
   column to at least its widest figure; the script's copied widths are then
   a floor, not a ceiling, and the table scrolls inside its own wrapper
   (`.driver-grid-wrap { overflow-x: auto; }`) as the statement does. Scoped to
   `#metrics-grid`: the fx pop-out's cohort table keeps its fixed geometry. */
#metrics-grid { table-layout: auto; }

@media (pointer: coarse) {
/* A TAB IS A FINGER'S HEIGHT ON A TOUCH SCREEN (owner instruction of 2026-11-20,
   SPEC §6.179). The strip's track is the control height, 40px where the pointer
   is a finger, and a tab filled it only on a desk: on a phone and a tablet a
   tab stayed 28px in a 40px track. There a tab fills its track as it does on a
   desk, and it takes a tap over the track's own 3px above and below it, so the
   target is the track's whole 40px and nothing else is drawn differently. A
   mouse-driven window is as it was at every width. */
  .grid-tabs > a, .page-tabs > a, .kind-toggle > a, .dq-filters > a {
    position: relative; height: calc(var(--ctl-h) - 6px); }
  .grid-tabs > a::after, .page-tabs > a::after, .kind-toggle > a::after, .dq-filters > a::after {
    content: ""; position: absolute; inset: -3px 0; }
/* the Grid's three small controls are a finger's height on a touch screen too
   (SPEC §6.181). The year stepper's arrows were 29 by 25px on a tablet (a phone
   had its own rule). While editing, the switch between the plan's counts and
   the actual ones was 19px tall in 11px letters, and a month's switch 20px. */
  .year-nav > a {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: var(--ctl-h); min-height: var(--ctl-h); }
  .grid-page #metrics-side .seg-opt {
    position: relative; min-height: calc(var(--ctl-h) - 4px); padding: 0 var(--s-3); font-size: var(--t-sm); }
  .grid-page #metrics-side .seg-opt::after { content: ""; position: absolute; inset: -2px 0; }
  table.grid .col-head .month-switch { min-height: var(--ctl-h); }
}

@media (max-width: 900px) {
  .measures-card .kpi-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .measures-card .kpi-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .measures-card .kpi-cards { grid-template-columns: minmax(0, 1fr); }
}

@media screen and (max-width: 760px) {
  .grid-tabs::-webkit-scrollbar, .page-tabs::-webkit-scrollbar,
  .kind-toggle::-webkit-scrollbar, .dq-filters::-webkit-scrollbar { display: none; }
  .grid-tabs > a, .page-tabs > a, .kind-toggle > a, .dq-filters > a { flex: 0 0 auto; }
}

@media screen and (max-width: 700px) {
  .grid-page .toolbar #reason { width: auto; flex: 1 1 100%; }
}

@media (max-width: 640px) {
  /* a band is a line over the cards it heads */
  #main table.console-table > tbody > tr.group-row:not([hidden]) { display: block; margin-bottom: var(--s-2);
    padding: var(--s-2) 0 0; border: 0; border-radius: 0; background: none; }
  #main table.console-table td:is([data-col="published"], [data-col="since"]) > .tcv-parts { display: inline; margin-left: var(--s-1); }
  html:not(.embedded) body.has-side .grid-page .save-bar#grid-save-bar { bottom: var(--tabs-h); }
  /* A CLOSED MONTH'S FIGURE CHANGED (SPEC §6.172): the bar says what it asks
     for on a line of its own, then asks, then offers its two acts. One line
     held all of it at a desk's width and crushed the reason to nothing here. */
  .grid-page .save-bar#grid-save-bar:has(> #reason:not([hidden])) { flex-wrap: wrap; row-gap: var(--s-2); }
  .grid-page .save-bar#grid-save-bar:has(> #reason:not([hidden])) > #save-state { flex: 1 1 100%; }
  .grid-page .save-bar#grid-save-bar > #reason {
    flex: 1 1 60%; min-width: 0; max-width: none; font-size: var(--t-16); }
  main.grid-page { padding-left: var(--s-3); padding-right: var(--s-3); }
}

@media screen and (max-width: 700px) {
/* --- 10. THE PHONE IS A DESIGNED WIDTH -------------------------------- */
/* The page itself used to overflow at 390px; the kit closed that. What is
   left is the preamble, which arrived ~640px deep before the first figure.
   The clusters stack at full width — a divider drawn down the left of a
   full-width row would be a rule to nowhere, so the plan's comes off — the
   gutter comes down to 12px from 700px, and the blended card and the plan
   wrap at the column's width instead of being sliced. The sheet itself
   stays a horizontal scroller opened on the current month: that is the
   product's behaviour, not a look. */
  main.grid-page { padding-left: var(--s-3); padding-right: var(--s-3); }
}

@media (max-width: 640px) {
  .fx-modal { padding: 0; }

/* --- 5. THE PHONE IS A DESIGNED WIDTH ---------------------------------- */
  /* the head cannot hold the title and the counter on one line: the counter
     (and the switch) stand right above the table they count and switch */
  .grid-page .table-head > .months-off,
  .grid-page .table-head > .series-toggle { order: 10; }
  /* the dialog is the kit's full-screen sheet at a 16px gutter with no
     radius: the body and the sticky head take that gutter */
  .fx-body { margin: -16px -16px -20px; padding: 0 16px 20px; }
  .fx-panel-head {
    margin: 0 -16px 14px; padding: 13px 44px 11px 16px; border-radius: 0;
  }
/* ONE MONTH AT A TIME (owner decision 2 of 2026-11-19, UI rule 21, SPEC
   §6.172): on a phone a statement never scrolls sideways. The table is the
   one a desk gets. Its month headers are the strip of months, the one row
   that scrolls sideways; each row is its name and the figure of the month
   picked (`at-month`, marked by one_month.js). This replaces the 120px line
   column of SPEC §6.136. */
  /* the card is a list: nothing scrolls inside it, so nothing fades or counts */
  .grid-page .grid-shield, .grid-page .metrics-shield { overflow: visible; }
  .grid-page .grid-wrap, .grid-page .driver-grid-wrap {
    overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .board-sheet table.board-table.tbl-grid > tbody > tr > .at-month { font-size: var(--t-14); white-space: nowrap; }
  .grid-page .table-head > .months-off { display: none; }
  /* no sum of the year is a column here, so the menu's control that folds two
     of them away has nothing to act on and is not drawn (SPEC §6.179) */
  .grid-page .head-more-item.sum-fold { display: none; }
  /* the two name columns a desk gives a width of their own */
  .grid-page table.grid.bs-grid > tbody > tr > th.line-col,
  .grid-page #metrics-grid > tbody > tr > .series-col { width: auto; min-width: 0; max-width: none; }
  :is(.grid-page :is(table.grid, table.driver-grid), table.board-table.tbl-grid) > tbody > tr > .at-month {
    display: block; flex: 0 0 auto; text-align: right; }
  /* the name over its GL code; the figure keeps a width a seven-figure month fits */
  .grid-page table.grid > tbody > tr > th.line-col .line-cell {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
    column-gap: var(--s-2); max-width: none; }
  .grid-page table.grid > tbody > tr > th.line-col .line-cell > * { grid-column: 1; justify-self: start; }
  .grid-page table.grid > tbody > tr > th.line-col .line-cell,
  .grid-page table.grid > tbody > tr > th.line-col .line-name { overflow: visible; line-height: 1.3; }
  .grid-page table.grid > tbody > tr > th.line-col .line-name { grid-row: 1; }
  .grid-page table.grid > tbody > tr > th.line-col .line-cell > .row-menu {
    grid-column: 2; grid-row: 1 / span 3; justify-self: end; }
  .grid-page table.grid > tbody > tr > .at-month { flex-basis: 136px; }
  .grid-page table.grid > tbody > tr > .at-month input { width: 100%; font-size: var(--t-16); }
  /* a total that abstains says why under its dash, in the room it has */
  .grid-page table.grid > tbody > tr > .at-month .tot-why { display: block; white-space: normal; }
  /* an operating metric: its count, in a narrower place */
  .grid-page table.driver-grid > tbody > tr > .at-month { flex-basis: 96px; }
  .grid-page table.driver-grid > tbody > tr > .at-month input { width: 100%; font-size: var(--t-16); }
  /* editing: only the month picked shows its switch, so the strip keeps its chips */
  body.grid-editing .grid-page table.grid > thead th[data-month]:not(.at-month) .month-switch { display: none; }
  /* the names read at the list's size, and a line that opens says so */
  .grid-page table.grid > tbody > tr > th.line-col { font-size: var(--t-14); }
  body:not(.grid-editing) .grid-page table.grid > tbody > tr:is(.line-row, .computed)::after {
    content: ""; flex: none; width: 6px; height: 6px; border-top: 1.5px solid var(--muted-2);
    border-right: 1.5px solid var(--muted-2); transform: rotate(45deg); }
  .grid-page table.grid > thead th.at-month .month-label { text-align: center; }
  /* a total's unit stands under its name */
  .grid-page table.grid > tbody > tr > th.line-col > .sum-sub { display: block; margin: 0; }
  /* a subtotal is a row, tinted from edge to edge */
  :is(.grid-page :is(table.grid, table.driver-grid), table.board-table.tbl-grid) > tbody > tr.computed { background: var(--surface-2); }
  .grid-page table.grid > tbody > tr.computed > :is(th, td) { border: 0; background: none; }
  .grid-page table.grid > tbody > tr.total-row { border-top: 2px solid var(--ink); }
  .grid-page table.grid > tbody > tr.computed > .at-month { font-size: var(--t-16); }
  /* a month's name opens its close page from the month picked (SPEC §6.159);
     on the strip it reads as the month, not as a link */
  .grid-page table.grid > thead th[data-month] .month-close { color: inherit; text-decoration: none; }
  .grid-page table.grid > thead th.at-month .month-tag { background: none; color: inherit; }
  /* THE TOTALS COME FIRST (the plan's approved difference from the drawing):
     the statement's own Totals rows stand where the drawing had a summary */
  .grid-page table.grid > tbody { display: flex; flex-direction: column; }
  .grid-page table.grid > tbody > tr.section-row:has(+ :is(#tot-cogs, #tot-margin)) { order: -2; }
  .grid-page table.grid > tbody > :is(#tot-cogs, #tot-margin, #tot-net) { order: -1; }
  /* ONE LINE ACROSS THE YEAR: in the panel, the month picked on the statement */
  .dq-modal table.line-year tr[aria-current] > :is(th, td) { background: var(--accent-soft); }
  .fx-preview .fx-preview-months:not([hidden]):not(:empty) {
    grid-template-columns: minmax(0, 1fr);
  } /* the list keeps its columns at a width each can hold and scrolls */
}

@media (width <= 640px) {
  .access-table td.gg-role { width: 180px; } /* THE LABEL, NOT THE ICON (redesign 2026-09-22, family 2). This rule read
     `.theme-toggle span`, and #help-btn and .help-about wear `.theme-toggle`
     as well — so it hid THEIR icons too and left two empty 32px boxes in the
     56px strip. Two doors were invisible whenever the rail was collapsed.
     (The theme toggle's own label is clipped by `.crumb` wherever it sits, so
     what is left to fold away is the word on each of those two rows.) */
}

@media (641px <= width <= 1240px) and (pointer: coarse) {
  #main table.console-table > tbody > tr.group-row > td[colspan] { grid-column: 1 / -1; }
  #main table.console-table .tcv-parts { max-width: none; }
}

@media (max-width: 640px) {
  #main table.console-table .tcv-parts { max-width: none; }
}

@media (641px <= width <= 1240px) and (pointer: coarse) {
/* A WINDOW OF MONTHS ON A TABLET (owner decision 5 of 2026-11-19 and the three
   of the same day on the window, UI rule 20, SPEC §6.178). On a touch screen
   from 641px to 1240px the Grid's statements show the months that fit and
   never scroll sideways: a quarter, or on its side a half year where six
   months fit. `one_month.js` says which months are out of the window
   (`month-out`) and runs the control above the table. The columns keep the
   widths a desk declares for them, so no figure is ever cut to fit: only the
   line column gives 20px, which is what lets six months and the three sums
   of the year stand in an 1180px tablet on its side. */
  .grid-page :is(table.grid, table.driver-grid) .month-out { display: none; }
  .grid-page table.grid:not(.bs-grid) :is(th, td).line-col { width: 180px; min-width: 180px; }
  /* the metrics table's name column is the statement's line column: its head
     takes that width from the page's script and its rows ask for none of
     their own. It has no floor here: where a count needs a wider month than
     the statement's (931,000,000.00 does), the names give the room and the
     table stays in its box */
  .grid-page #metrics-grid .series-col { min-width: 0; max-width: none; }
  .grid-page #metrics-grid > tbody > tr > .series-col { width: auto; }
  /* the control: the two sizes in the tab strip's look, the window in the
     year stepper's, each a finger's height */
  .grid-page .months-window:not([hidden]) { display: flex; align-items: center; gap: var(--s-3); }
  .grid-page .months-window > [hidden] { display: none; }
  .grid-page .months-window > .page-tabs > button {
    position: relative; display: inline-flex; align-items: center;
    height: calc(var(--ctl-h) - 6px); padding: 0 12px;
    border: 0; border-radius: var(--r-sm); background: none;
    font: inherit; font-size: var(--t-sm); font-weight: 500; color: var(--muted);
    white-space: nowrap; cursor: pointer; }
  .grid-page .months-window > .page-tabs > button::after { content: ""; position: absolute; inset: -3px 0; }
  .grid-page .months-window > .page-tabs > button.active {
    background: var(--surface); color: var(--ink); font-weight: 600;
    box-shadow: 0 1px 2px rgba(22, 22, 29, .08); }
  .grid-page .months-window > .year-nav { height: var(--ctl-h); }
  .grid-page .months-window > .year-nav > strong { min-width: 9ch; text-align: center; }
  .grid-page .months-window > .year-nav > button {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: var(--ctl-h); min-height: var(--ctl-h); padding: 0;
    border: 0; border-radius: var(--r-sm); background: none;
    font: inherit; color: var(--muted); cursor: pointer; }
  .grid-page .months-window > .year-nav > button:disabled { opacity: .3; cursor: default; }
}

@media (641px <= width <= 900px) and (pointer: coarse) {
/* held upright only a quarter fits, and of the year's three sums the Year
   total: the two that count part of the year are not drawn, so the control
   that folds them is not either */
  .grid-page table.grid :is(.sum-a, .sum-f) { display: none; }
  .grid-page .head-more-item.sum-fold { display: none; }
}

@media (min-width: 901px), (min-width: 641px) and (pointer: coarse) {
  body.side-collapsed .rail-foot .help-btn > span:last-child,
  body.side-collapsed .rail-foot .help-about > span:last-child { display: none; }
}

table.grid.rev-trend th.rev-gap .gap-note { display: block; margin-top: 2px;
  font-size: 11px; font-weight: 400; color: var(--muted); white-space: normal;
  line-height: 1.25; }

@media screen and (min-width: 1101px) {
/* THE BAR RIDES THE TABLE'S OWN HEAD. Its markup comes before the table's
   title line and its place is pinned; drawn as a band of its own it cost
   42px of the fold between the blended card and the first figure. On a
   screen wide enough for both it floats to the right of that title line —
   the save controls beside the name of the table they save, the way a
   bulk-edit table carries them — and the line under it clears. Under
   1100px it is a row of its own again, as before. */
  .grid-page .toolbar {
    float: right; max-width: 62%;
    margin: 0 0 var(--s-2) var(--s-5); }
  .grid-page .toolbar ~ .table-head:has(#months-off) {
    min-height: var(--ctl-h); align-items: center; margin-bottom: var(--s-2); }
  .grid-page .toolbar ~ .grid-shield { clear: both; }
}

@media screen and (width >= 1101px) {
/* the menu control was an inline-flex box on a 19.5px line, which made the
   balance sheet's header 58.5px tall: a block box, no line box, 56 */

/* --- THE SAVE BAR TAKES A ROW OF ITS OWN AGAIN ------------------------ */
/* Section A floated the bar onto the table's title line to win the fold,
   and two reviewers found the price: the off-screen counter ("← 1 earlier
   · 3 more months →") stopped at the float's edge, mid-row, pointing at the
   Reason field, while the revenue trend and the metrics heads kept theirs
   at the sheet's edge — and for a reader who cannot write it stayed at the
   edge, so where it sat depended on role. Beside the blended card instead?
   The card is as wide as its foot sentence, and sized for a bar carrying
   an unsaved-changes count the pair only fits above ~1360px. The brief's
   own design stands: the bar is the row between the card and the title,
   quiet while nothing is dirty (item 3), and the title line keeps its
   counter at the sheet's edge like every other head. The first figure
   sits 44px higher than the family 3 baseline at 1440×900, not 71. */
  .grid-page .toolbar { float: none; max-width: none; margin: 0 0 var(--s-2); }
  .grid-page .toolbar ~ .table-head:has(#months-off) {
    min-height: 0; align-items: baseline; }
}

@media (min-width: 1241px) {
/* The column itself does NOT widen: 300px cost the fifth month at 1440. The
   space comes from the badges instead — a tag every line in a section
   carries is stated once in the section band (grid.html), which is
   SPEC §6.37's "a constant column is suppressed" applied to the flag. It
   does have to KEEP the width it is given: once the name can wrap, auto
   table layout is free to shrink the column to its min-content, and it did
   (218px of the 252px asked for). */
  table.grid thead th.line-col, table.grid tbody th.line-col, table.grid td.line-col {
    width: 252px; min-width: 252px; }
}

/* --- V2: the line column covers the months it scrolls over ----------- */
/* The header's line column sat at z-index 1 under `table.grid thead th`'s 2,
   so once the sheet was scrolled — which the balance tab now does on load, to
   put the current month on screen — a month label PAINTED OVER the "Line"
   header with no column under it. The body's line column already covered its
   own cells; the header now does the same. */
table.grid thead th.line-col { z-index: 3; }

@container ovhead (356px <= width <= 459.98px) {
  .page-controls:has(> .year-nav) > .year-nav { padding: 0 2px; }
  .page-controls:has(> .year-nav) > .year-nav a { padding: 2px 6px; }
  .page-controls:has(> .year-nav) > .year-nav strong { padding: 0 4px; }
}

/* ===== CONTRACTS, PRODUCTS AND PRICE LISTS [contracts] =====
   The contracts page and the contract pop-outs: fees, rates, the plan and its review, the catalog, product groups and quotes.
   --- kept from an old banner ---
   THE BOOK · A · the page, the table, the client pop-out (2026-09-23)
   --- kept from an old banner ---
   THE CONTRACT POP-OUTS · B · new, edit, the plan and the review (2026-09-23)
   --- kept from an old banner ---
   THE CONTRACTS · C · after the review (2026-09-23)
   --- kept from an old banner ---
   PRODUCT LINES AND EXPECTED COSTS (SPEC §6.102)
   The contract pop-out's product lines table (one row per product and fee)
   and the Products tab's expected-costs table share the fee-table and
   price-grid chrome; the amount cell stacks its figure over the word that
   says where it came from (catalog / typed) and the quiet control that
   prices it from the catalog again.
   --- kept from an old banner ---
   INSIGHTS FIRST, PHASE 3 (SPEC §6.104) · the inbox by area, since last week, the top insight, the evidence on the sheet
*/

/* --- 5. THE STATUS CELL READS AS A STATE (Square, Contractbook) ----------
   A bare native select read "Active" in plain ink on every row: the state,
   the table's second column, did not scan. It wears the badge grammar now
   and stays a control. The WIDTH is the pinned 8.5rem rule above; this rule
   adds everything else. Live is TINTED (active: the kind tint), a deal not
   yet signed is a HOLLOW accent outline, and a contract that has ended —
   expired, deactivated or CANCELED — is the muted state outline: canceled is
   a state, not a loss, and red is a loss only (owner decision 2026-09-21).
   The word tells canceled from expired; the colour tells live from not. */
.contracts-table td:has(> .status-select) { position: relative; }
.acc-custom > label:not([hidden]) { display: block; }

.plan-field[hidden] { display: none; }
/* each plan row's own priced figure, from the server (C-1) */
.plan-table td.plan-cost { color: var(--ink-2); white-space: nowrap;
  font-variant-numeric: tabular-nums; }

.fee-details { margin: 6px 0 2px; border-top: 1px solid var(--line-soft); padding-top: 6px; }
.fee-details > summary { cursor: pointer; color: var(--accent); font-weight: 600;
  font-size: 13px; padding: 6px 0; list-style: none; }
.fee-details > summary::-webkit-details-marker { display: none; }
.fee-details > summary::before { content: "+ "; }
.fee-details[open] > summary::before { content: "− "; }
tr.item-edit td { background: var(--accent-soft); }
/* recurring-expense mid-term rate changes (effective-dated steps) */
.rate-flag { color: var(--accent); font-weight: 700; margin-left: 3px; }
tr.item-rates td { background: var(--accent-soft); padding: 12px 14px; }
.access-body .hdr-name > input { align-self: stretch; }
.catalog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.catalog-item { display: flex; align-items: baseline; gap: 7px; margin: 1px 0;
  font-size: 12.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.catalog-item input { margin: 0; flex: 0 0 auto; }
.catalog-item .catalog-name { flex: 1 1 auto; min-width: 0; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.catalog-item .catalog-price { flex: 0 0 auto; font-size: 11px; white-space: nowrap;
  font-variant-numeric: tabular-nums; color: var(--muted); }

/* compact one-time-fee rows (contract modal): one line each */
.fee-rows { margin-top: 12px; }
.fee-row .rate-amt { width: 90px; text-align: right; }
.dates-table td { padding: 0 16px 0 0; vertical-align: top; }
.fee-table th.fee-actions-h { width: 1%; }
.fee-edit-row > td { background: var(--accent-soft); padding: 7px 8px; }

/* the Monthly fees table (Management + Licensing, editable amount + mapping) */
.fee-table.monthly-fees td { vertical-align: middle; }
.fee-table.monthly-fees .rate-amt { width: 110px; text-align: right; border: 1px solid var(--line);
  border-radius: 6px; padding: 4px 6px; font: inherit; font-size: 12.5px; background: var(--surface); }
.fee-table.monthly-fees .rate-amt:read-only { background: var(--line-soft); color: var(--muted); }
.fee-table.monthly-fees select { width: 100%; max-width: 230px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; font: inherit;
  font-size: 12.5px; background: var(--surface); }
tr.item-edit input, tr.item-edit select { border: 1px solid var(--line); border-radius: 6px;
  padding: 5px 8px; font: inherit; font-size: 13px; background: var(--surface); }
.rate-chip .rate-del { display: inline; }
.fee-head { margin-top: 2px; }
.codes-table tbody.code-cat:first-of-type tr.cat-row td { border-top: 0; }
/* a band and its rows hide together when a filter empties the group */
tr.group-row[hidden], tr.cat-row[hidden] { display: none; }

/* a form field hidden by its type select stays hidden: the grid gives labels
   display:flex, which outranks the hidden attribute (contract types 2026-09-10) */
.form-grid > [hidden], .unit-pricing[hidden] { display: none !important; }
/* ... and the rows sit closer, so the whole form shows at once on a laptop */
.contract-panel .form-grid > label { margin: 5px 0; }
.contract-panel .form-grid .form-section { margin-top: 8px; margin-bottom: 2px; }
.contract-panel .seg { margin: 2px 0; }
.contract-panel .form-grid > label { margin: 4px 0; }

/* the client dropdown's name field sits under it when "+ New client" is picked */
.form-grid > label > input.client-new { margin-top: 6px; }
.contract-form .stepper.contract-steps { margin: 8px 0 14px; gap: 6px; }
.contract-steps li > button span { display: block; font-weight: 500; font-size: 12px; }
.contract-steps li.done { color: var(--ink-2); }
.contract-steps li.done::before { background: var(--ok); color: var(--on-accent); content: "✓"; }
.contract-form .stage[hidden] { display: none !important; }
.plan-table td { vertical-align: middle; }
.plan-table .rate-amt.short { width: 72px; }
/* the two parts of cost of goods sold, under their total (owner direction 2026-09-17) */
.review-table tr.review-sub th[scope="row"] { padding-left: 18px; font-weight: 400; color: var(--muted); }
.plan-table td.staff-cost { color: var(--ink-2); white-space: nowrap; }
.review-notes:empty { display: none; }
.setup-step.st-done .setup-mark { background: var(--ok); border-color: var(--ok); }
.setup-step.st-partly .setup-mark { background: var(--attn); border-color: var(--attn); }
/* a price step is a chip ON the card, not a wash two shades off it */
.calc-card .rate-chip {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 2px 4px 2px 8px;
}

/* THE CONTRACTS AND PLANNED EXPENSES ON THE LINE: three columns, one right
   edge. The rows become the grid's own cells (`display: contents`), no
   markup moves. A contract's name is never the thing that is cut: the label
   track takes what the figures leave, and wraps. */
.fx-panel .fee-head { margin: 0; }
.fx-panel .fee-head a { margin-left: auto; font-size: var(--t-sm); }
.fx-panel .fee-list {
  display: grid; grid-template-columns: minmax(0, 1fr) max-content max-content;
  align-items: baseline; column-gap: 12px; row-gap: 6px;
  margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line);
}
.fx-panel .fee-list .fee-row { display: contents; }
.fx-panel .fee-label {
  min-width: 0; white-space: normal; overflow-wrap: break-word; line-height: 1.35;
  font-size: var(--t-sm); font-weight: 500; color: var(--ink);
}
.fx-panel .fee-amt {
  font-family: var(--mono); font-size: var(--t-table); font-variant-numeric: tabular-nums;
  text-align: right; white-space: nowrap; color: var(--ink);
}
.fx-panel .fee-win {
  margin-left: 0; text-align: right; white-space: nowrap;
  font-size: var(--t-sm); font-variant-numeric: tabular-nums;
}

/* --- 2. ONE ROW OF FACTS (Mixpanel, Square) -------------------------------
   Four near-identical grey lines — the reconciled book, "Saved formulas",
   "How posting works" and the fold note — pushed the tabs to a quarter of
   the fold. The book is now a LABELLED FACT (the grid's plan chip: a 2px
   `--line` rule, the figure a step above body), and the two disclosures sit
   on the same row as quiet chevron controls. An open one drops its body to
   the full width of the row below, never into its own narrow column: the
   details box itself steps out of the layout (`display: contents`) so its
   summary and its `::details-content` are placed by the row's grid. A
   browser without `::details-content` keeps the stacked disclosures it had. */
.book-facts { margin: 0 0 var(--s-4); }
.book-facts > .book-line .book-later { font-size: 12px; line-height: 18px; }

/* --- 11. THE SAVED FORMULAS, inside their disclosure (Quicken) -----------
   An expression reads as a value on a chip, not as code in a bare cell;
   the cost code it is the default for is a KIND, the badge the page already
   uses for a growth assumption; the delete is the page's own trash icon,
   and it lights in the accent like the book's, not in the red of a loss. */
.book-facts .list-table .fx-chip {
  display: inline-block; padding: 0 6px; border-radius: 4px;
  background: var(--surface-2); color: var(--ink);
  font-family: var(--mono); font-size: 12px; line-height: 20px; white-space: nowrap;
}
.book-facts .list-table .badge.kind { margin-right: 2px; }
.book-facts .list-table td.row-actions .icon-btn.del:hover {
  color: var(--accent); background: var(--accent-soft); border-color: transparent;
}

/* --- 4. THE TABLE IS A FIXED GRID (Xero, Square) --------------------------
   Auto layout sized every column by what the open tab happened to hold, so
   Status started at four different places on the four tabs. The widths are
   stated once: the contract name ~34ch (17rem), Status a 10rem column
   around the select's pinned 8.5rem, Start and End 6rem, the actions column
   exactly its two icons — and the MONEY columns share what is left, so a
   total's sub-line ("24 months of management", "1,350 bins serviced ×
   $3.20 weekly") stays one line under its figure at 1440px instead of
   wrapping into a 60px row. On a wide screen nothing to the left of the
   money moves between tabs: the name does not absorb the difference.

   Where the width runs short — a tab that carries all three money columns,
   a screen of 1300px or less — the NAME shares the remainder with the
   money. The table's floor is the sum of its columns with the name and each
   money column at 7.5rem (a total's figure is 88px at its widest); under it
   the book scrolls inside its wrapper rather than squeezing a figure.

   Every cell stays in the DOM. A FOLDED column is zero wide, not
   `display: none`: a hidden cell takes no slot in the table's grid, so the
   band's and the foot's pinned `colspan="4"` would reach past End into the
   Monthly column (rendered and checked before this rule was written). */
.contracts-table {
  --bk-money: 1; --bk-act: 0; --bk-act-w: 4.5rem; --bk-dates: 12rem;
  --bk-name-min: 7.5rem; --bk-money-min: 7.5rem;
  table-layout: fixed; width: 100%;
  /* the card's corners still clip, but `hidden` made the TABLE a scroll
     container, and a frozen column sticks to its nearest scroller — which
     must be the wrapper that actually scrolls, not a table that never does */
  overflow: clip;
  min-width: calc(var(--bk-name-min) + 10rem + var(--bk-dates)
                  + var(--bk-money) * var(--bk-money-min) + var(--bk-act) * var(--bk-act-w));
}
.contracts-table:has(> thead th.num ~ th.num) { --bk-money: 2; }
.contracts-table:has(> thead th.num ~ th.num ~ th.num) { --bk-money: 3; }
.contracts-table:has(> thead th.col-act) { --bk-act: 1; }
/* three money columns: the name shares the remainder with them */
.contracts-table:has(> thead th.num ~ th.num ~ th.num) > thead th:first-child { width: auto; }
/* one line box for every cell, in whole pixels, and air for a cell whose
   figure carries a sub-line under it. The header's 11.5px x 1.3 made it
   31.94px tall, and every figure under it sat on a fractional pixel; a
   badge's 11px x 1.6 did the same to its row. A badge is 18px (16px and its
   border), the height of the line it sits on, set from the line's top. */
.contracts-table > thead > tr > th { line-height: 15px; }
/* a name wraps inside its own column, never under Status */
.contracts-table > tbody > tr.contract-row > th[scope="row"] { overflow-wrap: anywhere; }
/* a month is a quiet figure in both themes, never read as a link */
.contracts-table td.col-date { color: var(--muted); }
:root[data-theme="dark"] .contracts-table td.col-date { color: var(--ink-2); }
.contracts-table .status-select.st-active {
  background: var(--accent-soft); color: var(--accent); border-color: transparent;
}
.contracts-table .status-select.st-projected {
  background: transparent; color: var(--accent); border-color: var(--accent-line);
}
.contracts-table .status-select:is(.st-expired, .st-inactive, .st-canceled) {
  background: transparent; color: var(--muted); border-color: var(--line);
}
/* it is still something you can change: the pointer shows the field's edge
   and the caret, and the keyboard the kit's ring */
.contracts-table .status-select:hover { border-color: var(--muted-2); }
.contracts-table .status-select.st-active:hover { border-color: var(--accent-line); }
.contracts-table .status-select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent-line);
}
/* the open list is a list, not a row of pills */
.contracts-table .status-select option {
  font-weight: 400; color: var(--ink); background: var(--surface);
}
/* the caret: a CSS mask over the select's right end, drawn by the cell
   (a select paints no pseudo-element), revealed by hover and by focus */
.contracts-table td:has(> .status-select)::after {
  content: ""; position: absolute; top: 50%; pointer-events: none;
  left: calc(10px + 8.5rem - 17px); width: 10px; height: 10px; margin-top: -5px;
  background: var(--muted); opacity: 0; transition: opacity .12s ease;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.contracts-table td:has(> .status-select:is(:hover, :focus-visible))::after { opacity: 1; }
.contracts-table td:has(> .status-select:is(.st-active, .st-projected))::after { background: var(--accent); }
.contracts-table .st.st-active { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.contracts-table .st.st-projected { color: var(--accent); border-color: var(--accent-line); }
.contracts-table th[scope="row"] .tag { margin-left: 4px; }

/* --- 6. THE CLIENT BAND IS A BLOCK (Zoho CRM, Expensify) ------------------
   A one-row band on `--bg` over a row on `--surface`, band, row, band, row,
   read as broken zebra striping. A client is a BLOCK now: 8px of air, a 1px
   `--line` rule, the client's name in ink at 12.5px, and a 2px rule down the
   left of its contracts that ends at its last one. The band's pinned `<td>`
   strings are untouched; only the cells are styled. The rule is drawn by
   the row header (every child row's first cell is a `th scope="row"`), so
   a band and its rows that a search hides take their rule with them. */
table.dt.contracts-table > tbody > tr.group-row > td {
  height: auto; padding: 16px 10px 6px;
  font: 600 var(--t-sm)/18px var(--sans); letter-spacing: 0; color: var(--ink);
  background: var(--surface) linear-gradient(var(--line), var(--line)) 0 8px / 100% 1px no-repeat;
}
table.dt.contracts-table > tbody > tr.group-row > td.num { color: var(--ink-2); font-weight: 600; }
table.dt.contracts-table > tbody > tr.group-row:hover > td {
  background: var(--surface) linear-gradient(var(--line), var(--line)) 0 8px / 100% 1px no-repeat;
}
/* the first visible band sits under the header's own rule: no second rule,
   no air */
table.dt.contracts-table > tbody > tr.group-row:not([hidden]):not(tr:not([hidden]) ~ tr) > td {
  padding-top: 8px; background-image: none;
}
.contracts-table > tbody > tr.group-row .badge.kind { margin-left: 6px; }
/* the rule down the left of a client's contracts */
.contracts-table > tbody > tr.child-row > th[scope="row"] { position: relative; }
.contracts-table > tbody > tr.child-row > th[scope="row"]::before {
  content: ""; position: absolute; left: 10px; top: 0; bottom: -1px; width: 2px;
  background: var(--line); pointer-events: none;
}
/* the rename pencil is quiet at rest and lights with its band */
.contracts-table .group-row .band-edit {
  width: 22px; height: 22px; margin: -2px 0 -2px 4px; padding: 0;
  opacity: 1; color: var(--muted); vertical-align: top;
}
.contracts-table .group-row:hover .band-edit { color: var(--accent); }
.contracts-table .group-row .band-edit:hover {
  color: var(--accent); background: var(--accent-soft); border-color: transparent;
}
.contracts-table td.row-actions .icon-btn:hover {
  color: var(--accent); background: var(--accent-soft); border-color: transparent;
}
/* the whitespace between the two slots is the markup's indentation; the
   cell's own font size is zero so the slots are exactly 24 + 4 + 24 */
.contracts-table td.row-actions { font-size: 0; }
.contracts-table td.row-actions .icon-btn + form { margin-left: 4px; }
.contracts-table td.row-actions > .icon-btn:last-child { margin-right: 28px; }
:root[data-theme="dark"] .contracts-table > tfoot > tr.subtotal > th[scope="row"]:only-child,
:root[data-theme="dark"] .contracts-table > tfoot > tr.subtotal:hover > th[scope="row"]:only-child {
  background: var(--surface);
}
.contracts-table > tfoot > tr.subtotal > th[scope="row"]:only-child .muted { color: var(--muted); }
/* Family 5, section B of the Mobbin redesign: LOOK, LAYOUT and HIERARCHY on
   the New contract pop-out (its three stages), the per-row edit pop-out (the
   same object in one scroll: entry, fees, the plan, the review, the
   sign-off) and the save-formula pop-out. No word moves, no hook moves, no
   behaviour changes, and every colour is a token with a dark value. Built on
   the kit: the field primitive and its compact variant, the three button
   roles, the one pop-out chrome and the ITEM surface of family 3.

   WHAT WAS WRONG, one line each: the stepper was three equal boxes that read
   as three choices, not one path; four heading treatments shouted in
   uppercase, one of them a two-line explanatory paragraph; the plan rows
   were eight controls of eight widths under a header that wrapped to three
   lines; the review gave six figures one weight and centred its row names;
   the eleven blocks of the edit pop-out had no edges; and the New contract's
   Next sat on an unruled band while its two siblings had a real foot.

   PINNED AND UNTOUCHED: the markup of every macro (the plan row's CELL COUNT
   is read by the `plan-how` script), `data-rv` LAST with direct text, the one
   `<table>` in `.review-block`, the captions and tablewraps, the stepper's
   classes and `[data-stage-go]`, every sentence. The two `color: #fff` in
   the stepper's earlier rules now read `var(--on-accent)` (edited in place,
   the one named edit). */

/* --- 1. THE STEPPER IS A PATH (HoneyBook / Mercury) ----------------------
   One compact rail on one line: a numeral in a 22px circle, the stage's name
   and, beside it, what the stage is for; hairlines join the steps. The
   CURRENT step is filled, a DONE one tinted with its tick, one AHEAD a hollow
   ring. It is a band across the top of the form, not a column beside it, so
   the panel keeps its width for the fields and the help pictures of the
   stages keep their frame. Scoped to `.contract-steps`: the intake wizard on
   `/new` wears `.stepper` too and is another page. */
.contract-form .stepper.contract-steps {
  display: flex; align-items: center; gap: 0;
  margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line);
}
/* the hairline that joins a step to the next one */
.contract-steps li:not(:last-child)::after {
  content: ""; flex: 1 1 24px; min-width: 12px; height: 1px;
  margin: 0 12px; background: var(--line);
}
.contract-steps li::before {
  position: static; transform: none; flex: none; box-sizing: border-box;
  width: 22px; height: 22px; margin: 0;
  background: transparent; border: 1px solid var(--field-line); color: var(--muted);
  font-size: 11.5px; font-weight: 600; line-height: 1;
}
.contract-steps li.active { color: var(--ink); }
.contract-steps li.active::before {
  background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent);
}
.contract-steps li.done { color: var(--ink-2); }
.contract-steps li.done::before {
  background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent);
}
.contract-steps li.done::after { background: var(--accent-line); }

/* --- 2. THE FORM IS A GRID OF SECTIONS -----------------------------------
   The three section names drop the retired uppercase and take the pop-out's
   ONE heading grammar (section 4: 12.5px/600 ink, the edit pop-out's block
   names): at the list-table header's 11.5px muted they sat UNDER the field
   labels they head. A hairline OPENS each section instead of underlining
   its name: the gap above "Billing" was smaller than the gaps inside a
   section, so the grouping read inverted. */
.contract-panel .form-grid .form-section {
  margin: 8px 0 2px; padding: 14px 0 0; border-bottom: 0; border-top: 1px solid var(--line);
  font-size: var(--t-sm); font-weight: 600; letter-spacing: 0; text-transform: none;
  color: var(--ink); line-height: 18px;
}
.contract-form .stage > .form-section:first-child {
  margin-top: 10px; padding-top: 0; border-top: 0;
}
/* a three-line helper no longer pushes its neighbours down */
.contract-panel .form-grid { align-items: start; }
.contract-panel .form-grid > label { margin: 4px 0; }
/* a month is eight characters: the native field stops spanning 320px, on the
   kit's field edge (`.month-input` drew the card's lighter hairline) */
.contract-panel .form-grid label > input.month-input {
  max-width: 190px; padding: 0 10px; font-size: var(--t-table);
  border-color: var(--field-line); border-radius: var(--r-md);
}
/* ACTIVE / PROJECTED are two choice tiles in the existing `.seg`: the field's
   edge at rest, the chosen one on the accent tint (Whop / Origin) */
.contract-panel .seg { gap: 8px; flex-wrap: nowrap; align-items: stretch; margin: 4px 0; }
.contract-panel .seg .check-row {
  flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 8px;
  min-height: var(--ctl-h); margin: 0; padding: 6px 12px;
  border: 1px solid var(--field-line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink);
  font-size: var(--t-table); font-weight: 600; line-height: 18px; cursor: pointer;
}
.contract-panel .seg .check-row > input { flex: none; margin: 0; }
.contract-panel .seg .check-row > .muted {
  min-width: 0; font-size: var(--t-sm); font-weight: 400; color: var(--muted);
}
.contract-panel .seg .check-row:hover { border-color: var(--muted-2); }
.contract-panel .seg .check-row:has(> input:checked) {
  border-color: var(--accent-line); background: var(--accent-soft);
}
.contract-panel .seg .check-row:has(> input:focus-visible) {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
/* "+ License fee" and "+ One-time fee" are quiet accent buttons, not links
   between two hairlines that read as section rules */
.contract-panel .fee-details { margin: 4px 0 0; padding-top: 0; border-top: 0; }
.contract-panel .fee-details > summary {
  display: inline-flex; align-items: baseline; gap: 4px; min-height: 28px;
  margin-left: -6px; padding: 5px 6px; border-radius: var(--r-sm);
  font-size: var(--t-sm); font-weight: 600; line-height: 18px; color: var(--accent);
}
.contract-panel .fee-details > summary .muted { font-weight: 400; color: var(--muted); }
.contract-panel .fee-details > summary:hover { text-decoration: underline; }
.contract-panel .fee-details[open] > summary { margin-bottom: 2px; }
.contract-panel .unit-pricing p.muted b { color: var(--ink); font-variant-numeric: tabular-nums; }
/* the kit's cue that the body runs on sits ABOVE the pinned foot, not under it */
.contract-panel .access-body:has(> form[data-stages])::after { bottom: calc(var(--ctl-h) + 25px); }
.contract-panel .fee-rows-head > .muted {
  display: block; max-width: 92ch; margin-top: 2px;
  font-weight: 400; color: var(--muted); line-height: 18px;
  /* the sentence opens with the " · " that joined it to the name on one
     line; on a line of its own the dot HANGS in the gutter, so the words
     start on the heading's left edge (the dot and its space measure .57em
     in Inter at this size) */
  text-indent: -.57em;
}
.contract-panel :is(.fee-table thead th, .dates-table th) .th-sub {
  display: block; margin-top: 1px; color: var(--muted);
  font-size: 11px; font-weight: 400; line-height: 15px;
  letter-spacing: 0; text-transform: none;
}
.contract-panel .tag-auto { text-transform: none; letter-spacing: 0; font-weight: 600; }

/* --- 5. THE BLOCKS ARE SECTIONS ------------------------------------------
   Each block opens under a hairline with 24px of air above it; the gap
   between a block's name and its table was 2px, between two blocks 12px,
   and eleven blocks read as one stack. */
.contract-panel .fee-block { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.contract-form .stage > .fee-block:first-child { margin-top: 12px; padding-top: 0; border-top: 0; }
/* the review stage opens on its heading, at the same distance from the rail */
.contract-form .stage > .fee-rows-head:first-child { margin-top: 12px; }
/* an EMPTY one-time fees table prints its sentence, not four column heads */
.contract-panel .fee-table:has(> tbody > tr.fee-empty) > thead { display: none; }
.contract-panel .fee-table tr.fee-empty > td { padding: 2px 0 4px; font-size: var(--t-sm); border-bottom: 0; }
/* the monthly and one-time fee tables: a fixed grid, the amount and where it
   posts as one cluster at the right (Xero's line items) */
.contract-panel .fee-table.monthly-fees { table-layout: fixed; }
.contract-panel .fee-table.monthly-fees thead th:nth-child(2) { width: 140px; }
.contract-panel .fee-table.monthly-fees thead th:nth-child(3) { width: 300px; }
.contract-panel .fee-table.monthly-fees .rate-amt {
  width: 100%; height: auto; min-height: var(--ctl-h-sm); padding: 0 8px;
  border-color: var(--field-line); border-radius: var(--r-sm); font-size: var(--t-sm);
}
.contract-panel .fee-table.monthly-fees select {
  max-width: none; min-height: var(--ctl-h-sm); padding: 0 8px;
  border-color: var(--field-line); border-radius: var(--r-sm);
}
.contract-panel .fee-table:not(.monthly-fees, .plan-table, .review-table, .fees-table, .fee-totals-table) { table-layout: fixed; }
.contract-panel .fee-table:not(.monthly-fees, .plan-table, .review-table, .fees-table, .fee-totals-table) thead th:nth-child(1) { width: 110px; }
.contract-panel .fee-table:not(.monthly-fees, .plan-table, .review-table, .fees-table, .fee-totals-table) thead th:nth-child(2) { width: 130px; }
.contract-panel .fee-table:not(.monthly-fees, .plan-table, .review-table, .fees-table, .fee-totals-table) thead th:nth-child(3) { width: 30%; }
.contract-panel .fee-table:not(.monthly-fees, .plan-table, .review-table, .fees-table, .fee-totals-table) thead th.fee-actions-h { width: 64px; }
/* A NEW CONTRACT'S FEE ROWS are fields, not the saved table's figures, so
   they are out of the rule above and take columns of their own (owner report
   2026-11-19: the widths above gave "Posts to" 130px and its select ran on
   under the next field). Since SPEC §6.182 they are the rows of ONE table,
   `fees-table`, drawn with the product lines' rules below; the one-time
   block with a month per fee is gone. */

/* --- 6. THE PLAN ROWS ARE A GRID (Xero / Jobber) -------------------------
   Fixed columns, so the header stops wrapping to three lines and every
   control fills the column it sits under; ONE control height across the
   select, the amount, the basis, the formula and the label. Columns resize
   and nothing is added or removed: the `plan-how` line under a cost row
   spans `tr.children.length`. */
.contract-panel .plan-table { table-layout: fixed; width: 100%; }
/* the cost and staffing rows keep their columns below the full panel: under
   900px of table they scroll inside their `.tablewrap` rather than crush the
   formula to a sliver (a tablet, the phone sheet) */
.contract-panel .plan-block:is([data-plan="cost"], [data-plan="staff"]) .plan-table { min-width: 900px; }
.contract-panel .plan-table thead th { padding: 0 8px 8px 0; }
.contract-panel .plan-table tbody td { padding: 6px 8px 6px 0; }
.contract-panel .plan-table thead th.fee-actions-h { width: 36px; }
.contract-panel .plan-block[data-plan="cost"] .plan-table thead th:nth-child(1) { width: 18%; }
.contract-panel .plan-block[data-plan="cost"] .plan-table thead th:nth-child(2) { width: 88px; }
.contract-panel .plan-block[data-plan="cost"] .plan-table thead th:nth-child(3) { width: 136px; }
.contract-panel .plan-block[data-plan="cost"] .plan-table thead th:nth-child(5) { width: 15%; }
.contract-panel .plan-block[data-plan="cost"] .plan-table thead th:nth-child(6) { width: 96px; }
/* role, employees, hours a week, what the hours follow, the formula (what is
   left), the wages line, the cost (SPEC §6.139: "Hours follow" is a column) */
.contract-panel .plan-block[data-plan="staff"] .plan-table thead th:nth-child(1) { width: 18%; }
.contract-panel .plan-block[data-plan="staff"] .plan-table thead th:nth-child(2) { width: 84px; }
.contract-panel .plan-block[data-plan="staff"] .plan-table thead th:nth-child(3) { width: 92px; }
.contract-panel .plan-block[data-plan="staff"] .plan-table thead th:nth-child(4) { width: 116px; }
.contract-panel .plan-block[data-plan="staff"] .plan-table thead th:nth-child(6) { width: 18%; }
.contract-panel .plan-block[data-plan="staff"] .plan-table thead th:nth-child(7) { width: 96px; }
/* what the job takes is two fields; the table is as wide as it needs */
.contract-panel .plan-block[data-plan="assign"] .plan-table { width: min(100%, 560px); }
.contract-panel .plan-block[data-plan="assign"] .plan-table thead th:nth-child(2) { width: 104px; }
.contract-panel .plan-table td.num input.rate-amt:hover:not(:focus),
.several-rows td.num input:hover:not(:focus) { border-color: var(--muted-2); }
.contract-panel .plan-table td.num input.rate-amt:focus,
.several-rows td.num input:focus { border-color: var(--accent); }
/* the formula fills its column; the saved-formula picker, "Use" and "save"
   are one compact cluster at its right edge */
.contract-panel .plan-table .fx-wrap { display: flex; align-items: center; gap: 4px; width: 100%; min-width: 0; }
.contract-panel .plan-table .fx-wrap .fx-in { flex: 1 1 auto; width: auto; min-width: 0; }
.contract-panel .plan-table .fx-wrap .fx-pick { flex: 0 0 76px; width: 76px; max-width: 76px; padding: 0 4px 0 6px; }
.contract-panel :is(.plan-table, .plan-sent) .fx-wrap :is(.fx-use, .fx-save) {
  flex: none; min-height: var(--ctl-h-sm); padding: 0 3px; border-radius: var(--r-sm);
  font-size: var(--t-label); font-weight: 600; line-height: var(--ctl-h-sm);
}
/* the row's remove control: the quiet icon button of the pop-out's close,
   never red — removing a row loses nothing */
.contract-panel :is(.plan-table, .fee-table, .plan-sent) .icon-btn.del {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; padding: 0; border-radius: var(--r-sm);
  color: var(--muted); font-size: 16px; line-height: 1;
}
.contract-panel :is(.plan-table, .fee-table, .plan-sent) .icon-btn.del:hover { color: var(--ink); background: var(--line-soft); }

/* --- 7. THE ADD-ROW CONTROLS ARE ONE THING -------------------------------
   "+ Add a cost", "+ Add an assignment", "+ Add a role", "+ Add one-time fee":
   a quiet accent text button, no ground and no box, on the table's own left
   edge, with the kit's focus ring. */
.contract-panel .fee-add-toggle:not([hidden]) {
  display: inline-flex; align-items: center; min-height: 28px;
  margin: 4px 0 0 -6px; padding: 0 6px; border-radius: var(--r-sm);
  background: none; border: 0; color: var(--accent);
  font-size: var(--t-sm); font-weight: 600;
}

/* --- 8. THE REVIEW ENDS ON ONE FIGURE (Jobber / Mercury) -----------------
   The review is an ITEM (family 3's surface) and reads as a conclusion:
   the row names at the left, Gross margin the anchor under the ink rule, the
   margin a step quieter under it, the two parts of the cost of doing the work
   indented behind a rule, the notes a quiet footnote at the card's foot. The
   figures are the server's, printed as they were. */
.contract-panel .review-block {
  margin-top: 4px; padding: 4px 16px 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
}
.contract-panel .review-table { margin: 0; }
.contract-panel .review-table thead th { padding: 8px 0 8px 16px; border-bottom: 1px solid var(--line); }
.contract-panel .review-table thead th:first-child { padding-left: 0; }
.contract-panel .review-table tbody > tr > * { border-bottom: 1px solid var(--line-soft); }
.contract-panel .review-table tbody td { padding: 7px 0 7px 16px; }
.contract-panel .review-table tr.review-sub th[scope="row"]::before {
  content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--line);
}
.contract-panel .review-table td.loss { color: var(--err); }
.contract-panel .review-table tbody tr:last-child:not(.total) th[scope="row"] { color: var(--muted); font-weight: 400; }
.contract-panel .review-table tbody tr:last-child:not(.total) td.muted { color: var(--muted); font-size: 12px; }
.contract-panel .review-notes {
  margin: 4px 0 0; padding: 8px 0 0 16px; border-top: 1px solid var(--line-soft);
  color: var(--muted); font-size: 12px; line-height: 18px;
}
.contract-panel .stage .plan-note, .contract-panel .review-stage .plan-note {
  margin: 10px 0 0; color: var(--muted); font-size: var(--t-sm);
}

/* --- 12. THE FOUR STEPS (SPEC §6.139) ------------------------------------
   The stepper and the form's one "How to read this" share the band at the
   top; the block of what a starting contract filled sits under step 1's
   fields; a refusal prints under the field it names; a staffing row's tags
   ("a unit", "holds 40.5") sit under its hours. On a phone the four steps
   stay one line: the current step keeps its name, the others are their
   numerals, and the acts stay at the foot. */
.contract-steps-row:not([hidden]) {
  display: flex; align-items: center; gap: var(--s-2);
  border-bottom: 1px solid var(--line);
}
.contract-steps-row > .stepper.contract-steps { flex: 1 1 auto; min-width: 0; border-bottom: 0; }
.contract-steps-row > .how-to-read { flex: none; }
.contract-panel .filled-from:not([hidden]) {
  display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4);
  margin: var(--s-2) 0 0; padding: var(--s-2) var(--s-3);
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2);
  font-size: var(--t-13); color: var(--ink-2);
}
.contract-panel .filled-from-head { flex: 1 1 100%; font-weight: 600; color: var(--ink); }
.contract-panel .filled-from-key { color: var(--muted); }
.contract-panel .filled-from [hidden] { display: none; }
.contract-panel .field-refusal { margin: var(--s-1) 0 0; }
.contract-panel .unit-preview { margin: 0; }
.contract-panel .badge[hidden], .plan-sent .badge[hidden], .plan-tag[hidden] { display: none; }
/* a row's formula, folded behind one "Formula" control; a closed fold that
   holds a formula wears its tag */
.contract-panel .fx-fold > summary { cursor: pointer; list-style: none; white-space: nowrap; }
.contract-panel .fx-fold > summary::-webkit-details-marker { display: none; }
.contract-panel .fx-fold[open] > summary [data-fx-has] { display: none; }
.contract-panel .fx-fold[open] > summary { margin-bottom: var(--s-1); }

/* --- 13. SEVERAL AT ONCE (SPEC §6.146) ------------------------------------
   "Start from" is a field of the kit's form (label above, "Use it" on the
   field's line), then the shared fields, then the rows. The rows' fields
   are the pop-out tables' compact fields (`.several-rows` sits in their
   shared lists). A table from 1240px up; below it, one card per row, a plain
   stack: Customer, Contract name and Starts each a label over a full-width
   field; How many and Rate side by side; a checked set's three figures on
   one line; the remove control at the card's top right. */
.several-start:not([hidden]) {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-2) var(--s-3);
  margin: 0 0 var(--s-3);
}
.several-start > label { flex: 0 1 360px; min-width: 0; margin: 0; }
.several-shared { margin: 0 0 var(--s-3); }
.several-rows input { width: 100%; min-width: 0; }
.several-rows input.month-input { min-width: 9.5em; }
.several-rows td.num input { text-align: right; font-variant-numeric: tabular-nums; }
.several-rows td[data-col="count"] input, .several-rows td[data-col="rate"] input { max-width: 7em; }
.several-rows td.num[data-several-figure] { white-space: nowrap; }
.several-rows .several-key { display: none; }
.several-rows .field-refusal { margin: var(--s-1) 0 0; white-space: normal; }
.several-add-row { margin: var(--s-2) 0 0; }
.contract-panel .several-link { justify-self: start; }

/* --- ONE RULE BETWEEN CLIENT BLOCKS ----------------------------------- */
/* The band drew its rule 8px below the last child row's own hairline, so
   two lines ran 8px apart between blocks. The rule sits on the band's top
   edge now, where it meets the row's hairline as one line, and the 16px of
   air is between the rule and the client's name: a block opens under a
   rule, the way the kit's sections do. The first visible band keeps no
   rule (section A's more specific rule). */
table.dt.contracts-table > tbody > tr.group-row > td,
table.dt.contracts-table > tbody > tr.group-row:hover > td {
  background: var(--surface) linear-gradient(var(--line), var(--line)) 0 0 / 100% 1px no-repeat;
}
.contracts-table > tbody > tr.group-row .badge.kind { margin-left: 0; }

/* --- THE PLAN ROWS GIVE THE LABEL AND THE FORMULA THEIR ROOM ---------- */
/* The cost table's Label field clipped a saved label ("Tipping, per bin
   per se") while 34px sat empty before the Cost figure; the staffing
   table's hours formula shrank to 130px while the role and wages columns
   held 21% each. The label takes 18%, the cost figure 76px (it needs 60),
   the role and the wages code 18% and 19%, and the formula column, which
   is the remainder, grows. The cell count and every attribute are as they
   were. (SPEC §6.139 gave "Hours follow" a column of its own, the fourth:
   the wages line is now the sixth and the cost the seventh.) */
.contract-panel .plan-block[data-plan="cost"] .plan-table thead th:nth-child(5) { width: 18%; }
.contract-panel .plan-block[data-plan="cost"] .plan-table thead th:nth-child(6) { width: 76px; }
.contract-panel .plan-block[data-plan="staff"] .plan-table thead th:nth-child(1) { width: 18%; }
.contract-panel .plan-block[data-plan="staff"] .plan-table thead th:nth-child(6) { width: 19%; }
.contract-panel .plan-block[data-plan="staff"] .plan-table thead th:nth-child(7) { width: 80px; }

/* --- A SECTION NAME IS A HEADING, NOT A LABEL ------------------------- */
/* At 12.5px/600 in ink the section names read as a second row of field
   labels (12.5px/600 in --ink-2). A step up in size and weight, tighter,
   with the hairline above: a heading over its fields. */
.contract-panel .form-grid .form-section {
  font-size: 13.5px; font-weight: 650; letter-spacing: -.01em; line-height: 20px;
}

/* --- THE JOIN MARKS HANG AND ARE CLIPPED ------------------------------ */
/* The sentences under a block name open with the " · " that joined them to
   the name on one line, and the client pop-out's sentence with the "— "
   that joined it to its label; on a line of their own the marks read as a
   stray bullet and a dangling dash. Their words are pinned. Each mark hangs
   outside the block by exactly its width and the block clips what hangs, so
   the sentence opens on its first word and the text is unchanged. */
.contract-panel .fee-rows-head > .muted { overflow: clip; }
.interview-log { list-style: none; margin: 0 0 var(--s-4); padding: 0; }
.interview-log > li { margin: 0 0 var(--s-3); }
.interview-q { font-weight: 600; color: var(--ink); margin: 0 0 var(--s-2); }
.interview-lines { margin: 0 0 var(--s-3); padding-left: var(--s-4); }
.interview-choices:not([hidden]) { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-3); }
.interview-type:not([hidden]) { display: flex; gap: var(--s-2); }
.interview-type input { flex: 1 1 auto; min-width: 0; }
.interview-draft {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-4);
  background: var(--surface);
}
.interview-draft-head:not([hidden]) { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3); }
.interview-draft-head h2 { margin: 0; text-transform: none; letter-spacing: 0; color: var(--ink); }
.interview-step { margin: 0 0 var(--s-3); }
.interview-step h3 { margin: 0 0 var(--s-1); }
.set-block > .tablewrap > table.dt > * > tr > :first-child { padding-left: 20px; }
.set-block > .tablewrap > table.dt > * > tr > :last-child { padding-right: 20px; }
.set-block > .tablewrap > table.dt tbody tr:last-child > * { border-bottom: 0; }
.set-block-body.form-grid > label { margin: 4px 0; }
/* a branch's name and its "sub-P&L" stay one line; a narrow screen scrolls
   the table in its wrapper rather than stacking a name four lines deep */
.set-block table.branch-table td:first-child { white-space: nowrap; }
.set-block table.proforma-table td:first-child { white-space: normal; line-height: 1.35;
  padding-top: 8px; padding-bottom: 8px; }
.access-modal:is([id^="modal-size-"], [id^="modal-kpi"], [id^="modal-branch-"])
.rate-add :is(input, select):focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
.access-foot > form.set-remove button.linklike:not([hidden]) {
  min-height: var(--ctl-h); padding: 0 10px; border-radius: var(--r-md);
  display: inline-flex; align-items: center;
  font-size: var(--t-table); font-weight: 600;
}
.access-foot > form.set-remove button.linklike:hover { background: var(--surface-2); text-decoration: none; }
/* a row of a sentence with its fields: "From [month] [year] the target
   becomes [value]" */
.access-modal .access-body .rate-add.kpi-step:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.access-body .rate-add.kpi-step .mp { margin: 0; }
.access-body .rate-add.kpi-step .rate-amt { width: 110px; }
.access-modal:is([id^="modal-size-"], [id^="modal-kpi"], [id^="modal-branch-"]) .rate-add:not([hidden]) {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin: 0;
}
.access-modal:is([id^="modal-size-"], [id^="modal-kpi"], [id^="modal-branch-"]) .rate-add label.grow {
  gap: var(--s-1); font-size: var(--t-sm); font-weight: 550; color: var(--ink-2);
}
.access-modal:is([id^="modal-size-"], [id^="modal-kpi"], [id^="modal-branch-"]) .rate-add label.grow:has(> input[type="checkbox"]) {
  flex-direction: row; align-items: baseline; gap: 8px; font-weight: 400;
  font-size: var(--t-table); color: var(--ink);
}
/* the catalog's editor and its price grids */
.access-body .catalog-editor > label { margin: 0 0 10px; }
.access-body table.price-grid td.num input {
  height: var(--ctl-h-sm); min-width: 0; padding: 0 8px; font-size: var(--t-sm);
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--field-line); border-radius: var(--r-sm);
}
.access-body table.price-grid td.num input:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
.set-codes .codes-filter :is(input[type="search"], select):hover { border-color: var(--muted-2); }
.set-codes .codes-filter :is(input[type="search"], select):focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
table.codes-table .used-by { white-space: normal; overflow-wrap: anywhere; line-height: 16px; }
table.codes-table tr:is(:hover, :focus-within) > td.row-actions .icon-btn,
table.codes-table tr.cat-row:is(:hover, :focus-within) .cat-edit { color: var(--ink); }
table.codes-table td.row-actions .icon-btn:hover, table.codes-table .cat-head .cat-edit:hover {
  color: var(--accent); background: var(--accent-soft); border-color: transparent;
}
table.codes-table .code-cat-kind, table.codes-table .code-cat-count {
  font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.set-codes .codes-legend .legend-gloss { color: var(--ink-2); }

/* --- 4. PLANNED EXPENSES (Base44, Tally) ----------------------------------
   A band that holds ONE row is that row's own first line — the expense line
   and its GL code as a caption over the vendor, one unit under the pointer
   — rather than a tinted band over a single row, six times running. The
   band stays in the markup (a group of one is banded; test-pinned), so this
   is presentation only; a band over several rows keeps its tint and its
   subtotal exactly as it was. */
.fees-table tbody tr.group-row:has(> td:only-child):has(+ tr.child-row + tr.group-row) > td,
.fees-table tbody tr.group-row:has(> td:only-child):has(+ tr.child-row:last-child) > td {
  height: 22px; padding: 8px 10px 0; vertical-align: bottom;
  background: var(--surface); border-bottom: 0;
  font-weight: 500; line-height: 14px; color: var(--muted);
}
.fees-table tbody tr.group-row:has(> td:only-child):has(+ tr.child-row + tr.group-row) + tr.child-row > :first-child,
.fees-table tbody tr.group-row:has(> td:only-child):has(+ tr.child-row:last-child) + tr.child-row > :first-child {
  padding-left: 10px;
}
.fees-table tbody tr.group-row:has(> td:only-child):has(+ tr.child-row + tr.group-row) + tr.child-row > *,
.fees-table tbody tr.group-row:has(> td:only-child):has(+ tr.child-row:last-child) + tr.child-row > * {
  height: 32px; vertical-align: top; padding-top: 4px;
}
/* one unit under the pointer: the caption lights with its row */
.fees-table tbody tr.group-row:has(+ tr.child-row:hover) > td { background: var(--surface-2); }
.fees-table tr:is(:hover, :focus-within) > td.row-actions .icon-btn { color: var(--ink); }
.fees-table td.row-actions .icon-btn:hover {
  color: var(--accent); background: var(--accent-soft); border-color: transparent;
}
[id^="modal-fee-"] .access-body > h3.fee-sec {
  margin: 10px 0 2px; padding-top: var(--s-4); border-top: 1px solid var(--line-soft);
  font-size: var(--t-table); font-weight: 650; line-height: 20px;
  letter-spacing: 0; text-transform: none; color: var(--ink);
}
[id^="modal-fee-"] .rate-list > .muted { font-size: 12px; line-height: var(--ctl-h-sm); }
/* `.rate-add` is also an old inline disclosure's class, whose later
   `display: inline-block` turned this form into a run of inline boxes */
[id^="modal-fee-"] form.rate-add {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 var(--s-2);
}
[id^="modal-fee-"] .rate-add > .muted { font-size: var(--t-sm); }
[id^="modal-fee-"] .rate-add .rate-amt {
  min-height: var(--ctl-h); height: var(--ctl-h); width: 110px; padding: 0 11px;
  border: 1px solid var(--field-line); border-radius: var(--r-md);
}
/* the rate form reads as two lines: "As of <month>" / "the amount becomes
   <figure> [Add change]" — a full-width break drawn between them */
[id^="modal-fee-"] form.rate-add:has(> .rate-amt) { row-gap: 4px; }
[id^="modal-fee-"] .rate-add:has(> .rate-amt)::after {
  content: ""; order: 1; flex-basis: 100%; height: 0;
}
[id^="modal-fee-"] .rate-add:has(> .rate-amt) > .mp ~ * { order: 2; }
.setup-steps .setup-title:hover { color: var(--accent); }

/* --- 3. THE OVERVIEW'S COPY (the same partial, `compact`) ---------------
   Only the steps still to do, inside the Overview's item card: no card in
   a card, the rows edge to edge, the last one without a rule under it. */
.setup-steps.compact .setup-step { padding: 9px 0; border-width: 0 0 1px; }
/* with no legend above it the footnote opens the card's foot itself */
.set-codes > .tablewrap + .codes-untagged { padding-top: 12px; border-top: 1px solid var(--line); }
.set-fees + .set-avg.set-block {
  margin-top: var(--s-5); padding-top: 0; border-top: 1px solid var(--line);
}
.set-avg.set-block > .tablewrap { max-width: none; }

/* --- 9. ONE MEASURE FOR EVERY PROSE CARD, AND THE QUIET WORDS (5.13-5.16) */
.access-modal .access-body .price-wrap { max-width: none; }
.token-once .token-copy > .token-secret {
  flex: 1 1 auto; min-width: 0; margin: 0;
  border-color: var(--attn-line); background: var(--surface); color: var(--ink);
}
.stats .stat.anchor .stat-num { font-size: 26px; }
.health.band .card-notes .plan-basis { margin: 0; }
/* One checkbox under the management fee in the contract pop-outs: ticked,
   the fee is the figure typed and the catalog no longer re-prices it on
   save. It is a quiet control, the fee's sub-line, not a field of its own.
   Tokens only; the one rule that sets `display` leaves `[hidden]` alone. */
.override-ctl:not([hidden]) {
  display: flex; align-items: center; gap: var(--s-1); margin-top: var(--s-1);
  font-size: var(--t-sm); font-weight: 400; color: var(--ink-2); cursor: pointer;
}
.override-ctl > input { margin: 0; }
/* the New contract form's fields are a grid of flex-column labels: there the
   control is a line of its own under the Monthly fee | Posts to row */
.access-body .form-grid > label.override-ctl:not([hidden]) {
  flex-direction: row; grid-column: 1 / -1; margin: 0 0 6px;
}
.access-body .form-grid > label.override-ctl > input { align-self: auto; width: auto; }
.cp-table .cp-amount { white-space: nowrap; }
.cp-table .cp-amount input.rate-amt { width: 110px; }
.catalog-picker .cp-table { margin: 2px 0 0; }
.catalog-picker .fee-add-toggle { margin-top: 4px; }
/* the product column takes the room, the fee and the amount their fixed
   widths, every select the width of its cell */
.cp-table { table-layout: fixed; }
.cp-table thead th:nth-child(2) { width: 104px; }
.cp-table thead th:nth-child(4) { width: 132px; }
.cp-table thead th:last-child { width: 30px; }
.cp-table td select { width: 100%; max-width: none; }
/* THE ONE FEE TABLE OF A NEW CONTRACT'S PRICING STEP (SPEC §6.182). The undo
   icon sits before a typed-over amount, so the amounts stay in one column.
   Under the rows the two add links and the totals box share a row, and stack
   when the pop-out is narrow. The totals box holds the discount beside the
   figures it changes. */
.fee-amt:not([hidden]) { display: inline-flex; align-items: center; justify-content: flex-end;
  gap: var(--s-1); }
.cp-revert { color: var(--accent); }
/* the icon button's own display would show it through `hidden` */
.cp-revert[hidden] { display: none; }
.contract-panel .fee-table.fees-table { table-layout: fixed; min-width: 620px; }
.contract-panel .fee-table.fees-table thead th:nth-child(1) { width: auto; }
.contract-panel .fee-table.fees-table thead th:nth-child(2) { width: 128px; }
.contract-panel .fee-table.fees-table thead th:nth-child(3) { width: 26%; }
.contract-panel .fee-table.fees-table thead th:nth-child(4) { width: 168px; }
.contract-panel .fee-table.fees-table thead th.fee-actions-h { width: 40px; }
.fees-table td input[data-of="label"] { width: 100%; }
.fees-table .fee-unit-row th { text-align: left; font-weight: 600; }
.fees-table .fee-unit-row th .muted { display: block; font-weight: 400; }
.fees-table .fee-unit { font-weight: 600; }
.fee-foot:not([hidden]) { display: flex; flex-wrap: wrap; align-items: flex-start;
  gap: var(--s-2) var(--s-5); margin-top: var(--s-2); }
.fee-adds:not([hidden]) { flex: 1 1 200px; display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); }
.fee-totals { flex: 0 1 640px; min-width: 0; margin-left: auto; border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--s-2) var(--s-4) var(--s-1); }
.contract-panel .fee-table.fee-totals-table { table-layout: auto; margin: 0; }
.contract-panel .fee-table.fee-totals-table thead th:nth-child(1) { width: auto; }
.contract-panel .fee-table.fee-totals-table thead th:nth-child(n+2) { width: 112px; }
.fee-totals-table th[scope="row"] { text-align: left; font-weight: 500; color: var(--ink-2); }
.fee-totals-table td.num { font-weight: 600; }
.fee-totals-table tr.total > * { border-top: 1px solid var(--line); font-size: var(--t-14);
  font-weight: 700; color: var(--ink); }
.discount-in:not([hidden]) { display: inline-flex; flex-wrap: wrap; align-items: center;
  gap: var(--s-1) var(--s-2); }
.discount-in input { width: 7ch; text-align: right; font-variant-numeric: tabular-nums; }
.discount-in select { width: auto; }
.ig-sync-words > strong:first-child { color: var(--ink); font-size: var(--t-table); }
/* THE SWITCH: the kit's checkbox as a 34×20 track. The knob is the surface
   and the on track the filled accent, so it reads in both themes; the
   checkbox itself stays in the flow for the keyboard and the form. */
.sw:not([hidden]) {
  position: relative; display: inline-flex; flex: none; width: 34px; height: 20px;
  vertical-align: middle;
}
.sw > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sw > input:disabled { cursor: default; }
.sw > i:not([hidden]) {
  display: block; width: 34px; height: 20px; border-radius: var(--r-pill);
  background: var(--field-line); position: relative; transition: background .15s;
}
.sw > i::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px var(--scrim);
  transition: left .15s;
}
.sw > input:checked + i { background: var(--accent-fill); }
.sw > input:checked + i::after { left: 16px; }
.sw > input:disabled + i { opacity: .55; }
.sw > input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- 3. THE RULE IN FULL (the kit's pop-out) ----------------------------- */
.ig-pop .access-head .badge { margin-left: 8px; vertical-align: 2px; }
.ig-pop-edit label:not([hidden]) { display: inline-flex; align-items: center; gap: 8px; }
.ig-pop .access-foot > .muted { margin-right: auto; font-size: var(--t-sm); }
table.ig-rules .ig-noeval { font-size: var(--t-sm); cursor: help; }
.ig-tabs > [role="tab"][aria-selected="true"] { color: var(--accent); font-weight: 600; border-bottom-color: var(--accent); }
.ig-scope > label:not([hidden]) { display: block; margin: 4px 0; font-size: var(--t-table); }
.ig-scope > label > .muted { margin-left: 6px; font-size: var(--t-sm); }
.ig-cond > label:not([hidden]), .ig-field > label:not([hidden]) {
  display: flex; flex-direction: column; gap: 4px; align-items: stretch; margin: 8px 0;
}
.ig-refusal > p:last-child { margin-bottom: 0; }

/* ---- CONTRACT ENTRY BY TYPE (2026-11-03, SPEC §6.109): the New contract
   pop-out asks the scope of work, then "How is it priced?" — three cards that
   open one type's fields each, a status nobody has picked, the discount, and
   on the edit pop-out the fees carried from before. On the kit's tokens; no
   `--err`, no hex, `:not([hidden])` on every visible display. */
.contract-form .term-row:not([hidden]) { display: flex; flex-wrap: wrap; gap: 12px 16px;
  align-items: flex-start; }
.contract-form .term-row > label { flex: 1 1 140px; }
fieldset.status-pick, fieldset.type-body { border: 0; margin: 0; padding: 0; min-width: 0; }
.type-cards:not([hidden]) { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px; }
label.type-card:not([hidden]) { display: flex; gap: 10px; align-items: flex-start;
  flex-direction: row; }
label.type-card { border: 1px solid var(--line); border-radius: var(--r-md, 10px);
  padding: 10px 12px; background: var(--surface); cursor: pointer; font-weight: 400; }
label.type-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent); }
label.type-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
label.type-card input { margin: 2px 0 0; accent-color: var(--accent-fill); flex: none; }
label.type-card > span:not([hidden]) { display: flex; flex-direction: column; gap: 2px; }
label.type-card b { font-size: 13px; color: var(--ink); font-weight: 600; }
label.type-card .muted { font-size: 12px; line-height: 1.4; }
fieldset.type-body:not([hidden]) { display: flex; flex-direction: column; gap: 10px;
  border: 1px solid var(--line); border-radius: var(--r-md, 10px); padding: 12px 14px;
  background: var(--surface); }
fieldset.type-body .form-grid { margin: 0; }
.discount-row:not([hidden]) { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.discount-row .pct-field:not([hidden]) { display: inline-flex; align-items: center; gap: 6px; }
.discount-row .pct-field input { width: 8ch; text-align: right; font-variant-numeric: tabular-nums; }
.discount-row .discount-note { flex: 1 1 220px; font-size: 12px; align-self: center; }
.pricing-block .fee-rows-head .badge { margin-left: 6px; }
.pricing-block details.type-change { margin: 6px 0 10px; }
.pricing-block details.type-change summary { cursor: pointer; width: max-content; }
.contract-panel .carried { border: 1px dashed var(--line); border-radius: var(--r-md, 10px);
  padding: 10px 12px; font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.contract-panel .carried b { color: var(--ink); font-weight: 600; }
.contract-panel .carried .check-row:not([hidden]) { display: flex; gap: 6px; align-items: center;
  margin-top: 6px; }
.mf-table input[name="mf_label"] { width: 100%; }
/* a type's first block opens the box it sits in: no rule, no gap above it */
.contract-panel fieldset.type-body > .fee-block:first-of-type { margin-top: 0; padding-top: 0;
  border-top: 0; }
.contract-panel fieldset.type-body > .fee-block + .fee-block { margin-top: 12px; padding-top: 12px; }

   A group is a heading that sorts the products by type and carries no price.
   Its band keeps the group-row ground, but the NAME reads in ink at the body
   size (it is the row a person scans for), the count and description quiet
   beside it. The chevron is the fold's state; the button is the whole name. */
.catalog-table tr.pg-head td { background: var(--surface-2); height: 42px; }
.catalog-table tr.pg-head:hover td { background: var(--surface-2); }
.catalog-table tr.pg-head .pg-title:not([hidden]) { display: inline-flex; align-items: center;
  gap: 10px; flex-wrap: wrap; white-space: normal; }
.catalog-table .pg-toggle:not([hidden]) { display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; padding: 3px 6px 3px 2px; margin-left: -4px;
  border-radius: var(--r-sm, 6px); cursor: pointer; color: var(--ink);
  font: 700 13.5px/1.3 var(--sans); letter-spacing: 0; }
.catalog-table .pg-toggle:hover { background: var(--track); }
.catalog-table .pg-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.catalog-table .pg-chev:not([hidden]) { display: inline-flex; color: var(--ink-2); }
.catalog-table tr.pg-head .pg-chev-shut,
.catalog-table tr.pg-head.pg-shut .pg-chev-open { display: none; }
.catalog-table tr.pg-head.pg-shut .pg-chev-shut:not([hidden]) { display: inline-flex; }
.catalog-table .pg-count { color: var(--ink-2); font-weight: 500; font-size: 12.5px; }
.catalog-table .pg-desc { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.catalog-table .pg-noprice { color: var(--muted); font-weight: 400; font-size: 12px; }
.catalog-table tr[hidden] { display: none; }
.catalog-table tr.pg-row > td:first-child { padding-left: 46px; }
.catalog-table tr.pg-row > td:first-child::before { left: 30px; }
.pg-toolbar:not([hidden]) { margin: 0 0 12px; padding: 0 20px; }
.pg-toolbar .pg-tools:not([hidden]) { display: inline-flex; align-items: center; gap: 14px; }
.pg-fields:not([hidden]) { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: flex-end;
  margin-bottom: 4px; }
.pg-members { border: 0; margin: 0; padding: 0; }
.pg-checklist:not([hidden]) { display: flex; flex-direction: column; max-height: 300px;
  overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md, 8px); }
.pg-checklist label:not([hidden]) { display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-top: 1px solid var(--line-soft); cursor: pointer; }
.pg-checklist label:first-child { border-top: 0; }
.pg-checklist label .muted { margin-left: auto; font-size: 12px; }
/* ---- CONTRACT ENTRY, TIGHTENED (owner request 2026-11-03: "too much
   wasted space"). Spacing only, scoped to the contract pop-outs: a block's
   description runs on its heading's line, hints sit close under their
   field, the status and type cards are one line, a table with no rows shows
   only its "+ Add" link, and the blocks stand 10px apart instead of 40px.
   No word, no hook and no behaviour moves. On the kit's tokens; no `--err`,
   no hex, `:not([hidden])` on every visible display. */
.contract-panel .contract-steps { padding-top: 6px; padding-bottom: 6px; }
.contract-panel .stage.form-grid { row-gap: 2px; }
.contract-panel .form-section { margin-top: 8px; margin-bottom: 0; }
.contract-panel .stage.form-grid > label,
.contract-panel fieldset.type-body label { margin-top: 2px; margin-bottom: 2px; }
.contract-panel label > .muted { font-size: 11.5px; line-height: 15px; }
.contract-panel .fee-block { margin-top: 10px; padding-top: 10px; }
.contract-panel fieldset.type-body > .fee-block + .fee-block { margin-top: 6px; padding-top: 8px; }
.contract-panel .fee-rows-head { margin-bottom: 4px; }
.contract-panel .fee-table td { padding-top: 3px; padding-bottom: 3px; }
.contract-panel table.plan-table td { padding-top: 3px; padding-bottom: 3px; }
/* the grid's bare `td.num input` rule reaches the pop-outs' amount fields;
   overridden here by specificity, never edited (family 5) */
.contract-panel :where(.fee-table, .cp-table) td.num input.rate-amt {
  height: var(--ctl-h-sm); min-height: var(--ctl-h-sm); }
.contract-panel .tablewrap:has(tbody[data-row-body]:empty) { display: none; }
.contract-panel fieldset.status-pick:not([hidden]) { gap: 6px; }
.contract-panel fieldset.status-pick legend { margin-bottom: 4px; }
.contract-panel .type-cards:not([hidden]) { gap: 6px; }
.contract-panel label.type-card { padding: 6px 10px; }
.contract-panel label.type-card > span:not([hidden]) { flex-direction: row; flex-wrap: wrap;
  align-items: baseline; column-gap: 8px; row-gap: 0; }
.contract-panel label.type-card .muted { font-size: 11.5px; }
.contract-panel fieldset.type-body:not([hidden]) { padding: 8px 12px 10px; gap: 6px; }
.contract-panel .discount-row:not([hidden]) { row-gap: 4px; margin-top: 2px; }
.contract-panel .unit-pricing .muted.span2 { margin: 0; }
.contract-panel .hdr-name { margin-top: 2px; }
.contract-panel .ctrl-row { margin-top: 4px; margin-bottom: 4px; }
.contract-panel .review-stage table :where(td, th) { padding-top: 5px; padding-bottom: 5px; }
/* a product line's amount, and the undo icon before it when its price was
   typed (SPEC §6.182; the "catalog" tag and its words are gone), on one row */
.contract-panel .cp-table td.cp-amount { white-space: normal; }
.contract-panel .cp-table td.cp-amount input.rate-amt:not([hidden]) { display: inline-block; width: 7.5rem; }
.contract-panel .plan-block[data-plan="staff"] .plan-table thead th:nth-child(3) { width: 116px; }
.contract-panel .plan-table td select.pct-of { margin-top: 4px; }
.contract-panel .plan-table td select.pct-of[hidden] { display: none; }
.plan-freq label select { width: auto; min-width: 240px; }
.plan-freq .plan-note { margin: 6px 0 0; }

@media (hover: none) {
/* --- THE STATUS CONTROL SHOWS ITS CARET WHERE NOTHING HOVERS ---------- */
/* The caret comes on hover and focus; a touch screen gives neither, so on
   a phone nothing said the state could be changed. Where there is no
   hover the caret is always drawn. */
  .contracts-table td:has(> .status-select)::after { opacity: 1; }
}

@media (pointer: coarse) {
  .contracts-table td.row-actions > .icon-btn:last-child { margin-right: calc(var(--ctl-h-sm) + 4px); }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .contracts-table td.col-date { color: var(--ink-2); }
}

/* --- A DATE IS QUIET IN BOTH THEMES ----------------------------------- */
/* The brief asked for `--ink-2` in dark because the research saw link
   lavender; the baseline's dark dates were already `--muted`, and at
   `--ink-2` a month read brighter than every other secondary figure on the
   row. `--muted` in both themes, like the sub-lines. */
:root[data-theme="dark"] .contracts-table td.col-date { color: var(--muted); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .contracts-table > tfoot > tr.subtotal > th[scope="row"]:only-child,
  :root:not([data-theme="light"]) .contracts-table > tfoot > tr.subtotal:hover > th[scope="row"]:only-child {
    background: var(--surface);
  }
  :root:not([data-theme="light"]) .contracts-table td.col-date { color: var(--muted); }
}

@media (width <= 1300px) {
  /* all three money columns and the dates do not fit beside a name here */
  .contracts-table:has(> thead th.num ~ th.num ~ th.num) { --bk-dates: 0rem; }
  .contracts-table:has(> thead th.num ~ th.num ~ th.num) > :is(thead, tbody, tfoot) > tr > :is(th, td).col-date {
    width: 0; padding: 0; border-left: 0; border-right: 0;
    overflow: hidden; visibility: hidden;
  }
}

@media (max-width: 1240px) {
  .several-rows thead { display: none; }
  .several-rows, .several-rows tbody, .several-rows tfoot { display: block; width: 100%; }
  .several-rows td.num:not([hidden]) { text-align: left; }
  .several-rows td[data-col="count"]:not([hidden]),
  .several-rows td[data-col="rate"]:not([hidden]) { grid-column: span 3; }
  .several-rows td[data-col="count"] input, .several-rows td[data-col="rate"] input { max-width: none; }
  .several-rows td.num[data-several-figure]:not([hidden]),
  .several-rows tr.total > td.num:not([hidden]) { grid-column: span 2; }
  .several-rows td.row-actions:not([hidden]) {
    position: absolute; top: var(--s-2); right: var(--s-2); grid-column: auto;
  }
  .several-rows tr.total > td:empty { display: none; }
  .several-rows .several-key:not([hidden]) {
    display: block; margin: 0 0 var(--s-1); font-size: var(--t-13); color: var(--muted);
    white-space: normal;
  }
  .several-rows tr.several-row-refusal:not([hidden]) { display: block; border: 0; padding: 0; }
}

@media (width <= 1100px) {
/* START AND END FOLD at 1100px and under (lead decision): the term is in
   the total's own sub-line, and the decision columns keep the width */
  .contracts-table { --bk-dates: 0rem; }
}

@media (pointer: coarse) {
  .contracts-table { --bk-act-w: calc(2 * var(--ctl-h-sm) + 24px); }
}

@media (width <= 1100px) {
  .contracts-table > :is(thead, tbody, tfoot) > tr > :is(th, td).col-date {
    width: 0; padding: 0; border-left: 0; border-right: 0;
    overflow: hidden; visibility: hidden;
  }
}

.contracts-table > tbody > tr > :is(td, th[scope="row"]),
.contracts-table > tfoot > tr > :is(td, th) {
  line-height: 18px; padding-top: 6px; padding-bottom: 6px;
}
.contract-steps li > button span {
  display: inline; margin-left: 6px;
  font-size: var(--t-label); font-weight: 400; color: var(--muted);
}

@media (max-width: 860px) {
/* the rail holds its three names and their purposes down to a 860px window;
   below that the purposes fold away rather than end in three ellipses */
  .contract-steps li > button span { display: none; }
}

@media (width <= 700px) {
  .book-facts { margin-bottom: var(--s-3); }
  /* the frozen name: its own 10rem; a money column is 11rem, so a total's
     "24 months of management" is one line under its figure */
  .contracts-table { --bk-name-min: 10rem; --bk-money-min: 11rem; }
  .contracts-table > tbody > tr.contract-row > th[scope="row"],
  .contracts-table > thead > tr > th:first-child {
    position: sticky; left: 0; z-index: 1;
    box-shadow: 1px 0 0 var(--line);
  }
  .contracts-table > tbody > tr.contract-row > th[scope="row"] { background: var(--surface); }
  .contracts-table > thead > tr > th:first-child { z-index: 2; background: var(--sum-bg); }

/* --- THE FROZEN COLUMN HAS AN EDGE ------------------------------------ */
/* Its 1px outer shadow painted under the neighbouring cell; an inset one
   survives, so the names keep a line against the figures sliding under
   them. */
  .contracts-table > tbody > tr.contract-row > th[scope="row"],
  .contracts-table > thead > tr > th:first-child {
    box-shadow: inset -1px 0 0 var(--line);
  }
}

@media (max-width: 640px) {
  .plan-split { grid-template-columns: minmax(0, 1fr); }
  .plan-sent-res { flex: 1 1 100%; text-align: right; }
  /* WHILE THE CONTRACT IS NOT CANCELED the third column holds one em dash,
     so the two that hold a date take the room; a canceled contract shows a
     third date there and the three columns go back to equal. */
  .contract-panel .dates-table:has(.cm-wrap[hidden]) :is(th, td):nth-child(3) {
    width: 18%;
  }
}

.book-facts .list-table td.row-actions .icon-btn.del { width: 24px; height: 24px; color: var(--ink-2); }

@media (max-width: 640px) {
  .contract-panel .dates-table .mp { flex-wrap: wrap; gap: var(--s-1); }
  .contract-panel .dates-table .mp select { flex: 1 1 100%; }
  .fx-panel .fee-list {
    display: flex; flex-direction: column; align-items: stretch; gap: 10px;
  }
  .fx-panel .fee-list .fee-row {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    column-gap: var(--s-2); align-items: baseline;
  }
  .fx-panel .fee-label { grid-column: 1 / -1; }
  .fx-panel .fee-amt { text-align: left; }
  .contract-steps li:not(:last-child)::after { flex-basis: 8px; min-width: 8px; margin: 0 6px; }
  .contract-panel .seg { flex-direction: column; }
  .contract-panel .form-grid label > input.month-input { max-width: none; }
  /* two rows fit the sheet; they do not scroll */
  .contract-panel .fee-table.monthly-fees thead th:nth-child(2) { width: 92px; }
  .contract-panel .fee-table.monthly-fees thead th:nth-child(3) { width: 42%; }
  .contract-panel .review-table th[scope="row"] { width: 38%; }
  /* a contract's status is a control of its own width, not a column's */
  #main table.contracts-table > tbody > tr > td > .status-select { width: auto; min-width: 0; max-width: 100%; }
  /* a contract's dates take a line of their own, start to end, before its status */
  #main table.contracts-table > tbody > tr > td.col-date { order: 3; }
  #main table.contracts-table > tbody > tr > td.col-date { white-space: nowrap; }
  #main table.contracts-table > tbody > tr > td.col-date + td.col-date::before { content: "\2013\00a0"; }
}

@media (width <= 640px) {
  .access-body .rate-add.kpi-step { gap: 6px 8px; }
}

@media screen and (max-width: 640px) {
  .list-toolbar select, .ledger-filter select,
  .audit-filter select { flex: 1 1 100%; max-width: none; }
}

.several-start select { width: 100%; }
/* the phone's menu is a select: the kit's field */
.settings-menu-mobile select {
  min-height: var(--ctl-h); padding: 0 11px; font-size: var(--t-table);
  border: 1px solid var(--field-line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink);
}
.pc-table select { max-width: 220px; }
.contract-panel :where(.fee-table, .cp-table) td :where(input:not([type="hidden"]):not([type="checkbox"]), select) {
  height: var(--ctl-h-sm); min-height: var(--ctl-h-sm); padding-top: 0; padding-bottom: 0; }

@media (width > 640px) {
/* the contract type's helper takes two columns and the select keeps the
   width of one; the Active / Projected choice sits beside "Posts to" */
  .contract-panel .form-grid > label:has(> select.contract-type) { grid-column: span 2; }
  .contract-panel .form-grid > label:has(> select.contract-type) > select {
    max-width: calc(50% - 10px);
  }
}

.contract-panel .access-body > label:has(> select.contract-type) > select { max-width: 520px; }

@media (max-width: 640px) {
  .contract-panel .access-body > label:has(> select.contract-type) > select { max-width: none; }
}

@media (width > 640px) {
  .contract-panel .form-grid > .seg { grid-column: span 2; align-self: end; }
  /* a closed disclosure is one cell, so the two sit on one line */
  .contract-panel .form-grid > .fee-details:not([open]) { grid-column: auto; }

/* --- THE CONTRACT TYPE FILLS THE SPAN IT WAS GIVEN -------------------- */
/* Section B spanned the field over two columns for its helper sentence but
   capped the select at one, leaving a hole beside it. The select fills the
   span: its longest option ("Per unit — fleet, commercial, residential: a
   metric × a rate × how often") is the one control on the form that
   wants the width. */
  .contract-panel .form-grid > label:has(> select.contract-type) > select { max-width: none; }
}

/* ===== THE LEDGER AND ITS IMPORTS [ledger] =====
   The register, its toolbar and table, the journal, the import and its steps.
   --- kept from an old banner ---
   THE REGISTER · A · the page, the toolbar, the table (2026-09-23)
   --- kept from an old banner ---
   THE LEDGER POP-OUTS · B · journal, import, the steps and the summary (2026-09-23)
   --- kept from an old banner ---
   THE LEDGER · C · after the review (2026-09-23)
   --- kept from an old banner ---
   THE LEDGER · C2 · after the second look (2026-09-23)
*/

.list-table td strong + .gl { margin-left: 7px; }
.gl-recon section { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  background: var(--surface); }
.gl-recon h4 { margin: 0 0 4px; font-size: 13px; display: flex; align-items: center; gap: 8px; }

/* author display rules on table rows would beat the UA's [hidden] — the same
   gotcha as the jump palette; re-assert for every chip-filtered row */
.contract-row[hidden], .client-row[hidden], .ledger-row[hidden] { display: none; }
.ledger-table th.ledger-desc { text-align: left; font-weight: 500; }
.ledger-table tr.group-row th.ledger-desc { font-weight: 600; }
/* a journal leg is indented under its band, and its ACCOUNT is the row header
   (review 2026-09-07, N9). The leg keeps an empty dated cell, so the indent is
   measured from the band's own description column (2026-09-08, 06-N10). */
.ledger-table tr.child-row th.j-account { padding-left: 30px; }
.ledger-table th.j-account { text-align: left; font-weight: 500; }

/* N1 — the register discloses its rounding, at note weight: a tfoot `td`
   otherwise inherits the total row's 700 and its ink rule. */
.ledger-table tfoot tr.ledger-method td { font-weight: 400; font-size: 11.5px;
  color: var(--muted); border-top: 0; background: var(--surface); }
.ledger-table tfoot tr.ledger-imbalance td { border-top: 0; }
/* N10 — a journal leg starts in the DESCRIPTION column, so its empty dated
   cell must not take the family's child indent */
.ledger-table tr.child-row > td.leg-date { padding-left: 7px; }
/* AN ENTRY'S DETAIL IS A SIDE PANEL (SPEC 6.143): its pop-out stands at the
   right edge, full height, its acts in the foot beside Save */
.access-modal.ledger-side { justify-content: flex-end; align-items: stretch; }
.ledger-table button.rep-toggle::before { content: "\25b8"; display: inline-block;
  width: 12px; color: var(--muted); }
.ledger-table tr.ledger-repeat.open button.rep-toggle::before { content: "\25be"; }
td.vcov .gl { display: block; }
table.gl-codes input[type="text"] { width: 100%; min-width: 180px; }
/* Apply / Search sit at the row's height, as a secondary control */
.ledger-filter button, .audit-filter button {
  padding: 0 14px; border-radius: var(--r-md);
}
.page-head.suite + details.page-note[open] > summary::before,
#imported-charges[open] > summary::before,
:is(.gl-undo, .gl-clear)[open] > summary::before { transform: rotate(45deg); margin-top: -3px; }
.ledger-filter .lf-date > .muted {
  font: 600 var(--t-label)/14px var(--sans); letter-spacing: .01em; color: var(--muted);
}
.ledger-filter input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .7; }
.ledger-filter input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
.ledger-filter button[type="submit"] {
  background: var(--accent-soft); color: var(--accent); border-color: transparent;
}
.ledger-filter > a.linklike {
  align-self: flex-end; line-height: var(--ctl-h);
  font-size: var(--t-sm); font-weight: 600;
}

/* --- 3. THE SCOPE STRIP (Origin, Mercury) -----------------------------------
   The four facts a reader opened the register for — the range, the count,
   what the two columns add to — were one 12.5px line run together with
   interpuncts. They are a strip now: the range the anchor, then the count
   and the two totals as figures a step up, each fact behind a hairline, and
   "show the whole year" a quiet control at the right end. The words and
   their order are exactly the sentence's; the template wraps each phrase,
   and the interpuncts between them stay in the text (a screen reader still
   reads one sentence) at zero size, since the hairlines now do their job. */

/* --- 4. THE TABLE READS AS THE STATEMENT'S KIN ------------------------------
   `table.dt.ledger-table` outranks the list-table family's band rules (one
   of which, `table.dt tbody tr.group-row:hover td`, turned a journal's band
   white under the pointer) without restating any of them. */

/* THE SHEET SITS ON WHOLE PIXELS (family 4's lesson): the header's 11.5px
   x 1.3 made it 32.94px tall and every row under it sat at .94 of a pixel */
.ledger-table > thead > tr > th { line-height: 15px; }
/* A REPEATED ROW'S RANGE BREAKS, where it has to, between its two dates and
   nowhere else (a wrapper per date): where the register has the room — 1440
   with the rail open, a repeat opened or not — it is one line, and where it
   has not, the widest date in the column gives way before a description
   does. The date column also gives up 4px of its right padding (the
   description's own 10px is the gap). */
.ledger-table td.ledger-date .ld-day { white-space: nowrap; }
table.dt.ledger-table tr.ledger-repeat > td.ledger-date { white-space: normal; }
table.dt.ledger-table td.ledger-date { padding-right: 6px; }
/* one date column, one look, whatever the row is: muted, never a heading */
table.dt.ledger-table tr.group-row > td.ledger-date {
  font: 400 var(--t-table)/18px var(--sans); color: var(--muted);
}
table.dt.ledger-table tbody tr.ledger-journal:hover > :is(td, th),
table.dt.ledger-table tbody tr.child-row[data-journal]:hover > :is(td, th) { background: var(--track); }
table.dt.ledger-table tr:is(.ledger-journal, .child-row[data-journal]) > :first-child { position: relative; }
table.dt.ledger-table tr:is(.ledger-journal, .child-row[data-journal]) > :first-child::before {
  content: ""; position: absolute; left: 1px; top: 0; bottom: -1px; width: 2px;
  background: var(--accent-line); pointer-events: none;
}
table.dt.ledger-table tr.ledger-journal > th.ledger-desc {
  font: 600 var(--t-table)/18px var(--sans); color: var(--ink);
}
table.dt.ledger-table tr.ledger-journal > td.num {
  font: 600 var(--t-table)/18px var(--sans); color: var(--ink); font-variant-numeric: tabular-nums;
}
table.dt.ledger-table tr.child-row[data-journal] > th.j-account { font-weight: 400; color: var(--ink-2); }
table.dt.ledger-table tr.child-row[data-journal] > td.num { font-weight: 400; color: var(--ink-2); }
table.dt.ledger-table tr.ledger-repeat > td.ledger-date { color: var(--muted); }
table.dt.ledger-table tr.ledger-repeat > td.num { font-weight: 600; font-variant-numeric: tabular-nums; }
table.dt.ledger-table tbody tr.ledger-repeat:hover > :is(td, th) { background: var(--surface-2); }
table.dt.ledger-table tr.ledger-repeat > th.ledger-desc { position: relative; font-weight: 500; }
.ledger-table button.rep-toggle { color: var(--ink); font-weight: 500; }
.ledger-table button.rep-toggle::before {
  content: ""; display: inline-block; width: 16px; height: 16px;
  margin: 0 4px 0 -3px; vertical-align: -3px; background: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  transition: transform .12s ease;
}
.ledger-table tr.ledger-repeat.open button.rep-toggle::before { content: ""; transform: rotate(90deg); }
.ledger-table button.rep-toggle::after { content: ""; position: absolute; inset: 0; }
.ledger-table tr.ledger-repeat:hover button.rep-toggle { color: var(--accent); }
.ledger-table tr.ledger-repeat:hover button.rep-toggle::before,
.ledger-table button.rep-toggle:focus-visible::before { background: var(--accent); }
.ledger-table tr.ledger-repeat .rep-n { margin-left: 4px; }
/* the rows a repeat opens are its parts: the band says the name once at
   13px, each posting under it repeats it a step quieter, the way a
   journal's legs sit under their band */
table.dt.ledger-table tr.rep-child > th.ledger-desc { font-size: var(--t-sm); font-weight: 400; color: var(--ink-2); }
/* the kind is a badge in a narrow column: it needs no more than the badge */
.ledger-table > tbody > tr > td:has(> .badge.kind:only-child) { padding-left: 8px; padding-right: 8px; }

/* A REAL GUTTER BETWEEN THE TWO MONEY COLUMNS (Xero, QuickBooks): a band's
   $2,400 / $2,400 nearly touched, and the em dash sat against the figure it
   is not. The absent side is a step quieter than any figure. */
.ledger-table td.num + td.num, .ledger-table th.num + th.num { padding-left: 28px; }
/* an Entry is most of the register and tells a reader nothing to act on: a
   step quieter than a Journal — the kind's outline, not its tint */
.ledger-table .badge.kind.kind-entry {
  background: transparent; color: var(--muted); border-color: var(--line);
}
.ledger-table tfoot tr > td:last-child:empty { border-top-color: transparent; background: var(--surface); }
/* the band's own `font` shorthand (12.5px) outranked a plain zero here and
   put the markup's whitespace between the icons of a journal's band */
table.dt.ledger-table td.row-actions { width: 80px; padding: 0 8px 0 4px; font-size: 0; }
.ledger-table td.row-actions .icon-btn {
  width: 24px; height: 24px; padding: 0; vertical-align: middle;
  border: 1px solid transparent; border-radius: var(--r-sm);
  color: var(--muted-2); font-size: 15px;
}
.ledger-table td.row-actions .icon-btn + .icon-btn { margin-left: 4px; }
.ledger-table tr:is(:hover, :focus-within) > td.row-actions .icon-btn { color: var(--ink); }
.ledger-table td.row-actions .icon-btn:hover {
  color: var(--accent); background: var(--accent-soft); border-color: transparent;
}
.ledger-table td.row-actions .icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* --- 5. THE EMPTY STATE DOES THE WORK (YNAB, Origin) ------------------------
   The register opens on the current month, which is often empty: one grey
   line in a table header and the two controls that fix it 190px away. The
   sentence is centred with air, its lead a step up, and its two phrases
   open the two pop-outs they name. The search-miss sentence (verbatim) and
   the chips' "Nothing of this type" row take the same place. */
table.dt.ledger-table tr.empty > td,
table.dt.ledger-table tr#ledger-filter-empty > td {
  height: auto; padding: 36px 16px 40px; text-align: center;
  font-size: var(--t-table); line-height: 20px; color: var(--ink-2); background: var(--surface);
}
table.dt.ledger-table tbody tr.empty:hover > td { background: var(--surface); }
.ledger-table tr.empty .empty-lead {
  display: block; margin-bottom: var(--s-1);
  font-size: var(--t-14); font-weight: 600; color: var(--ink);
}
.ledger-table tr.empty .linklike {
  -webkit-appearance: none; appearance: none; margin: 0; padding: 0;
  border: 0; background: none; border-radius: var(--r-sm);
  font: inherit; font-weight: 600; color: var(--accent); cursor: pointer;
}
.ledger-table tr.empty .linklike:hover { text-decoration: underline; }
.ledger-pager > .lp-count { font-weight: 600; color: var(--ink-2); }
.ledger-pager > a.lp-step:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.ledger-pager > .lp-note {
  flex: 1 1 100%; font-size: 12px; overflow: clip;
  /* "· " measures .557em in Inter at this size (measured in Edge) */
  text-indent: -.557em;
}

/* --- 6b. THE IMPORTED CHARGES ON RECORD (legacy) -----------------------------
   On the list-table grammar the register already speaks: a heading, not a
   second page title, the assign bar's fields on the kit's edge with their
   labels above them, and room to wrap on a narrow screen. `#assign-form`
   and `#check-all` are where they were. */
#imported-charges > h3 { font: 650 var(--t-table)/20px var(--sans); color: var(--ink); }
#imported-charges .list-table thead th:first-child { width: 36px; }
/* its date is the register's date: muted, tabular, on one line */
#imported-charges .list-table tbody td:nth-child(2) {
  white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums;
}

/* --- 7. DARK -----------------------------------------------------------------
   THE CARD KEEPS ITS EDGE. `.attest-table` declares a `--line` border, but
   `table.dt` collapses the borders and the table's own edge never painted:
   in dark the surface met the ground with nothing between them (measured:
   the pixel column goes from the ground straight to the surface). An inset
   outline draws the card's hairline over the cells' grounds, inside the
   scroller that would clip a shadow ring, and follows the radius.
   The placeholder was `--muted-2` on the surface, 3.3:1: a step up. The
   empty state is `--ink-2` in both themes (above). */
table.dt.ledger-table { outline: 1px solid var(--line); outline-offset: -1px; }
:root[data-theme="dark"] .ledger-filter .list-search::placeholder { color: var(--muted); }

/* --- 8. THE TWO GUARDED DISCLOSURES -----------------------------------------
   "Imports on record · remove one" (in the import pop-out) and "Everything
   on the ledger" (`.gl-clear`, under the register once it lands) share one
   list: the summary above, the form on the kit's field and secondary
   button, the consequences 12.5px muted. Zero specificity, so the pop-out's
   own layout (section B) is free to arrange what is inside it. */
/* on the page, the clear control opens under what precedes it (the pager
   or the register) with the air the legacy block has */
:where(.gl-clear) { margin: var(--s-4) 0 0; }
:where(.gl-undo-form, .gl-clear-form):where(:not([hidden])) {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  gap: var(--s-2) var(--s-3); margin-top: var(--s-3);
}
:where(.gl-undo, .gl-clear) :where(label):where(:not([hidden])) {
  display: inline-block; font: 550 var(--t-sm)/16px var(--sans); color: var(--ink-2);
}
:where(.gl-undo, .gl-clear) :where(label) > :where(input, select) {
  display: block; margin-top: var(--s-1);
}
:where(.gl-undo, .gl-clear) :where(input[type="text"], input:not([type]), select) {
  min-height: var(--ctl-h); padding: 0 11px;
  font: inherit; font-size: var(--t-table); font-weight: 400;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--field-line); border-radius: var(--r-md);
}
:where(.gl-undo, .gl-clear) :where(input[type="text"], input:not([type]), select):where(:hover) {
  border-color: var(--muted-2);
}
:where(.gl-undo, .gl-clear) :where(input[type="text"], input:not([type]), select):where(:focus) {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
:where(.gl-undo, .gl-clear) :where(button:not([class])) {
  min-height: var(--ctl-h); padding: 0 14px; border-radius: var(--r-md);
  font: inherit; font-size: var(--t-table); font-weight: 600; cursor: pointer;
  background: var(--surface); border: 1px solid var(--field-line); color: var(--ink);
}
:where(.gl-undo, .gl-clear) :where(button:not([class])):where(:hover) {
  border-color: var(--accent); color: var(--accent);
}
/* "Start over" is the quiet role at the control height, left of the primary */
.access-body .gl-foot > a.linklike {
  order: -1; display: inline-flex; align-items: center; min-height: var(--ctl-h);
  padding: 0 10px; border-radius: var(--r-md);
  font-size: var(--t-table); font-weight: 600; text-decoration: none;
}
.access-body .gl-foot > a.linklike:hover { background: var(--surface-2); text-decoration: none; }
.access-body > form.gl-form > label:not(.span2) { flex: 1 1 calc(50% - 10px); }
/* the AMOUNT is the anchor figure: a step up, tabular, set to the right */
.gl-form > label.gl-anchor > input {
  font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums;
  text-align: right;
}
.gl-form > label.gl-anchor > input::placeholder { font-weight: 500; }
/* DEBIT and CREDIT are one block of two rows, each labelled by its own label */
.gl-form > .gl-pair:not([hidden]) {
  display: grid; row-gap: 8px; margin: 9px 0;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface-2);
}
.gl-form > .gl-pair > label > select { width: 100%; min-width: 0; max-width: 100%; }
/* the rare field, folded: a quiet disclosure with the kit's CSS chevron */
.gl-form > details.gl-repeat { margin: 2px 0 4px; }
.gl-form > details.gl-repeat > summary::-webkit-details-marker { display: none; }
.gl-form > details.gl-repeat > summary::before {
  content: ""; flex: none; width: 5px; height: 5px; margin: 0 1px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
}
.gl-form > details.gl-repeat[open] > summary::before { transform: rotate(45deg); margin-top: -3px; }
.gl-form > details.gl-repeat > summary:hover { color: var(--accent); background: var(--surface-2); }
.gl-form > details.gl-repeat > .mp { margin-top: 6px; max-width: 340px; }
.gl-form > details.gl-repeat > .mp > select { flex: 1 1 0; min-width: 0; }
.gl-form > p.muted strong { font-weight: 600; color: var(--ink-2); }
#modal-gl-import .access-body > .gl-about { order: 1; }
#modal-gl-import .access-body > .gl-undo { order: 2; }
#modal-gl-import .access-body > form > .gl-foot { order: 3; }
#modal-gl-import .gl-steps li::before {
  counter-increment: gl-step; content: counter(gl-step);
  display: grid; place-items: center; box-sizing: border-box;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--field-line); color: var(--muted);
  font-size: 11.5px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums;
}
#modal-gl-import .gl-steps li:not(:last-child)::after {
  content: ""; width: 36px; height: 1px; margin: 0 6px; background: var(--line);
}
#modal-gl-import .gl-steps li.active::before {
  background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent);
}
#modal-gl-import .gl-steps li.done::before {
  background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent);
}
#modal-gl-import .gl-steps li.done::after { background: var(--accent-line); }
#modal-gl-import .access-body > p.gl-about {
  max-width: 78ch; font-size: var(--t-sm); line-height: 19px; color: var(--muted);
}
#modal-gl-import .access-body > p.gl-about:not(.gl-about + .gl-about) { padding-top: 6px; }
#modal-gl-import table.gl-map th:nth-child(1) { width: 44%; }
#modal-gl-import table.gl-map th:nth-child(2) { width: 32%; }
#modal-gl-import table.gl-map td { padding-top: 9px; padding-bottom: 9px; line-height: 18px; }
#modal-gl-import table.gl-map td > strong { font-weight: 600; color: var(--ink); }
#modal-gl-import table.gl-map td > .gl {
  display: block; margin: 2px 0 0; font-size: 12px; line-height: 16px; color: var(--muted);
}
#modal-gl-import table.gl-map td.mono { font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
#modal-gl-import details.gl-preview > summary::-webkit-details-marker { display: none; }
#modal-gl-import details.gl-preview > summary::before {
  content: ""; flex: none; width: 5px; height: 5px; margin: 0 1px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
}
#modal-gl-import details.gl-preview[open] > summary::before { transform: rotate(45deg); margin-top: -3px; }
#modal-gl-import details.gl-preview > div {
  padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-md);
}
#modal-gl-import .gl-codes-card > * { grid-column: 1 / -1; }
#modal-gl-import .gl-codes-card > .gl-codes-h {
  grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: 8px;
  margin: 0; font-size: var(--t-14); font-weight: 650; line-height: 20px; color: var(--ink);
}
#modal-gl-import .gl-codes-card > .gl-recon-hint {
  margin: 4px 0 0; max-width: 78ch; font-size: var(--t-sm); line-height: 18px; color: var(--muted);
}
#modal-gl-import .gl-codes-card > p.gl-recon-hint:has(#gl-codes-all) {
  grid-column: 2; grid-row: 1; margin: 0; max-width: none;
}
#modal-gl-import .gl-codes-card > p.gl-recon-hint:has(#gl-codes-all) > label {
  display: flex; flex-direction: row; align-items: center; gap: 8px; white-space: nowrap;
  font-size: var(--t-sm); font-weight: 600; color: var(--ink-2);
}
#modal-gl-import #gl-codes-all {
  width: auto; min-width: 11rem; min-height: var(--ctl-h-sm); padding: 0 8px;
  font-size: var(--t-sm); border-radius: var(--r-sm);
}
#modal-gl-import .gl-codes-card > .tablewrap { margin: 12px -16px 0; }
#modal-gl-import .gl-codes-card table.gl-codes {
  border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none;
}
#modal-gl-import .gl-codes-card table.gl-codes :is(th, td):first-child { padding-left: 16px; }
#modal-gl-import .gl-codes-card table.gl-codes :is(th, td):last-child { padding-right: 16px; }
#modal-gl-import .gl-codes-card table.gl-codes th[scope="row"].mono {
  font-size: 12px; font-weight: 500; color: var(--ink-2);
}

/* --- 6. "IMPORTS ON RECORD" IS A GUARDED SECTION AT THE FOOT (Pipedrive) --
   Under a hairline, its table with its headings, then the choice, the typed
   word and the act on one row, the consequences under them. The labels
   hold their words on one line: the kit's stacked label split
   "Type remove to confirm" into three flex items. */
#modal-gl-import .access-body > .gl-undo {
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line);
}
#modal-gl-import .gl-undo > .tablewrap { margin-left: 0; margin-right: 0; }
#modal-gl-import .gl-undo-form > label:not([hidden]) { display: block; }
#modal-gl-import .gl-undo-form > label:first-of-type { flex: 1 1 280px; min-width: 0; }
#modal-gl-import .gl-undo-form > label:nth-of-type(2) { flex: 0 1 220px; min-width: 0; }
#modal-gl-import .gl-undo > .gl-recon-hint { max-width: 78ch; margin-top: 10px; }
/* each block is an ITEM card: its heading and count, the sentence, the
   table on the list-table grammar */
.gl-recon { gap: 12px; }
.gl-recon > section {
  min-width: 0; padding: 14px 16px; overflow-x: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
}
.gl-recon h4 {
  margin: 0 0 4px; font-size: var(--t-14); font-weight: 650; line-height: 20px;
  letter-spacing: -.01em; color: var(--ink);
}
/* a count of things to look at is ATTENTION, never a loss: the product's
   attention pair (the legacy `--warn` ink measured under 4:1 on its ground) */
.gl-recon-n {
  display: inline-block; padding: 0 7px; border-radius: var(--r-pill);
  background: var(--attn-bg); color: var(--attn-ink);
  font-size: var(--t-label); font-weight: 650; line-height: 18px;
  font-variant-numeric: tabular-nums;
}
/* the small tables (the reconciliation, the preview, the imports on record):
   11.5px sans headers, 13px body, figures tabular, a row header in ink */
.gl-recon-tbl { font-size: var(--t-table); }
.gl-recon-tbl tbody th { text-align: left; font-weight: 500; color: var(--ink); }
.gl-recon-tbl tbody tr:last-child :is(td, th) { border-bottom: 0; }
.gl-recon-tbl .mono { font-size: 12px; }
.gl-recon-tbl :is(thead th, tbody th, td):first-child { padding-left: 0; }
.gl-recon-tbl :is(thead th, tbody th, td):last-child { padding-right: 0; }
#modal-gl-import details.gl-preview .gl-recon-tbl td { white-space: nowrap; }

/* --- 2. THE HEADER HAS NO NOTCH OVER AN EMPTY REGISTER -----------------------
   Section A ends the header's band at Credit's right edge above the actions
   slot. Over the empty row (a new month, a search that misses) there are no
   actions below it, and the notch read as an unfinished header: there the
   slot takes the header's ground and its rule back. */
table.ledger-table:has(tr.empty) th.col-act {
  background: var(--sum-bg); border-bottom-color: var(--line);
}

/* --- 3. ONE LOOK FOR THE ENTRY BADGE -----------------------------------------
   The fold note names the one kind in the range with the table's own badge;
   an Entry there is the table's quiet outline, not a Journal's tint. The
   template marks it exactly as it marks a table row (`kind-entry`). */
.ledger-kindnote .badge.kind.kind-entry {
  background: transparent; color: var(--muted); border-color: var(--line);
}

/* --- 4. THE LEGACY CHARGES KEEP A CARD EDGE IN DARK ---------------------------
   Section A's inset outline, which gave the register its hairline against
   the ground, reaches the other table on the page. */
#imported-charges .list-table { outline: 1px solid var(--line); outline-offset: -1px; }

/* --- 5. APPLY READS AS A CONTROL AT REST -------------------------------------
   The accent's tint on the page ground measured 1.08:1 with no edge — washed
   text beside four bordered fields. A 1px accent line at rest; the hover
   fill is section A's, unchanged. */
.ledger-filter button[type="submit"] { border-color: var(--accent-line); }

/* --- 6. THE IMPORT'S PREVIEW WRAPS AGAIN ---------------------------------------
   Section B held every preview header to one line, so the table's narrowest
   width beat its box and the last header was cut ("Regio"). The headers
   wrap as they did in the baseline ("Entry / No.", "Amount / ($)") and the
   seven columns fit. The cells keep their line: let them wrap too and the
   table, sized by its one-line headers, broke every date at its hyphens
   ("2026-09- / 03"). The box still scrolls for a wider file. */
#modal-gl-import details.gl-preview .gl-recon-tbl thead th { white-space: normal; }

/* --- 7. THE RECONCILIATION CARDS END ON ONE LINE -------------------------------
   The row's alignment only: each card stretches to its row, so the three
   cards of a row share one bottom edge. */
.gl-recon { align-items: stretch; }
/* The verifier of block C found what the first look left: the containment
   of the header's screen-reader-only text above 640px, a cue where the
   import's preview still scrolls on the desktop, the header notch over a
   register of repeat bands, and the scope strip's wrapped facts in the
   tablet band. LOOK only, as before; nothing inside a cell moves. */

/* --- 1. THE ACTIONS HEADER CONTAINS ITS OWN SR-ONLY TEXT AT EVERY WIDTH ---
   Block C made the wrapper the containing block under 640px, where the
   table's floor put the text 631px out. Above that the text's containing
   block was still the body, so a register wider than the pane (a
   seven-figure company's) panned the page the same way. The cell is the
   containing block now: a 1px box inside a table cell, clipped by the
   wrapper wherever the table scrolls. The 640px wrapper rule stands. */
.ledger-table th.col-act { position: relative; }

/* --- 3. THE HEADER HAS NO NOTCH WHEREVER NO VISIBLE ROW CARRIES AN ACTION --
   Block C answered the empty row. A search that hits only repeat bands has
   no visible actions cell either (the children that carry one are hidden)
   and the notch stood. No visible row with an actions cell, no notch. */
table.ledger-table:not(:has(tr:not([hidden]) > td.row-actions)) th.col-act {
  background: var(--sum-bg); border-bottom-color: var(--line);
}
#series-manage .metric-name > .gl {
  grid-column: 3; grid-row: 2; margin: 0; font-size: 11.5px; line-height: 16px;
  overflow-wrap: anywhere;
}
:is(#modal-add-fee, [id^="modal-metric-"]) .access-body > form.form-grid > label:not(.check-row) > .muted {
  display: block; line-height: 17px;
}
.gl-count { font-size: var(--t-label); color: var(--muted); font-variant-numeric: tabular-nums; }
#modal-confirm .confirm-foot [hidden] { display: none; }
main.page-reading .gl { font-size: var(--t-12); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ledger-filter .list-search::placeholder { color: var(--muted); }
}

@media (max-width: 1240px) {
  .ledger-table tr.child-row th.j-account { padding-left: 16px; }
}

@media (max-width: 640px) {
  .grid-page table.grid > tbody > tr > th.line-col .gl { color: var(--muted); font-size: var(--t-12); }
/* --- 8. THE PHONE (the kit's full-screen sheet) --------------------------- */
  /* one column, the pair stacked, the foot at the sheet's 16px gutter */
  .access-body > form.gl-form > label:not(.span2) { flex-basis: 100%; }
  .gl-form > .gl-pair > label:not([hidden]) { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
  #modal-gl-import table.gl-codes thead th { white-space: nowrap; }
  #modal-gl-import .gl-codes-card { grid-template-columns: minmax(0, 1fr); }
  #modal-gl-import .gl-codes-card > p.gl-recon-hint:has(#gl-codes-all) {
    grid-column: 1; grid-row: 2; margin-top: 8px;
  }
  #modal-gl-import .gl-codes-card > p.gl-recon-hint:has(#gl-codes-all) > label {
    flex-wrap: wrap; white-space: normal;
  }
  #modal-gl-import .gl-undo-form > label:is(:first-of-type, :nth-of-type(2)) { flex: 1 1 100%; }
}

:is(#modal-add-fee, [id^="modal-metric-"]) .access-body > form.form-grid > * {
  flex: 1 1 100%; min-width: 0;
}

@media (max-width: 640px) {
  #modal-gl-import .gl-undo .gl-recon-tbl { min-width: 560px; }
  #modal-gl-import .gl-undo .gl-recon-tbl :is(td, tbody th),
  .gl-recon > section .gl-recon-tbl :is(td, tbody th) { white-space: nowrap; }
/* A REGISTER ON A PHONE IS A LIST OF ROWS (owner decision 2 of 2026-11-19, UI
   rule 21, SPEC §6.173): the kit's list table, the one a desk gets, laid out
   as rows that never scroll sideways. A row is its name with its figures
   beside it, and under them the row's other cells as one line of detail.
   `#main` is in each selector so the row outranks a desk's rules for the
   same cells, which are many and written table by table. */
  #main .tablewrap:has(> :is(.ledger-table, .audit-table, .contracts-table, .codes-table, .series-manage, .plan-kpis, .kpi-measures, .kpi-levels, .pat-table, .version-table, .catalog-table, .board-version-list, .board-measures, .acc-people, .acc-tokens)) {
    display: block; overflow: visible; }
  /* a journal's legs stand in from their journal */
  #main table.ledger-table > tbody > tr.child-row:not([hidden]) { padding-left: var(--s-6); }
}

@media (width <= 640px) {
  .list-toolbar:has(> .ledger-filter) > .ledger-filter { flex: 1 1 100%; }
  .ledger-filter > .lf-date { grid-column: auto; }
  .ledger-filter > .list-search { width: 100%; min-width: 0; max-width: none; }
  .ledger-filter > select { width: 100%; max-width: none; }
  .ledger-filter > a.linklike { justify-self: start; line-height: 20px; }
  /* the register keeps a readable measure and scrolls, rather than folding
     a description into four lines a word wide; an empty one fits the screen */

/* --- 8. THE PHONE -----------------------------------------------------------------
   The scope strip: the range, then the three facts, then the widen control on
   a line of its own. The facts drop the desktop's hairline and separate by
   12px carried on each fact (the interpuncts between them are zero-width flex
   items, and a column gap would count them twice and open a wrapped line on
   one). The pager the same way: its gap is 0 and each visible item carries
   its own 12px, so "‹ newer" starts its line on the gutter.

   The import's tables: the step's one decision is whole inside the 358px
   sheet — the mapping's column select, the cost codes' category select —
   with the code column narrow; what does not fit scrolls under the kit's
   right-edge shade, now on EVERY table wrapper in the pop-out (it sits in
   the wrapper, inside the card that clips its corners, so the card cannot
   clip it). The reconciliation cards wrap their text cells and keep their
   figures whole, so a figure is never cut; each card's own scroller carries
   the same shade as the fallback. */
  /* the pager */
  .ledger-pager:has(> .lp-count) { column-gap: 0; }
  /* the cost codes step: the code narrow, the category select whole and
     clear of the shade (78 + 118 + 142 = 338 of the card's 356px). A fixed
     table never holds a header to one line (the house rule), and these fit:
     "GL code" is 47px of text in 78px less the cell's 30px of padding */
  #modal-gl-import table.gl-codes:has(select.gl-codes-sec) { table-layout: fixed; }
  #modal-gl-import table.gl-codes:has(select.gl-codes-sec) thead th { white-space: normal; }
}

@media (max-width: 640px) {
  #main table:is(.ledger-table, .audit-table, .contracts-table, .codes-table, .series-manage, .plan-kpis, .kpi-measures, .kpi-levels, .pat-table, .version-table, .catalog-table, .board-version-list, .board-measures, .acc-people, .acc-tokens) > thead > tr > th.num {
    display: block; flex: 0 0 76px; position: static; width: auto; min-width: 0; padding: 0; border: 0;
    background: none; text-align: right; white-space: normal; }
}

@media (width <= 640px) {
  #modal-gl-import table.gl-codes:has(select.gl-codes-sec) thead th:nth-child(1) { width: 78px; }
  #modal-gl-import table.gl-codes:has(select.gl-codes-sec) thead th:nth-child(2) { width: 118px; }
  #modal-gl-import table.gl-codes:has(select.gl-codes-sec) thead th:nth-child(3) { width: 142px; }
  #modal-gl-import table.gl-codes:has(select.gl-codes-sec) input[type="text"] { min-width: 0; }
  #modal-gl-import table.gl-codes:not(:has(select.gl-codes-sec)) thead th:nth-child(2) { width: 72px; }
  /* the reconciliation cards: the text wraps, the figures stay whole */
  .gl-recon > section .gl-recon-tbl :is(td, tbody th):not(.num) { white-space: normal; }
  /* each card is a wrapping row, so its scroller can hold the shade: the
     heading and the sentences a line each, the table and the shade on one */
  .gl-recon > section:where(:not([hidden])) {
    display: flex; flex-wrap: wrap; align-content: flex-start; align-items: flex-start;
  }
  .gl-recon > section > .gl-recon-tbl { order: 1; flex: 0 0 auto; min-width: auto; }
  .gl-recon > section > .gl-recon-tbl ~ * { order: 2; }
}

@media screen and (max-width: 640px) {
  .ledger-filter button, .audit-filter button { flex: 1 1 100%; }
}

@media (width <= 640px) {
  .gl-recon > section > * { flex: 1 1 100%; min-width: 0; }
}

@supports (animation-timeline: scroll()) {
  @media (width <= 640px) {
    #modal-gl-import :is(.tablewrap, details.gl-preview > div)::after,
    .gl-recon > section::after {
      content: ""; flex: none; align-self: stretch;
      width: 18px; margin-left: -18px;
      position: sticky; right: 0; z-index: 3;
      opacity: 0; pointer-events: none;
      background: linear-gradient(to left, var(--shade-edge), transparent);
      animation: kit-shade-bottom linear both;
      animation-timeline: scroll(nearest inline);
      animation-range: calc(100% - 12px) 100%;
    }
    /* in a card the shade rides the table's line: its outer width is below
       zero, so it can never wrap under the table it marks; and a sticky box
       stops at the scroller's padding, so it reaches through the card's 16px
       to the card's edge */
    .gl-recon > section::after { order: 1; margin-right: -100vw; right: -16px; }
    /* the preview's box pads its table by 10px each side */
    #modal-gl-import details.gl-preview > div::after { right: -10px; }
  }

  #modal-gl-import details.gl-preview > div::after {
    content: ""; flex: none; align-self: stretch;
    width: 18px; margin-left: -18px;
    position: sticky; right: -10px; z-index: 3;
    opacity: 0; pointer-events: none;
    background: linear-gradient(to left, var(--shade-edge), transparent);
    animation: kit-shade-bottom linear both;
    animation-timeline: scroll(nearest inline);
    animation-range: calc(100% - 12px) 100%;
  }
}

/* ===== COMPANY SETTINGS [settings] =====
   The settings head, menu and tabs: cost codes, metrics, fees, products, branches, versions, KPIs and patterns.
   --- kept from an old banner ---
   THE SETTINGS SHELL · A · the head, the sub-menu and the settings tabs (2026-09-24)
   --- kept from an old banner ---
   THE INPUT TABS · B · cost codes, operating metrics, planned expenses (2026-09-24)
   --- kept from an old banner ---
   THE SETTINGS · C · after the review (2026-09-24)
   --- kept from an old banner ---
   THE SETTINGS · C2 · after the second look (2026-09-24)
*/

/* company settings: shared fixed column layout so every category's table
   lines up (the colgroup carries the widths); the filter bar; the head row */
.settings-table { width: 100%; }
/* cost codes — compact + dense (hundreds of codes; redesign 2026-08-27) */
.codes-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin: 0 0 6px; }
.code-cat-head { font-size: 14.5px; font-weight: 650; margin: 20px 0 5px;
  display: flex; align-items: baseline; gap: 8px; }
/* forecast rules */
.rules-section { margin: 26px 0 8px; border-top: 1px solid var(--line); padding-top: 18px; }
table.league tr.cost-centre th.lg-branch, table.league tr.cost-centre td.num { color: var(--ink); }

/* ------------------------------ Cost codes + icon buttons (redesign 2026-09-05) --- */
.codes-head { align-items: flex-start; justify-content: space-between; margin: 0 0 12px; }

/* ==== THE LEAGUE, THE PLAN TABLE AND THE BRIDGE (seventh pass, 2026-09-12)
   ================================================================ */

/* 02-T3 — A LOSS IS RED ON EVERY ROW, THE COST CENTRE INCLUDED. The
   cost-centre rule that restores body ink to the row's figures is three
   classes deep and beat `table.dt td.loss`, so Corporate's ($159,969) and
   ($158,882) — the largest single losses in the table — printed in body ink
   while Fort Collins' ($78,432) printed red, on the card, on the board sheet
   and in both themes. `.loss` is in the markup; it was applied and then
   silently discarded. "Red means a loss" is one of the five colour rules,
   and a convention with one unexplained exception is not a convention. */
table.dt.league tr.cost-centre td.num.loss { color: var(--err); }
/* the codes notice is the same column as the card under it: full-page width
   spread the two columns of codes 1,100px apart */
.sec-new-codes { max-width: 640px; }
/* Family 7, section A of the Mobbin redesign: LOOK, LAYOUT and HIERARCHY on
   Company settings' frame and on the six tabs `settings.html` holds itself —
   Company, KPIs, Branches, Snapshots, Scenarios and Products — with every
   pop-out in that file. No word moves out of its sentence, no hook moves, no
   behaviour changes, and every colour is a token with a dark value.

   ONE PAGE HEAD (Ghost, Coda): the h1 was "Company settings" on nine tabs
   while the tab's own name sat in the body as an h2, an uppercase h2 or
   nowhere. The h1 is now the TAB's name as the sub-menu prints it, with the
   tab's one-line summary under it and its primary action at the right; the
   head is the shell grid's first item, over the pane beside the sub-menu
   (and first on a phone). The template renders the body first and each tab
   states its head through `set_head`.

   ONE WRAPPER IDIOM, THE BLOCK (Quicken, Ghost): `section.set-block` is the
   Overview's SECTION surface — `--surface`, a `--line` edge, `--r-lg`,
   `--shadow` — with `.set-block-head` (a 15px/650 title, a 12.5px `--muted`
   description capped at 68ch, the block's one action at the right) and,
   where the block is a form, `.set-block-foot` (the pop-out's foot: a
   hairline, the Save at the right). A table in a block gives up its own
   frame and sits flush under the head, the way the Overview's decisions
   block holds its queue: inside a section a second border is a second box.

   PINNED AND UNTOUCHED: `.list-table tr.child-row > :first-child {
   padding-left: 34px; }` (a block's own inset is restated for its child rows
   on a longer selector, never on that one), the two `.list-table tfoot` rule
   heads, `.drag-handle { border: 0; padding: 0;`, `.access-modal[hidden]`,
   and this block's two media queries use the range form only. */

/* --- 1. THE SHELL: the head over the pane, the sub-menu beside both ------- */
.settings-shell {
  grid-template-columns: 184px minmax(0, 1fr);
  grid-template-areas: "menu head" "menu body";
  grid-template-rows: auto 1fr;
  column-gap: 24px; row-gap: 0;
}
/* every line box above a table is a whole pixel (family 4's lesson) */
.settings-shell > .page-head.suite .page-sub { line-height: 19px; }

/* --- 2. THE SUB-MENU YIELDS TO THE RAIL (lead decision) -------------------
   The rail's active item is a filled accent block; the sub-menu's was the
   same block, so "Company settings" and "Cost codes" read as two equals.
   The sub-menu keeps its 2px accent rule and accent ink and gives up the
   fill; its group names read as the rail's do — sentence case, in the
   template's own words (`text-transform` only). "More settings · N" stays a
   LINK and sits as the menu's quiet last row, on the items' own axis. */
.settings-menu { top: 18px; gap: 18px; padding-top: 0; }
.settings-group-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none;
  color: var(--muted); padding: 0 12px 4px;
}
.settings-menu a:hover { background: var(--surface-2); color: var(--ink); }
.settings-menu a.active { background: transparent; }
.set-block-title { min-width: 0; flex: 1 1 auto; }
.set-block-head h2 {
  margin: 0; font-size: 15px; font-weight: 650; line-height: 20px;
  letter-spacing: -.01em; text-transform: none; color: var(--ink);
}
.set-block-desc, .set-block-head .ledger-kindnote {
  margin: 0; max-width: 68ch; font-size: var(--t-sm); line-height: 19px;
  color: var(--muted);
}
.set-block-desc strong { color: var(--ink-2); font-weight: 600; }
/* the block's one action keeps its words on one line at the head's right */
.set-block-head > :is(button, a) { flex: none; white-space: nowrap; }
/* the one designed empty row: its sentence in the body's ink, with air */
.set-block > .tablewrap > table.dt tr.empty td { height: 52px; color: var(--muted); }
.set-block-empty { margin: 0; padding: 14px 20px 18px; border-top: 1px solid var(--line);
  font-size: var(--t-table); color: var(--muted); }

/* a block that is a FORM (the Company tab's three): the fields under the
   head, the Save in the foot — the pop-out's foot, so a person sees which
   Save posts what */
.set-block-form { margin: 0; }
.set-block-body { padding: 0 20px 14px; }
.set-block-foot:not([hidden]) {
  display: flex; justify-content: flex-end; align-items: center; gap: 10px;
  padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface);
}
.set-block-body .mp select { flex: 1 1 50%; min-width: 0; }
/* a radio row: the control on the sentence's first line, 8px apart */
.set-block-body label:has(> input[type="radio"]):not([hidden]) {
  display: flex; align-items: baseline; gap: 8px; font-size: var(--t-table);
  color: var(--ink); line-height: 19px;
}
.set-block-body label:has(> input[type="radio"]) > input { flex: none; margin: 0; translate: 0 2px; }
.set-block table.kpi-levels tbody th[scope="row"] .sub { margin-top: 2px; font-size: 11.5px; }
.set-block table.kpi-levels th.num, .set-block table.kpi-levels td.num,
.set-block table.kpi-measures th.num, .set-block table.kpi-measures td.num { width: 13rem; }
.set-block table.kpi-levels .tcv-parts, .set-block table.kpi-measures .tcv-parts { margin-top: 1px; }
.set-block table.dt th.col-act, .set-block table.dt td.row-actions { width: 1%; }
.set-block table.version-table > * > tr > * { padding-left: 8px; padding-right: 8px; }
.set-block table.version-table th.col-act { width: 84px; }
/* a table's footnote: its definitions, under the rows they define */
.set-block-note { margin: 0; padding: 10px 20px 14px; border-top: 1px solid var(--line-soft);
  font-size: 12px; line-height: 18px; color: var(--muted); }
.set-block-note strong { font-weight: 600; color: var(--ink-2); }
/* the pro formas: a row and its read are one object */
.set-block table.proforma-table td { white-space: nowrap; }
.set-block table.proforma-table td:first-child .muted { font-size: 11.5px; }
.set-block table.proforma-table tr:has(+ tr.proforma-narrative) > td { border-bottom: 0; }
.set-block table.proforma-table tr.proforma-narrative > td {
  height: auto; padding-top: 0; padding-bottom: 12px; white-space: normal;
}
.set-block table.proforma-table tr.proforma-narrative:hover > td { background: transparent; }
/* products, sizes, scenarios: the name leads, the counts are figures */
.set-block table.catalog-table td:first-child { white-space: nowrap; }
.set-block table.scenario-table td:first-child .gl { margin-left: 8px; }

/* --- 8. AN INACTIVE ROW IS MUTED INK, NOT A TRANSPARENT ONE (lead decision)
   `opacity: .45` took every word of an off branch, snapshot or planned
   expense under the contrast floor in dark and could not be themed. The row
   reads in `--muted`; its status control keeps full strength. */
.settings-body tr.inactive-line td { opacity: 1; color: var(--muted); }
.settings-body tr.inactive-line td :is(strong, a) { color: var(--muted); }
.settings-body tr.inactive-line td a:hover { color: var(--accent); }
.access-foot > form.set-remove:not([hidden]) { display: inline-flex; }
/* a company runs its access (SPEC §6.142): the Company tab's people and tokens */
.acc-custom { border: 0; padding: 0; margin: var(--s-2) 0 0; min-width: 0; }
/* access per module (SPEC §6.155): one row per module, its name and its level */
.acc-levels > legend { font-weight: 550; font-size: var(--t-table); color: var(--ink-2); margin-bottom: var(--s-1); }
.acc-levels > label.acc-level:not([hidden]) {
  display: flex; flex-direction: row; align-items: center; justify-content: space-between;
  gap: var(--s-2); margin: 4px 0;
}
.acc-levels > label.acc-level > select { flex: none; width: 12.5em; }
.acc-levels > .acc-levels-note { font-size: var(--t-sm); margin: var(--s-1) 0 0; }
.set-block table.co-rows tbody th[scope="row"] { width: 36%; }
.set-block table.co-rows td { overflow-wrap: anywhere; }
.set-block table.co-rows td.row-actions { width: 1%; white-space: nowrap; }
:is(.set-codes, .set-metrics, .set-fees, .set-avg) > .set-block-head > p strong {
  font-weight: 600; color: var(--ink-2);
}
/* the fold notes are footnotes to the table: a step smaller again, and one
   line each — they say which column the table left out, not why */
:is(.set-codes, .set-fees) > .set-block-head > p.ledger-kindnote {
  max-width: none; font-size: 12px; line-height: 20px;
}
:is(.set-codes, .set-fees) > .set-block-head > p.ledger-kindnote .badge {
  line-height: 16px; vertical-align: 1px;
}
.set-codes .set-block-title > .sec-title {
  margin: 0; font-size: 15px; font-weight: 650; line-height: 22px;
  letter-spacing: -.005em; color: var(--ink);
}
.set-codes .set-counts {
  margin: 0; font-size: var(--t-table); line-height: 22px; color: var(--muted);
}
.set-codes .set-counts strong {
  font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums;
}
.set-codes .codes-filter select { width: auto; min-width: 9rem; max-width: 18rem; }
.set-codes .codes-filter input[type="search"]::placeholder { color: var(--muted-2); }

/* THE TABLE IS A FIXED GRID: the name column takes what is left, the GL code
   and the Tags each hold their own width (three pills side by side, the most
   one code carries here), Used by its 160px, then the actions behind a
   hairline. Nothing is left as a gutter inside the Tags column. */
table.codes-table { table-layout: fixed; min-width: 640px; }
table.codes-table th.col-act { width: 60px; }
table.codes-table tbody th.code-name { overflow-wrap: anywhere; }
table.codes-table td.row-actions, table.codes-table th.col-act {
  border-left: 1px solid var(--line-soft);
}
table.codes-table td:has(> .tag, > .badge) { line-height: 20px; }

/* THE ROW'S PENCIL is quiet at rest and never hidden (family 6's decision):
   `--muted-2`, full ink when the row is under the pointer or holds focus,
   the accent under the pointer itself */
table.codes-table td.row-actions { text-align: center; padding: 0 6px; }

/* THE CATEGORY BAND is the list-table band: the name in ink at the band's
   size, the kind and the count a step quieter; the band's add action the
   quiet accent role at the kit's small control height, its pencil lined up
   over the rows' pencils */
table.codes-table tr.cat-row td { padding: 0 6px 0 10px; height: 38px; }
table.codes-table .cat-head { gap: 8px; min-height: 38px; }
table.codes-table .cat-name { font-size: var(--t-sm); font-weight: 650; color: var(--ink); }
table.codes-table .cat-head .qa-reveal:hover { background: var(--accent-soft); }
table.codes-table .cat-head .cat-edit { margin: 0 12px 0 10px; }

table.codes-table tr.code-quickadd input::placeholder { color: var(--muted-2); }
table.codes-table tr.code-quickadd .qa-msg { font-size: 12px; }
table.codes-table tr.code-quickadd .qa-add {
  min-height: var(--ctl-h-sm); padding: 0 8px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--accent); cursor: pointer;
  font: 600 var(--t-sm)/1 var(--sans);
}
table.codes-table tr.code-quickadd .qa-add:hover { background: var(--accent-soft); text-decoration: none; }

/* THE REQUIRED TAG keeps its chip in dark: the field's edge, not the card's
   hairline, which dissolved into the row */
table.codes-table .tag-req { border-color: var(--field-line); color: var(--ink-2); }
.set-codes .codes-legend::first-line { font-weight: 600; color: var(--ink-2); }
.set-codes .codes-legend .legend-item:first-of-type { margin-top: 6px; }
.set-codes .codes-legend .legend-item > .tag { justify-self: start; margin: 0; }
.set-codes .codes-legend .legend-sep { display: none; }
/* the ledger's average: a block of its own, its table a plain money list */
.set-avg > .tablewrap { max-width: 760px; }
/* the grid's row gap is the one space between the head's lines */
:is(.set-codes, .set-metrics, .set-fees, .set-avg) > .set-block-head > p:is(.muted, .ledger-kindnote) + p:is(.muted, .ledger-kindnote) {
  margin-top: 0;
}
/* the page head's title keeps the top line on every tab: where a tab has an
   action and no summary line (Operating metrics, Planned expenses) the
   34px button no longer centres the 25px title 5px lower than the rest */
.settings-shell > .page-head.suite { align-items: flex-start; }
/* the counts left the codes head for the page head: they are figures there */
.settings-shell > .page-head.suite .page-sub :is(#codes-placed, #codes-available) {
  font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums;
}
.set-codes > .tablewrap > table.codes-table th.col-act { width: 60px; }
/* the quick-add row's "add" is wider than a pencil: its cell keeps it
   inside the column rather than the card's 20px edge */
.set-codes > .tablewrap > table.codes-table tr.code-quickadd > td.row-actions { padding: 0 6px 0 4px; }
/* the band's pencil stands over the rows' pencils */
.set-codes > .tablewrap > table.codes-table .cat-head .cat-edit { margin-right: 5px; }
.set-codes > #new-cat-card {
  margin: 0 20px var(--s-4); padding: 14px 16px 16px; box-shadow: none;
  border-radius: var(--r-md);
}
.set-codes > #new-cat-card #new-cat-form > label:first-child { margin-top: 0; }
.set-codes > .codes-legend .legend-item { max-width: 720px; }

/* --- 4. PLANNED EXPENSES (5.6, 5.7) -------------------------------------
   The one-row band's caption and its row open on the column's 20px edge,
   with "Vendor" and the foot's label — B's caption padding had overridden
   A's inset by 10px. The ledger's average is a card like the one above
   it: no inner band of padding over its title, its own full edge, its
   table the card's width. */
.set-fees .fees-table tbody tr.group-row:has(> td:only-child):has(+ tr.child-row + tr.group-row) > td,
.set-fees .fees-table tbody tr.group-row:has(> td:only-child):has(+ tr.child-row:last-child) > td,
.set-fees .fees-table tbody tr.group-row:has(> td:only-child):has(+ tr.child-row + tr.group-row) + tr.child-row > :first-child,
.set-fees .fees-table tbody tr.group-row:has(> td:only-child):has(+ tr.child-row:last-child) + tr.child-row > :first-child {
  padding-left: 20px;
}

/* --- 7. THE KPI POP-OUTS (5.2, 5.11) -------------------------------------
   A tracked measure's pop-out: the target form is the panel's flex column
   with its Save in its own foot; the status form follows under a hairline
   as a row of its own — its select saves itself, and the Save above it no
   longer reads as saving both. A history step's × is a quiet control, not
   a loss, as in the planned-expense pop-outs. */

/* --- 8. SNAPSHOTS (5.4, item 3) ------------------------------------------
   Cent money is pinned, so the money columns hold "$1,111,165.78" whole:
   118px each (95px of tabular figure, 16px of cell padding, a margin).
   The plan-of-record select keeps its chosen option whole ("Plan of record
   · 2026" is 155px with the select's arrow, so its column is 172px — at
   160px it read "Plan of record · 202"). The name and Window share what is
   left, 123px each at 1440 with the rail open (122px at the table's 940px
   floor, over the name's 120px); Status 72px, the actions 84px as they
   were. The two sub-lines that open on a join mark ("· then vs now",
   "· Dana Reyes") are pinned words: each is a line of its own whose mark
   hangs outside it by its measured width and is clipped, so the line opens
   on its word ("· " is .5696em at 11px and .5707em at 11.5px in Inter,
   measured in Edge). */
.set-block table.version-table th.col-name { width: auto; }
.set-block table.version-table th.col-plan { width: 172px; }

/* --- 10. THE PRO FORMAS (5.18) -------------------------------------------
   Every column head holds one line ("Weakest input" wrapped), and the name
   with its "date · who" line takes a quarter of the table: the figure
   columns keep their figures whole on 6px of padding a side instead of 10,
   which is the width the name's second line needed. */
.set-block table.proforma-table > thead > tr > th { white-space: nowrap; }
.set-block table.proforma-table > thead > tr > th:first-child { width: 25%; }
.set-block table.proforma-table > * > tr > :not(:first-child):not(:last-child) {
  padding-left: 6px; padding-right: 6px;
}

/* --- 3. THE PRO FORMA TABLE'S HEADERS KEEP THEIR DISTANCE ------------------
   Block C's 6px side padding freed the name its width and put a
   right-aligned header 12px from a left-aligned one ("Breakeven Score").
   16px between the middle columns; the name keeps its share. */
.set-block table.proforma-table > * > tr > :not(:first-child):not(:last-child) {
  padding-left: 8px; padding-right: 8px;
}

/* --- 8. THE LOCK SCHEDULE, a quiet disclosure -------------------------------
   Its summary is the kit's quiet disclosure (12.5px, the CSS chevron that
   turns down when open); the words and the count are exactly as they were. */
details.lock-list { margin: 0; }
details.lock-list > summary:not([hidden]) {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 3px 6px; margin: -3px -6px; border-radius: var(--r-sm);
  font: 600 var(--t-sm)/18px var(--sans); color: var(--muted);
  letter-spacing: 0; text-transform: none; list-style: none; cursor: pointer;
}
details.lock-list > summary::-webkit-details-marker { display: none; }
details.lock-list > summary::before {
  content: ""; flex: none; width: 5px; height: 5px; margin: 0 1px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
}
details.lock-list[open] > summary::before { transform: rotate(45deg); margin-top: -3px; }
details.lock-list > summary:hover { color: var(--accent); background: var(--surface-2); }
details.lock-list[open] > summary { color: var(--ink-2); }
details.lock-list > p.muted { margin: 10px 0; font-size: var(--t-sm); line-height: 19px; }
/* the row's identity reads as one; the timestamp is mono (the system's rule
   for a timestamp) but a step quieter, so it is no longer the heaviest cell */
table.board-version-list tbody th[scope="row"] { font-weight: 650; }
/* What SPEC §6.74 to §6.77 left, built after the owner's answers of
   2026-09-30. Nothing here moves a figure or a word; every colour is a
   token. The markup is the templates' (the settings page's Go, the queue's
   hint for its keys) and the scripts' (decisions.js, layout.js). */

/* -- 1. THE SETTINGS PAGE'S PHONE MENU MOVES ON GO ----------------------------
   under 860px the settings menu is a select, and it navigated on change
   (WCAG 3.2.2). It is a GET form now: the select and a quiet Go on one row,
   the select taking what the Go leaves. The Go takes the kit's control
   geometry, as the grid's Go does inside `.page-controls`, which this form
   is not in: the kit's container rule does not reach it. */
.settings-menu-mobile > .settings-pick:not([hidden]) {
  display: flex; align-items: center; gap: var(--s-2); }
.settings-menu-mobile > .settings-pick select { flex: 1 1 auto; width: auto; min-width: 0; }
.settings-menu-mobile > .settings-pick .linklike:not([hidden]) {
  flex: none; min-height: var(--ctl-h); padding: 0 10px; border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  white-space: nowrap; font-size: var(--t-table); font-weight: 600; }
.settings-menu-mobile > .settings-pick .linklike:hover {
  background: var(--surface-2); text-decoration: none; }
.sh .sh-red .sh-dot, .sh-qual.sh-red .sh-dot { background: var(--err); }

/* === PLAN STATUS HEADER === (2026-10-28, SPEC §6.95) ======================
   `_status_header.html`: the band (a 7px dot, the band word, the period),
   the completeness sentence, the KPIs against plan and the projection
   accuracy strip. On the tokens; the four colours keep their meanings:
   green the ok dot, yellow the attention dot, and the RED dot's one rule
   sits just before the FORMULA HELP header (decision 6: `--err` colours a
   red status dot and nothing else, and the tail of this file never names
   it). Every visible `display` leaves `[hidden]` alone. */
.sh:not([hidden]) { display: block; }
.sh .sh-band:not([hidden]) { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.sh .sh-band { margin: 0 0 4px; font-size: 17px; font-weight: 650; color: var(--ink);
  letter-spacing: -0.01em; }
.sh .sh-period { font-size: var(--t-table); font-weight: 400; color: var(--ink-2); letter-spacing: 0; }
.sh .sh-dot:not([hidden]) { display: inline-block; }
.sh .sh-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto;
  background: var(--muted); margin-right: 6px; vertical-align: 1px; }
.sh .sh-band .sh-dot { align-self: center; margin-right: 0; }
.sh .sh-green .sh-dot { background: var(--ok); }
.sh .sh-yellow .sh-dot { background: var(--attn); }
.sh .sh-none .sh-dot { background: transparent; box-shadow: inset 0 0 0 1px var(--muted); }
.sh .sh-complete { margin: 0 0 10px; font-size: var(--t-sm); line-height: 1.5; color: var(--ink-2); }
.sh .sh-wrap { margin: 0 0 8px; }
.sh table.sh-kpis, .sh table.sh-acc { width: 100%; border-collapse: collapse;
  font-size: var(--t-table); font-variant-numeric: tabular-nums; }
.sh table.sh-kpis thead th, .sh table.sh-acc thead th {
  font-size: var(--t-label); font-weight: 600; color: var(--muted); }
.sh table.sh-kpis .num, .sh table.sh-acc .num { text-align: right; white-space: nowrap; }
.sh .sh-status { white-space: nowrap; color: var(--ink); }
.sh .sh-reason { color: var(--muted); }
.sh .sh-cat td { color: var(--ink-2); }
.sh .sh-unpub { color: var(--muted); }
.sh .sh-sub:not([hidden]) { display: block; }
.sh .sh-sub { font-size: var(--t-12); font-weight: 400; color: var(--muted); }
.sh .sh-base th, .sh .sh-base td { color: var(--ink-2); }
.sh .sh-note, .sh .sh-bias, .sh .sh-trend { margin: 4px 0 0; font-size: var(--t-sm);
  line-height: 1.5; color: var(--ink-2); }
.sh .sh-bias { color: var(--ink); }
/* the Overview's card: the header sits in the widget's own card */
.sh-card .sh { margin-top: 2px; }
/* the management report's sheet: a block above the verdict, kept whole */
.sh.sh-sheet { margin: 6px 0 18px; break-inside: avoid; }
/* ONE VERDICT (SPEC §6.144): on the report the plan status is the verdict's
   qualifier, in the verdict's own line, quieter than the verdict word; the
   dot keeps the status word beside it (the red one is decision 6's rule) */
.sh-qual:not([hidden]) { display: inline-flex; }
.sh-qual { align-items: baseline; gap: 6px; font-size: var(--t-sm); font-weight: 600;
  color: var(--ink-2); white-space: nowrap; }
.sh-qual .sh-dot:not([hidden]) { display: inline-block; }
.sh-qual .sh-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto;
  align-self: center; background: var(--muted); }
.sh-qual.sh-green .sh-dot { background: var(--ok); }
.sh-qual.sh-yellow .sh-dot { background: var(--attn); }
.sh-qual.sh-none .sh-dot { background: transparent; box-shadow: inset 0 0 0 1px var(--muted); }
.set-block table.catalog-table tr.pg-head td:first-child { white-space: normal; min-width: 260px; }

.set-block table.version-table th.col-money { width: 118px; }
main.page-reading .set-block-head h2 { font-size: var(--t-16); }

@media (width <= 860px) {
  .settings-shell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "mobile" "body"; }
}

@media (max-width: 640px) {
  #main table.sh-acc > * > tr > :is(th, td) { font-size: var(--t-12); }
  .sh .sh-band { font-size: 15px; }
  /* A READING PAGE ON A PHONE (the Overview, Insights, the close page): no
     text under the scale's 12px, and every control a finger's height. */
  #main :is(.dq-chip, .dq-area-h, .dq-area-n, .nr-label, .viz-cap, .close-gate .badge),
  #main :is(.viz-table, .close-figs, .lock-list) :is(thead th, .th-sub, .sub),
  #main .lock-list :is(tr.group-row > td, tr.statement-break > td, .tag, td > .muted) { font-size: var(--t-12); }
}

@media (width <= 640px) {
  .set-block-head > :is(button, a) { white-space: normal; }
  .set-block > .tablewrap > table.dt > * > tr > :first-child { padding-left: 16px; }
  .set-block > .tablewrap > table.dt > * > tr > :last-child { padding-right: 16px; }
  .set-block-body { padding: 0 16px 12px; }
  .set-block-foot { padding: 10px 16px; }
  .set-block-empty { padding: 12px 16px 16px; }
  .settings-shell > .page-head.suite .page-controls { width: auto; } /* the figure column gives the name its width back on a phone */
  :is(.set-codes, .set-metrics, .set-fees, .set-avg) > .set-block-head {
    grid-template-columns: minmax(0, 1fr);
  }
  .set-codes .codes-filter { display: grid; grid-template-columns: minmax(0, 1fr); }
  .set-codes .codes-legend .legend-item { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  /* B's phone grid keeps its narrow action column, wide enough for the
     pencil and the quick-add's "add" inside the phone's 16px edge */
  .set-codes > #new-cat-card { margin-left: 16px; margin-right: 16px; }
  .set-fees .fees-table tbody tr.group-row:has(> td:only-child):has(+ tr.child-row + tr.group-row) > td,
  .set-fees .fees-table tbody tr.group-row:has(> td:only-child):has(+ tr.child-row:last-child) > td,
  .set-fees .fees-table tbody tr.group-row:has(> td:only-child):has(+ tr.child-row + tr.group-row) + tr.child-row > :first-child,
  .set-fees .fees-table tbody tr.group-row:has(> td:only-child):has(+ tr.child-row:last-child) + tr.child-row > :first-child {
    padding-left: 16px;
  }
  /* Scenarios keeps a readable name and scrolls in its wrapper (5.10) */
  .set-block table.scenario-table { min-width: 460px; }
  .set-block table.scenario-table > * > tr > :first-child { width: 176px; min-width: 176px; }
/* The verifier of block C: the wizard's review strip after the words pass,
   the empty scenarios table on a phone, and the pro forma table's gutters.
   LOOK only, as before. */

/* --- 2. AN EMPTY SCENARIOS TABLE FITS THE PHONE -----------------------------
   Block C gave the scenarios table a 460px floor so a name is never one
   word a line; the empty table needs no floor, and with one it hid its
   Status header and ran its one sentence under the shade. */
  .set-block table.scenario-table:has(> tbody > tr.empty) { min-width: 0; }
  .set-block table.scenario-table:has(> tbody > tr.empty) > * > tr > :first-child {
    width: auto; min-width: 0;
  }
}

@media (width > 640px) {
/* --- 2. COST CODES FITS ITS CARD (review blocker 5.1) -------------------
   A's flex `.tablewrap` sized B's table by its content (`flex: 1 0 auto`
   on a table with no width runs the auto algorithm), and A's `th.col-act {
   width: 1% }` outranked B's 60px: the table ran about 990px inside the
   942px card at 1440 with the rail open, so every row's pencil and the
   quick-add row's "add" sat past the card's edge under the shade. The
   table is now the card's width, a fixed grid: the GL code 88px, the tags
   304px (the widest run of pills on the demo, three on Route Labor, is
   282px, plus the cell's 20px: 30% of the card, 283px, wrapped the third),
   Used by 150px, the actions 60px, and the name what is left — 340px at
   1440 with the rail open. The floor keeps the name 200px or wider: 802px,
   942px with the Placement column's 140px; under it the table scrolls
   with the shade. The phone keeps B's own grid (620px, the name frozen). */
  .set-codes > .tablewrap > table.codes-table {
    width: 100%; flex: 1 1 auto; min-width: 802px;
  }
  .set-codes > .tablewrap > table.codes-table:has(> thead th.col-status) { min-width: 942px; }
  .set-codes > .tablewrap > table.codes-table th.col-tags { width: 304px; }
  .set-codes > .tablewrap > table.codes-table th.col-used { width: 150px; }
}

@supports (animation-timeline: scroll()) {
  .set-block > .tablewrap::after {
    content: ""; flex: none; align-self: stretch;
    width: 18px; margin-left: -18px;
    position: sticky; right: 0; z-index: 3;
    opacity: 0; pointer-events: none;
    background: linear-gradient(to left, var(--shade-edge), transparent);
    animation: kit-shade-bottom linear both;
    animation-timeline: scroll(nearest inline);
    animation-range: calc(100% - 12px) 100%;
  }
  .tablewrap:has(> :is(.codes-table, .series-manage, .fees-table))::after {
    content: ""; flex: none; align-self: stretch;
    width: 18px; margin-left: -18px;
    position: sticky; right: 0; z-index: 3;
    opacity: 0; pointer-events: none;
    background: linear-gradient(to left, var(--shade-edge), transparent);
    animation: kit-shade-bottom linear both;
    animation-timeline: scroll(nearest inline);
    animation-range: calc(100% - 12px) 100%;
  }
}

/* ===== DATA INTEGRITY [integrity] =====
   The integrity page, its settings table and the custom rules.
   --- kept from an old banner ---
   THE OVERRIDE (2026-10-20) · a contract's management fee kept over its products' price (migration 0123)
   --- kept from an old banner ---
   DATA INTEGRITY SETTINGS · THE TABLE (2026-10-31, SPEC §6.99)
   --- kept from an old banner ---
   DATA INTEGRITY · CUSTOM RULES (2026-10-31, SPEC §6.99 CUSTOM RULES)
*/

.setup-form[hidden] { display: none; }   /* author display: beats the UA [hidden] rule — restore it */
.help-list dt { font-weight: 600; margin-top: 12px; }
/* the title, its sentence, and the state at the right edge */
.setup-steps .setup-body:where(:not([hidden])) {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 16px; row-gap: 2px; align-items: baseline;
}
.admin-2fa .toggle-pill:not([hidden]) {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: var(--ctl-h); padding: 0 2px 0 4px; margin: 0;
  border: 0; border-radius: var(--r-md); background: transparent;
  font: 600 var(--t-table)/1 var(--sans); color: var(--ink); cursor: pointer;
}
.admin-sec > .add-card .form-grid { max-width: 700px; column-gap: var(--s-4); }
.token-once .token-copy > .btn-secondary { flex: none; height: auto; }

/* the head: the feed line under the purpose, Run now in the controls */
.ig-head .ig-feedline { margin: 4px 0 0; max-width: 80ch; font-size: var(--t-sm); line-height: 19px; color: var(--ink-2); }
.ig-head .ig-run { margin: 0; }
.notice.ig-notice, .notice.ig-reason { max-width: 980px; box-sizing: border-box; line-height: 1.5; }

/* the filter bar: the cleared toggle stands at the control height */
.ig-filter .ig-cleared:not([hidden]) {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--ctl-h);
  font-size: var(--t-table); color: var(--ink); white-space: nowrap;
}

/* the strip: four figures, the first the anchor */
.ig-strip:not([hidden]) {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 4px 0 0; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface);
}
.ig-strip > .ig-stat:not([hidden]) {
  display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px 16px;
}
.ig-strip > .ig-stat + .ig-stat { border-left: 1px solid var(--line-soft); }
.ig-strip .ig-label { font: 500 12px/16px var(--sans); color: var(--muted); }
.ig-strip .ig-num {
  font: 600 20px/26px var(--sans); color: var(--ink); font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.ig-strip .ig-anchor .ig-num { font-size: 24px; line-height: 30px; }
.ig-strip .ig-sub { font-size: 12px; line-height: 16px; color: var(--ink-2); }
.ig-money .ig-money-l { margin-right: 10px; font-weight: 600; color: var(--ink); }
.ig-money .ig-money-f + .ig-money-f::before { content: "·"; margin: 0 8px; color: var(--muted); }
.ig-money .ig-fig { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* a state no branch carries: said once, under the strip */
.ig-unclaimed {
  margin: 8px 0 0; padding-left: 10px; border-left: 2px solid var(--attn-line);
  font-size: var(--t-sm); line-height: 19px; color: var(--ink-2);
}

/* the sections and their tables */
.ig-sec { margin: 22px 0 0; }
.ig-sec .ig-h2 {
  margin: 0 0 4px; font: 650 16px/22px var(--sans); letter-spacing: -.01em;
  text-transform: none; color: var(--ink);
}
.ig-sec .ig-h2 .muted { font-size: var(--t-sm); font-weight: 400; letter-spacing: 0; }
.ig-sec .ig-say, .ig-sec .ig-scope {
  margin: 0 0 8px; max-width: 80ch; font-size: var(--t-sm); line-height: 19px; color: var(--ink-2);
}
.ig-sec .ig-scope + .tablewrap, .ig-sec .ig-say + .tablewrap { margin-top: 0; }
.integrity-table { width: 100%; }
.integrity-table th.ig-title { text-align: left; font-weight: 500; color: var(--ink); }
.integrity-table .ig-title .ig-sub:not([hidden]) {
  display: block; margin-top: 2px; font: 500 12px/16px var(--sans); color: var(--attn-ink);
}
.integrity-table td.ig-branch { color: var(--ink-2); }
.integrity-table td.col-date { white-space: nowrap; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.integrity-table td.ig-links { width: 1%; white-space: nowrap; text-align: right; }
.integrity-table .ig-link:not([hidden]) {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 28px; padding: 0 6px; border-radius: var(--r-sm);
  color: var(--muted); text-decoration: none;
}
.integrity-table .ig-link:hover { color: var(--accent); background: var(--surface-2); text-decoration: none; }
.integrity-table .ig-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.integrity-table .ig-link.ig-asana { font-size: 12px; font-weight: 500; }
.integrity-table tr.ig-band th { text-align: left; }
.integrity-table tr.ig-band .badge.kind { margin-left: 6px; }
.integrity-table tr.ig-band .ig-band-n { font-weight: 400; color: var(--muted); }
.integrity-table tr.ig-band .ig-band-note:not([hidden]) {
  display: block; margin-top: 2px; font-weight: 400; color: var(--ink-2);
}

/* the widget: the strip inside the card, the oldest finding as a sentence */
.integrity-card .ig-strip { margin-top: 0; }
.integrity-card .notice.ig-reason-line { margin: 0; }
.integrity-card .ig-oldest { margin: 10px 0 0; font-size: var(--t-table); line-height: 20px; color: var(--ink); }
.integrity-card .ig-door { margin: 10px 0 0; font-size: var(--t-sm); }
/* Company settings → Data integrity is a traditional table (owner decision
   2026-10-31, after the mockups of 2026-10-30): the Asana sync one line with
   its form behind Change, every rule a row with its switch and threshold
   inline, what it has open and the money on it from the feed, who changed
   it last, and a pencil that opens the rule in full in the kit's pop-out.
   One Save for the table. The switch is the kit's checkbox drawn as a
   track; everything is on the tokens, and nothing here is a loss. */

/* --- 1. THE ASANA SYNC, ONE LINE ------------------------------------------ */
.ig-sync-fold > .ig-sync-line:not([hidden]) {
  display: flex; align-items: flex-start; gap: 14px; padding: 14px 20px;
}
.ig-sync-state::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
}
.ig-sync-fold.is-off .ig-sync-state::before { background: var(--muted-2); }
.ig-sync-words {
  flex: 1 1 auto; min-width: 0; font-size: var(--t-sm); line-height: 19px; color: var(--muted);
}
.ig-sync-words strong { color: var(--ink-2); font-weight: 600; }
.ig-sync-change { flex: none; }

/* --- 2. THE RULES TABLE --------------------------------------------------- */
/* the block runs the pane's width: a table with six columns needs it */
.set-block.ig-rules-block { max-width: none; }
.ig-fact { margin: 0; flex: none; font-size: var(--t-sm); line-height: 20px; color: var(--muted); white-space: nowrap; }
.ig-fact strong { color: var(--ink); font-weight: 650; }
.ig-feed-note {
  margin: 0; padding: 0 20px 12px; max-width: 80ch;
  font-size: var(--t-sm); line-height: 19px; color: var(--ink-2);
}
.ig-bar .ig-find { flex: 1 1 260px; max-width: 420px; }
.ig-bar select { flex: none; }
/* the name column takes the room; a figure stays on one line; an off rule
   reads muted; a threshold's field sits beside its unit phrase */
table.ig-rules th.ig-name { font-weight: 500; color: var(--ink); white-space: normal; }
table.ig-rules th.ig-name .badge { margin-left: 6px; }
table.ig-rules td.ig-on { width: 1%; }
table.ig-rules td.ig-th { white-space: nowrap; color: var(--ink-2); }
table.ig-rules .ig-unit { margin-left: 6px; font-size: var(--t-sm); color: var(--muted); }
table.ig-rules td.ig-when { color: var(--muted); font-size: var(--t-sm); white-space: nowrap; }
table.ig-rules td.ig-open a { font-weight: 600; }
table.ig-rules tr.ig-off th.ig-name,
table.ig-rules tr.ig-off td.ig-th,
table.ig-rules tr.ig-off td.ig-when { color: var(--muted); }
.ig-pop-sent { margin: 10px 0 0; font-size: var(--t-14); line-height: 24px; color: var(--ink); }
.ig-pop-edit input[type="number"] { width: 72px; min-height: var(--ctl-h-sm); padding: 0 6px; text-align: right; }
.ig-pop-figs > div:not([hidden]) {
  display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r-md);
}
.ig-pop-kv dt { color: var(--muted); font-weight: 500; line-height: 19px; }
/* The rule builder and a custom rule's row: a "custom" badge on the row,
   the check in words where a threshold sits, the kit's pop-out with two
   tabs for Add a rule (Describe it / Set it up by hand), the read-back as
   the pop-out's key-value list, a refusal on the muted ground. Every colour
   is a token; nothing here is a loss. */

/* --- 1. THE TABLE ------------------------------------------------------- */
.ig-new-btn { flex: none; margin-left: 12px; }
table.ig-rules td.ig-th .ig-short { white-space: normal; font-size: var(--t-sm); color: var(--ink-2); }
.ig-cond-grid { margin: 14px 0 0; }
.ig-cond:not([hidden]) { display: contents; }
.ig-scope { grid-column: 1 / -1; margin: 9px 0; padding: 0; border: 0; }
.ig-scope > legend { font-size: var(--t-sm); font-weight: 500; color: var(--muted); padding: 0; margin: 0 0 4px; }
.ig-field:not([hidden]) { display: contents; }
.ig-task:not([hidden]) { display: flex; align-items: center; gap: 10px; }
.ig-words:not([hidden]) {
  display: block; width: 100%; min-height: 76px; padding: 8px 11px; font: inherit;
  font-size: var(--t-table); line-height: 1.45; color: var(--ink); background: var(--surface);
  border: 1px solid var(--field-line); border-radius: var(--r-md); resize: vertical; box-sizing: border-box;
}
.ig-words:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ig-words::placeholder { color: var(--muted); }
.ig-hint { margin: 10px 0 10px; font-size: var(--t-sm); line-height: 18px; }
.ig-lbl:not([hidden]) { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: var(--muted); margin: 0 0 6px; }
.ig-try, .ig-canread { margin: 12px 0 0; }
.ig-chips:not([hidden]) { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ig-chip:not([hidden]) {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--r-pill);
  border: 1px solid var(--field-line); background: var(--surface); font: inherit; font-size: 12px;
  color: var(--ink-2); cursor: pointer;
}
.ig-chip.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.ig-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- 2b. THE GUIDED FORM (2026-11-05) ------------------------------------- */
/* Numbered steps in the order a person says the rule, Record beside Counts,
   each field's label above its control, the live read-back on the muted
   ground, and the task switch inline on the left with its words beside it
   (it sat centred above a centred label). */
.ig-step:not([hidden]) {
  display: flex; align-items: center; gap: 8px; margin: 16px 0 2px;
  font-size: var(--t-sm); font-weight: 600; color: var(--ink-2);
}
.ig-cond > .ig-step:first-child { margin-top: 2px; }
.ig-step-n:not([hidden]) {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 20px; height: 20px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 700;
}
.ig-cond > .ig-scope { grid-column: auto; margin: 8px 0; }
.ig-cond > .ig-name > input { width: 100%; box-sizing: border-box; }
.ig-readback:not([hidden]) {
  margin: 10px 0 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface-2); font-size: var(--t-table); line-height: 20px; color: var(--ink);
}
.ig-readback > p + p { margin-top: 6px; }
.ig-rb-l:not([hidden]) {
  display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: var(--muted);
}
.ig-cond > .ig-task:not([hidden]) {
  display: flex; flex-direction: row; align-items: flex-start; justify-content: flex-start;
  gap: 10px; margin: 12px 0 2px; text-align: left; font-size: var(--t-table); color: var(--ink);
}
.ig-cond > .ig-task > .sw { flex: none; margin-top: 1px; }
.ig-task-t:not([hidden]) { display: flex; flex-direction: column; gap: 2px; }
.ig-task-t > .muted { font-size: var(--t-sm); }
/* DESCRIBE IT IN TWO STEPS: once a draft is back, the asking area folds
   into the one "You asked" line and the draft stands at the top, ending
   with what to do next. */
[data-ig-ask-area] > .ig-step:first-child, .ig-draft > .ig-step:first-child { margin-top: 2px; }
.ig-asked:not([hidden]) {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; margin: 2px 0 12px;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface-2); font-size: var(--t-sm); line-height: 18px; color: var(--ink-2);
}
.ig-asked > .ig-lbl:not([hidden]) { display: inline; margin: 0; }
.ig-asked > .linklike { margin-left: auto; }
.ig-draft:focus { outline: none; }
.ig-next:not([hidden]) {
  margin: 14px 0 0; padding: 10px 12px; border-left: 3px solid var(--accent);
  background: var(--accent-soft); border-radius: var(--r-md); font-size: var(--t-sm);
  line-height: 19px; color: var(--ink);
}
/* the pop-out's FORM holds its body and its foot, so the form takes the
   panel's clipping flex column: the body scrolls and the foot stays in
   view. Without it a drafted rule's read-back pushed "Add this rule" below
   the clipped edge, out of reach (owner report 2026-11-05). */
.ig-pop-custom .access-panel > form:not([hidden]) {
  display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0;
}

/* --- 3. THE READ-BACK AND THE REFUSAL ------------------------------------- */
.ig-draft-wait { margin: 12px 0 0; }
.ig-draft { margin: 14px 0 0; }
.ig-said:not([hidden]) { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: var(--t-table); line-height: 20px; color: var(--ink-2); }
.ig-said .ig-spark { flex: none; color: var(--accent); margin-top: 2px; }
.ig-ask:not([hidden]) {
  display: flex; flex-direction: column; gap: 8px; margin: 10px 0 0; padding: 10px 12px;
  border: 1px solid var(--warn-line); background: var(--warn-bg); border-radius: var(--r-md);
  color: var(--warn-ink); font-size: var(--t-sm); line-height: 18px;
}
.ig-draft .ig-pop-kv input { width: 100%; }
.ig-task-mirror:not([hidden]) { display: inline-flex; align-items: center; gap: 8px; }
.ig-refusal {
  margin: 14px 0 0; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface-2);
  border-radius: var(--r-md); font-size: var(--t-table); line-height: 20px; color: var(--ink);
}
.ig-closest > ul { margin: 0; padding-left: 18px; font-size: var(--t-sm); color: var(--ink-2); }
/* the pop-out's own hidden things stay hidden: the kit's button and label
   rules set a display of their own, which beats the UA's [hidden] */
.ig-pop-custom [hidden] { display: none; }
.pg-members legend { font-weight: 600; padding: 0 0 4px; }

@media (max-width: 640px) {
/* the phone: two figures a row, the money one figure a line, the table
   scrolls in its wrapper with the finding kept readable */
  .ig-strip:not([hidden]) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ig-strip > .ig-stat:nth-child(3) { border-left: 0; }
  .ig-strip > .ig-stat:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .ig-strip > .ig-stat:not([hidden]) { padding: 10px 12px; }
  .ig-money .ig-money-l:not([hidden]), .ig-money .ig-money-f:not([hidden]) { display: block; }
  .ig-money .ig-money-f + .ig-money-f::before { content: none; }
  .integrity-table th.ig-title { min-width: 200px; }
  .ig-filter .ig-cleared:not([hidden]) { white-space: normal; }

/* --- 4. THE PHONE --------------------------------------------------------- */
  .ig-sync-fold > .ig-sync-line:not([hidden]) { flex-wrap: wrap; }
  .ig-fact { white-space: normal; }
  .ig-pop-figs:not([hidden]) { grid-template-columns: minmax(0, 1fr); }

/* --- 4. THE PHONE --------------------------------------------------------- */
  .ig-new-btn { margin-left: 0; }
  .ig-tabs:not([hidden]) { padding: 8px 16px 0; gap: 14px; }
}

/* ===== SETUP AND THE NEW COMPANY [setup] =====
   Guided setup and the new-company wizard.
   --- kept from an old banner ---
   SETUP AND THE NEW COMPANY · C · guided setup and the intake wizard (2026-09-24)
*/

.wiz-step .attest-form label:where(:not([hidden])) {
  display: flex; flex-direction: column; align-items: stretch; gap: var(--s-1);
  margin: 0 0 var(--s-4); font-size: var(--t-sm); font-weight: 550; color: var(--ink-2);
}
.wiz-step .new-units label:where(:not([hidden])) { display: flex; align-items: center; gap: var(--s-2); }

.add-line { margin-top: 8px; background: none; border: 1px dashed var(--line);
  border-radius: 8px; padding: 6px 14px; font: inherit; color: var(--accent); cursor: pointer; }
.add-line:hover { border-color: var(--accent); }
.grant-check input { margin-right: 4px; vertical-align: -1px; }
.hc-history { font-size: 12.5px; }
.setup-form .count-new[hidden] { display: none; }
/* headcount plans */
.hc-plan { margin: 6px 0 16px; }
.hc-plan h4 { margin: 0 0 4px; font-size: 13.5px; }

/* the role pop-out (Company settings -> Employee headcount): two even columns,
   nothing wider than the panel; the save lives in the foot */
.hc-role-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hc-role-form input, .hc-role-form select { width: 100%; box-sizing: border-box; }

/* SIMPLIFICATION, PHASE 1 (2026-09-11): the fx chooser's grouped answers */
.setup-group { margin: 0 0 12px; }
.setup-status { vertical-align: 1px; }
table.grid tr.section-row .add-line-btn {
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; height: 18px; padding: 0 8px;
  border: 1px solid transparent; border-radius: var(--r-sm);
  background: transparent; color: var(--muted);
  font: inherit; font-size: 12px; font-weight: 500; line-height: 1;
  cursor: pointer; }
table.grid tr.section-row:hover .add-line-btn,
table.grid tr.section-row:focus-within .add-line-btn {
  border-color: var(--line); color: var(--accent); }
table.grid tr.section-row .add-line-btn:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px; }
.fx-panel .setup-q { margin: 0 0 var(--s-3); font-size: var(--t-14); font-weight: 650; color: var(--ink); }
.fx-panel .setup-group { margin: 0 0 var(--s-3); }
.fx-panel .setup-group-label {
  margin: 0 0 6px; font-size: var(--t-label); font-weight: 600;
  letter-spacing: 0; color: var(--muted);
}
.fx-add .setup-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
.fx-add .setup-choice {
  padding: 10px 12px; gap: 3px; border-radius: var(--r-md);
  border: 1px solid var(--field-line); background: var(--surface); color: var(--ink);
}
.fx-add .setup-choice:hover { border-color: var(--muted-2); }
.fx-add .setup-choice.on {
  border-color: var(--accent-line); background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

/* THE ANSWER'S FIELDS RIDE THE KIT. `.setup-form` is one of the kit's field
   containers, but the older `.setup-form > label` and `.setup-form
   input[type=text]` rules outrank a zero-specificity baseline, so this
   pop-out alone kept 12px muted labels and 7px `--line` fields. The kit's
   label and field (edge, radius, padding, hover, focus) are restated here
   at a weight that wins, and the form gains a rule above it: the question
   has been answered. The kit's `min-height` already reaches these fields. */
.fx-add .setup-form {
  margin-top: var(--s-3); padding-top: var(--s-3);
  border-top: 1px solid var(--line); gap: var(--s-3) var(--s-4);
}
.fx-add .setup-form > label {
  gap: var(--s-1); font-size: var(--t-sm); font-weight: 550; color: var(--ink-2);
}
.fx-add .setup-form :is(input[type="text"], input[type="month"], select):hover:not(:disabled) {
  border-color: var(--muted-2);
}
/* a formula is read left to right and needs the row to itself */
.fx-add .setup-form > label.fx-formula { flex: 1 1 100%; }
.fx-add .setup-note { color: var(--muted); }
.fx-add .setup-manual p { margin: 0; font-size: var(--t-table); line-height: 1.5; }
.contract-form .wiz-nav {
  position: sticky; bottom: 0; z-index: 4;
  display: flex; justify-content: flex-end; align-items: center; gap: 8px;
  margin: 20px -20px 0; padding: 12px 20px;
  background: var(--surface); border-top: 1px solid var(--line);
}
.contract-form .wiz-nav button:not(.primary):hover { border-color: var(--accent); color: var(--accent); }
.access-modal:is([id^="modal-size-"], [id^="modal-kpi"], [id^="modal-branch-"])
.rate-add :is(input, select):hover:not(:disabled) { border-color: var(--muted-2); }
/* Family 7, section C of the Mobbin redesign: LOOK, LAYOUT and HIERARCHY on
   the Guided setup page (and the Overview's compact copy of its list, which
   is the same partial) and on the New company wizard. No word moves, no hook
   moves, no behaviour changes; every colour is a token with a dark value.

   GUIDED SETUP (HoneyBook, Vanta, Adaline). Progress lived only in a 12.5px
   sentence, and ten done steps wore the same dot, the same bold title and
   the same full-ink sentence as the one step a person had come to find. The
   progress now has a shape - a thin bar beside the sentence that already
   says it - and the list reads by state: a DONE step recedes (its word is
   kept for a screen reader, the green mark with its tick says it), a step
   still to do keeps the full treatment with its state at the row's right
   edge, and the step the page names as next is a quiet card, the one thing
   on the page to do. The list takes the pane's width.

   NEW COMPANY (Navattic, Ghost). The wizard sits in the one shell like every
   signed-in page. Its three 55px pills, which all read "active" by the last
   step, are family 5's compact rail: numerals joined by hairlines, the
   current one filled, the ones behind it tinted, the ones ahead hollow.
   Each step is one card whose action sits in its foot; the line tables take
   the data-table grammar with a caption and scoped headers; the review is
   the health card's figure strip; and the buttons are the kit's three roles
   - primary, secondary, quiet - where there were three idioms of their own. */

/* --- 1. THE PROGRESS HAS A SHAPE (HoneyBook) -----------------------------
   The bar is decoration (the sentence carries the numbers, and the bar is
   hidden from a screen reader); it is the colour of the done mark, because
   it counts done marks. */
.setup-progress:where(:not([hidden])) {
  display: flex; align-items: center; gap: 12px; min-width: 0;
}
.setup-bar::-webkit-progress-bar { background: var(--track); border-radius: var(--r-pill); }
.setup-bar::-webkit-progress-value { background: var(--ok); border-radius: var(--r-pill); }
.setup-bar::-moz-progress-bar { background: var(--ok); border-radius: var(--r-pill); }

/* --- 2. THE LIST READS BY STATE (Adaline, Vanta) --------------------------
   The 760px cap goes: the list takes the pane. A row is the state mark, the
   title with its sentence under it, and - for a step still to do - its
   state at the right edge, so the column of states reads down the page.
   Every row carries the next step's card's inset (and a transparent edge
   where the card has its hairline), so the marks, the words and the states
   stand in one column whether or not a row is the card. */
.setup-steps { max-width: none; }
.setup-steps .setup-step.st-partly .setup-mark {
  border-color: var(--attn);
  background: linear-gradient(90deg, var(--attn) 50%, transparent 50%);
}
.setup-steps .setup-step.st-done .setup-mark { border-color: var(--ok); background: var(--ok); }
.setup-steps .setup-step.st-done .setup-mark::after {
  content: ""; position: absolute; left: 4px; top: 1.5px;
  width: 3.5px; height: 7px; box-sizing: content-box;
  border: solid var(--surface); border-width: 0 1.75px 1.75px 0;
  transform: rotate(45deg);
}
/* A DONE STEP RECEDES: the title a step quieter, the sentence muted, and its
   state word folded out of sight (not out of the page: a screen reader still
   reads "done" - the mark beside it is aria-hidden) */
.setup-steps .setup-step.st-done .setup-title { font-weight: 500; color: var(--ink-2); }
.setup-steps .setup-step.st-done .setup-title:hover { color: var(--accent); }
.setup-steps .setup-step.st-done .setup-detail { font-size: var(--t-sm); color: var(--muted); }
.setup-steps .setup-step.st-done .setup-status {
  position: absolute; width: 1px; height: 1px; margin: 0; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* THE NEXT STEP IS THE ONE THING TO DO: its title the page's one accent
   link, its sentence in full ink - and on the setup page its row a quiet
   card (the kit's item surface) among the hairlines */
.setup-steps .setup-step.is-next .setup-title { color: var(--accent); }
.setup-steps .setup-step.is-next .setup-detail { color: var(--ink); }
.setup-steps:not(.compact) .setup-step.is-next {
  margin: 6px 0; padding: 13px 14px; border-color: var(--line); border-radius: var(--r-md);
  background: var(--surface);
}
.setup-steps:not(.compact) .setup-step:has(+ .setup-step.is-next) {
  border-bottom-color: transparent;
}
.setup-steps.compact .setup-step:last-child { border-bottom-color: transparent; padding-bottom: 2px; }
.setup-steps.compact .setup-step:first-child { padding-top: 2px; }

/* --- 4. THE WIZARD JOINS THE PRODUCT (Navattic, Ghost) -------------------
   One column the width of the widest step, left on the page's axis like
   every other page's content. */
.wizard { max-width: 880px; }

/* THE STEP RAIL (family 5's): one line, numerals joined by hairlines. The
   script marks every step up to the current one `active` and the ones
   behind it `done`, so the CURRENT step is the active one that is not done. */
#stepper:where(:not([hidden])) {
  display: flex; align-items: center; gap: 0;
  margin: 0 0 var(--s-4); padding: 0; list-style: none;
}
#stepper li:where(:not([hidden])) {
  flex: 0 1 auto; display: flex; align-items: center; min-width: 0;
  margin: 0; padding: 0; background: none; border: 0; border-radius: 0;
  color: var(--muted); font-size: var(--t-sm); font-weight: 600; line-height: 22px;
  white-space: nowrap;
}
#stepper li:not(:last-child) { flex: 1 1 auto; }
#stepper li:not(:last-child)::after {
  content: ""; flex: 1 1 24px; min-width: 12px; height: 1px;
  margin: 0 12px; background: var(--line);
}
#stepper li::before {
  position: static; transform: none; flex: none; box-sizing: border-box;
  width: 22px; height: 22px; margin: 0 8px 0 0;
  background: transparent; border: 1px solid var(--field-line); color: var(--muted);
  font-size: 11.5px; font-weight: 600; line-height: 1;
}
#stepper li.active:not(.done)::before {
  background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent);
}
#stepper li.done::before {
  background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent);
}
#stepper li.done::after { background: var(--accent-line); }

/* ONE CARD PER STEP: the section surface (the Overview's), the step's action
   in its foot. The card is an inner wrapper, so the step's `hidden` - which
   the script sets on the <section> - is never fought by a display rule. */
.wiz-step > .set-block:where(:not([hidden])) {
  display: block; max-width: none; margin: 0; padding: 20px 24px 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
}
/* the foot: a hairline, the surface, the primary last at the right. It
   sticks to the bottom of the window while the step runs long (the line
   editor of a full template is several screens), so Next is always there. */
.wiz-step .wiz-nav.set-block-foot:where(:not([hidden])) {
  position: sticky; bottom: 0; z-index: 2;
  display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px;
  margin: 20px -24px 0; padding: 12px 24px;
  background: var(--surface); border-top: 1px solid var(--line);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.wiz-step .wiz-nav button:not(.primary):hover { border-color: var(--accent); color: var(--accent); }

/* STEP 2: the lede, the three shapes as choice tiles (the fx pop-out's), then
   one block per section */
.wiz-step .set-block > p.muted:first-child {
  margin: 0 0 var(--s-4); max-width: 68ch;
  font-size: var(--t-sm); line-height: 19px; color: var(--muted);
}
.wiz-step .new-codes-head:where(:not([hidden])) {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3);
  margin: 0 0 var(--s-2);
}
.wiz-step .new-codes-head > p { margin: 0; }
#new-codes tr.new-group > th {
  padding-top: var(--s-3); font-size: var(--t-sm); font-weight: 600; color: var(--muted);
}
#new-codes-count { margin: var(--s-2) 0 0; }
.wiz-step .new-sub { margin: var(--s-5) 0 var(--s-2); font-size: var(--t-13); font-weight: 600;
  text-transform: none; letter-spacing: 0; color: var(--ink); }
.wiz-step .new-add-row { margin: var(--s-2) 0 0; }
.wiz-step .new-units:where(:not([hidden])) {
  display: grid; gap: var(--s-2); margin: var(--s-3) 0 0; padding: 0; border: 0;
}
#new-export { margin: var(--s-3) 0 0; font-variant-numeric: tabular-nums; }

/* --- 12. THE OVERVIEW'S SETUP WIDGET IS FAMILY 3'S (5.8) -----------------
   `_setup_steps.html` renders the Overview's widget too (`compact`), and
   section C's rules for the setup page reached it: rows to the widget's
   width, a 16px ring, the badge at the far edge, the titles in ink. The
   widget keeps family 6's look, restated here: 760px, 7px rows under a
   hairline, a 12px mark, the title an accent link with its state badge
   after it on the same line, the detail muted. */
.setup-steps.compact { max-width: 760px; }
.setup-steps.compact .setup-step .setup-mark {
  position: static; width: 12px; height: 12px; margin-top: 5px;
  border: 2px solid var(--line); background: transparent;
}
.setup-steps.compact .setup-step.st-partly .setup-mark { border-color: var(--attn); background: var(--attn); }
.setup-steps.compact .setup-step.st-done .setup-mark { border-color: var(--ok); background: var(--ok); }
.setup-steps.compact .setup-step .setup-body:not([hidden]) { display: block; }
.setup-steps.compact .setup-step .setup-title {
  margin: 0 8px 0 0; font-size: inherit; font-weight: 600; line-height: inherit; color: var(--accent);
}
.setup-steps.compact .setup-step .setup-status { margin: 0; vertical-align: 1px; }
.setup-steps.compact .setup-step .setup-detail,
.setup-steps.compact .setup-step.is-next .setup-detail {
  margin: 2px 0 0; max-width: none; font-size: 13px; line-height: inherit; color: var(--muted);
}
/* the rule a module carries, then the paragraph on fading: two quiet lines
   under the table */
.access-body .grant-dep { margin: 12px 2px 0; font-size: 12px; color: var(--ink-2); }
.access-body .grant-dep + .grant-note { margin-top: 4px; }

/* ---- FORMULA HELP (2026-09-30, SPEC §6.81): the live preview and the cell undo ----
   The two follow-ups family 4 left (SPEC §6.67), approved by the owner on
   2026-09-30. Nothing inside a statement cell moves: the undo is a line in
   the cell's own detail and a key, and the preview is a band in the fx
   pop-out's formula form. Every colour is a token; nothing is restated.

   THE PREVIEW is a reading of the formula, not a plan on the line, so it
   takes the calc band's quiet grammar (a 2px `--line` rule, `--ink-2`
   words), not a card. It holds a row of its own in the form's wrapping
   flex row, under the field it describes. Its figures are the grid's: mono,
   tabular, right-aligned, at the table size (no mono under 12px), three
   months a row, one on a phone; a figure wider than its column (a ceiling
   figure, a bracketed seven-digit loss) wraps under its month, still
   right-aligned, and is never cut (review 2026-09-30, C3). A refusal is
   ATTENTION, the `--attn` rule with the words in ink, never `--err`, which
   is a loss and nothing else. A part with nothing in it takes no room. */
.fx-add .setup-form > .fx-preview {
  flex: 1 1 100%; min-width: 0; margin: 0;
  padding: 2px 0 2px 12px; border-left: 2px solid var(--line);
  font-size: var(--t-sm); line-height: 1.45; color: var(--ink-2);
}
.fx-add .setup-form > .fx-preview.refused { border-left-color: var(--attn); }
.contract-panel .fee-rows-head > .muted:not([hidden]) { display: inline; font-weight: 400;
  font-size: 12px; }
:is(#new-codes, #new-added, #new-people) :is(input, select):focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}

@media (max-width: 640px) {
  .board-sheet table.board-table.tbl-grid :is(.gl, .cell-sub) { font-size: var(--t-12); }
}

/* --- 11. GUIDED SETUP: THE DONE WORD COMES BACK, QUIET (item 2) ----------
   The help article says every step reads "done", "partly done" or nothing
   at all, and an article describes what the product does today. The done
   step's badge shows again in the quietest state outline — muted words, a
   hairline edge, 11px — beside the green mark, the receded title and the
   muted detail, which stay as they are. */
ol.setup-steps .setup-step.st-done .setup-status {
  position: static; width: auto; height: auto; overflow: visible; clip: auto;
  padding: 0 7px; margin: 0; white-space: nowrap;
  font-size: 11px; color: var(--muted); background: transparent;
  border: 1px solid var(--line);
}

@media (max-width: 640px) {
  /* one answer a row, one field a row, and a fee's label over its figures */
  .fx-add .setup-choices { grid-template-columns: minmax(0, 1fr); }
  .fx-add .setup-form > label { flex: 1 1 100%; }
  .contract-form .wiz-nav { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
}

.contract-panel .wiz-nav { margin-top: 12px; padding-top: 10px; }

@media (width <= 640px) {
/* --- 6. THE PHONE --------------------------------------------------------
   The progress sentence first and the bar under it at the width of the
   column; a step's state under its title; the wizard one column with its
   foot pinned, the rail on one line (the names of the steps not current
   folded out of sight, never out of the page), the tiles and the review
   stacked, the line tables scrolling inside their wrappers. */
  .setup-progress:where(:not([hidden])) { flex-direction: column; align-items: stretch; gap: 8px; }
  .setup-steps .setup-body:where(:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  .setup-steps .setup-detail { grid-row: 3; }

  .wiz-step > .set-block:where(:not([hidden])) { padding: 16px 16px 0; }
  .wiz-step .wiz-nav.set-block-foot:where(:not([hidden])) { margin: 16px -16px 0; padding: 12px 16px; }
  :is(#new-codes, #new-added, #new-people) { min-width: 600px; }
  /* the progress bar is a line of its own, the column's width (5.17) */
  .page-head.suite > div:first-child > .setup-progress:not([hidden]) { align-self: stretch; }
}

@media (width <= 480px) {
  #stepper li:not(.active)::before, #stepper li.done::before { margin-right: 0; }
  #stepper li:not(:last-child)::after { margin: 0 8px; }
}

@media print {
/* --- 5. PRINT: the setup page prints as the workbook ---------------------
   its marks and its bar keep their colour on paper, the next step's card
   loses its ground, and no step splits across two pages. */
  .setup-bar, .setup-mark { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (width <= 640px) {
  .setup-bar { order: 2; width: 100%; }
}

@media print {
  .setup-steps:not(.compact) .setup-step.is-next { background: none; }
}

@media (width <= 640px) {
  .setup-steps:not(.compact) .setup-step.is-next { padding: 12px 10px; }
}

.setup-steps.compact > .setup-step:nth-child(n) {
  position: static; align-items: stretch; gap: 12px; padding: 7px 0;
  border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; background: none;
}

/* ===== CLOSING A MONTH AND THE MONTHLY REPORT [close-report] =====
   The close: its gate, its facts, the second signature; and the monthly report.
   --- kept from an old banner ---
   THE GRID — third pass (2026-09-08). How many months a reader can
   actually see, the scroll container's OWN right edge, and the two
   keyboard paths to what a tick means.
   --- kept from an old banner ---
   THE CLOSE AND THE REPORT · A · closing a month and the monthly report (2026-09-24)
   --- kept from an old banner ---
   THE PDF PASS (2026-09-30) · the board headings, the report's paper, the scenario's heads
*/

.close-reason.needed textarea { border-color: var(--attn); }
.help-list dt:first-of-type { border-top: 0; }

/* --- 3. THE FIVE FIGURES ---------------------------------------------------
   The list table keeps its grammar (the caption, the scoped headers, the
   basis under each column) in a card on the column; the three money columns
   take one width each, so at the column's measure the gap between a label
   and its first figure closes, and the Change cell is the figure over its
   percent. */
.close-month > .tablewrap,
details.lock-list > .tablewrap {
  display: flex; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.close-month > .tablewrap > table,
details.lock-list > .tablewrap > table { flex: 1 0 auto; }

.report-table { width: 100%; box-shadow: none; }
.attest-form .mp select { width: auto; flex: 1 1 50%; margin-top: 0; }
.report-actions .linklike:hover { text-decoration: underline; }
.report-table td.num.check-off { color: var(--err); }
/* ONE HEADLINE STRIP (review 2026-09-08, 06-N6): the page wears the packet's
   `.board-figs` / `.bf` grammar — hairline rows, label over figure — instead
   of the boxed `.card` tiles it drew from the same context the PDF and the
   packet render as rows. `.report-cards` is gone with them. */
.report-figs { margin: 0 0 18px; }
.report-table tfoot td { font-weight: 700; border-top: 1.5px solid var(--ink); }
/* the firm's logo, as on the board packet (review 2026-09-07, N8) */
.report-logo { display: inline-flex; align-items: center; margin-bottom: 8px; }
.report-logo img { height: 28px; width: auto; display: block; }
/* the statement's bottom lines: no head, a rule over the closing figure */
.report-close { margin-top: -1px; }
/* 2px, like the attest schedule's statement rule: the closing row lives in the
   tbody, so the row above keeps its own 1px border and a 1.5px rule that
   rounds to one device pixel loses the tie */
/* 06-N5: 9px of air over the rule, or it clips the sub-line of the row above
   it and the sub-line reads as this row's caption */
.report-close tbody tr.total th, .report-close tbody tr.total td {
  font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0;
  padding-top: 9px; }
.attest-table tr.statement-break:hover td { background: var(--surface); }

/* F1 / F9 — the monthly report's sections share one column geometry. The
   month is stated once per statement, so most section tables have no column
   header to size their columns off; pinning the figure column keeps every
   section's right edge on one line. */
/* no `.part-head`, no `tr.carried`: the SCREEN never splits a section (review
   2026-09-09, 06-T1) — a scrolling page has no fold to carry a figure over,
   so the fragment header and the carried-forward row are the export's alone
   and the PDF styles them in its own stylesheet. */
.report-table td.num, .report-table th.num { width: 22%; }
.report-table tfoot td, .report-table tfoot th[scope="row"] {
  font-weight: 700; border-top: 1.5px solid var(--ink); }
/* the run of lines with no activity, named on one row (06-F10) */
.report-table tr.zero-run th[scope="row"] { color: var(--ink-2); }

/* N6 — the report's nine equal 700-weight rows under nine ink rules. A
   section total is a SUBTOTAL of its statement; the statement's bottom line
   (Net income, the Check) is the anchor. Hairline, no fill: this sheet has a
   PDF twin and the two must read alike at the place a reader stops (N5). */
.report-table tfoot td, .report-table tfoot th[scope="row"] {
  font-weight: 600; background: var(--surface);
  border-top: 1px solid var(--line); }
.report-close tbody tr.total td.num { font-size: var(--t-16); }
.report-table .sub { display: block; margin-bottom: 3px; }
.badge.state.signoff { color: var(--attn-ink); border-color: var(--attn-line); background: var(--attn-bg); }
.signoff p { margin: 4px 0; }

/* CLOSE THE MONTH (M-2): the attest page's first section — this month
   beside last month, what is entered, what looks wrong. The figures are a
   list table like every other, so nothing here is a new primitive. */
.close-month { margin: 18px 0 8px; }
.close-reason textarea { display: block; width: 100%; min-height: 62px;
  margin-top: 4px; font: inherit; padding: 8px 10px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
/* the attest schedule and the Cost codes table carry the same words in a
   free-flowing cell, so the tag wraps with the line's name */
.attest-schedule .tag-cogs, .codes-table .tag-cogs,
.codes-legend .tag-cogs { white-space: normal; }
.sig-decide > p { max-width: 640px; }
.sig-decide form + form, .sig-decide p + form { margin-top: 10px; }
.sig-decide textarea { display: block; width: 100%; min-height: 62px;
  margin-top: 4px; font: inherit; padding: 8px 10px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.sig-check input { margin-right: 6px; vertical-align: -1px; }
/* the row's approval badge is a BADGE: `.signoff` is also the sign-off
   block's class, whose 13px and 10px top margin it was inheriting */
.contracts-table th[scope="row"] .badge.signoff { font-size: 11px; margin: 0 0 0 4px; }
/* the badge carries `.signoff` too: every rule for the block names the div */
.contract-panel div.signoff > p > .badge.signoff { display: table; margin: 0 0 6px; }
.contract-panel .signoff-form {
  display: flex; align-items: flex-end; justify-content: flex-end; flex-wrap: wrap;
  gap: 8px; margin-top: 10px;
}
.contract-panel .signoff-form label.grow { flex: 0 1 380px; min-width: 0; }
.contract-panel .signoff-form button.linklike {
  min-height: var(--ctl-h); padding: 0 10px; border-radius: var(--r-md);
  font-size: var(--t-table); font-weight: 600;
}
.contract-panel .signoff-form button.linklike:hover { background: var(--surface-2); text-decoration: none; }

/* --- A BADGE THAT WRAPS STARTS ON THE TEXT'S EDGE --------------------- */
/* The markup carries a space before each badge, so inline it keeps a word
   space; a margin on top of that sat the badge 4-6px in when the name
   wrapped it to its own line (the pending row, the band on a phone). */
.contracts-table th[scope="row"] .badge.signoff { margin: 0; }

/* STEP 1: the two fields on the kit's field, one column (Arcade) */
.wiz-step .attest-form {
  max-width: 480px; margin: 0; padding: 0;
  background: none; border: 0; border-radius: 0; box-shadow: none;
}
.wiz-step .attest-form label:last-child { margin-bottom: 0; }
.wiz-step .attest-form input::placeholder { color: var(--muted-2); }
.wiz-step .attest-form label > .muted {
  font-size: 12px; font-weight: 400; line-height: 17px; color: var(--muted);
}
.close-month { margin: 0 0 var(--s-4); }
.close-month > p.muted:first-child { margin: 0 0 var(--s-3); line-height: 20px; }
main:has(> section.close-month) > p.notice.ok > .close-fact:not([hidden]) { display: block; }
main:has(> section.close-month) > p.notice.ok > .close-fact:first-child {
  margin-bottom: 2px; font-weight: 600; color: var(--ink);
}
main:has(> section.close-month) > p.notice.ok > .close-fact:last-child { margin-top: 6px; }

/* THE SIGNATURE TRAIL: the request first (the step taken, the muted state
   outline), then the wait (the step awaited, `--attn`), joined by a hairline;
   the rest of the notice reads under them on the same text edge. The card is
   the surface with the attention rule, so both marks read on it. */
main:has(> section.close-month) > p.notice.warn.sig-wait {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--attn); border-radius: var(--r-lg);
  padding: 14px 20px 14px 17px; font-size: var(--t-table); line-height: 20px;
  color: var(--ink-2);
}
.sig-wait > .sig-trail::before {
  content: ""; position: absolute; left: 4px; top: 15px; bottom: 15px;
  border-left: 1px solid var(--line);
}
.sig-wait .sig-step:not([hidden]) {
  display: block; position: relative; padding-left: 22px; color: var(--ink);
}
.sig-wait .sig-step::before {
  content: ""; position: absolute; left: 0; top: 5px;
  width: 9px; height: 9px; border-radius: 50%; box-sizing: border-box;
}
.sig-wait .sig-done { order: -1; color: var(--ink-2); }
.sig-wait .sig-done::first-letter { text-transform: uppercase; }
.sig-wait .sig-done::before { border: 1.5px solid var(--muted); background: var(--surface); }
.sig-wait .sig-now::before { background: var(--attn); }
.sig-wait .sig-now strong { font-weight: 650; }
.sig-wait .sig-sep { display: none; }
.sig-wait > .sig-rest:not([hidden]) { display: block; padding-left: 22px; }
table.dt.close-figs > * > tr > :first-child { padding-left: 20px; }
table.dt.close-figs > * > tr > :last-child { padding-right: 20px; }
table.dt.close-figs thead th:not(:first-child) { width: 23%; }
table.dt.close-figs tbody th[scope="row"] { white-space: nowrap; }
table.dt.close-figs tbody tr:last-child > * { border-bottom: 0; }
/* one row height for the figure-over-percent cells and the one-line ones */
table.dt.close-figs tbody > tr > :is(th, td) { height: 44px; padding-top: 0; padding-bottom: 0; }
table.dt.close-figs td.num { line-height: 18px; }
table.dt.close-figs td.num .th-sub {
  display: block; font-size: var(--t-label); line-height: 15px; font-weight: 400;
  color: var(--muted);
}
/* net cash change reads under the card, as the table's footnote */
.close-month > .tablewrap + p.muted {
  margin: 8px 0 0; padding: 0 20px; font-size: var(--t-sm); line-height: 18px;
  font-variant-numeric: tabular-nums;
}

/* --- 4. THE READINESS CARD (7shifts) ---------------------------------------
   The gates, a row each and in their order: how much of the statement is
   entered and how much of that is a placeholder, each count its gate's
   badge; then either "Nothing looks out of line" or the warning panel as the
   card's last band, directly over the form it gates. */
.close-month > .close-ready { margin: var(--s-4) 0 0; }
.close-ready > .close-gate, .close-ready > .close-ok {
  margin: 0; padding: 12px 20px; font-size: var(--t-table); line-height: 20px;
  color: var(--ink-2);
}
.close-month .close-ready > .close-warn {
  margin: 0; border: 0; border-top: 1px solid var(--warn-line);
  border-left: 3px solid var(--attn); border-radius: 0;
  padding: 14px 20px 16px 17px; line-height: 20px;
}
.close-month .close-ready > .close-warn h3 {
  margin: 0 0 6px; font-size: var(--t-14); font-weight: 650; line-height: 20px; color: var(--ink);
}
.close-ready > .close-warn li { font-size: var(--t-table); line-height: 20px; color: var(--ink); }
.close-ready > .close-warn > p.muted {
  margin: 0; font-size: var(--t-sm); line-height: 19px; color: var(--ink-2);
}
/* the action the panel exists to prompt: the panel's own ink, underlined —
   `--accent` on the amber ground was the page's faintest text in dark */
.close-ready > .close-warn a {
  color: var(--attn-ink); font-weight: 600; text-decoration: underline;
  text-underline-offset: 2px; text-decoration-thickness: 1px;
}
.close-ready > .close-warn a:hover { text-decoration-thickness: 2px; }

/* --- 5. THE BRANCHES' READINESS: one block on the column -------------------- */
.set-block.close-branches { margin: 0 0 var(--s-4); }
.close-branches > .set-block-head { padding-bottom: 12px; }
/* a row that wraps (a branch's code, its missing lines, its link) keeps air;
   the missing lines read UNDER the badge that counts them, as the template's
   own note says they do */
.close-branches > .tablewrap > table.dt > tbody > tr > :is(th, td) {
  padding-top: 8px; padding-bottom: 8px; line-height: 18px;
}
.close-branches > .tablewrap > table.dt td .th-sub {
  display: block; margin-top: 3px; font-size: var(--t-label); line-height: 16px;
  font-weight: 400; color: var(--muted);
}

/* --- 6. THE PUBLISH CARD ----------------------------------------------------
   Above the schedule now (owner decision). The date and the sentence that
   explains it share a row; the note and the reason run the card's width on
   the kit's field; the button is the page's one primary, in a foot at the
   card's right with what it does beside it. */
main:has(> section.close-month) > form.attest-form:not([hidden]) {
  display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  column-gap: 20px; margin: 0 0 var(--s-4); padding: 20px 20px 0;
  border-radius: var(--r-lg);
}
main:has(> section.close-month) > form.attest-form > * { grid-column: 1 / -1; }
main:has(> section.close-month) > form.attest-form > .notice { margin: 0 0 16px; }
/* a branch's own sign-off says so at the head of the card, on the card's
   quiet ground (the plain notice has none of its own) */
main:has(> section.close-month) > form.attest-form > p.notice:not(.ok):not(.warn):not(.error) {
  padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); font-size: var(--t-table); line-height: 20px; color: var(--ink-2);
}
form.attest-form > label:not([hidden]) {
  display: flex; flex-direction: column; gap: 4px; margin: 0 0 16px;
  font-size: var(--t-sm); font-weight: 550; line-height: 18px; color: var(--ink-2);
}
main:has(> section.close-month) > form.attest-form > label:has(> input[name="data_through"]) {
  grid-column: 1;
}
main:has(> section.close-month) > form.attest-form > label:has(> input[name="data_through"]) + p.muted {
  grid-column: 2; align-self: end; margin: 0 0 16px; max-width: 58ch;
  font-size: var(--t-sm); line-height: 18px;
}
form.attest-form > label > :is(input[type="date"], input[type="text"]):hover:not(:focus) {
  border-color: var(--muted-2);
}
form.attest-form > label > :is(input[type="date"], input[type="text"]):focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
/* the reason field: the kit's field, and attention — never red — when the
   publication was refused for the want of it */
form.attest-form > .close-reason { max-width: none; }
form.attest-form > .close-reason textarea {
  min-height: 72px; margin-top: 0; padding: 8px 11px; line-height: 1.45;
  font-size: var(--t-table); border-color: var(--field-line); border-radius: var(--r-md);
  resize: vertical;
}
form.attest-form > .close-reason textarea:hover:not(:focus) { border-color: var(--muted-2); }
form.attest-form > .close-reason textarea:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
form.attest-form > .close-reason.needed { color: var(--attn-ink); }
form.attest-form > .close-reason.needed textarea {
  border-color: var(--attn); box-shadow: 0 0 0 1px var(--attn);
}
form.attest-form > .close-reason.needed textarea:focus { box-shadow: none; }
/* the foot: what the button does at the left, the button at the right */
form.attest-form > .attest-foot:not([hidden]) {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px;
  align-items: center; margin: 4px -20px 0; padding: 12px 20px;
  border-top: 1px solid var(--line);
}
.attest-foot > p { grid-column: 1; margin: 0; max-width: none; font-size: var(--t-sm); line-height: 18px; }
.attest-foot > p + p { margin-top: 4px; }
.attest-foot > button { grid-column: 2; grid-row: 1 / span 2; justify-self: end; }

/* --- 7. THE SECOND SIGNER'S DECISIONS ON ONE FOOT RULE -----------------------
   The attention rule down the card's left says the month waits on a person;
   the two decisions sit in the card's foot, the primary last. */
main:has(> section.close-month) > .attest-form.sig-decide {
  margin: 0 0 var(--s-4); padding: 16px 20px 16px 17px; border-radius: var(--r-lg);
}
.sig-decide > p { margin: 0 0 12px; max-width: none; font-size: var(--t-table); line-height: 20px; }
.sig-decide > p:not(.muted):not(.notice) { color: var(--ink-2); }
.sig-decide > p:last-child { margin-bottom: 0; }
.sig-decide > .notice.warn { margin: 0 0 12px; }
.sig-decide > form.form-grid { margin: 0; }
.sig-decide > form.form-grid > label.span2 { margin: 0 0 16px; }
.sig-decide textarea {
  min-height: 72px; margin-top: 0; padding: 8px 11px; line-height: 1.45; font-size: var(--t-table);
  border-color: var(--field-line); border-radius: var(--r-md);
}
.sig-decide textarea:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
.sig-decide .sig-foot > .btn-secondary { order: -1; margin-left: 0; }
details.lock-list > .tablewrap > table.attest-table {
  border: 0; border-radius: 0; box-shadow: none; overflow: visible;
}
details.lock-list table.attest-schedule > * > tr > :first-child { padding-left: 20px; }
details.lock-list table.attest-schedule > * > tr > :last-child { padding-right: 20px; }
/* a line keeps its step under its band: the card's 20px plus the list's 24 */
details.lock-list table.attest-schedule > tbody > tr.child-row > :first-child { padding-left: 44px; }
/* a tag is a short label: it never breaks inside its own pill */
details.lock-list table.attest-schedule .tag { white-space: nowrap; }

/* --- 9. THE REPORT'S ACTION ROW (Square, the board toolbar) -----------------
   The browser's print is the secondary, the PDF the one primary, both at the
   sheet's right edge on one baseline; the sentence about what the sheet holds
   is the caption under the bar, not a third control-shaped thing beside it. */
.report-actions:not([hidden]) {
  display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center;
  gap: 6px 8px; max-width: 900px; margin: 0 0 var(--s-4);
}
.report-actions > button.linklike:hover {
  background: var(--surface); border-color: var(--accent); color: var(--accent);
  text-decoration: none;
}
.report-actions > a.primary { order: 2; }
.report-actions > span.muted {
  order: 3; flex: 1 0 100%; text-align: right;
  font-size: var(--t-sm); line-height: 18px;
}
/* The critique of 2026-09-28 (SPEC §6.74) found the card's weight on its
   furniture while the attestation was its finest print, and the owner's
   half-screen width an afterthought. The owner's answers (SPEC §6.75): a
   line in ink under the verdict says how far publishing has got, with one
   filled action while a month waits; the anchor figure is the one the lead
   is about; "Open the queue" is quiet; Holding steady is ink; one verdict
   on every card and on the packet; the rail starts folded under 1100px
   unless it was opened; every placeholder clears 4.5:1. Nothing here moves
   a figure. */

/* -- 1. THE LINE UNDER THE VERDICT -------------------------------------------
   one line in 13px ink under the verdict: how far the company is published,
   then what is still open. The first clause keeps `pub-mini` as its hook,
   so the label line's 11px muted look is undone here. The sentence takes
   its own width and the close sits beside it (a growing text box pushed it
   391px away at 1440, to the card's edge); where the two do not fit on one
   line the button wraps under the sentence. The markup binds each dot to
   the clause after it, and `pretty` keeps a word from standing alone. */
.sig-line { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap;
  margin: 2px 0 12px; }
.sig-text .pub-mini { margin: 0; font-size: inherit; font-weight: 600; letter-spacing: 0;
  color: inherit; }
.sig-text .sig-sep { color: var(--muted); }
.sig-act { flex: none; }
/* the head is the packet's: a 1px ink rule, the logo at the sheet's 34px, the
   company as the kicker, the title at the PDF's 18pt, and the attestation
   quiet with its names in ink */
.report-sheet .report-head { border-bottom: 1px solid var(--ink); }
.report-sheet .report-logo img { height: 34px; }
.report-sheet .report-entity {
  font-size: var(--t-12); font-weight: 700; letter-spacing: .14em; line-height: 16px;
  text-transform: uppercase; color: var(--muted);
}
.report-sheet .report-title {
  font-size: var(--t-20); font-weight: 600; letter-spacing: -.02em; line-height: 28px; color: var(--ink);
}
.report-sheet .report-meta { font-size: var(--t-12); line-height: 18px; color: var(--muted); }
/* a table's head is the packet's (the PDF's `table.tbl thead th`): no band,
   the header type over a 1px ink rule */
.report-sheet .report-table thead th {
  background: none; color: var(--muted); border-bottom: 1px solid var(--ink);
  font: 600 var(--t-12)/1.3 var(--sans); letter-spacing: .02em; text-transform: none;
  padding: 6px 10px; vertical-align: bottom;
}
/* the foot is the packet's (the PDF's `.foot`): 11px muted over a hairline */
.report-sheet .report-foot {
  margin-top: 24px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: var(--t-12); line-height: 17px; color: var(--muted);
}
.contract-panel div.signoff { margin-top: 10px; padding-top: 10px; }
main.page-reading .attest-table th .th-sub { font-size: var(--t-12); }

@media (max-width: 640px) {
  .contract-panel .signoff-form label.grow { flex: 1 1 100%; }
  /* THE TWO SIGN-OFF SCREENS (owner decision 1 of 2026-11-19 names the
     approver; drawn and shown 2026-11-19, SPEC §6.174). The close's figures
     are a row for each figure, with the report's small tables above: as a
     table three columns wide they fitted 390px and slid sideways at 375px. A
     contract's approval takes the shape of the close's: the note, then the
     act that signs, then the one that sends it back, each the width of the
     sheet. */
  .contract-panel .signoff-form > button { width: 100%; text-align: center; }
}

@media (width <= 640px) {
  .wiz-step .attest-form { max-width: none; }
}

@media screen and (width <= 640px) {
/* --- 10. THE PHONE ----------------------------------------------------------
   One column already; under 640px the date and its sentence stack, every
   action in a foot is full width (the second signer's two stack, the
   primary first), the figures' Figure column wraps rather than pushing the
   table past the screen, and the report's head stacks with its paper kept. */
  main:has(> section.close-month) > form.attest-form:not([hidden]) {
    grid-template-columns: minmax(0, 1fr); padding: 16px 16px 0;
  }
  main:has(> section.close-month) > form.attest-form > label:has(> input[name="data_through"]) + p.muted {
    grid-column: 1 / -1; margin-top: -8px;
  }
  form.attest-form > .attest-foot:not([hidden]) {
    grid-template-columns: minmax(0, 1fr); row-gap: 10px; margin: 4px -16px 0; padding: 12px 16px;
  }
  .attest-foot > button { grid-column: 1; grid-row: auto; justify-self: stretch; width: 100%; }
  .attest-foot > p + p { margin-top: 0; }
  .sig-decide > form:not(.form-grid):not([hidden]),
  .sig-decide .sig-foot:not([hidden]) { flex-direction: column; align-items: stretch; }
  .sig-decide .sig-foot > .btn-secondary { order: 0; }
  .sig-decide > form:not(.form-grid) > button,
  .sig-decide .sig-foot > button { width: 100%; }
  .close-month > .tablewrap + p.muted { padding: 0 12px; }
  /* the branches' table keeps its columns and scrolls in its card, with the
     kit's right-edge shade, rather than wrapping every cell to a ribbon */
  .close-branches > .tablewrap > table.dt { min-width: 560px; }
  /* the schedule: a line's step shortens to the phone, and the cells give
     back their air so the four columns come as near the screen as they can */
  details.lock-list table.attest-schedule > * > tr > :is(th, td) { padding-left: 6px; padding-right: 6px; }
  details.lock-list table.attest-schedule > * > tr > :first-child { padding-left: 12px; }
  details.lock-list table.attest-schedule > * > tr > :last-child { padding-right: 12px; }
  details.lock-list table.attest-schedule > tbody > tr.child-row > :first-child { padding-left: 24px; }
  .report-actions > :is(a.primary, button.linklike) { flex: 1 1 0; text-align: center; justify-content: center; }
}

/* a name or a date never breaks inside itself (the print fallback split
   "Jul / 31, 2026") */
.report-sheet .report-meta strong { color: var(--ink); white-space: nowrap; }

@media screen and (width <= 640px) {
  .report-actions > span.muted { text-align: left; }
  .report-head:not([hidden]) { flex-direction: column; gap: 12px; }
  .report-meta { text-align: left; }

  details.lock-list table.attest-schedule .tag:not([hidden]) {
    display: inline-block; white-space: nowrap;
    margin-left: 0; padding-left: 5px; padding-right: 5px; letter-spacing: 0;
  }
  details.lock-list table.attest-schedule > * > tr > :is(th, td) { padding-left: 4px; padding-right: 4px; }
  details.lock-list table.attest-schedule > * > tr > :first-child { padding-left: 12px; }
  details.lock-list table.attest-schedule > * > tr > :last-child { padding-right: 10px; }
  details.lock-list table.attest-schedule > tbody > tr.child-row > :first-child { padding-left: 20px; }
}

@supports (animation-timeline: scroll()) {
  .close-month > .tablewrap::after,
  details.lock-list > .tablewrap::after {
    content: ""; flex: none; align-self: stretch;
    width: 18px; margin-left: -18px;
    position: sticky; right: 0; z-index: 3;
    opacity: 0; pointer-events: none;
    background: linear-gradient(to left, var(--shade-edge), transparent);
    animation: kit-shade-bottom linear both;
    animation-timeline: scroll(nearest inline);
    animation-range: calc(100% - 12px) 100%;
  }
}

@media print {
  .report-sheet { box-shadow: none !important; border: 0; border-radius: 0;
    max-width: none; padding: 0; }
}

@media screen and (width <= 640px) {
  .report-sheet { padding: 20px 16px 24px; }
}

/* --- 2. THE REPORT TAKES ITS PDF'S PAPER -----------------------------------
   The monthly report's PDF already wore the packet's paper; its page did not
   (a 2px head rule, a 19px title, a 12px tracked company name, table heads on
   a tinted band, the app's 12px card). The page takes the paper now, as the
   board packet's page does. The group bands (the band grammar, 06-N12), the
   out-of-balance red (06-N1), the revisions-pending notice and every word
   stay.
   THE PALETTE: `.report-sheet` pinned the paper as literal hexes, the last
   hand-typed copy of it in this file. It is restated from the `--*-light`
   aliases, as `.board-sheet` pins them: every token the earlier block
   declares is declared again here, so none of its hexes applies, and the
   values are the same (routes.LIGHT_PALETTE == the aliases, tested). The
   `board-sheet` class is not added: its descendant rules would reach the
   report. */
.report-sheet {
  color-scheme: light;
  --surface: var(--surface-light); --bg: var(--bg-light); --ink: var(--ink-light);
  --ink-2: var(--ink-2-light); --muted: var(--muted-light);
  --line: var(--line-light); --line-soft: var(--line-soft-light);
  --surface-2: var(--surface-2-light); --track: var(--track-light); --sum-bg: var(--sum-bg-light);
  --muted-2: var(--muted-2-light); --inverse: var(--inverse-light);
  --inverse-ink: var(--inverse-ink-light);
  --accent: var(--accent-light); --accent-hover: var(--accent-hover-light);
  --accent-soft: var(--accent-soft-light); --accent-line: var(--accent-line-light);
  --lav: var(--lav-light); --lav-soft: var(--lav-soft-light);
  --attn: var(--attn-light); --attn-bg: var(--attn-bg-light); --attn-line: var(--attn-line-light);
  --attn-ink: var(--attn-ink-light);
  --ok: var(--ok-light); --ok-bg: var(--ok-bg-light); --ok-line: var(--ok-line-light);
  --fav-ink: var(--fav-ink-light);
  --warn: var(--warn-light); --warn-bg: var(--warn-bg-light); --warn-line: var(--warn-line-light);
  --err: var(--err-light); --err-bg: var(--err-bg-light); --err-line: var(--err-line-light);
  background: var(--surface-light);
  /* the packet's paper: a 4px sheet on the packet's NEUTRAL shadow (the
     navy-tinted one read as a glow on a dark page and was retired, §6.75),
     tabular figures */
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(14, 14, 20, .06), 0 14px 40px rgba(14, 14, 20, .10);
  font-feature-settings: "tnum" 1;
}

@media print {
  .report-sheet h2 { break-after: avoid; }
}

/* N12 — one treatment for a month: the portfolio's "As of" column is the
   family's `.col-date`, not a monospace dialect of its own. */
/* N12 — and one for a group's NAME: the report sheet's section heads wore
   14px uppercase where the attest schedule's bands wear 11.5px sentence case,
   over the same section of the same statement. The band grammar wins (SPEC
   §6.37: a group's name is a header-weight label, not a display heading). */
.report-sheet h2 { font-family: var(--sans); font-size: var(--t-12); font-weight: 600;
  letter-spacing: .02em; text-transform: none; color: var(--muted);
  margin: 18px 0 4px; border-bottom: 1px solid var(--line); padding-bottom: 3px; }

/* ===== THE MANAGEMENT REPORT, THE PACKET AND THE VERSIONS [management-report] =====
   The management report and its sheet, the board packet, a version and then-vs-now, the snapshot.
   --- kept from an old banner ---
   THE GRID — fifth pass (2026-09-08). A balance total that abstains
   while a line is absent, the newest month first, a sub-label that is
   true of the figure it labels, and one name per figure.
   --- kept from an old banner ---
   THE GRID — sixth pass (2026-09-08). The shear guard that ate the
   card, a total rule that stopped at the row's own name, one scroll
   convention on four containers, and the last two pill primitives.
   --- kept from an old banner ---
   THE BOARD PACKET, THE SNAPSHOT AND THEN-VS-NOW · B (2026-09-24)
   --- kept from an old banner ---
   THE ORIGINAL PLAN (SPEC §6.96)
   The management report's month table gains two columns per triad while a
   snapshot holds the original plan role: the original plan's figure and the
   gap against it. They fold under 1240px with the plan columns (`.fold`)
   and read in the plan-side ink, so the eye takes them as one set.
*/

.snap-meta > div:not([hidden]) { display: flex; flex-direction: column; gap: 1px; min-width: 0; }

.bv-part + .bv-part { margin-top: 10px; }
.board-toolbar form { display: inline; }
.bv-read p { margin: 0 0 8px; font-size: var(--t-14); line-height: 1.55; max-width: 88ch;
  color: var(--ink); }
.board-charts .viz-card { grid-column: 1 / -1; }
.sheet-tbl.kv td:first-child { color: var(--muted); }
/* a version's frozen sheet: months, then the version total / live / delta block */
.version-sheet td, .version-sheet th { white-space: nowrap; }
.version-sheet td.live { color: var(--muted); }
.version-sheet td.delta { color: var(--ink); }
.version-sheet tr.section-row td { background: var(--bg); font-weight: 650; padding: 8px 10px 8px 0; }
.version-sheet tr.computed td { background: var(--surface-2); }
.sheet-basis li { margin-bottom: 4px; }
.bd-house { font-size: 11.5px; margin: 6px 0 0; }
/* the printed sheet is narrower than the health card: tighter cells, and the
   sub-lines wrap rather than pushing the table past the sheet's edge */
.board-table.league-sheet { font-size: 12px; }
.board-logo img { height: 34px; width: auto; display: block; }
.board-id b { color: var(--ink); font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; }
.board-title { margin: 0 0 20px; }
.bf-cmp.up::before, .bf-cmp.down::before { content: ""; display: inline-block; width: 7px; height: 7px;
  border-radius: 999px; margin-right: 6px; vertical-align: 1px; }
.bf-cmp.up::before { background: var(--ok); }
.bf-cmp.down::before { background: var(--attn); }
/* an exactly-on-plan figure keeps its mark, in the neutral rule colour —
   it used to silently drop the dot all its neighbours carry */
.bf-cmp.flat::before { content: ""; display: inline-block; width: 7px; height: 7px;
  border-radius: 999px; margin-right: 6px; vertical-align: 1px; background: var(--line); }
.board-sheet .bv-head { margin-bottom: 8px; }
.board-sheet .bv-read p:first-child { font-family: Georgia, "Times New Roman", serif; font-size: 17px; line-height: 1.5; }
.board-sheet .bridge-strip .b-op { flex: none; padding-bottom: 2px; }
.board-sheet .bridge-block { break-inside: avoid; }
.board-sheet .bd-card.sev-urgent { border-left-color: var(--err); }
.board-sheet .bd-card.sev-act { border-left-color: var(--attn); }
.board-sheet .bd-card.sev-manual { border-left-color: var(--accent); }
.board-sheet .bd-card.suggested { border-left-style: dashed; }
.board-sheet .bd-act { font-size: var(--t-14); font-weight: 600; }
.board-sheet .bd-act::before { content: counter(bd, decimal-leading-zero); font-family: var(--mono);
  font-size: 11px; font-weight: 600; color: var(--muted); margin-right: 10px; }
.board-sheet .bd-meta { font-size: 11px; margin-top: 4px; }
/* the measures are a TABLE (review 2026-09-07, F20): a measure column, a
   state column and the detail, which needs the width */
.board-sheet .board-measures th[scope="row"] { width: 140px; font-weight: 600; }
.board-sheet .board-measures .bm-st { width: 86px; font-size: var(--t-12); letter-spacing: .06em;
  text-transform: uppercase; }
/* a column's basis reads at --muted like the league's (review 2026-09-07) */
.board-sheet .board-table thead th .th-sub { display: block; font-weight: 400; font-size: 11px;
  color: var(--muted); }
.board-sheet .board-table td.loss { color: var(--err); }
.board-sheet .board-table.league-sheet thead th { color: var(--muted); }
.board-sheet .board-charts .viz-card { box-shadow: none; border: 1px solid var(--line); }
/* three labelled lines, not one grey paragraph (review 2026-09-07) */
.board-method > div { margin: 0 0 3px; }
.board-method > div b { color: var(--ink-2); font-weight: 600; margin-right: 6px; }
.ov-widget .bridge-strip .b-op { flex: none; padding-bottom: 2px; }
.dm-tbl th { text-align: left; font-weight: 500; color: var(--ink-2); padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line-soft); width: 44%; }
.dm-tbl td { padding: 6px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.board-sheet .dm-groups { gap: 8px 36px; }
.board-sheet .dm-tbl { font-size: var(--t-13); }
.board-sheet .dm-sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; }
.cmp.up::before, .cmp.down::before, .cmp.flat::before { content: ""; display: inline-block;
  width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.cmp.up::before { background: var(--ok); }
.cmp.down::before { background: var(--attn); }
.cmp.flat::before { background: var(--line); }
.bf-period + .board-figs { margin-top: 0; }
.dm-delta.dm-up::before { background: var(--ok); }
.dm-delta.dm-down::before { background: var(--attn); }
.report-figs .bf-num { font-size: var(--t-20); }
/* the bridge labels are sentence case on every surface (04-T1) */
.board-sheet .bridge-strip .b-lab { text-transform: none; }

/* ONE anchor figure a step larger on the packet's strip, as on the Overview
   (SPEC §6.37; review 2026-09-08, 04-T5): all four printed the same size, so
   the daily surface had a lead figure and the flagship artifact did not */
.board-sheet .board-figs .bf:first-child .bf-num { font-size: var(--t-28); }
/* THE TILE STRIP LANDS AS BALANCED BANDS (review 2026-09-08, N10): auto-fit
   at minmax(150px) fitted five tracks in the sheet's ~916px box and dropped
   the sixth tile onto a row of its own, hanging under the first — which reads
   as a seventh section, not as the tail of a strip. The column count follows
   the tile count (_metrics.html): six go 3 + 3, five 3 + 2, four 2 + 2. */
.dm-tiles.dm-cols-1 { grid-template-columns: 1fr; }
.dm-tiles.dm-cols-2 { grid-template-columns: repeat(2, 1fr); }
.dm-tiles.dm-cols-3 { grid-template-columns: repeat(3, 1fr); }
/* a total that foots PART of a table names the part, at body weight under the
   row's label (03-N1 / 03-N6) */
.board-sheet .board-table tr.total th .tot-sub,
.board-sheet .board-table tr.subtotal th .tot-sub { font-weight: 400; }
/* EBITDA's definition, once per packet, with the appendix's other notes */
.dm-ebitda { margin-top: 6px; }
.board-sheet .bverdict.v-watch { border-left-color: var(--attn); }
/* without the lender's columns the four that remain share the page (owner report 2026-09-14) */
table.league.lg-plain col.c-branch { width: 34%; }
table.league.lg-plain col.c-contrib { width: 20%; }
table.league.lg-plain col.c-avg { width: 18%; }
table.league.lg-plain col.c-gap { width: 28%; }

/* 03-P9 — THE TOTAL'S LABEL KEEPS ITS LINE. At 960 the settled-months row
   header broke into "Year to / date" over "Jan–Aug / 2026 · 8 / months" —
   five lines on the table's most important row, beside single-line months
   above it. The nowrap was scoped to `.tbl-plan` alone; every board table's
   row header takes it, and the span sub-line wraps as one line under the
   label. */
/* (the league is held out: its branch cell is a NAME plus its chips and its
   notes, which wrap — pinning them to one line overprinted the next column
   on the card at 1440, the very defect this pass closed on paper) */
.board-sheet .board-table:not(.league) tbody th[scope="row"] { white-space: nowrap; }
.board-sheet .board-table:not(.league) tbody th[scope="row"] .tot-sub,
.board-sheet .board-table:not(.league) tbody th[scope="row"] .pm-prior { white-space: normal; }
/* 03-P10 — the tier word is `.badge`, so it takes the badge's 11px and
   sentence case rather than a size of its own under the system's floor */
.board-sheet .bd-sev { margin-right: 8px; text-transform: none;
  letter-spacing: .02em; font-weight: 600; }

/* ==== THE BOARD PACKET AND THE LEAGUE, SIXTH PASS (2026-09-08) ===========
   Rules from the sixth review's `03-board-tables.md` and `02-league.md`, plus
   the one sign convention `04-S1` names. Each has to win the cascade against
   the primitives above, so it carries its surface in the selector and sits at
   the end of the file. */

/* 02-S5 / 02-S6 — ONE MEANING PER MARK. Amber said "the read flagged this
   branch" in the answer column and "this comparison clears the 5% floor" in
   five others, so the Company total's 38.8% profit miss was the only unmarked
   comparison in a row whose 17% units shortfall wore amber. Amber is the flag
   now; a comparison that is MATERIAL but not flagged takes this quiet filled
   grey dot, and the hollow ring keeps the meaning the comment beside it has
   always claimed: under the floor. Four states, three shapes:
   filled amber (flagged) / filled green (ahead) / filled grey (material) /
   hollow ring (immaterial). */
.cmp.mat::before { content: ""; display: inline-block; width: 7px; height: 7px;
  border-radius: 50%; margin-right: 5px; vertical-align: 1px; background: var(--muted-2); }

/* 03-Q8 — NO LABEL UNDER THE FLOOR. The two chips carrying the packet's
   provenance (how much of the business is being read, and whether it is
   attested) were the smallest labels in the document at 10px, and both table
   notes sat at 10.5px. */
.board-sheet .bv-chip { font-size: 11px; }
.board-sheet .board-method,
.board-sheet .board-method.tbl-note { font-size: 11px; }

/* ==== THE BOARD PACKET'S SECTION PICKER (owner request 2026-09-09) ======
   A disclosure in the toolbar: one checkbox per section the packet can
   carry; unchecked = left out of the page and the PDF, for this user. The
   "left out" line under the toolbar is for the preparer and never prints. */
.board-sections { position: relative; }
.bs-panel > p { margin: 0 0 8px; font-size: 12px; }

/* ==== EXPORTED VERSIONS OF THE BOARD PACKET (owner request 2026-09-09) ==
   A preparer's list under the toolbar, never printed: one row per export. */
.board-tabs { margin: -4px 0 16px; }
.board-versions h3 { font-size: 15px; font-weight: 600; color: var(--ink); margin: 0 0 4px; }
.board-versions > p { margin: 0 0 12px; font-size: 12.5px; }
.board-version-list td { vertical-align: top; }

/* ==== THE STATEMENTS BY MONTH ON THE BOARD PAGE (owner request 2026-09-10) */
.board-sheet .tbl-grid { font-size: var(--t-12); }
.board-sheet .grid-wrap { margin: 0 0 6px; }
.board-foot .bfoot-att .mono { font-family: var(--mono); font-size: 11px; }

/* --- the comparison packet's wide tables fit the sheet (W-5) ------------- */
/* Eleven columns at the app's 13px body ran off the 1000px sheet and the Net
   income change column was clipped at the paper's edge. Fixed layout, the
   sheet's own smaller type, and the two label columns given their share; the
   money columns keep `nowrap` so no figure ever breaks across lines. */
/* NO LABEL UNDER THE FLOOR, AND THE COLUMNS STAY (owner decision 2026-09-24,
   screen redesign family 8): the headers, their `then` / `now` / `change`
   sub-labels, the variance line under a figure, the month's kind and the
   split's span were the smallest type in the product at 10-10.5px, and they
   carry the figures a director checks. They rise to the 11px floor (the
   headers to the system's 11.5px). The width that costs is not taken back
   by squeezing: under 880px — the sheet's column at 1240 — the table keeps
   its eleven columns and scrolls inside its wrapper, whose right-edge shade
   says a column is off the page (on a screen only: the browser's print
   fallback keeps the full-width fit). This block is edited IN PLACE:
   exactly one rule block in the stylesheet names these tables. */
.board-sheet .board-table.tbl-tvn,
.board-sheet .board-table.tbl-tvn-split { table-layout: fixed; width: 100%; font-size: 11.5px; }
.board-sheet .board-table.tbl-tvn thead th,
.board-sheet .board-table.tbl-tvn-split thead th { padding: 5px 5px; font-size: 11.5px; }
.board-sheet .board-table.tbl-tvn thead th .th-sub,
.board-sheet .board-table.tbl-tvn-split thead th .th-sub { font-size: 11px; }
.board-sheet .board-table.tbl-tvn td,
.board-sheet .board-table.tbl-tvn tbody th,
.board-sheet .board-table.tbl-tvn-split td,
.board-sheet .board-table.tbl-tvn-split tbody th { padding: 5px 5px; font-size: 11.5px; }
.board-sheet .board-table.tbl-tvn th:first-child { width: 8.5%; }
.board-sheet .board-table.tbl-tvn-split th:first-child { width: 15%; }
.board-sheet .board-table.tbl-tvn .tvn-kind { width: 9.5%; }
.board-sheet .board-table.tbl-tvn-split .tvn-kind { width: 10%; }
/* the two label columns are WORDS, so they wrap inside their share instead
   of running over the column beside them; the figures never wrap. The sheet's
   general rule keeps a row header on one line (03-P9) — right for a table
   whose first column is a month, wrong for one whose first column is
   "Closed months · May 2026 – Aug 2026", which overprinted the column beside
   it under `table-layout: fixed`. Same specificity, stated later. */
.board-sheet .board-table.tbl-tvn tbody th[scope="row"],
.board-sheet .board-table.tbl-tvn-split tbody th[scope="row"] { white-space: normal; }
.board-sheet .board-table.tbl-tvn-split tbody th .muted { display: block; font-size: 11px; }
.board-sheet .board-table.tbl-tvn .tvn-kind,
.board-sheet .board-table.tbl-tvn-split .tvn-kind { white-space: normal; font-size: 11px; }
.board-sheet .board-table.tbl-tvn .tvn-sub,
.board-sheet .board-table.tbl-tvn-split .tvn-sub { font-size: 11px; }

/* --- 6. SNAPSHOTS FITS (lead decision) ----------------------------------
   Every column and control where it was. A fixed grid: the name and the
   dates wrap under themselves, the money columns share one width, the two
   selects are compact, and the actions keep both icons. Where the pane is
   narrower than the columns (the rail open at 1440) the table scrolls in its
   wrapper and the right edge says so. */
.set-block table.version-table { table-layout: fixed; width: 100%; min-width: 940px; }
/* border-box widths: a fixed grid's column is its cell's width WITH the
   padding, so the nine columns add up to the pane at 1440 with the rail open
   (942px inside the card) and Window takes what is left */
.version-table > thead th { box-sizing: border-box; }
.version-table td.tvn-name .gl { margin-left: 0; white-space: nowrap; }
.version-table td.col-date { white-space: normal; line-height: 18px; }
/* a select as wide as its column: the chosen option shows whole, and the
   list opens at its own width */
/* Chrome draws a select's arrow inside its content box, so the padding at
   that end is kept small and the chosen option keeps its whole text */
.version-table .status-select { width: 100%; font-size: 12px; padding-left: 6px; padding-right: 2px; }
.set-block table.version-table td.tvn-name > .gl:not([hidden]) {
  display: block; overflow: clip; text-indent: -.5696em;
}
.set-block table.version-table td.col-date > .muted:not([hidden]) {
  display: block; overflow: clip; text-indent: -.5707em;
}
/* Screen redesign, family 8, section B: the board packet's toolbar, tab strip
   and History tab, the sheet's skeleton, the snapshot page and the
   then-vs-now packet. LOOK, LAYOUT AND HIERARCHY ONLY, with the owner's
   decisions of 2026-09-24 as the exceptions (the snapshot's branch picker is
   a select and its dates take the product's forms; the then-vs-now labels
   rise to 11px). The sheet stays PAPER in both themes — every token it reads
   is pinned by the sheet's own light-scheme block, which this block never
   restates — and only the chrome around it follows the theme. Not one
   `.board-h2`, `<h2>` or PDF rule moves (page and PDF move together, later).
   The last-rule pins stay the last rules: nothing here writes
   `.board-sheet .bv-chip`, `.board-sheet .board-method…` or
   `.board-sheet .b-flag`. */

/* --- 1. ONE BAR ON THE SHEET'S EDGES (Square, Xero) ------------------------
   The toolbar, the tab strip and the sheet started at three left edges
   within 100px (x=336, 262, 336). The tab strip and the toolbar now sit in
   ONE column exactly as wide as the sheet: the back link on its own line,
   then the tabs at the sheet's left edge and the controls at its right, on
   one baseline. `display: contents` lifts the toolbar's two children into
   the bar's grid; the History tab adds its title between them. */
.board-bar:not([hidden]) {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "back back" "tabs actions";
  align-items: center; gap: var(--s-2) var(--s-4);
  max-width: 1000px; margin: 0 auto var(--s-4);
}
.board-bar:has(> .board-bar-title):not([hidden]) {
  grid-template-areas: "back back" "title title" "tabs actions";
}
.board-bar > .board-toolbar:not([hidden]) { display: contents; }
.board-bar > .board-toolbar > a { grid-area: back; justify-self: start; }
.board-bar > .board-bar-title {
  grid-area: title; margin: 2px 0 4px; font-size: var(--t-20); font-weight: 700;
  line-height: 26px; letter-spacing: -.01em; color: var(--ink);
}
.board-bar > .board-tabs { grid-area: tabs; justify-self: start; margin: 0; }
.board-bar > .board-toolbar > .board-actions { grid-area: actions; }
/* the back link reads as the way out, not as a heading */
.board-toolbar > a:first-child {
  font-size: var(--t-table); font-weight: 500; line-height: 20px; color: var(--accent);
  text-decoration: none;
}
/* the then-vs-now packet has no tabs: its toolbar keeps its one row on the
   sheet's edges, the controls on one baseline */
.board-toolbar:not([hidden]) { gap: var(--s-2) var(--s-4); flex-wrap: wrap; }
.board-toolbar .board-actions:not([hidden]) {
  display: inline-flex; align-items: center; justify-content: flex-end;
  flex-wrap: wrap; gap: var(--s-2);
}

/* THREE CONTROLS, ONE FAMILY, ONE PRIMARY (QuickBooks; lead decision).
   "Sections" was a bare word with nothing to say it opens a panel: it takes
   the page controls' pill — an edge, a caret, a hover — the way the grid's
   download pill does. "Print / save as PDF" was the lowest-contrast control
   in the dark theme: it is the standard secondary. "Download PDF · vN" is
   the page's one primary, on the accent fill every other primary wears (the
   ink-filled pill was the last `--inverse` control in a toolbar). The kit's
   quiet-control geometry (section D) still gives each its height. */
.board-toolbar .board-sections > summary.linklike {
  gap: 8px; padding: 0 12px 0 14px; border-radius: var(--r-pill);
  border: 1px solid var(--field-line); background: var(--surface);
  color: var(--ink-2); font-size: var(--t-sm); font-weight: 600;
}
.board-toolbar .board-sections > summary.linklike::after {
  content: ""; flex: none; width: 6px; height: 6px; margin: -3px 0 0 1px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.board-toolbar .board-sections[open] > summary.linklike::after {
  margin-top: 3px; transform: rotate(-135deg);
}
.board-toolbar .board-sections > summary.linklike:hover,
.board-toolbar .board-sections[open] > summary.linklike {
  border-color: var(--accent); color: var(--accent); background: var(--surface);
}
.board-toolbar .board-actions > button.linklike {
  padding: 0 14px; border: 1px solid var(--field-line);
  background: var(--surface); color: var(--ink);
}
.board-toolbar .board-actions > button.linklike:hover {
  border-color: var(--accent); color: var(--accent); background: var(--surface);
}
.board-toolbar .board-actions > a.primary:hover {
  border-color: var(--accent-fill-hover); background: var(--accent-fill-hover);
  color: var(--on-accent); text-decoration: none;
}

/* THE SECTIONS PANEL wears the kit's pop-out chrome: its radius, its lift,
   rows a thumb can hit with a ground under the pointer, and the reset and
   Apply on one foot rule. The checkbox markup is untouched (its attribute
   order is read by a test). */
.board-toolbar .board-sections .bs-panel {
  top: calc(100% + 6px); width: 320px; padding: 14px 16px 12px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-pop);
}
.board-toolbar .board-sections .bs-panel > p.muted {
  margin: 0 0 8px; font-size: var(--t-sm); line-height: 18px; color: var(--muted);
  white-space: normal;
}
.board-toolbar .board-sections .bs-opt {
  min-height: 32px; padding: 0 8px; margin: 0 -8px; border-radius: var(--r-sm);
  font-size: var(--t-table); color: var(--ink); line-height: 18px;
}
.board-toolbar .board-sections .bs-opt:hover { background: var(--surface-2); }
.board-toolbar .board-sections .bs-foot {
  margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line);
}
/* the panel's own primary is the accent fill, like every other pop-out's
   (the toolbar's old ink-filled rule reached it) */
.board-toolbar .board-sections .bs-foot button.primary {
  border-color: var(--accent-fill); background: var(--accent-fill); color: var(--on-accent);
}
.board-toolbar .board-sections .bs-foot button.primary:hover {
  border-color: var(--accent-fill-hover); background: var(--accent-fill-hover);
}

/* the preparer's line under the bar: on the same column, and an attention
   rule because the PDF will not carry what it names */
p.board-left-out {
  max-width: 1000px; margin: 0 auto var(--s-3); padding: 2px 0 2px 10px;
  border-left: 2px solid var(--attn); font-size: var(--t-sm); line-height: 18px;
  color: var(--ink-2);
}
/* the then-vs-now packet's notices sit on the same column */
.board-toolbar ~ p.notice { max-width: 1000px; margin-left: auto; margin-right: auto; }

/* --- 2. THE HISTORY TAB (Confluence, Coda) ---------------------------------
   It had no head, no identity and 700px of empty page under a one-row
   table. The bar gives it the page's title; the list is ONE card on the
   sheet's column — the heading and its sentence in the card's head, the
   table flush under it, the newest export (the one the board last received)
   on a quiet tint, its file a real button at the right, and an empty state
   that says what will appear. Everything the help picture crops stays inside
   `section.board-versions`. */
section.board-versions {
  max-width: 1000px; margin: 0 auto var(--s-5);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: clip;
}
.board-versions-head { padding: 16px 20px 14px; }
.board-versions-head > h3 {
  margin: 0; font-size: 15px; font-weight: 650; line-height: 20px;
  letter-spacing: -.01em; color: var(--ink);
}
.board-versions-head > p {
  margin: 4px 0 0; max-width: 72ch; font-size: var(--t-sm); line-height: 19px;
  color: var(--muted);
}
section.board-versions > .tablewrap > table.board-version-list { flex: 1 0 auto; }
table.dt.board-version-list > * > tr > :first-child { padding-left: 20px; }
table.dt.board-version-list > * > tr > :last-child { padding-right: 20px; }
table.board-version-list > tbody > tr:last-child > * { border-bottom: 0; }
/* the two columns of words wrap inside their share (the stamp, the sections
   left out); every date, name, size and control stays on one line */
table.board-version-list > tbody > tr > td:nth-child(5),
table.board-version-list > tbody > tr > td:nth-child(6) { white-space: normal; min-width: 130px; }
/* the export the board last received: a quiet tint, no new word */
table.board-version-list > tbody > tr:first-child > *,
table.board-version-list > tbody > tr:first-child:hover > * { background: var(--surface-2); }
table.board-version-list td:last-child > a.btn-secondary {
  height: var(--ctl-h-sm); min-height: var(--ctl-h-sm); padding: 0 12px;
  border-color: var(--field-line); border-radius: var(--r-md);
  font-size: var(--t-sm);
}
/* the designed empty state: a sentence with air, its first words leading */
p.board-versions-empty {
  margin: 0; padding: 28px 20px 30px; border-top: 1px solid var(--line);
  text-align: center; font-size: var(--t-table); line-height: 20px; color: var(--muted);
}
p.board-versions-empty > strong { display: block; margin-bottom: 2px; color: var(--ink); font-weight: 600; }

/* --- 3. THE SHEET'S SKELETON (headings untouched) --------------------------
   THE READ'S MEASURE is capped at 72ch in place (the `.bv-read p` rule
   above); its citations were a solid-looking accent underline under every
   figure, so a page of financial prose read as a page of links. The mark is
   a dotted `--muted` rule now, and the accent comes back on hover, on focus
   and while the cited cell is lit. */
.board-sheet .bv-read .cite { border-bottom-color: var(--muted); }
.board-sheet .bv-read .cite:hover, .board-sheet .bv-read .cite:focus-visible,
.board-sheet .bv-read .cite.cite-hot { border-bottom-color: var(--accent); }
/* THE VERDICT WORD is the sheet's most important word and was set like the
   metadata beside it (11px uppercase tracked chips): it takes a step up, and
   the chips — how much of the business is read, and whether it is attested —
   read as sentence-case metadata at their pinned 11px */
.board-sheet .bverdict .bv-tag { font-size: 15px; font-weight: 750; letter-spacing: .12em; }
.board-sheet .bv-head .bv-chip {
  padding: 1px 8px; letter-spacing: .01em; text-transform: none; font-weight: 500;
}
/* THE STRIP NEVER ORPHANS A TILE: five figures are five tracks (auto-fit
   left the fifth — Cash, with its two-line runway — alone on a second row);
   where the sheet narrows, three a row (five read three over two, the
   then-vs-now packet's three one row); two a row on a phone, an odd last
   figure the width of both */
.board-sheet .board-figs:has(> .bf:nth-child(5):last-child) {
  grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 18px;
}
/* the period that scopes the strip is read before the figures: ink, not grey */
.board-sheet .bf-period { color: var(--ink-2); }
/* THE WIDE TABLES SAY WHERE THEY ARE CUT (AWS, and the kit's cue): the
   statements by month showed five of thirteen months at 1440 and cut the
   sixth mid-figure against the paper's edge, with nothing to say the rest
   were there. Every table on the sheet scrolls in its wrapper with the
   kit's scroll-driven right-edge shade — drawn only while a column really
   is off the edge — in the PAPER's ink, so it reads the same in both
   themes. The statements lose the grid page's card (the sheet's tables are
   hairlines) and keep their line names in view while the months scroll. */
.board-sheet .tablewrap:not([hidden]) { display: flex; }
.board-sheet .tablewrap > table { flex: 1 0 auto; }
.board-sheet .grid-wrap { border: 0; border-radius: 0; box-shadow: none; background: none; }
.board-sheet .tbl-grid > * > tr:not(.group-row) > th:first-child {
  position: sticky; left: 0; z-index: 1; background: var(--surface);
}
.board-sheet .tbl-grid > tbody > tr.subtotal > th:first-child { background: var(--surface-2); }
/* the statements' small print rises to the 11px floor (a column's month
   count and a total's short-line count were 10px, a code 10.5px) */
.board-sheet .tbl-grid .cell-sub { font-size: var(--t-12); }
.board-sheet .tbl-grid .gl { font-size: var(--t-12); }

/* --- 4. THE SNAPSHOT PAGE (Xero, Mercury) ----------------------------------
   A bare head with two pills, a 760px paragraph of facts in three date forms
   and a row of branch chips became the product's page head: the name and
   its state, the one sentence on how to read the table, the facts of the
   freeze as a label / value row, the branch SELECT and the then-vs-now
   packet at the right. The table joins the list-table grammar and keeps the
   Version total / Live forecast / Δ block behind its 2px rule. */
.snap-back { margin: 0 0 var(--s-2); }
.snap-back > a.linklike { font-size: var(--t-table); font-weight: 500; line-height: 20px; }
.page-head.suite.snap-head { align-items: flex-start; }
.page-head.suite.snap-head > div:first-child { flex: 1 1 560px; min-width: 0; }
.snap-title:not([hidden]) { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
/* a state, not a verdict: the plan of record is the kind tint (never the
   green that means "ahead"), Off the muted state outline */
.snap-title .st {
  padding: 0 8px; line-height: 20px; border-radius: 4px; border: 1px solid transparent;
  font-size: var(--t-label); font-weight: 600; text-transform: none;
}
.snap-title .st.st-active { background: var(--accent-soft); color: var(--accent); }
.snap-title .st.st-inactive { background: transparent; border-color: var(--line); color: var(--muted); }
.snap-meta:not([hidden]) {
  display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 12px 0 0; padding: 0;
}
.snap-meta dt {
  font-size: var(--t-label); font-weight: 600; line-height: 16px; color: var(--muted);
}
.snap-meta > .snap-cover > dd, .snap-meta > .snap-note > dd { max-width: 52ch; }
/* the branch picker: the shell's select, and a quiet Go beside it */
.snap-head .page-controls .branch-bar { margin: 0; }
.tablewrap > table.version-sheet {
  flex: 1 0 auto; border-collapse: separate; border-spacing: 0;
  font-size: var(--t-table);
}
table.version-sheet thead th {
  font: 600 11.5px/1.3 var(--sans); letter-spacing: .02em; text-transform: none;
  color: var(--muted); padding: 10px 12px 8px; background: var(--surface);
  border-bottom: 1px solid var(--line); vertical-align: bottom;
}
/* every cell paints its row's ground, so the frozen first column carries the
   band, the summary tint and the hover with the row it belongs to */
table.version-sheet > * > tr { --row-bg: var(--surface); }
table.version-sheet > tbody > tr:not(.section-row):hover,
table.version-sheet > tbody > tr.computed { --row-bg: var(--surface-2); }
table.version-sheet > tbody > tr.section-row { --row-bg: var(--bg); }
table.version-sheet td.num { padding-right: 12px; }
table.version-sheet tbody th[scope="row"] {
  font: 500 13px/1.3 var(--sans); letter-spacing: 0; text-transform: none;
  text-align: left; color: var(--ink);
}
table.version-sheet > * > tr:not(.section-row) > :first-child {
  position: sticky; left: 0; z-index: 1; padding-left: 20px;
}
table.version-sheet > * > tr > :last-child { padding-right: 20px; }
/* the section band: the group's name in ink, its statement quieter */
table.version-sheet tr.section-row td {
  height: 32px; padding: 0 20px; font: 600 12.5px/1.3 var(--sans); color: var(--ink);
}
table.version-sheet tr.section-row .sec-name {
  display: inline-block; position: sticky; left: 20px;
}
table.version-sheet tr.section-row .muted {
  margin-left: 8px; font-size: var(--t-label); font-weight: 400; color: var(--muted);
}
/* the computed summary: subtotals on the tint at 600, net income the total
   under the ink rule */
table.version-sheet tr.computed > * { font-weight: 600; }
table.version-sheet tr.computed strong { font-weight: 600; }
table.version-sheet tbody tr.computed:nth-last-child(2) > * { border-bottom: 0; }
table.version-sheet tbody tr.computed:last-child > * {
  border-top: 1.5px solid var(--ink); border-bottom: 0; font-weight: 700;
}
table.version-sheet tbody tr.computed:last-child strong { font-weight: 700; }
/* the frozen block against today's: the 2px rule stays; today's figures a
   step quieter than the frozen ones, the difference in ink */
table.version-sheet th.tot, table.version-sheet td.tot { border-left: 2px solid var(--line); padding-left: 14px; }
table.version-sheet td.live { color: var(--ink-2); }

/* --- 3. THE PACKET'S VERDICT CHIPS KEEP THE SHEET'S CASE ---------------------
   The chips beside the verdict ("8 OF 8 MEASURES READING", "ATTESTED ·
   REVISIONS PENDING", "COMPUTED READ") print uppercase in the PDF twin
   (`board_pdf.html` `.v-chip`): the page prints them the same way, at the
   sheet's own chip values (uppercase, 1px tracking, 600, the pinned 11px),
   keeping the B block's padding. The verdict word stays the step above
   them at 15px / 750. */
.board-sheet .bv-head .bv-chip { text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.board-sheet .board-figs:has(> .bf.anchor) > .bf:first-child:not(.anchor) .bf-num { font-size: 24px; }
.board-sheet .board-figs:has(> .bf.anchor) > .bf > .bf-num { height: 29px; line-height: 1; }
.board-sheet .board-figs:has(> .bf.anchor) > .bf > .bf-num::before {
  content: ""; display: inline-block; height: 25px; vertical-align: baseline; }

/* -- 5. THE PACKET'S VERDICT IN THE OVERVIEW'S COLOURS ------------------------
   the rule and the word only: the sheet stays unground (`.board-sheet
   .bverdict { background: none }`, hairlines instead of tinted blocks), as
   its PDF is. Act now is attention, never loss red (red is a loss only),
   and shares the attention rule and ink with Watch (03-N7's rule stands:
   two ambers on the sheet, never three); their words tell them apart.
   Holding steady is ink with a muted rule. The snapshot packet's "Since the
   plan" borrows `v-holding` and keeps main's accent: `v-since` sits out. */
.bverdict.v-softening, .board-sheet .bverdict.v-softening { border-left-color: var(--attn); }
.v-softening .bv-tag, .board-sheet .v-softening .bv-tag { color: var(--attn-ink); }
.bverdict.v-holding:not(.v-since),
.board-sheet .bverdict.v-holding:not(.v-since) { border-left-color: var(--muted); }
.v-holding:not(.v-since) .bv-tag,
.board-sheet .v-holding:not(.v-since) .bv-tag { color: var(--ink); }

/* -- 9. THE BOARD SHEET'S SHADOW ------------------------------------------------
   its navy-tinted shadow read as a glow on a dark page */
.board-sheet { box-shadow: 0 1px 2px rgba(14, 14, 20, .06), 0 14px 40px rgba(14, 14, 20, .10); }

/* -- 8. THE GRID'S BRANCH PICKER KEEPS ITS WIDTH -----------------------------
   block E capped a `form.branch-bar` picker at 200px for the Overview's
   branch view, whose head wrapped at 1440. The grid's picker became such a
   form in this pass (its Go), so the cap reached it and cut the long names
   ("↳ Denver Builder Division · 101B"); the snapshot's had been cut since
   block E. Both keep the base 280px: the cap is the Overview's alone. */
.grid-page form.branch-bar .branch-pick,
.snap-head form.branch-bar .branch-pick { max-width: 280px; }

/* -- 10. FOUR SMALL FIXES -------------------------------------------------------
   (a) a figure tile's sub-lines wrap as prose, so the runway note no longer
   leaves "grows)" alone on its last line at 1440 (the board page's tile
   too); (b) the one-time fee meets the actual fill across a 1px gap of the
   card's surface, where in dark the two were 1.59:1 and read as one bar;
   (c) the assistant's close takes its head's own ink on hover, where white
   on the dark theme's light head was 1.17:1; (d) the assistant's context
   line is the body face at the label size, where it was 10px mono, under
   the product's 11px floor; its two lines keep a whole-pixel height. */
.stat .stat-cmp .cmp-sub, .bf .bf-hint { text-wrap: pretty; }
/* Owner decision 2026-09-30: the three things family 8 HELD "until their
   PDFs move with the pages" move now, each page with its PDF (SPEC §6.79).
   LOOK ONLY: no word, class or markup moves; the board and snapshot sheets
   and the report stay paper in both themes; nothing here restates a pinned
   selector (`.report-sheet h2`, `.report-close …`, `.report-table tfoot …`,
   the `td.num` widths, `.report-actions a.primary`, the packet's last-rule
   pins). The PDFs' own stylesheets moved in the same change (board_pdf,
   version_packet_pdf, report_pdf, scenario_pdf); the scenario PDF's colours
   are its alone and move there and in the sheet's SVG attributes. */

/* --- 1. A SECTION'S TITLE, ON THE PAGE AS ON PAPER -------------------------
   The packet named its sections in its quietest type (11px uppercase, tracked,
   grey), so the headings receded and the paragraphs advanced. They take the
   product's section title (the Overview's card heads, Company settings'
   blocks, the History tab) a step larger — 16px / 650, sentence case, ink,
   because the sheet's own item heads (a numbered insight, a chart's title)
   are 14px — over the hairline that always opened a section. The words
   were always sentence case; only the transform goes. The board packet, the
   snapshot packet (it wears the
   sheet) and the frozen month-by-month partial move through this one rule;
   the scenario sheet's heads, which copied the packet's "value for value",
   copy it again, their qualifier quiet. */
.board-sheet .board-h2 {
  margin: 32px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
  font-size: 16px; font-weight: 650; line-height: 22px; letter-spacing: -.01em;
  text-transform: none; color: var(--ink);
}
/* the report's one method note: a line per section it explains, each rule
   once with the insights it belongs to */
.board-sheet .board-method[data-report-method] { margin-top: 0; }
.board-sheet .board-method p { margin: 0 0 6px; }
.board-sheet .rm-rules { margin: 4px 0 6px; padding-left: 0; list-style: none; }
.board-sheet .rm-rules li { margin: 0 0 4px; }
.board-sheet .rm-nums { font-weight: 600; color: var(--ink-2); }
.board-sheet table.tbl-plan .pm-orig { color: var(--ink-2); }

/* the report's Generate sits under the read it replaces */
.bv-gen:not([hidden]) { display: flex; }
.bv-gen { align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 8px 0 0; font-size: var(--t-sm); }
.board-sheet .bd-card .ev { margin-top: 8px; font-size: 12.5px; }
.board-sheet .bd-card .ev-table { font-size: 12px; max-width: 560px; }
.board-sheet .bd-card .ev-key, .board-sheet .bd-card .ev-note { font-size: var(--t-12); }
/* the report's sheet, which a portfolio's report and a snapshot's packet
   also wear: there it is left as it was */
main.page-reading .board-method, main.page-reading .board-sheet .board-method,
main.page-reading .board-sheet .board-method.tbl-note, main.page-reading .board-foot,
main.page-reading .bd-meta, main.page-reading .board-sheet .bd-meta, main.page-reading .bf-hint,
main.page-reading .board-id b, main.page-reading .board-foot .bfoot-att .mono,
main.page-reading .board-sheet .board-table thead th .th-sub { font-size: var(--t-12); }
main.page-reading .board-sheet .bv-read p { font-size: var(--t-14); }
main.page-reading .board-sheet .bv-read p:first-child, main.page-reading .board-sheet .bverdict .bv-tag,
main.page-reading .board-versions h3, main.page-reading .board-versions-head > h3 { font-size: var(--t-16); }
main.page-reading .bf-num,
main.page-reading .board-sheet .board-figs:has(> .bf.anchor) > .bf:first-child:not(.anchor) .bf-num { font-size: var(--t-20); }
main.page-reading .board-client { font-size: var(--t-28); }
/* the closing balance of the cash bridge stays the larger figure, on the scale */
.board-sheet .bridge-strip .b-item:last-child b { font-size: var(--t-28); }

@media screen {
  .board-sheet .board-table.tbl-tvn,
  .board-sheet .board-table.tbl-tvn-split { min-width: 880px; }
}

@media screen and (max-width: 1240px) {
/* Under the fold NOTHING is declared: the three surviving columns lay out
   like the health card's, which has never carried a colgroup and has always
   filled its card. A width kept for a column the fold has removed is a share
   of the table nothing can use. */
/* HALF-SCREEN: the month-by-month table keeps its decision columns and folds
   the rest (SPEC §6.37). Nine columns of seven-figure money do not fit 960px.
   THE ACTUAL STAYS AND THE PLAN FOLDS (review 2026-09-08, 03-P8 / 05-V6): the
   fold used to remove the two actual columns from a table headed "actual vs
   plan", so the owner's half-screen window showed a difference without either
   operand. The plan is the constant the gap is measured against, the gap
   implies it, and the year's plan is stated in words under the table. */
  .board-sheet table.dt.board-table .fold { display: none; }
  /* ... and the six that stay take a step down rather than a scrollbar; the
     month and the total's label keep one line each, so the row header is a
     column and not a stack of single words */
  /* seven columns of seven-figure money in a 590px column (review
     2026-09-08, 03-Q4 added the expense pair): a step down in size and
     padding keeps the last Gap column on screen rather than under a
     scrollbar */
  .board-sheet table.dt.board-table.tbl-plan { font-size: var(--t-12); }
}

/* 03-S1 — THE ANSWER COLUMN FITS AT EVERY WIDTH. The step-down that keeps
   the last Gap column on screen was scoped to `max-width: 1240px` — the
   width at which the problem is not. At 1440 the board sheet's ~915px
   content column cut "Gap net income" to the letter `n` and printed four
   rows of a bare `$`. The same declarations, unconditional. */
.board-sheet table.dt.board-table.tbl-plan { font-size: var(--t-12); }

@media screen and (max-width: 1240px) {
  .board-sheet table.dt.board-table.tbl-plan td,
  .board-sheet table.dt.board-table.tbl-plan th { padding: 0 var(--s-1); }
}

.board-sheet table.dt.board-table.tbl-plan td,
.board-sheet table.dt.board-table.tbl-plan th { padding: 0 var(--s-1); }

@media screen and (max-width: 1240px) {
  .board-sheet table.dt.board-table.tbl-plan tbody th[scope="row"] { white-space: nowrap; }
}

.board-sheet table.dt.board-table.tbl-plan tbody th[scope="row"] { white-space: nowrap; }

@media (max-width: 1100px) {
/* the strip collapses to two columns where the bridge does (2026-09-07) */
.board-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-widget .bridge-strip .b-item { display: contents; }
  .ov-widget .bridge-strip .b-lab { grid-column: 1; white-space: normal; }
  .ov-widget .bridge-strip .b-op { display: none; }
  .ov-widget .bridge-strip .b-item + .b-op + .b-item:not(:last-child) .b-lab::before {
    content: "+ "; color: var(--muted); }
  .ov-widget .bridge-strip .b-item:last-child .b-lab::before { content: "= "; color: var(--muted); }
  .board-sheet .bridge-strip.on-sheet { display: grid; grid-template-columns: 1fr auto;
    align-items: baseline; gap: 2px 16px; }
  .board-sheet .bridge-strip.on-sheet .b-item { display: contents; }
  .board-sheet .bridge-strip.on-sheet .b-lab { grid-column: 1; }
  .board-sheet .bridge-strip.on-sheet .b-item { font-size: var(--t-16); }
  .board-sheet .bridge-strip.on-sheet b { grid-column: 2; text-align: right; }
  .board-sheet .bridge-strip.on-sheet .b-op { display: none; }
  .board-sheet .bridge-strip.on-sheet .b-item + .b-op + .b-item:not(:last-child) .b-lab::before {
    content: "+ "; color: var(--muted); }
  .board-sheet .bridge-strip.on-sheet .b-item:last-child .b-lab::before { content: "= "; color: var(--muted); }
.dm-groups { grid-template-columns: minmax(0, 1fr); }
.board-sheet .dm-sheet { grid-template-columns: minmax(0, 1fr); }
  .board-sheet .bridge-strip.on-sheet .b-item:last-child b { font-size: var(--t-20); }
}

@media (width <= 1100px) {
  .board-sheet .board-figs:has(> .bf:nth-child(5):last-child),
  .board-sheet .board-figs:has(> .bf:nth-child(3):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
.dm-tbl td.dm-detail { display: none; }
}

@media (width <= 760px) {
  .board-sheet .board-figs:has(> .bf:nth-child(5):last-child),
  .board-sheet .board-figs:has(> .bf:nth-child(3):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .board-sheet .board-figs > .bf:nth-child(odd):last-child { grid-column: 1 / -1; }
}

@media screen and (max-width: 760px) {
  /* the board packet is paper in both themes and it prints: it keeps its own */
  .board-sheet .tablewrap { scrollbar-width: auto; scrollbar-color: auto; }
}

@media (max-width: 640px) {
  /* a total's rule is the row's, drawn once across it */
  .board-sheet table.board-table.tbl-grid > tbody > tr.total,
  #main :is(table.sh-kpis, table.sh-acc, table.ev-table, table.tbl-clients, table.tbl-billed, table.close-figs) > * > tr.total,
  #main table.tbl-plan > * > tr.total { border-top: 1.5px solid var(--ink); }
}

#modal-gl-import :is(table.gl-map select, table.gl-codes select, table.gl-codes input[type="text"]) {
  box-sizing: border-box; width: 100%; max-width: none; min-height: var(--ctl-h-sm); margin: 0;
  padding: 0 8px; font: inherit; font-size: var(--t-sm); color: var(--ink);
  background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--r-sm);
}
#modal-gl-import details.gl-preview > summary:hover { color: var(--accent); background: var(--surface-2); }
:is(#modal-add-fee, [id^="modal-metric-"]) .access-body > form.form-grid > label {
  margin: 0 0 14px;
}

@media (max-width: 640px) {
  /* THE REPORT'S STATEMENTS BY MONTH TAKE THE GRID'S PATTERN (SPEC §6.174):
     the strip of months with the Year as its last stop, a line and the
     figure of the month picked. They open on the month the report is about. */
  .board-sheet .tablewrap.grid-wrap:not([hidden]) { display: block; overflow: visible; }
  .board-sheet .tablewrap.grid-wrap::after { display: none; }
  .board-sheet table.board-table.tbl-grid > thead > tr { padding-left: 0; padding-right: 0; }
  .board-sheet table.board-table.tbl-grid > thead > tr > th[data-month] > .th-sub { color: inherit; font-size: var(--t-12); }
  .board-sheet table.board-table.tbl-grid > tbody > tr { min-height: 40px; padding-left: var(--s-2); padding-right: var(--s-2); }
  .board-sheet table.board-table.tbl-grid > tbody > tr.subtotal { background: var(--surface-2); }
  .board-sheet table.board-table.tbl-grid > tbody > tr > th:first-child { overflow: visible; max-width: none; font-size: var(--t-14);
    white-space: normal; text-overflow: clip; }
  .board-sheet table.board-table.tbl-grid > tbody > tr:is(.subtotal, .total) > .at-month { font-weight: 600; }
  .board-sheet table.board-table.tbl-grid > tbody > tr > .at-month > .cell-sub { display: block; margin: 0; }
  /* a snapshot's name is its first cell */
  #main table.version-table > tbody > tr > td:first-child { order: 1; flex: 1 1 100%; color: var(--ink);
    font-size: var(--t-14); }
  #main table:is(.version-table, .catalog-table, .series-manage) > tbody > tr > td.num { order: 3; flex: 0 1 auto;
    text-align: left; }
}

@media (width <= 640px) {
  /* the mapping step: the field, then the whole select, then the sample */
  #modal-gl-import table.gl-map th:nth-child(1) { width: 150px; }
  #modal-gl-import table.gl-map th:nth-child(2) { width: 200px; }
}

@media (max-width: 640px) {
  #main :is(.year-nav > a, details.head-more > summary.icon-btn, a.deck-all) { display: inline-flex;
    align-items: center; justify-content: center; min-width: var(--ctl-h); min-height: var(--ctl-h); }
}

@media (width <= 640px) {
/* --- 5. THE PHONE (390px is a designed width) ------------------------------
   The toolbar stacks — the back link, the tabs, then the controls, with the
   one primary at the full width — and the Sections panel opens from the
   left edge it now sits on instead of running off the screen. The sheet
   keeps its paper at the page's 16px gutter; every wide table scrolls in
   its wrapper with the shade. The snapshot's meta row wraps. */
  .board-bar:not([hidden]) {
    grid-template-columns: minmax(0, 1fr); grid-template-areas: "back" "tabs" "actions";
    row-gap: var(--s-3);
  }
  .board-bar:has(> .board-bar-title):not([hidden]) {
    grid-template-areas: "back" "title" "tabs" "actions";
  }
  .board-toolbar:not([hidden]) { flex-direction: column; align-items: stretch; }
  .board-toolbar > a:first-child { align-self: flex-start; }
  .board-toolbar .board-actions:not([hidden]) { justify-content: flex-start; width: 100%; }
  .board-toolbar .board-actions > a.primary { flex: 1 1 100%; }
  .board-toolbar .board-sections .bs-panel {
    left: 0; right: auto; width: min(320px, calc(100vw - 32px));
  }
  .board-versions-head { padding: 14px 16px 12px; }
  table.dt.board-version-list > * > tr > :first-child { padding-left: 16px; }
  table.dt.board-version-list > * > tr > :last-child { padding-right: 16px; }
  /* the facts read as a short list: each label beside its value */
  .snap-meta:not([hidden]) { flex-direction: column; gap: 4px; }
  .snap-meta > div:not([hidden]) { flex-direction: row; align-items: baseline; gap: 10px; }
  .snap-meta dt { flex: none; width: 56px; }
  /* the frozen line names give the months the width: a name wraps in its
     own column rather than taking half the phone */
  table.version-sheet > * > tr:not(.section-row) > :first-child {
    padding: 6px 12px 6px 16px; min-width: 132px; max-width: 150px; white-space: normal;
    line-height: 1.25;
  }
  /* the sheet's tables of words and months keep a width they can be read
     at, and scroll in their wrapper with the shade, rather than folding a
     sentence one word a line */
  .board-sheet table.board-measures { min-width: 540px; }
  .board-sheet table.tbl-plan { min-width: 620px; }
  /* the strip's figures fit two a row: the anchor a step above the rest */
  .board-sheet .board-figs .bf-num { font-size: 21px; }
  .board-sheet .board-figs > .bf:first-child .bf-num { font-size: 24px; }
}

.board-sheet .board-figs .bf.anchor .bf-num { font-size: var(--t-28); }

@media (width <= 640px) {
  table.version-sheet tr.section-row td { padding: 0 16px; }
  table.version-sheet tr.section-row .sec-name { left: 16px; }
  .board-sheet .board-figs:has(> .bf.anchor) > .bf:first-child:not(.anchor) .bf-num { font-size: 21px; }
  .board-sheet .board-figs > .bf.anchor .bf-num { font-size: 24px; }
  .board-sheet .board-figs:has(> .bf.anchor) > .bf > .bf-num { height: 26px; }
  .board-sheet .board-figs:has(> .bf.anchor) > .bf > .bf-num::before { height: 22px; }
  main.page-reading .board-sheet .board-figs .bf-num,
  main.page-reading .board-sheet .board-figs > .bf:first-child .bf-num,
  main.page-reading .board-sheet .board-figs > .bf.anchor .bf-num,
  main.page-reading .board-sheet .board-figs:has(> .bf.anchor) > .bf:first-child:not(.anchor) .bf-num { font-size: var(--t-20); }
}

@media (width > 640px) {
/* AT 12PX THE PLAN TABLE'S GAP NOTES KEEP THEIR LINE (SPEC §6.180). Eleven
   columns of money stand in the sheet's 918px. A table shares its spare room
   by how far each column could stretch, and the first column's two long
   sub-labels took the room the notes needed: "34.3% under" broke in two on a
   company with seven-figure months. The sub-labels take two lines instead,
   and the notes still wrap, never push the table past its box, where there
   is no room at all. */
  .board-sheet table.tbl-plan > thead th:first-child .th-sub,
  .board-sheet table.tbl-plan > tbody > tr:not(.pm-planband) > th .tot-sub { max-width: 14ch; }
}

@media (min-width: 641px) {
  /* the sheet's statements by month keep the sizes they had, above a phone's
     width (SPEC §6.180). They are the Grid's tables on the report and scroll
     sideways in the sheet: a bigger letter made every month's column 9px
     wider, and the fifth month, which ended on the sheet's edge, was cut in
     the middle of its figures ("$40,1" for $40,125). A phone draws them one
     month at a time and keeps the scale. */
  main.page-reading .board-sheet table.tbl-grid { --t-label: 11.5px; --t-sm: 12.5px; font-size: 11.5px; }
  main.page-reading .board-sheet table.tbl-grid :is(.cell-sub, .gl),
  main.page-reading .board-sheet table.tbl-grid thead th .th-sub { font-size: 11px; }
}

@media screen and (min-width: 641px) {
  /* A CUT MONTH IS NOT DRAWN ON THE SHEET (SPEC §6.181). The statements by
     month scroll sideways in the sheet, and the month at its edge was cut
     wherever its column fell: "$40,1" for $40,125. `one_month.js` says how
     much of that month is in view (`--cut-w`) and exactly that much is masked,
     with the scroll's shade at the last whole month. Scrolled to its end, or
     without the script, nothing is masked. Not in print: nothing scrolls there. */
  .board-sheet .tablewrap.grid-wrap { --cut-w: 0px; }
  .board-sheet .tablewrap.grid-wrap:not(.at-end) {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - var(--cut-w)), transparent calc(100% - var(--cut-w) + 8px));
    mask-image: linear-gradient(to right, #000 calc(100% - var(--cut-w)), transparent calc(100% - var(--cut-w) + 8px)); }
  .board-sheet .tablewrap.grid-wrap::after { right: var(--cut-w); }
}

@media screen and (min-width: 1101px) {
  .ov-bridge .bridge-strip .b-item { flex: 1 1 0; min-width: 0; }
  .ov-bridge .bridge-strip .b-item:last-child { flex: 0 1 auto;
    align-items: flex-end; text-align: right; }
  .ov-bridge .bridge-strip .b-op { flex: none; padding-bottom: 3px;
    font-size: 13px; font-weight: 600; color: var(--muted-2); }
}

/* ==== THE BOARD SHEET AND THE LEAGUE (fourth review, 2026-09-08) =========
   Rules that have to WIN the cascade or resolve to nothing, so they sit after
   the `table.dt` primitive and the league dialect above. */
/* N2 — THE SHEET'S LEAGUE TABLE FILLS THE PAGE AT EVERY WIDTH. The printed
   variant's `<colgroup>` carried its percentages as inline attributes, so the
   six columns the fold HIDES under 1240px kept their share of the width and
   the table stopped at 58% of a sheet whose every other rule ran to the
   margin. The widths live here now, per width band, and the three columns
   that survive the fold take the whole table. */
  /* every width clears the longest unbreakable word in its column and its
     widest figure: the table lays out FIXED below, so a column narrower than
     its own heading overflows into the next one (02-N6) */
@media screen and (min-width: 1241px) {
  table.dt.league.league-sheet col.c-branch { width: 16%; }
  table.dt.league.league-sheet col.c-units { width: 8%; }
  table.dt.league.league-sheet col.c-lo { width: 7%; }
  table.dt.league.league-sheet col.c-vol { width: 10%; }
  table.dt.league.league-sheet col.c-contrib { width: 11%; }
  table.dt.league.league-sheet col.c-avg { width: 11%; }
  table.dt.league.league-sheet col.c-gap { width: 17%; }
  table.dt.league.league-sheet col.c-gos { width: 9%; }
  table.dt.league.league-sheet col.c-cost { width: 11%; }
}

@supports (animation-timeline: scroll()) {
  section.board-versions > .tablewrap::after {
    content: ""; flex: none; align-self: stretch;
    width: 18px; margin-left: -18px;
    position: sticky; right: 0; z-index: 3;
    opacity: 0; pointer-events: none;
    background: linear-gradient(to left, var(--shade-edge), transparent);
    animation: kit-shade-bottom linear both;
    animation-timeline: scroll(nearest inline);
    animation-range: calc(100% - 12px) 100%;
  }
  .board-sheet .tablewrap::after {
    content: ""; flex: none; align-self: stretch;
    width: 18px; margin-left: -18px;
    position: sticky; right: 0; z-index: 3;
    opacity: 0; pointer-events: none;
    background: linear-gradient(to left, color-mix(in srgb, var(--ink) 14%, transparent), transparent);
    animation: kit-shade-bottom linear both;
    animation-timeline: scroll(nearest inline);
    animation-range: calc(100% - 12px) 100%;
  }
  .tablewrap:has(> table.version-sheet)::after {
    content: ""; flex: none; align-self: stretch;
    width: 18px; margin-left: -18px;
    position: sticky; right: 0; z-index: 3;
    opacity: 0; pointer-events: none;
    background: linear-gradient(to left, var(--shade-edge), transparent);
    animation: kit-shade-bottom linear both;
    animation-timeline: scroll(nearest inline);
    animation-range: calc(100% - 12px) 100%;
  }
}

/* ===== THE SCENARIO AND THE PROPOSAL SHEET [scenario] =====
   The pricing scenario, its levers and goals, and the proposal sheet.
   --- kept from an old banner ---
   THE SCENARIO · C · the proposal sheet and pricing & goals (2026-09-24)
   --- kept from an old banner ---
   THE CLOSE, THE PACKET AND THE SCENARIO · D · after the review (2026-09-24)
*/

.scn-goal-form input { border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px;
  font: inherit; width: 180px; }
.scn-key::before { content: ""; width: 20px; border-top: 2px solid var(--muted); display: inline-block; }
.scn-key.base::before { border-top-style: dashed; }
.scn-key.scen::before { border-top: 3px solid var(--accent); }
.scn-panel[hidden] { display: none !important; }
/* Family 8, section C of the Mobbin redesign: LOOK, LAYOUT and HIERARCHY on
   the pricing scenario page — the proposal sheet on its Results tab and the
   levers on its Pricing & goals tab. No word moves out of its sentence, the
   tab ids render `hidden` straight after the id as before, `sheet-narrative`,
   `scn-chart`, "Profitability trajectory" and the SVG's structure are as they
   were, the inline script is byte-identical, and every colour is a token.
   The PDF (`scenario_pdf.html`) shares the sheet's markup and keeps its own
   stylesheet: every class this block reads on the sheet is one the PDF does
   not style, so the PDF prints exactly what it printed.

   THE FOUR-COLOUR GRAMMAR (owner decision 2026-09-24). The sheet coloured
   DIRECTION: a rise green, a fall red, the breakeven line and its "$0" red,
   the warning figure red. On a sheet that prices a list, a fall in opex is
   good news and a fall in revenue is not, and the sheet cannot tell which is
   which. Direction is now `--ink-2` with the neutral RING of the league's
   immaterial comparison (7px, 2px `--muted-2`, hollow) — the mark says "this
   is a change", the sign says which way; a warning figure ("not in horizon",
   "runs out …") is attention amber; a LOSS (a net income under zero) is red
   and nothing else is; the breakeven line is the chart system's neutral axis
   rule (`--viz-axis`: `--line` at a 1px dash measured 1.2:1 and did not draw).

   THE CHROME JOINS THE SYSTEM (lead decision): the four boxed tiles are the
   packet's hairline strip (`.board-figs` / `.bf`), the section heads are the
   packet's heading treatment (`.board-sheet .board-h2`, on the page only),
   the red stamp is a `.badge state`, the tables speak the list-table grammar,
   and every wide block scrolls inside its wrapper with the kit's right-edge
   shade. PRICING & GOALS (Cake Equity): each lever is a card with its sizes
   as rows — the live figure, then the field that replaces it — the new-client
   rate behind a disclosure that opens by itself when a rate is set, and the
   goal and the AI narrative are the family 7 block, each with its own Save in
   its foot. Both tabs stay (owner). */

/* --- 1. ONE COLUMN ---------------------------------------------------------
   The toolbar ran the full pane while the sheet stopped at 900px, so "Download
   PDF" sat 300px right of the page it downloads, and the tab strip's rule ran
   past both. Everything now shares the sheet's two edges. */
.scn-page { max-width: 900px; }
.scn-page > .notice { margin: 0 0 var(--s-3); }
.scn-page .scn-toolbar:not([hidden]) {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3); margin: 0 0 var(--s-4);
}
.scn-page .scn-toolbar > a.linklike {
  margin-right: auto; font-size: var(--t-table); font-weight: 500; line-height: 20px;
}
/* the page's one primary, on the kit's geometry: it was bare accent text */
.scn-page .scn-toolbar > a.primary:not([hidden]) {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--ctl-h); padding: 0 14px; border-radius: var(--r-md);
  background: var(--accent-fill); color: var(--on-accent);
  border: 1px solid var(--accent-fill);
  font-size: var(--t-table); font-weight: 600; white-space: nowrap;
  text-decoration: none;
}
.scn-page .scn-toolbar > a.primary:hover {
  background: var(--accent-fill-hover); border-color: var(--accent-fill-hover);
  color: var(--on-accent); text-decoration: none;
}

/* the kit's ONE TAB STRIP: a track, a pill per tab, the chosen one lifted onto
   the surface (the two are <button>s the page's script toggles, so the kit's
   `> a` rules cannot reach them; the numbers are the kit's) */
.scn-page .scn-tabs:not([hidden]) {
  display: inline-flex; align-items: center; gap: 2px;
  height: var(--ctl-h); padding: 3px; margin: 0 0 var(--s-4);
  border: 0; border-radius: var(--r-md); background: var(--track);
  max-width: 100%; min-width: 0;
}
.scn-page .scn-tab:not([hidden]) {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px; margin: 0;
  border: 0; border-radius: var(--r-sm); background: transparent;
  font: inherit; font-size: var(--t-sm); font-weight: 500; color: var(--muted);
  white-space: nowrap; cursor: pointer;
}
.scn-page .scn-tab:hover { color: var(--ink); }
.scn-page .scn-tab.active {
  background: var(--surface); color: var(--ink); font-weight: 600;
  border: 0; margin: 0; padding: 0 12px;
  box-shadow: 0 1px 2px rgba(22, 22, 29, .08);
}

/* --- 2. THE SHEET'S HEAD -----------------------------------------------------
   The packet's head: a 1px ink rule (the 2px one was the only one on any
   sheet), the kicker at the packet's 11px tracked, the title at the packet's
   weight, and the "Comparison only" stamp a state badge at the right — a
   caveat, not an alarm, so it is no longer drawn in the loss colour. */
.proposal-sheet { padding: 28px 32px 30px; border-radius: var(--r-lg); max-width: none; }
.proposal-sheet .sheet-head {
  gap: var(--s-5); border-bottom: 1px solid var(--ink);
  padding-bottom: 16px; margin-bottom: 18px;
}
.proposal-sheet .sheet-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .14em; line-height: 16px;
  color: var(--muted);
}
.proposal-sheet .sheet-title {
  margin: 6px 0 4px; font-size: 26px; font-weight: 600; letter-spacing: -.02em;
  line-height: 32px; color: var(--ink);
}
.proposal-sheet .sheet-sub { font-size: var(--t-table); line-height: 19px; color: var(--muted); }
.proposal-sheet .sheet-stamp.badge {
  flex: none; margin-top: 1px; padding: 3px 9px;
  border-width: 1px; border-radius: var(--r-sm);
  font-size: 11px; font-weight: 600; line-height: 16px; letter-spacing: .02em;
  text-transform: none; text-align: right; white-space: nowrap;
}
.proposal-sheet .sheet-note {
  margin: 0 0 16px; max-width: 72ch; font-size: var(--t-table); line-height: 1.55;
  color: var(--ink-2);
}

/* the read: a reading measure, not the sheet's 840px, and a quiet rule —
   the accent is the actual and the interactive, and a paragraph is neither */
.proposal-sheet .sheet-narrative {
  max-width: 72ch; margin: 0 0 22px; padding: 2px 0 2px 16px;
  border-left: 2px solid var(--line);
  font-size: 15px; line-height: 1.6; color: var(--ink);
}
.proposal-sheet div.sheet-narrative > p { margin: 0 0 10px; font-size: var(--t-14); color: var(--ink-2); }
.proposal-sheet div.sheet-narrative > p.lead { font-size: 15px; color: var(--ink); }
.proposal-sheet div.sheet-narrative > p.sheet-fine { margin: 6px 0 0; font-size: 11.5px; color: var(--muted); }

/* --- 3. THE FOUR FIGURES ARE THE PACKET'S STRIP ----------------------------
   Four boxed grey tiles become one strip between two hairlines, a
   `--line-soft` rule between figures, the label in sentence case, and the
   label / figure / sub-line rows shared across the strip so a label that
   wraps never pushes one figure below its neighbours. */
.proposal-sheet .sheet-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  margin: 0 0 6px; padding: 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.proposal-sheet .scard:not([hidden]) {
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
  padding: 14px 16px 14px; border: 0; border-radius: 0; background: none;
}
.proposal-sheet .scard + .scard { border-left: 1px solid var(--line-soft); }
.proposal-sheet .scard:first-child { padding-left: 0; }
.proposal-sheet .scard-k {
  font-size: var(--t-label); font-weight: 500; letter-spacing: .02em; line-height: 16px;
  text-transform: none; color: var(--muted);
}
.proposal-sheet .scard-v {
  margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 28px;
  color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.proposal-sheet .scard-s {
  font-size: 12px; line-height: 17px; color: var(--ink-2); font-variant-numeric: tabular-nums;
}
/* the warning figure is ATTENTION, never the loss colour */
.proposal-sheet .scard-v.scard-warn {
  font-size: 16px; font-weight: 600; letter-spacing: 0; color: var(--attn-ink);
}

/* --- 4. DIRECTION, ATTENTION AND A LOSS --------------------------------------
   The `.up` / `.down` spans the sheet's macros print. */
.proposal-sheet .up, .proposal-sheet .down { color: var(--ink-2); font-weight: 600; }
.proposal-sheet .up::before, .proposal-sheet .down::before {
  content: ""; display: inline-block; box-sizing: border-box;
  width: 7px; height: 7px; margin-right: 6px; vertical-align: 1px;
  border-radius: 50%; border: 2px solid var(--muted-2); background: transparent;
}
/* the strip's figure is the strip's ink and carries no mark, as a figure in
   the packet's strip carries none: the sign says which way, the sub-line
   under it says from what to what (a ring before a 22px figure read as a
   bullet and broke the strip's left edge) */
.proposal-sheet .scard-v .up, .proposal-sheet .scard-v .down { color: var(--ink); font-weight: 600; }
.proposal-sheet .scard-v .up::before, .proposal-sheet .scard-v .down::before { content: none; }
/* cash running out is the sheet's warning: amber ink behind a filled amber mark */
.proposal-sheet .scn-runs-out { color: var(--attn-ink); }
.proposal-sheet .scn-runs-out::before { border: 0; background: var(--attn); }
/* the gap to breakeven is a distance to a target, not a direction */
.proposal-sheet .scn-gap { color: inherit; font-weight: inherit; }
.proposal-sheet .scn-gap::before { content: none; }
/* a LOSS, and nothing else, is red */
.proposal-sheet .sheet-tbl td.loss { color: var(--err); }

/* --- 5. THE SECTION HEADS ARE THE PACKET'S -----------------------------------
   `.board-sheet .board-h2`, value for value; the qualifier after the name
   stays sentence case (it carried that in an inline style). */
.proposal-sheet .sheet-h {
  margin: 30px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
  font-size: 11px; font-weight: 700; letter-spacing: .14em; line-height: 16px;
  text-transform: uppercase; color: var(--muted);
}
.proposal-sheet .sheet-h .muted {
  font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none;
  color: var(--muted);
}

/* --- 6. THE TABLES SPEAK THE LIST-TABLE GRAMMAR ------------------------------
   11.5px sentence-case 600 `--muted` headers (they were 10.5px uppercase 700,
   the last on any page), 13px body at a 34px row, tabular figures, the total
   at 700 under the 1.5px ink rule. A key/value table keeps its value within
   reach of its key instead of the sheet's far edge. */
.proposal-sheet .sheet-tbl { width: 100%; border-collapse: collapse; font-size: var(--t-table); }
.proposal-sheet .sheet-tbl :is(th, td):first-child { padding-left: 0; }
.proposal-sheet .sheet-tbl :is(th, td):last-child { padding-right: 0; }
.proposal-sheet .sheet-tbl :is(th, td).num {
  text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.proposal-sheet .sheet-tbl tbody tr:last-child td { border-bottom: 0; }
.proposal-sheet .sheet-tbl td strong { font-weight: 600; color: var(--ink); }
.proposal-sheet .proforma .pf-less td { color: var(--muted); }
.proposal-sheet .proforma .pf-sub td { font-weight: 600; border-top: 1px solid var(--line); }
.proposal-sheet .proforma .pf-margin td { height: 28px; font-size: 12px; color: var(--muted); }
.proposal-sheet .proforma tr.pf-net td { font-size: var(--t-14); }
/* a key/value table's conclusion row carries its answer in weight alone */
.proposal-sheet .sheet-tbl.kv { width: 100%; max-width: 560px; }
.proposal-sheet .sheet-tbl.kv td:first-child { color: var(--muted); }
/* the fine print and the basis list, on the sheet's measure */
.proposal-sheet .sheet-fine { max-width: 72ch; margin: 8px 0 6px; font-size: 12px; line-height: 1.5; }
.proposal-sheet .sheet-basis {
  max-width: 72ch; margin: 0; padding-left: 18px;
  font-size: var(--t-sm); line-height: 1.55; color: var(--ink-2);
}
.proposal-sheet .sheet-basis li { margin-bottom: 6px; }
.proposal-sheet .sheet-basis li::marker { color: var(--muted-2); }

/* every table on the sheet scrolls inside its own wrapper, and an off-screen
   column says so with the kit's scroll-driven right-edge shade — which cannot
   claim a column that is not there (a lever card is a `.set-block`, whose
   wrapper already carries the same shade) */
.proposal-sheet .tablewrap:not([hidden]) { display: flex; margin: 0; }
.proposal-sheet .tablewrap > table { flex: 1 0 auto; }
.proposal-sheet .tablewrap > table.kv { flex: 0 1 560px; }

/* --- 7. THE TRAJECTORY --------------------------------------------------------
   The last month's label is centred on the plot's right edge and the SVG cut
   it to "Sep 20": the chart draws past its box now. The breakeven line and
   its "$0" are the neutral axis rule, not the loss colour. */
.proposal-sheet .scn-chart-wrap { margin: 6px 0 8px; }
.proposal-sheet .scn-chart { margin: 0; max-width: 680px; overflow: visible; }
.proposal-sheet .scn-zero { stroke: var(--viz-axis); stroke-width: 1; opacity: 1; }
.proposal-sheet .scn-axis { fill: var(--muted); }
.proposal-sheet .scn-axis-zero { fill: var(--ink-2); font-weight: 600; }
.proposal-sheet .scn-legend { margin: 0 0 14px; font-size: 12px; color: var(--muted); }
.proposal-sheet .scn-key { color: var(--ink-2); font-weight: 500; }

/* --- 8. PRICING & GOALS ------------------------------------------------------
   The panel's dashed rule and its 50px of air were the old one-page layout's
   seam between the sheet and the tools; the tab strip is the seam now. */
.scn-page .scn-tools { margin: 0; padding: 0; border-top: 0; }
.scn-section-head { margin: 0 0 var(--s-3); }
.scn-section-head h2 {
  margin: 0; font-size: 15px; font-weight: 650; line-height: 20px; letter-spacing: -.01em;
  text-transform: none; color: var(--ink);
}
.scn-section-head > p {
  margin: 6px 0 0; max-width: 72ch; font-size: var(--t-sm); line-height: 19px;
  color: var(--muted);
}
.scn-section-head > p strong { color: var(--ink-2); font-weight: 600; }

/* the levers: one card each, the one Save under the last */
.scn-page form.scn-prices:not([hidden]) {
  display: flex; flex-direction: column; gap: var(--s-3); margin: 0 0 var(--s-5);
}
.scn-page .scn-lever { margin: 0; }
.scn-lever > .set-block-head:not([hidden]) { padding: 12px 20px 10px; align-items: center; }
.scn-lever .set-block-head h3:not([hidden]) {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: var(--t-14); font-weight: 650; line-height: 20px; color: var(--ink);
}
/* the table: fixed columns so every lever's columns line up down the tab, the
   monthly pair and the setup pair each read as one group */
.scn-lever table.scn-lever-table { table-layout: fixed; min-width: 640px; }
.scn-lever-table thead th:nth-child(2), .scn-lever-table thead th:nth-child(4) { width: 7.5rem; }
.scn-lever-table thead th:nth-child(3), .scn-lever-table thead th:nth-child(5) { width: 8.5rem; }
.scn-lever-table thead th:nth-child(6) { width: 5.5rem; }
.scn-lever-table > * > tr > :nth-child(4),
.scn-lever-table > * > tr > :nth-child(6) { border-left: 1px solid var(--line-soft); }
.scn-lever-table tbody th[scope="row"] { font-weight: 500; }
/* a row that holds a field keeps 6px above and below it */
.scn-lever table.scn-lever-table tbody :is(th, td) { height: 40px; }
.scn-lever-table td.scn-live { color: var(--muted); }
/* the scenario price is the lever: a real field, the kit's compact variant,
   and a field that carries a price reads as set (an accent edge, 600) */
.scn-lever-table td.scn-set input {
  box-sizing: border-box; width: 100%; max-width: 8rem; height: var(--ctl-h-sm);
  padding: 0 8px; margin: 0; border: 1px solid var(--field-line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: var(--t-table); text-align: right;
  font-variant-numeric: tabular-nums;
}
.scn-lever-table td.scn-set input::placeholder { color: var(--muted-2); }
.scn-lever-table td.scn-set input:not(:placeholder-shown) {
  border-color: var(--accent-line); font-weight: 600;
}
.scn-lever-table td.scn-set input:hover { border-color: var(--muted-2); }
.scn-lever-table td.scn-set input:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}

/* the new-client rate: a disclosure under the table, the kit's chevron */
.scn-lever > details.scn-growth-row { border-top: 1px solid var(--line); }
.scn-lever > details.scn-growth-row > summary:not([hidden]) {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px;
  padding: 11px 20px; cursor: pointer; list-style: none;
  font-size: var(--t-table); font-weight: 600; line-height: 18px; color: var(--ink);
}
.scn-lever > details.scn-growth-row > summary::-webkit-details-marker { display: none; }
.scn-lever > details.scn-growth-row > summary::before {
  content: ""; flex: none; align-self: center; width: 5px; height: 5px; margin: 0 3px 0 1px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg); color: var(--muted);
}
.scn-lever > details.scn-growth-row[open] > summary::before { transform: rotate(45deg); margin-top: -3px; }
.scn-lever > details.scn-growth-row > summary:hover { background: var(--surface-2); }
.scn-lever > details.scn-growth-row > summary .muted { font-size: 12px; font-weight: 400; }
.scn-growth-field { padding: 0 20px 14px 36px; font-variant-numeric: tabular-nums; }
.scn-growth-field input {
  box-sizing: border-box; width: 8rem; height: var(--ctl-h-sm); padding: 0 8px; margin: 0;
  border: 1px solid var(--field-line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: var(--t-table); text-align: right; font-variant-numeric: tabular-nums;
}
.scn-growth-field input::placeholder { color: var(--muted-2); }
.scn-growth-field input:not(:placeholder-shown) { border-color: var(--accent-line); font-weight: 600; }
.scn-growth-field input:hover { border-color: var(--muted-2); }
.scn-growth-field input:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
.scn-prices-foot:not([hidden]) { display: flex; justify-content: flex-end; }
.scn-page .scn-none { margin: 0; font-size: var(--t-table); }

/* the goal: the family 7 block, two fields and the Save in the foot */
.scn-page .scn-goal, .scn-page .scn-ai { margin: 0 0 var(--s-4); }
.scn-page form.scn-goal-form:not([hidden]) { display: block; max-width: none; margin: 0; }
.scn-goal-fields:not([hidden]) {
  display: grid; grid-template-columns: repeat(2, minmax(0, 20rem)); gap: 12px 24px;
  padding: 0 20px 16px;
}
.scn-page .scn-goal-form .scn-goal-fields > label:not([hidden]) {
  display: flex; flex-direction: column; gap: 4px;
  font-size: var(--t-sm); font-weight: 550; line-height: 18px; color: var(--ink-2);
}
.scn-page .scn-goal-form .scn-goal-fields input {
  box-sizing: border-box; width: 100%; height: var(--ctl-h); padding: 0 11px; margin: 0;
  border: 1px solid var(--field-line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: var(--t-table); font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.scn-page .scn-goal-form .scn-goal-fields input::placeholder { color: var(--muted-2); }
.scn-page .scn-goal-form .scn-goal-fields input:hover { border-color: var(--muted-2); }
.scn-page .scn-goal-form .scn-goal-fields input:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
.scn-page .scn-goal-form .scn-goal-fields label > .muted { font-size: 12px; font-weight: 400; line-height: 17px; }
/* the AI narrative: its sentence in the head, the act in the foot, the
   reason it cannot run yet to the act's left */
.scn-ai .set-block-desc code { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.scn-ai .set-block-foot > .muted { order: -1; font-size: var(--t-sm); }
/* Family 8 after its review: three reviewers opened 169 before/after pairs
   of the close, the report, the packet, the history, the snapshot and the
   scenario (light, dark and the true-390 phone) and found no blocker. This
   block is the lead's decisions on what they found. LOOK, LAYOUT AND
   HIERARCHY ONLY: no word, no hook, no figure moves, no earlier rule is
   edited, and the pinned selectors are not restated (the verdict chips are
   addressed through `.bv-head`, so `.board-sheet .bv-chip` still ends with
   its pinned `font-size: 11px`). The media queries use the range form. */

/* --- 1. THE SCENARIO'S TOTALS DRAW THEIR RULES -------------------------------
   A collapsed border between two rows is ONE border: the pro forma's Net
   income ruled 1.5px ink on its top, which draws 1px at 1x and TIES with
   the row above's 1px `--line-soft` bottom — and in a tie the upper cell
   wins, so the sheet's one anchor total read like any other row (so did
   "Total clients", and Gross profit's `--line` under the hairline). The row
   above gives up its hairline, as family 5's review did for the contract
   review's Gross margin: the total keeps the product's 1.5px ink rule, the
   subtotal its `--line` rule. */
.proposal-sheet .sheet-tbl:not(.kv) tr:has(+ tr.pf-net) > td,
.proposal-sheet .proforma tr:has(+ tr.pf-sub) > td { border-bottom: 0; }

/* --- 2. A DIRECTION MARK AFTER WORDS KEEPS ITS AIR ---------------------------
   The ring opens its figure; where words precede the figure in the same cell
   ("at 70%: ○ +$39,424.00", the downside's close-rate column) it sat on the
   colon. There it takes a left margin as well. It is scoped to the one cell
   where words come first — the key / value tables' third column — and not
   to every figure cell: an auto-layout table widens a column by its
   widest content, and 5px on every ring moved the pro forma's Base and
   Scenario figures 4-6px left to make room for a margin nobody sees. */
.proposal-sheet .sheet-tbl.kv td.num:nth-child(3) > :is(.up, .down)::before { margin-left: 5px; }
.proposal-sheet .sheet-h {
  margin: 32px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
  font-size: 16px; font-weight: 650; line-height: 22px; letter-spacing: -.01em;
  text-transform: none; color: var(--ink);
}
.proposal-sheet .sheet-h .muted {
  font-size: var(--t-sm); font-weight: 400; letter-spacing: 0; text-transform: none;
  color: var(--muted);
}

@media (width <= 720px) {
  .proposal-sheet .scard:nth-child(2n+1) { border-left: 0; padding-left: 0; }
  .proposal-sheet .scard:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
}

@media (width <= 640px) {
  .scn-page .scn-toolbar:not([hidden]) { margin-bottom: var(--s-3); }
  .proposal-sheet { padding: 20px 16px 22px; border-radius: var(--r-md); }
  .proposal-sheet .sheet-head { flex-direction: column; gap: var(--s-3); }
  .proposal-sheet .sheet-stamp.badge { text-align: left; }
  .proposal-sheet .sheet-title { font-size: 22px; line-height: 28px; }
  .proposal-sheet .sheet-narrative { font-size: var(--t-14); padding-left: 12px; }
  .proposal-sheet .scard-v { font-size: 18px; line-height: 24px; }
  .proposal-sheet .scard-v.scard-warn { font-size: 15px; }
  .proposal-sheet .scn-chart-wrap:not([hidden]) { display: flex; overflow-x: auto; }
  .proposal-sheet .scn-chart { flex: none; width: 560px; min-width: 560px; }
  /* a row's name keeps a readable width and the table scrolls, rather than
     "Runway — scenario" breaking over three lines beside its figure */
  .proposal-sheet .sheet-tbl td:first-child { min-width: 8.5rem; }
  .proposal-sheet .tbl-scroll .sheet-tbl td:first-child { min-width: 0; }
  .proposal-sheet .sheet-tbl:not(.kv) td { white-space: nowrap; }
  .scn-lever table.scn-lever-table > * > tr > :first-child {
    position: sticky; left: 0; z-index: 2; background: var(--surface); width: 6.5rem;
  }
  .scn-goal-fields:not([hidden]) { grid-template-columns: minmax(0, 1fr); padding: 0 16px 16px; }

  @supports (animation-timeline: scroll()) {
    .proposal-sheet .scn-chart-wrap::after {
      content: ""; flex: none; align-self: stretch;
      width: 18px; margin-left: -18px;
      position: sticky; right: 0; z-index: 3;
      opacity: 0; pointer-events: none;
      background: linear-gradient(to left, var(--shade-edge), transparent);
      animation: kit-shade-bottom linear both;
      animation-timeline: scroll(nearest inline);
      animation-range: calc(100% - 12px) 100%;
    }
  }
}

@media screen and (width <= 640px) {
/* --- 4. THE PHONE --------------------------------------------------------------
   THE KEY / VALUE TABLES WRAP INSIDE THE CARD (Profitability, Cash & runway,
   the goal, the downside): their answer is the decision column, so it is
   never pushed past the edge — the table takes its wrapper's width, the key
   column loses its 8.5rem floor and a value may wrap. The other sheet tables
   keep their one-line cells and scroll behind the shade.
   THE LOCK SCHEDULE'S FOUR COLUMNS FIT THE CARD: a tag never breaks inside
   its pill, the line cell wraps around it (a pill that finds no room drops
   under the line's name, flush with it), and the cells give back enough of
   their air — a 4px gutter between columns, an 8px step for a line under its
   band, the pill's own inset 5px — for "cost of doing the work" to sit in
   the Line column beside GL, Value and Version. */
  .proposal-sheet .tablewrap > table.kv { flex: 1 1 auto; max-width: 100%; }
  .proposal-sheet .sheet-tbl.kv td:first-child { min-width: 0; }
  .proposal-sheet .sheet-tbl.kv :is(th, td).num { white-space: normal; }
  /* ...and a figure stays whole where it wraps: a direction ring with its
     signed figure, an arrow with the figure it points to, a base in its
     brackets — the words around them ("holds through", "at 70%:") break */
  .proposal-sheet .sheet-tbl.kv tr:has(> td:nth-child(3)) > td.num:not(:has(> *)),
  .proposal-sheet .sheet-tbl.kv tr:has(> td:nth-child(3)) > td.num > *,
  .proposal-sheet .sheet-tbl.kv td.num > .muted { white-space: nowrap; }
}

@supports (animation-timeline: scroll()) {
  .proposal-sheet .tablewrap::after {
    content: ""; flex: none; align-self: stretch;
    width: 18px; margin-left: -18px;
    position: sticky; right: 0; z-index: 3;
    opacity: 0; pointer-events: none;
    background: linear-gradient(to left, var(--shade-edge), transparent);
    animation: kit-shade-bottom linear both;
    animation-timeline: scroll(nearest inline);
    animation-range: calc(100% - 12px) 100%;
  }
}

@supports (grid-template-rows: subgrid) {
  .proposal-sheet .sheet-cards { grid-auto-rows: auto; }
}

@media (width <= 720px) {
/* --- 9. DARK -----------------------------------------------------------------
   Every value above is a token with a dark twin; the ring's `--muted-2` is
   3.0:1 on the dark surface and the amber mark `--attn` 6.3:1. Nothing to
   restate. */

/* --- 10. THE PHONE -------------------------------------------------------------
   A 390px screen had the stamp squeezing the title to four lines, four tiles
   of 70px each, a chart whose axis labels rendered at 4px, and the lever
   tables cut at the viewport. The head stacks; the strip goes two across
   (one under 340px); the chart keeps a legible size and scrolls in its
   wrapper with the shade; the lever tables scroll inside their cards with
   the size frozen at the left. */
  .proposal-sheet .sheet-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (width <= 340px) {
  .proposal-sheet .sheet-cards { grid-template-columns: minmax(0, 1fr); }
}

@supports (grid-template-rows: subgrid) {
  .proposal-sheet .scard:not([hidden]) {
    display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 3px;
    align-content: start;
  }
}

@media (width <= 640px) {
  .proposal-sheet .scard:not([hidden]) { padding: 12px 12px; }
  .proposal-sheet .scard:nth-child(2n+1) { padding-left: 0; }
}

@media (width <= 340px) {
  .proposal-sheet .scard:not([hidden]), .proposal-sheet .scard + .scard { padding: 12px 0; border-left: 0; }
  .proposal-sheet .scard + .scard { border-top: 1px solid var(--line-soft); }
}

/* ===== THE AUDIT TRAIL [audit] =====
   The audit page: its filter, groups and rows.
   --- kept from an old banner ---
   THE AUDIT TRAIL AND THE SHELL FIXES · A (2026-09-24)
   --- kept from an old banner ---
   THE AUDIT TRAIL, THE ADMIN PAGE AND THE HELP CENTER · D · after the review (2026-09-24)
*/

/* --------------------------------------------------------------- audit --- */
.audit-table code { font-size: 12px; background: var(--line-soft); padding: 1px 6px;
  border-radius: 4px; }
.audit-detail { font-size: 12px; color: var(--muted); max-width: 480px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* -- the audit trail ----------------------------------------------------- */
/* the width goes to what happened, not to an actor id */
.audit-table td.audit-what, .audit-table th:nth-child(3) { width: 55%; }
.audit-json { display: inline-block; vertical-align: baseline; margin-left: 8px; }
.audit-json summary::-webkit-details-marker { display: none; }
.audit-json pre { margin: 4px 0 0; padding: 8px 10px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 6px; font-family: var(--mono);
  font-size: 11.5px; white-space: pre-wrap; word-break: break-word; color: var(--ink-2); }
.audit-table td.audit-when { white-space: nowrap; font-family: var(--mono);
  font-size: 11.5px; color: var(--muted); }
.audit-table td.audit-month { white-space: nowrap; }
.audit-table td.audit-action { white-space: nowrap; }
.audit-table td.audit-action code { font-family: var(--mono); font-size: 11.5px;
  color: var(--ink-2); }
/* (the filled severity pill is now the tier's tint — see the fourth pass at
   the end of this file; `--inverse-ink` here resolved to the same #fff it
   replaced, which is a rule that does nothing) */

/* -- the audit trail: a run is one act, and the record is one chevron ---- */
/* review 2026-09-08, 06-N16/N17 */
.audit-table th.audit-what { width: 55%; }
/* the summary's LABEL is the column header's ("the full record folds open"),
   so the control is a chevron — it was printing "the record" 32 times */
.audit-json summary::before { content: ""; display: inline-block; width: 0; height: 0;
  border-left: 4px solid currentColor; border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent; vertical-align: 1px; }
.audit-json[open] summary::before { border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent; border-top: 4px solid currentColor;
  border-bottom: 0; vertical-align: 2px; }
/* the banded run: the constants once on the band, the months as child rows —
   named by the one thing that varies, indented under the band, exactly as a
   journal's leg is named by its account */
.audit-table tr.child-row th.audit-scope { padding-left: 30px; font-weight: 500; }

/* N14 — the audit run's months, inside the band's own fold */
.audit-run { margin-top: 3px; }
.audit-run summary::-webkit-details-marker { display: none; }
.audit-run summary::before { content: "▸ "; }
.audit-run[open] summary::before { content: "▾ "; }
.audit-run-list { margin: 5px 0 2px; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; gap: 4px 16px; }
.audit-run-list li { font-size: 12.5px; color: var(--ink-2); font-weight: 400; }
.rail-switcher > summary::-webkit-details-marker { display: none; }
.board-sections > summary::-webkit-details-marker { display: none; }
.audit-export { margin-left: 12px; font-size: 12.5px; }
.how-to-read > summary::-webkit-details-marker { display: none; }
.head-more > summary::-webkit-details-marker { display: none; }
.page-head.suite + details.page-note > summary::-webkit-details-marker,
#imported-charges > summary::-webkit-details-marker,
:is(.gl-undo, .gl-clear) > summary::-webkit-details-marker { display: none; }
.page-head.suite + details.page-note > summary::before,
#imported-charges > summary::before,
:is(.gl-undo, .gl-clear) > summary::before {
  content: ""; flex: none; width: 5px; height: 5px; margin: 0 1px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
}
/* one column that never wraps: a WRAPPING column sizes its line by its widest
   item, so the dated control's own width pushed both rows past the strip */
.list-toolbar > .audit-filter:where(:not([hidden])) {
  display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch;
  gap: var(--s-2); flex: 1 1 100%; min-width: 0; margin: 0;
}
/* every control is the kit's field: one height, one edge, one radius */
.audit-filter > .af-what > :is(.list-search, select) {
  height: var(--ctl-h); min-height: var(--ctl-h); margin: 0;
  border: 1px solid var(--field-line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: var(--t-table); line-height: 18px;
}
.audit-filter > .af-what > .list-search {
  flex: 1 1 200px; min-width: 200px; max-width: none; padding: 0 11px;
}
.audit-filter > .af-what > :is(.list-search, select):hover { border-color: var(--muted-2); }
.audit-filter > .af-what > :is(.list-search, select):focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
/* A SET FILTER LOOKS SET (Remote, the cheap part of its chips): an unset
   picker reads as a placeholder, a set one as an ink value on an accent
   edge — so "what is filtered" is answered at a glance */
.audit-filter > .af-what > select:has(> option[value=""]:checked) { color: var(--muted); }
.audit-filter > .af-what > select:not(:has(> option[value=""]:checked)) {
  border-color: var(--accent); color: var(--ink);
}
/* the publications switch is a control like the pickers beside it */
.audit-filter > .af-what > .audit-only:where(:not([hidden])) {
  display: inline-flex; align-items: center; gap: 7px;
  height: var(--ctl-h); padding: 0 12px 0 10px; margin: 0;
  border: 1px solid var(--field-line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink-2);
  font-size: var(--t-table); line-height: 18px; white-space: nowrap; cursor: pointer;
}
.audit-filter > .af-what > .audit-only:hover { border-color: var(--muted-2); }
.audit-filter > .af-what > .audit-only > input { margin: 0; accent-color: var(--accent); }
.audit-filter > .af-what > .audit-only:has(> input:checked) {
  border-color: var(--accent); color: var(--ink);
}
.audit-filter > .af-what > .audit-only:has(> input:focus-visible) {
  outline: 2px solid var(--accent); outline-offset: -1px;
}
/* FROM / TO ARE ONE DATED CONTROL: one edge around both dates, the two words
   inside it at the table header's size, a hairline before "to" */
.audit-filter > .af-when > .af-dates:where(:not([hidden])) {
  display: inline-flex; align-items: center; gap: 6px;
  height: var(--ctl-h); padding: 0 4px 0 11px; min-width: 0;
  border: 1px solid var(--field-line); border-radius: var(--r-md);
  background: var(--surface);
}
.audit-filter > .af-when > .af-dates:hover { border-color: var(--muted-2); }
.audit-filter > .af-when > .af-dates:focus-within {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
.audit-filter > .af-when > .af-dates > .muted {
  font: 600 var(--t-label)/15px var(--sans); letter-spacing: .01em; color: var(--muted);
}
.audit-filter > .af-when > .af-dates > input + .muted {
  margin-left: 2px; padding-left: 10px; border-left: 1px solid var(--line);
}
.audit-filter > .af-when > .af-dates > input[type="date"] {
  height: calc(var(--ctl-h) - 2px); min-height: 0; padding: 0 4px; margin: 0;
  border: 0; border-radius: var(--r-sm); outline: 0;
  background: transparent; color: var(--ink);
  font: inherit; font-size: var(--t-table); line-height: 18px;
  font-variant-numeric: tabular-nums;
}
.audit-filter > .af-when > .af-dates > input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer; opacity: .7;
}
.audit-filter > .af-when > .af-dates > input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}
/* Apply: the row's one filled control, in the accent's tint (the register's) */
.audit-filter > .af-when > button[type="submit"] {
  background: var(--accent-soft); color: var(--accent); border-color: transparent;
}
.audit-filter > .af-when > button[type="submit"]:hover {
  background: var(--accent-fill); color: var(--on-accent); border-color: var(--accent-fill);
}
.audit-filter > .af-when > a.linklike:not(.audit-export) {
  font-size: var(--t-sm); font-weight: 600; line-height: var(--ctl-h);
}
/* THE EXPORT at the strip's right end, the kit's secondary role with the
   download stroke the grid's own "Download data" wears (a mask, never a
   glyph) — the artifact a compliance reader came for, beside its filters */
.audit-filter > .af-when > a.audit-export {
  display: inline-flex; align-items: center; gap: 6px;
  height: var(--ctl-h); margin: 0 0 0 auto; padding: 0 12px 0 10px;
  border: 1px solid var(--field-line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink);
  font: 600 var(--t-table)/18px var(--sans); text-decoration: none; white-space: nowrap;
}
.audit-filter > .af-when > a.audit-export::before {
  content: ""; flex: none; width: 14px; height: 14px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M7 10l5 5 5-5M12 15V3'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M7 10l5 5 5-5M12 15V3'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
}
.audit-filter > .af-when > a.audit-export:hover {
  border-color: var(--accent); color: var(--accent); text-decoration: none;
}

/* --- 2. THE RANGE'S NOTES ARE THE TABLE'S OWN (Employment Hero) ----------
   "Every action in this range was accepted…", the refusal count and the
   Month column's fold note were loose muted paragraphs between the filters
   and the table. They are one strip on the table's top edge now, its
   sentences verbatim, the refusal count in ink because a refusal is what a
   compliance reader came for. An empty strip (a range with no rows) is not
   drawn at all. */
.audit-notes:not(:has(> p)) { display: none; }
.audit-notes:where(:not([hidden])):has(> p) {
  display: flex; flex-direction: column; gap: 2px;
  padding: 9px 14px; background: var(--surface-2);
  border: 1px solid var(--line); border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
}
.audit-notes > p.ledger-kindnote {
  margin: 0; font-size: var(--t-sm); line-height: 18px; color: var(--muted);
}
.audit-notes > p.ledger-kindnote.audit-refused { color: var(--ink-2); }
.audit-notes > p.ledger-kindnote.audit-refused > strong { color: var(--ink); }
.audit-notes:has(> p) + .tablewrap > table.audit-table {
  border-top-left-radius: 0; border-top-right-radius: 0;
}

/* --- 3. THE TABLE ---------------------------------------------------------
   The card keeps its edge in both themes: `table.dt` collapses the borders,
   so `.attest-table`'s own border never painted and in dark the surface met
   the ground with nothing between (family 6's finding on the register, the
   same inset outline). `overflow: clip` keeps the corners without making
   the table a scroller, so the header can stick to the PAGE. */
table.dt.audit-table { overflow: clip; outline: 1px solid var(--line); outline-offset: -1px; }
/* THE HEADER STAYS IN VIEW down a hundred rows (the access editor's own
   idiom): it sticks to the page, not to the wrapper, which is no scroller
   wherever the table fits. A collapsed border does not travel with a stuck
   cell, so the header's rule is its own inset line. */
table.dt.audit-table > thead > tr > th {
  position: sticky; top: 0; z-index: 2;
  background: var(--sum-bg); line-height: 15px;
  border-bottom: 0; box-shadow: inset 0 -1px 0 var(--line);
}
table.dt.audit-table > thead > tr > th > .th-sub { line-height: 14px; }
/* every row reads across ONE baseline: the date, the actor, the sentence,
   the month and the outcome on the first line; the time and the record's
   control under them */
table.dt.audit-table > tbody > tr > :is(td, th) {
  height: auto; padding: 6px 10px 5px; vertical-align: baseline;
}
table.dt.audit-table > tbody > tr > th.audit-what { line-height: 18px; }

/* THE WHEN IS TWO LINES (owner decision 2026-09-24; Vanta): the date that
   repeated ninety times down the page steps back, and the time — the part
   that changes — is the one in ink */
table.dt.audit-table td.audit-when {
  width: 1%; white-space: nowrap; font-family: var(--sans); color: var(--muted);
}
table.dt.audit-table td.audit-when > .aw-d {
  display: block; font: 400 var(--t-label)/15px var(--mono); color: var(--muted);
}
table.dt.audit-table td.audit-when > .aw-t {
  display: block; font: 500 var(--t-sm)/16px var(--mono); color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
/* THE WHO: a person in ink at the row's weight, a system actor a step
   quieter — told apart by weight, never by a new word (its own words
   already say "system:"). A name never breaks inside a word. */
table.dt.audit-table td.audit-who {
  width: 1%; max-width: none; white-space: normal; overflow-wrap: normal;
  font-weight: 500; line-height: 18px; color: var(--ink);
}
table.dt.audit-table td.audit-who.is-system { font-weight: 400; color: var(--muted); }
table.dt.audit-table td.audit-month {
  white-space: nowrap; line-height: 18px; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

/* THE DEAD GUTTER CLOSES. "What happened" held 55% of the table, so a short
   sentence ended a third of a screen before its month. The sentence column
   is as wide as its longest sentence and the LAST column — the month, or
   the outcome after it — takes the slack, so the month sits against the
   sentence it belongs to. Only from 1360px, where the longest sentence on
   record (57 characters), a long name, a month span and the outcome fit
   with room to spare; below it the sentences wrap and share the width, as
   before, and nothing can push the table past its card. */
table.dt.audit-table th.audit-what,
table.dt.audit-table > thead > tr > th:nth-child(3) { width: auto; }
table.dt.audit-table > thead > tr > th:is(:first-child, :nth-child(2)) {
  width: 1%; white-space: nowrap;
}

/* THE RECORD IS ONE CONTROL ON ITS OWN LINE (PlanetScale): a 5px triangle
   with a 2px hit area, which jumped from the sentence's end to the next line
   when it opened, is a 20px chevron under the sentence that stays where it
   is. The label is the column header's, so it carries no word; its
   `aria-label` is unchanged. Open, the record is a panel on the accent's
   left rule, 12px mono, its first line — the action — its heading. The raw
   key lives in that `<pre>` and nowhere else. */
table.dt.audit-table .audit-json:where(:not([hidden])) {
  display: block; margin: 1px 0 0 -6px; vertical-align: baseline;
}
/* a 20px target that costs the row 18px: it overhangs its line by one
   pixel above and below */
table.dt.audit-table .audit-json > summary {
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; padding: 0; margin: -1px 0;
  border-radius: var(--r-sm); color: var(--muted); cursor: pointer; list-style: none;
}
table.dt.audit-table .audit-json > summary::-webkit-details-marker { display: none; }
table.dt.audit-table .audit-json > summary::before {
  content: ""; flex: none; width: 5px; height: 5px; margin: 0 1px 0 0;
  border: 0; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg); vertical-align: 0;
}
table.dt.audit-table .audit-json[open] > summary::before {
  border: 0; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); margin: -3px 0 0;
}
table.dt.audit-table .audit-json > summary:hover { background: var(--track); color: var(--ink); }
table.dt.audit-table .audit-json[open] > summary { color: var(--ink-2); }
table.dt.audit-table .audit-json > pre::first-line { font-weight: 600; color: var(--ink); }

/* THE RUN READS AS A RUN (PlanetScale): the band that stands for seven acts
   printed smaller and greyer than the rows around it and read as a zebra
   stripe. It carries the body's 13px ink on `--surface-2` with the accent's
   2px rule down its first cell — a journal's band on the register — and its
   "open the run" wears the kit's chevron. */
table.dt.audit-table > tbody > tr.audit-group > td {
  background: var(--surface-2); color: var(--ink); letter-spacing: 0;
  font-size: var(--t-table); font-weight: 400; line-height: 18px;
}
table.dt.audit-table > tbody > tr.audit-group:hover > td { background: var(--surface-2); }
table.dt.audit-table > tbody > tr.audit-group > td[colspan] { font-weight: 500; }
table.dt.audit-table > tbody > tr.audit-group > td[colspan] > .j-leg {
  font-size: var(--t-sm); font-weight: 400; color: var(--muted);
}
table.dt.audit-table > tbody > tr.audit-group > td:first-child { position: relative; }
table.dt.audit-table > tbody > tr.audit-group > td:first-child::before {
  content: ""; position: absolute; left: 1px; top: 0; bottom: -1px; width: 2px;
  background: var(--accent-line); pointer-events: none;
}
table.dt.audit-table > tbody > tr.audit-group > td.audit-who { font-weight: 500; color: var(--ink); }
table.dt.audit-table > tbody > tr.audit-group > td.audit-who.is-system {
  font-weight: 400; color: var(--muted);
}
table.dt.audit-table .audit-run { margin: 1px 0 0 -6px; }
table.dt.audit-table .audit-run > summary {
  display: inline-flex; align-items: center; gap: 7px;
  height: 20px; padding: 0 6px; margin: -1px 0; border-radius: var(--r-sm);
  font: 600 var(--t-sm)/20px var(--sans); color: var(--accent);
}
table.dt.audit-table .audit-run > summary::before {
  content: ""; flex: none; width: 5px; height: 5px; margin: 0 1px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
}
table.dt.audit-table .audit-run[open] > summary::before { transform: rotate(45deg); margin-top: -3px; }
table.dt.audit-table .audit-run > summary:hover { background: var(--track); }
table.dt.audit-table .audit-run-list { margin: 6px 0 2px 6px; gap: 4px 18px; }
table.dt.audit-table .audit-run-list > li:where(:not([hidden])) {
  display: inline-flex; align-items: baseline; gap: 2px;
  font-size: var(--t-sm); line-height: 18px; color: var(--ink-2);
}
table.dt.audit-table .audit-run-list > li > .audit-json { margin: 0; }
table.dt.audit-table .audit-run-list > li:has(> .audit-json[open]):where(:not([hidden])) {
  display: block; flex: 1 1 100%;
}

/* the one designed empty row, with air, as on the register — and over it
   the headers spread as headers, since there is no row to shrink-wrap */
table.dt.audit-table:has(> tbody > tr.empty) > thead > tr > th { width: auto; }
table.dt.audit-table > tbody > tr.empty > td {
  height: 72px; padding: 0 16px; text-align: center; vertical-align: middle;
  color: var(--ink-2);
}
.dqm-drop > summary::-webkit-details-marker { display: none; }

@media (max-width: 640px) {
  /* the audit trail: a run of records is named by the cell that spans it, and a time stays whole */
  #main table.audit-table > tbody > tr > td[colspan] { order: 1; flex: 1 1 100%; color: var(--ink);
    font-size: var(--t-14); }
  #main table.audit-table > tbody > tr > td.audit-when { white-space: nowrap; }
  #main table.audit-table > tbody > tr > td.audit-when > span { display: inline; }
}

@media (width <= 640px) {
  .audit-filter > .af-what > .list-search { flex: 1 1 100%; min-width: 0; }
  .audit-filter > .af-what > :is(select, .audit-only) {
    flex: 1 1 calc(50% - 4px); min-width: 0; max-width: none;
  }
  .audit-filter > .af-when > .af-dates { flex: 1 1 100%; }
  .audit-filter > .af-when > .af-dates > input[type="date"] { flex: 1 1 0; min-width: 0; }
  .audit-filter > .af-when > button[type="submit"] { flex: 1 1 auto; }
  .audit-filter > .af-when > a.audit-export { margin-left: 0; } /* --- 2. THE EMPTY TRAIL FITS THE PHONE -------------------------------------
   The phone keeps a 36rem measure so a row of five columns scrolls instead of
   breaking a name into pieces; a table holding only the one designed empty
   row has nothing to scroll, and its only sentence ran under the card's edge.
   It fits the card, its headers wrap and the sentence wraps, centred. */
}

@media screen and (max-width: 640px) {
  /* the date pair keeps one row with the two words that name it */
  .audit-filter .audit-only { flex: 1 1 100%; }
}

.audit-filter > :is(.af-what, .af-when):where(:not([hidden])) {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); min-width: 0;
}

@media (width > 640px) {
/* --- 3. THE SEARCH NEVER CLIPS ITS WORDS -----------------------------------
   Between 1100 and 1360px the search fell to a 200px floor once "Publications
   only" wrapped, and its pinned placeholder read "record.." (family 4: an
   input never clips its placeholder). Its floor is now the placeholder's own
   width (234px measured at the field's 13px, its 11px padding and the search
   field's clear control; 15rem with the rounding) and the three pickers give
   way first, down to 9rem, before anything wraps. Where the strip must wrap,
   "Publications only" moves first, to the head of the dated control's line:
   the first line's box steps out of the layout (`display: contents`) so its
   controls and the second line's box share one wrapping row. The phone keeps
   block A's stacked strip. */
  .list-toolbar > .audit-filter:where(:not([hidden])) {
    flex-direction: row; flex-wrap: wrap; align-items: center;
  }
  .audit-filter > .af-what:where(:not([hidden])) { display: contents; }
  .audit-filter > .af-what > .list-search { flex: 1 1 15rem; min-width: 15rem; }
  .audit-filter > .af-what > select { flex: 1 1 9rem; min-width: 9rem; max-width: 13rem; }
  .audit-filter > .af-what > .audit-only { flex: none; }
  .audit-filter > .af-when:where(:not([hidden])) { flex: 1 1 auto; }
}

@media (width >= 1100px) {
  table.dt.audit-table td.audit-who { white-space: nowrap; }
}

@media (width >= 1360px) {
  table.dt.audit-table:has(> thead > tr > th:nth-child(4)) th.audit-what,
  table.dt.audit-table:has(> thead > tr > th:nth-child(4)) > thead > tr > th:nth-child(3) {
    width: 1%; white-space: nowrap;
  }
}

table.dt.audit-table:has(> thead > tr > th:nth-child(5)) td.audit-month,
table.dt.audit-table:has(> thead > tr > th:nth-child(5)) > thead > tr > th:nth-child(4) {
  width: 1%;
}

@media (width >= 1360px) {
  /* where the room is proven, an open record widens its column to a
     readable measure rather than wrap an id in two */
  table.dt.audit-table .audit-json > pre { min-width: 52ch; }
}

table.dt.audit-table .audit-json > pre {
  margin: 4px 0 4px 6px; padding: 8px 12px 9px;
  min-width: 0; max-width: 76ch;
  background: var(--surface-2); color: var(--ink-2);
  border: 1px solid var(--line); border-left: 2px solid var(--accent-line);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font: 400 12px/18px var(--mono); white-space: pre-wrap;
  overflow-wrap: anywhere; word-break: normal;
}

@media (width >= 1360px) {
/* Family 9, block D: the lead's decisions after three reviewers opened the
   three sections' pictures (two should-fix items, ten nits taken). Each rule
   restates, later in the file, what an earlier block of this family said,
   and says why; no earlier rule was edited, no hook moved, no word changed
   (the one article's two phrases are the template's, not this block's). */

/* --- 1. THE OPEN RECORD READS AT ITS MEASURE; THE SENTENCE TAKES THE SLACK --
   Block A's 1360px guard (`min-width: 52ch` on the open record) sat BEFORE
   the record's own rule at the same specificity, whose `min-width: 0` won:
   the panel shrank to 260px and broke an actor id in two while 550px of the
   row stood empty. And its gutter fix gave the slack to the LAST column, so
   every row ended in 600px of blank table right of Month. Restated here,
   later, as the lead wrote it in the family brief: the SENTENCE column is
   the one that grows (and may wrap), Month and Outcome hug the table's right
   edge with their figures right-aligned, and an open record keeps a 52ch
   floor inside the wider column, hugging its own lines up to the 76ch its
   rule allows, so a short record is a short panel. */
  table.dt.audit-table:has(> thead > tr > th:nth-child(4)) th.audit-what,
  table.dt.audit-table:has(> thead > tr > th:nth-child(4)) > thead > tr > th:nth-child(3) {
    width: auto; white-space: normal;
  }
  table.dt.audit-table > thead > tr > th:nth-child(n+4),
  table.dt.audit-table > tbody > tr > td.audit-month,
  table.dt.audit-table > tbody > tr:not(.empty) > td:last-child:not([colspan]):not(.audit-who):not(.audit-when) {
    width: 1%; white-space: nowrap; text-align: right;
  }
  table.dt.audit-table .audit-json > pre { width: fit-content; min-width: 52ch; }
}

@supports selector(::details-content) {
/* --- 4. A RUN'S MONTH OPENS WHERE IT STANDS ---------------------------------
   Inside an open run a month's chevron sat beside the month, and opening it
   moved the chevron under the month (the item switched from a row to a
   block). One layout now, open or closed: the item is a wrapping row, the
   chevron stays beside its month, and the open record takes a full line of
   its own under both. The disclosure's box steps out of the layout so its
   summary and its content are the row's own items (family 5's book-facts
   idiom; a browser without `::details-content` keeps block A's layout). */
  table.dt.audit-table .audit-run-list > li:where(:not([hidden])),
  table.dt.audit-table .audit-run-list > li:has(> .audit-json[open]):where(:not([hidden])) {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 0;
  }
  table.dt.audit-table .audit-run-list > li > details.audit-json:where(:not([hidden])) {
    display: contents;
  }
  table.dt.audit-table .audit-run-list > li > details.audit-json > summary { margin-left: 2px; }
  table.dt.audit-table .audit-run-list > li > details.audit-json[open]::details-content {
    flex: 1 1 100%; min-width: 0;
  }
}

/* ===== THE ADMIN PAGE AND THE COMPANY MOVE [admin] =====
   People, access and tokens; the company move and its check page.
   --- kept from an old banner ---
   THE ADMIN PAGE · B · people, access and tokens (2026-09-24)
   --- kept from an old banner ---
   THE AUDIT TRAIL, THE ADMIN PAGE AND THE HELP CENTER · D2 · after the second look (2026-09-24)
   --- kept from an old banner ---
   COMPANY MOVE (2026-10-02) · Admin → Move a company and the check page (SPEC §6.82)
   --- kept from an old banner ---
   REPLACE ON IMPORT (2026-10-02) · the check page's replacement card (SPEC §6.85)
*/

.tfa-toggle.is-set { accent-color: var(--ok); }
.role-select:hover:not(:disabled) { border-color: var(--accent); }
.token-once p { margin: 0 0 8px; }
table.admin-tokens th[scope="row"] { font-weight: 600; }
table.admin-tokens td .gl { display: block; font-size: 11px; }
.how-to-read-body > p { margin: 0 0 var(--s-2); }
.interview-step p { margin: 0; overflow-wrap: anywhere; }
/* Family 9, section B (the brief in the redesign session's notes; the
   research in `research/audit_admin_help.json`). The page was a title row
   carrying the platform's two-factor switch and two filled buttons, a
   900px manual in bold, then two tables on the page ground; every control
   in the users table was a boxed select, the deactivated row faded below
   reading contrast while its actions stayed lit, and the one-time secret
   sat in a GREEN block. It is now three cards on the settings pages' block
   idiom (`section.set-block`, family 7) — the switch with its consequence
   printed beside it (owner decision 2026-09-24), Users, API tokens — and a
   table that reads as values until a person reaches for one.

   KEPT: `id="api-tokens"`, both tables' class lists, every form action and
   field name, every sentence, `.require-2fa-toggle` / `.toggle-pill(.on)`
   and its hidden input, the `js-confirm` forms, the `.tfa-*` hooks and the
   change→submit script, `select.status-select[data-status-submit]` (the
   shell's contract — every rule here is scoped under `.admin-users`, so the
   contracts' and settings' status selects do not move), `td.row-actions`,
   `.icon-btn.edit-access[data-uid]`, `.pw-reset` / `.pw-form`, the access
   editor's table and its hidden caption, `class="notice ok token-once"` and
   `class="token-secret"` holding only the secret.

   No token is declared: every colour is one the palette already carries in
   both themes. Every rule that sets `display` on a part a script or an
   attribute can hide carries `:not([hidden])`. */

/* --- 1. THE CARDS --------------------------------------------------------
   The block's own geometry (the surface, the edge, the 12px radius, the
   head's 15px title and 12.5px description capped at 68ch) is family 7's;
   this section only spaces the page's three cards and says what differs. */
.admin-head { margin-bottom: var(--s-4); }
.admin-sec.tokens-section { margin-top: 0; }
.admin-sec > .set-block-head > .set-block-title h2 + .set-block-desc { margin-top: 4px; }

/* --- 2. THE TWO-FACTOR SWITCH, EXPLAINED WHERE IT LIVES ------------------
   One row: the consequence in the body's ink at the left, the switch at
   the right. The pill read as a disabled chip ("Off" on a grey capsule);
   it is a SWITCH now — the label, then a track whose knob sits on the side
   it names. On is the accent (the interactive colour), never `--ok`, which
   means ahead. The words "2FA required", "On" and "Off" are unchanged. */
.admin-2fa > .set-block-head:not([hidden]) { align-items: center; padding-top: 12px; padding-bottom: 12px; }
.admin-2fa .admin-2fa-say {
  flex: 1 1 auto; min-width: 0; max-width: 72ch;
  font-size: var(--t-table); line-height: 20px; color: var(--ink-2);
}
.admin-2fa .require-2fa-toggle:not([hidden]) { display: inline-flex; margin: 0; }
.admin-2fa .toggle-pill.on { color: var(--ink); }
.admin-2fa .toggle-pill span::before {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--muted-2); box-sizing: border-box;
}
.admin-2fa .toggle-pill.on span {
  justify-content: flex-start; padding: 0 0 0 9px;
  background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent);
}
.admin-2fa .toggle-pill.on span::before { left: auto; right: 3px; border-color: var(--accent-fill); }
.admin-2fa .toggle-pill:hover span { border-color: var(--accent); }
.admin-2fa .toggle-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- 3. THE NEW USER / NEW TOKEN FORMS OPEN INSIDE THEIR CARD ------------
   Under the head that opened them, as a band on the second surface — not a
   second card inside the first. Their fields take the kit's height and
   edge; a checkbox is never stretched to the row (the attest form's
   `width: 100%` made the two-factor box a centred slab above its words). */
.admin-sec > .add-card {
  max-width: none; margin: 0; padding: 14px 20px 18px;
  background: var(--surface-2); border: 0; border-top: 1px solid var(--line);
  border-radius: 0; box-shadow: none;
}
.admin-sec > .add-card .form-grid > label { margin: 8px 0; }
.admin-sec > .add-card :is(input:not([type="checkbox"]):not([type="radio"]), select) {
  box-sizing: border-box; height: var(--ctl-h); min-height: var(--ctl-h);
  margin-top: 4px; padding: 0 11px;
  border: 1px solid var(--field-line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); font-size: var(--t-table); font-weight: 400;
}
.admin-sec > .add-card input::placeholder { color: var(--muted-2); }
.admin-sec > .add-card :is(input, select):hover:not(:focus) { border-color: var(--muted-2); }
.admin-sec > .add-card input[type="checkbox"] { width: auto; margin: 0; accent-color: var(--accent); }
.admin-sec > .add-card label > .muted { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; }
/* the two-factor line: the box on the sentence's first line, its note under */
.admin-sec > .add-card label.sig-check { position: relative; padding-left: 26px; font-weight: 550; }
.admin-sec > .add-card label.sig-check > input { position: absolute; left: 0; top: 2px; width: 16px; height: 16px; }
.admin-sec > .add-card label.sig-check > .muted { margin: 2px 0 0; }
.admin-sec > .add-card .grant-components { margin-top: 6px; gap: 6px 14px; }
.admin-sec > .add-card .grant-check input { margin-right: 6px; vertical-align: -2px; }
.admin-sec > .add-card .span2 > button.primary { margin-top: 6px; }

/* --- 4. THE USERS TABLE READS AS VALUES ----------------------------------
   The card's table sits flush under its head (the block's rule for
   `table.dt`, restated here for this table's own class list, which stays
   as it was). A row is a person: the name over the address, then what
   they may do. */
.admin-people > .tablewrap > table.admin-users { width: 100%; }
.admin-users > thead > tr > th { height: 36px; white-space: nowrap; }
.admin-users > tbody > tr > td { height: 52px; }
.admin-users > tbody > tr:last-child > td { border-bottom: 0; }
/* the person: name in ink, the address a quiet line under it — the unique
   identifier is never the smallest thing on the row */
.admin-users > tbody > tr > td:first-child strong {
  display: block; font-weight: 600; line-height: 18px; color: var(--ink);
}
.admin-users > tbody > tr > td:first-child .user-email {
  display: block; margin: 1px 0 0; font: 400 12px/16px var(--sans);
  color: var(--muted); white-space: nowrap;
}
/* the Access count is the row's anchor figure; a member who can open
   nothing is an attention mark, never red */
.admin-users .au-count {
  font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.admin-users tr:not(.inactive-line) .au-count.au-zero { color: var(--attn-ink); }
.admin-users tr:not(.inactive-line) .au-count.au-zero::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 6px 0 0;
  border-radius: 50%; background: var(--attn); vertical-align: 1px;
}
.admin-users :is(td, th) .linklike:hover { color: var(--accent); text-decoration: underline; }
.admin-users select.status-select[name="active"] { width: 8rem; }
.admin-users select.status-select[name="approver"] { width: 4.75rem; }
.admin-users select:is(.role-select, .status-select):hover:not(:disabled) {
  border-color: var(--field-line); background: var(--surface);
}
.admin-users select:is(.role-select, .status-select):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--field-line);
  background: var(--surface);
}
.admin-users select:is(.role-select, .status-select):disabled {
  cursor: default; color: var(--muted); background: transparent;
}
.admin-users select:is(.role-select, .status-select) option {
  font-weight: 400; color: var(--ink); background: var(--surface);
}
.admin-users .role-form:not([hidden]) { display: inline-block; position: relative; vertical-align: middle; }
.admin-users td:has(> select.status-select) { position: relative; }
.admin-users .role-form::after,
.admin-users td:has(> select.status-select)::after {
  content: ""; position: absolute; top: 50%; width: 10px; height: 10px; margin-top: -5px;
  background: var(--muted); opacity: 0; pointer-events: none; transition: opacity .12s ease;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* the caret sits inside the select's right end: the form hugs its select;
   a cell's select starts at the cell's 12px inset, pulled back 9px */
.admin-users .role-form::after { right: 8px; }
.admin-users td:has(> select.status-select[name="active"])::after { left: calc(8rem - 14px); }
.admin-users td:has(> select.status-select[name="approver"])::after { left: calc(4.75rem - 14px); }
.admin-users .role-form:has(> select:is(:hover, :focus-visible):not(:disabled))::after,
.admin-users td:has(> select.status-select:is(:hover, :focus-visible))::after { opacity: 1; }
.admin-users .tfa-form { display: inline; }
.admin-users .tfa-toggle {
  width: 16px; height: 16px; margin: 0; vertical-align: middle; accent-color: var(--accent);
}
.admin-users .tfa-toggle.is-set { accent-color: var(--accent); }
.admin-users .tfa-toggle:disabled { opacity: .6; }
.admin-users .tfa-done {
  margin-left: 8px; font: 700 14px/1 var(--sans); color: var(--ink-2); vertical-align: middle;
}
.admin-users .tfa-pending {
  margin-left: 8px; font: 600 var(--t-label)/1 var(--sans); color: var(--attn-ink); vertical-align: middle;
}
.admin-users .tfa-off { font: 500 var(--t-table)/1 var(--sans); color: var(--muted); }
.admin-users .tfa-form + .tfa-off { margin-left: 8px; }

/* --- 5. THE ROW'S ACTIONS: ONE WEIGHT, ONE SLOT, NEVER HIDDEN ------------
   The pencil, "reset password" and "reset 2FA" are one quiet ink at rest,
   the row's ink when the row is under the pointer or holds the focus, the
   accent on the control itself (family 6's rule: consequential acts stay
   discoverable). The pencil owns a fixed slot, so "reset password" starts
   at one x on every row whether the row has a pencil or not. Inside
   `.lines-table` the kit's quiet role does not reach (it keeps out of the
   grid's tables on purpose), so the two text controls are stated here. */
.admin-users > * > tr > th.col-act, .admin-users > tbody > tr > td.row-actions {
  width: 1%; white-space: nowrap; text-align: left;
}
/* the cell's own spaces would add a few pixels between the slot and the
   words on a row with a pencil only: the controls carry their own sizes */
.admin-users > tbody > tr > td.row-actions { font-size: 0; }
.admin-users td.row-actions > * { vertical-align: middle; }
.admin-users td.row-actions > :first-child:not(.edit-access) { margin-left: 32px; }
.admin-users td.row-actions > .icon-btn.edit-access {
  width: 28px; height: 28px; padding: 0; margin: 0 4px 0 0;
  color: var(--muted); font-size: 16px; border-radius: var(--r-md);
}
.admin-users td.row-actions :is(.pw-reset > summary, .linklike) {
  -webkit-appearance: none; appearance: none;
  display: inline; padding: 0; margin: 0; border: 0; background: transparent;
  font: 500 var(--t-sm)/20px var(--sans); color: var(--muted); cursor: pointer;
}
.admin-users td.row-actions > .muted { font-size: 12px; color: var(--muted); }
.admin-users td.row-actions > .pw-reset:not([hidden]) { display: inline-block; position: relative; }
.admin-users td.row-actions > .pw-reset + form { margin-left: 16px; }
/* "resend invite" after the console label and "delete" after the row's other
   words keep the same gap (2026-10-05): the cell's font-size is 0, so the
   space between them in the markup prints nothing */
.admin-users td.row-actions > :is(.muted, form) + form { margin-left: 16px; }
.admin-users tr:is(:hover, :focus-within) > td.row-actions :is(.icon-btn, .pw-reset > summary, .linklike) {
  color: var(--ink-2);
}
.admin-users td.row-actions .icon-btn.edit-access:hover { color: var(--accent); background: var(--accent-soft); }
.admin-users td.row-actions :is(.pw-reset > summary, .linklike):hover {
  color: var(--accent); text-decoration: underline;
}
.admin-users tr > td.row-actions > .pw-reset[open] > summary.linklike { color: var(--accent); }
/* the password field opens as a small panel under its link, never
   reflowing the row; the last row's opens upward, so the panel stays inside
   the table's own box and the card never has to scroll to show it */
.admin-users .pw-form:not([hidden]) {
  left: auto; right: 0; top: calc(100% + 6px);
  display: flex; align-items: center; gap: 8px; padding: 8px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); box-shadow: var(--shadow-pop);
}
.admin-users > tbody > tr:last-child .pw-form:not([hidden]) { top: auto; bottom: calc(100% + 6px); }
.admin-users .pw-form input::placeholder { color: var(--muted-2); }
.admin-users .pw-form input:hover:not(:focus) { border-color: var(--muted-2); }
.admin-users .pw-form button:hover { border-color: var(--accent); color: var(--accent); }

/* --- 6. A DEACTIVATED PERSON IS A STATE, NOT A FADE ----------------------
   The row keeps full opacity in the muted ink (the shell's own rule is
   moving the same way, family 9 · A; this one is local and agrees with
   it), its actions are no brighter than any other row's, and the Status
   word is the state badge — the outline in `--muted` — still a control. */
.admin-users tr.inactive-line > :is(td, th) { opacity: 1; color: var(--muted); }
.admin-users tr.inactive-line td:first-child strong,
.admin-users tr.inactive-line .au-count { color: var(--muted); }
.admin-users tr.inactive-line select:is(.role-select, .status-select) { color: var(--muted); }
.admin-users tr.inactive-line select.status-select[name="active"] {
  width: auto; height: 22px; margin-left: 0; padding: 0 22px 0 7px;
  border-color: var(--line); border-radius: 4px;
  font: 600 var(--t-label)/20px var(--sans); letter-spacing: .02em;
}
.admin-users tr.inactive-line td:has(> select.status-select[name="active"])::after {
  left: auto; right: auto; margin-left: -22px; position: absolute;
}
.admin-users tr.inactive-line select.status-select[name="active"]:hover { border-color: var(--muted-2); background: transparent; }
.access-table .role-say {
  display: none; margin: 4px 0 0; max-width: 30ch;
  font: 400 var(--t-label)/15px var(--sans); color: var(--muted); white-space: normal;
}
.access-table td.gg-role:has(option[value="none"]:checked) > .role-say-none:not([hidden]),
.access-table td.gg-role:has(option[value="access"]:checked) > .role-say-access:not([hidden]),
.access-table td.gg-role:has(option[value="administrator"]:checked) > .role-say-administrator:not([hidden]) {
  display: block;
}

/* --- 8. API TOKENS: A LIVE TOKEN IS WHAT STANDS OUT ----------------------
   The token's name is the row's header with who issued it under it; the
   company with its address in mono (a key: mono's one job). A revoked
   token's status is quiet muted words — three identical outlined badges
   said "Revoked" louder than the one live token said "Live". The action
   column goes when no row has an action. There is NO key preview: the app
   holds only a hash of a secret, never the secret. */
.admin-sec > .tablewrap > table.admin-tokens { width: 100%; }
.admin-tokens > thead > tr > th { height: 36px; white-space: nowrap; }
.admin-tokens > tbody > tr > :is(th, td) { height: 52px; }
.admin-tokens > tbody > tr:last-child > :is(th, td) { border-bottom: 0; }
table.admin-tokens th[scope="row"] {
  font-size: var(--t-table); font-weight: 600; letter-spacing: 0; color: var(--ink); line-height: 18px;
}
table.admin-tokens th[scope="row"] .gl {
  display: block; margin: 1px 0 0; font: 400 12px/16px var(--sans); color: var(--muted);
}
table.admin-tokens td .gl {
  display: inline; margin-left: 8px; font: 400 11.5px/1 var(--mono); color: var(--muted);
}
.admin-tokens > tbody > tr > td:nth-child(2) { white-space: nowrap; }
.admin-tokens > tbody > tr > td:nth-child(3), .admin-tokens > tbody > tr > td:nth-child(4) {
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.admin-tokens tr.inactive-line > :is(td, th) { opacity: 1; color: var(--muted); }
.admin-tokens tr.inactive-line th[scope="row"] { font-weight: 500; }
.admin-tokens .badge.state {
  border-color: transparent; padding-left: 0; padding-right: 0; font-weight: 500; color: var(--muted);
}
.admin-tokens td.row-actions .linklike {
  -webkit-appearance: none; appearance: none; padding: 0; margin: 0; border: 0;
  background: transparent; font: 500 var(--t-sm)/20px var(--sans); color: var(--muted); cursor: pointer;
}
.admin-tokens tr:is(:hover, :focus-within) > td.row-actions .linklike { color: var(--ink-2); }
.admin-tokens td.row-actions .linklike:hover { color: var(--accent); text-decoration: underline; }
table.admin-tokens:not(:has(td.row-actions > form)) :is(th.col-act, td.row-actions) { display: none; }
.admin-tokens tr:not(:has(> th)) > td[colspan] { height: 52px; color: var(--muted); }
.admin-sec > .footnote {
  max-width: none; margin: 0; padding: 10px 20px 14px; border-top: 1px solid var(--line-soft);
  font-size: 12px; color: var(--muted);
}

/* --- 9. THE ONE-TIME SECRET IS AN ATTENTION MOMENT ------------------------
   "Copy it now — this is the one time it is shown" is attention, not
   success: the class list is unchanged (a test splits the page on the
   secret's element) and the block takes the attention ground. The key is
   a mono field with its Copy control beside it (owner decision
   2026-09-24); where the browser offers no clipboard the script hides the
   control and the key still selects in one gesture. */
.admin-sec > .notice.ok.token-once {
  margin: 0 20px 16px; padding: 12px 14px 14px;
  background: var(--attn-bg); border: 1px solid var(--attn-line); border-radius: var(--r-md);
  color: var(--ink);
}
.admin-sec > .notice.token-once > p { margin: 0 0 10px; font-size: var(--t-table); line-height: 1.5; }
.token-once .token-copy:not([hidden]) { display: flex; align-items: stretch; gap: 8px; }
.token-once .token-copy > .btn-secondary[hidden] { display: none; }

/* --- 7. THE ADMIN PAGE, FIVE SMALL THINGS ------------------------------------
   "Deactivated", dressed as the state badge, kept the 22px its caret needs
   at rest, so the outline ended in an empty tail: at rest the badge is
   symmetric, and the room comes back with the caret on hover or focus. */
.admin-users tr.inactive-line select.status-select[name="active"] { padding: 0 8px; }
.admin-users tr.inactive-line select.status-select[name="active"]:is(:hover, :focus-visible) {
  padding-right: 22px;
}
/* a legacy account's "convert", wrapped under "All companies (write)", began
   6px in from the line above it: it takes a line of its own at the cell's
   edge */
.admin-users td > form.js-confirm[action$="/convert"] > button.linklike:not([hidden]) {
  display: block; margin: 2px 0 0;
}
/* "revoke", the one control on a token's row, wore the revoked rows' own
   muted ink and read as data beside them: the row action's weight, a step
   darker at rest than the data it acts on, the interactive colour under the
   pointer (block B's row and control hover rules still apply) */
.admin-tokens td.row-actions .linklike { color: var(--ink-2); }
/* the switch's ON knob is white in both themes: a filled accent control
   keeps white (`--surface` is dark in dark, and read as a hole) */
.admin-2fa .toggle-pill.on span::before { background: var(--on-accent); }
/* one filled control per card: while the New user form is open its own
   Create user is the card's primary, so the head's "+ New user" steps back
   to the secondary role ("+ New token" is already secondary) */
.admin-sec:has(> #add-card:not([hidden])) #toggle-add {
  background: var(--surface); border-color: var(--field-line); color: var(--ink);
}
.admin-sec:has(> #add-card:not([hidden])) #toggle-add:hover {
  background: var(--surface); border-color: var(--accent); color: var(--accent);
}
/* The verifier's one open point on block D: "revoke" was lifted to --ink-2
   at rest so a control never reads as the muted data it acts on, which
   left the users table's actions (--muted at rest, the same ink as a
   revoked row's text) a step lighter on the same page and made the
   tokens' row-hover lift a no-op. ONE grammar for both row-action columns:
   --ink-2 at rest (a control, one step darker than muted data), the row's
   hover or focus lifts it to --ink, and the control's own hover keeps its
   accent and underline (restated after the lift so the accent still wins
   the tie). */
.admin-users td.row-actions :is(.icon-btn.edit-access, .pw-reset > summary, .linklike),
.admin-tokens td.row-actions .linklike { color: var(--ink-2); }
.admin-users tr:is(:hover, :focus-within) > td.row-actions :is(.icon-btn, .pw-reset > summary, .linklike),
.admin-tokens tr:is(:hover, :focus-within) > td.row-actions .linklike { color: var(--ink); }
.admin-users td.row-actions .icon-btn.edit-access:hover { color: var(--accent); background: var(--accent-soft); }
.admin-users td.row-actions :is(.pw-reset > summary, .linklike):hover,
.admin-tokens td.row-actions .linklike:hover { color: var(--accent); text-decoration: underline; }
:is(.help-six, .help-terms) > div:target {
  background: var(--accent-soft); box-shadow: inset 2px 0 var(--accent);
}
/* The Admin page gains one card after API tokens, on family 9's block idiom:
   the head, then two bands (Export, Import) on the second surface, the way
   the New user and New token forms open inside their cards. The check page
   (`admin_import.html`) is three cards — what will arrive, the published
   months, who is who — with the one primary act in the last card's foot.
   Tokens only, in both themes; no new primitive. */

/* --- 1. THE ADMIN CARD ---------------------------------------------------- */
.admin-sec.move-sec > .add-card + .add-card { border-top: 1px solid var(--line); }
.admin-sec > .add-card.move-card .move-say {
  margin: 2px 0 4px; max-width: 68ch; font-size: var(--t-sm); line-height: 19px;
}
/* the file control is the kit's bare control, not a boxed field: the
   card's field rule gave it a field's frame around the native button. It
   sits under its label, as the Company select does under its own */
.admin-sec > .add-card.move-card input[type="file"]:not([hidden]) {
  display: block; height: auto; min-height: 0; margin-top: 6px; padding: 0;
  border: 0; border-radius: 0; background: transparent; width: auto; max-width: 100%;
}
.admin-sec > .add-card.move-card input[type="file"]::file-selector-button {
  height: var(--ctl-h); margin-right: 12px; padding: 0 14px; font-size: var(--t-table);
}
.admin-sec > .notice.move-done { margin: 0 20px 16px; line-height: 1.5; }
.admin-sec > .notice.move-done > p { margin: 0; font-size: var(--t-table); }
.admin-sec > .notice.move-done > p + p { margin-top: 6px; }

/* --- 2. THE CHECK PAGE ---------------------------------------------------- */
/* a column a person reads down, not a sheet across the pane */
.move-head ~ .move-sec, .move-head ~ form > .move-sec { max-width: 980px; }
.move-head ~ form.move-commit { margin: 0; }
.admin-sec > .notice.move-warn { margin: 0 20px 12px; }

/* the company's facts: label over value, as many to a row as fit */
.move-facts:not([hidden]) {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px 24px; margin: 0; padding: 2px 20px 16px;
}
.move-facts dt { margin: 0; font: 500 var(--t-label)/16px var(--sans); color: var(--muted); }
/* the address is the name's qualifier, on its own line under it */
.move-facts dd .gl:not([hidden]) {
  display: block; margin: 1px 0 0; font-size: 12px; line-height: 16px; color: var(--muted);
}
/* the file's sha256 takes the row: a key, compared by eye with the export's */
.move-facts > .move-sha-fact { grid-column: 1 / -1; }
.move-facts .move-sha {
  padding: 0; background: transparent; color: var(--ink);
  font: 400 12px/18px var(--mono); overflow-wrap: anywhere;
}
/* a refusal says what to fix at the width of the cards it speaks of */
.move-head ~ .notice.move-error { max-width: 980px; box-sizing: border-box; }
/* an account still to be answered: an attention mark and its words, never red */
.move-people tr.move-undecided > th[scope="row"] { box-shadow: inset 3px 0 0 var(--attn); }
.move-people .move-needs:not([hidden]) {
  display: block; margin: 4px 0 0; font: 600 var(--t-label)/16px var(--sans);
  color: var(--attn-ink);
}
/* the import under way: the button waits as a disabled primary looks, and
   keeps its focus (aria-disabled, never `disabled`) */
#move-import[aria-disabled="true"] {
  background: var(--accent-line); box-shadow: none; cursor: progress;
}

/* the two tables wear the Admin tables' geometry: flush in the card, the
   head's 20px inset on the outer columns, a quiet header band */
.admin-sec > .tablewrap > table:is(.move-arrivals, .move-people) { width: 100%; }
:is(.move-arrivals, .move-people) > thead > tr > th { height: 36px; white-space: nowrap; }
.move-arrivals > :is(tbody, tfoot) > tr > :is(th, td) { height: 40px; }
/* a row's name is the body's type, not the header band's 11.5px */
.move-arrivals th[scope="row"] {
  font-size: var(--t-table); font-weight: 500; letter-spacing: 0; color: var(--ink);
}
.move-arrivals td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.move-arrivals > tfoot > tr > :is(th, td) {
  font-size: var(--t-table); font-weight: 700; letter-spacing: 0; color: var(--ink);
  border-top: 1.5px solid var(--ink); border-bottom: 0;
}

/* the published months: one chain a row, its months said once */
.move-months { list-style: none; margin: 0; padding: 0 20px 6px; }
.move-months > li > strong { flex: 0 0 180px; font-weight: 600; color: var(--ink); }
.move-months .move-pending { color: var(--attn-ink); }

/* who is who: the account, what it did, the choice */
.move-people > tbody > tr > :is(th, td) { padding-top: 10px; padding-bottom: 10px; }
.move-people th[scope="row"] {
  width: 260px; font-size: var(--t-table); font-weight: 600; letter-spacing: 0; color: var(--ink);
}
.move-people th[scope="row"] .gl:not([hidden]),
.move-people td.move-credit .gl:not([hidden]) {
  display: block; margin: 1px 0 0; font: 400 12px/16px var(--sans); color: var(--muted);
}
.move-people td.move-did { font-size: var(--t-sm); line-height: 19px; color: var(--ink-2); }
.move-people td.move-credit { width: 340px; }
.move-people td.move-credit select {
  box-sizing: border-box; width: 100%; max-width: 340px; min-height: var(--ctl-h);
  padding: 0 10px; border: 1px solid var(--field-line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); font: 400 var(--t-table)/1.3 var(--sans);
}
.move-people td.move-credit select:hover:not(:focus) { border-color: var(--muted-2); }
.move-people td.move-credit select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
.move-people tr.empty td { height: 52px; color: var(--muted); }
.admin-sec.move-sec > .footnote {
  max-width: none; margin: 0; padding: 10px 20px 14px; border-top: 1px solid var(--line-soft);
  font-size: 12px; color: var(--muted);
}
/* A company here that never published may give its URL name to the file's
   company. The card is made of the move's own parts (the facts, the
   arrivals table, the one-line rows of the published months) and the Admin
   cards' form band (`add-card`, with the two-factor line's `sig-check` box)
   for its two answers. What is its own: the band's attention rule (the
   house's mark for something still to be answered, never red), its answers
   one to a line, and the phone's inset. Tokens only; every rule that sets
   `display` leaves `[hidden]` alone. */
.admin-sec > .add-card.move-confirm { box-shadow: inset 3px 0 0 var(--attn); }
.admin-sec > .add-card.move-confirm > label:not([hidden]) {
  display: block; margin: 8px 0; max-width: 68ch;
  font-size: var(--t-table); line-height: 20px; color: var(--ink);
}
.admin-sec > .add-card.move-confirm > label.move-confirm-slug { font-weight: 550; }
.admin-sec > .add-card.move-confirm > label.move-confirm-slug > input:not([hidden]) {
  display: block; width: min(100%, 320px);
}
.move-replace-notes > li > span { max-width: 72ch; }
.ig-canread > p { margin: 0; font-size: var(--t-sm); line-height: 18px; }
.ig-readback > p { margin: 0; }
.ig-refusal > p { margin: 0 0 8px; }
.pg-members > p { margin: 0 0 8px; font-size: 12.5px; }

/* a saved contract's three steps (owner request 2026-11-03): the New
   contract pop-out's stepper, as tabs, pinned to the top of the pop-out's
   body so a step is a click away wherever it is scrolled */
.contract-panel .stepper.edit-steps:not([hidden]) {
  display: flex; align-items: center; gap: 0;
  position: sticky; top: 0; z-index: 2;
  margin: 0 0 6px; padding: 6px 0; border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.dqd-why-body p { margin: 0 0 var(--s-2); }
.access-panel:has(input.type-pick[type="hidden"][value="per_unit"]) [data-plan-freq],
.access-panel:has(input.type-pick[value="per_unit"]:checked) [data-plan-freq] { display: none; }

@media (width <= 900px) {
/* --- 10. THE PHONE --------------------------------------------------------
   The cards stack at the pane's width; a head's action drops under its
   words; the two tables scroll inside their own wrapper, the person's name
   (and the token's) held at the left edge while the columns pass under it
   (`overflow: clip` on the page, not `hidden` on the table — family 5's
   lesson: a table that is its own scroller never lets a cell stick). */
  .admin-users { min-width: 880px; }
  .admin-tokens { min-width: 720px; }
  .admin-users > thead > tr > :first-child,
  .admin-tokens > thead > tr > :first-child { background: var(--sum-bg); }
}

/* the term a link landed on (`/help/glossary#t-…`) */
:is(.help-six, .help-terms) > div:has(> dt:target) {
  background: var(--accent-soft); box-shadow: inset 2px 0 var(--accent);
}

@media (width <= 900px) {
  .admin-users > tbody > tr > td:first-child .user-email { white-space: normal; overflow-wrap: anywhere; }
  .admin-users > tbody > tr:hover > :first-child,
  .admin-tokens > tbody > tr:hover > :first-child { background: var(--surface-2); }

/* --- 3. THE PHONE --------------------------------------------------------- */
/* half a screen: the people table scrolls in its wrapper with the account
   held at the left (family 9's frozen column). A phone: the choice is the
   point of the table, so each person stacks — the account, what it did,
   then the select at the full width — and the months put their name over
   their list. */
  .move-people { min-width: 47.5rem; }
  .move-people > * > tr > :first-child {
    position: sticky; left: 0; z-index: 2; background: var(--surface);
    box-shadow: inset -1px 0 0 var(--line-soft);
  }
  .move-people > thead > tr > :first-child { background: var(--sum-bg); }
  .move-people tr.move-undecided > th[scope="row"] {
    box-shadow: inset 3px 0 0 var(--attn), inset -1px 0 0 var(--line-soft);
  }
  .move-people th[scope="row"] { width: 200px; min-width: 200px; }
  .move-people th[scope="row"] .gl { overflow-wrap: anywhere; }
}

@media (width <= 640px) {
  .admin-sec > .set-block-head:not([hidden]) { flex-wrap: wrap; padding: 14px 16px 12px; }
  .admin-sec > .set-block-head > .set-block-title { flex: 1 1 100%; }
  .admin-2fa > .set-block-head > .require-2fa-toggle { margin-left: -4px; }
  .admin-sec > .add-card { padding: 12px 16px 16px; }
  .admin-sec > .notice.ok.token-once { margin: 0 16px 14px; }
  .token-once .token-copy:not([hidden]) { flex-wrap: wrap; }
  .token-once .token-copy > .token-secret { flex: 1 1 100%; }
  .admin-sec > .footnote { padding: 10px 16px 14px; }
  .admin-sec > .notice:is(.move-done, .move-warn) { margin-left: 16px; margin-right: 16px; }
  .move-facts:not([hidden]) { padding: 2px 16px 14px; }
  .move-months { padding: 0 16px 6px; }
  .move-months > li > strong { flex-basis: 100%; }
  .admin-sec.move-sec > .footnote { padding: 10px 16px 14px; }
  .move-people { min-width: 0; }
  .move-people > thead { display: none; }
  .move-people:not([hidden]), .move-people > tbody:not([hidden]),
  .move-people > tbody > tr:not([hidden]) { display: block; width: 100%; }
  .move-people > tbody > tr:not([hidden]) {
    box-sizing: border-box; padding: 12px 0 14px; border-bottom: 1px solid var(--line-soft);
  }
  .move-people > tbody > tr > :is(th, td):not([hidden]) {
    display: block; width: auto; min-width: 0; height: auto; padding: 0 16px;
    position: static; box-shadow: none; border: 0; background: transparent;
  }
  .move-people > tbody > tr > td.move-did:not([hidden]) { margin-top: 6px; }
  .move-people > tbody > tr > td.move-credit:not([hidden]) { margin-top: 10px; }
  .move-people td.move-credit select { max-width: none; }
  .admin-sec > .add-card.move-confirm { padding-left: 16px; padding-right: 16px; }
  .admin-sec > .add-card.move-confirm > label.move-confirm-slug > input:not([hidden]) {
    width: 100%;
  }
}

/* ===== ALL COMPANIES AND PORTFOLIOS [portfolio] =====
   All companies, a portfolio's page and packet, the portfolio admin.
   --- kept from an old banner ---
   PORTFOLIO PACKET (2026-10-02, SPEC §6.84)
   Portfolios and the portfolio packet: the list, the packet's page and the
   platform administrator's page. The sheet wears the board packet's grammar
   — `.board-sheet` pins the paper palette in both themes, and every token
   used inside it is one it pins — and `portfolio-sheet` is the modifier for
   what is the packet's own: the verdict mix, the read's rule, the company
   table's sub-lines and band, and the page per company. Kit tokens and roles
   only; no colour typed; red stays the board table's loss rule.
*/

.portfolio-table .company { font-weight: 650; }
.portfolio-row:hover .company a { color: var(--accent); }
.portfolio-row.demo:hover { background: var(--line-soft); }
/* a demo or archived company is set back by its ink, not by fading the row
   (SPEC §6.181): at 62% every muted word, badge and coloured note on it fell
   to 2.3:1 to 3.3:1 against the row. Its own words take the muted ink, which
   reads 4.5:1 or better on the row in both themes, and what is coloured keeps
   its colour. Its band and its name already say what it is. */
.portfolio-row.demo > :is(th, td), .portfolio-row.demo .company a,
.portfolio-row.demo .badge.verdict-holding, .portfolio-row.demo .top-insight { color: var(--muted); }

/* THE ROW IS A DOOR AND NOW IT SAYS SO (Squarespace's row-end arrow). The
   whole row follows `data-href` and nothing on it carried an affordance —
   while the same row holds a Status control and two links, so the region a
   click opens read as ambiguous. The mark is DRAWN, not typed: it carries no
   text, so no reader gains a word and the words pass is untouched. It rides
   the Last entry cell, the cell a row of figures ends on (an admin's Status
   control keeps the cell after it). */
.console-table .portfolio-row[data-href] td.col-date {
  position: relative; padding-right: 26px;
}
.console-table .portfolio-row[data-href] td.col-date::after {
  content: ""; position: absolute; right: 10px; top: 50%;
  width: 6px; height: 6px; margin-top: -3px;
  border-right: 1.5px solid var(--muted-2);
  border-top: 1.5px solid var(--muted-2);
  transform: rotate(45deg); opacity: .5;
  transition: opacity .12s ease, right .12s ease, border-color .12s ease;
}
.console-table .portfolio-row[data-href]:hover td.col-date::after {
  opacity: 1; right: 7px;
  border-right-color: var(--accent); border-top-color: var(--accent);
}
/* the total: 700 under the product's 1.5px ink rule (it was 2px), and the
   pro forma's net income the sheet's one anchor, a step larger */
.proposal-sheet .sheet-tbl:not(.kv) tr.pf-net td {
  font-weight: 700; border-top: 1.5px solid var(--ink); border-bottom: 0;
}
.proposal-sheet .sheet-tbl.kv tr.pf-net td:not(:first-child) { font-weight: 600; color: var(--ink); }
.proposal-sheet .sheet-tbl.kv tr.pf-net td.loss { color: var(--err); }

/* sub-lines and empty states, on the list page and on the sheet */
.pf-sub:not([hidden]) { display: block; margin-top: 2px; font-size: var(--t-label);
  font-weight: 400; color: var(--muted); white-space: normal; }
.pf-empty { margin: var(--s-4) 0; font-size: var(--t-table); color: var(--ink-2); }
.pf-list th[scope="row"] a { font-weight: 600; }

/* the month picker moves only on Go: in the board bar's controls, kept short */
.board-actions form.pf-month:not([hidden]) { display: inline-flex; align-items: center;
  gap: var(--s-2); margin: 0; }
.board-actions form.pf-month .branch-pick { max-width: 180px; }
.pf-archived { max-width: 1000px; margin: 0 auto var(--s-3); }

/* THE READ: no verdict word of the group's own, the companies' words over it */
.portfolio-sheet .pf-read { border-left: 3px solid var(--line); padding: 4px 0 4px 18px;
  margin: 0 0 var(--s-2); }
.portfolio-sheet .pf-mix { margin: 0 0 var(--s-2); font-size: var(--t-sm); line-height: 1.6;
  color: var(--ink-2); }
.portfolio-sheet .pf-mix-group { white-space: nowrap; }
.portfolio-sheet .pf-mix-word { font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); }
.portfolio-sheet .pf-mix-word.v-softening,
.portfolio-sheet .pf-mix-word.v-watch { color: var(--attn-ink); }
.portfolio-sheet .pf-mix-word.v-improving { color: var(--ok); }
.portfolio-sheet .pf-mix-word.v-holding:not(.v-since) { color: var(--ink); }
.portfolio-sheet .pf-read .bv-coverage { margin-top: var(--s-2); font-size: var(--t-sm);
  color: var(--attn-ink); }
/* "Computed read" and its control on one baseline (review 2026-10-02) */
.portfolio-sheet .narrative-foot:not([hidden]) { display: flex; align-items: baseline;
  flex-wrap: wrap; gap: 4px 10px; }
.portfolio-sheet .narrative-gen:not([hidden]) { display: inline-flex; align-items: baseline;
  flex-wrap: wrap; gap: 4px 8px; }
/* the gap that is not the combined figure's, on its own line under the strip */
.portfolio-sheet .pf-gap-line { margin: calc(-1 * var(--s-2)) 0 var(--s-4); color: var(--ink-2); }
/* a dollar amount at stake is one piece: "$108,465/mo" never breaks */
.portfolio-sheet .bd-amount { white-space: nowrap; }

/* THE COMPANIES: the name is the door to its page below */
.portfolio-sheet .pf-companies .pf-co a { color: var(--ink); font-weight: 600; text-decoration: none; }
.portfolio-sheet .pf-companies .pf-co a:hover { text-decoration: underline; }
.portfolio-sheet .pf-companies td.pf-asof { white-space: nowrap; }
.portfolio-sheet .pf-band td { font-size: var(--t-label); font-weight: 600; color: var(--muted); }

/* THE INSIGHTS ACROSS THE COMPANIES: the company first */
.portfolio-sheet .pf-insights .pf-ins-co { font-weight: 700; margin-right: 4px; }
.portfolio-sheet .pf-insights .bd-meta a { color: var(--accent); }
.portfolio-sheet .pf-quiet { margin: 0 0 var(--s-2); font-size: var(--t-table); color: var(--ink-2); }

/* A PAGE PER COMPANY: on paper each starts a page; here each is a section */
.portfolio-sheet .pf-company { margin-top: var(--s-6); }
.portfolio-sheet .pf-c-head { margin: 0 0 var(--s-2); font-size: var(--t-sm); color: var(--muted); }
.portfolio-sheet .pf-c-asof { margin-left: 6px; }
.portfolio-sheet .pf-c-read { margin: 0 0 var(--s-2); max-width: 72ch; color: var(--ink);
  font-family: Georgia, "Times New Roman", serif; font-size: 16px; line-height: 1.5; }
.portfolio-sheet .pf-c-line { margin: 0 0 var(--s-3); font-size: var(--t-sm); color: var(--ink-2); }
.portfolio-sheet .pf-c-basis { margin: var(--s-2) 0; max-width: 90ch; font-size: var(--t-sm);
  color: var(--muted); }
.portfolio-sheet .pf-c-insights { margin: 0 0 var(--s-2); padding-left: 18px; font-size: var(--t-sm);
  color: var(--ink-2); }
.portfolio-sheet .pf-c-links { margin: var(--s-2) 0 0; font-size: var(--t-sm); }
.portfolio-sheet .pf-c-links a { color: var(--accent); }
.portfolio-sheet .pf-method > div { margin: 0 0 4px; }

/* THE ADMIN PAGE: the settings pages' cards, a row of fields per form */
.pfa-form:not([hidden]) { display: flex; flex-wrap: wrap; align-items: flex-end;
  gap: var(--s-2) var(--s-3); margin: var(--s-2) 0; }
.pfa-field:not([hidden]) { display: flex; flex-direction: column; gap: 4px;
  font-size: var(--t-label); font-weight: 600; color: var(--ink-2); }
.pfa-row:not([hidden]) { display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: var(--s-2) var(--s-4); }
.pfa-h { margin: var(--s-4) 0 var(--s-1); font-size: var(--t-table); font-weight: 650; color: var(--ink); }
.pfa-list { list-style: none; margin: 0; padding: 0; }
.pfa-list > li:not([hidden]) { display: flex; align-items: center; gap: var(--s-2);
  min-height: var(--ctl-h); border-bottom: 1px solid var(--line-soft); font-size: var(--t-table); }
.pfa-name { flex: 1 1 auto; }
.pfa-inline:not([hidden]) { display: inline-flex; align-items: center; gap: var(--s-2); margin: 0; }
.pfa-inline .linklike:not([hidden]) { display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap; }
.pfa-suggest { margin: var(--s-2) 0; padding: var(--s-2) var(--s-3);
  border: 1px dashed var(--line); border-radius: var(--r-md); }
.pfa-suggestion:not([hidden]) { display: flex; flex-wrap: wrap; justify-content: space-between;
  margin: 4px 0; }
.pfa-card.is-archived .set-block-title h2 { color: var(--muted); }

@media (max-width: 640px) {
/* a phone (390px) is a designed width: the forms stack, the mix wraps, and
   the sheet's tables scroll under the board's shade (`.tablewrap`) */
  .pfa-form:not([hidden]), .pfa-row:not([hidden]) { flex-direction: column; align-items: stretch; }
  .portfolio-sheet .pf-mix-group { white-space: normal; }
  .portfolio-sheet .pf-c-read { font-size: 15px; }
  /* the list folds its Companies column; the packet's table lets a long
     company name wrap so the figures show on the first screen (review
     2026-10-02) */
  .pf-list .pf-col-co { display: none; }
  .portfolio-sheet .pf-companies th.pf-co { white-space: normal; overflow-wrap: anywhere;
    min-width: 7rem; max-width: 9rem; }
}

@media (641px <= width <= 1240px) and (pointer: coarse) {
  #main table.console-table .portfolio-row[data-href] td.col-date::after { content: none; }
}

@media (max-width: 640px) {
  /* the card is the door: the arrow a desk draws after the last column is not */
  #main table.console-table .portfolio-row[data-href] td.col-date::after { content: none; }
}

@media (641px <= width <= 1240px) and (pointer: coarse) {
  #main table.console-table .portfolio-row[data-href] td.col-date { padding-right: 0; }
}

/* ===== SIGNING IN AND SECURITY [sign-in] =====
   Sign-in, two-factor enrolment and the security page.
   --- kept from an old banner ---
   THE SHELL · B · sign-in, two-factor, security (2026-09-22)
*/

.login-box h1 { margin-top: 0; }
.enroll-qr { background: var(--surface); padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.enroll-qr svg { display: block; width: 184px; height: 184px; }
.recovery-codes li { padding: 2px 0; }
.auth-page {
  /* a door's controls are thumb-sized in both pointer modes: the token is
     redefined for this frame only, so the fields and the primary stay on ONE
     geometry without inventing a second height token */
  --ctl-h: 40px;
  min-height: 100svh; display: grid; place-items: center;
  padding: var(--s-5) var(--s-4);
}
.auth-frame { width: min(380px, 100%); display: flex; flex-direction: column;
  gap: var(--s-4); }
.auth-page .brand-logo { justify-content: center; }
.auth-page .brand-logo img { height: 26px; }
/* framed by the console the brand is already on screen once (console-theme
   hides the rail's and the mobile bar's copies for the same reason) */
html.embedded .auth-page .brand-logo { display: none; }

.auth-page .login-box { width: 100%; max-width: none; margin: 0;
  padding: var(--s-6) var(--s-5) var(--s-5); border-radius: var(--r-xl); }
.auth-page .login-box h1 { margin: 0 0 var(--s-1); font-size: 19px; }
.auth-page .login-box > .muted { margin: 0; font-size: 13px; }
/* THE ERROR HAS A PLACE WHETHER OR NOT THERE IS ONE, so a refusal never
   pushes the fields and the button down the page */
.auth-alert { display: flex; align-items: center; min-height: 22px; }
.auth-alert .error { margin: 0; font-size: 13px; line-height: 1.4; }

/* both fields at ONE resting weight: the edge is `--field-line`, a step
   stronger than the card's hairline, so FOCUS is the increment (the accent
   ring) rather than the only state that can be seen at all */
.auth-page .login-box form { display: flex; flex-direction: column;
  gap: var(--s-3); margin-top: var(--s-1); }
.auth-page .login-box label { display: block; margin: 0;
  font-size: var(--t-sm); font-weight: 550; color: var(--ink-2); }
.auth-page .login-box input::placeholder { color: var(--muted-2); }
.auth-page .login-box input:hover { border-color: var(--muted-2); }
.auth-page .login-box input:focus { outline: 2px solid var(--accent);
  outline-offset: -1px; border-color: var(--accent); }
/* the card's one action is its widest target, not its smallest */
.auth-page .login-box button.primary { width: 100%; justify-content: center;
  margin-top: var(--s-1); }

/* -- THE CODE STEP (Proton): the code, the alternative, the escape ------- */
/* ONE field, never six boxes: six would change the POST shape and break
   paste and the one-time-code autofill. The TYPE says it is a code. */
.auth-page .login-box input[name="code"] { font-family: var(--mono);
  font-size: 22px; font-weight: 500; text-align: center;
  letter-spacing: .35em; text-indent: .35em; min-height: 52px; }
.auth-aside { display: flex; flex-direction: column; align-items: center;
  gap: var(--s-2); padding-top: var(--s-3);
  border-top: 1px solid var(--line); text-align: center; }
.auth-aside p { margin: 0; font-size: 12.5px; line-height: 1.5; }
.auth-aside form { margin: 0; }
.auth-aside .linklike { font-size: 12.5px; color: var(--muted); }
.auth-aside .linklike:hover { color: var(--ink); }

/* -- ENROLMENT (Mailchimp): a numbered procedure ------------------------- */
/* the numerals are a CSS counter — generated content, not copy. The QR is
   the path; the manual key is the fallback under it, not its equal column. */
.enroll-steps { display: block; list-style: none; margin: 18px 0 0; padding: 0;
  counter-reset: enroll-step; }
.enroll-step { position: relative; padding: 0 0 var(--s-5) 40px; }
.enroll-step:last-child { padding-bottom: 0; }
.enroll-step::before { counter-increment: enroll-step;
  content: counter(enroll-step); position: absolute; left: 0; top: 2px;
  width: 26px; height: 26px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent);
  font-size: 12.5px; font-weight: 650; line-height: 26px; text-align: center; }
/* A QR MUST BE DARK ON LIGHT TO BE SCANNED. The modules are drawn near
   black and the light ones are transparent, so on the dark theme's surface
   the code vanished into the page and a phone could not read it (a defect
   that predates this pass; it is in both before sets). The paper alias is
   white in BOTH themes — what a printed code needs. */
.enroll-qr { display: inline-block; border-radius: var(--r-lg);
  background: var(--surface-light); }
.enroll-fallback { margin: var(--s-3) 0 var(--s-2); font-size: 12.5px; }
.enroll-form { display: flex; align-items: flex-end; flex-wrap: wrap;
  gap: var(--s-2); }
.enroll-form label { display: flex; flex-direction: column; gap: var(--s-1);
  margin: 0; font-size: var(--t-sm); font-weight: 550; color: var(--ink-2); }
.enroll-form input { width: 8rem; min-height: var(--ctl-h); padding: 0 11px;
  font: inherit; font-family: var(--mono); font-size: var(--t-table);
  letter-spacing: .12em; color: var(--ink); background: var(--surface);
  border: 1px solid var(--field-line); border-radius: var(--r-md); }
.enroll-form input::placeholder { color: var(--muted-2); letter-spacing: 0; }
.enroll-form input:hover { border-color: var(--muted-2); }
.enroll-form input:focus { outline: 2px solid var(--accent);
  outline-offset: -1px; border-color: var(--accent); }

/* -- /security (Mercury): the state is a badge, the count is a row ------- */
.sec-panel { max-width: 640px; margin-top: 14px;
  padding: var(--s-4) var(--s-5) var(--s-3);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); }
.sec-panel h2 { margin: 0 0 var(--s-2); }
.sec-row { display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--s-2) var(--s-4);
  padding: var(--s-3) 0; border-top: 1px solid var(--line-soft); }
.sec-panel h2 + .sec-row { border-top: 0; }
.sec-row-label { margin: 0; font-size: var(--t-table); line-height: 1.5;
  min-width: 0; }
p.sec-row-label { max-width: 46ch; }
/* THE DESTRUCTIVE ACTION IS ITS OWN TIER, not a second row of the same
   kind: a stronger rule above it, more air, and its form at the LEFT so it
   reads as the card's foot instead of a second right-hand control floating
   under the routine one */
.sec-row-quiet { border-top-color: var(--line); padding-top: var(--s-4); }
.sec-row-quiet .sec-form { margin-left: 0; }
.sec-form { display: flex; align-items: flex-end; gap: var(--s-2);
  margin-left: auto; }
.sec-form label { display: flex; flex-direction: column; gap: var(--s-1);
  margin: 0; font-size: var(--t-sm); font-weight: 550; color: var(--ink-2); }
.sec-form input { width: 7.5rem; min-height: var(--ctl-h); padding: 0 11px;
  font: inherit; font-family: var(--mono); font-size: var(--t-table);
  letter-spacing: .12em; color: var(--ink); background: var(--surface);
  border: 1px solid var(--field-line); border-radius: var(--r-md); }
.sec-form input::placeholder { color: var(--muted-2); letter-spacing: 0; }
.sec-form input:hover { border-color: var(--muted-2); }
.sec-form input:focus { outline: 2px solid var(--accent);
  outline-offset: -1px; border-color: var(--accent); }
.sec-form button:not(.primary):not(.linklike) { min-height: var(--ctl-h);
  padding: 0 14px; border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-size: var(--t-table); font-weight: 600; cursor: pointer;
  background: var(--surface); border: 1px solid var(--field-line);
  color: var(--ink); }
.sec-form button:not(.primary):not(.linklike):hover {
  border-color: var(--accent); color: var(--accent); }
.sec-form button.linklike:hover { color: var(--ink);
  background: var(--surface-2); text-decoration: none; }
.sec-row .btn-link.primary { flex: none; text-decoration: none; }
.sec-new-codes .recovery-codes { margin-top: var(--s-2); }

/* --- 2. ONE LEFT AXIS ON /security, AND THE BADGE BESIDE ITS LABEL ------
   Three things on one card. The two "Current code" forms — generate new
   codes, and turn two-factor off — sat at x=529 and x=285, so the page's
   two most consequential controls shared no edge and the DESTRUCTIVE one
   was told apart by its POSITION. The state badge sat 550px from the
   "Status:" it answers, at the far right of a card whose other rows are
   nothing like that wide. And the recovery-code count floated between its
   own field's label and the field, on no line at all.

   Both forms start at the card's own left edge now — the only axis the two
   rows can share, since one of them has a sentence in front of it and the
   other does not — and the count leads its row as a line of its own,
   directly above the field it counts for. Nothing tells the destructive
   tier apart but WEIGHT: a quiet `.linklike` submit under a stronger rule,
   against a bordered one. The badge sits beside its label with 8px between
   them, which is the only place in the sentence it reads as its answer. */
.sec-row:has(> .st) { justify-content: flex-start; gap: var(--s-1) var(--s-2); }
.sec-row:has(.sec-form) .sec-row-label { flex: 1 0 100%; }

/* --- 6. THE CODE STEP'S ESCAPE IS A CONTROL ----------------------------
   "Cancel" was centred grey text under a centred grey sentence — a caption
   in a page whose every other line is one. It takes the kit's quiet role:
   accent ink, the control geometry a quiet button wears in a foot (one
   height, a radius, a hit area wider than the word, a ground under the
   pointer). And the sentence above it stops orphaning its last word. */
.auth-aside p { max-width: 32ch; margin: 0 auto; text-wrap: balance; }
.auth-aside .linklike { min-height: var(--ctl-h); padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-md); font-size: var(--t-table); font-weight: 600;
  color: var(--accent); }
.auth-aside .linklike:hover { background: var(--surface-2); color: var(--accent);
  text-decoration: none; }
.jump-palette input::placeholder, .auth-page .login-box input::placeholder,
.enroll-form input::placeholder, .sec-form input::placeholder,
.list-toolbar[data-tab] > .list-search::placeholder,
.set-codes .codes-filter input[type="search"]::placeholder,
table.codes-table tr.code-quickadd input::placeholder,
.wiz-step .attest-form input::placeholder,
.scn-lever-table td.scn-set input::placeholder, .scn-growth-field input::placeholder,
.scn-page .scn-goal-form .scn-goal-fields input::placeholder,
.admin-sec > .add-card input::placeholder, .admin-users .pw-form input::placeholder {
  color: var(--muted); }

@media (max-width: 640px) {
/* -- THE PHONE IS A DESIGNED WIDTH -------------------------------------- */
  .auth-frame { width: 100%; }
  .auth-page .login-box { padding: var(--s-5) var(--s-4); }
  .sec-panel, .sec-new-codes { max-width: none; }
  .sec-panel { margin-top: var(--s-2);
    padding: var(--s-3) var(--s-4) var(--s-2); }
  .sec-row { align-items: flex-start; }
  .sec-form { width: 100%; margin-left: 0; flex-wrap: wrap; }
}

.sec-form { margin-left: 0; }

@media (max-width: 640px) {
  .sec-form label { width: 100%; }
  .sec-form input { width: 100%; }
  .sec-form button:not(.linklike) { width: 100%; }
  .enroll-step { padding-left: 34px; }
  .enroll-qr { max-width: 100%; }
  .enroll-qr svg { width: 100%; height: auto; max-width: 184px; }
  .enroll-form { width: 100%; }
  .enroll-form label { width: 100%; }
  .enroll-form input { width: 100%; }
  .enroll-form button.primary { width: 100%; }
}

/* ===== HELP: THE DRAWER, THE CENTER AND THE ASSISTANT [help] =====
   The help door on every rail and its drawer, the help center's index, articles and glossary, and the assistant.
   --- kept from an old banner ---
   THE GRID — seventh pass (2026-09-09, report 01). One rule for the em
   dash on the P&L, an answer column that foots what is on the page and
   says how much of it, one mark per meaning, and a money cell that is
   never narrower than the figure inside it.
   --- kept from an old banner ---
   THE HELP CENTER · C · the index, an article and the glossary (2026-09-24)
   --- kept from an old banner ---
   THE GLOSSARY'S OLD ANCHOR (2026-09-28)
*/

body.ask-open .ask-pill { display: none; }
.ask-panel[hidden] { display: none; }
.ask-pill .ask-text { display: none; }
.help-list dd { margin: 3px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
a.help-row:first-child { border-top: 0; }
a.help-row:hover { background: var(--surface-2); text-decoration: none; }
.help-toc ol { list-style: none; margin: 0; padding: 0;
  border-left: 2px solid var(--line); }
.help-toc li { margin: 0; }
.help-toc a:hover { color: var(--accent); background: var(--surface-2); }
/* an article's headings are sentences, not labels: the app's h2 is an
   uppercase section label, which shouts at three words of prose */
.help-body h2 { font-size: 16px; font-weight: 700; color: var(--ink);
  text-transform: none; letter-spacing: 0; margin: 26px 0 8px;
  scroll-margin-top: 18px; }
.help-body p { margin: 0 0 12px; }
.help-body ul, .help-body ol { margin: 0 0 14px; padding-left: 20px; }
.help-body li { margin: 0 0 5px; }
.help-body em { color: var(--ink); font-style: italic; }
.help-body strong { color: var(--ink); }
.help-stub { color: var(--muted); }

/* a definition list inside an article: the three states, the six ideas, the
   glossary itself */
.help-body dl { margin: 0 0 16px; }
.help-body dt { font-weight: 650; color: var(--ink); margin-top: 10px;
  scroll-margin-top: 18px; }
.help-body dd { margin: 2px 0 0; }
.help-terms dt { border-top: 1px solid var(--line-soft); padding-top: 9px; }
a.help-term { color: var(--ink); text-decoration: underline dotted var(--accent-line);
  text-underline-offset: 3px; }
a.help-term:hover { color: var(--accent); }

/* ---- the writer's macros ----------------------------------------------- */
.help-step { margin: 22px 0; }
.help-step h2 { display: flex; gap: 10px; align-items: baseline; margin-top: 0; }

.help-shot { margin: 14px 0 18px; }
.help-shot figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; }
a.help-screen:hover { background: var(--accent-soft); text-decoration: none; }
.help-next ul { list-style: none; margin: 4px 0 0; padding: 0; }
.help-related ul { list-style: none; margin: 0; padding: 0; }
.help-related li { margin: 0 0 10px; }
.help-backdrop { display: none; position: fixed; inset: 0; z-index: 69;
  background: var(--scrim); }
#help-drawer:not([hidden]) + .help-backdrop:not([hidden]) { display: block; }
.help-list dt::before { content: counter(helpn);
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; width: 18px; height: 18px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--mono); font-size: 11px; font-weight: 600; }
.help-list dd { margin: 4px 0 14px 26px; font-size: 13px; line-height: 1.5;
  color: var(--ink-2); }
.help-foot-more { margin-top: 0; }
.help-head, .help-foot { flex: none; }
.snap-meta dd {
  margin: 0; font-size: var(--t-table); line-height: 19px; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
/* Family 9, section C. LOOK, LAYOUT AND HIERARCHY ONLY: no article's words
   move, every hook the tests and the two inline scripts read stays, and the
   one added control is the glossary's filter (owner decision 2026-09-24).
   What already worked stays as it was: the note asides and their label
   column, the numbered step with its 2px rule, the dotted term link, the
   sticky "On this page", the "Picture to come" frame and the print block.
   Every colour is a token; every `display` rule on a row, a pair or a panel
   the filters hide carries `:not([hidden])`. The media queries use the range
   form. */

/* --- 1. THE INDEX ------------------------------------------------------------
   THE ROWS COULD NOT BE FILTERED. `a.help-row { display: flex }` is an author
   rule, and an author `display` outranks the user agent's `[hidden]`, so the
   live filter set `hidden` on every row it meant to drop and every one of them
   stayed on screen (only a group whose rows were ALL hidden went, because a
   `<section>` carries no display of its own). The script's contract is
   restored here, beside the rule that broke it. */
a.help-row[hidden] { display: none; }
/* the count changes as a person types ("22 of 22", "0 of 22"): a fixed slot
   of tabular figures, so the field beside it does not slide under the cursor */
.page-head.suite #help-count { min-width: 4em; text-align: right;
  font-variant-numeric: tabular-nums; }

/* a group heading is the job's NAME, in the case it is written: the global
   `h2` uppercase and letter-spacing reached it by accident */
.help-groups { gap: 28px; }
.help-group-h {
  margin: 0 0 10px; font-size: 15px; line-height: 20px; font-weight: 650;
  letter-spacing: 0; text-transform: none; color: var(--ink);
}
.help-rows { border-radius: var(--r-lg); }
a.help-row .help-row-main { grid-area: main; gap: 3px; }
a.help-row .help-row-meta { display: contents; }
a.help-row .help-row-aud { grid-area: aud; display: flex; flex-wrap: wrap; gap: 6px; }
a.help-row .help-row-t { line-height: 20px; }
a.help-row .help-row-s { line-height: 18px; max-width: 110ch; }
a.help-row::after {
  content: ""; position: absolute; right: 20px; top: 50%;
  width: 7px; height: 7px; margin-top: -4px;
  border-right: 1.5px solid var(--muted-2); border-top: 1.5px solid var(--muted-2);
  transform: rotate(45deg); transition: right .12s ease, border-color .12s ease;
}
a.help-row:hover::after { right: 17px; border-color: var(--accent); }
a.help-row:hover .help-row-t { color: var(--accent); }
a.help-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px;
  border-radius: var(--r-md); }

/* the two empty states (the server's "Nothing matches …" and the live
   filter's) and the glossary's: a designed card, not a loose grey line */
.help-empty {
  padding: 28px 20px; text-align: center;
  border: 1px dashed var(--line); border-radius: var(--r-lg);
  background: var(--surface); color: var(--ink-2);
}
.help-missing { border-radius: var(--r-md); }
/* inside an article the empty state spans the list it stands in for, not the
   prose measure a paragraph keeps */
.help-body .help-empty { max-width: none; margin: 10px 0 0; }

/* --- 2. THE ARTICLE ----------------------------------------------------------
   THE HEAD: the kit already stacks the title block; the metadata is one line
   of its own that wraps as a line (the kind never breaks inside itself) and
   "Links open …" is set apart from the kind by a hairline, not run into it. */
.help-meta { flex-wrap: wrap; row-gap: 6px; margin: 10px 0 0; }
.help-meta .help-row-kind { white-space: nowrap; }
.help-meta .help-row-kind + .help-row-kind::before {
  content: ""; display: inline-block; width: 1px; height: 12px;
  margin: 0 10px 0 2px; vertical-align: -2px; background: var(--line);
}
.help-body { max-width: 920px; }
.help-body :is(.help-note, .help-next) { max-width: 76ch; }
.help-shot img { border-radius: var(--r-md); }
.help-shot > a:hover img { border-color: var(--accent-line); }
.help-shot figcaption { margin-top: 8px; line-height: 1.5; }
.help-shot-soon { border-radius: var(--r-md); }
.help-toc-k { margin: 0 0 8px 2px; font-size: var(--t-label); line-height: 16px; }
.help-toc ol { border-left: 2px solid var(--line-soft); }
.help-toc a:hover { border-left-color: var(--accent); }
.help-toc a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* the article's small parts, which had no rule of their own */
.help-body .mono, .help-body code {
  padding: 1px 4px; border-radius: 4px; background: var(--surface-2);
  font-family: var(--mono); font-size: 12.5px; color: var(--ink);
}
.help-body .help-quote {
  max-width: 68ch; margin: 0 0 14px; padding: 2px 0 2px 14px;
  border-left: 2px solid var(--accent-line); color: var(--ink);
}
.help-body dl.help-states > dt { margin: 0; padding-top: 11px; }
.help-body dl.help-states > dt ~ dt { border-top: 1px solid var(--line-soft); }
.help-body dl.help-states > dd { margin: 2px 0 0; padding-bottom: 11px; }

.help-next { border-radius: var(--r-md); }
.help-related ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px 28px; }
.help-related li { margin: 0; }
.help-related-s { margin-top: 2px; line-height: 1.45; }
/* the heading sits on the foot's rule, not 44px under it; and the closing
   line keeps the air it was given (`.help-body p`'s margin outranked it) */
.help-body .help-related h2 { margin-top: 0; }
.help-body .help-unclear { margin-top: 28px; }

/* --- 3. THE GLOSSARY -----------------------------------------------------------
   THE FILTER (owner decision): the kit's filter bar (`.help-find`, the field
   primitive and its height) with its count beside it; it stays with the
   reader down a 70-term page, under the phone's bar where there is one. A
   linked term is marked where it lands. */
.help-body .gl-find { margin: 18px 0 4px; }

/* THE SIX: the ideas the rest rests on, as six items — two across */
.help-body dl.help-six { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.help-six > div {
  padding: 12px 14px 13px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md);
}
.help-six dt { margin: 0; }
.help-six dd { margin: 3px 0 0; font-size: 13.5px; line-height: 1.55; }
.help-terms > div { margin: 0 -16px; padding: 11px 16px; }
.help-terms > div:not([hidden]) {
  display: grid; grid-template-columns: 12.5rem minmax(0, 1fr); column-gap: 24px;
}
.help-terms > div:not([hidden]) ~ div:not([hidden]) { border-top: 1px solid var(--line-soft); }
.help-terms > div > dd { margin: 0; line-height: 22px; }
.help-terms > div:first-child { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.help-terms > div:last-child { border-radius: 0 0 var(--r-lg) var(--r-lg); }
a.help-row:not([hidden]) ~ a.help-row:not([hidden]) { border-top: 1px solid var(--line-soft); }
.ask-send:hover:not(:disabled) { background: var(--accent-fill-hover); }
/* the assistant's field had no ground of its own, so dark mode drew the
   browser's grey field (#3b3b3b) and the placeholder reached 4.07:1 on it.
   It wears its form's ground and ink: light looks as before, and in dark
   the placeholder is `--muted` on `--surface`, 6.4:1 */
.ask-form input { background: var(--surface); color: var(--ink); }
.ask-panel { border-radius: var(--r-xl); box-shadow: var(--shadow-pop); }
/* the assistant's close is the kit's icon now, in what was a 22px text
   button: on the icon's own -3px nudge it sat under the button's middle. It
   is the insight dialog's close instead, a 28px box with the icon centred */
.ask-head .dqm-close { display: inline-flex; align-items: center; justify-content: center;
  flex: none; width: 28px; height: 28px; padding: 0; border-radius: var(--r-md); }
.ask-head .dqm-close:hover { color: var(--inverse-ink); }
.ask-head .ask-h-ctx { font-family: var(--sans); font-size: var(--t-label); line-height: 16px; }
.move-facts dd { margin: 2px 0 0; font-size: var(--t-table); line-height: 19px; color: var(--ink); }
.ask-msg.bot a { text-decoration: underline; text-underline-offset: 2px;
  text-decoration-thickness: 1px; }
.ig-pop-kv dd { margin: 0; color: var(--ink); line-height: 19px; }

@media (max-width: 1000px) {
  .help-layout { grid-template-columns: minmax(0, 1fr); }
}

/* THE BODY GETS ITS WIDTH BACK (Mintlify): the 68ch measure belonged to the
   prose, not to the article, and on the article it shrank a 1440-wide
   walkthrough picture to 40% — every word in it unreadable — beside 350px of
   empty page. The prose keeps its measure; a picture runs to the column. */
.help-layout { grid-template-columns: 224px minmax(0, 1fr); gap: 32px; }

@media (max-width: 1000px) {
  .help-toc { position: static; }
}

/* "ON THIS PAGE" IS A PANEL: a surface with its own edge, the key in the
   product's 11.5px muted label, and the links on a rail that lights the one
   under the pointer (no active-section mark: that is a script, a later step) */
.help-toc {
  padding: 12px 10px 12px 12px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  max-height: calc(100vh - 36px); overflow-y: auto;
}

@media screen and (width <= 1000px) {
/* --- 4. DARK -----------------------------------------------------------------
   Nothing here needs a value of its own: the rows, the panel, the items and
   the empty state sit on `--surface` over `--bg` behind a `--line` edge, so
   the Search button is no longer the only rectangle that reads. */

/* --- 5. THE PHONE --------------------------------------------------------- */
  /* one column, as the first help block had it: the two-column rule above
     is later in the file, so it is restated here or it wins on a phone */
  .help-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .help-toc { max-height: none; overflow: visible; }
}

@media (max-width: 640px) {
  html:not(.embedded) body.has-side .ask-pill { bottom: calc(12px + var(--tabs-h)); }
}

@media (width <= 640px) {
  .ask-panel { border-radius: var(--r-xl) var(--r-xl) 0 0; }
}

@media screen and (max-width: 640px) {
  .help-find button { flex: 0 0 auto; }
}

@media screen and (width <= 640px) {
  /* the head's count stands under the field at the left, not in a slot */
  .page-head.suite #help-count { min-width: 0; text-align: left; }
}

#modal-confirm .confirm-foot .linklike {
  min-height: var(--ctl-h); padding: 0 10px; border-radius: var(--r-md);
  font-size: var(--t-table); font-weight: 600;
}

@media screen and (width <= 640px) {
  /* a wrapped metadata line starts with its words, not with a rule */
  .help-meta .help-row-kind + .help-row-kind::before { content: none; }
  a.help-row::after { right: 14px; }
  a.help-row:hover::after { right: 12px; }
  .help-step-body { padding-left: 14px; margin-left: 10px; }
  .help-body dl.help-six { grid-template-columns: minmax(0, 1fr); }
  .help-terms > div:not([hidden]) { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  .help-related ul { grid-template-columns: minmax(0, 1fr); }
}

@media (641px <= width <= 900px) {
/* -- 4. THE CHAT BUBBLE CLEARS THE PAGE'S END ------------------------------
   the bubble (`#ask-pill`, 44px, 20px from the corner; 12px on a phone) sits
   over whatever scrolls under it, and the page's end must be able to scroll
   clear of it. At 1440 it can: main's foot is 80px under a bubble that takes
   64px, so the last card stops 16px above it, and at the fold the row it
   covers moves with the first scroll. A phone's foot is 72px under 56px.
   Between 641 and 900px the foot was 60px while the bubble still took 64px,
   and the last card's edge stayed under it: there a page that carries the
   bubble keeps the desktop's foot. */
  main:has(#ask-pill) { padding-bottom: 80px; }
}

@media screen and (width >= 641px) {
/* the search is the page's way in, on the kit's field with the audience
   picker and the button at its height (the kit sets all three). Beside the
   title it stays ONE row: the kit's filter bar wraps, and where the title
   block leaves the head little room a wrap would drop the button under the
   field; the whole row moves under the title instead. */
  .page-head.suite .help-find { flex-wrap: nowrap; }
}

@media screen and (width >= 901px) {
  .help-body .gl-find { position: sticky; top: 0; z-index: 5; padding: 10px 0;
    margin: 8px 0 0; background: var(--bg); }
}

@media screen and (width <= 900px) {
  .help-body .gl-find { position: sticky; top: 52px; z-index: 5; padding: 8px 0;
    margin: 8px 0 0; background: var(--bg); }
}

@media screen and (width >= 901px) {
  .help-body:has(.gl-find) dt { scroll-margin-top: 72px; }
}

@media screen and (width <= 900px) {
  .help-body:has(.gl-find) dt { scroll-margin-top: 124px; }
}

@media screen and (width >= 901px) {
/* /help/glossary#t-decision lands on the Insight pair: the fragment target is
   the pair's <div> (its alias id), not the <dt>, so the div takes the same
   scroll margin that clears the sticky filter bar, and the highlight fires on
   a targeted div as it does on a targeted dt (the follow-ups of SPEC §6.73). */
  .help-body:has(.gl-find) :is(.help-six, .help-terms) > div[id] { scroll-margin-top: 72px; }
}

@media screen and (width <= 900px) {
  .help-body:has(.gl-find) :is(.help-six, .help-terms) > div[id] { scroll-margin-top: 124px; }
}

@supports (animation-timeline: scroll()) {
/* A LIST THAT IS CUT SAYS SO — the kit's own answer (section D, rule 3),
   reused here because the sixth concept lands under the foot at 900px tall:
   two sticky strips faded by the scroll itself, so where there is nothing to
   scroll the timeline never runs and neither strip is ever drawn. */
  .help-list::before, .help-list::after {
    content: ""; display: block; position: sticky; z-index: 3;
    height: 10px; opacity: 0; pointer-events: none; }
  .help-list::before {
    top: 0; margin-bottom: -10px;
    background: linear-gradient(var(--shade-edge), transparent);
    animation: kit-shade-top linear both;
    animation-timeline: scroll(); animation-range: 0 12px; }
  .help-list::after {
    bottom: 0; margin-top: -10px;
    background: linear-gradient(transparent, var(--shade-edge));
    animation: kit-shade-bottom linear both;
    animation-timeline: scroll(); animation-range: calc(100% - 12px) 100%; }
}

@media print {
  .help-shot, .help-note, .help-step, .help-related { break-inside: avoid; }
}

.help-shot { margin: 16px 0 22px; }
/* the foot: Related (or More in this group) uses the width it now has */
.help-related { margin-top: 36px; padding-top: 18px; }

/* ===== PRINT [print] =====
   Every rule for paper (inside @media print) and the page box.
*/

@media print {
  body { background: var(--surface); }
  /* the results panel prints even when the Pricing tab is the one on screen */
  #scn-panel-results[hidden] { display: block !important; }
  .sheet-stamp, .scard, .proforma .pf-net td, .proforma .pf-sub td, .scn-chart {
    -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sheet-cards, .scard, .sheet-tbl { break-inside: avoid; }
  .sheet-h { break-after: avoid; }
  .bverdict, .bd-card, .bm-row, .viz-card, .board-table { break-inside: avoid; }
  .board-h2 { break-after: avoid; }
  /* the league table prints as one block, its links as plain text, its
     tinted chips and rules in color */
  table.league { break-inside: avoid; }
  /* the branch cell is a <th scope="row">, not a td: the old selector could
     never match (review 2026-09-07) */
  .league tr.total td, .league .lg-flag, .league tr.flagged th.lg-branch {
    -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ov-widget[hidden] { display: none; }
  @page { size: Letter; margin: 14mm 14mm 16mm; }
}

@page { size: letter; margin: 14mm;
  @bottom-right { content: "Page " counter(page) " of " counter(pages);
                  font: 8pt Helvetica, Arial, sans-serif; color: #6b6f7c; } }

@media print {
  .board-figs, .bverdict, .bd-card, .bm-row, .board-table, .viz-card, .bridge-strip { break-inside: avoid; }
  .board-h2, .board-title { break-after: avoid; }
  .board-sheet .board-table th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .report-table, .report-figs, .report-head, .report-stale,
  .report-outofbalance {
    break-inside: avoid; }
  .report-stale, .report-outofbalance { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .board-sheet .tablewrap::after { content: none; }
  .board-sheet .tbl-grid > * > tr:not(.group-row) > th:first-child { position: static; }

/* --- 11. PRINT ---------------------------------------------------------------
   The sheet prints from the page as it did (the block at the top of the
   print rules is untouched): the column lets the paper decide its width, and
   the scroll shade and the chart's scroller never reach the paper. */
  .scn-page { max-width: none; }
  /* section 2 restates the sheet's padding and radius after the print block
     at the top of the file, so the paper's are restated after it */
  .proposal-sheet { padding: 0; border-radius: 0; }
  .proposal-sheet .tablewrap::after { content: none; }
  .proposal-sheet .scn-chart-wrap { overflow: visible; }
  .proposal-sheet .scn-chart { min-width: 0; }

/* --- 6. PRINT ------------------------------------------------------------- */
  /* the paper has no "On this page": the article takes the whole width (the
     first help block got this from its unscoped 1000px query; the column
     rule above is later and unscoped, so it is said again for print) */
  .help-layout { grid-template-columns: minmax(0, 1fr); }
  a.help-row::after { content: none; }
  .help-toc { max-height: none; overflow: visible; }
  .help-six > div, .help-terms > div, .help-body dl.help-states { break-inside: avoid; }
  /* the sheet's print edges, restated after its paper above */
  .report-sheet { border-radius: 0; }
}
