/* SGE — THE APPLICATION SHELL, IN THE APPLE HOUSE STYLE.
   Every value in the token block below is verbatim from /Users/keith/Max/DESIGN.md
   (adopted 2026-08-26) — the type hierarchy, both palettes, spacing, radius,
   motion, elevation and the Interaction States section. The three values that
   document does not define are marked DERIVED BY WORKER where they appear, with
   their measured contrast beside them.

   WHAT THIS FILE OWNS, AND WHAT IT DOES NOT. It owns the SHELL and the SHARED
   PRIMITIVES: the page ground and its surfaces, the header, the logo, the menu
   and its dropdowns, the role chip and the help control, the type, the colour
   tokens the whole application draws from, and the buttons, links, inputs,
   tables, cards, pills, focus rings, hover and press states every screen uses.
   It does NOT rearrange any individual screen — that is a separate stream of
   work, screen by screen, and mixing it in here would make a regression
   impossible to trace to a cause.

   BOTH THEMES ARE FIRST-CLASS. Every token below has a dark counterpart in the
   `prefers-color-scheme: dark` block that follows, and every text token clears
   WCAG AA (4.5:1) against EVERY surface it can sit on in both — measured by
   `node scripts/shell-contrast.mjs`, not assumed. Keith's rule, in the design
   document: "A colour that only works on some surfaces isn't a token, it's a
   trap." A token that failed on one surface was changed; no usage restriction
   is written anywhere in this file.

   THE TWO FACES ARE RETIRED. Poppins and IBM Plex Mono are gone: the house face
   is SF Pro, reached through `system-ui`, and figures are set in SF Mono through
   `ui-monospace`. The self-hosted .woff2 files are still in public/fonts and are
   no longer referenced by anything. */

/* ---- THE HOUSE TOKENS ----------------------------------------------------
   Light first; the dark table follows in its own block and neither lags the
   other. The SGE names on the left (--paper, --ink, --muted and the rest) are
   kept as the names every screen rule in this file already draws from, so the
   palette moves in ONE place and no screen has to be edited to follow it. The
   design document's own names (--bg, --panel, --t1, --t2, --t3 …) are declared
   beside them and are what new work should use.

   The mapping, and why each one lands where it does:

     SGE token   design token   light      what it is
     --paper     bg             #f5f5f7    the page ground
     --card      panel          #ffffff    a card, a panel, a menu
     --paper-2   panel-2        #fafafc    the raised / hovered step above a card
     --paper-3   panel-3        #fafafc    an input well  (DERIVED — see below)
     --line      line           #e0e0e0    the one hairline
     --line-soft line-soft      #f0f0f0    a soft divider
     --ink       t1             #1d1d1f    primary text
     --ink-2     t2             #333333    secondary text
     --ink-3     t2             #333333    secondary text (SGE had three greys
     --muted     t3             #6e6e6e    where the document has two, so the
     --faint     t3             #6e6e6e    two quiet ones both land on t3 —
                                           --faint was #A6A092 and carried text)
     --accent    accent         #0066cc    every interactive element
     --green     success        #2E7D4F    verified good state
     --amber     warning        #9A5F0A    warning
     --red       danger         #C0392B    error
     --teal      success        #2E7D4F    "Won" / "Converted" is a verified good
                                           state, and the house has ONE accent —
                                           a second brand hue is not permitted

   THE SOFT WASHES GO GREYSCALE. --green-soft, --amber-soft, --teal-soft and
   --red-soft were tinted backgrounds; the house says depth comes from a surface
   step, a hairline or a blur, and colour is reserved for the accent and for
   verified state. Every one of them is now the raised surface, and the state is
   carried by the TEXT and the BORDER — which is also what makes them work in
   both themes, where a cream wash is a white block.

   DERIVED BY WORKER — three values, because the document does not define them:
     * light --paper-3 (panel-3) aliases panel-2. The document defines panel-3,
       "recessed fill, input wells", for the dark theme only. Same carry-over
       public/project-entry.css records.
     * --accent-deep, the hover step under a filled accent control. The document
       says filled accent buttons "deepen slightly" but names no value.
       Light #0050a3 — 7.21:1 on bg, white on it 7.85:1.
       Dark  #5aafff — 6.15:1 worst case on panel-2. On near-black tiles the
       deepening direction is LIGHTER, which is the document's own reasoning for
       its two dark fixes.
     * --accent-wash / --accent-rule, the translucent accent used for a link
       underline and a selected-row tint. Non-text, so no AA figure applies.
   Every figure above measured by `node scripts/shell-contrast.mjs`. */
:root {
  /* The browser paints its own furniture — form controls, scrollbars, the
     caret — for the theme in force, rather than a light widget on a black page. */
  color-scheme: light dark;

  --bg: #f5f5f7;
  --panel: #ffffff;
  --panel-2: #fafafc;
  --panel-3: #fafafc;
  --line: #e0e0e0;
  --line-soft: #f0f0f0;
  /* THE DIM BEHIND ANYTHING THAT LIES OVER THE PAGE. It was written straight
     into .nav-scrim and nowhere else until 19 September 2026, when the quick
     view gained a sheet of its own below the desk breakpoint (Keith: "Option B
     - over") and needed the same dimming in a second stylesheet. Two copies of
     one value five thousand lines apart is how two overlays come to dim the
     page by different amounts, so the value is said once here and both read it.
     It is not restated in the dark block: a dim is the same dim either way. */
  --scrim: rgba(15, 18, 22, 0.32);
  --t1: #1d1d1f;
  --t2: #333333;
  --t3: #6e6e6e;
  --accent: #0066cc;
  --accent-deep: #0050a3;
  --accent-focus: #0071e3;
  --on-accent: #ffffff;
  /* A filled control keeps Action Blue in BOTH themes, per the document: "filled
     buttons keep Action Blue fill on dark". White on it is 5.57:1 either way. */
  --accent-fill: #0066cc;
  --accent-fill-hover: #0050a3;
  --success: #2E7D4F;
  --warning: #9A5F0A;
  --danger: #C0392B;
  /* A FILLED STATE BADGE keeps its light-theme colour in BOTH themes, with white
     on it — the same construction the document gives the accent ("filled buttons
     keep Action Blue fill on dark"), generalised to the three state colours
     because SGE draws a dozen badges as a fill rather than as an outline. White
     measures 5.05:1 on success, 5.23:1 on warning and 5.44:1 on danger by
     `node scripts/shell-contrast.mjs`. Without them the dark tokens would be
     used as fills, and white on #EFA34A is 1.9:1 — unreadable. */
  --success-fill: #2E7D4F;
  --warning-fill: #9A5F0A;
  --danger-fill: #C0392B;

  /* ---- A FIELD LOOKS LIKE A FIELD -----------------------------------------
     SGE-BUILD-2026-08-28.md, Task 5: "On a near-white page, white inputs with
     a pale border do not read as somewhere to type." Two tokens, so the answer
     is in the token block and not at twenty call sites, which is what that task
     asks for in as many words ("Change these in the base rules, not per call
     site").

     THE TASK NAMES CREAM VALUES — an #F4F1EA fill and a #C2B9A6 border against
     a #DAD3C6 section rule. Those are the SGE palette as it stood when the task
     was written; the palette was replaced on 26 August 2026 by the house one at
     the head of this file, which is greyscale plus a single accent, and cream
     would be a second hue re-entering it. So the RELATIONSHIP the task states
     is what is implemented, in the palette that is actually in force:

       --field-bg    one step DOWN from the page ground, so a field reads as a
                     well on the white card AND on the grey page.
       --field-line  visibly darker than --line, which is what draws the
                     section rules. Light: #b4b4b9 against a #e0e0e0 rule.
                     The two differ by 44 points of luminance channel; the
                     task's own pair (#C2B9A6 against #DAD3C6) differ by 24, so
                     the requirement "field borders must be visibly darker than
                     section rules" is met with room to spare.

     Recorded as decision D-P5-1 in SGE-DECISIONS-PENDING-5.md. */
  --field-bg: #eeeef1;
  --field-line: #b4b4b9;

  /* ---- WHAT A FILM SITS ON ------------------------------------------------
     The letterbox bars either side of a training film, and what shows while
     the first frame is still loading. Declared here because gate 1
     (test/style-gates.test.js) allows a hex that DEFINES a token and refuses
     one painted in a rule — its own failure message is "move it into a token",
     and this is that move. The .guide-video-player rule was written with
     `var(--ink-1, #000)`; --ink-1 is not a token this file declares, so that
     resolved to the raw #000 and gate 1 caught it.

     IT DOES NOT FOLLOW THE THEME, and that is deliberate. --ink is --t1, which
     the dark-mode block further down re-declares as #ffffff, so pointing the
     film at the ink token would letterbox it in WHITE the moment the theme
     flipped. A film is backed in black in both themes, so this carries its own
     value and is not an alias. */
  --film-backing: #000000;

  --accent-wash: color-mix(in srgb, var(--accent) 12%, transparent);
  --accent-wash-2: color-mix(in srgb, var(--accent) 16%, transparent);
  --accent-rule: color-mix(in srgb, var(--accent) 40%, transparent);
  /* The fill under a SELECTED item — the open menu entry, the chosen calendar
     day, the nav item you are on. It was a cream literal (#F1E7D7); it is now
     the accent's own wash, so it follows the theme and stays the one accent. */
  --accent-soft: var(--accent-wash);

  /* ---- the names the screen rules in this file already use ---- */
  --paper: var(--bg);
  --paper-2: var(--panel-2);
  --paper-3: var(--panel-3);
  --card: var(--panel);
  --ink: var(--t1);
  --ink-2: var(--t2);
  --ink-3: var(--t2);
  --muted: var(--t3);
  --faint: var(--t3);
  --green: var(--success);
  --green-soft: var(--panel-2);
  --amber: var(--warning);
  --amber-soft: var(--panel-2);
  --teal: var(--success);
  --teal-soft: var(--panel-2);
  --red: var(--danger);
  --red-soft: var(--panel-2);

  /* ---- RADIUS, the document's scale verbatim ---- */
  --r-none: 0px;
  --r-xs: 5px;
  --r-sm: 8px;
  --r-md: 11px;
  --r-lg: 18px;
  /* KEITH, 27 August 2026: "probably we should all standardize to the square or
     rectangular with a round corner" — no pills, ovals or capsules anywhere on
     a control (chips, buttons, the search field, nav items, status badges). The
     pill token is retired to the SAME modest corner the input fields already use
     (--r-sm, 8px), so every control that pointed at a capsule now draws the
     rounded rectangle that sat beside it. One token, changed in one place. */
  --r-pill: var(--r-sm);
  --radius: var(--r-lg);      /* cards and grid cells */
  --radius-sm: var(--r-sm);   /* compact utility */

  /* ---- ONE WIDTH FOR EVERY STATE BOX IN A LIST -----------------------------
     KEITH, 29 August 2026: "Can we standardise the width of the State under the
     Open Quote Request .. all other similar display with a box no matter where
     the list view is, it shoul dbe the same width So it looks neat".

     Declared HERE and nowhere else, so a column of state boxes is a straight
     edge on /quote-requests, /customers, /contacts, /leads, /growth/list, /plan
     and every other list, instead of the thirty-six different widths a sweep of
     the seventeen list pages found.

     112px is the widest ORDINARY state ("Never bought", which draws at 102px)
     plus room to breathe. Nothing had to be reworded to reach it.

     The wide one is for the ONE box that is a composite rather than a value:
     /growth/list draws "At risk: gone quiet" beside its position, and those
     words are settled in the vault (30 July 2026) — the box widens to keep that
     column straight rather than the words being cut to fit. */
  --status-box-w: 112px;
  --status-box-w-wide: 136px;
  /* And the sales manager's ROI column, whose three answers are a ratio and two
     short notes about why there is no ratio. Its widest is the width for all
     three, so that column is a straight edge too. */
  --status-box-w-roi: 152px;

  /* ---- THE ROW, SET ONCE ---------------------------------------------------
     KEITH, 17 September 2026: list rows across SGE are about double the height
     they need, and the fix is "one compact table style set once in shared CSS"
     rather than a tighter table written per page. It is the same instruction he
     gave on 27 August — "And i think the list should be pack like this", looking
     at a Business Central list — and a cell padded 12px top and bottom against a
     13px/1.43 line was drawing a 43px row to carry 19px of words.

     TWO TOKENS, AND EVERY TABLE IN SGE INHERITS THEM. They are values from the
     spacing ladder above, not raw pixels, so the gate in
     test/style-gates.test.js is satisfied and a change here is a change
     everywhere.

     THE TOUCH FLOOR IS NOT TRADED AWAY. Keith's rule of 8 September 2026 on the
     44px minimum — "understand.. then maintan it" — is about what a thumb has to
     hit, and a whole row IS a tap target (tr[data-row-href]). So the comfortable
     padding comes back under `pointer: coarse` further down this file, where the
     rest of the touch floors live. Dense at a desk, tap-safe on an iPad. */
  --row-pad-y: var(--sp-xxs);       /* 4px  — was 12px */
  --row-pad-x: var(--sp-xs);        /* 8px  */
  --row-pad-y-touch: var(--sp-xs);  /* 8px  — the coarse-pointer floor */

  /* ---- A FIELD IS AS WIDE AS WHAT IT HOLDS ---------------------------------
     KEITH, 17 September 2026, looking at a form: "must it cover the whole width
     of the page". His standing rule says the rest: "A date box holds a date's
     worth of space, a dropdown holds its longest option; they sit in a row,
     left-aligned, and the rest of the width is left alone."

     EVERY FIELD IN SGE WAS `width: 100%`, so a date, a postcode and a two-word
     name each ran the full width of whatever held them. These are CEILINGS, not
     widths: a field still fills a narrow grid cell exactly as it did, and stops
     when it has enough. That is deliberately the smaller change — capping is one
     declaration on the base rule and cannot re-flow a layout that was already
     working, where switching to `width: auto` would re-flow every one of them.

     THE NUMBERS ARE WHAT THE CONTENT NEEDS at SGE's 13px field type:
       date     a date box plus its native picker glyph
       short    a postcode, a number, a time, a percentage
       medium   a name, a town, a reference, a phone number
       reading  THE CAP ON THE WIDEST SINGLE-LINE FIELD — about 70 characters,
                which is where a line stops being comfortable to read back.
     A TEXTAREA IS NOT CAPPED. Keith's instruction is about a single-line field;
     a box meant to hold paragraphs should use the room its card gives it. */
  --fw-date: 11rem;
  --fw-short: 8rem;
  --fw-medium: 20rem;
  --fw-reading: 34rem;

  /* ---- SPACING, the document's scale verbatim (base unit 8px) ---- */
  --sp-xxs: 4px;
  --sp-xs: 8px;
  --sp-sm: 12px;
  --sp-md: 17px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-xxl: 48px;
  --sp-section: 80px;

  /* ---- THE SPACING SCALE, UNDER THE NAME THE GATE KEYS ON ------------------
     KEITH, 28 August 2026 (Task 6, "the four gates"): "No raw pixel spacing in
     new CSS. This requires a spacing scale, which SGE has never had — grep for
     --space returns nothing. Add six or seven values as tokens first."

     The premise is very nearly right: there is no --space token, but there IS a
     spacing scale — the DESIGN.md ladder above, named --sp-* (recorded as D11).
     So rather than coin a SECOND, independent scale — two sources of truth for
     one thing, which is the exact fault the vocabulary work is closing across
     SGE — the --space-* names Keith asked for are declared here as ALIASES of
     the --sp-* values. One ladder, two names; new work writes gap: var(--space-sm)
     and it resolves to the same 12px the rest of the file already uses. Seven
     values, matching every step the --sp-* scale carries below --sp-section
     (which is a page-band rhythm, not an element gap, and is deliberately left
     off the --space ladder). test/style-gates.test.js accepts spacing supplied
     through EITHER prefix, because both are the scale. */
  --space-xxs: var(--sp-xxs);  /* 4px  */
  --space-xs: var(--sp-xs);    /* 8px  */
  --space-sm: var(--sp-sm);    /* 12px */
  --space-md: var(--sp-md);    /* 17px */
  --space-lg: var(--sp-lg);    /* 24px */
  --space-xl: var(--sp-xl);    /* 32px */
  --space-xxl: var(--sp-xxl);  /* 48px */

  /* THE HEIGHT THE STICKY LIST BAR RESERVES. It is one value because two rules
     have to agree about it and neither can measure the other: the bar itself
     keeps at least this height, and the sticky column headings under it pin at
     the app bar's 56px PLUS this. A dimension, not a gap — the spacing scale is
     for the space between things.

     IT COVERS THE PAGE HEADING AND THE PAGE ACTIONS TOO since 29 August 2026,
     because they are inside that block now (Keith: "the top part should the
     filter, column, new account, accounts, etc should be Frozen aways"). Two
     rows — title with its actions, then the search box with the two buttons —
     plus the bar's own padding; a filtered list carries a third row of chips and
     the rule beside .filter-bar reserves the taller height for that case. */
  --list-bar-h: 6.5rem;

  /* THE HEIGHT THE APP BAR ACTUALLY HAS. 56px is `.appbar-inner`'s min-height
     and was written as a literal in eleven places across two stylesheets —
     seven here and four in public/list-preview.css: every sticky offset that
     means "directly under the app bar", and every scrollport bounded by "the
     window, less the bar". It is one number here for the same reason
     `--rail-w` below is: nothing can measure the bar, so everything that has to
     reason about its height has to be told, once.

     AND IT IS NO LONGER ALWAYS 56. Since 12 September 2026 the bar is allowed
     to take a second row rather than cut the page's name in half (see
     "THE NAME IS THE LAST THING TO GIVE WAY" at .appbar-inner), and when it
     does, everything pinned under it has to come down with it or the column
     headings slide behind the bar. The bar cannot say its own height in CSS —
     it depends on the length of the name — so public/page-title-fit.js measures
     it and writes this property on <html>. The 56px here is the answer when
     that has not happened: no script, or a bar on one row. */
  --appbar-h: 56px;

  /* THE COLUMN THE NAVIGATION RAIL HOLDS. Zero everywhere except the desk band,
     where the rail stands on the page (see "THE DESKTOP NAVIGATION IS A RAIL").
     Below 1024 the navigation is a drawer floating over the page and reserves
     nothing, so every layout that has to reason about the rail's width — the
     shell grid here and the preview panel's third track in
     public/list-preview.css — reads this one number instead of repeating a
     literal that would then have to be kept in step in two files. */
  --rail-w: 0px;
  --rail-w-slim: 56px;
  --rail-w-wide: 232px;

  /* ---- MOTION ---- */
  --dur-fast: 160ms;
  --dur-base: 220ms;
  --dur-slow: 300ms;

  /* ---- ELEVATION: NO SHADOWS, AT ALL ----
     The document is flat about it: "No shadows. At all." Depth is a surface
     step, one hairline, or backdrop blur on something that floats. The two
     shadow tokens are kept ONLY so that a rule elsewhere in this file that has
     not been reached yet cannot resolve to an invalid value; both are `none`,
     and no rule in this file sets a shadow any more. */
  --shadow-sm: none;
  --shadow-md: none;

  /* ---- TYPE ----
     The families are the document's: SF Pro through the system stack, SF Mono
     through ui-monospace. Sizes are WHOLE PIXELS; letter-spacing is fractional,
     which is how tracking works and what the document requires. */
  --font: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;

  /* KEITH, 27 August 2026: "all the front size are rather larger then the user
     enterprise software" / "it's very big compared to all the enterprise
     software that I worked with". The whole scale comes down: body 17 -> 14,
     the data/list cell 14 -> 13 (see --fs-caption and the floor tokens below),
     the label token held at 12, and every heading step scaled down by the same
     14/17 ratio to whole pixels so the ladder stays consistent. This overrides
     the catalogue's "never below 14px" floor that used to govern the cell — a
     disagreement the block below flagged for Keith, now settled by him at 13. */
  --fs-hero: 46px;         /* hero-display  600 / 1.07 / -0.28px  */
  --fs-display-lg: 33px;   /* display-lg    600 / 1.10 / 0        */
  --fs-display-md: 28px;   /* display-md    600 / 1.47 / -0.374px */
  --fs-lead: 23px;         /* lead          400 / 1.14 / 0.196px  */
  --fs-lead-airy: 20px;    /* lead-airy     300 / 1.50 / 0        */
  --fs-tagline: 17px;      /* tagline       600 / 1.19 / 0.231px  */
  --fs-button-large: 15px; /* button-large  300 / 1.00 / 0        */
  --fs-body: 14px;         /* body          400 / 1.47 / -0.374px */
  --fs-caption: 13px;      /* caption       400 / 1.43 / -0.224px — the cell/list floor */
  /* `nav-link` 12px IS on the house hierarchy — "badges, nav items,
     micro-labels" — and 12px is the absolute floor Keith set. IT IS DECLARED
     AND NOT USED ANYWHERE IN SGE, deliberately.

     The two documents disagree about this one slot. The Enterprise Application
     Pattern Catalogue r2, 16.5 tier 1, says of SGE specifically: "Body and
     table text never below 14px at any width", and gives its reason as field
     use — "bright sun, dust and arm's length". test/shell-type-floor.test.js
     holds every shell rule to that. A nav pill, a role chip and a badge in this
     application are read on a phone on a factory floor, not on a marketing
     page, so 14px is the number that survives both: the house floor is 12 and
     nothing here goes under 14, which breaks neither. Flagged in the report as
     a live disagreement for Keith rather than settled quietly either way. */
  --fs-label: 12px;        /* nav-link      400 / 1.00 / -0.12px  — labels only */
  /* THE ONE SIZE THAT IS A FUNCTION, NOT A LOOK. A text input below 16px makes
     mobile Safari zoom the page the moment it is focused, throwing away the
     layout the person is halfway through. This used to ride on --fs-body (17px),
     but Keith brought body down to 14px on 27 August 2026, which is under the
     threshold — so the guard gets its own token, off the display scale, held at
     the 16px the zoom behaviour actually requires. Used only where a finger taps
     into a field on a phone (the approvals note, the quote-request fields). */
  --fs-input-touch: 16px;

  --ls-body: -0.374px;
  --ls-caption: -0.224px;
  --ls-label: -0.12px;
  --ls-tagline: 0.231px;

  /* ---- THE TABLE TYPE FLOOR, IN ONE PLACE ----------------------------------
     Enterprise Application Pattern Catalogue r2, section 16.5, tier 1:
     "Body and table text never below 14px at any width" — the reason given is
     field use, "bright sun, dust and arm's length". Section 13.9 tier 1 puts
     every size in a token rather than in the rule that happens to need it.

     So: ANY text that can be painted inside a <td> or a <th> — the cell, its
     column heading, a status pill in it, a card's field label on a phone — is
     written against one of these two and NEVER against a smaller literal. They
     are the only sizes below 0.9rem that may appear in a table rule.

     16.5 also settles what to do when the larger type stops fitting: "space is
     bought by removing content, not by shrinking type" — fewer columns at that
     width under 16.4, never a smaller font.

     AND THE HOUSE STYLE AGREES WITH THE CATALOGUE ON THE NUMBER. The design
     document splits every screen into two regions and gives each its own token:
     a DATA region — a table, a list, metadata, a figure, anything scanned rather
     than read — is `caption`, 14px / 400 / 1.43 / -0.224px. Both tokens below
     are therefore exactly 14px, not 14.4px: "font sizes are integer pixels" is
     a constraint in that document, and 0.9rem was 14.4. */
  --t-cell: var(--fs-caption);      /* 13px — the body of a data cell (Keith, 27 Aug 2026) */
  --t-cell-min: var(--fs-caption);  /* 13px — THE FLOOR: headings, pills, labels */

  /* ---- THE SAME FLOOR, FOR THE APPLICATION SHELL --------------------------
     16.5 tier 1 is not a rule about tables. A nav item, a menu item, a button
     and a filter control are read and tapped in the same bright sun, dust and
     arm's length as a cell is, so they take the same 14px. It is an alias
     rather than a second number on purpose: if the floor ever moves, it moves
     in ONE place and the shell cannot drift away from the table.

     What this governs: the pill bar and its dropdowns, the account menu, the
     compact rail and sheet, the record header's primary action and its
     overflow, and every control on the filter bar.

     16.5 also settles what to do when the larger type stops fitting on a bar:
     "space is bought by removing content, not by shrinking type" — fewer
     things on the bar, or an overflow control. Never a smaller font, and
     never a shorter label, because a label is wording and wording is
     Keith's. */
  --t-ui-min: var(--t-cell-min);

  /* ---- THE TOUCH TARGET, IN ONE PLACE --------------------------------------
     Catalogue 16.6 tier 1, "Every interactive target at least 44 x 44px on
     touch", citing build standard BS-001 rule V8. 16.1 puts a 12.9-inch iPad
     in landscape inside the EXPANDED band — so the floor is not a phone rule
     and does not belong inside a media query. The medium and compact bands
     already held it; expanded is where it had been skipped. */
  --tap: 44px;

  /* ---- THE TWO RESERVES ASK KATE'S BUBBLE NEEDED ARE GONE WITH THE BUBBLE ---
     17 September 2026. `--kate-clear` held the bubble's height at the foot of
     every scrolling list box, and `--kate-corner` held its width beside every
     band that stood below one — the pager, a column footnote, a page-level
     action row — because the bubble was `position: fixed` in the bottom-right
     corner of every page and no scroll on those screens could move content out
     from under it.

     KEITH MOVED HER INTO THE APP BAR — "tonight's decision", the same day —
     so nothing floats over the page any more and there is nothing left to
     clear. Both custom properties and the four rules that read them are
     removed rather than zeroed: a reserve for a control that does not exist is
     dead space, and dead space is the thing the shell pass exists to remove. */

  /* legacy aliases used across the markup */
  --border: var(--line);
  --error: var(--red);
}

/* ---- THE DARK THEME ------------------------------------------------------
   The document's dark tiles, verbatim: a true black ground and near-black tile
   panels. It follows the operating system setting and nothing else — there is
   no toggle, because the document says the theme follows the OS.

   Only the SOURCE tokens are restated. Everything that reads --paper, --ink,
   --muted and the rest is an alias declared above in terms of these, so the
   whole application follows from this one block without a single screen rule
   being written twice. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --panel: #272729;
    --panel-2: #2a2a2c;
    --panel-3: #252527;
    --line: rgba(255, 255, 255, 0.12);
    --line-soft: rgba(255, 255, 255, 0.12);
    --t1: #ffffff;
    --t2: #cccccc;
    --t3: #98989d;
    --accent: #2997ff;
    /* On near-black tiles the AA-clearing direction is LIGHTER, which is the
       document's own reasoning for its two dark fixes. DERIVED BY WORKER;
       6.15:1 worst case on panel-2, measured by scripts/shell-contrast.mjs. */
    --accent-deep: #5aafff;
    /* The document: the dark focus ring is `accent` #2997ff, not #0071e3,
       "which measures 3.17:1 on panel — too close to the 3:1 minimum to trust". */
    --accent-focus: #2997ff;
    --success: #5FD68A;
    --warning: #EFA34A;
    --danger: #F0796F;
    /* The same two relationships on black: the well is the document's own
       panel-3 recessed fill, and the field border is more than twice the
       opacity of the section rule above it, so it is visibly darker there in
       the direction dark makes "darker" mean — more contrast against the
       panel, not less. */
    --field-bg: #252527;
    --field-line: rgba(255, 255, 255, 0.30);
  }
}

* { box-sizing: border-box; }

/* THE PAGE DOES NOT MOVE SIDEWAYS WHEN THE SCROLLBAR ARRIVES.
   KEITH, 6 September 2026, on the account record: "Whcih i click on activity and
   contact. the whole accoutn content will shift left and right".

   Four of the account's tabs are long enough to scroll and three are not, so a
   classic scrollbar appeared on some and not on others; the content column is
   CENTRED, so half the scrollbar's width moved the whole page under the reader.
   Measured on the working tree before this rule: `main.frame` at x=57 on the
   Activity tab and x=64 on Contacts, at 1512x950 — a 7px shift, which is exactly
   what he described (`node scripts/w1745-shots.mjs`, and
   `node scripts/w1745-scroller-probe.mjs` for the two side by side).

   THE ROOT ELEMENT IS THE SCROLLER on every screen in SGE — nothing sets
   `overflow` on html or body, and the inner scrollports (.acct-scroll and the
   like) scroll their own content, not the page. So the gutter is reserved here,
   ONCE, rather than per page: the space is always held, whether the page is long
   enough to need it or not, and the left edge is the same on every tab of every
   record. Browsers without `scrollbar-gutter` ignore the line and behave exactly
   as they did; browsers drawing OVERLAY scrollbars reserve nothing, because an
   overlay scrollbar takes no layout width to begin with. */
html { scrollbar-gutter: stable; }

/* THE PAGE GROUND, THE FACE AND THE DEFAULT TYPE REGION.
   SGE is a dense operational application, so its DEFAULT region is the data
   one: `caption`, 14px / 400 / 1.43 / -0.224px. Reading regions — a page lede,
   an explanatory paragraph — take `body` at 17px where they are named below.
   Which region each individual screen's paragraphs belong to is a screen-by-
   screen judgement and is deliberately not made here. */
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: var(--fs-caption);
  line-height: 1.43;
  letter-spacing: var(--ls-caption);
  background: var(--bg);
  color: var(--t1);
  -webkit-font-smoothing: antialiased;
}

/* A LINK IS THE ONE ACCENT, and the document's hover rule for a link is that
   "underline appears on hover if not already present". */
a { color: var(--accent); text-decoration-color: var(--accent-rule); }
a:hover { color: var(--accent-deep); text-decoration: underline; }

/* display-md and body-strong, verbatim. 500 is deliberately absent from the
   house weight ladder — a mid-weight reading is 600. */
h1 { font-weight: 600; font-size: var(--fs-display-md); line-height: 1.47; letter-spacing: var(--ls-body); }
h2 {
  font-weight: 600; font-size: var(--fs-body); line-height: 1.24; letter-spacing: var(--ls-body);
  margin: var(--sp-lg) 0 var(--sp-xs); color: var(--t1);
}

/* ---- auth card (login) ---- */
.card {
  background: var(--panel);
  padding: var(--sp-xl) var(--sp-lg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  width: min(360px, 92vw);
}
/* THE MARK IS THE CARD'S MASTHEAD, NOT THE PAGE'S. Keith, 27 August 2026,
   looking at sign-in on a phone: the logo sat on the grey page above the card,
   attached to nothing. It is now the first thing INSIDE the card (src/app.js,
   the 'auth' variant of page()), so it takes the same left edge as the wordmark
   and the fields under it, and one spacing step of air beneath it. */
.card > .logo-auth { margin: 0 0 var(--sp-md); }
.card h1 { margin: 0 0 var(--sp-xxs); font-size: var(--fs-display-md); }
/* A READING REGION — one sentence a person reads, so it takes `body` at 17px. */
.sub {
  margin: 0 0 var(--sp-lg); color: var(--t3);
  font-size: var(--fs-body); line-height: 1.47; letter-spacing: var(--ls-body);
}

/* THE TICK AND ITS WORDS ARE ONE ROW (Keith, 27 August 2026: the checkbox "sits
   badly" against a label that wrapped to two lines). Two things were wrong and
   both are fixed here rather than by hoping the words stay short: the tile ran
   only as wide as its own sentence while every other control in the card is
   full width, and the native box was left at its 13px default beside text set
   on a 1.43 line — small enough that centring it against a two-line label put
   it level with nothing. The box is sized to the text, the gap is a spacing
   token instead of the tile's default 0.45rem, and the row carries the same
   step of air under it that a field does. */
.card label.otile {
  width: 100%;
  margin: 0 0 var(--sp-md);
  gap: var(--sp-sm);
  align-items: center;
}
.card label.otile > input[type="checkbox"] {
  width: 18px; height: 18px; flex: 0 0 auto;
}
.card label.otile > span { line-height: 1.43; }

/* A LABEL IS DARKER AND HEAVIER THAN THE HELP BESIDE IT — Keith, 17 September
   2026, in the same breath as "fields are so blended in". A form's helper line
   is `.muted`, which is --t3; the label was --t2, one step above it, and at a
   glance the two read as the same weight of thing. The label takes --t1, the
   ink the page's own headings use, so the question is plainly the question and
   the sentence under it is plainly a note. The weight is unchanged at 600 —
   already heavier than the 400 a helper line carries. */
label {
  display: block;
  margin-bottom: var(--sp-sm);
  font-size: var(--fs-caption);
  line-height: 1.29;
  letter-spacing: var(--ls-caption);
  color: var(--t1);
  font-weight: 600;
}

/* ---- A FORM GROUP IS A HEADING AND A THIN RULE ----------------------------
   SGE-BUILD-2026-08-28.md, Task 5. Keith, looking at Log Activity: it "looks
   very messy", and he asked for ruled lines instead of boxes.

     "A box means 'you can tap this.' A list row, a tile, a record. Nothing
      else gets a border. A section is a heading and a thin rule. No border,
      no legend sitting on a border line."

   A fieldset's browser default is a border with the legend notched into its
   top edge, so a form of four questions came out as four framed panels with
   four labels sitting ON four lines. The border goes here, in the base rule,
   rather than screen by screen — the Log Activity stylesheet had already done
   it for one screen (public/log-activity.css) and every other form in SGE was
   still boxed.

   THE LEGEND ELEMENT STAYS IN THE MARKUP and is drawn as the heading. It is
   what names the group to a screen reader; replacing it with an <h3> would
   take the accessible name off every radio group in SGE for a change nobody
   can see. So what the task calls for — a heading, and a 1px rule under it —
   is what renders, and the element carrying it is still <legend>.

   `min-width: 0` because a fieldset's default `min-width: min-content` stops
   a grid or flex child inside it from ever shrinking. */
fieldset {
  border: 0;
  border-radius: 0;
  margin: 0 0 var(--space-lg);
  padding: 0;
  min-width: 0;
}
legend {
  display: block;
  width: 100%;
  padding: 0 0 var(--space-xxs);
  margin: 0 0 var(--space-sm);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-caption);
  font-weight: 600;
  line-height: 1.29;
  letter-spacing: var(--ls-caption);
  color: var(--t1);
}

input, select, textarea {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  /* THE TAP FLOOR, ASSERTED WHERE THE FIELD IS DEFINED. This rule set the shape
     of every field in SGE and carried no minimum height, so padding plus a
     0.95rem line came out at 29-30px and every control that DID reach the floor
     did it with its own `min-height: var(--tap)` at the call site — there were
     more than twenty of those. Pass 3's "done when" asks for 44px on every
     interactive target; putting it here is the same move §2.1 asks for on
     colour, "change the tokens, not the call sites". The existing call-site
     overrides now agree with the base rather than rescuing it.

     A CHECKBOX AND A RADIO ARE EXEMPT. They are not fields that hold typing,
     they are glyphs pressed through the label wrapped round them, and that
     label is the box a thumb has to hit — which is why the grid check reports
     them as COVERED. Blowing the glyph itself up to 44px would wreck the
     approval queue's tick column and the option tiles, both of which size the
     control deliberately (see the note at `td.apr-tick` below). */
  padding: var(--sp-xs) var(--sp-sm);
  font-size: var(--fs-caption);
  line-height: 1.43;
  letter-spacing: var(--ls-caption);
  font-family: inherit;
  color: var(--t1);
  /* An input is a WELL, and on a near-white page it has to LOOK like one: the
     fill is a step below the page ground and the border is visibly darker than
     the rule that separates one section from the next. Both are tokens (see
     --field-bg / --field-line in the block at the head of this file) so this is
     the only rule in SGE that says what a field looks like. Until 28 August
     2026 this was panel-3 on light, which aliases panel-2 (#fafafc) — a 5-point
     step off white, invisible on a card, which is the fault Task 5 names. */
  background: var(--field-bg);
  border: 1px solid var(--field-line);
  border-radius: var(--r-sm);
}
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  min-height: var(--tap);
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

/* ---- SIZED TO WHAT IT HOLDS ----------------------------------------------
   KEITH, 17 September 2026: "must it cover the whole width of the page". The
   caps are the tokens at the head of this file and the reasoning is written
   there. SET ONCE, HERE, so no screen has to size its own fields — which is the
   other half of what he asked for, "shared styles, not per page".

   THE WIDEST SINGLE-LINE FIELD STOPS AT A READING WIDTH. Everything narrower is
   named by what it holds. A checkbox and a radio are glyphs and are left alone;
   a textarea is multi-line and is left alone.

   AND THE NAMED CAPS HAVE TO BE ABLE TO WIN, WHICH UNTIL NOW THEY COULD NOT.
   The first rule was written `input:not([type="checkbox"]):not([type="radio"])`,
   and a `:not()` carries the weight of what is inside it — two attribute
   selectors — so the general rule stood at (0,2,1) and every named type below it
   at (0,1,1). It out-weighed all three of them whatever the order, and the date,
   number, tel and url caps had never once applied to a field on a screen.
   MEASURED, on the tree as it stood: the two date boxes on /report drew 544px
   each — the reading cap, 34rem — where --fw-date asks for 176px, and the phone
   field on /projects/new drew 544px where --fw-medium asks for 320px
   (node scripts/w-b9-control-width-probe.mjs --tag before).

   `:where()` is the fix and it is one word: it matches exactly as `:not()` did
   and contributes NOTHING to specificity, so the general rule falls to (0,0,1) —
   a bare element — and each named type, at (0,1,1), wins the way it was always
   written to. No cap changes value; the ones that were being ignored start
   applying.

   A SLIDER IS NAMED HERE FOR THE FIRST TIME. It is not a field that holds
   typing, it is a control pulled along a track, and a reading width is meaningless
   for it: Settings drew eight of them at 544px apiece in a 1337px page. It takes
   the medium width, which is the widest any control needs before it stops being
   sized to what it holds. */
input:not(:where([type="checkbox"], [type="radio"])) { max-width: var(--fw-reading); }
/* AND THE MULTI-LINE BOX IS NOT AN EXCEPTION AFTER ALL — 25 September 2026.
   "a textarea is multi-line and is left alone" above is the one line of this
   block that Keith has contradicted in as many words. On the activity record:
   "the comment box runs the full page width while the fields above it use a
   quarter." It is the same shape everywhere a form has one — measured on
   /leads/new before this rule with
   `node docs/2026-09-25-sge-fault-fixes/probe/reproduce.mjs A4`: Inquiry detail
   1337px against 544px for the three text boxes directly above it, two and a
   half times their width on the same screen.
   IT TAKES THE READING CAP, which is the very thing it holds — free text — and
   is the same 34rem the widest single-line field takes, so a free-text box now
   ends level with the name box above it instead of running to the window's
   edge. Multi-line is about HEIGHT; being multi-line was never a reason to be
   wider than a line of reading. `rows` still decides the height and no screen
   loses a line.
   NOT A FIXED WIDTH. `max-width`, like every cap above it, so inside a narrow
   card or a phone column the box is still the column's width. */
textarea { max-width: var(--fw-reading); }
input[type="date"], input[type="month"], input[type="week"], input[type="time"] { max-width: var(--fw-date); }
input[type="number"] { max-width: var(--fw-short); }
input[type="tel"], input[type="url"] { max-width: var(--fw-medium); }
input[type="range"] { max-width: var(--fw-medium); }

/* A DROPDOWN HOLDS ITS LONGEST OPTION — Keith's words, and `width: auto` is the
   browser's own way of saying exactly that: a select measures its options and
   takes what they need. `max-width: 100%` keeps a long option inside its cell
   rather than spilling out of it, and the floor stops a two-letter list drawing
   a control too small to press. */
select {
  width: auto;
  min-width: var(--fw-short);
  max-width: 100%;
}

/* ---- AND THE DROPDOWN IS SGE'S, NOT THE PLATFORM'S -----------------------
   ROW 79 — "Native browser widgets showing through: date inputs, selects, and
   the grey 'Please fill in this field' validation tooltip." The date half was
   answered on 18 September 2026 by SGE's own date field; this is the select
   half, and it is answered THE SAME WAY Keith settled that one ("Go with
   Option 3"): SGE draws the control, and the platform keeps the picker. A date
   box became SGE's own text field with the calendar picker kept; a select
   becomes SGE's own closed control with the option list kept. The list itself
   is drawn by the operating system, above the page, and no stylesheet can
   reach it — the honest half of this row, and the half a person only sees
   while the list is open.

   WHAT ACTUALLY CHANGES. Until now the closed select carried macOS's blue
   double-arrow capsule (or Windows' grey square), a widget in another system's
   visual language sitting inside a field SGE had already dressed. It now
   carries the SAME CHEVRON every disclosure in SGE turns — the one outlined
   chevron drawn by src/lists.js chevronSvgHtml, path and all — so a dropdown
   looks like the rest of SGE rather than like the machine it is opened on.

   IT INVENTS NO COLOUR. The stroke is %236e6e6e, which is --t3, the same
   token .filter-caret takes. It is written out because a data URI cannot read
   a custom property; it is not a new value.

   A MULTI-LINE SELECT IS EXEMPT AND SAYS SO. `[multiple]` and a `size` above
   one are LIST BOXES, not dropdowns: they have no closed state and no arrow to
   replace, and a chevron painted into the corner of one would sit over its
   options. SGE draws three (src/campaigns/render.js:1504, :1509 and
   src/challenges/setup-render.js:143) and all three keep the platform's own
   list, which is the right control for them. */
select:not([multiple]):not([size]) {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236e6e6e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.25 8 10.25 12 6.25'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--sp-xs) center;
  /* SIZED IN em, NOT PIXELS. Gate 2 forbids raw-px spacing, and the mark is
     better for it: a chevron measured against the control's own text grows and
     shrinks with it instead of drifting out of proportion at another size. */
  background-size: 1em 1em;
  /* Room for it, so the longest option stops short of the chevron rather than
     running underneath it. */
  padding-right: calc(var(--sp-xs) * 2 + 1em);
}
/* A DISABLED DROPDOWN IS NOT PRESSABLE AND MUST NOT LOOK IT — the chevron is
   an invitation, so it goes when the control cannot be opened. */
select:disabled { background-image: none; padding-right: var(--sp-sm); }

/* ---- A FILTER APPLIES WHEN IT IS CHOSEN ----------------------------------
   ROW 172 — one filter pattern everywhere, and the fourth of the four Max
   named was dropdown-plus-Apply: a lone control with a button beside it that
   had to be pressed before the choice counted.

   public/list-filters.js writes `data-auto-applied` on a form once it has
   taken the submitting over, and this is the rule that then puts the button
   away. IT IS DELIBERATELY KEYED ON THE SCRIPT'S OWN MARK and not on the
   form's class: with script off the attribute is never written, the rule never
   applies, and the button is there and does exactly what it always did. A
   control that is the only way to apply a filter is never hidden. */
form[data-auto-applied] > button[type="submit"] { display: none; }

/* ---- AND THE REFUSAL IS SGE'S TOO ----------------------------------------
   The third native widget row 79 names: the grey "Please fill in this field"
   bubble. public/field-validation.js takes it off the screen and writes the
   same refusal here instead — on its own line under the field, so a wrong
   answer never shoves the control sideways, in the danger colour the rest of
   SGE uses for the same thing.

   THIS IS THE DATE FIELD'S SHAPE, NOT A SECOND ONE. Every value below is the
   value .dfield-msg already uses (public/date-field.css); the two differ only
   in that this one is created by script, on a field that has no wrapper of its
   own to sit in, so it is a block rather than a flex child. */
.fld-msg {
  display: block;
  margin: var(--sp-xxs) 0 0;
  color: var(--danger);
  font-size: var(--fs-caption);
  line-height: 1.43;
  letter-spacing: var(--ls-caption);
}
.fld-msg[hidden] { display: none; }

/* And the field itself says it is the one that is wrong. `.dfield-wrong` does
   the same for the date box. */
input.fld-wrong, select.fld-wrong, textarea.fld-wrong { border-color: var(--danger); }

/* AND THEY SIT IN A ROW, LEFT-ALIGNED, with the rest of the width left alone.
   `.field-row` is the one class a form uses to put fields beside each other;
   before this, a form had no way to do it and every field went on a line of its
   own down a narrow left column with the page empty beside it. */
.field-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-sm) var(--space-lg);
}
.field-row > label { flex: 0 1 auto; margin-bottom: 0; }
/* ONCE THE ROW STOPS BEING A ROW, "SIZED TO ITS CONTENT" IS A RAGGED EDGE.
   The rule above is Keith's own — "must it cover the whole width of the page" —
   and it is right for a row: a control takes the width its content needs and
   the rest of the line is left alone. What it was never asked to do is stack.
   MEASURED on /report at 390x844 on 22 September 2026: From, To and Salesperson
   all start at x 29 and end at 283.6, 266.7 and 202 — three different right
   edges down one column — and Go sat at x 297.8..361, 95.8px clear of the field
   it applies to, because the bottom-right action rule pushed it to the end of a
   line the fields no longer reached.
   Below the phone breakpoint a wrapped field takes the whole line, so the three
   boxes share one right edge and Go lands directly under them, still in the
   bottom-right corner Keith put it in. Above it the row fits on one line and
   both rules go on doing the job they were written for. */
@media (max-width: 767px) {
  .field-row > label { flex: 1 1 100%; }
}

/* ---- AND A FIELD HAS A REAL EDGE -----------------------------------------
   KEITH, on the proposal form: "fields are so blended in". The fill and the
   border are already tokens (--field-bg / --field-line at the head of this
   file) and the base rule above is the only place that says what a field looks
   like, so the edge is strengthened THERE and nowhere else. What is added here
   is the other two states the instruction names.

   HOVER, so a field answers the pointer before it is pressed — the same "which
   one am I on" job hover does for a list row.

   THE FOCUS RING is `:focus-visible` and is already declared once, for every
   focusable thing in SGE, in the Interaction States block at the foot of this
   file: 2px solid --accent-focus at 2px offset. Nothing is added for it here,
   because a second ring rule is how two rings end up disagreeing. The border
   still steps to the accent on plain :focus, so a pointer user keeps a signal
   without a ring being left behind by a mouse press. */
input:hover:not([disabled]):not([readonly]),
select:hover:not([disabled]),
textarea:hover:not([disabled]):not([readonly]) {
  border-color: var(--t3);
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }

button {
  width: 100%;
  /* Same floor, same reason. A button is the least arguable tap target there
     is and this one measured 27px — Save, Record and Mark lost all came off
     this rule. `.btn-inline` and the other button variants below override the
     padding and the colour but not the height, so they inherit the floor. */
  min-height: var(--tap);
  /* The document's button padding: 8–11px vertical, 15–22px horizontal. */
  padding: 11px 22px;
  font-size: var(--fs-caption);
  line-height: 1.29;
  letter-spacing: var(--ls-caption);
  font-family: inherit;
  font-weight: 600;
  color: var(--on-accent);
  background: var(--accent-fill);
  border: none;
  border-radius: var(--r-pill);
  cursor: pointer;
}
button:hover { background: var(--accent-fill-hover); }

/* A CALLOUT IS A SURFACE AND A HAIRLINE, NOT A WASH.
   The house keeps colour for the accent and for verified state, so the state is
   in the TEXT and in the rule down the edge; the fill is the raised surface,
   which is the one thing that reads the same in both themes. */
.error {
  background: var(--panel-2);
  color: var(--danger);
  border-left: 4px solid var(--danger);
  padding: var(--sp-sm) var(--sp-md);
  border-radius: var(--r-md);
  font-size: var(--fs-caption);
  margin-bottom: var(--sp-md);
}

/* A warning, not a refusal — amber, and the form underneath still submits.
   Used by the duplicate-phone notice on the contact form. */
.warn {
  background: var(--panel-2);
  color: var(--t1);
  border-left: 4px solid var(--warning);
  padding: var(--sp-sm) var(--sp-md);
  border-radius: var(--r-md);
  font-size: var(--fs-caption);
  margin-bottom: var(--sp-md);
}
.warn p { margin: 0 0 0.35rem; }
.warn p:last-child { margin-bottom: 0; }
.warn ul { margin: 0 0 0.35rem; padding-left: 1.1rem; }

/* It worked, and here is what it did. Distinct from .error and .warn so a
   confirmation is never mistaken for either.
   PASS 2 §2.3: it was a tinted brown, and brown is the action colour. This is
   the one thing on the screen that says something GOOD has happened, so it
   takes the green — the same green .status-active and the day badges use. */
.notice {
  background: var(--panel-2);
  color: var(--t1);
  border-left: 4px solid var(--success);
  padding: var(--sp-sm) var(--sp-md);
  border-radius: var(--r-md);
  font-size: var(--fs-caption);
  margin-bottom: var(--sp-md);
}

/* ---- app frame v2: full-bleed header ---- */
body:has(.appbar) { display: block; }

/* THE HEADER FLOATS OVER THE PAGE, so it is the document's third and last kind
   of depth: backdrop blur. Not a shadow — the house has none at all — and not a
   solid bar either, because the page scrolling under a sticky bar is exactly the
   case the document names for blur. The `@supports` fallback is not optional:
   without it the bar renders at 80% opacity with no blur and the menu sits on
   whatever scrolls past. Both prefixes are required; installed PWAs are WebKit. */
.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(1px)) {
  .appbar { background: var(--bg); }
}
.appbar-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--sp-xs) var(--sp-lg);
}
/* The mark is a link home and is therefore a target (16.6 tier 1). It held the
   44px floor on a phone and at iPad width already; it was 25 x 38 at a desk,
   which the catalogue does not exempt. The mark itself is untouched — same
   asset, same height, no crop — it is centred inside the target it now fills. */
.logo-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--tap); min-height: var(--tap);
  flex-shrink: 0; line-height: 0;
}
.logo { height: 38px; width: auto; display: block; }
.logo-auth { height: 56px; }
/* THE PAGE'S NAME, AT THE TOP OF THE CONTENT AREA — KEITH, 29 August 2026: "The
   page naming can move to the top", pointing at his director's proposal builder,
   where the page is named in the top band of the content and its own controls sit
   directly underneath. The name used to sit inside the content, below this strip.

   IT IS THE PAGE'S OWN <h1>, lifted here by the shell (src/app.js, page() and
   hoistPageName) rather than a second copy of the name — so it says exactly what
   the screen used to say, once, in the same place on every screen.

   WRITTEN AGAINST THE TAG, not against `.headline`: a few screens draw their own
   heading class (`col-title`, `cap-name`, `pj-name`) and every one of them has to
   read the same at the top of the bar. `.page-name h1` out-weighs each of those
   single-class rules, so none of them has to be edited.

   `display-md` is the rung a list heading is already written at; nothing new is
   invented, and the strip keeps its 56px because 28px at 1.2 clears it. */
/* THE NAME AND ITS ENTITY ARE ONE PIECE OF TYPE — "Accounts · KMMY" — SO THEY
   SIT ON ONE BASELINE. Keith, 30 August 2026, going through SGE: the code sat
   above the line of the name beside it.

   WHY IT DID, AND WHY THIS IS THE FIX. They were two separate items of
   `.appbar-inner`, and that bar centres what it holds. Centring lines up the
   MIDDLES of two line boxes, and the middle of 14px type is above the baseline
   of 28px type — 5.22px above at 1440 and at 820, 0.97px at 390, measured in
   Chromium by scripts/w1462-rail-submenu-and-baseline.mjs.

   `align-items: baseline` on the BAR would have been the one-line answer and it
   is the wrong one: it would drag the mark, the Menu button and the account
   block onto that same baseline and flush the whole bar to its top edge. So the
   two are wrapped in one box instead. The BOX is what the bar centres — it sits
   exactly where the name sat — and the baseline is settled inside it, where it
   is nobody else's business.

   The gap is `--sp-md`, which is the gap `.appbar-inner` was already putting
   between them: this is a typographic fix and the pair does not move sideways. */
.page-id {
  display: flex; align-items: baseline; gap: var(--sp-md);
  min-width: 0; flex: 0 1 auto;
}
.page-name { min-width: 0; flex: 0 1 auto; }
.page-name h1 {
  margin: 0;
  font-size: var(--fs-display-md);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--t1);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* THE MARK IS A SOLID BLACK GLYPH ON TRANSPARENT, so on the dark ground it was
   simply not there — the header read as having no logo at all. It is
   monochrome, so inverting it is exact rather than approximate: black becomes
   white and nothing else changes. The asset on disk is untouched. */
@media (prefers-color-scheme: dark) {
  .logo { filter: invert(1); }
}

/* THE NAV CAPSULE — a surface step above the bar it sits on, which is the only
   kind of depth this house has for something that does not float. */
.navbar {
  display: flex;
  /* Every pill stays VISIBLE: wrap to a second line when the bar is full.
     The old horizontal-scroll-with-hidden-scrollbar silently pushed the tail
     (Guide) off-screen with no affordance that scrolling existed. */
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2px;
  margin: 0 auto;
  padding: var(--sp-xxs);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-pill); /* clamps to a soft capsule even at two rows */
}

/* `button-utility` — 14px / 400 / 1.29 / -0.224px, the document's own token for
   a "utility / nav button label". THE UPPERCASE AND THE WIDE TRACKING ARE GONE:
   the document's migration list names wide positive tracking as "the opposite of
   the house voice", and negative tracking at these sizes is the signature of the
   face. The WORDING is untouched — it was never the capitals that said it. */
.pill {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap); /* thumb-sized tap target */
  padding: 0 var(--sp-md);
  background: transparent;
  border: none;
  border-radius: var(--r-pill);
  font-family: var(--font);
  font-weight: 400;
  font-size: var(--fs-caption);
  line-height: 1.29;
  letter-spacing: var(--ls-caption);
  color: var(--t2);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
/* Hover steps one surface level, which is the document's rule for a control. */
.pill:hover { color: var(--t1); background: var(--panel-2); }
/* WHERE YOU ARE takes the one accent. It is the single clearest statement on the
   bar and it is an interactive element, which is exactly what the accent is for. */
.pill.active { background: var(--accent-fill); color: var(--on-accent); font-weight: 600; }
.pill.active:hover { background: var(--accent-fill-hover); color: var(--on-accent); }

/* No margin-left:auto here — the nav capsule's own `margin: 0 auto` already
   distributes the free space EQUALLY on both sides, so the gap between the logo
   and the capsule matches the gap between the capsule and the identity block. */
.nav-right { display: flex; align-items: center; gap: var(--sp-sm); flex-shrink: 0; }
.identity { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
/* Who is signed in, and as what. The role was 0.62rem — 9.92px, the smallest
   text anywhere in SGE — and it is the one word on the screen that says which
   of three permission sets is in force. The letter-spacing is what keeps it
   reading as a label beside the name; none of that rested on it being small.
   The identity block stacks, so the two lines are set a step apart by weight
   and colour rather than by size. */
.id-name {
  font-size: var(--fs-caption); font-weight: 600; line-height: 1.29;
  letter-spacing: var(--ls-caption); color: var(--t1);
}
/* THE ROLE IS A LABEL. The house token for one is `nav-link` at 12px, and it is
   NOT used: the catalogue's 14px shell floor governs SGE (see --fs-label). The
   capitals are GONE — Keith, 13 September 2026: "Strip the Foreced Capital".
   The weight and the colour are what tell a permission set apart from a
   person's name standing beside it. */
.id-role {
  font-size: var(--fs-caption); font-weight: 400; line-height: 1.29;
  letter-spacing: var(--ls-caption); color: var(--t3);
}

.nav-logout { flex-shrink: 0; }
.nav-logout button.pill, .pill-outline {
  width: auto;
  min-height: var(--tap);
  background: transparent;
  border: 1px solid var(--line);
  color: var(--t2);
  cursor: pointer;
  font-size: var(--fs-caption);
  font-weight: 400;
}
.nav-logout button.pill:hover { background: var(--panel-2); border-color: var(--line); color: var(--t1); }

/* ---- THE ENTITY, IMMEDIATELY AFTER THE PAGE NAME -------------------------
   Keith, 30 August 2026. "Accounts · KMMY". One entity is a STATEMENT and two
   or more is a CONTROL, and the difference is drawn rather than described: the
   mark has no hover, no chevron and no tap floor, so nothing about it invites a
   press it would not answer.

   The middot is the separator and it is drawn by ::before rather than typed
   into the markup, so the page name and the entity stay two elements that can
   be read, ellipsised and inspected independently. */
.entity-mark {
  display: inline-flex; align-items: baseline; gap: var(--sp-xs);
  min-width: 0; flex: 0 0 auto;
  font-size: var(--fs-body); color: var(--t2);
}
.entity-mark::before { content: "\00B7"; color: var(--t3); }
/* AND THE SEPARATOR ONLY SEPARATES. It joins the entity to the page name beside
   it; with no page name there is nothing to join and a bare middle dot is left
   sitting at the head of the bar. hoistPageName (src/app.js) removes the name
   slot entirely on a screen that renders no <h1>, which is what a FORM CARD
   does — it names itself inside the card rather than in the bar, so the same
   word is not printed twice (A1, 17 September 2026). The entity is then the
   first child of `.page-id` and drops the dot. */
.page-id > .entity-mark:first-child::before { content: none; }
.entity-mark .entity-code { font-weight: 600; color: var(--t1); letter-spacing: 0.02em; }

/* TWO OR MORE: the same mark as a disclosure, and deliberately the account
   menu's own shape — a native <details>, no JavaScript, which is what SGE's
   Content-Security-Policy already requires of every menu it has. Each row is a
   CSRF form posting to /entity, so the choice never reaches a URL. */
.entity-menu { position: relative; flex: 0 0 auto; }
.entity-summary { list-style: none; cursor: pointer; }
.entity-summary::-webkit-details-marker { display: none; }
.entity-toggle {
  display: inline-flex; align-items: center; gap: var(--sp-xxs);
  min-height: var(--tap); padding: 0 var(--sp-xs);
  border-radius: var(--r-sm);
  font-size: var(--fs-body); color: var(--t2);
}
.entity-toggle::before { content: "\00B7"; color: var(--t3); margin-right: var(--sp-xxs); }
.entity-toggle:hover { background: var(--panel-2); }
.entity-toggle .entity-code { font-weight: 600; color: var(--t1); letter-spacing: 0.02em; }
.entity-caret {
  display: inline-flex; align-items: center;
  color: var(--t3); transition: transform var(--dur-fast) ease;
}
.entity-menu[open] .entity-caret { transform: rotate(180deg); }
.entity-panel {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 40;
  min-width: 232px; padding: var(--sp-xxs);
  display: flex; flex-direction: column; gap: var(--sp-xxs);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
}
.entity-form { margin: 0; display: block; }
.entity-item {
  display: flex; align-items: baseline; gap: var(--sp-xs); width: 100%;
  min-height: var(--tap);
  padding: var(--sp-xs) var(--sp-sm); border-radius: var(--r-sm);
  font-family: var(--font); font-size: var(--fs-caption); line-height: 1.29;
  letter-spacing: var(--ls-caption);
  color: var(--t1); text-align: left; text-decoration: none;
  background: transparent; border: 0; cursor: pointer;
}
.entity-item:hover { background: var(--panel-2); }
.entity-item .ei-code { font-weight: 600; min-width: 4.2rem; }
.entity-item .ei-name { color: var(--t3); font-size: var(--fs-caption); }
.entity-item.on { background: var(--accent); color: var(--on-accent); }
.entity-item.on .ei-name { color: var(--on-accent); opacity: 0.82; }
.entity-sep { border: 0; border-top: 1px solid var(--line-soft); margin: var(--sp-xxs) 0; }

/* MONEY ON ALL ENTITIES: one line per currency, never one number. There is no
   conversion in SGE and no total across two currencies — src/entities/money.js
   says why at length — so a cell holding two books' figures holds two lines. */
.entity-money-multi { display: block; }
.entity-money-line { display: block; white-space: nowrap; }

/* WHY "NEW ACCOUNT" IS NOT THERE. On All entities a record cannot be created,
   because a record belongs to exactly one entity and the server does not know
   which. The button is not drawn and this stands in its place, so the absence
   reads as a rule rather than as a missing control. The refusal itself is on
   the server (src/auth/scope.js canCreateInEntity); this is only the notice. */
.entity-blocked-note {
  display: inline-flex; align-items: center; min-height: var(--tap);
  padding: 0 var(--sp-sm);
  font-size: var(--fs-caption); letter-spacing: var(--ls-caption); color: var(--t3);
}

/* THE TICK LIST ON A PERSON'S ADMIN RECORD — Keith, 30 August 2026: users are
   tagged to entities on the Admin screen, a tick list on each person's record.
   Deliberately the Columns pane's own shape, so a director who has used one has
   used both: a tick per row, the rows in the register's order, one Save. */
.entity-ticks {
  display: flex; flex-direction: column; gap: var(--sp-xxs);
  margin-bottom: var(--sp-sm);
}
.entity-tick {
  display: flex; align-items: center; justify-content: flex-start; gap: var(--sp-xs);
  min-height: var(--tap); margin: 0;
  padding: var(--sp-xs) var(--sp-sm); border-radius: var(--r-sm);
  font-size: var(--fs-body); font-weight: 400; line-height: 1.43;
  letter-spacing: var(--ls-body); text-transform: none;
  color: var(--t1); cursor: pointer;
}
/* The base `input` rule is display:block;width:100%, which would stretch the box
   across the row and push the words to the far side. The filter pane's tick
   resets it the same way (.fmulti-row above) — this is that reset, not a new one. */
.entity-tick input[type="checkbox"] {
  width: auto; min-height: 0; margin: 0; accent-color: var(--accent);
}
.entity-tick:hover { background: var(--panel-2); }
.entity-tick-code { flex: 0 0 auto; font-weight: 600; min-width: 4.2rem; }
.entity-tick-name { flex: 1 1 auto; min-width: 0; color: var(--t3); font-size: var(--fs-caption); }
.entity-ticks-form { margin: 0; }

/* ---- account menu (top-right): native <details> disclosure ---- */
.account-menu { position: relative; flex-shrink: 0; }
/* The summary IS the identity toggle. Strip the native disclosure triangle. */
.account-toggle {
  list-style: none;
  display: flex; align-items: center; gap: var(--sp-xs);
  min-height: var(--tap);
  padding: var(--sp-xxs) var(--sp-sm);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: transparent; cursor: pointer; user-select: none;
}
.account-toggle::-webkit-details-marker { display: none; }
.account-toggle:hover { background: var(--panel-2); }
.account-toggle .id-name { text-align: right; }
/* WHICH ROLE YOU ARE SIGNED IN AS, inside the menu — Keith took it off the
   button on 30 August 2026 ("just show MAX. And not the role or position") and
   this is where it went. A line of text, not a row you can press: no tap floor,
   no hover, and it sits above the things that ARE pressable. */
.account-role {
  margin: 0; padding: var(--sp-xs) var(--sp-sm);
  font-size: var(--fs-caption); font-weight: 400; line-height: 1.29;
  letter-spacing: var(--ls-caption); color: var(--t3);
}
.account-role strong {
  font-weight: 600; color: var(--t2);
}
.account-caret {
  font-size: var(--fs-caption); color: var(--t3);
  transition: transform var(--dur-fast) ease;
}
.account-menu[open] > .account-toggle .account-caret { transform: rotate(180deg); }
.account-menu[open] > .account-toggle { border-color: var(--accent); }

/* A DROPDOWN IS A PANEL AND A HAIRLINE. It carried a 30px drop shadow; the
   house has no shadows at all, so the surface step from the page to the panel
   and the one hairline round it are what lift it — and both work in either
   theme, which the shadow never did. */
.account-panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 40;
  min-width: 190px;
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--sp-xxs); gap: 2px;
}
.account-item {
  display: flex; align-items: center; width: 100%; text-align: left;
  min-height: var(--tap);
  padding: var(--sp-xs) var(--sp-sm); border-radius: var(--r-sm);
  font-family: var(--font); font-size: var(--fs-caption); font-weight: 400;
  line-height: 1.29; letter-spacing: var(--ls-caption);
  color: var(--t1); text-decoration: none;
  background: transparent; border: 0; cursor: pointer;
}
.account-item:hover { background: var(--panel-2); color: var(--accent); }
.account-sep { border: 0; border-top: 1px solid var(--line-soft); margin: var(--sp-xxs) 0; }
.account-logout { margin: 0; }
.account-logout-btn { color: var(--t2); }
.account-logout-btn:hover { color: var(--accent); }

/* ---- THE QUICK DOCK: ONE TAP TO LOG ACTIVITY, FROM ANYWHERE ---------------
   Keith, 27 August 2026: Log Activity "has to be very fast for the user to
   assess. Maybe one tap that goes there, you go in", and beside it "a quick
   access ... so that they can. Users can actually select what they want it to
   be there as well".

   ONE PIECE OF MARKUP, RENDERED TWICE, AND ONLY EVER ONE ON SCREEN:
     .qdock-bar  768px and up — in the app bar's right-hand block, top right at
                 iPad and desk width, in normal flow so it can never sit over
                 the page.
     .qdock-fab  up to 767px — floating at the BOTTOM RIGHT, inside the reach of
                 a thumb, which is the one corner of a phone a person holding it
                 one-handed can always reach.

   WHY THE PHONE COPY IS A SEPARATE ELEMENT rather than the same one moved:
   .appbar carries a backdrop-filter, and a backdrop-filter makes its
   descendants' `position: fixed` resolve against the BAR instead of against the
   window. A dock inside the bar cannot float at the foot of a phone.

   Every size here is a shell token; nothing is below the 14px body/13px data
   floor and no size is a fraction of a pixel. Every target is 44px. The shape
   is the house's one shape — a rectangle with rounded corners. */
/* ONE EVEN GAP ACROSS THE WHOLE RIGHT-HAND BLOCK — Keith, 29 August 2026:
   "The space between the Log Activity and quick access is not the same as the
   rest."

   He is reading four controls on one line — Log Activity, Quick access, the
   help "?" and the account button — and the first gap was 4px while the other
   two were 12px, because the first two live INSIDE .qdock-bar (gap: --sp-xxs)
   and the rest are siblings in .nav-right (gap: --sp-sm). Two containers, two
   scales, one line. The dock now takes the block's own gap, so the four
   controls are evenly spaced whichever container they happen to sit in. */
.qdock-bar { display: flex; align-items: center; gap: var(--sp-sm); flex-shrink: 0; }
.qdock-fab { display: none; }
.qdock-go {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: 0 var(--sp-md);
  background: var(--accent-fill); color: var(--on-accent);
  border: 1px solid transparent; border-radius: var(--r-md);
  font-family: var(--font); font-size: var(--fs-body); font-weight: 600;
  line-height: 1.29; letter-spacing: var(--ls-caption);
  text-decoration: none; white-space: nowrap;
}
.qdock-go:hover { background: var(--accent-fill-hover); color: var(--on-accent); }
.qdock-more { position: relative; }
.qdock-toggle {
  list-style: none;
  display: inline-flex; align-items: center; gap: var(--sp-xxs);
  min-height: var(--tap); min-width: var(--tap);
  padding: 0 var(--sp-xs);
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: transparent; cursor: pointer; user-select: none;
  /* KEITH, VERBATIM: "Body text minimum is 14px, absolute minimum 12px, whole
     pixels only. This is a hard constraint, not a preference. It came from me."
     Every word this dock draws is `body` — 14px — and not the 13px data token
     the surrounding shell uses for a scanned cell. */
  font-family: var(--font); font-size: var(--fs-body); font-weight: 400;
  line-height: 1.29; letter-spacing: var(--ls-caption); color: var(--t2);
  white-space: nowrap;
}
.qdock-toggle::-webkit-details-marker { display: none; }
.qdock-toggle:hover { background: var(--panel-2); color: var(--t1); }
.qdock-more[open] > .qdock-toggle { border-color: var(--accent); color: var(--t1); }
.qdock-more[open] > .qdock-toggle .account-caret { transform: rotate(180deg); }
.qdock-panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 40;
  min-width: 210px;
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  /* The gap rides the spacing scale (gate 2). The panels this one sits beside
     were written before the scale existed and keep their grandfathered 2px;
     new spacing takes the smallest token, which is 4px. */
  padding: var(--sp-xxs); gap: var(--space-xxs);
}
.qdock-item, .qdock-pick {
  display: flex; align-items: center; width: 100%; text-align: left;
  min-height: var(--tap);
  padding: var(--sp-xs) var(--sp-sm); border-radius: var(--r-sm);
  font-family: var(--font); font-size: var(--fs-body); font-weight: 400;
  line-height: 1.29; letter-spacing: var(--ls-caption);
  color: var(--t1); text-decoration: none;
}
.qdock-item:hover, .qdock-pick:hover { background: var(--panel-2); color: var(--accent); }
/* The way to change what is in here is the last line of it, set apart by a
   hairline and in the quieter tone — it is a setting, not a destination. */
.qdock-pick {
  margin-top: var(--sp-xxs); border-top: 1px solid var(--line-soft);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  color: var(--t3);
}
/* "VISITED RECENTLY", which used to be the head of the Accounts list — Keith,
   29 August 2026: "GO to Quick Access". The destinations above are the ones this
   person chose; these are accounts, so they are named as a group rather than
   left to read as five more menu items. */
/* 14px, not the 13px label token: Keith's floor of 28 August 2026 is that
   nothing in this dock goes under 14px, and test/log-activity-one-tap.test.js
   holds every rule in it to that. */
/* A group's own name in the dock is a section heading — sentence case, words
   unchanged (Keith, 5 September 2026). */
.qdock-group {
  margin: var(--space-xxs) 0 0; padding: var(--space-xxs) var(--sp-sm) 0;
  border-top: 1px solid var(--line-soft);
  font-size: var(--fs-body); font-weight: 600; letter-spacing: var(--ls-caption);
  text-transform: none; color: var(--muted);
}
/* A Malaysian company name is long and the panel is 210px, so it holds its one
   line and shortens rather than wrapping to three (Keith's standing rule on
   wrapping). The title carries the whole name for anybody who needs it. */
.qdock-recent { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

/* ---- QUICK ACCESS: THE CHOOSER (/quick-access) ---------------------------
   A tick per destination, in menu order, and two buttons. No boxes round the
   rows — a hairline between them, which is the rule this pass applied to the
   activity form as well. */
.qpick { margin: 0; }
.qpick-state { margin: 0 0 var(--sp-sm); }
.qpick-rows { display: flex; flex-direction: column; }
.qpick-row {
  display: flex; align-items: center; gap: var(--sp-sm);
  min-height: var(--tap); margin: 0; padding: var(--sp-xxs) 0;
  border-top: 1px solid var(--line-soft);
  font-size: var(--fs-body); line-height: 1.43; letter-spacing: var(--ls-body);
  color: var(--t1); cursor: pointer;
}
.qpick-row:first-child { border-top: 0; }
.qpick-row input[type="checkbox"] {
  width: auto; min-height: 0; margin: 0; accent-color: var(--accent);
}
.qpick-name { flex: 1 1 auto; min-width: 0; }
.qpick-foot {
  display: flex; align-items: center; gap: var(--sp-sm); flex-wrap: wrap;
  margin-top: var(--sp-lg);
}
.qpick-reset {
  width: auto; min-height: var(--tap); padding: 0 var(--sp-md);
  background: transparent; color: var(--t2);
  border: 1px solid var(--line); border-radius: var(--r-md);
  font-family: var(--font); font-size: var(--fs-body); font-weight: 400;
  line-height: 1.29; letter-spacing: var(--ls-caption); cursor: pointer;
}
.qpick-reset:hover { background: var(--panel-2); color: var(--t1); }

/* ---- grouped main nav: <details> dropdowns (same pattern as the account menu) ----
   The pill shape needs the summary laid out as a flex box, and `display` on a
   <summary> is not free: overriding it costs the element its native disclosure
   role in WebKit, and a screen reader then reads "Accounts" as plain text rather
   than as something that opens. That is why each of these summaries carries an
   explicit role="button" and an aria-expanded kept in step by
   public/account-menu.js — the announcement no longer depends on how the
   element happens to be laid out. Changing the display below is therefore safe;
   removing the role is not. */
.nav-group { position: relative; }
.nav-group-toggle {
  list-style: none;
  display: inline-flex; align-items: center; gap: var(--sp-xxs);
  min-height: var(--tap);
  padding: 0 var(--sp-md); border-radius: var(--r-pill);
  font-size: var(--fs-caption); font-weight: 400; line-height: 1.29;
  letter-spacing: var(--ls-caption);
  color: var(--t2); cursor: pointer; user-select: none; white-space: nowrap;
}
.nav-group-toggle::-webkit-details-marker { display: none; }
.nav-group-toggle:hover { color: var(--t1); background: var(--panel-2); }
.nav-group.active > .nav-group-toggle {
  background: var(--accent-fill); color: var(--on-accent); font-weight: 600;
}
.nav-group.active > .nav-group-toggle .account-caret { color: var(--on-accent); }
.nav-group[open] > .nav-group-toggle { color: var(--t1); }
.nav-group[open].active > .nav-group-toggle { color: var(--on-accent); }
.nav-group[open] > .nav-group-toggle .account-caret { transform: rotate(180deg); }

.nav-group-panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 40;
  min-width: 190px;
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--sp-xxs); gap: 2px;
}
.nav-group-item {
  display: flex; align-items: center; min-height: var(--tap);
  padding: var(--sp-xs) var(--sp-sm); border-radius: var(--r-sm);
  font-family: var(--font); font-size: var(--fs-caption); font-weight: 400;
  line-height: 1.29; letter-spacing: var(--ls-caption);
  color: var(--t1); text-decoration: none; white-space: nowrap;
}
.nav-group-item:hover { background: var(--panel-2); color: var(--accent); }
.nav-group-item.active { color: var(--accent); font-weight: 600; }
/* A DISABLED ITEM IS STILL READ, so it takes t3 and clears AA like every other
   text token. It used to take --faint #A6A092, which measured 2.4:1 on a card. */
.nav-group-disabled { color: var(--t3); cursor: default; display: flex; align-items: center; gap: var(--sp-xxs); }
.nav-group-disabled:hover { background: transparent; color: var(--t3); }
/* A badge. `nav-link` at 12px is the house token for one; the catalogue's 14px
   shell floor governs here instead (see --fs-label). */
.nav-soon {
  font-size: var(--fs-caption); font-weight: 400; line-height: 1.43;
  letter-spacing: var(--ls-caption);
  color: var(--t3); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 0 var(--sp-xs);
}

/* Guide "?" help icon, sitting quietly by the account menu. */
.nav-help {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap); border-radius: var(--r-pill);
  border: 1px solid var(--line); color: var(--t2); text-decoration: none;
  font-weight: 600; font-size: var(--fs-caption); flex-shrink: 0;
}
.nav-help:hover { background: var(--panel-2); border-color: var(--accent); color: var(--accent); }
.nav-help.active { background: var(--accent-fill); color: var(--on-accent); border-color: var(--accent-fill); }

/* ---- content frame: cards on the page ground ---- */
.frame {
  /* The document's container rule: data grids max ~1440px, margins absorb the
     rest. A page of PROSE keeps the cap — a record, a report, a form: a line of
     text that runs the whole width of a 1920px window is a line nobody can read
     the second half of without losing the first.
     THE CAP IS THE DOCUMENT'S OWN 1440, not the 1180 it used to be. Measured on
     29 August 2026 at a 1920px window, a 1180px frame left 254px of empty grey
     beside the Dashboard, the Report, Log Activity and Settings; and once the
     left rail stopped holding a column of its own (further down, "THE LEFT RAIL
     HOLDS NO SPACE"), the page it is centred in got 232px wider and that margin
     would have grown with it. Keith, 29 August 2026: "I thnk it's too much of
     wasted space for desktop view." A list is exempt from the cap altogether —
     see .frame.list-page below.

     AND THE CAP IS 1760, NOT 1440, SINCE 17 SEPTEMBER 2026. Keith, 19:57 +08,
     with a screenshot of the Dashboard at full window width: "There are many
     blank space on the top and the sides. can try to miximise the space so user
     can see more within the window."

     WHAT WAS MEASURED, by `node scripts/shell-space-probe.mjs`: in a 1920px
     window the Dashboard's content sat in 1408px between a 277px empty margin on
     the left and a 235px one on the right — 512px of window carrying nothing.
     The record page read the same. The list pages did not, because they are
     already exempt.

     WHY A CAP IS KEPT AT ALL, and why THIS number. Keith's own limit on the
     instruction: a very wide window must not stretch a line of text so long it
     is hard to read. 1760px is the widest the cap can be and still leave a
     margin at 1920 rather than running the page edge to edge, and it still
     stops a 2560px monitor from drawing a single line of prose across the whole
     screen. It buys the capped pages 320px, and on a record page that width
     goes to the table — measured 1408px wide before, 1728px after.
     It is a DIMENSION, not a gap: the spacing ladder governs the space between
     things, and the margins below are the ones that answer to it. */
  max-width: 1760px;
  /* THE TOP MARGIN IS ONE RUNG DOWN THE LADDER — the same 17 September
     instruction, the "top" half of it. 24px above the first thing on the page
     is a band the page cannot use; 12px (`--sp-sm`) is the next step down the
     ladder DESIGN.md sets and is still a clear separation from the app bar.
     Nothing is removed and no off-ladder value is invented.

     AND THE BOTTOM MARGIN IS THE SAME RUNG, SINCE 18 SEPTEMBER 2026 — the
     "foot" half of the same instruction, which that pass left at 48px. Keith,
     reviewing the Dashboard: "There is a blank band across the bottom of the
     page." Measured at 1440 before this change (command: node
     scripts/dash-bottom-probe.mjs): the last card ended at 997.3px and the
     document ran to 1062px — 64.7px of nothing, 48px of it this margin and
     17px the last section's separator (the rule below). Nothing stands in that
     band: Ask Kate's bubble used to float there and the reserve came off with
     her on 17 September. The page now ends the same distance from the foot of
     the document as it starts from the app bar, on the same rung of the
     ladder, and no off-ladder value is invented here either.

     THE PHONE IS NOT TOUCHED (the 720px block, further down): at that width a
     bottom bar and the dock stand in the band, and the clearance they are paid
     is what keeps the last row reachable. */
  margin: var(--sp-sm) auto var(--sp-sm);
  padding: 0 var(--sp-lg);
}
/* A LIST USES THE WIDTH IT IS GIVEN — Keith, 29 August 2026: "I thnk it's too
   much of wasted space for desktop view."

   Measured on /customers in a 1920px window at 09:12 on 29 August 2026, the
   content sat in 1180px with 254px of dead grey to the right of it and the rest
   to the left of the rail — a table of ten columns squeezed while a quarter of
   the screen showed nothing. A list is a data grid, which is precisely the case
   the document's own container rule exempts, so the cap comes off it and the
   list sits against the rail.

   IT IS THE LIST PAGES AND NOTHING ELSE. The `.list-page` class is set by the
   screens that draw a list of records, so a record page, a report and a form
   keep the reading measure they have always had. */
.frame.list-page { max-width: none; }

/* A SHALLOWER PAGE HEADER — Keith, 27 August 2026: roughly a third of the screen
   went before the first row. The whole type scale came down this pass, and the
   header's own bottom margin tightens with it, so the first row rises. */
.pagehead { margin: var(--sp-xs) 0 var(--sp-md); }
/* A micro-label above the headline. It was 11.52px, under the absolute floor;
   it comes to 14px rather than to the house's 12px `nav-link` slot, because
   some of what SGE prints here is a greeting rather than a label and the
   document's own rule for 12px is "Labels only — never prose." */
.eyebrow {
  margin: 0 0 var(--sp-xxs);
  font-size: var(--fs-caption);
  font-weight: 600;
  line-height: 1.29;
  letter-spacing: var(--ls-caption);
  color: var(--t3);
}
/* `display-lg` — 40px / 600 / 1.10 / 0. The biggest thing on the page and the
   only one entitled to that size; it comes down at the two narrow bands below. */
.headline {
  margin: 0 0 var(--sp-xs);
  font-size: var(--fs-display-lg);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.10;
  color: var(--t1);
}

/* ---- the record header (catalogue 3, tier 1) ----
   Identifiers on the left — the record's name and the status it is IN — and its
   ranked actions on the right. Underneath, on its own line, the way back and the
   quiet facts (a reference, a source, who it is assigned to). What was here
   before was the name and then one flat sentence of text links joined by "·",
   with the status filed as a row in a table further down the page. */
.recordhead .rh-top {
  display: flex; flex-wrap: wrap; align-items: flex-start;
  justify-content: space-between; gap: 0.5rem 1.5rem;
}
.recordhead .rh-id { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem; min-width: 0; }
.recordhead .rh-id .headline { margin: 0; }
.recordhead .rh-nav { margin: 0.55rem 0 0; }
.rh-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; flex: 0 0 auto; padding-top: 0.5rem; }
.rh-actions .inline-action { display: inline; margin: 0; }

/* ONE PRIMARY ACTION, and it is the only thing in the header wearing the accent
   fill (13.6: one primary action per screen, and a real hierarchy under it). */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; min-height: var(--tap);
  padding: 11px 22px;
  font-family: var(--font); font-size: var(--fs-caption); font-weight: 600;
  line-height: 1.29; letter-spacing: var(--ls-caption);
  color: var(--on-accent); background: var(--accent-fill);
  /* "The pill IS the action signal" — the document's own words for a primary. */
  border: 1px solid var(--accent-fill); border-radius: var(--r-pill);
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
.btn-primary:hover {
  background: var(--accent-fill-hover); border-color: var(--accent-fill-hover);
  color: var(--on-accent); text-decoration: none;
}

/* THE OVERFLOW — the same CSP-safe <details> disclosure as the account menu and
   the grouped nav: it opens with no script at all, and account-menu.js adds only
   outside-click and Escape. The way back is NEVER in here; it is navigation. */
.overflow-menu { position: relative; flex: 0 0 auto; }
.overflow-toggle {
  list-style: none;
  display: inline-flex; align-items: center; gap: var(--sp-xxs);
  min-height: var(--tap);
  padding: var(--sp-xs) var(--sp-md);
  /* A capsule secondary button — `r-md`, the document's own use for that. */
  border: 1px solid var(--line); border-radius: var(--r-md);
  font-size: var(--fs-caption); font-weight: 400; line-height: 1.29;
  letter-spacing: var(--ls-caption); color: var(--t1);
  background: transparent; cursor: pointer; user-select: none; white-space: nowrap;
}
.overflow-toggle::-webkit-details-marker { display: none; }
.overflow-toggle:hover { background: var(--panel-2); color: var(--t1); }
.overflow-menu[open] > .overflow-toggle { border-color: var(--accent); color: var(--t1); }
.overflow-menu[open] > .overflow-toggle .account-caret { transform: rotate(180deg); }
.overflow-panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 40;
  min-width: 200px;
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--sp-xxs); gap: 2px;
}
.overflow-item {
  display: flex; align-items: center; width: 100%; text-align: left;
  min-height: var(--tap);
  padding: var(--sp-xs) var(--sp-sm); border-radius: var(--r-sm);
  font-family: var(--font); font-size: var(--fs-caption); font-weight: 400;
  line-height: 1.29; letter-spacing: var(--ls-caption);
  color: var(--t1); text-decoration: none;
  background: transparent; border: 0; cursor: pointer;
}
.overflow-item:hover { background: var(--panel-2); color: var(--accent); }

/* A SECTION IS A HEADING AND A THIN RULE — IT IS NOT A BOX.
   SGE-BUILD-2026-08-28.md, Task 5: "Every section on a record is wrapped in a
   card, so pages become stacks of containers with boxes inside boxes… A box
   means 'you can tap this.' A list row, a tile, a record. Nothing else gets a
   border."

   `.scard` is what `sectionCard()` draws and it wrapped EVERY section of every
   record: a customer record was nine white rounded rectangles stacked on grey,
   and a form inside one of them added a second frame round each question. The
   surface, the border and the radius go; what separates one section from the
   next is the rule under its heading (below) and a full step of space.

   THE BOX SURVIVES WHERE THE BOX MEANS SOMETHING. A `.scard.score-card` opens
   a salesperson's score, so it keeps its border and its surface — it is a
   record you can tap, which is exactly the case the rule preserves. Its rule is
   further down this file, beside the rest of the score card.

   `--sp-xl` rather than `--sp-md`: with no border drawing the boundary, the
   space between two sections has to be visibly larger than the space inside
   one, or the rule under the next heading reads as belonging to the paragraph
   above it. */
.scard {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin-bottom: var(--sp-xl);
}
/* A SEPARATOR SEPARATES SOMETHING — 18 September 2026, the other half of the
   blank band Keith saw at the foot of the Dashboard. The margin above is the
   space BETWEEN two sections, and the last section on a page has nothing under
   it to be held off: on the Dashboard that margin was 17px of nothing below the
   only section the page has, and on a page that ends in a section it was 32px.
   It is dropped where, and only where, there is no next section. Page-level
   only (`main.frame >`), so a section nested inside another one is untouched
   and the separator between two sections is exactly as it was. */
main.frame > .scard:last-child { margin-bottom: 0; }
/* A SECTION'S OWN NAME, AND THE RULE THAT IS NOW THE SECTION'S ONLY EDGE. It
   was 11.52px, below the absolute floor; `caption-strong` — 600 / 1.29 /
   -0.224px on the caption size — is the document's token for emphasis in a
   data region, which is what a section heading over a block of facts is. The
   size is NOT touched by this pass: Keith's floor of 28 August 2026 is body 14,
   absolute minimum 12, whole pixels only, and this token is 13. */
/* SENTENCE CASE, NOT CAPITALS — Keith, 5 September 2026. The capitals were done
   here, in CSS, so this is where they are undone: "WHAT IS WAITING" becomes
   "What is waiting" and NOT ONE WORD CHANGES. Every heading is already written
   in sentence case at its call site, so removing the transform is the whole of
   it — nothing above this line touches the words. */
.slabel {
  margin: 0 0 var(--sp-sm);
  padding-bottom: var(--sp-xxs);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-caption);
  font-weight: 600;
  line-height: 1.29;
  letter-spacing: var(--ls-caption);
  text-transform: none;
  color: var(--t3);
}

/* =====================================================================
   THE TOP RIGHT OF A CARD — ONE RULE, USED EVERYWHERE.

   KEITH, 6 September 2026, on Edit: "out edit outide with a standar edit
   icon like a pencil or something", and "the edit button can we standardise
   it.. ideally on the right liek add contact".

   WHY THERE WAS NOTHING TO USE. The quick view panel has had the pencil
   since 4 September (public/list-preview.js editIconSvg), but nothing in
   SGE put an action at the TOP RIGHT of a `.scard`: the shell's only action
   row is `.card-actions` / `.cx-acts`, which is the card's FOOT
   (public/shells.css). So every record card that offered Edit did it as a
   worded button at the bottom — the exact shape Keith's rule forbids — and
   w2623 could not fix it because the rule had to be written here first.

   THE CARD'S HEADING IS THE ROW. `.slabel` already draws the hairline that
   is the card's only top edge, and it already runs the card's full width,
   so the action goes ON that line rather than in a new bar above it. Nothing
   without a marker changes: the `:has()` selector means a heading that
   carries no control is the block it has always been.

   TWO CONTROLS SHARE IT, because they answer the same shape of need — a
   small mark at the card's top right that is not part of the card's content:
     `.card-edit`  the pencil, which opens the record's own edit form;
     `.card-def`   the info marker, which holds the definition that used to
                   be printed as a paragraph beside the figures.
   ===================================================================== */
.slabel:has(.card-edit), .slabel:has(.card-def) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
}
/* A DRAWING, NOT A WORD, AND IT IS THE SAME DRAWING THE PANEL USES. The
   pencil is built as an SVG on the 24-unit grid at both call sites
   (public/list-preview.js editIconSvg, src/app.js editIconHtml) with the
   same two paths and the same stroke, so the mark a reader learns on a
   quick view is the mark they meet on a record.

   26px, not 44px: this is the same control as the panel's
   (public/list-preview.css .pv-edit-open), and Keith asked for that one to
   be made smaller. The touch floor is met by the row it sits on. */
.card-edit, .card-def {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.625rem;
  height: 1.625rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--t3);
  text-decoration: none;
  cursor: pointer;
}
.card-edit:hover, .card-edit:focus-visible,
.card-def:hover, .card-def:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}
/* NO UNDERLINE ON HOVER — Keith, 4 September 2026: "When mouse over, can the
   words not be underline? this is the same for most of the current button
   behaviour." The colour and the border say it instead. */
.card-edit:hover { text-decoration: none; }
.card-edit svg { width: 1.125rem; height: 1.125rem; display: block; }
/* THE DEFINITION IS BEHIND THE MARKER, PRINTED NOWHERE — Keith: "make use of
   drill down if or quick view to see more", and "Definitions belong behind an
   info marker on the tile or in one legend, printed once." The letter is the
   handle; the `title` is what it holds. */
.card-def {
  font-size: var(--fs-caption);
  font-weight: 600;
  font-style: italic;
  line-height: 1;
}

/* SHORT SECTIONS SHARE A ROW instead of each taking a full-width band.
   SGE-BUILD-2026-08-28.md, Task 5: "One-line cards stop being cards and pair
   up, two or three to a row."

   `auto-fit` with a 24rem floor rather than a fixed column count, so a row fills
   whatever width it is given and falls back to one column on a phone, in the
   order the sections are written — the reading order never changes, which is
   what makes it safe to pair sections that are a narrative sequence. 24rem is
   the floor because a section narrower than that starts wrapping its own field
   labels (the two-column revenue table was the one that showed it).

   The column gap is the ordinary step; the row gap is the SECTION step, so two
   sections that wrap onto separate lines are as far apart as any other pair of
   sections on the page. `.scard`'s own bottom margin is dropped inside a row —
   the grid gap does that job — except on the last line, which the row itself
   carries. */
.pair-row {
  display: grid;
  /* `min(24rem, 100%)`, not a bare 24rem: on a 375px phone a 24rem track is
     wider than the column it is in and the whole page scrolls sideways. */
  grid-template-columns: repeat(auto-fit, minmax(min(24rem, 100%), 1fr));
  gap: var(--sp-xl) var(--sp-lg);
  align-items: start;
  margin-bottom: var(--sp-xl);
}
.pair-row > .scard { margin-bottom: 0; }

/* A READING REGION — the sentence under the dashboard headline. */
.day-stats {
  font-size: var(--fs-body); line-height: 1.47; letter-spacing: var(--ls-body);
  margin: 0 0 var(--sp-lg);
}

/* ---- login ---- */
.auth { display: flex; flex-direction: column; align-items: center; gap: 1.3rem; }

/* `.muted` is a note beside a value, and it lands inside a table cell on a
   dozen screens — so it takes the floor, not 0.85rem (13.6px). */
.muted { color: var(--muted); font-size: var(--t-cell-min); }

/* TEXT KEPT AS THE PERSON WROTE IT — the one class in SGE that honours a line
   break. Carl asked whether a lead's Inquiry supports a new line; Keith, 30
   September 2026: "Yes. Can you send the worker to do that."

   NOTHING WAS EVER LOST. Otto's push trims the ends of the enquiry and stores
   the rest whole (src/leads/push.js), and SGE's own Inquiry box is a textarea.
   It is the DRAWING that lost it: a browser collapses a newline inside a
   paragraph into a space, so an enquiry written as three lines arrived on the
   screen as one.

   IT IS ITS OWN CLASS RATHER THAN A RULE ON A SHARED ONE, and that is the whole
   care in this change. The Updates trail draws each note as a bare `<p>` inside
   `.timeline` / `.visit`, and those two are the markup of the activity
   timeline, the edit history, the designer history and the campaign activity
   list as well — `white-space: pre-wrap` on either would change screens nobody
   asked about. This is opt-in, named on the three places that want it, and SGE
   already does exactly this for the other field a person writes free text into:
   `.qr-asked` on the quote request record, "it keeps the line breaks the rep
   typed rather than running two thoughts into one paragraph".

   pre-wrap, NOT pre: the breaks the writer put in are honoured and a long line
   still wraps to the column it is in, so no screen scrolls sideways.

   THE ESCAPING IS UNTOUCHED. A line break renders as a line break and nothing
   else renders as markup — the value still goes through escapeHtml on the
   server and through textContent in the panel, and
   test/lead-inquiry-line-breaks.test.js holds both halves. */
.as-written { white-space: pre-wrap; }

/* The quick search is a filter control, so its box and its button are targets
   at EVERY width (16.6 tier 1) — not only on a phone, where the compact block
   already held them to 44px. Measured at 1440 on 23 August 2026 the Search
   button stood 39px and the box 40px. */
.search { display: flex; gap: 0.5rem; margin: 1rem 0; }
.search input[type="search"], .search select { margin: 0; min-height: var(--tap); }
.search button { width: auto; padding: 0.6rem 1.1rem; min-height: var(--tap); }

/* A ONE-CONTROL FILTER — a labelled select and its button on one line. It
   replaced a row of chips on the campaign master list (9 August 2026): a chip
   row grows with the number of options and wraps onto three lines on a phone,
   and a select is the same size whether a campaign declares two groups or
   twenty. */
.filter-one { align-items: flex-end; flex-wrap: wrap; }
.filter-one .filter-label {
  display: flex; flex-direction: column; gap: 0.2rem; margin: 0;
  font-size: var(--t-ui-min); letter-spacing: var(--ls-caption);
  color: var(--muted); font-weight: 600;
}
.filter-one .filter-label select { margin: 0; min-width: 14rem; max-width: 100%; }

/* TWO SEPARATE FILTERS on one line where there is room, stacking on a phone.
   Each is its own form (the Director's instruction of 10 August 2026: "the
   Group and Called By should be separate filter"), applying on change, with
   an Apply button that campaign-filters.js hides once it is running. */
.filter-row { display: flex; gap: 0.5rem 1rem; flex-wrap: wrap; margin: 1rem 0; }
.filter-row .search { margin: 0; }

/* THE SHARED LIST FILTER BAR (src/lists.js) — one compact select per field,
   with one Apply. It replaced the rows of one-chip-per-value on /customers,
   /growth, /contacts and /leads: the catalogue's section 2 asks for "per-field
   filters — filter pane or per-column dropdowns", and a chip row grew a chip
   per salesperson forever. Same shape as .events-filters and .report-filters,
   which already did this. */
.list-filters { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: flex-end; margin: 1rem 0 0.75rem; }
.list-filter {
  display: flex; flex-direction: column; gap: 0.2rem; margin: 0;
  font-size: var(--t-ui-min); letter-spacing: var(--ls-caption);
  color: var(--muted); font-weight: 600;
}
.list-filter select { margin: 0; min-width: 11rem; max-width: 100%; min-height: var(--tap); }
.list-filters button { width: auto; padding: 0.6rem 1.1rem; margin: 0; min-height: var(--tap); }

/* ============================================================
   THE FILTER BAR — one button, every filter behind it (src/lists.js).
   Keith's decision of 22 August 2026, candidate A of the two drawn in
   docs/filter-prototype.html: "One button that looks good in a way."

   The bar holds three things: the search box, the Filters button, and the chips
   for what is applied. The row of dropdowns that used to sit under it is gone
   from every list — it was the thing that wrapped, and on /growth it wrapped so
   far that the Apply button ended up alone on a line of its own.

   The chips sit beside the button while there is room and take their own
   full-width line when there is not (flex-basis 16rem, then 100% on the wrap).
   Nothing is ever trimmed or hidden: a filter in force is always readable.
   ============================================================ */
/* THE SEARCH FIELD STAYS PINNED AT THE TOP AS THE LIST SCROLLS — Keith,
   27 August 2026. The bar sticks directly under the app bar (56px, its own
   height, the same offset the sticky column headings already use) and carries
   an opaque ground of its own, so rows never show through it. Its z-index sits
   between the app bar (20) and the sticky column headings (3): the bar covers
   the headings at the seam and the app bar covers the bar.

   AND THE COLUMN HEADINGS PIN UNDER IT, not behind it. --list-bar-h is the
   height this bar reserves; the headings inside a list that HAS a bar drop by
   exactly that much (the rule under .list-results below), so both stay readable
   at once. A list with no filter bar is untouched. */
/* THE WHOLE TOP OF A LIST IS THIS BLOCK, AND ALL OF IT IS FROZEN — Keith,
   29 August 2026: "the top part should the filter, column, new account,
   accounts, etc should be Frozen aways". The page heading and the page actions
   are inside it now (src/lists.js listFilterBarHtml takes `headHtml`), so what
   stays on screen while the list scrolls is everything he named.

   AND IT IS SHORTER FOR IT. His other sentence — "the top part is too big in
   height… it's still taking up too much of the page's height" — is answered by
   the same move: the title had its own header with its own margins above a bar
   with its own, and the two blocks are now one with one set.

   THE GROUND IS THE PAGE'S, NOT WHITE. Keith, the same morning, on the search
   box: "the white background is bigger than the search box. looks weird." The
   bar carried `--panel` (white) on a `--bg` (grey) page, so it read as a panel
   floating behind a field rather than as a row of controls. It takes the page's
   own ground — the bar is still opaque, which is the only thing the sticky
   position needs, and there is no box round the field any more because there is
   no box. The field itself takes the SAME surface and border as the Filters and
   Columns buttons beside it (below), so the three read as one row of controls. */
.filter-bar {
  position: sticky; top: var(--appbar-h); z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center;
  /* ONE RUNG DOWN from `--space-sm` — Keith, 17 September 2026, on the gap
     between the header line and the date-range buttons under it. 8px still
     separates the sticky strip from what scrolls beneath it. */
  gap: var(--space-xs) var(--space-sm); margin: 0 0 var(--space-xs);
  padding: var(--space-xs) 0;
  min-height: var(--list-bar-h);
  background: var(--bg);
}
/* A BAR CARRYING ONE ROW RESERVES ONE ROW.
   KEITH, 17 September 2026, 19:57 +08, with a screenshot of the Dashboard at
   full window width: "There are many blank space on the top and the sides. can
   try to miximise the space so user can see more within the window." The top
   half of that sentence is THIS: a tall empty band between the app bar and the
   first real content, the "Max · Thursday 17-09-2026" line.

   WHAT IT WAS. `--list-bar-h` is 6.5rem — 104px — and it is right for a LIST,
   where the bar carries two rows: the title with its actions, then the search
   box with the Filters and Columns buttons. The Dashboard's bar carries only
   the first of those (src/dashboard/render.js passes `headHtml` and nothing
   else), so 104px was reserved to hold 68px of content and the 36px left over
   was split above and below it by `align-items: center`. Measured by
   `node scripts/shell-space-probe.mjs` in a 1920px window: 62px from the bottom
   of the app bar to the top of that line, of which 18px was this reservation
   and nothing else.

   IT IS KEYED ON THE SEARCH BOX because that is what makes the second row: a
   bar with one has two rows and keeps the reservation, a bar without one has a
   single row and takes its own height. Nothing is removed from any bar and no
   type is shrunk — the row is the same row, with the empty band taken off it.

   `--list-bar-h` ITSELF IS LEFT ALONE, and that is deliberate. It is also what
   the sticky column headings pin under (the rule below), and that variable is
   read by a SIBLING of this bar, which cannot see a value set here. A bar with
   no search box is not a list toolbar and has no `.list-results` beside it —
   `listResultsHtml` in src/lists.js is drawn only by screens that pass a search
   box — so there is no heading to fall out of step with. Were one ever added,
   it would pin low and show a gap, never slide behind the bar.
   The one other place that already made this exact decision, for the same
   reason, is public/log-activity.css (".lgx .lg-account .filter-bar"), where
   the bar carries a single field inside a form. */
.filter-bar:not(:has(> .search)) { min-height: 0; }
/* The panel hangs off the bar and must escape it, so the bar cannot be the
   containing block for the absolute card — it is positioned by .filter-panel
   itself, which is why `position: relative` came off the bar above. */
.filter-bar ~ .list-results thead th { top: calc(var(--appbar-h) + var(--list-bar-h)); }
/* A CHIP STRIP IS A WHOLE EXTRA ROW, so the bar reserves the taller height for
   exactly the case that has one. Neither rule can measure the other, so the bar
   says which case it is (the `has-chips` class, src/lists.js) and the reservation
   is set on the section that holds BOTH the bar and the table — a custom property
   set on the bar itself would not be visible to its sibling. */
.scard:has(.filter-bar.has-chips) { --list-bar-h: 8.5rem; }
/* THE HEADING ROW: the title on the left, the page actions on the right, and the
   controls underneath. It takes the whole width of the bar so the second row
   starts clean, and its own margins go — the bar's padding is the space now. */
.filter-bar > .pagehead { flex: 1 1 100%; margin: 0; }
.filter-bar > .pagehead .rh-top { align-items: center; gap: var(--space-sm); }
/* A LIST TITLE IS NOT THE BIGGEST THING ON THE PAGE. At `display-lg` it was the
   tallest object on a list screen and it spent that height to say one word the
   left rail already has highlighted. It steps down one rung of the SAME ladder —
   `display-md`, the size an h1 already is everywhere else in SGE — and the rows
   get the difference back. Nothing is dropped and no new size is invented. */
.filter-bar > .pagehead .headline {
  margin: 0; font-size: var(--fs-display-md); line-height: 1.2;
}
.filter-bar > .pagehead .rh-nav { margin: 0; }
/* A screen whose header is pageHead rather than recordHead — Account Health —
   puts its way-back line under the title inside the same block. It is a
   paragraph, not a row of actions, so it takes the whole width and sits quiet. */
.filter-bar > .pagehead > .muted { margin: 0; }
.filter-bar > .search { flex: 1 1 18rem; max-width: 26rem; margin: 0; }
.filter-bar > .applied-filters { flex: 1 1 100%; min-width: 0; margin: 0; }
/* THE SEARCH FIELD IS A CONTROL ON THE BAR, the same object as the two buttons
   beside it — same surface, same hairline, same corner, same height. It was a
   grey field sitting inside a white panel wider and taller than itself, which is
   the thing Keith read as "floating inside a box for no reason". */
.filter-bar > .search input[type="search"] {
  width: 100%; margin: 0; min-height: var(--tap);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

/* The button. Same disclosure as the account menu and the record overflow — it
   opens with no script, on click, Enter and Space. */
.filter-panel { position: relative; flex: 0 0 auto; }
.filter-panel-toggle {
  list-style: none;
  display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: var(--tap);
  padding: 0.6rem 1rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: var(--fs-caption); font-weight: 600; color: var(--ink-2);
  background: transparent; cursor: pointer; user-select: none; white-space: nowrap;
}
.filter-panel-toggle::-webkit-details-marker { display: none; }
.filter-panel-toggle:hover { background: var(--paper-2); border-color: var(--faint); color: var(--ink); }
/* The ring itself is the one rule in the Interaction States block at the foot of
   this file; only the border change is local to this control. */
.filter-panel-toggle:focus-visible { border-color: var(--accent); }
.filter-panel[open] > .filter-panel-toggle { border-color: var(--accent); color: var(--ink); }
.filter-panel[open] > .filter-panel-toggle .filter-caret { transform: rotate(180deg); }
.filter-caret { font-size: var(--t-ui-min); color: var(--muted); transition: transform 0.15s ease; }
/* How many filters are in force, said on the button — because with the controls
   behind it, the button is the one thing always on screen. */
.filter-n {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.35rem; height: 1.35rem; padding: 0 0.35rem;
  background: var(--accent-fill); color: var(--on-accent); border-radius: var(--r-pill);
  font-size: var(--t-ui-min); font-variant-numeric: tabular-nums;
}

.filter-panel-card {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 40;
  width: 24rem; max-width: calc(100vw - 2rem);
  max-height: min(28rem, calc(100vh - 6rem));
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  /* THE WHOLE CARD IS ONE OPAQUE SCROLLER. Keith, 27 August 2026: "What these
     filters mean" and the Apply-filters row were see-through and overflowed the
     card, because the form holding them was a block that grew past the card and
     spilled onto the page behind it. The card now scrolls as one — every row
     stays on its own solid ground (the head and body on --panel, the foot on
     --panel-2) and the foot is reached by scrolling, never lost off the edge. */
  overflow-y: auto; overflow-x: hidden;
}
.filter-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1rem; border-bottom: 1px solid var(--line);
}
.filter-panel-title {
  font-size: var(--t-ui-min); font-weight: 600; letter-spacing: var(--ls-caption);
  color: var(--muted);
}
/* Inside the panel every control is the full width of the panel — one column,
   so a long option never makes one box wider than its neighbour. */
.filter-panel-body {
  padding: 0.85rem 1rem;
  display: flex; flex-direction: column; gap: 0.7rem;
}
.filter-panel-body .list-filter { width: 100%; }
.filter-panel-body .list-filter select { min-width: 0; width: 100%; }

/* ---- A FILTER TAKES MORE THAN ONE VALUE ----------------------------------
   Keith, 29 August 2026: "I thought the filters is suppose to hable multiple
   selections? now only one can be selected". Within one filter the values are
   OR, between filters AND — the rule he settled on 9 August for the campaign
   report, carried here (src/lists.js: filterMultiHtml).

   EACH FILTER IS A DISCLOSURE, so six filters × their values is still a panel a
   reader can see the bottom of. The summary says what is chosen without being
   opened; the filter opens on its own when it is in force. It is the same native
   <details> as the Filters button that holds it — no script, no inline handler,
   which the app's CSP forbids either way.

   ROUNDED RECTANGLES ONLY, and the rows are the column chooser's rows
   (.cols-row above) — a tick list is a tick list and SGE should not grow two. */
.fmulti { border: 1px solid var(--line); border-radius: var(--radius-sm); }
.fmulti-toggle {
  list-style: none;
  display: flex; align-items: center; gap: var(--space-xs);
  min-height: var(--tap); padding: 0 var(--space-sm);
  cursor: pointer; user-select: none;
}
.fmulti-toggle::-webkit-details-marker { display: none; }
.fmulti-toggle:hover { background: var(--panel-2); }
.fmulti-toggle:focus-visible { border-radius: var(--radius-sm); }
.fmulti-label {
  flex: 0 0 auto;
  font-size: var(--t-ui-min); font-weight: 600; letter-spacing: var(--ls-caption);
  color: var(--muted);
}
/* What is chosen, in the words on the rows — "All", the one value's own label,
   or how many. It is the part with give in it, so a long salesperson name
   shortens rather than pushing the caret off the control. */
/* THE VALUES ARE READ IN THEIR OWN WORDS. `.list-filter` upper-cases its
   contents, which is right for the FIELD name over a control and wrong for the
   values inside it: "At risk", "Never bought" and "Gone quiet" are settled
   vocabulary and came out as AT RISK, NEVER BOUGHT and GONE QUIET — different
   words from the ones on the rows the filter returns (R3, N14). The two rules
   below put the value text back to the case it is written in. */
.fmulti-state {
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-align: right;
  font-size: var(--fs-caption); font-weight: 400; color: var(--t1);
  text-transform: none; letter-spacing: var(--ls-body);
}
.fmulti[open] > .fmulti-toggle { border-bottom: 1px solid var(--line-soft); }
.fmulti[open] > .fmulti-toggle .filter-caret { transform: rotate(180deg); }
/* A filter with many values — Salesperson, Region — scrolls inside itself rather
   than making the panel taller than the window. */
.fmulti-options {
  max-height: 13rem; overflow-y: auto;
  padding: var(--space-xxs) var(--space-sm) var(--space-xs);
}
.fmulti-row {
  display: flex; align-items: center; gap: var(--space-sm);
  min-height: var(--tap); margin: 0; padding: var(--space-xxs) 0;
  font-size: var(--fs-body); font-weight: 400; line-height: 1.43;
  letter-spacing: var(--ls-body); text-transform: none;
  color: var(--t1); cursor: pointer;
}
.fmulti-row input[type="checkbox"] {
  width: auto; min-height: 0; margin: 0; accent-color: var(--accent);
}
/* A value's own words stay on one row (Keith's standing rule on wrapping). */
.fmulti-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* How many rows are behind this value, said before it is pressed (L5, N4). */
.fmulti-n {
  flex: 0 0 auto; font-variant-numeric: tabular-nums; font-size: var(--t-ui-min); color: var(--muted);
}

/* ---- A FILTER THE READER ADDED THEMSELVES --------------------------------
   Keith, 29 August 2026: "How do i select other fields to be filtered other than
   these list?"

   It is the SAME control as the six built-in ones — a tick list, OR inside it —
   and it carries exactly two things they do not: an × that takes the whole
   filter back off the pane, and a sentence for a field whose values cannot
   honestly be listed. The × rides in the top-right of the box rather than in the
   summary row, so it cannot be taken for the caret and pressing the summary can
   never land on it (the same rule the column heading follows: two controls, two
   hit boxes). */
.fmulti-added { position: relative; }
.fmulti-added > .fmulti-toggle { padding-right: 2.1rem; }
.fmulti-x {
  position: absolute; top: 0; right: 0; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.9rem; height: 2.1rem;
  border-radius: var(--radius-sm);
  color: var(--t3); text-decoration: none; font-size: 1rem; line-height: 1;
}
.fmulti-x:hover { background: var(--panel-2); color: var(--t1); text-decoration: none; }
.fmulti-note {
  margin: 0; padding: var(--space-xxs) 0;
  font-size: var(--fs-caption); text-transform: none; letter-spacing: var(--ls-body);
}

/* ---- AN AMOUNT TAKES A RANGE, A DATE TAKES A PERIOD ----------------------
   Keith, 30 August 2026: "Go withrecommendation".

   The BOX is the tick list's box, unchanged — same border, same corner, same
   summary line, same × in the same place — because it is the same kind of thing
   in the same column. Only its contents differ, and these rules are only about
   the contents.

   THEY DO NOT SCROLL INSIDE THEMSELVES. `.fmulti-options` caps a tick list at
   13rem because a Salesperson filter can hold forty rows; a range holds two
   boxes and a period a select and two boxes, always, so a scrollbar inside one
   would be furniture around nothing — and it would hide the second date box on
   a short window, which is the one thing this control must not do. */
.fmulti-range > .fmulti-options,
.fmulti-period > .fmulti-options {
  max-height: none; overflow: visible;
  display: flex; flex-direction: column; gap: var(--space-xxs);
}
/* WHAT IS APPLIED GETS ITS OWN LINE, and it has to.
   Every other filter's summary states a SHORT answer — "All", "At risk", "2
   chosen" — so the label and the state share one row comfortably. A money range
   is "MYR 10,000.00 – MYR 500,000.00" under a label reading REALISED REVENUE,
   and on one row the shared ellipsis rendered it "REALISED REVENUE  M…" —
   photographed at 1440 on 30 August 2026. A summary whose entire job is to say
   what is applied without being opened, saying nothing.

   So the caret moves up beside the label and the state drops beneath it, full
   width and left-aligned like the sentence it is. One extra line, and only on
   these two controls. */
.fmulti-range > .fmulti-toggle,
.fmulti-period > .fmulti-toggle {
  flex-wrap: wrap; align-items: center; min-height: 0;
  padding-top: var(--space-xxs); padding-bottom: var(--space-xxs);
}
.fmulti-range > .fmulti-toggle .filter-caret,
.fmulti-period > .fmulti-toggle .filter-caret { order: 1; margin-left: auto; }
.fmulti-range > .fmulti-toggle .fmulti-state,
.fmulti-period > .fmulti-toggle .fmulti-state {
  order: 2; flex: 1 0 100%; text-align: left; white-space: normal;
}
/* The two boxes sit side by side and drop to one column where the pane is too
   narrow for both — the pane is resizable and 15.5rem at its narrowest. */
.fmulti-pair { display: flex; flex-wrap: wrap; gap: var(--space-xxs) var(--space-sm); }
.fmulti-field {
  flex: 1 1 7rem; min-width: 0;
  display: flex; flex-direction: column; gap: 0.15rem; margin: 0;
  text-transform: none; letter-spacing: var(--ls-body); font-weight: 400;
}
/* "From" and "To" over their own box — the caption of the field, in the same
   voice as the count beside a tick. */
.fmulti-field-name {
  font-size: var(--t-ui-min); font-weight: 600; letter-spacing: var(--ls-caption);
  color: var(--muted);
}
/* A value is read in its own words, never upper-cased by the label around it —
   the same correction .fmulti-state carries, for the same reason. */
.fmulti-input, .fmulti-select {
  width: 100%; min-width: 0; margin: 0; min-height: var(--tap);
  font-size: var(--fs-body); text-transform: none; letter-spacing: var(--ls-body);
  color: var(--t1);
}

/* ---- "ADD A FILTER" ------------------------------------------------------
   The last row of the "Filter list by" section, shaped like Business Central's
   "+ Filter…" — the reference Keith held up beside the screen. A native
   <details>, so it opens with no script; a plain list of links inside, so
   adding a filter is an address, is in the browser's history and travels into a
   saved view for nothing. */
.addfilter { position: relative; }
.addfilter-toggle {
  list-style: none;
  display: flex; align-items: center; gap: var(--space-xxs);
  min-height: 2.1rem; padding: 0 var(--space-xs);
  border-radius: var(--radius-sm);
  font-size: var(--fs-caption); font-weight: 600; color: var(--accent);
  cursor: pointer; user-select: none;
}
.addfilter-toggle::-webkit-details-marker { display: none; }
.addfilter-toggle::marker { content: ""; }
.addfilter-toggle:hover { background: var(--panel-2); }
/* IT OPENS IN FLOW, NOT OVER THE PANE.
   A card hanging off the control is what a menu usually is, and it was written
   that way first — but this control stands at the foot of a section inside
   `.pane-body`, which is `overflow-y: auto`, and an absolutely positioned panel
   inside a scrolling box is CLIPPED by it. Seen in the browser at 1440 on 29
   August 2026: eight fields offered, two of them visible and the rest cut off at
   the pane's foot. So the list opens as the next rows of the pane and the pane
   body scrolls to it, which is what a person expects of a list that lives inside
   a column. */
.addfilter-panel {
  display: flex; flex-direction: column;
  margin-top: var(--sp-xxs); padding: 0.25rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
}
.addfilter-item { white-space: normal; }
.filter-panel-head { flex: 0 0 auto; }
.filter-panel-foot {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  padding: 0.7rem 1rem; border-top: 1px solid var(--line); background: var(--panel-2);
  border-radius: 0 0 var(--r-md) var(--r-md);
}
.filter-panel-foot button {
  width: auto; margin: 0; padding: 0.55rem 1.1rem; font-size: var(--fs-caption);
  min-height: var(--tap);
}
/* The form is the panel; its own standalone spacing does not apply in here. The
   card above is the scroller, so the form is a plain block (Keith, 27 Aug 2026). */
.filter-panel .list-filters { display: block; margin: 0; }

/* ---- THE COLUMN CHOOSER --------------------------------------------------
   Keith, 27 August 2026: "The default view is that recommeded view for a quick
   10 sec see all important. But i want to give the user a choice to set what
   they want."

   IT IS THE FILTERS BUTTON'S TWIN and deliberately shares its classes
   (.filter-panel, .filter-panel-toggle, .filter-panel-card): the same size, the
   same corner, the same disclosure, the same behaviour at every width. That is
   what keeps the filter bar to ONE LINE — his rule that the bar has one standard
   design and does not go onto a second line — because the phone block below
   already shrinks the search box rather than the buttons, and this is a button.

   ROUNDED RECTANGLES ONLY. Every corner here is --r-md or --radius-sm; nothing
   in this block is a pill, an oval or a capsule.

   The rows are the quick-access chooser's rows (.qpick-row above), for the same
   reason: a tick list is a tick list, and SGE should not grow two of them. */
.column-panel .cols-form { display: block; margin: 0; }
.cols-state { margin: 0; }
.cols-rows { display: flex; flex-direction: column; }
.cols-row {
  display: flex; align-items: center; gap: var(--sp-sm);
  min-height: var(--tap); margin: 0; padding: var(--sp-xxs) 0;
  border-top: 1px solid var(--line-soft);
  font-size: var(--fs-body); line-height: 1.43; letter-spacing: var(--ls-body);
  color: var(--t1); cursor: pointer;
}
.cols-row:first-child { border-top: 0; }
.cols-row input[type="checkbox"] {
  width: auto; min-height: 0; margin: 0; accent-color: var(--accent);
}
/* A column name is two or three words and stays on ONE ROW (Keith, 29 August
   2026 — where text is short enough to fit, it does not wrap). */
.cols-name { flex: 1 1 auto; min-width: 0; white-space: nowrap; }
/* The identity column and the way into the record cannot be switched off, and
   the row says so rather than the box simply refusing to move. */
.cols-fixed { flex: 0 0 auto; font-size: var(--t-ui-min); white-space: nowrap; }

/* ---- A TICKED COLUMN DRAGS -----------------------------------------------
   Keith, 29 August 2026: "can the columns be adjusted by draging up and down on
   this right panel when field is been ticked?"

   Two lists in the pane: the columns that are ON, in the table's own order and
   draggable, and the rest below in a fixed list — so a person is only ever
   dragging what they actually use. Account is drawn first with no handle and no
   arrows: it is the identity column and is already marked "always shown".

   THE ARROWS ARE NOT DECORATION. They are real submit buttons, in the tab order,
   and they are how this works by keyboard rather than by mouse alone. They are
   drawn quietly and come forward on hover and on focus, like every other
   secondary control in the house. */
.cols-row-drag { cursor: grab; }
.cols-row-drag.is-dragging { opacity: 0.5; cursor: grabbing; }
.cols-row-drag:hover { background: var(--panel-2); }
.cols-grip {
  flex: 0 0 auto; width: 0.9rem;
  color: var(--t3); font-size: var(--t-ui-min); line-height: 1;
  letter-spacing: -0.18em; text-align: center; cursor: grab;
}
/* The fixed row keeps the handle's WIDTH and not the handle, so its tick lines
   up with every tick below it rather than sitting half a character to the left. */
.cols-grip-off { visibility: hidden; }
/* The tick and its name are one label, so pressing the words still ticks the box
   — dragging the ROW is a separate gesture on the row itself. */
.cols-tick {
  flex: 1 1 auto; min-width: 0; margin: 0;
  display: flex; align-items: center; gap: var(--sp-sm);
  font: inherit; text-transform: none; letter-spacing: inherit; cursor: pointer;
}
/* NOTHING DRAWS `.cols-arrows` OR `.cols-move` ANY MORE. Keith, 4 September
   2026: "The up down arrow on the columns panel.. can we remove it since it can
   be drag and dropped", and, told they were the only mouse-free reorder, "it
   goes away". src/columns.js stopped emitting them. The two rules are left
   standing rather than deleted: the save path still understands a
   `move=up:<key>` post (applyColumnMove), and taking a component out of the
   stylesheet is a change to the component register that this instruction did
   not ask for. */
.cols-arrows {
  flex: 0 0 auto; display: flex; align-items: center; gap: var(--sp-xxs);
}
.cols-move {
  width: 1.4rem; min-height: 1.4rem; height: 1.4rem; margin: 0; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--t3);
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: var(--t-ui-min); line-height: 1;
  cursor: pointer;
}
.cols-move:hover { background: var(--panel); color: var(--t1); border-color: var(--line); }
.cols-move:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* The two halves are told apart by a heading each, not by a rule nobody can
   see. `.pane-sub` is the same small caps the views strip and "Filter list by"
   already use, so the pane reads as one thing. */
.cols-rows-shown, .cols-rows-off { margin: 0; }
.cols-reset {
  width: auto; min-height: var(--tap); padding: 0 var(--sp-md);
  background: transparent; color: var(--t2);
  border: 1px solid var(--line); border-radius: var(--r-md);
  font-family: var(--font); font-size: var(--fs-caption); font-weight: 400;
  line-height: 1.29; letter-spacing: var(--ls-caption); cursor: pointer;
}
.cols-reset:hover { background: var(--panel-2); color: var(--t1); }
/* The campaign master list has no .filter-bar of its own — its filters are their
   own forms — so the chooser joins the Status row, which is three short words
   and has the width for it. Both sit on one baseline. */
.filter-row > .column-panel { align-self: center; }
.campaign-status-row { align-items: center; margin: 0.5rem 0; }
.campaign-status-row > .chips { margin: 0; }

@media (max-width: 720px) {
  /* THE BAR IS STILL ONE LINE ON A PHONE. It was not: `flex: 1 1 100%` gave
     the search box the whole row and pushed the Filters button onto a second
     one, which is the shape Keith ruled out — "I'm trying to have a standard
     design .... Going into the next line would make it look messy" — and
     which catalogue 16.3 tier 1 states as "Occupies exactly one line at every
     width. It never wraps." 16.3 also says what the compact bar holds: "the
     bar is one filter control plus quick search". So the search box now
     SHRINKS to leave the button its place instead of taking the row: basis
     8rem, and it may go smaller still, because the button is a fixed size and
     the search box is the thing with give in it. */
  .filter-bar > .search { flex: 1 1 8rem; min-width: 0; max-width: none; }
  /* And the search form does not wrap INSIDE itself either, which is the same
     second row arriving by another route: the phone rule lower down lets any
     `.search` wrap, and on this bar that dropped the Search button below its
     own box. The box is the part with give in it and it is the part that
     gives; the two buttons keep their size. */
  .filter-bar > .search { flex-wrap: nowrap; }
  .filter-bar > .search input[type="search"] { min-width: 0; }
  .filter-bar > .search button { flex: 0 0 auto; }
  /* The width the search box gets back comes off the CHROME either side of the
     two buttons, never off the type — 16.5 tier 1, "space is bought by
     removing content, not by shrinking type". Both labels are untouched. */
  .filter-bar { gap: 0.5rem; }
  .filter-bar > .search { gap: 0.4rem; }
  .filter-bar > .search button { padding: 0.6rem 0.75rem; }
  .filter-bar .filter-panel-toggle { padding: 0.6rem 0.7rem; }
  .filter-bar > .applied-filters { flex: 1 1 100%; }
  .filter-panel-card { width: calc(100vw - 2rem); }
  /* Hanging from the button's left edge, the panel would now start two thirds
     of the way across a 390px screen and run off it. It opens from the right
     instead — the same turn the iPad band makes, for the same reason. */
  .filter-panel-card { left: auto; right: 0; }
}

/* =====================================================================
   WHAT THE LIST OPENS WITH — recent, and nearby (Keith, 27 August 2026).
   Two short groups above the table, before anybody types: the accounts this
   person visited recently, and the ones around the last place they were. It is
   the head of the list and must not read as a second list, so it is ruled
   lines and no boxes — the same construction the rest of the shell took in
   pass one — and it is gone the moment anything is typed or filtered.
   ===================================================================== */
.list-openers {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--space-lg);
  margin: 0 0 var(--space-md);
}
.opener-group { min-width: 0; }
.opener-title {
  margin: 0 0 var(--space-xxs);
  font-size: var(--t-ui-min); font-weight: 600; letter-spacing: var(--ls-caption);
  color: var(--muted);
}
.opener-note { margin: 0 0 var(--space-xxs); }
.opener-list { list-style: none; margin: 0; padding: 0; }
.opener-row {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-xxs) var(--space-xs);
  padding: var(--space-xxs) 0;
  border-bottom: 1px solid var(--line-soft);
}
.opener-row > a { flex: 1 1 auto; min-width: 0; }
/* Its phone treatment — one column, each row a thumb target — lives in the
   compact block further down, with the rest of the compact shell. */
/* TWO COLUMNS NEED THE ROOM FOR TWO COLUMNS (29 August 2026). On an iPad in
   portrait each group had about 260px, and a row is a firm's name, when it was
   last seen and its state box — about 320px of content. Two of the five rows
   fitted and three folded onto a second line, which is the raggedness Keith
   keeps pointing at. One column below 1024px: every row on one line, and the
   band is no taller than it was. */
@media (max-width: 1023px) {
  .list-openers { grid-template-columns: 1fr; gap: var(--space-md) 0; }
}

/* The chip-row shape of this band is further down, with the chip rules it is
   written against — it has to come after them to win on source order. */

/* WHAT IS BEING APPLIED, and how to stop applying it. Catalogue 13.4: a filter
   chip is "an active filter, removable — always carries an ×". Only the filters
   actually applied are drawn, so this strip is absent on an unfiltered list and
   never grows with the number of options. */
.applied-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0 0 0.75rem; }
.applied-label { font-size: var(--t-ui-min); letter-spacing: var(--ls-caption); font-weight: 600; }
.applied-chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  min-height: var(--tap);
  padding: 0.24rem 0.4rem 0.24rem 0.7rem;
  /* PASS 2 §2.2: a border is structural and takes a neutral warm grey. The
     action colour on this chip is on the × — the part that is actually
     pressed — and nowhere else. */
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--panel); color: var(--ink-2); font-size: var(--t-ui-min);
}
.applied-chip strong { font-weight: 600; color: var(--ink); }
/* The × is a real target, not a decoration on the label — it is the control
   that removes this one filter. */
.applied-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap); border-radius: var(--r-pill);
  text-decoration: none; line-height: 1; font-size: var(--fs-body);
  color: var(--muted); background: var(--paper-2);
}
.applied-x:hover { background: var(--accent-fill); color: var(--on-accent); }
.applied-clear {
  display: inline-flex; align-items: center; min-height: var(--tap);
  font-size: var(--t-ui-min); margin-left: 0.3rem;
}

/* THE EXPLANATION, one click away. The paragraphs that used to stack between
   the chip rows — the seven regions, what Hot means today, position against
   fall state — are still on the screen, in the disclosure SGE already uses
   everywhere else. Catalogue 13.2 caps line length on text-heavy areas. */
.filter-help { margin: 0 0 0.75rem; font-size: var(--t-cell-min); }
/* The disclosure that explains the list is opened by tapping it, so it takes
   the tap floor like every other control on this bar (16.6 tier 1). */
.filter-help summary {
  cursor: pointer; color: var(--muted);
  display: flex; align-items: center; min-height: var(--tap);
}
.filter-help > p, .filter-help > ul { max-width: 62ch; margin: 0.5rem 0 0; }

/* THE CAMPAIGN REPORT'S THREE FILTERS, in one form with one Apply. Multi-select
   boxes rather than chips, for the same reason: fixed height however many
   salespeople the team has. */
.report-filters { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end; margin: 0 0 0.6rem; }
.report-filters label {
  display: flex; flex-direction: column; gap: 0.25rem; margin: 0;
  font-size: var(--t-ui-min); letter-spacing: var(--ls-caption);
  color: var(--muted); font-weight: 600;
}
/* The global 0.6rem padding on a form control is right for a single-line
   select and wrong for a multi-line one: it pushes a fifth row half into view
   under the four `size` asks for, so the box reads as clipped. The padding
   moves onto the options, and the two boxes then stand exactly the same
   height beside each other. */
.report-filters select[multiple] { min-width: 15rem; margin: 0; padding: 0; }
.report-filters select[multiple] option { padding: 0.3rem 0.7rem; }
.report-filters input[type="date"] { margin: 0; }
.report-filters-go { display: flex; gap: 0.8rem; align-items: center; }
.report-filters-go button { width: auto; padding: 0.6rem 1.1rem; margin: 0; }

/* WHAT THIS PERSON IS HOLDING, on Log Activity, the moment a campaign is
   chosen. It is a statement, not a warning — it reads as plainly when the
   answer is "no code" as when it names one. */
.campaign-promo {
  margin: 0.6rem 0 0;
  padding: 0.55rem 0.8rem;
  /* PASS 2 §2.2: a rule down the edge of a statement is structural. Nothing
     here is tapped. */
  border-left: 3px solid var(--faint);
  background: var(--panel-2);
  font-size: var(--fs-caption);
}

.chips { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.chip {
  text-decoration: none;
  padding: var(--sp-xxs) var(--sp-sm);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--fs-caption);
  font-weight: 400;
  line-height: 1.29;
  letter-spacing: var(--ls-caption);
  color: var(--t1);
  background: var(--panel);
  text-transform: capitalize;
}
/* A chip that is a LINK is a filter control and therefore a target (16.6 tier
   1). A chip that is a <span> — the Won / Overdue / Due tags on the weekly
   report — is a label and is not tapped, so the tap floor would only make the
   report taller for nothing. */
a.chip {
  display: inline-flex; align-items: center;
  min-height: var(--tap);
  /* THE COUNT IS NOT PART OF THE WORD — 25 September 2026. The space between a
     chip's label and its own count is written in the markup (src/lists.js
     chipsHtml puts one before `<span class="chip-n">`) and `textContent` still
     carries it, but a flex container drops whitespace BETWEEN its items, so the
     drawn gap was 0px on every chip on every list: "All stages2", "Planning0",
     "Renovation underway1". Measured at 0px on 5 of 5 chips on
     /quote-requests, which is the first thing a salesperson reads on that
     screen.
     `gap` and not a margin on `.chip-n`, because the gap belongs to the row of
     items rather than to one of them, and a chip with no count has only one
     item so nothing moves on the chips that carry no figure. */
  gap: 0.3rem;
}
/* A chip whose label is a sentence rather than a name — "Not in a sales
   region" must not come out as "Not In A Sales Region". */
.chip-plain { text-transform: none; }
/* The document's rule for a chip: hover steps one surface level. */
.chip:hover { background: var(--panel-2); border-color: var(--accent); color: var(--accent); text-decoration: none; }
.chip.active { background: var(--accent-fill); color: var(--on-accent); border-color: var(--accent-fill); font-weight: 600; }
/* A chip carries its own row count. On the selected chip the muted grey it
   inherits sits on the accent fill and is barely legible (V8) — the count is
   part of the figure, so it stays readable. */
.chip.active .muted { color: var(--on-accent); opacity: 0.82; }

/* =========================================================================
   WHAT THE LIST OPENS WITH, ACROSS THE WIDTH — the chip-row shape of the
   opening band (src/lists.js listOpenersHtml, shape: 'chips').

   KEITH, 24 September 2026, 19:58 +08, on Log Activity's "Accounts to hand":
   "This is too long. either reduce to 3 or have it presented in another way",
   and, earlier the same day on this same screen, "it's wasting the vertical
   space leaving empty horozontal space." Ten accounts drawn one per line are
   ten lines of page carrying one short name each — the fault exactly. On the
   chip row they wrap across the width: at 1792px, ten accounts on 2 lines and
   115px where the rows took 10 lines and 296px.

   IT IS NOT A NEW CONTROL. The rows are `nav.chips` with `a.chip`, the chip row
   SGE already writes for a set of small choices, and these declarations only
   undo what the band has to undo: the two-column grid it sits in (one group of
   chips wants the whole width, not half of it) and the chip row's own bottom
   margin, which the section already carries.
   ========================================================================= */
.list-openers-chips { display: block; }
.opener-chips { margin-bottom: 0; }
/* The name is the thing pressed and its note belongs beside it, so one chip is
   never broken across two lines — and the note is held off the name, which the
   row shape did with a column of its own and a chip has to do with a gap. */
.opener-chips .chip { white-space: nowrap; }
.opener-chips .chip .muted { margin-left: 0.4rem; }

/* ON A PHONE IT IS ONE ROW, AND IT SCROLLS — measured, not assumed: at 390px
   the band is 317px wide and an account chip is wider than half of that, so a
   wrapping row came back to ten lines and 518px, which is the fault again
   rather than the answer to it.

   This is SGE's own compact treatment of a chip row and not a new idea: the
   same two declarations .applied-filters takes below 768px, from catalogue 16.3
   tier 1 — "Active filters as removable chips, horizontally scrollable on
   compact". One line; all ten still there, in their order, every name and every
   note whole. */
@media (max-width: 767px) {
  .opener-chips { flex-wrap: nowrap; overflow-x: auto; }
  .opener-chips > * { flex: 0 0 auto; }
  /* AND THE OFFSET INSIDE IT, SAID IN THE SAME BREATH — the rule above makes
     this strip a scroll container, and `position: sticky` resolves against the
     nearest scrolling ancestor, so the shell's `thead th { top: var(--appbar-h) }`
     would mean "that far INSIDE this strip" rather than "below the frozen
     chrome" (test/list-header-offset.test.js, 29 August 2026). The strip holds
     chips and no table today; the offset is stated anyway, because whoever
     creates a scrollport says what a heading's top is inside it. */
  .opener-chips thead th { top: 0; }
}

/* ---- tables ---- */
/* A DATA REGION, `caption` — 14px / 400 / 1.43 / -0.224px, verbatim. */
table {
  width: 100%; border-collapse: collapse;
  font-size: var(--t-cell); line-height: 1.43; letter-spacing: var(--ls-caption);
}
/* THE COMPACT ROW — Keith, 17 September 2026. The padding is the two tokens
   declared at the head of this file, so every list in SGE takes this height and
   no page sets its own. Nothing else about a cell changes: the alignment, the
   rule under it and the type are exactly what they were. */
th, td {
  text-align: left; padding: var(--row-pad-y) var(--row-pad-x);
  border-bottom: 1px solid var(--line-soft); vertical-align: top;
}
/* HOVER STEPS ONE SURFACE LEVEL. The document names this as the primary purpose
   of hover in this house — "which row am I on" — and gives the step: on a panel,
   to panel-2. It runs at --dur-fast, set in the Interaction States block below. */
tbody tr:hover td { background: var(--panel-2); }

/* THE WHOLE ROW OPENS THE RECORD (src/lists.js: cardTableHtml stamps
   data-row-href; public/row-click.js does the click). Keith, 26 August 2026:
   "can't we just click the whole 'card' instead of the need to have the 'Open
   the record'?" — "when mouse over it it will click the click".

   THE POINTER IS THE PROMISE. It is the whole of the hover signal on purpose:
   the row does not lift, gain an edge or grow a chevron, because a further cue
   is Keith's to choose and not this pass's to invent. What is here says the row
   is a target before it is pressed, and nothing else moves — no size, no
   spacing, no type. */
tr[data-row-href] { cursor: pointer; }

/* THE NAME IN THE ROW IS NOT A HYPERLINK. Keith, 27 August 2026: "Why the
   customer company name is still required to be look like a hyperlink. remove it
   since user can click the row to drill down." The whole row is the target, so
   the identifier in the lead cell takes the ink colour and drops the rule at
   EVERY width — the phone card block already did this; this is the wide table.
   Placed before the is-opened rules so an opened row still steps its text to t2. */
tr[data-row-href] td[data-card-lead] a,
tr[data-row-href] td[data-card-lead] a:hover {
  color: var(--ink); text-decoration: none;
}

/* AND A ROW HE HAS BEEN INTO LOOKS LIKE ONE. "Anything clikcin in for this case
   is ideally coloured so the manager knows he has gone thru it."

   IT IS NOW THE TEXT THAT STEPS, NOT THE BACKGROUND, which is the design
   document's own house rule: "A row already opened is coloured differently from
   the rest — its text steps from t1 to t2." That also frees the background to
   carry the hover, so the two states compose instead of fighting: an opened row
   still answers the pointer with the same surface step every other row makes,
   and nothing has to out-weigh anything.

   The old rule painted the row with the hairline colour, which on the dark
   ground is a near-invisible tint and on the light one competed with hover. */
tr[data-row-href].is-opened > td { color: var(--t2); }
tr[data-row-href].is-opened > td a { color: var(--t2); }
/* A COLUMN HEADING IS TABLE TEXT AND TAKES THE FLOOR — `caption-strong`,
   14px / 600 / 1.29 / -0.224px. It used to be 11.52px with 0.06em of positive
   tracking; the document's migration list names wide positive tracking as the
   opposite of the house voice, so the tracking comes back to the token's own
   value. THE CAPITALS ARE GONE — Keith, 13 September 2026: "Strip the Foreced
   Capital". A heading now reads in the case it is written in, and the weight
   and the colour are what keep it reading as a heading. */
/* A COLUMN HEADING SITS ON ONE ROW. KEITH, 29 August 2026: "Idealy when the
   text is not long, it should show itin one row not text wrap". A heading is
   two or three words at most, so it is never the thing that should be folded —
   a sweep of every page found "Pipeline stage", "Since last month", "Realised
   Revenue", "Not collected", "Quote waiting", "Last seen", "How it came about",
   "Activity status", "Promo code", "Posting date", "Connected account",
   "Passed to", "Passed on" and "7-day avg" all broken over two rows, each one
   with its cells then reading out of line under it. The column takes the room
   its heading needs instead. */
th {
  font-size: var(--t-cell-min);
  line-height: 1.29; letter-spacing: var(--ls-caption);
  color: var(--t3); font-weight: 600; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
/* A ROW heading is not a column heading — it is the row's subject, a band name,
   a person or a region, and it is as long as the data makes it. Holding
   "Region 3 — Petaling Jaya / Subang" on one line pushed the Account Health
   report 48px past the right edge of a 1440px window. It wraps, as its cells
   do; only the COLUMN headings above are held to one row. */
th[scope="row"] { white-space: normal; }
/* A CELL THAT HOLDS ONE TOKEN, NOT PROSE — a reference, a date, a person's name.
   KEITH, 29 August 2026: "when the text is not long, it should show itin one row
   not text wrap". The browser breaks at a hyphen, so "KMMY-LD-26007" read as
   "KMMY-LD- / 26007" and "2026-06-16" as "2026-06- / 16", which is neither the
   reference nor the date any more. Put it on the cell, never on the table: a
   table-wide nowrap makes every column of prose as wide as its longest sentence.
   On a phone the cardlist gives each cell the whole row, so it costs nothing. */
td.oneline, th.oneline { white-space: nowrap; }
th a { color: var(--t3); text-decoration: none; }
th a:hover { color: var(--accent); }
/* COLUMN HEADERS STICK WHILE SCROLLING — Keith, 27 August 2026. They pin just
   below the sticky app bar (--appbar-h, its own height) so the heading a column
   is read under stays on screen as the rows scroll past; the card ground travels
   with them so a row never shows through, and z-index sits below the bar (z-20)
   so the bar covers them at the seam. On a phone a cardlist hides its thead, so
   this touches the wide and iPad table only. */
thead th { position: sticky; top: var(--appbar-h); z-index: 3; background: var(--panel); }
/* AND THAT OFFSET DESCRIBES THE WINDOW, SO IT MEANS NOTHING INSIDE A SCROLLPORT.
   Max, 29 August 2026, on /customers at 1600 by 1000: the ACCOUNT / HEALTH /
   TYPE / LAST ACTIVITY / NEXT ACTION / SALESPERSON row was drawn BETWEEN the
   second and third rows of the list, with the page scrolled to the top.

   WHY, and it is the same fault `.cal-week thead th` was fixed for earlier the
   same day. `position: sticky` is resolved against the nearest SCROLLING
   ancestor, not against the window, and any element with `overflow-x: auto`
   is a scroll container on BOTH axes. So the moment a table (or a wrapper round
   one) is given a sideways scroll of its own, `top: 56px` stops meaning "below
   the app bar" and starts meaning "56px below the top of this box" — and sticky
   pushes an element DOWN to reach its offset. The heading landed 56px, or
   160px where a frozen list bar is reserved, inside its own list.

   THE OFFSET BELONGS TO WHOEVER SCROLLS. Where the window scrolls the list, it
   is the height of the frozen chrome (the two rules above). Where the list has
   a scrollport of its own, it is zero: the heading sits where it is drawn and
   pins to the top of that scrollport as it scrolls. Every scrolling frame in
   SGE that holds a table says so here, so a frame built tomorrow has one place
   to add itself to. The two table-level cases — the iPad band and the open
   preview panel — say it where they make the table scroll. */
.cal-scroll thead th,
.events-table-scroll thead th,
.growth-list-scroll thead th,
.wk-scroll thead th,
.approvals-scroll thead th { top: 0; }

/* A SIDEWAYS SCROLL NOBODY CAN SEE IS NOT A WAY TO THE LAST COLUMN — 12
   September 2026.

   THE FAULT, MEASURED. `node scripts/w2147-table-chain.mjs --url
   /quote-requests,/challenges --sizes 890`: in a 890px window /challenges wants
   880px of table in an 858px box and /quote-requests 962px in the same 858 —
   so the last column is cut, and on /challenges that column is WHAT IS ON
   OFFER, which is the reward, and it is the column a salesperson opens the page
   for. The reach was already built: the iPad band turns a table into its own
   sideways scrollport, so the same measurement reads canScrollX=22 and
   canScrollX=104 and the column IS reachable. What was missing is any sign that
   it is there. macOS draws an overlay scrollbar — nothing at all until
   something is already scrolling — so the reader sees a column sliced down the
   middle and no reason to believe there is more of it.

   SO THE CONTROL IS DRAWN. DESIGN.md is explicit about which of the two answers
   this is: "space is bought by removing content, not by shrinking type — fewer
   columns, or an overflow control". A scrollbar is that overflow control, and
   it is the platform's own rather than a new invention — no fade, no shadow
   (the house has none), nothing added to the page that was not already there.

   AND IT COSTS NOTHING WHERE NOTHING OVERFLOWS. These are `overflow: auto`
   boxes: a bar is drawn only on a box that actually has somewhere to go, so a
   table that fits is untouched at every width, and no row of the table moves.

   ONE SPELLING, AND IT IS THE OLD ONE, WHICH IS NOT A PREFERENCE. Blink
   IGNORES every `::-webkit-scrollbar` rule on a box that also carries the
   standard `scrollbar-width` or `scrollbar-color`, and the standard properties
   cannot ask for a permanent bar at all — they style whatever the platform was
   going to draw, which on macOS is an overlay and therefore nothing. Written
   both ways first and measured by `node scripts/w2147-scrollbar-check.mjs`, the
   drawn bar came back 0px: the standard properties had switched the others off.
   So the pseudo-element is used alone. Firefox draws a permanent bar of its own
   here and needs no rule.

   AND ONLY THE SIDEWAYS ONE. `::-webkit-scrollbar:horizontal` leaves a vertical
   scrollbar exactly as the platform draws it today — a list bounded to the
   window's height is not the fault being fixed, and giving it a permanent
   8px column would take width from the very table this is about. */
table::-webkit-scrollbar:horizontal,
.cal-scroll::-webkit-scrollbar:horizontal,
.events-table-scroll::-webkit-scrollbar:horizontal,
.growth-list-scroll::-webkit-scrollbar:horizontal,
.wk-scroll::-webkit-scrollbar:horizontal,
.approvals-scroll::-webkit-scrollbar:horizontal,
.acct-scroll::-webkit-scrollbar:horizontal,
.ah-queue-scroll::-webkit-scrollbar:horizontal,
.list-results::-webkit-scrollbar:horizontal {
  -webkit-appearance: none;
  height: 8px;
}
table::-webkit-scrollbar-thumb:horizontal,
.cal-scroll::-webkit-scrollbar-thumb:horizontal,
.events-table-scroll::-webkit-scrollbar-thumb:horizontal,
.growth-list-scroll::-webkit-scrollbar-thumb:horizontal,
.wk-scroll::-webkit-scrollbar-thumb:horizontal,
.approvals-scroll::-webkit-scrollbar-thumb:horizontal,
.acct-scroll::-webkit-scrollbar-thumb:horizontal,
.ah-queue-scroll::-webkit-scrollbar-thumb:horizontal,
.list-results::-webkit-scrollbar-thumb:horizontal {
  /* The house's one shape — a rectangle with rounded corners — and a mark one
     step darker than the hairline, so it reads as a thing that can be dragged
     rather than as another rule under the table. */
  background: var(--t3);
  border-radius: var(--r-xs);
}
table::-webkit-scrollbar-track:horizontal,
.cal-scroll::-webkit-scrollbar-track:horizontal,
.events-table-scroll::-webkit-scrollbar-track:horizontal,
.growth-list-scroll::-webkit-scrollbar-track:horizontal,
.wk-scroll::-webkit-scrollbar-track:horizontal,
.approvals-scroll::-webkit-scrollbar-track:horizontal,
.acct-scroll::-webkit-scrollbar-track:horizontal,
.ah-queue-scroll::-webkit-scrollbar-track:horizontal,
.list-results::-webkit-scrollbar-track:horizontal {
  background: var(--line-soft);
  border-radius: var(--r-xs);
}
/* NO CODE FONT ON BUSINESS TEXT — Keith, 5 September 2026. Money, counts and
   waiting times in a list read like terminal output in the mono face, and they
   are none of them code. The house face is used and `tabular-nums` is KEPT:
   that is the feature which makes a column of figures line up, and it belongs
   to the normal face — the monospace stack was never what was doing the work. */
th.num, td.num {
  text-align: right; font-size: var(--t-cell-min);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* ---- STATUS PILLS ----
   THE FILL IS GREYSCALE AND THE STATE IS THE TEXT AND THE EDGE. They were six
   tinted washes; the house keeps colour for the accent and for verified state,
   and a wash is neither. A pill is now the raised surface with a hairline in the
   state's own colour and the word in it — which is the one construction that
   reads the same on parchment and on a black tile, and which loses nothing when
   the screen is printed in grey, because the WORD was always carrying it. */
.status {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--t2);
  border-radius: var(--r-pill);
  font-size: var(--t-cell-min);
  font-weight: 400;
  line-height: 1.43;
  letter-spacing: var(--ls-caption);
  text-transform: capitalize;
}
.status-active { color: var(--success); border-color: var(--success); }
.status-cold { color: var(--t2); border-color: var(--line); }
.status-warm { color: var(--warning); border-color: var(--warning); }
.status-won { color: var(--success); border-color: var(--success); }

/* ---- THE ONE HEALTH SIGNAL (Keith, 27 August 2026) ----
   One colour-coded band per row, read from the four statuses the record keeps
   (src/health.js). It is the same .status pill construction as everything above
   — the state in the text and the edge, never a wash — so it reads identically
   on parchment, on a black tile and printed in grey, where the WORD is all that
   is left.

   IT IS A LINK, because tapping it filters the list to that band. The colour
   must therefore NOT come from the link rule, which would paint every band
   Action Blue; each band declares its own, and the underline is off because a
   pill is a control with an edge, not a word in a sentence. Two bands carry a
   phrase rather than one word ("At risk", "Never bought"), so the capitalise
   .status applies is turned off for all five — the labels are already written
   the way they should read. */
.health { text-transform: none; text-decoration: none; }
a.health:hover { background: var(--panel-3); }
.health-at_risk { color: var(--danger); border-color: var(--danger); }
.health-watch { color: var(--warning); border-color: var(--warning); }
.health-never_bought { color: var(--t2); border-color: var(--line); }
.health-healthy { color: var(--success); border-color: var(--success); }
/* Lost is over rather than urgent, so it is the quietest of the five: the
   filled treatment .growth-fall-lost already uses for the same fact. */
.health-lost { background: var(--t2); color: var(--panel); border-color: var(--t2); }
a.health-lost:hover { background: var(--t1); }

/* Lead status badge — the same pill, one weight up. */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--t2);
  border-radius: var(--r-pill);
  font-size: var(--t-cell-min);
  font-weight: 600;
  line-height: 1.29;
  letter-spacing: var(--ls-caption);
  text-transform: capitalize;
}
.status-new { color: var(--success); border-color: var(--success); }
.status-contacted { color: var(--warning); border-color: var(--warning); }
.status-converted { color: var(--success); border-color: var(--success); }
.status-closed { color: var(--t2); border-color: var(--line); }
/* The shared sales-pipeline stages (src/pipeline.js), worn as a badge in a
   homeowner's record header. The WORD carries the meaning and the colour only
   agrees with it, so nothing is lost printed in grey. */
.status-presentation, .status-proposal-quote-sent { color: var(--warning); border-color: var(--warning); }
.status-closed-won { color: var(--success); border-color: var(--success); }
.status-closed-lost { color: var(--t2); border-color: var(--line); }

/* ---- THE ONE WIDTH, APPLIED ----------------------------------------------
   Every state box that sits in a list cell takes --status-box-w as its FLOOR
   and centres its word in it, so "Sent", "Raised" and "Being priced" in one
   column of /quote-requests are the same box, and so is "At risk" on
   /customers, "New" on /leads and "Hot" on /growth/list.

   A FLOOR RATHER THAN A FIXED WIDTH, deliberately: a fixed width would have to
   either clip a longer label or let it spill past its own border, and both of
   those are worse than the raggedness being fixed. nowrap is the other half of
   it — a state is one or two words and must never fold onto a second row.

   The two boxes that carry a SENTENCE rather than a state — the visit-plan
   reason ("Stood high and has fallen") and the review kind ("Task past its
   by-when") — are already wider than the floor, so this rule does nothing to
   them; they are handled where they are drawn.

   The opening band above a list ("Visited recently", "Near where you last
   were") is included: it is a list of records with a state box on each row, so
   a reader sees it as the same column and it must line up the same way. */
td > .status, td > .badge, td > .health,
td > a.status, td > a.badge, td > a.health,
th[scope="row"] > .status, th[scope="row"] > .badge, th[scope="row"] > .health,
.opener-row > .status, .opener-row > .badge, .opener-row > .health,
.opener-row > a.status, .opener-row > a.badge, .opener-row > a.health {
  min-width: var(--status-box-w);
  text-align: center;
  white-space: nowrap;
}

/* THE SALES-MANAGER ROI COLUMN. One column, three kinds of answer — a ratio, a
   grace note and an over-allowance note — which drew at 112px, 139px and 152px.
   The widest is the width for all three, so that column is a straight edge like
   every other. Nothing was reworded. */
td > .status.mgr-roi { min-width: var(--status-box-w-roi); }

/* AND THE ONE THAT IS A SENTENCE IN A BOX, NOT A STATE. The review page's kind
   — "Task past its by-when", "Samples given, no follow-up" — sits INSIDE the
   Account cell, under the account's name, rather than in a column of its own.
   Holding it to one row made that cell 149px wide and squeezed "Why it is
   stuck", which is a column of real sentences, into what was left: on an iPad
   in portrait the page grew by 1764px. It keeps its own width and wraps, and it
   is reported to Keith as the one state box not on the standard. */
td > .status.review-kind {
  min-width: 0; white-space: normal; text-align: left;
}
/* THE COMPOSITE ONE. /growth/list reads "Producing · At risk: gone quiet" —
   a position box, a separator and a risk box. The risk box takes the wide
   standard so that column is straight too, rather than "At risk: slipping" and
   "At risk: gone quiet" sitting 16px apart. */
td > .growth-fall, td > .growth-notyet,
td > a.growth-fall, td > a.growth-notyet { min-width: var(--status-box-w-wide); }

/* ---- AND IN A LIST CELL THE BOX ITSELF GOES ------------------------------
   KEITH, 17 September 2026: a status value in a list is drawn as a box that
   looks like a button but is not — "Outstanding" on the campaign master list is
   the one he named. It is the same instruction he gave on 27 August: "upi can
   remove the Pill and replace it with Bold Coloured front/colour".

   SO IN A CELL IT IS PLAIN COLOURED TEXT. The border, the fill, the radius, the
   padding and the fixed box width all come off; the COLOUR and the weight stay,
   which is what was carrying the meaning all along — and the word stays exactly
   as it was written. Nothing is lost when the screen is printed in grey, because
   the word was always the signal and the colour only ever agreed with it.

   IT COMES LAST DELIBERATELY. Everything above declares how WIDE each kind of
   box is, in three different tokens; those rules stand as the record of what the
   boxes were, and this one block turns the boxes off in the one place Keith is
   looking at. Restore a box by deleting this block and nothing else.

   IT IS SCOPED TO THE CELL AND TO THE OPENING BAND ABOVE A LIST, and nowhere
   else. A pill in a RECORD HEADER is a different thing — it is the one badge on
   a page, standing beside a name, with nothing in a column beside it to line up
   with — so every `.status` outside a list is untouched.

   A HEALTH VALUE IS STILL A LINK (tapping it filters the list to that band), so
   it keeps the pointer and answers hover; what it loses is the edge that made it
   read as a button. */
td > .status, td > .badge, td > .health,
td > a.status, td > a.badge, td > a.health,
td > .growth-fall, td > .growth-notyet,
td > a.growth-fall, td > a.growth-notyet,
th[scope="row"] > .status, th[scope="row"] > .badge, th[scope="row"] > .health,
.opener-row > .status, .opener-row > .badge, .opener-row > .health,
.opener-row > a.status, .opener-row > a.badge, .opener-row > a.health {
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 0;
  text-align: left;
  font-weight: 600;
}
/* The two FILLED treatments said their state with a wash rather than with an
   edge, so in a cell they say it with ink instead. */
td > .health-lost, td > a.health-lost,
th[scope="row"] > .health-lost,
.opener-row > .health-lost, .opener-row > a.health-lost {
  background: none; color: var(--t2);
}
td > a.health:hover, .opener-row > a.health:hover {
  background: none; text-decoration: underline;
}

/* Lead detail action buttons — keep a gap so they don't touch. */
.lead-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }

/* Appointments on the lead/homeowner detail: each row is one unit —
   "<when> — <type>   Edit · Cancel" — with Edit + an inline, compact Cancel
   (a real POST form, just not a full-width bar). */
.appt-list { list-style: none; padding: 0; margin: 0; }
.appt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.75rem; padding: 0.2rem 0; }
.appt-actions { display: inline-flex; align-items: baseline; gap: 0.7rem; }
.appt-actions .inline-action { display: inline; margin: 0; }
.btn-inline {
  width: auto;
  padding: 0.1rem 0.55rem;
  font-size: var(--t-cell-min);
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: 1px solid var(--faint);
  border-radius: var(--radius-sm);
}
.btn-inline:hover { background: var(--paper-2); color: var(--accent-deep); }

/* ---- customer detail ---- */
/* .lead-dl is the SAME two-column list — the lead, homeowner and lead-response
   detail blocks were marked up with it and it had no rule at all, so those three
   screens fell back to the browser default: every label on its own line with the
   value indented under it, while the customer beside them read as two columns. */
.detail, .lead-dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.45rem 1.5rem; }
.detail dt, .lead-dl dt { color: var(--muted); font-size: var(--fs-caption); }
.detail dd, .lead-dl dd { margin: 0; font-size: var(--fs-caption); }

/* THE LEAD RECORD'S FIELDS, ACROSS THE WIDTH — Keith, 2 September 2026, looking
   at /leads/:id: "it's so long… there's a lot empty space and they still have to
   scroll down. I think you need to do something about this. I'll arrange it.
   Well, more compact and neatly. In a way, I'll minimize the need for the user
   to scroll as much as possible."

   The two-column rule above puts ONE field on each row, the label hard left and
   the value beside it, and leaves the rest of a 1440px page empty — eleven
   fields is eleven full-width rows and most of a screen. `.lead-fields`
   overrides the track definition only: each field becomes a small
   label-over-value block and the row fits as many as it has room for. Eleven
   fields become three short rows on a desktop, two across on an iPad and one on
   a phone, with no field dropped and the reading order unchanged.

   16rem is the floor because the longest label here ("Account it became") and
   the longest value (a region's full name) both need it; below that the value
   starts wrapping mid-word. `min(...,100%)` so a 375px phone never scrolls
   sideways, the same guard `.pair-row` and `.tiles` already carry. */
.lead-dl.lead-fields {
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: 0.7rem 1.5rem;
}
.lead-fields .lead-f { min-width: 0; }
.lead-fields .lead-f dd { overflow-wrap: anywhere; }
/* The single-column phone rule below adds a top margin to every `dt` to separate
   pairs that would otherwise run together. This grid already carries a row gap,
   so on a phone the two stack and the fields drift apart. */
.lead-fields .lead-f dt { margin-top: 0; }
/* The Inquiry is a SENTENCE, not a value, so it takes the whole row rather than
   being squeezed into a 16rem track and wrapping six lines deep. */
.lead-fields .lead-f-wide { grid-column: 1 / -1; }

/* THE CLOSE CARD'S FOUR CONTROLS, ACROSS THE WIDTH. Stacked, they were four
   full-width selects and three lines of explanation — on their own most of a
   screen, which is the length Keith objected to. The outcome is the question, so
   it leads on its own row; the three answers that depend on it sit beside each
   other underneath. There is no client script hiding the ones that do not apply
   (the Content-Security-Policy forbids inline script), so each says in one line
   which outcome it belongs to. */
/* A3, 17 SEPTEMBER 2026 — THE CLOSE FORM'S OWN GRID IS GONE, because the form
   is no longer a section on the page. Keith: "Close lead appears twice, once as
   a header button and once as a whole section with its own button." It is the
   shell's form card over the record now (src/shells.js formCardHtml), and the
   card brings its own two-column grid, its own field spacing and its own
   bottom-right action row — so these four rules were a second grid laid over the
   shell's, which squeezed all four fields into 149px columns down the left of a
   720px card and floated the buttons beside them.

   WHAT IS LEFT is the class on the form, which is what this screen's own tests
   name, and the fields' own labels inside the card. */
.lead-close-form > label { margin: 0; min-width: 0; }

/* ---------------------------------------------------------------------------
   THE STATUS BAR ON A LEAD — Keith, 2 September 2026: "there's no status bar and
   everything. I think it's needed to be there since we have really. Set it as
   the tree status. So the status bar has to be there."

   Three steps abreast — New, Contacted, Closed — each a 4px track above its
   name, filled to where the lead has got. It is the same drawing as the growth
   ladder's "process sound bar" (public/firm-ladder.css), in the main
   stylesheet's own tokens, because this page is on the main stylesheet.

   It sits inside the record header, where the small "New" pill used to sit, and
   takes a full line of its own under the title: `.rh-id` is a wrapping flex row,
   so a 100% basis drops it onto the next line without any change to the header
   itself. */
/* THE HEADER'S LEFT SIDE HAS TO BE TOLD TO GROW. `.rh-id` is a shrink-to-fit
   flex row, so the bar's `flex-basis: 100%` resolved against a width the bar
   itself was supposed to be setting and collapsed to the title's — 208px at
   1440, measured with scripts/leads-record-shots.mjs. Giving the row a real
   basis when it carries a bar breaks the circle; `min(...,100%)` keeps a 375px
   phone from scrolling sideways, and no other record header is touched because
   no other one carries a `.stagebar`. */
.recordhead .rh-id:has(.stagebar) { flex: 1 1 min(26rem, 100%); }
/* THE COLUMNS ARE COUNTED BY THE CONTENT, not written here. It was
   `repeat(3, …)` because the lead's ladder is three long and it was the only
   bar drawn with these classes. Since 4 September 2026 the QUICK VIEW draws the
   same bar (public/list-preview.js setBar) for records whose ladders are four
   and six long — Keith: "Same for all quick view panel if a process bar is
   applicable" — so the track count follows the steps. For three steps this is
   the identical drawing. */
.stagebar {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  gap: 0.5rem; list-style: none; margin: 0.35rem 0 0; padding: 0;
  flex: 1 0 100%; min-width: min(26rem, 100%); max-width: 34rem;
}
.stagebar-step { min-width: 0; }
.stagebar-track {
  display: block; height: 4px; border-radius: 2px;
  background: var(--line); margin-bottom: 0.3rem;
}
/* A step already behind the lead, and the one it is on, both take the accent —
   the bar answers "how far", and the emphasised name answers "which one". */
.stagebar-step.is-done .stagebar-track,
.stagebar-step.is-now .stagebar-track { background: var(--accent); }
.stagebar-name {
  display: block; color: var(--muted);
  font-size: var(--fs-caption); line-height: 1.3;
}
.stagebar-step.is-done .stagebar-name { color: var(--ink); }
.stagebar-step.is-now .stagebar-name { color: var(--ink); font-weight: 600; }
/* WHY it is closed, under the step that says it is — the outcome is not a fourth
   stage, it is what Closed means on this record. */
.stagebar-note {
  display: block; color: var(--muted);
  font-size: var(--t-cell-min); line-height: 1.3; margin-top: 0.1rem;
}
@media (max-width: 640px) {
  .stagebar { max-width: none; }
}
.contacts { padding-left: 1.1rem; }
.contacts li { margin-bottom: 0.3rem; font-size: var(--fs-caption); }

/* ---- dashboards ---- */
/* BOXES IN A ROW STRETCH TO FILL IT (Task 5, 28 August 2026). A fixed
   `repeat(4, 1fr)` meant a strip of THREE tiles — which is what the sales
   objectives are, on rep home and on the director dashboard — left the last
   quarter of the row empty at 1440, and w1271 recorded it as waiting for this
   pass. `auto-fit` fits as many 15rem tracks as the row has room for, so three
   tiles fill it and four still sit four across; `min(...,100%)` keeps the track
   inside the column on a 375px phone. Same construction as `.tiles.money-tiles`
   below, which has worked since 23 August. `.tiles.minis` keeps its own fixed
   three columns — its width is set by the money it has to hold, not by the
   row — and that rule is asserted by test/record-header-actions.test.js. */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: 0.8rem; margin: 1.1rem 0;
}
/* 28rem over three tiles left each one ~8.5rem, which is narrower than the money
   figure it has to hold: "MYR 383,050.00" broke after "MYR", and a date broke
   after "2026-". A currency and its amount are ONE quantity and must not wrap
   apart (V3). Wide enough for the longest of the three, and no wider. */
.tiles.minis { grid-template-columns: repeat(3, 1fr); max-width: 36rem; }
.tiles.minis .tile-num { white-space: nowrap; }
/* MONEY TILES ARE SIZED BY WHAT THEY HOLD, NOT BY A COLUMN COUNT.
   A fixed four-across is right for a tile holding a count and wrong for one
   holding "MYR 24,118,378.63": at 390px four became two, each about 165px, and
   a currency and its amount are ONE quantity that must not wrap apart (the rule
   `.tiles.minis` above already states), so the figure painted straight out of
   the tile and took the whole PAGE 82px sideways with it — catalogue 16.1 tier
   1, "No horizontal scroll on the page itself, at any width". Measured on
   /report/pipeline at 390px on 23 August 2026: document scrollWidth 472
   against a client width of 390.

   auto-fit fits as many 17rem tracks as the container has room for and no more
   — four at a desk, one on a phone — which is 16.1's "fluid between
   breakpoints" and "layout driven by container width, not by device
   detection". No breakpoint is invented and nothing is shrunk to fit. */
.tiles.money-tiles { grid-template-columns: repeat(auto-fit, minmax(18.5rem, 1fr)); }
/* AND THE FIGURE IS ONE QUANTITY. Four equal columns gave each tile 240px of
   content and "SGD 24,118,378.63" wants about 245px, so the currency broke onto
   a line of its own above its own amount — the fault `.tiles.minis` above was
   written to stop, on the one screen where every figure is money. The track
   minimum is what buys the room; nowrap is what makes the breach visible if the
   minimum is ever lowered again. */
.tiles.money-tiles .tile-num { white-space: nowrap; }
.tile {
  display: block; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1.05rem;
  background: var(--panel-2);
}
a.tile:hover { border-color: var(--accent); }
/* The headline figure on a tile is money or a count — business text, in the
   house face, with tabular figures so a row of tiles reads level. */
.tile-num { display: block; font-size: var(--fs-lead-airy); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: var(--ls-body); }
.tile-label { display: block; font-size: var(--fs-caption); color: var(--muted); margin-top: 0.15rem; }
/* The <em> inside a tile label is the sentence that says what the figure
   counts and what makes it bad (N1, N7). It is its own line — run on to the
   end of the label it reads as one broken word. */
/* NO OPACITY ON TEXT. It carried `opacity: 0.85`, which composited --muted down
   to #838383 and measured 3.64:1 on the tile — a fail, and precisely the trap
   the house rule is about, because the declared colour looks compliant and the
   painted one is not. The sentence is already a step below its label by being
   its own line; it does not also need to be faded.
   Measured before and after by `node scripts/w1174-contrast-sweep.mjs`. */
.tile-label em {
  display: block; font-style: normal;
  margin-top: 0.2rem; line-height: 1.35;
}
/* WHICH KIND OF ZERO. A bare 0 reads as "this earned nothing"; the note says
   whether nothing happened or nothing has been measured. Amber text AND the
   words — never the colour alone, so it survives greyscale printing. */
.tile-note {
  display: block; margin-top: 0.3rem; font-size: var(--fs-caption); line-height: 1.35;
  color: var(--amber); font-weight: 600;
}

/* ---- the lead importer ---- */
.imp-cols { width: 100%; margin: 0.5rem 0 0.9rem; }
.imp-cols td { vertical-align: top; padding: 0.3rem 0.5rem 0.3rem 0; font-size: var(--t-cell-min); }
.imp-cols td.imp-col-name { white-space: nowrap; font-weight: 600; }
.imp-cols td.imp-col-eg { font-family: var(--mono); font-size: var(--t-cell-min); color: var(--muted); white-space: nowrap; }
.imp-need { color: var(--amber); font-weight: 700; font-size: var(--t-cell-min); letter-spacing: var(--ls-caption); }
.imp-opt { color: var(--muted); font-size: var(--t-cell-min); letter-spacing: var(--ls-caption); }
.imp-verdict {
  display: inline-block; font-size: var(--t-cell-min); font-weight: 700;
  letter-spacing: var(--ls-caption); padding: 0.05rem 0.4rem; border-radius: var(--r-xs); white-space: nowrap;
  border: 1px solid var(--line);
}
/* PASS 2 §2.3: "will be created" is the good outcome of a reconciliation, and
   it was a tinted brown. Green — the same green .imp-reject's amber sits
   against. The WORD in the cell still says which verdict it is. */
.imp-create { background: var(--green-soft); color: var(--green); }
.imp-fill { background: var(--panel-2); }
.imp-skip { background: var(--panel-2); color: var(--muted); }
.imp-reject { background: var(--amber-soft); color: var(--amber); border-color: var(--amber); }
.imp-line { font-family: var(--mono); font-size: var(--t-cell-min); color: var(--muted); white-space: nowrap; }
.imp-why { font-size: var(--t-cell-min); color: var(--ink-2); }

/* ---- the reconciliation: the loaded file against what SGE holds ----
   Every state carries a WORD as well as its colour (V5): the verdict says
   "accounted for" or "not accounted for" in the sentence, a differing cell
   prints both values with an arrow between them, and an unexplained one is
   labelled "Unexplained" in the table beside it. Printed in greyscale, nothing
   here loses its meaning. */
.rec-verdict { border-radius: var(--radius-sm); padding: 0.9rem 1.1rem; border: 1px solid var(--line); }
.rec-verdict p { margin: 0.3rem 0; }
.rec-verdict-head { font-size: var(--fs-body); }
.rec-verdict-ok { background: var(--green-soft); border-color: var(--green); }
.rec-verdict-bad { background: var(--amber-soft); border-color: var(--amber); }
.rec-groups td.num, .rec-groups th.num { text-align: right; font-variant-numeric: tabular-nums; }
.rec-total td { border-top: 2px solid var(--line); }
.warn-inline {
  background: var(--amber-soft); border-left: 3px solid var(--amber);
  padding: 0.5rem 0.7rem; font-size: var(--fs-caption); margin: 0.6rem 0;
}
.rec-file { font-size: var(--t-cell-min); }
.rec-sge { font-size: var(--t-cell-min); font-weight: 600; }
.rec-arrow { font-size: var(--t-cell-min); color: var(--muted); line-height: 1; }
.rec-fault-row td { background: var(--amber-soft); }
.rec-grid td, .rec-grid th { font-size: var(--t-cell-min); vertical-align: top; }
.rec-grid td.rec-same { color: var(--ink-2); }
.rec-grid td.rec-blank { color: var(--muted); }
.rec-grid td.rec-diff { background: var(--panel-2); border-left: 2px solid var(--line); }
.rec-grid td.rec-fault { background: var(--amber-soft); border-left: 2px solid var(--amber); }
.rec-legend {
  display: inline-block; padding: 0 0.3rem; border-radius: var(--r-xs); font-size: var(--t-cell-min);
}
.rec-legend.rec-diff { background: var(--panel-2); border: 1px solid var(--line); }
.rec-legend.rec-fault { background: var(--amber-soft); border: 1px solid var(--amber); }
.rec-row-missing td { background: var(--panel-2); }

.attention, .recent { list-style: none; padding: 0; }
.attention li, .recent li { padding: 0.45rem 0; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-caption); }

/* ---- invested / returned panels ----
   THEY ARE NOT THE SAME SIZE OF THING. Invested is a short list — an activity
   count, a catering line, a few sample lines. Returned carries three statistic
   tiles, each with the sentence saying WHICH kind of zero its figure is, and a
   scrolling list of projects underneath. Split evenly, one panel sat half empty
   while the tiles in the other were squeezed to about 120px of text. The room
   follows the content: 40/60, and they still stack on a narrow screen. */
.panels { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 1rem; margin: 1rem 0; }
.panel {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.2rem; background: var(--panel-2);
}
.panel h2 { margin-top: 0; font-size: var(--fs-caption); }
/* PASS 2 §2.2: a panel is structure, not an action — both of these were a
   brown wash inside a brown border. Neutral warm grey, and the border is the
   application's own line. */
.panel.returned { background: var(--paper-2); border-color: var(--line); }
.panel .pending { color: var(--muted); padding-left: 1.1rem; }
.panel li { font-size: var(--fs-caption); }
.panel.plan { margin: 1rem 0; background: var(--paper-2); border-color: var(--line); }

/* ---- returned panel: address-forward list that scrolls INSIDE the panel ---- */
/* THREE TILES, EACH HOLDING A SENTENCE, INSIDE A PANEL THAT IS PART OF A PAGE.
   `repeat(3, 1fr)` gave each one whatever a third of the panel happened to be —
   and since the Revenue tile's figure is `white-space: nowrap` it took its own
   width first, leaving the other two narrower still. At a 1000px window that was
   about 80px of text, so "nothing has come back from Business Central for this
   customer" came down the tile two words at a time and read as broken.
   NOTHING IS DROPPED AND NO FIGURE CHANGES — the same fix as the growth table:
   a tile takes the width its content needs, and when three of them will not fit
   the row becomes two, then one. On the full-width projects page it is still
   three across.

   AND IT IS WRITTEN AS `.tiles.minis.returned-rollup` ON PURPOSE. The element is
   <div class="tiles minis returned-rollup">, and `.tiles.minis` above is two
   classes to this rule's one — so on specificity it wins whatever the order in
   this file, and a bare `.returned-rollup` here would be silently ignored. That
   is not a hypothetical: the `max-width: none` on the line below has been in the
   file for months and has never once taken effect against `.tiles.minis`'s
   36rem cap. Both are named at full strength now. */
.tiles.minis.returned-rollup {
  max-width: none; margin: 0.6rem 0 0.3rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}
.returned-list {
  list-style: none; margin: 0.4rem 0 0; padding: 0;
  max-height: 16rem; overflow-y: auto;
  border-top: 1px solid var(--line);
}
.proj-row { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.proj-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.7rem; }
.proj-addr { line-height: 1.3; }
.proj-amount { font-weight: 600; white-space: nowrap; }
.proj-meta { margin-top: 0.12rem; display: flex; justify-content: space-between; gap: 0.7rem; font-size: var(--fs-caption); }
.proj-id { font-family: var(--mono); color: var(--muted); }
.proj-date { white-space: nowrap; }
.returned-viewall { margin: 0.55rem 0 0; text-align: right; font-size: var(--fs-caption); }
.returned-empty { margin: 0.6rem 0 0; }

/* ---- dedicated projects page: fixed-layout table, address column gets the room ---- */
.projects-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin-top: 1rem; font-size: var(--t-cell); }
.projects-table th, .projects-table td {
  text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line);
  vertical-align: top; overflow-wrap: anywhere;
}
.projects-table th { font-size: var(--t-cell-min); color: var(--muted); font-weight: 600; }
.projects-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.projects-table .proj-addr-cell { width: 34%; }

/* ---- visit timeline ---- */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline .visit {
  /* PASS 2 §2.2: the spine of a timeline is a rule. It stays DARKER than
     .courier's --faint below, because the two edges are what tells a visit
     from a drop, and neutral must not mean identical. */
  border-left: 3px solid var(--ink-3);
  padding: 0.45rem 0 0.45rem 1rem;
  margin-bottom: 0.95rem;
}
.timeline .visit.courier { border-left-color: var(--faint); }
/* Collapsed-by-default visit: the summary is the one-line type + description;
   the body reveals on click (native details, CSP-safe). */
/* Collapsed visit summary: a clear rotating tan chevron on the left, then
   labelled Type / Description — labels muted + mono, values normal weight. The
   native disclosure triangle is hidden; our chevron is the toggle affordance. */
.visit-summary {
  cursor: pointer; user-select: none; font-size: var(--fs-caption);
  list-style: none; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.3rem;
}
.visit-summary::-webkit-details-marker { display: none; }
.visit-summary::marker { content: ''; }
.visit-summary:hover .vs-value { color: var(--accent); }
.visit-chevron {
  flex: none; align-self: center;
  width: 0; height: 0;
  border-top: 5px solid transparent; border-bottom: 5px solid transparent;
  border-left: 8px solid var(--accent);
  margin-right: 0.2rem;
  transition: transform 0.15s ease;
}
.visit-details[open] > .visit-summary .visit-chevron { transform: rotate(90deg); }
.vs-label { font-size: var(--fs-caption); color: var(--muted); }
.vs-value { font-weight: 400; color: var(--ink); }
.vs-sep { color: var(--faint); }
.visit-body { padding-top: 0.45rem; }
/* Structured debrief read-back: section header + two-column rows (label on the
   left, value on the right, on the same line). */
/* SENTENCE CASE, NOT CAPITALS — checklist item 4, and the same undoing .slabel
   already had on 5 September 2026 (line 1396). These four headings on the
   account record — "Case", "Visit details", "The opportunity", "Next steps" —
   were the last section headings in SGE still being SHOUTED, and the shouting
   was done here, in CSS, so this is where it is undone. NOT ONE WORD CHANGES:
   every one is already written in sentence case at its call site, so removing
   the transform is the whole of it. Size, weight, colour, letter-spacing and
   margins are untouched, so the heading occupies the same line it did — only
   narrower, and it is a block, so nothing sits beside it to be moved. */
.debrief { margin-top: 0.35rem; }
.debrief h4 {
  font-size: var(--fs-caption); text-transform: none; letter-spacing: var(--ls-caption);
  color: var(--muted); font-weight: 600; margin: 0.7rem 0 0.3rem;
}
.debrief-dl {
  display: grid; grid-template-columns: minmax(120px, 200px) 1fr;
  gap: 0.18rem 0.8rem; margin: 0;
}
.debrief-dl dt { color: var(--ink-3); font-size: var(--fs-caption); margin: 0; }
.debrief-dl dd { color: var(--ink); font-size: var(--fs-caption); margin: 0; }
/* Comment box: space the submit button away from the textarea (was flush). */
.comment-form { display: flex; flex-direction: column; align-items: flex-start; margin-top: 0.6rem; }
.comment-form textarea { width: 100%; }
.comment-form button[type="submit"] { margin-top: 0.5rem; }
/* The visit-timeline filter bar spacing, matching the customers/threads bars. */
/* Compact visit-timeline filter bar. The From/To fields are label-wrapped date
   inputs (label text stacked above each input), so the row is two lines tall;
   the default align-items:stretch was inflating the Filter button to match that
   height — a chunky block. Bottom-align the row and give the button its natural
   height (same 0.6rem vertical padding as the inputs → same height), so it sits
   inline beside the date fields like the other filter bars. */
.visit-filter { margin-bottom: 0.6rem; align-items: flex-end; }
.visit-filter label { margin-bottom: 0; font-size: var(--t-ui-min); }
.visit-filter input[type="date"] { width: auto; }
.visit-filter button[type="submit"] { width: auto; padding: 0.6rem 1.1rem; align-self: flex-end; }
/* Case (thread) control inside a visit body: close / reopen from where you work. */
.case-control { margin-top: 0.7rem; padding-top: 0.55rem; border-top: 1px dashed var(--line); }
/* SENTENCE CASE — checklist item 4, for the reason given at `.debrief h4`. */
.case-control h4 {
  font-size: var(--fs-caption); text-transform: none; letter-spacing: var(--ls-caption);
  color: var(--muted); font-weight: 600; margin: 0 0 0.35rem;
}
.case-control p { margin: 0 0 0.4rem; }
.case-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; }
.case-form label { margin-bottom: 0; font-size: var(--fs-caption); }
.case-form select { width: auto; }
.case-form button[type="submit"], .case-reopen button[type="submit"] { width: auto; padding: 0.5rem 1.1rem; align-self: flex-end; }
.visit-head { margin-bottom: 0.2rem; }
.visit-head .muted { font-size: var(--fs-caption); }
/* ---- follow-up threads on the timeline ---- */
/* Linked activities render as one card: header line, one current follow-up
   strip, then the touches (newest on top) down a left connector line. Older
   touches dim; each keeps the full standalone expand/detail markup. */
.thread-card {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.55rem 0.8rem 0.35rem; margin-bottom: 0.95rem;
}
.thread-head { font-size: var(--fs-caption); font-weight: 600; color: var(--ink-3); margin-bottom: 0.35rem; }
.fu-strip {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.45rem;
  background: var(--amber-soft); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.35rem 0.6rem; margin-bottom: 0.5rem; font-size: var(--fs-caption);
}
.fu-strip .muted { font-size: var(--fs-caption); }
.thread-touches { list-style: none; margin: 0; padding: 0 0 0 0.85rem; border-left: 2px solid var(--line); }
.thread-touches .visit { border-left: 3px solid var(--ink-3); margin-bottom: 0.55rem; }
.thread-touches .visit.dimmed { opacity: 0.6; }
.thread-touches .visit.dimmed[open], .thread-touches .visit.dimmed:hover { opacity: 1; }
.status-overdue { background: var(--red-soft); color: var(--red); }
/* Carries a sentence with a name and a date ("Superseded by 2026-08-04",
   "Done ✓ 2026-08-01 by Lim Wei Jian"), so .status's capitalize must not run. */
.fu-chip { font-size: var(--t-cell-min); text-transform: none; }
/* Tick column on report tables: narrow + centred on th AND td (the alignment
   rule — a header aligns like its cells); the live tick is a bare button. */
th.tick-col, td.tick-col { width: 2rem; text-align: center; white-space: nowrap; }
td.tick-col .tick-form { display: inline; margin: 0; }
.tick-btn {
  width: auto; display: inline-block; background: none; border: none; cursor: pointer;
  font-size: var(--fs-caption); line-height: 1; padding: 0.1rem 0.3rem; color: var(--ink);
}
.tick-btn:hover { color: var(--accent); background: none; }
/* THE APPROVAL QUEUE'S TICK COLUMN — a real checkbox, under a word.
   .tick-col above is 2rem, sized for the report drill's ☐ glyph. This heading
   is the word "Tick", because every column in an SGE list carries a label, and
   2rem cannot hold it; 3.4rem can, and still spends far less of a fixed-layout
   table on a 13px control than an equal share of the row would.

   THE COLUMN EXISTS AT ALL because the tick used to share the When cell, and a
   bare label-wrapped checkbox picks up the global form-field rules — `input {
   display: block; width: 100% }` — which blew it up to fill the cell and pushed
   the date and time, the most important fact on the screen, out of sight.

   PASS 3 §3.1 asks whether this local fight with the global rule can go now
   that the grid exists, and HALF OF IT HAS. The line that used to sit here,
   `td.pick-col label.inline { margin: 0 }`, was undoing the 1.25rem right
   margin `label.inline` carries for a form row, which pushed the tick off
   centre in a column this narrow. The tick is now a tile — `label.otile`
   sets `margin: 0` itself and `td.pick-col label.otile` below centres it —
   so that line was doing nothing and is gone. The column width stays: it is
   sizing a table column, not fighting a form rule. Verified rendered, not
   assumed: docs/reports/w1157-after-pass3/plan-approvals-375.png and
   plan-approvals-1440.png, and the tick measures 44x44 at all three widths
   in docs/reports/w1157-after-pass3/grid-check-after.json. */
th.pick-col, td.pick-col { width: 3.4rem; text-align: center; white-space: nowrap; }
td .fu-action { font-size: var(--t-cell-min); }
.timeline p { margin: 0.15rem 0; font-size: var(--t-cell); }
.sample-lines { margin: 0.25rem 0 0; padding-left: 1.1rem; font-size: var(--t-cell-min); }
.photos { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-top: 0.45rem; }
.thumb {
  width: 96px; height: 96px; object-fit: cover;
  border: 1px solid var(--line); border-radius: var(--radius-sm); display: block;
}

/* ---- visit form ---- */
/* One line under the activity-type chooser saying what THIS kind will ask for.
   visit-form.js shows the one matching the chosen kind; with JS off they all
   show, which reads as a list of what each kind means — still true, still
   useful. */
.kind-blurb { margin: 0.5rem 0 0; font-size: var(--fs-caption); }
/* THE VISIT FORM'S GROUPS TAKE THE BASE RULE (Task 5, 28 August 2026). This
   pair used to redraw the box the base rule now refuses — a 1px border with the
   legend notched into it — on every form that carries `.visit-form`, which is
   the visit editor as well as Log Activity. All that is left here is the
   spacing between one group and the next. */
.visit-form fieldset { margin: 0 0 var(--space-lg); }
label.inline { display: inline-block; margin-right: 1.25rem; font-weight: 400; color: var(--ink); }
label.inline input { display: inline; width: auto; margin-right: 0.3rem; }
.visit-form textarea, .manage-form textarea { font-family: inherit; }
.visit-form button[type="submit"], .manage-form button[type="submit"] { margin-top: 0.6rem; }
/* "Needed" beside a label. A WORD, not a red asterisk and not a colour — the
   screen has to survive being printed in grey (rule V5). */
.req {
  font-size: var(--fs-caption); letter-spacing: var(--ls-caption);
  /* PASS 2 §2.2: "Needed" is a label on a field, not a thing to press. */
  color: var(--ink-2); border: 1px solid var(--faint);
  border-radius: var(--radius-sm); padding: 0.05rem 0.32rem;
  margin-left: 0.4rem; font-weight: 600; vertical-align: middle;
}
#sample-results { list-style: none; padding: 0; margin: 0.3rem 0; }
#sample-results button {
  width: 100%; text-align: left; background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); margin-bottom: 0.2rem; font-size: var(--fs-caption);
}
#sample-results button:hover { border-color: var(--accent); background: var(--accent-soft); }
#sample-lines { padding-left: 1.1rem; }
#sample-lines li { margin-bottom: 0.4rem; font-size: var(--fs-caption); }
#sample-lines .qty { display: inline; width: 4.5rem; margin: 0 0.4rem; }
#sample-lines button { width: auto; padding: 0.2rem 0.65rem; font-size: var(--fs-caption); background: var(--ink-3); }

/* ---- settings: one shape for every setting on the page -------------------
   KEITH, 20 September 2026: "It should be showing it's current value, the range
   it should be able to do and then user enters the value. So this will
   standardise. the page." — and, the same morning, "don't use a scroll bar".

   So the row is four parts on one line: the name, what it is NOW, what it is
   ALLOWED to be, and the box it is typed into. There is no slider left to
   style; the rules that drew one were removed with it. The only
   input[type="range"] rule still in this file is the general width cap near the
   top, which styles nothing today and is held by
   test/style-control-widths.test.js.

   THE BOX SITS AT THE END OF THE ROW, not under the label, so the eye runs
   name → now → allowed → type, which is the order the sentence is read in. */
.setting { margin-bottom: 1.2rem; }
.setting-row {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  margin-bottom: 0.15rem;
}
/* The name is the reading register, not the caption one: it is the thing being
   answered, and it is read before anything else on the row. */
.setting-name {
  font-size: var(--fs-body); color: var(--ink); font-weight: 600;
  flex: 1 1 15rem; min-width: 0; margin: 0;
}
.setting-now, .setting-allowed {
  font-size: var(--fs-caption); color: var(--muted);
  white-space: nowrap; flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}
.setting-now strong, .setting-allowed strong { color: var(--ink); font-weight: 600; }
/* "Now" and "Allowed" say which figure is which without a sentence. Smaller
   than the figure they introduce, never below the floor. */
.setting-tag {
  font-size: var(--fs-caption); color: var(--muted); font-weight: 400;
  text-transform: none; letter-spacing: 0;
}
/* A figure's worth of space, and no more — Keith: "must it cover the whole
   width of the page". The base rule makes every input a full-width block, so
   this is the one place that is undone for these boxes. */
.setting-input {
  width: auto; max-width: var(--fw-short); flex: 0 0 auto;
  margin-top: 0; text-align: right; font-variant-numeric: tabular-nums;
}
.setting .muted { margin: 0.15rem 0 0; }
/* The skill list's order box is the same figure in the same shape. */
.kpi-skill-list input[inputmode="numeric"] { max-width: var(--fw-short); text-align: right; }

/* ---- effectiveness score ---- */
.score-total { display: flex; align-items: center; gap: 1rem; margin: 1.3rem 0; }
.score-number { font-size: var(--fs-hero); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: var(--ls-body); }
.band-strong { color: var(--green); }
.band-watch { color: var(--amber); }
.band-needs_support { color: var(--red); }
/* The band pill is a two-word label ("Needs support"), so .status's capitalize
   turned it into "Needs Support" — a different word from the "0–49 Needs
   support" line in the Bands legend on the very same screen. */
.status-score-strong, .status-score-watch, .status-score-needs_support { text-transform: none; }
/* The general opt-out for any .status pill whose label is a phrase rather than a
   one-word status. Same reason as the band pills directly above. */
.status-phrase { text-transform: none; }
.status-score-strong { background: var(--green-soft); color: var(--green); }
.status-score-watch { background: var(--amber-soft); color: var(--amber); }
.status-score-needs_support { background: var(--red-soft); color: var(--red); }

.score-breakdown { margin: 1rem 0 1.5rem; }
/* align-items: start, not center: the third column is prose that runs to three
   lines ("not measured — no customer yet has both a first initial visit and a
   later win on your watch"), and centring it against a one-line bar floated the
   sentence up until it read as if it belonged to the row above. */
/* THE FOUR MEASURES ARE ONE GRID, NOT FOUR STACKS — 21 October 2026, Keith: "the
   layout with separate cards". Each row used to be its own three-column grid
   whose height came from the sentence on the right, so Cycle time (four lines)
   stood nearly twice as tall as the other three and the bars lined up with
   nothing. The breakdown is now ONE grid of five columns — label, bar, figure,
   sentence, sparkline — with `.score-row` dissolved into it (`display: contents`)
   and every row the height of the tallest (`grid-auto-rows: 1fr`). The sentence
   may wrap; it can no longer change the row, and the bars and sparklines share
   a column down the card. Nothing is clipped and no word is dropped. */
.score-breakdown {
  display: grid;
  grid-template-columns: 11rem minmax(6rem, 1fr) 2.5rem minmax(0, 2fr) 120px;
  grid-auto-rows: 1fr;
  gap: 0 var(--sp-sm);
  align-items: center;
}
.score-row { display: contents; }
.score-figure { font-size: var(--fs-caption); font-variant-numeric: tabular-nums; text-align: right; }
.score-label { font-size: var(--fs-caption); font-weight: 600; }
/* THE SCORE CARDS' CONTENT. `.cx-pcards > .scard` (public/customer-record.css)
   is padding 0 with a heading strip and pads its own rows; the score, the
   ladder table, the chart and the legend are put straight into the card, so
   they take the card's inner padding here. */
.score-rec > .scard { padding-bottom: var(--sp-sm); }
.score-rec > .scard > .score-total,
.score-rec > .scard > .score-breakdown { margin: 0; padding: var(--sp-sm) var(--sp-md); }
.score-rec > .scard > table,
.score-rec > .scard > svg,
.score-rec > .scard > .legend { margin-left: var(--sp-md); margin-right: var(--sp-md); }
.score-rec > .scard > table { width: calc(100% - 2 * var(--sp-md)); }
.score-rec > .scard > .legend { padding-left: var(--sp-lg); }
.score-bar { background: var(--paper-2); border: 1px solid var(--line-soft); border-radius: var(--r-pill); height: 0.7rem; overflow: hidden; }
/* PASS 2 §2.2 names "progress bars" among the structural things that give up
   the action colour. This one fill is EVERY bar in SGE — the four score
   components, the salesperson's own score, the guide's progress and every
   Sales Challenge standing — so it is the one place the change is made. A
   strong neutral, not a pale one: Keith's rule is that the fuller the bar the
   clearer it must read ("the more it is filled it clearer the users will
   know"), and the bar's job survives losing its colour only if it stays the
   darkest thing in its track. */
.score-fill { background: var(--ink-3); height: 100%; border-radius: var(--r-pill); }
.score-detail { font-size: var(--fs-caption); }
.score-detail .muted { font-family: var(--font); }
.legend { padding-left: 1.1rem; }
.legend li { margin-bottom: 0.35rem; font-size: var(--fs-caption); }

/* CSP-clean bar widths: no inline styles, enumerated classes in 5% steps. */
.w-0 { width: 0%; } .w-5 { width: 5%; } .w-10 { width: 10%; } .w-15 { width: 15%; }
.w-20 { width: 20%; } .w-25 { width: 25%; } .w-30 { width: 30%; } .w-35 { width: 35%; }
.w-40 { width: 40%; } .w-45 { width: 45%; } .w-50 { width: 50%; } .w-55 { width: 55%; }
.w-60 { width: 60%; } .w-65 { width: 65%; } .w-70 { width: 70%; } .w-75 { width: 75%; }
.w-80 { width: 80%; } .w-85 { width: 85%; } .w-90 { width: 90%; } .w-95 { width: 95%; }
.w-100 { width: 100%; }

/* ---- planner ---- */
.planner-map {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  min-height: 160px;
  margin: 1rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2); /* graceful placeholder if the proxy 502s */
}
.planner-table td a { font-weight: 600; }
/* Busy anchors: the nearby panel caps at ~20 visible rows and scrolls inside
   itself, so the map, draft sidebar, and controls stay in reach. */
.planner-nearby-scroll {
  max-height: 58rem;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.planner-nearby-scroll .planner-table thead th {
  position: sticky;
  top: 0;
  background: var(--paper);
}

/* ---- events (triage: full-width calendar on top, paginated list below) ---- */
/* Full-width auto-layout table: at page width all 8 columns fit and the row
   actions render inline on one line. The scroll wrapper is a safety net for a
   very narrow viewport; long names wrap. Scoped to .events-table so the shared
   .planner-table elsewhere is untouched. */
.events-table-scroll { overflow-x: auto; }
.events-table { width: 100%; }
/* table-layout: auto (content-driven). Short columns are nowrap so they take
   their content width and never fragment — the old `overflow-wrap: anywhere`
   collapsed each column's min-content to a single char ("Facebook" → "Fac ebo
   ok"). Only the long Event-name column (first) wraps, at WORD boundaries. */
/* Tighter cells so the 8 columns + 3 action buttons fit the page width with no
   horizontal scroll (the nowrap fix had pushed the table past the edge,
   clipping the Assign button). THE FONT IS NO LONGER PART OF HOW THAT IS PAID
   FOR — catalogue 16.5 tier 1 puts the floor at 14px and says in the same table
   that "space is bought by removing content, not by shrinking type". The
   padding is the lever; the type is not. */
.events-table th, .events-table td { white-space: nowrap; vertical-align: top; padding: 0.5rem 0.45rem; font-size: var(--t-cell-min); }
/* THE HEADINGS WRAP; THE CELLS DO NOT. nowrap is there so a value never
   fragments, and applied to the headings as well it spent the width of "State /
   district" and "Participants" on one line each — 22px more than the frame at
   1440px once the type reached the 14px floor, which showed as the Assign
   button cut off at the card edge. A heading on two lines costs a line of
   heading; the alternative was a sideways drag on every row. This is the same
   move w1088 made on the approvals queue, and 16.5's own instruction: buy the
   space by removing chrome, never by shrinking the type. */
.events-table th { white-space: normal; }
.events-table th:first-child, .events-table td:first-child {
  white-space: normal;
  overflow-wrap: break-word;
  min-width: 11rem;
}
.events-act-col { white-space: nowrap; }
/* Row actions INLINE (Reviewing · Dismiss · Assign) — never stacked into a
   single-letter column, which is what the squeezed side-by-side layout caused. */
.events-table .events-actions { white-space: nowrap; }
.events-table .events-actions form.events-quick { display: inline-block; margin: 0 0.25rem 0.2rem 0; vertical-align: middle; }
/* The three row actions (2 form buttons + the Assign anchor) render as equal,
   consistent buttons: shared class → same min-width, padding, height, radius,
   accent fill, with a leading icon. Behaviour/element types are unchanged. */
.events-table .events-actions .evt-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  width: auto;
  min-width: 5.5rem;
  box-sizing: border-box;
  margin: 0 0.25rem 0.2rem 0;
  padding: 0.3rem 0.45rem;
  font-size: var(--t-cell-min);
  font-weight: 600;
  line-height: 1.2;
  color: var(--on-accent);
  background: var(--accent-fill);
  border: none;
  border-radius: var(--r-pill);
  text-decoration: none;
  cursor: pointer;
  vertical-align: middle;
}
/* The Assign anchor is not inside a form; the buttons are — zero the form's own
   margin so all three align identically. */
.events-table .events-actions form.evt-act,
.events-table .events-actions form.events-quick .evt-act { margin: 0; }
.events-table .events-actions .evt-act:hover { background: var(--accent-deep); }
.evt-ico { width: 12px; height: 12px; flex: none; }
/* Pagination controls under the list. */
.events-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; margin-top: 0.9rem; }
.events-pager p { margin: 0; }
.events-pager-controls { display: flex; align-items: center; gap: 1rem; }
/* The shared list pager (src/lists.js) — same shape as the events pager. */
.list-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; margin-top: 0.9rem; }
.list-pager p { margin: 0; }
.list-pager-controls { display: flex; align-items: center; gap: 1rem; }
.events-filters { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: end; margin-bottom: 0.75rem; }
.events-filters label { display: flex; flex-direction: column; gap: 0.2rem; font-size: var(--t-ui-min); }
/* Status chips: reuse the .status pill base; per-state tints. */
.event-status-new { background: var(--panel-2); }
.event-status-reviewing { background: var(--panel-2); }
.event-status-assigned { background: var(--panel-2); }
.event-status-dismissed { background: var(--paper-2); color: var(--muted); }
.event-status-past { background: var(--paper-2); color: var(--muted); font-style: italic; }
/* The compact month calendar. */
.ecal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ecal th { font-size: var(--t-cell-min); text-align: center; color: var(--muted); padding: 0.2rem 0; }
.ecal-day { border: 1px solid var(--line); height: 2.6rem; vertical-align: top; padding: 0.15rem 0.25rem; font-size: var(--t-cell-min); }
.ecal-num { color: var(--muted); }
/* A DAY OUTSIDE THIS MONTH IS SAID BY THE CELL, NOT BY FADING THE NUMBER.
   `opacity: 0.4` composited --muted down to #C2C2C3 and measured 1.71:1 — the
   worst reading anywhere in SGE and unreadable in either theme. The cell already
   carries its own surface, which is the house's own way of saying "a step back",
   so the number keeps the token it was given and stays legible.
   Measured before and after by `node scripts/w1174-contrast-sweep.mjs`. */
.ecal-out { background: var(--paper-2); }
.ecal-out .ecal-num { color: var(--t3); }
.ecal-busy { background: var(--panel-2); }
.ecal-count { display: block; font-weight: 600; font-size: var(--t-cell-min); }
.ecal-nav { margin: 0.25rem 0 0.5rem; }
/* A day with events is a clickable link that filters the list to that day. */
.ecal-link { display: block; height: 100%; text-decoration: none; color: inherit; cursor: pointer; }
.ecal-link:hover { background: var(--accent-wash); }
.ecal-link .ecal-count { color: var(--accent); }
/* The currently-selected day, highlighted so it's obvious which is active. */
.ecal-selected { outline: 2px solid var(--accent); outline-offset: -2px; }
.ecal-selected, .ecal-selected .ecal-link { background: var(--accent-wash-2); }
.ecal-selected .ecal-num { color: var(--ink); font-weight: 600; }
/* The day-filter reset + note. */
.events-reset {
  align-self: center; font-size: var(--t-ui-min);
  display: inline-flex; align-items: center; min-height: var(--tap);
}
.events-daynote { margin: 0 0 0.6rem; }

/* ---- responsive (field phones ~390px) ---- */
@media (max-width: 720px) {
  /* 0.75rem, matching .appbar-inner below, for the same reason the desktop
     block gives main.frame the bar's own 1rem: the page name and the content
     under it share a left edge at every width (Keith, 3 September 2026:
     "Alignment issue").
     THE TOP MARGIN IS THE LADDER'S 12px HERE TOO — Keith, 17 September 2026,
     "There are many blank space on the top and the sides". A phone has the
     least height of anything SGE runs on, so the rung it can spare is worth
     most here. The side padding is untouched: it is what keeps the page name
     and the content on one left edge. */
  .frame { padding: 0 0.75rem; margin: var(--sp-sm) auto 2.5rem; }
  .appbar-inner { padding: 0.45rem 0.75rem; gap: 0.6rem; }
  .logo { height: 32px; }
  /* The mark is a link home, and on a phone it is pressed with a thumb: the link
     carries the same 44x44 target every other control at this width holds itself
     to (.pill). The mark is untouched — same asset, same 32px height, no crop —
     it is simply centred inside the target it now fills. */
  .logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }
  /* `display-md` whole — 34px / 600 / 1.47 / -0.374px. `display-lg`'s 40px is
     four words across a 390px screen; this is the token below it, not a number
     invented to fit. */
  .headline {
    font-size: var(--fs-display-md); line-height: 1.47; letter-spacing: var(--ls-body);
  }
  .scard { padding: var(--sp-md); }
  .id-role { display: none; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  /* EXCEPT THE APPROVALS NUMBERS, WHICH STACK. Two across is right for a tile
     holding a figure and a two-word label; the approvals tiles carry sentences
     under the figure ("planned visits a salesperson has sent for approval",
     "SGE cannot record or show a Grow ask yet…"), and at 390x844 on
     5 September 2026 the rule above gave each of them about 155px, so both read
     as a column of broken words against the right edge of the screen. One
     across, full width, nothing dropped. Only this row: the class is set on the
     approvals head alone (src/approvals/render.js) and every other `.tiles` in
     SGE keeps the two columns. */
  .tiles.appr-tiles { grid-template-columns: 1fr; }
  .panels { grid-template-columns: 1fr; }
  /* On a phone the five columns do not fit: each row goes back to being its own
     stack, label over bar over figure, sentence, sparkline. */
  .score-breakdown { display: block; }
  .score-row { display: grid; grid-template-columns: 1fr; gap: 0.25rem; margin-bottom: 0.65rem; }
  .score-figure { text-align: left; }
  .detail, .lead-dl { grid-template-columns: 1fr; gap: 0.1rem 0; }
  .detail dt, .lead-dl dt { margin-top: 0.5rem; }
  /* THE TYPE DOES NOT SHRINK ON A PHONE. This used to drop every table to
     0.84rem — 13.44px — which is the exact trade catalogue 16.5 tier 1 forbids
     ("The type scale is the same at every width … space is bought by removing
     content, not by shrinking type"). The padding below is the compact step of
     the one spacing scale, which 16.5 does allow. */
  table { font-size: var(--t-cell); }
  th, td { padding: 0.5rem 0.4rem; }
  .search { flex-wrap: wrap; }
  /* A PHONE STILL READS THE WHOLE ROW. The name takes its own line and the
     three figures — now, allowed, and the box — sit under it on one line, so
     nothing is lost and nothing needs a sideways scroll. */
  .setting-name { flex: 1 1 100%; }
  .setting-input { margin-left: auto; }

  /* ---- THE SIDEWAYS SCROLL (survey #46) ----
     Eleven screens were wider than a 390px phone: /contacts reached 757px,
     /campaigns/1 707px, /leads 627px. It was always the same cause — a table
     with six to eight columns — and the consequence was that the whole PAGE
     moved sideways, taking the nav and the headings with it, and putting a
     column (the Salesperson column on /customers) off the edge with nothing
     saying it was there.

     The scroll is now contained to the table, which is the frame /calendar and
     /report already use (.cal-scroll). The page itself holds still and every
     column stays reachable by dragging the table.

     Stated plainly: L11's strict reading is that no table should need
     horizontal scrolling at all on the device it is used on, which means a
     card layout per list rather than a table. That is a redesign of nine
     screens and is NOT what this is. This is the same fix the app already
     made twice, applied consistently.

     AND ON 22 AUGUST 2026 THE STRICT READING WAS BUILT. A list marked
     `.cardlist` is one card per record below 768px (see the block at the foot of
     this file) — no columns off the edge and nothing to drag sideways — so it is
     excluded here: it is no longer a table that scrolls. Everything else on a
     phone keeps the contained scroll. */
  table:not(.cardlist):not(.cal-week):not(.cal-month):not(.compared):not(.growth-revenue):not(.debrief-dl) {
    display: block;
    overflow-x: auto;
    max-width: 100%;
    white-space: nowrap;
  }
  /* AND THE HEADING IS MEASURED AGAINST THE TABLE HERE TOO, so its offset is
     zero — see "AN OFFSET THAT DESCRIBES THE WINDOW" above. A list is one card
     per record at this width and has no heading row to place; this is for the
     grids and figure tables that are still tables on a phone. */
  table:not(.cardlist):not(.cal-week):not(.cal-month):not(.compared):not(.growth-revenue):not(.debrief-dl) thead th {
    top: 0;
  }
  /* The score charts are drawn at their natural width; on a phone they shrink
     to the column rather than pushing the page sideways. */
  svg { max-width: 100%; height: auto; }
  /* A cell that holds a sentence still wraps — only the row is kept on one
     line, so a next action or an empty state does not become a mile wide. */
  .scard table td.wrap, .scard table td[colspan] { white-space: normal; }
  .scard table .muted { white-space: normal; }
}

@media (max-width: 460px) {
  .identity { display: none; }
}

/* ---- training guide ---- */
/* PASS 2 §2.2: a callout in the guide is a block of text with a rule down it.
   Nothing in it is pressed, so neither the rule nor the wash is the action
   colour any more. */
.callout {
  border-left: 4px solid var(--faint);
  background: var(--paper-2);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  margin: 0.9rem 0;
  color: var(--ink-2);
}
.guide-toc li { margin: 0.55rem 0; }
.guide-list { padding-left: 1.2rem; }
.guide-list li { margin: 0.3rem 0; }
.guide-pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.2rem 0 0; }

/* THE GUIDE'S OWN CONTROLS CLEAR THE THUMB FLOOR — BS-001 V8, 44px, which Keith
   re-confirmed on 20 September 2026 ("understand.. then maintan it.").

   Measured on 25-09-2026 by `node scripts/w-b12-guide-views.mjs`: all 24 of the
   24 phone page-views carried at least one control under the floor, and they
   were THE GUIDE'S ONLY NAVIGATION — "Start at the beginning" on the index and
   the previous/next pager at the foot of every module, both 16px tall because
   both were plain text links; "Try it", which is the one control on the page
   that sends a person to the live screen, the same 16px; and "Show me the
   answer" at 41px, three short of the floor on its own padding.

   THE WORDING IS UNTOUCHED and none of them becomes a button: they stay the
   links they are, given the height a thumb needs. `inline-flex` is what lets a
   link carry a min-height at all — and it is deliberately NOT used on the
   <summary>, where it removes the disclosure marker in WebKit (see
   .guide-look-a summary above); that one reaches the floor on padding. */
.guide-pager a,
a.guide-continue,
.guide-do-head a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding-block: 0.3rem;
}
/* A screenshot of the step it sits under. Files live in public/guide-shots/. */
.guide-shot { margin: 0.9rem 0; }
.guide-shot img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.guide-shot figcaption { color: var(--ink-2); font-size: var(--fs-caption); margin-top: 0.35rem; }

/* THE FILM ON A MODULE PAGE, AND IT KEEPS ITS PLACE IN THE COLUMN.
   Nothing here styled `<video>` at all, so it drew at the file's own pixel
   width and the page went sideways with it at EVERY width — measured on
   /guide/director/1 with `node scripts/w-secc-sweep.mjs --only C126b`: the
   player 1552px wide in a 1440px window (page 1552, +112) and 1509px wide in a
   390px one. Keith's own rule for the lists is the rule here: "Keep it within
   the windows."
   The same three lines the screenshot above already carries, so a film and a
   still photograph of a screen sit in the column the same way. */
/* AND IT HAS A CEILING ON ITS HEIGHT, AND A STRIP OF ITS OWN FOR THE CONTROLS.
   Keith, 25 September 2026, item 3 — the guide looked at on a phone and a
   tablet. Two faults measured by `node scripts/w-b12-guide-views.mjs` and
   recorded in docs/2026-09-25-sge-guide-views.html:

   ONE — `height: auto` with no ceiling. The films are 1440x918, so at a desk
   the player drew 1337x853 in a 939px window: 749px of it on screen when the
   page opened and the browser's own play, scrub and full-screen controls —
   which sit along the player's BOTTOM edge — below the fold. At 844x390, a
   phone turned sideways, 509px of film went into 277px of window and there was
   no scroll position at which more than 54% of the picture was on screen.

   TWO — the subtitle is BURNED INTO THE PICTURE (Keith, 23 September 2026:
   "Burn in.", and "do make sure it doesn't blocks the view"). The file is a
   1440x810 screen recording with a 108px subtitle band under it, and the
   browser draws its control bar and the gradient behind it over the bottom
   35-48px of the player — which at phone portrait is more than the whole band
   as displayed. The films are not re-made to fix this and must not be: it is
   solved by how the player is SIZED AND PLACED.

   BOTH ARE THE SAME BOX. The stage is the picture's own ratio PLUS a fixed
   strip at the foot — `calc(63.75% + var(--film-controls))`, 63.75% being
   918/1440 as a percentage of the stage's own width. The film is drawn into it
   with `object-fit: contain` and `object-position: center top`, so it fills the
   width, sits hard against the top, and the strip at the bottom carries no
   picture at all. The control bar draws over the strip instead of over the
   subtitle, at every width, because the strip is a fixed number of pixels and
   the control bar is too.

   THE CEILING IS THE WINDOW, MINUS THE BAR THAT FLOATS OVER IT. --appbar-h is
   56px in this file and is re-published by public/page-title-fit.js as the
   bar's REAL height whenever the bar has taken a second row, which is the case
   this ceiling most needs to get right: 113px of a 390px window. 75% of what is
   left is the player's, and the rest is the page's own head and the caption
   under it. The ceiling is a height, and the box is sized by its WIDTH, so it
   is stated as the width that produces that height — strip taken off first,
   then divided by the ratio — and `margin-inline: auto` centres the box when it
   comes out narrower than the column. 200px is the floor: a window too short to
   give the film that has bigger problems than this rule can answer.

   `svh` IS THE SMALL VIEWPORT HEIGHT — the window with the phone's address bar
   SHOWING, which is the state a person arrives in. `vh` is the answer where it
   is not supported, and it is the larger of the two, so the fallback errs
   towards a bigger picture rather than a cut one. */
.guide-video {
  margin: 0.9rem 0;
  --film-controls: 52px;
  --film-ceiling: max(200px, calc((100vh - var(--appbar-h, 56px)) * 0.75));
}
@supports (height: 100svh) {
  .guide-video { --film-ceiling: max(200px, calc((100svh - var(--appbar-h, 56px)) * 0.75)); }
}
/* THE CEILING AND THE BOX ARE TWO ELEMENTS, and they have to be. A percentage
   padding resolves against the CONTAINING BLOCK's width, not against the
   element's own — measured here on 25-09-2026 with
   `node scripts/w-b12b-guide-probe.mjs`: with both on one element the stage came
   out 1073x906 at a desk instead of 1073x736, because the 63.75% was taken off
   the 1337px column the figure sits in. So the ceiling is the outer box and the
   ratio is the inner one, whose containing block is the outer box exactly. */
/* AND IT STARTS WHERE EVERY LINE ON THE PAGE STARTS. Keith, 26 September 2026:
   "this very ugly... the whole layout". The box was centred in its column, and
   every word around it is left-aligned, so at 1440px wide the film began at
   x=286 while the first line of text began at x=72 — a 214px gutter down the
   left of the film with nothing in it, measured by
   `node scripts/training-rebuild-shots.mjs`. Centring a picture inside a column
   of left-aligned prose is the whole of that fault. The ceiling above is
   untouched: the film is still capped by the height of the window so its own
   control bar cannot fall below the fold. */
.guide-video-fit {
  max-width: calc((var(--film-ceiling) - var(--film-controls)) / 0.6375);
  margin-inline: 0;
}
.guide-video-stage {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: calc(63.75% + var(--film-controls));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--film-backing);
  overflow: hidden;
}
.guide-video-player {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  background: var(--film-backing);
}
.guide-video figcaption { color: var(--ink-2); font-size: var(--fs-caption); margin-top: 0.35rem; }

/* ---- guide (rewritten 19 September 2026) ---- */
/* TRY IT. The block that sends somebody to the live screen, which is the whole
   of the training — the guide is not a thing to read. It carries the action
   colour down its left edge because it IS the action on the page. */
.guide-do {
  border-left: 4px solid var(--accent, var(--blue));
  background: var(--paper-2);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  margin: 0.9rem 0;
}
.guide-do-head { margin: 0 0 0.4rem; font-weight: 600; }
.guide-do-steps { margin: 0; padding-left: 1.2rem; }
.guide-do-steps li { margin: 0.3rem 0; }
.guide-do-see { margin: 0.6rem 0 0; color: var(--ink-2); }
/* LOOK AT THE SCREEN. Never graded, so it is not a form and there is no button
   that can tell anybody they were wrong. The answer is behind a <details>,
   which is BS-001 G5 — collapsible, never blocking, and no client script. */
.guide-look {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  margin: 0.9rem 0;
}
.guide-look-q { margin: 0; font-weight: 600; }
.guide-look-a { margin-top: 0.5rem; color: var(--ink-2); }
/* The disclosure triangle is the affordance, so the marker stays — `display:
   flex` on a <summary> removes it in WebKit and the row reads as dead text.
   Padding, not flex, gets it to the 44px touch floor (BS-001 V8). */
.guide-look-a summary { cursor: pointer; padding: 0.875rem 0; font-weight: 600; }
/* THE MODULE PAGE IS THE HEIGHT OF THE WINDOW, AND ITS PAGER STANDS AT THE FOOT
   OF IT. `min-height` only ever GROWS a page: a module long enough to fill the
   window is untouched and nothing new scrolls. The window's own height less the
   app bar floating over it and the frame's 12px top and bottom margins — the
   same --appbar-h public/page-title-fit.js republishes when the bar has taken a
   second row, so a two-row bar does not push the foot off the screen.

   AND ON A PHONE IT ANSWERS THE OTHER HALF OF THE DOCK. A module short enough
   not to scroll left its pager — the page's only way forward — sitting under the
   foot block at the one scroll position there is: measured at 390x844 on
   /guide/director/6, both pager links were painted over by the quick dock. The
   frame's own bottom clearance cannot reach that, because clearance below the
   content only helps a page long enough to scroll. Here the column stops ABOVE
   the foot block instead, so the pager lands clear of it without scrolling.
   The 40px is `.frame`'s own bottom margin at this width (the 720px block
   above), and --bottombar-h, --tap and --sp-xl are exactly what main.frame
   reserves for the bar and the dock standing on it. */
.guide-module {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--appbar-h, 56px) - (var(--sp-sm) * 2));
}
.guide-module > .guide-pager { margin-top: auto; }
@supports (height: 100svh) {
  .guide-module { min-height: calc(100svh - var(--appbar-h, 56px) - (var(--sp-sm) * 2)); }
}
@media (max-width: 767px) {
  body:has(.nav-bottombar) .guide-module {
    min-height: calc(100svh - var(--appbar-h, 56px) - var(--sp-sm) - 40px
      - var(--bottombar-h, 56px) - var(--tap) - var(--sp-xl));
  }
}
.guide-row { margin: 0.55rem 0; }
.guide-row-here > a { font-weight: 600; }
.guide-mins { font-size: var(--fs-caption); color: var(--muted); margin-left: 0.4rem; white-space: nowrap; }

/* ---- TRAINING: THE TWO PANES, THE PROGRESS, AND THE SKIP RULE -------------
   26 September 2026. Keith, looking at the two screens: "this very ugly... the
   whole layout.. Since there is a big space on the right shuld the video be
   there. And the Right is the menu but not this manner. too ugly.. … and also
   they should thir progress.. to know whether they complete 100% of the
   trainign course. I also how do user know whether they compelted that video or
   now."

   WHAT WAS THERE. One column, the whole page. At 1440px wide the list page ran
   2492px tall — twenty-seven numbered items with a paragraph each — and the
   module page ran 1680px against a 900px window, with the film centred in a
   1337px column so it began 214px to the right of every line of text around it.
   Both measured by `node scripts/training-rebuild-shots.mjs`. The right-hand
   half of the browser held nothing at either address.

   WHAT IT IS NOW. The right-hand space is the course: where you are in it, how
   much of it has played, and every module with its own mark. It is the same
   rail on the list page and on a module page, so it does not move when you step
   into a module — which is what makes it a menu rather than a page of links.

   ONE PANE BELOW 1024px. SGE's desk breakpoint. The rail stacks under the main
   column, which puts the contents at the foot of a module (where a contents
   list belongs when you cannot have it beside you) and under the "carry on"
   card on the list page. A sticky rail on a phone would eat the screen the film
   has to live in — module 3 is about using SGE in a car park. */
.tr-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-md);
  align-items: start;
}
@media (min-width: 1024px) {
  .tr-shell { grid-template-columns: minmax(0, 1fr) 300px; }
  /* THE RAIL STANDS STILL WHILE THE MODULE SCROLLS. `top` clears the app bar
     floating over the page, and the max-height is what is left of the window
     under it, so a 27-module course scrolls inside its own pane instead of
     making the page taller than the content it is beside. */
  .tr-rail {
    position: sticky;
    top: calc(var(--appbar-h, 56px) + var(--sp-sm));
    max-height: calc(100vh - var(--appbar-h, 56px) - (var(--sp-sm) * 2));
    overflow-y: auto;
  }
  @supports (height: 100svh) {
    .tr-rail { max-height: calc(100svh - var(--appbar-h, 56px) - (var(--sp-sm) * 2)); }
  }
}
.tr-main { min-width: 0; }
.tr-rail {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  padding: var(--sp-sm);
}

/* WHERE THE WHOLE COURSE STANDS — the first question Keith asked of this
   screen, answered as a figure and not as a sentence. The bar is the ONE bar
   SGE already draws (.score-bar / .score-fill / .w-N), so nothing new is drawn
   and the CSP stays where it is: no inline width. */
.tr-progress { margin-bottom: var(--sp-sm); }
.tr-progress-head { margin: 0; font-size: var(--fs-caption); font-weight: 600; color: var(--ink-2); }
.tr-progress-fig { margin: 0.1rem 0 0.35rem; font-size: 28px; font-weight: 700; line-height: 1.1; }
.tr-progress-line { margin: 0.4rem 0 0; font-size: var(--fs-caption); color: var(--ink-2); }
.tr-progress-note { margin: 0.2rem 0 0; font-size: var(--fs-caption); }

/* THE LEGEND. Keith's own rule for anything read by a colour or a shape: "a
   legend will be need to tell what each mean". Three markers, one line, said
   once — which is what lets every row below carry a shape instead of a
   sentence. */
.tr-legend {
  margin: 0.5rem 0 0;
  font-size: var(--fs-caption);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.6rem;
}
/* A MARKER AND ITS WORDS ARE ONE THING AND DO NOT COME APART. Left to wrap on
   their own, the third marker sat at the end of one line with "Not played yet"
   on the next, so the legend read as a shape with nothing beside it and a phrase
   with nothing in front of it. */
.tr-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

/* THE MARK IS A GAUGE. IT WAS A CIRCLE, AND A CIRCLE IS A RADIO BUTTON.
   ------------------------------------------------------------------------
   KEITH, 26 September 2026 at 15:59, reading this rail: "what is the radio
   button for? you are going to multipl select and do somethign tight".

   He is right, and it is the whole fault. An 11px ring with an optional fill in
   the middle IS the drawing of a radio control — the thing a person taps to
   pick one of several before pressing something. It meant "played in full /
   part played / not played yet", which is a STATUS, and a status marker must
   never be drawn as a control somebody could select.

   SO IT IS A BAR THAT FILLS. Nobody has ever selected a bar. It reads left to
   right as an amount — full, half, empty — which is exactly what it is saying,
   and it is the same drawing as the course's own progress bar above it
   (.score-bar / .score-fill), so the rail carries one idea and not two. Same
   classes, same three states, same legend: only the shape changed.

   Drawn in CSS and not typed as a character, so it does not depend on a font
   having the glyph. */
.tr-mark {
  display: inline-block;
  flex: none;
  width: 26px;
  height: 6px;
  border: 0;
  border-radius: var(--r-pill);
  /* THE EMPTY TRACK. A gauge always shows its own length, so "not played yet"
     is a full-length track with nothing in it rather than an absence. */
  background: var(--line);
  vertical-align: middle;
}
.tr-mark-done { background: var(--green); }
/* PART PLAYED — half filled, which is what it is. The gradient is a fill, not a
   colour literal, so gate 1 has nothing to catch. */
.tr-mark-part {
  background: linear-gradient(90deg, var(--amber) 0 50%, var(--line) 50% 100%);
}
.tr-mark-none { background: var(--line); }
/* NO VIDEO ON THIS MODULE AT ALL — a broken track, not an empty one, because
   "nobody has played it" and "there is nothing to play" are different
   statements and the second one is a gap to be filled. Keith: "There should be
   video for all right topic right?" */
.tr-mark-nofilm {
  background: repeating-linear-gradient(90deg, var(--muted) 0 3px, transparent 3px 7px);
}

/* THE COURSE, AS A ROW PER MODULE. The mark, the title, the minutes — and the
   state word carried for a hover and for a screen reader rather than printed
   twenty-seven times, which is how the old list became a wall. */
.tr-contents-head {
  margin: 0 0 0.35rem;
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--ink-2);
}
.tr-contents .guide-toc,
.tr-course .guide-toc {
  list-style: none;
  padding-left: 0;
  margin: 0;
  /* The buttons are separate things and stand apart. */
  display: grid;
  gap: 0.3rem;
}
/* THE GAP IS THE ONLY SPACING BETWEEN TWO BUTTONS. `.guide-toc li` above sets a
   margin for the older prose lists and outranks `.tr-row` on specificity, which
   added 17.6px to every row on top of the gap — 66px of pitch for a 46px
   button. Zeroed here rather than by raising `.tr-row`, so the older lists keep
   the margin they were written with. */
.tr-contents .guide-toc > li,
.tr-course .guide-toc > li { margin: 0; }
/* THE STACKED RAIL ON A MODULE PAGE IS A BOX, NOT A SECOND PAGE. Below the desk
   breakpoint the rail sits under the film, and twenty-seven rows at the touch
   floor is 1188px of menu behind every three-minute module — measured at 390px
   wide, /guide/sales_manager/1 went from 1924px tall to 3621px. Seven rows and
   a scroll of its own, with the count in the heading so nothing is hidden
   quietly. The LIST page carries no cap: there the course is the page. */
@media (max-width: 1023px) {
  .tr-rail-compact .tr-contents .guide-toc {
    max-height: calc(var(--tap) * 7);
    overflow-y: auto;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    padding-inline: 0.35rem;
  }
}
/* EACH TOPIC IS A BUTTON, AND THE WHOLE OF IT PRESSES.
   ------------------------------------------------------------------------
   KEITH, 26 September 2026 at 15:59: "Can't it be like a button to each topic..
   it's looks so weird."

   It was a line of text with a control floating beside it. It is now a
   pressable thing: its own edge, its own fill, its own hover and pressed
   states, and a hit area that is the WHOLE row rather than the words in the
   middle of it. The gauge and the minutes sit INSIDE the button they belong to,
   which is also what stops the marker reading as something separate to tick.

   THE ROW IS THE TOUCH FLOOR TALL (BS-001 V8, --tap). Pack them tighter and the
   bands below would overlap, so the strip between two titles would belong to
   whichever painted last and a tap would land on the wrong module. */
.tr-row {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  /* THE FLOOR IS THE WHOLE OF THE HEIGHT. No vertical padding on top of it:
     the button is a thumb tall and not a pixel more, because the rail has to
     hold twenty-seven of them and "space is very very important" (Keith, 30
     August 2026). A title that wraps to two lines grows its own button. */
  min-height: var(--tap);
  padding: 0 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}
/* Hover and press belong to the BUTTON, not to the four words inside it — and
   never as an underline: "When mouse over, can the words not be underline?" */
.tr-row:hover { background: var(--paper-2); }
.tr-row:active { background: var(--panel-2); }
.tr-row:has(> a:focus-visible) { outline: 2px solid var(--accent-fill); outline-offset: 1px; }
.tr-row > a { min-width: 0; color: var(--t1); text-decoration: none; font-weight: 500; }
.tr-row > a:hover { text-decoration: none; }
/* THE WHOLE BUTTON IS THE TARGET. `.guide-toc > li > a` already carries a 44px
   band (BS-001 V8, near the foot of this file) centred on the LINK — the middle
   column only, so the gauge and the minutes were dead ground. Standing the row
   up as the containing block and taking the band out to the row's own edges
   makes the target the button a person can see, which is bigger than it was and
   cannot reach into the row above or below: the rows no longer overlap, they
   are separate boxes with a gap between them. */
.tr-row > a { position: static; }
.tr-row > a::after {
  inset: 0;
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  min-width: 0;
  transform: none;
  border-radius: var(--radius-sm);
}
/* THE WORD BEHIND THE MARK. Present for a screen reader, clipped for the eye —
   the legend above is what the eye reads. */
.tr-row-said {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* THE ONE YOU ARE STANDING ON. A pressed button, not a highlighted line. */
.tr-row.guide-row-here {
  background: var(--paper-2);
  border-color: var(--accent-fill);
  box-shadow: inset 2px 0 0 var(--accent-fill);
}

/* THE LIST PAGE IS THE COURSE, IN ONE COLUMN.
   ------------------------------------------------------------------------
   KEITH, 26 September 2026 at 15:59: "I really don't like this way of
   displaying the infromaiton. Are you that bad with layout design?"

   The page carried everything EXCEPT the topics: a progress line, the path's
   name, a description, a module count, a pick-up link, three other paths with a
   sentence each, and a roster of fifteen colleagues — and the course itself sat
   in the 300px rail beside it, which on a phone stacks last, so the first topic
   began 1835px down. One column now, in the order a person wants it: where am
   I, what do I press next, then every topic. The rail stays on the MODULE page,
   where the content is a film and a menu belongs beside it. */
.tr-index { min-width: 0; }

/* 1 AND 2 IN ONE STRIP: where am I on the left, what to press on the right. */
.tr-standing {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-sm);
  align-items: start;
  margin-bottom: var(--sp-lg);
  padding: var(--sp-sm);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}
@media (min-width: 700px) {
  .tr-standing {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: var(--sp-lg);
    align-items: center;
  }
}
.tr-standing-fig { min-width: 0; }
.tr-standing-go {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}
.tr-standing-note { margin: 0; font-size: var(--fs-caption); }
/* THE PRIMARY CARRIES THE MODULE IT GOES TO, and a module title is not short.
   `.btn-primary` is `nowrap` because a primary action is usually two words; at
   390px this one has to wrap rather than run off the side of the phone. */
.tr-standing .btn-primary {
  white-space: normal;
  text-align: left;
  max-width: 100%;
}

/* 3. THE TOPICS, IN THE WIDTH THEY WERE NEVER GIVEN. The same buttons the rail
   draws; the column is the page, so they run in as many tracks as fit and the
   whole course is one glance at a desk instead of a scroll inside a pane. */
.tr-course { margin-bottom: var(--sp-lg); }
.tr-course .tr-legend { margin: 0 0 var(--sp-sm); }
@media (min-width: 700px) {
  .tr-course .guide-toc { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}
/* "NO VIDEO", SAID AND NOT ONLY SHAPED. Two of the twenty-seven modules have no
   film yet. In the rail the dashed track and the legend carry it; here there is
   room for the word, and a list that showed those two as "not played yet" would
   be telling the reader something untrue about themselves. */
.tr-course .tr-row-gap {
  margin-left: 0.4rem;
  font-size: var(--fs-caption);
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}

/* THE FOOT — everything that is not this person's learning. The other paths as
   a line of names, and the two lists that used to sit above the course as
   disclosures: shut, a row each, one press to open, no script (BS-001 G5). */
.tr-foot {
  margin-top: var(--sp-lg);
  padding-top: var(--sp-sm);
  border-top: 1px solid var(--line);
}
.tr-foot-line { margin: 0 0 var(--sp-sm); font-size: var(--fs-caption); }
.tr-foot-det { margin: 0 0 var(--sp-xs); }
.tr-foot-det > summary {
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--t2);
  cursor: pointer;
  /* THE TOUCH FLOOR ON THE ROW A THUMB PRESSES (BS-001 V8, --tap). Reached on
     padding: `inline-flex` would do it too and removes the disclosure marker in
     WebKit, which is why .guide-look-a's summary does the same thing this way.
     Measured 39px at 0.65rem — three short — and 46px here, at all five views
     (`node scripts/w-training-list-measure.mjs`). */
  padding-block: 0.85rem;
}
.tr-foot-det > summary:hover { color: var(--t1); }
.tr-foot-det .guide-list { margin-top: 0.2rem; }

/* A MODULE'S OWN STATE, AS A CHIP. It used to be the words "Not played yet."
   set in grey, in a paragraph, below a player that was itself below the fold. */
.tr-state {
  display: inline-block;
  font-size: var(--fs-caption);
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--line);
}
.tr-state-done { color: var(--green); border-color: var(--green); }
.tr-state-part { color: var(--amber); border-color: var(--amber); }
.tr-state-none { color: var(--ink-2); }

/* THE SKIP RULE, SAID UNDER THE PLAYER. Keith: "they must compelte it and canno
   skip it. I think skip is only allow if they compelted the video at least
   once." A person must be able to see which of the two they are in and why —
   shut reads as a condition, open reads as a permission. */
.tr-lock {
  margin: 0.35rem 0 0;
  font-size: var(--fs-caption);
  border-left: 3px solid var(--line);
  padding-left: 0.6rem;
}
.tr-lock-shut { color: var(--ink-2); border-left-color: var(--ink-3); }
.tr-lock-open { color: var(--green); border-left-color: var(--green); }

/* ---- guide v2: checks + progress ---- */
.guide-state { font-size: var(--fs-caption); color: var(--ink-2); margin-left: 0.4rem; white-space: nowrap; }
.guide-passed { color: var(--green); font-weight: 600; }
.guide-continue { font-weight: 600; }
/* PASS 2 §2.3: "you have finished this track" is the good news on the screen
   and it was a tinted brown. Green. */
.track-complete {
  border: 1px solid var(--green);
  background: var(--green-soft);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  margin: 0.9rem 0;
}
.track-complete-title { margin: 0; font-weight: 600; color: var(--green); }
/* A QUIZ QUESTION IS A FORM GROUP, so it takes the heading-and-a-rule the base
   rule gives every other one (Task 5, 28 August 2026) rather than its own box.
   The answers under it are `label.otile` and keep their boxes: those ARE the
   thing you tap. */
.quiz-q { margin: var(--space-lg) 0; }
/* PASS 3 §3.2 — a THIRD local fight with the global rule, alongside the two
   the spec names. `.quiz-q label.inline { display: block; margin: 0.25rem 0 }`
   existed only to stop `label.inline`'s inline-block running the quiz answers
   together; the option grid does that properly now, and this rule outweighed
   it (0,2,1 against 0,1,1) so it had to go rather than sit there silently
   winning. The answers carry `.otile` — see `label.otile` at the end of this
   file. Nothing else in SGE used this selector. */
.quiz-verdict { font-weight: 600; }
.quiz-pass { color: var(--green); }
.quiz-fail { color: var(--red); }
.quiz-result { border-left: 4px solid var(--line); padding: 0.4rem 0.9rem; margin: 0.7rem 0; }
.quiz-result.quiz-ok { border-left-color: var(--green); }
.quiz-result.quiz-wrong { border-left-color: var(--red); }
.quiz-why { color: var(--ink-2); background: var(--paper-2); border-radius: var(--radius-sm); padding: 0.45rem 0.6rem; }

/* ---- daily report ---- */
.tile-sub { display: block; font-size: var(--fs-caption); color: var(--muted); margin-top: 0.15rem; }
.report-nav { margin: 0 0 0.6rem; }
.report-sp { margin: 0.9rem 0 0.3rem; font-size: var(--fs-caption); }
.report-log { padding-left: 1.2rem; }
.report-log li { margin: 0.25rem 0; }

/* ---- visits calendar ----
   THE CALENDAR TAKES THE MAXIMUM SPACE THE SCREEN ALLOWS. Keith's standing rule,
   in his own words: "And the calendar need to take the mixmum space possible. is
   is very imaportant".

   AND SINCE 30 AUGUST 2026 IT IS THE ACCOUNTS SHELL that achieves it rather than
   a toolbar of its own: `.acct-shell` gives the window to the grid through one
   flex chain, so the grid is exactly what is left under the app bar and the page
   itself does not scroll. What is left here is the calendar's OWN furniture —
   the date movement, the three views, the range label and the three grids.

   WHAT WENT, AND WHY. `.cal-top` (the seven-block header), `.cal-title`, the
   bespoke salesperson chooser and the COLOUR KEY. Keith struck the key on
   30 August 2026, and nothing it said is lost: the appointment's state is a word
   on the block ("Planned", "Overdue", "Done") and the owner is their short code,
   both of which have been on the block since the never-colour-alone pass. A key
   is what you need when the colour is the only carrier, and it is not. */

/* WHICH WEEK OR MONTH IS ON SCREEN — THE HEADING OF THE GRID, not an item in
   the toolbar.
   Keith, 3 September 2026: "the date shown here is too blend in. need to make
   it stand out more to the user but do't overdo it"; then, 4 September, after
   it had been made semibold and left where it was: "The date/month is still too
   blended in with the month/day/week control".
   So it left the toolbar's left-hand group (src/app.js) and sits on its own
   line directly above the grid, in the page's own ink at tagline size. The
   space around it is what separates it from the controls — no banner, no
   colour block, no display type, which is his "don't overdo it". */
.cal-range {
  margin: 0 0 var(--sp-xs);
  font-size: var(--fs-tagline); font-weight: 600; line-height: 1.19;
  letter-spacing: var(--ls-body); color: var(--t1); white-space: nowrap;
  flex: 0 0 auto;
}
/* Prev · Today · Next. The two arrows are targets in their own right, so they
   hold the tap floor rather than being two characters in a sentence. */
.cal-move { display: inline-flex; align-items: center; gap: var(--space-xxs); }
.cal-move > a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--tap); min-height: var(--tap); padding: 0 var(--space-xs);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  text-decoration: none; font-size: var(--fs-caption); color: var(--t1);
}
.cal-move > a:hover { background: var(--panel-2); border-color: var(--faint); }
.cal-views { display: flex; gap: 0.4rem; margin: 0; }
/* ON A PHONE the toolbar WRAPS rather than shrinking or cutting anything.
   Measured at 390px before this block: the left group is one non-wrapping row on
   every list, which is right for a search box and two icons and wrong for four
   date controls and three views — "Month" was cut off at the right edge, so a
   reader could not reach the month view.

   It is scoped to the toolbar that HAS the view switcher, so every other list's
   one-row toolbar is untouched — the same `:has()` the panes themselves open by.
   Nothing shrinks: the arrows, Today and the three views keep their tap floor
   and take a second row when they need one. The date label is no longer in this
   group at all (4 September 2026), so it is not named here. */
@media (max-width: 767px) {
  .acct-toolbar:has(.cal-views) .tb-left { flex-wrap: wrap; }
  .cal-views { flex-wrap: wrap; }
  /* AND THE TWO ICONS DO NOT TAKE A ROW OF THEIR OWN. MEASURED on /calendar at
     390x844 on 22 September 2026: the toolbar was 156px tall in three bands —
     the arrows and Today on one, Day / Week / Month on the next, and the filter
     and export icons alone on a third, pressed to the far right by a 236px left
     margin with nothing beside them. A fifth of the screen before the week is
     reached, and the same fault Keith has already named once on the Inbound
     leads toolbar: "the row reads as two broken groups". Here it was three.

     `.tb-left` carries an 18rem basis, which is 288px and fills this 332px line
     on its own, so the icons were pushed onto a line of their own and then
     `margin-left: auto` threw them to the end of it. A zero basis lets the left
     group take what is left after the icons instead of taking the line, and
     dropping the auto margin closes the gap; `flex-end` is what puts the icons
     level with the Day / Week / Month row rather than floating against the
     middle of a two-row group. The auto margin STAYS above 768px — it is what
     holds the icons at the right-hand end of a full-width toolbar on a desk. */
  .acct-toolbar:has(.cal-views) { align-items: flex-end; }
  .acct-toolbar:has(.cal-views) .tb-left { flex: 1 1 0; }
  .acct-toolbar:has(.cal-views) .tb-right { margin-left: 0; }
}
/* The grid, with no card round it: a box means you can tap this, and the grid is
   not a control. What it was spending on the card's padding it now spends on
   cells. It is the thing that scrolls inside the Accounts shell's main column,
   which is how the page holds still while a month of six rows does not. */
.cal-body { margin: 0; flex: 1 1 auto; min-height: 0; overflow: auto; }
.acct-main > .cal-body { display: flex; flex-direction: column; }
/* AN OFFSET THAT DESCRIBES THE WINDOW MEANS NOTHING INSIDE A SCROLLPORT, and
   this box is one now. The shell pins every `thead th` at 56px — the app bar —
   which is right while the WINDOW scrolls the table; inside a box that scrolls
   itself, the same declaration pushes the header row 56px DOWN, over the first
   row of the grid. That is the fault Keith photographed on this very screen in
   the week view, and test/list-header-offset.test.js is the gate that now
   refuses any frame written without this line beside it. */
.cal-body thead th { top: 0; }

/* Phones scroll the grids sideways instead of crushing the columns. */
.cal-scroll { overflow-x: auto; }
/* AND ON THE PLANNER IT IS NOT A SECOND SCROLLPORT — rows 71 and 82 of the
   5 September review: "Planner board is a short box holding roughly twice its
   height", and at 1024x768 "1 of its 9 rows".
   THE CAUSE, MEASURED (command: node scripts/w1755-planner-frame.mjs). On
   /calendar the scroller's parent is `div.cal-body`, so the rule below hands it
   the height that is left — 736px box, 0 below the window. On /planner the
   parent is `div.acct-scroll`, the standard list box, which is ALREADY the
   vertical scrollport and already carries the sticky headings. That rule never
   matches there, so `.cal-scroll` took its natural 999px — and because
   `overflow-x: auto` above computes `overflow-y` to `auto` as well, it opened a
   SECOND vertical scrollport inside the first: 999px of board in a 503px box, in
   a 503px box, 441px of it below the window.
   One box scrolls, and it is the one Keith's own rule names — "Keep it within
   the windows. so it can be scroll within the box". The board keeps its natural
   height inside it and the headings stay pinned to the box's top. Sideways is
   not lost: `.acct-scroll` scrolls both ways. */
.acct-scroll > .cal-scroll { overflow: visible; }
/* AND THE GRID FILLS WHAT IT WAS GIVEN — Keith: "the calendar need to take the
   mixmum space possible. is is very imaportant". The shell hands the main
   column's whole height to `.cal-body`; without these two lines the table drew
   at its natural height and left the bottom third of a 900px window empty, which
   is the same waste read from the other end. A table given a height distributes
   it across its rows, so a week's lanes and a month's six weeks grow into the
   space instead of sitting in the top of it — and the per-cell `height` declared
   below is a floor in a table, so nothing is ever squashed to fit. */
.cal-body > .cal-scroll { flex: 1 1 auto; min-height: 0; }
.cal-body > .cal-scroll > table { height: 100%; }

/* WEEK: fixed equal day columns; the grid reads as a grid. */
.cal-week {
  table-layout: fixed; width: 100%; min-width: 720px;
  border: 1px solid var(--line); border-collapse: collapse;
}
/* THE LINES ARE REAL LINES — Keith, 30 August 2026, reading Day, Week and Month
   one after another: there were no cell lines at all. There were, in
   `--line-soft`, which against the panel white is very nearly nothing; a grid
   whose cells cannot be told apart is a list with gaps in it. Every cell in all
   three views takes the ordinary hairline now, the same one every table in SGE
   is ruled with. */
.cal-week th, .cal-week td { border: 1px solid var(--line); }
.cal-week thead th { white-space: nowrap; font-size: var(--t-cell-min); text-align: center; padding: 0.4rem 0.2rem; }
/* THE DAY HEADER HOLDS ITS POSITION — Keith, 29 August 2026: a salesperson's
   name row and an event card rendered ABOVE the header row.

   WHY. The shell sticks every `thead th` at `top: 56px`, which is the height of
   the app bar — right for a table that scrolls with the page. This grid does not:
   it sits inside `.cal-scroll`, and `overflow-x: auto` makes that element a
   scroll container on BOTH axes, so the sticky heading resolves against the
   CONTAINER rather than the window. With nothing above it inside that container,
   `top: 56px` pushed the whole header row 56px DOWN — straight over the first
   lane, whose name and chips then showed above it.

   The offset belongs to the page, so inside this frame it is zero: the header
   sits where it is drawn, and pins to the top of its own scroller if that
   scroller ever scrolls. Same for the month grid below. */
.cal-week thead th, .cal-month thead th, .cal-day thead th { top: 0; }
.cal-week thead th:first-child { width: 120px; }
.cal-week tbody th { text-align: left; font-size: var(--t-cell-min); vertical-align: top; padding: 0.4rem; }
.cal-cell { vertical-align: top; height: 64px; padding: 0.3rem 0.25rem; }
/* PASS 2 §2.2: "today" is a structural highlight on a grid, not a control.
   Neutral warm grey — and it is not one of the three state colours either,
   because today is neither good, waiting nor a fault. */
.cal-week th.cal-today, .cal-cell.cal-today { background: var(--paper-2); }

/* ---- DAY: A DAY, NOT A LIST ----
   Keith, 30 August 2026: the Day view was three headings with bullets under
   them. It is a grid now — the hours down the left, a column per salesperson,
   each event in the row for its own hour — because that is the only shape that
   answers when somebody is busy and when they are free.

   The hour column is narrow and fixed; the lanes share what is left equally, so
   two salespeople do not draw two different-sized days. */
.cal-day {
  table-layout: fixed; width: 100%; min-width: 520px;
  border: 1px solid var(--line); border-collapse: collapse;
}
.cal-day th, .cal-day td { border: 1px solid var(--line); }
.cal-day thead th { white-space: nowrap; font-size: var(--t-cell-min); text-align: center; padding: 0.4rem 0.2rem; }
.cal-hour-th, .cal-hour { width: 4.5rem; }
/* The clock reads as a clock: quiet, tabular so the hours line up, and hard
   against the top of its row so it sits level with the first event beside it.
   It was set in the mono face; `tabular-nums` is what was actually doing the
   lining up, and the house face carries it (Keith, 5 September 2026). */
.cal-hour {
  font-variant-numeric: tabular-nums; font-size: var(--t-cell-min); font-weight: 400;
  color: var(--muted); text-align: right; vertical-align: top;
  padding: 0.3rem 0.4rem; white-space: nowrap;
}
.cal-lane-th { text-align: left; padding: 0.4rem; }
.cal-lane-th .sp-swatch { margin-right: 0.35rem; }
/* THE BAND ABOVE THE HOURS — a logged activity carries a date and no clock time,
   and is never given one. It sits here, as it does in every calendar, and the
   band is marked off from the hours below it by a heavier rule. */
.cal-allday > td, .cal-allday > th { border-bottom: 2px solid var(--line); background: var(--paper-2); }
.cal-day .cal-cell { height: 2.6rem; }

/* THE EVENT CHIP — two rows, four values, one height (the approved drawing,
   docs/calendar-chip-mockup-2026-09-03.html). Row one: the salesperson's
   initials as PLAIN TEXT — Keith, 3 September 2026: "don't need the box
   around it" — then the account name, which ends in an ellipsis and NEVER
   wraps. Row two: how · why, then the contact. The values are separated by a
   character (src/app.js CAL_CHIP_SEPARATOR), not by boxes.

   THE STATE IS SAID BY COLOUR — planned, approved, done, overdue — and
   .cal-legend below the grid says what each colour means. Since 4 September
   2026 three of the four say it by FILLING the whole block in a light tint of
   their colour (Keith: "Can the whole event be filled with the colou for
   Approved, Done and Overdue instead of the colour band on the left. Planned
   can remain the colour band"); Planned keeps the band alone. Solid is in
   person; dashed is everything else, on all four. The body carries no
   salesperson tints — the initials say whose it is, and the only colour on a
   block is its state.

   AND THE WHOLE BLOCK IS THE CLICK TARGET (Keith, 30 August 2026) — one click
   previews it, a double click opens it, and nothing inside it is a link. */
.cal-chip {
  display: block; height: 41px; overflow: hidden;
  margin: 0 0 0.25rem; padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm); text-decoration: none;
  border: 1px solid var(--line); border-left: 3px solid var(--ink-3);
  background: var(--card); color: var(--ink);
  cursor: pointer;
}
.cal-chip:hover { border-color: var(--faint); border-left-width: 3px; }
.cal-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* The block the quick view is currently showing, and one that has been opened —
   the same two marks a list row takes, so the calendar reads the same way. */
.cal-chip.is-previewing { border-color: var(--accent); }
.cal-chip.is-opened .cal-acct { color: var(--t2); }
.cal-r {
  display: flex; align-items: baseline; gap: 0.3rem;
  font-size: var(--t-cell-min); line-height: 1.25;
  white-space: nowrap; overflow: hidden;
}
.cal-who {
  flex: 0 0 auto; font-family: var(--mono); font-size: var(--t-cell-min);
  letter-spacing: var(--ls-caption); color: var(--t2);
}
.cal-sep { flex: 0 0 auto; color: var(--faint); }
.cal-acct {
  flex: 1 1 auto; min-width: 0; color: var(--ink); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis;
}
.cal-hw { flex: 0 1 auto; min-width: 0; color: var(--t3); overflow: hidden; text-overflow: ellipsis; }
.cal-con { flex: 0 1 auto; min-width: 0; color: var(--t2); overflow: hidden; text-overflow: ellipsis; }
.cal-lane-empty { text-align: left; }
/* THE FOUR STATES — few categories, not many ways of categorising (Keith,
   3 September 2026), matching the drawing and the legend exactly.

   THREE OF THEM FILL THE WHOLE BLOCK — Keith, 4 September 2026: "Can the whole
   event be filled with the colou for Approved, Done and Overdue instead of the
   colour band on the left. Planned can remain the colour band. Dashed edge as
   well". So Approved, Done and Overdue are a fill and Planned keeps its band;
   the dashed edge is untouched on all four.

   THE FILL IS A LIGHT TINT AND THE TEXT STAYS DARK. Max warned that a
   full-strength fill would put white-on-colour text into a 41px block at the
   smallest type on the screen, and Keith: "go with your receommendation of the
   light tint of each colour". So each state mixes its own colour into the card
   at 12% — the same construction --accent-wash already uses (see the token block
   at the head of this file) — and --ink is left alone on top of it.

   WHY color-mix AND NOT THE `-soft` TOKENS. --green-soft, --amber-soft and
   --red-soft are NOT tints: this file's own palette note makes them the raised
   grey surface, because the house reserves colour for the accent and for
   verified state. Using one here would draw three grey blocks and say nothing.
   Mixing per state keeps Keith's instruction and keeps the tint following the
   theme, which a literal would not.

   AND THE BAND IS STILL THERE UNDER THE FILL, at full strength, because the
   fill alone would lose the state on a printer and in greyscale — and because
   the legend beside the grid draws its mark as that band. */
.cal-chip.chip-planned { border-left-color: var(--amber); }
.cal-chip.chip-approved {
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--card));
}
.cal-chip.chip-done {
  border-left-color: var(--green);
  background: color-mix(in srgb, var(--green) 12%, var(--card));
}
.cal-chip.chip-overdue {
  border-left-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 12%, var(--card));
}
/* SOLID OR DASHED SAYS HOW: dashed = not in person. A shape, so it survives
   greyscale and a printer. Unchanged by the fill — Keith, 4 September 2026:
   "Dashed edge as well", meaning it stays. */
.cal-chip.chip-remote { border-left-style: dashed; }

/* THE LEGEND — one quiet line under the grid, so the calendar keeps the
   maximum space (Keith's standing rule) while every colour is named. */
.cal-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 1.1rem;
  margin-top: 0.45rem; font-size: var(--t-cell-min); color: var(--t2);
}
.cal-legend .cl-item { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.cal-legend b { font-weight: 600; }

/* THE CALENDAR IS ONE CARD OF THE SHARED STACK — Keith, 21 October 2026: "Don't
   you have any sense of standarisation for a system..". The white panel, its
   border and its corner are `.cx-pcards > .scard` (public/customer-record.css)
   and are not restated here. What is here is only what the Accounts-shell
   frame needs from its card: the chain `main.frame > .scard` that hands the
   window's height down to the grid (rule above, "body:has(.acct-shell) >
   main.frame > .scard") now passes through the wrapper, so the wrapper and the
   card take the same flex values the card alone took. The toolbar is drawn on
   the panel, not on the page grey, and the legend is the card's foot.

   AN EMPTY WEEK CLOSES UNDER ITS MESSAGE. The grid is given the card's whole
   height so a full week fills the window; with nothing in any lane that height
   is a screen of empty panel under one sentence, so the grid and the card take
   their content's own height instead. Only the week has lanes that can be
   empty all together; the day view always carries its hour rows. */
.cx-pcards.cal-cards {
  display: flex; flex-direction: column; flex: 1 1 auto;
  min-height: 0; min-width: 0; max-width: 100%;
}
.cal-cards > .scard {
  display: flex; flex-direction: column; flex: 1 1 auto;
  min-height: 0; min-width: 0; max-width: 100%;
}
.cal-cards > .scard > .acct-shell { padding: var(--sp-sm) var(--sp-md); }
.cal-cards .acct-toolbar { background: var(--panel); }
.cal-cards .cal-legend {
  margin-top: var(--sp-sm); padding-top: var(--sp-sm);
  border-top: 1px solid var(--line-soft);
}
.cx-pcards.cal-cards:has(.cal-week):not(:has(td.cal-cell:not(.cal-lane-empty))) { flex: 0 0 auto; }
.cal-body > .cal-scroll:not(:has(td.cal-cell:not(.cal-lane-empty))) > table.cal-week { height: auto; }
/* THE MARK BESIDE EACH WORD IS THE THING IT DESCRIBES. Planned is a band,
   because that is what a planned block wears; Approved, Done and Overdue are a
   miniature of the filled block — the same 12% tint, the same coloured left
   band — because that is what those wear since 4 September 2026. A legend whose
   mark did not match the grid would be a second, wrong account of the colours. */
.cal-legend i { display: inline-block; width: 3px; height: 14px; background: var(--ink-3); }
.cal-legend i.cl-planned { background: var(--amber); }
.cal-legend i.cl-approved,
.cal-legend i.cl-done,
.cal-legend i.cl-overdue {
  width: 16px;
  border-radius: 2px;
  border-left: 3px solid var(--ink-3);
}
.cal-legend i.cl-approved {
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--card));
}
.cal-legend i.cl-done {
  border-left-color: var(--green);
  background: color-mix(in srgb, var(--green) 12%, var(--card));
}
.cal-legend i.cl-overdue {
  border-left-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 12%, var(--card));
}
.cal-legend i.cl-dash { width: 0; background: none; border-left: 3px dashed var(--t2); }

/* MONTH: a wall calendar — boxed equal cells, day number top-left,
   totals under it, chips below truncating with ellipsis. */
.cal-month {
  table-layout: fixed; width: 100%; min-width: 640px;
  border: 1px solid var(--line); border-collapse: collapse;
}
.cal-month th { font-size: var(--t-cell-min); text-align: center; padding: 0.4rem 0.2rem; border: 1px solid var(--line); }
.cal-mcell { border: 1px solid var(--line); vertical-align: top; height: 96px; padding: 0.3rem 0.3rem 0.2rem; }
/* A DAY OUTSIDE THIS MONTH IS PLAINLY OUTSIDE IT — Keith, 30 August 2026: they
   were not dimmed. They were, by 0.6 opacity over `--paper-2`, which is the
   panel's own near-white: the cell read as the same cell as its neighbour. It
   takes the page's own background now, which is a surface a reader already
   knows means "not the thing you are looking at", and it is a real step in both
   themes rather than a fraction of one. */
.cal-mcell.cal-out { background: var(--bg); }
.cal-mcell.cal-out .cal-dnum { color: var(--t3); }
.cal-mcell.cal-today { background: var(--paper-2); }
.cal-dnum { display: block; font-variant-numeric: tabular-nums; font-size: var(--t-cell-min); text-decoration: none; margin-bottom: 0.15rem; }
/* The old one-line-chip rules for this view are gone with the old chip: the
   chip's own rows never wrap and the account name ellipsizes, in every view,
   by the .cal-r / .cal-acct rules above. A month cell's height is a minimum
   (it is a table cell), so it grows to hold the two-row chips it shows. */
.cal-totals { font-size: var(--t-cell-min); color: var(--muted); margin: 0.1rem 0; }
.cal-more { display: block; font-size: var(--t-cell-min); margin-top: 0.15rem; }

@media (max-width: 640px) {
  .cal-mcell { height: 72px; }
}

/* ---- A WEEK ON A PHONE: THE SAME WEEK, DOWN INSTEAD OF ACROSS -------------
   MEASURED, 5 September 2026, on /calendar at 390x844: the week grid is seven
   equal columns held open by `min-width: 720px`, so about two and a half days
   were on screen and every block in them was a column of broken words. Seven
   columns is the right shape for a desk and the wrong shape for a phone — the
   page cannot be made narrow enough to hold them and must be made a different
   shape instead.

   SO IT BECOMES A LIST OF DAYS. One block per salesperson; inside it, one
   labelled row per day that has something on it, and a day with nothing on it
   is not drawn at all. Nothing is dropped: every block that was in the grid is
   in the list, at the full width of the screen, so the account name and the
   how/why that used to be two letters and an ellipsis are readable. The day
   each row belongs to is read off the cell's own `data-cal-day`
   (src/calendar/blocks.js) because the column header that used to say it is
   gone with the columns — the same construction as a cardlist row's
   `data-label`, and read the same way, by `content: attr(...)` and never by
   script.

   THE DESK AND THE iPAD ARE NOT TOUCHED. Every rule here is inside the phone
   breakpoint, and every selector is under `.cal-body`, which is the Calendar
   page's own grid frame and appears nowhere else in SGE — the Planner's week,
   which is drawn by the same helper, keeps its grid at every width.

   AND THE LEGEND WRAPS. It is what actually took the PAGE sideways: the grid's
   overflow is caught by `.cal-scroll`, but `.cal-legend .cl-item` is
   `white-space: nowrap` and "Dashed edge — not in person: phone, video,
   message, email" is wider than a phone, so the document scrolled 54px at all
   three views. A legend is a sentence; on a phone it takes another line. */
@media (max-width: 767px) {
  .cal-body > .cal-scroll { overflow-x: visible; }
  .cal-body > .cal-scroll > table.cal-week {
    display: block; width: 100%; min-width: 0; height: auto; border: 0;
  }
  .cal-body > .cal-scroll > table.cal-week > thead { display: none; }
  .cal-body > .cal-scroll > table.cal-week > tbody { display: block; }
  .cal-body > .cal-scroll > table.cal-week > tbody > tr {
    display: block; overflow: hidden;
    border: 1px solid var(--line); border-radius: var(--r-sm);
    margin-bottom: var(--sp-sm);
  }
  .cal-body > .cal-scroll > table.cal-week > tbody > tr > th[scope="row"] {
    display: block; width: auto; border: 0;
    background: var(--paper-2);
    padding: var(--sp-xs) var(--sp-sm);
    font-size: var(--t-cell); font-weight: 600;
  }
  .cal-body > .cal-scroll > table.cal-week > tbody > tr > td.cal-cell {
    display: block; width: auto; height: auto;
    border: 0; border-top: 1px solid var(--line);
    padding: var(--sp-xs) var(--sp-sm);
  }
  /* A DAY WITH NOTHING ON IT IS NOT A ROW. Seven empty labelled strips per
     salesperson would be six screens of nothing between two pieces of work. */
  .cal-body > .cal-scroll > table.cal-week > tbody > tr > td.cal-cell:empty { display: none; }
  .cal-body > .cal-scroll > table.cal-week > tbody > tr > td.cal-cell::before {
    content: attr(data-cal-day);
    display: block; margin-bottom: var(--sp-xxs);
    font-size: var(--t-cell-min); color: var(--t2);
  }
  /* The lane that says "Nothing planned and nothing logged this week" is the
     WEEK's sentence, not a day's, so it takes no day label. */
  .cal-body > .cal-scroll > table.cal-week > tbody > tr > td.cal-lane-empty::before { content: none; }
  .cal-legend .cl-item { white-space: normal; }
}

/* ---- dashboard infographics ---- */
/* PASS 2 §2.2: a plotted line is the shape of the data, not something to
   press. Neutral, and dark enough to read at 1.5px. */
.spark polyline { stroke: var(--ink-3); stroke-width: 1.5; }
.mixbar { display: block; border-radius: var(--r-pill); }
.mixbar rect.mix-warm { fill: var(--amber); }
.mixbar rect.mix-active { fill: var(--green); }
.mixbar rect.mix-cold { fill: var(--faint); }
.mix-legend { margin: 0.5rem 0 0.3rem; }
.mix-legend .status { margin-right: 0.35rem; }
.mix-spark, .sc-spark, .myday-spark { display: flex; align-items: center; gap: 0.5rem; margin: 0.4rem 0; }
.mix-spark .muted, .sc-spark .muted, .myday-spark .muted { font-size: var(--fs-caption); }
.score-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
/* A SCORE CARD KEEPS ITS BOX — it opens a salesperson's score, and Task 5's
   rule is that a box means you can tap this. `.scard` stopped being a surface
   on 28 August 2026, so the surface, the hairline and the radius are given back
   here rather than inherited. It also settles "no card contains another card":
   the section it sits in is no longer a card, so this is the only box left in
   that stack. */
.score-card {
  margin-bottom: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
}
.sc-head { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.6rem; }
.sc-head a { font-weight: 600; }
.sc-num { font-variant-numeric: tabular-nums; font-size: var(--fs-lead-airy); font-weight: 600; margin-left: auto; }
.sc-row { display: grid; grid-template-columns: 7.5rem 1fr 2rem; align-items: center; gap: 0.5rem; margin: 0.25rem 0; }
.sc-label { font-size: var(--fs-caption); color: var(--ink-2); }
.sc-val { font-variant-numeric: tabular-nums; font-size: var(--fs-caption); text-align: right; color: var(--ink-2); }
@media (max-width: 760px) {
  .score-cards { grid-template-columns: 1fr; }
}

/* ---- calendar salesperson colours: background tints ----
   WHAT THIS IS, AND WHY IT IS STILL SIX COLOURS. The calendar tells six
   salespeople apart by hue, index = salesperson id % 6. The design document
   allows ONE accent and everything else greyscale, so six decorative hues sit
   outside it — but removing them would take a working feature off a screen, and
   what replaces it is a screen decision for Keith, not a token decision for this
   pass. THEY ARE FLAGGED IN THE REPORT AND LEFT.

   What DID have to change is how they are written. Six light-theme literals put
   a pastel block behind t1 text on a black ground; each is now a mix of its hue
   into the CURRENT panel, so the identity survives and the tint follows the
   theme. The text on them stays a token, so it is measured like everything
   else by the rendered contrast sweep. */
.sp-bg-0 { background: color-mix(in srgb, #A05C97 18%, var(--panel)); } /* plum */
.sp-bg-1 { background: color-mix(in srgb, #4C63A8 18%, var(--panel)); } /* indigo */
.sp-bg-2 { background: color-mix(in srgb, #4E7A46 18%, var(--panel)); } /* forest */
.sp-bg-3 { background: color-mix(in srgb, #A65B39 18%, var(--panel)); } /* rust  */
.sp-bg-4 { background: color-mix(in srgb, #4A6C7D 18%, var(--panel)); } /* slate */
.sp-bg-5 { background: color-mix(in srgb, #9C7A25 18%, var(--panel)); } /* ochre */
/* Courier drops whisper: half the tint of a visit in the same hue, so the two
   are still told apart at a glance.
   Specificity (0,3,0) deliberately beats both the tint and .cal-drop bases. */
.cal-chip.cal-drop.sp-bg-0 { background: color-mix(in srgb, #A05C97 8%, var(--panel)); color: var(--t2); }
.cal-chip.cal-drop.sp-bg-1 { background: color-mix(in srgb, #4C63A8 8%, var(--panel)); color: var(--t2); }
.cal-chip.cal-drop.sp-bg-2 { background: color-mix(in srgb, #4E7A46 8%, var(--panel)); color: var(--t2); }
.cal-chip.cal-drop.sp-bg-3 { background: color-mix(in srgb, #A65B39 8%, var(--panel)); color: var(--t2); }
.cal-chip.cal-drop.sp-bg-4 { background: color-mix(in srgb, #4A6C7D 8%, var(--panel)); color: var(--t2); }
.cal-chip.cal-drop.sp-bg-5 { background: color-mix(in srgb, #9C7A25 8%, var(--panel)); color: var(--t2); }
/* Lane-heading swatch: a small filled square of the actual tint, on the day
   grid's own column headings. THE COLOUR KEY IT USED TO BELONG TO IS GONE
   (Keith, 30 August 2026) — and with it .cal-legend, .cal-appt-legend, .cal-key
   and the three .appt-swatch rules. Nothing the key said is lost: each block
   carries its state as a WORD and its owner as a short code. */
.sp-swatch {
  display: inline-block; width: 10px; height: 10px; border-radius: var(--r-xs);
  border: 1px solid var(--line); flex: none; align-self: center;
}

/* ---- score trends ---- */
.trend polyline { stroke: var(--ink-3); stroke-width: 1.5; }
.trend circle { fill: var(--ink-3); }
.trend-guide { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 3; }
.trend-mini { display: inline-block; margin-left: 0.5rem; vertical-align: middle; }
/* Inside a score row the sparkline is the row's fifth column, so it lines up
   down the card instead of landing under whatever the sentence ran to. */
.score-row .trend-mini { display: block; margin: 0; justify-self: end; }
.trend-mini .trend polyline { stroke: var(--faint); }
.trend-mini .trend circle { fill: var(--faint); }

/* ---- daily report redesign: quiet tiles + Compared table ---- */
.report-tiles { grid-template-columns: repeat(7, 1fr); }
.rtile .tile-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rg { font-variant-numeric: tabular-nums; font-size: var(--t-cell-min); white-space: nowrap; }
.rg-up { color: var(--green); }
.rg-down { color: var(--red); }
.rg-flat { color: var(--faint); }
.compared td.num { text-align: right; font-variant-numeric: tabular-nums; }
.compared th { white-space: nowrap; }
@media (max-width: 1100px) {
  .report-tiles { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 640px) {
  .report-tiles { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Compared table: grouped header, banding, fixed equal columns ---- */
.compared { table-layout: fixed; width: 100%; min-width: 640px; }
.compared col.cmp-name { width: 170px; }
.compared col.cmp-band { background: var(--paper-2); }
.compared th { text-align: right; }
.compared th:first-child, .compared td:first-child { text-align: left; }
.compared .cmp-grp { text-align: center; }
/* A HEADING THAT STANDS ALONE OVER ITS COLUMN MAY WRAP. The nowrap above is
   there so a FIGURE never fragments; applied to the headings as well it made
   "7-day avg" 15px wider than the fixed column it sits in at the 14px floor,
   and the word was cut off at the cell edge with nothing to say so (16.4 tier
   1). Wrapping costs a line of heading and no data; widening the table to suit
   one word would cost every reader a sideways drag. */
.compared thead th[rowspan] { white-space: normal; }
.compared .cmp-sub { font-size: var(--t-cell-min); font-weight: 600; color: var(--muted); padding-top: 0.15rem; }
/* hairlines between the four column groups — never inside a pair */
/* Group-band separators belong ONLY to the daily Compared table (cmp-banded);
   on any other table these nth-child borders draw a stray mid-table rule. */
.cmp-banded thead tr:first-child th:nth-child(2),
.cmp-banded .cmp-edge,
.cmp-banded tbody td:nth-child(2),
.cmp-banded tbody td:nth-child(4),
.cmp-banded tbody td:nth-child(6) { border-right: 1px solid var(--line-soft); }
.compared thead tr:last-child th { border-bottom: 2px solid var(--line); }
.compared thead tr:first-child th[rowspan] { border-bottom: 2px solid var(--line); vertical-align: bottom; }
.compared tbody td { padding: 0.55rem 0.6rem; }
/* Team score is a different kind of number — quietly set apart */
.compared tbody tr:last-child td { border-top: 1px solid var(--line); }

/* ---- two leads, side by side: "Same enquiry, or two?" -------------------
   KEITH, 27 September 2026: "Merge will be decided by user in SGE. As one Lead
   might ask 2 separate things over a short period of time." The whole question is
   answered by looking at the two records field against field, so the ONE thing
   worth a rule of its own is making a DIFFERENCE findable without reading every
   line: a row where the two leads disagree is tinted, and a row where they agree
   is left alone. No new palette — `--paper-2` is the same token `.cmp-band`
   already tints a comparison column with. Two rules, no words on screen. */
.lead-cmp th[scope="row"] { white-space: nowrap; text-align: left; }
.lead-cmp tbody tr.cmp-differs > * { background: var(--paper-2); }

/* TWO ANSWERS, AND THEY ARE NOT THE SAME WEIGHT.
   "Merge — one enquiry" is the primary and keeps `.btn-primary`. The other is a
   real decision and a real button, but it is the one that CHANGES NOTHING about
   either record, so it takes SGE's own secondary shape rather than a second slab
   of accent blue — the same shape and the same tokens as the quick view's
   secondary action (`.preview-panel .pv-act`, public/list-preview.css), which is
   what a secondary button looks like everywhere else in SGE. Without this it
   inherits the base `button { width: 100% }` and reads as the LOUDER of the two,
   which is the wrong way round. Same rounded rectangle, same 44px tap floor. */
.lead-cmp-actions .btn-quiet {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; min-height: var(--tap);
  padding: 0.5rem 0.9rem;
  font-family: var(--font); font-size: var(--fs-body); font-weight: 600;
  line-height: 1.2;
  color: var(--ink-2); background: transparent;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  cursor: pointer;
}
.lead-cmp-actions .btn-quiet:hover {
  background: var(--paper-2); border-color: var(--faint); color: var(--ink);
}

/* ---- partner growth (migrations 053-055) --------------------------------
   Existing tokens only — no new palette. Position pills warm as they climb;
   fall states borrow the red/amber the rest of SGE already uses for trouble. */
.auto-tag {
  font-size: var(--t-cell-min); color: var(--faint); font-weight: 400;
  letter-spacing: var(--ls-caption); white-space: nowrap;
}
.growth-headline { font-size: var(--fs-body); margin: 0.2rem 0 0.5rem; }
.growth-sep { color: var(--faint); margin: 0 0.15rem; }

.growth-pos { text-transform: none; }
.growth-pos-known       { background: var(--paper-2);  color: var(--ink-3); }
.growth-pos-producing   { background: var(--green-soft); color: var(--green); }
.growth-pos-established { background: var(--teal-soft); color: var(--teal); }
/* PASS 2 §2.3: the top rung was a tinted brown, which is the action colour on
   a pill nobody presses. It is the BEST a customer can be, so it takes the
   green that already means good one rung below it — at full strength rather
   than as a wash, so the ladder still climbs to something. No new colour. */
.growth-pos-key_account { background: var(--success-fill); color: var(--on-accent); font-weight: 600; }

.growth-step { text-transform: none; }
.growth-step-aware    { background: var(--paper-2); color: var(--ink-3); }
.growth-step-engage   { background: var(--line-soft); color: var(--ink-2); }
.growth-step-educate  { background: var(--amber-soft); color: var(--amber); }
.growth-step-convert  { background: var(--green-soft); color: var(--green); }
.growth-step-grow     { background: var(--teal-soft); color: var(--teal); }
/* The same call as .growth-pos-key_account above, for the same reason: the top
   of the second ladder, green at full strength. */
.growth-step-advocate { background: var(--success-fill); color: var(--on-accent); font-weight: 600; }

.growth-fall { text-transform: none; }
.growth-fall-slipping   { background: var(--amber-soft); color: var(--amber); }
.growth-fall-gone_quiet { background: var(--red-soft); color: var(--red); }
.growth-fall-lost       { background: var(--ink-3); color: var(--paper); }

/* NOT YET SPECIFYING is not a fall and must not look like one. A firm nobody
   has ever sold through has lost nothing, so it is deliberately QUIET — the
   same neutral as Known — and never red. It says "a door to open", and red
   would put it in the same glance as the accounts that are actually slipping
   away, which is the fault this state exists to remove. */
.growth-notyet { background: var(--paper-2); color: var(--ink-3); text-transform: none; }

/* A .status pill carrying a SENTENCE ("on their rhythm"), not a one-word
   status — .status's capitalize turned it into "On Their Rhythm". */
.growth-phrase { text-transform: none; }
.growth-role { background: var(--paper-2); color: var(--ink-2); text-transform: none; }
.growth-role-unset { background: var(--red-soft); color: var(--red); text-transform: none; }

/* THE GROWTH LIST IS NINE COLUMNS, AND THEY WERE ALL THE SAME WIDTH.
   .projects-table is `table-layout: fixed` and declares no column widths, so
   inside the 1180px frame each of the nine got an equal ~126px share whatever
   it held. Two things followed, both of them on the screen:

     * A money cell is .num, which is `white-space: nowrap`. "MYR 663,300.00"
       could neither wrap nor shrink, so it was laid out wider than its own cell
       box — and overflow is visible by default, so the figure was painted
       across the figure beside it. Two facts, one unreadable smear.
     * .projects-table cells carry `overflow-wrap: anywhere`, so everything that
       COULD wrap broke MID-WORD in that same 126px: the header as
       "SPECIFYIN / G", a company name as "Northgate Main Contracto / rs Sdn Bhd".

   The fix is the one .events-table already uses, and it drops no column and
   changes no figure: the table is content-driven, each column takes the width
   its content needs, only the Company column wraps and only at word
   boundaries, and the wrapper scrolls sideways when a window is too narrow to
   hold the lot. */
.growth-list-scroll { overflow-x: auto; }
.growth-list { table-layout: auto; }
/* THE WRAPPER ONLY SCROLLS IF THE TABLE IS ALLOWED TO BE WIDER THAN IT.
   `.projects-table` sets `width: 100%`, so between 768px and about 1250px the
   table box was pinned to the wrapper's width while its own nowrap cells needed
   more — and cells that cannot fit their box paint OUTSIDE it. Measured on an
   iPad in portrait (834px) on 28 August 2026: the cells reached 419px past the
   wrapper's scrollable extent, which is Keith's "the last columns run past the
   right edge of the card", seen at a second width.

   `min-width: min-content` IS THE EXACT FLOOR, AND max-content IS NOT. The cells
   are nowrap, so a column's min-content is the whole cell; the headings wrap, so
   theirs is their longest word. The table may therefore never be narrower than
   its CELLS need — the wrapper scrolls instead — while the headings still take
   two lines to buy the room, which is what makes it fit at 1440. max-content
   would forbid the headings to wrap and put the table back over the frame at a
   desk (measured: 1226 into 1142). Above the card breakpoint only: below it the
   same table is one card per record and is not a table at all. */
@media (min-width: 768px) {
  .growth-list-scroll .growth-list { min-width: min-content; }
}
.growth-list th, .growth-list td { white-space: nowrap; overflow-wrap: normal; }
/* Company: the one long column, so it is the one that wraps — at word
   boundaries, with enough room to put a word on a line. */
.growth-list th:first-child, .growth-list td:first-child {
  white-space: normal; overflow-wrap: break-word; min-width: 11rem;
}

/* IT HAS TO FIT AT 1440, AND IT DID NOT.
   The content frame is 1180px wide with 1.5rem of padding either side, so a
   table has about 1130px to live in. Nine columns of nowrap content needed more
   than that, the wrapper scrolled, and the column that ran off the right-hand
   edge was the last one — Salesperson, reading "Faridah Osr", "Chan Wai K".
   Nothing was clipping the text; the table was simply wider than the window and
   the end of it was past the fold.

   Three things bought the room back, and none of them drops a fact:

     * POSITION AND AT RISK ARE ONE COLUMN. They are one sentence — "Established
       · At risk: gone quiet" — and were drawn as two headings a reader had to
       join up. One column, one heading, two sort links.
     * "0 of 3 actively specifying" BECAME "0 of 3". As a sentence in a column it
       wrapped to three lines and made every row in the table that tall; the
       heading now carries the words and the cell carries the two numbers, with
       the full sentence on the cell for anyone who hovers.
     * THE HEADINGS WRAP, the cells do not. "Realised Revenue" and "Activity
       status" are longer than anything under them, so they are allowed to take
       two lines rather than setting the width of a whole column.

   THE LAST OF THOSE NEEDS BOTH RULES BELOW, and the second is not a duplicate
   of the first: `.projects-table .num` is two classes and outranks a bare
   `.growth-list th`, so without naming `.num` explicitly it would keep every
   money and figure HEADING on one line — which is exactly the set of headings
   that are longer than the figures beneath them. The CELLS stay nowrap, because
   a money figure that wraps is two numbers. */
.growth-list th { white-space: normal; overflow-wrap: normal; }
.growth-list th.num { white-space: normal; overflow-wrap: normal; }

/* Position · At risk: one cell holding two pills and the separator between
   them.
   KEITH, 27 August 2026, ON THIS EXACT CELL: "the status chips wrap into two
   cramped lines". They did — the cell was `white-space: normal`, so at any width
   short of about 235px the pair broke after the separator and every row in the
   table stood two lines tall for it. It is ONE SENTENCE ("Producing · At risk:
   slipping"), which is the whole reason the two columns were merged into one on
   21 August, and a sentence split across two lines with a dangling middle dot is
   not the pair reading as the pair.
   The room it needs is bought back on the row below — the cell gutters come in,
   which is 16.5's "space is bought by removing content, not by shrinking type".

   THE RULE IS ON THE CELL, NOT ON THE TABLE (22 August 2026): the Customers
   list now leads on the same column, and it is a plain table rather than
   .growth-list. One class, one rule, both screens — scoping this to
   .growth-list would have meant a second copy the day the second screen
   arrived, which is exactly what happened. */
td.growth-state { white-space: nowrap; }
/* THE GUTTERS, on the growth list only. Nine columns times two paddings at
   0.6rem is 173px of a 1142px table spent on air; at 0.25rem it is 72px, and the
   101px that buys is what puts "Producing · At risk: slipping" on one line and
   still leaves the table inside the frame at 1440. The type does not move. */
.growth-list th, .growth-list td { padding-left: var(--space-xxs); padding-right: var(--space-xxs); }

/* Actively specifying: two numbers, not a sentence, so it takes a figure's
   width. Its heading is the wordy part and wraps above it. */
.growth-list th.growth-spec, .growth-list td.growth-spec { min-width: 4.5rem; }
.growth-list th.growth-spec { max-width: 6.5rem; }

/* THE TWO MONEY COLUMNS ARE SEPARATED, AND INFLUENCED IS NOT GREYED OUT.
   Realised Revenue and Influenced revenue sat flush against each other, the
   second in the accent brown, which read as disabled — and two money columns
   with nothing between them invite the one sum the model forbids (billed and
   influenced are NEVER added). Influenced now reads in the same ink as every
   other figure on the row, because it is a real and important number, and a
   rule down its left edge says plainly that it belongs to a different question.
   The note under the table says the rest.

   The ink is on the CELL only — the heading keeps the same muted grey as every
   other heading, or this would have traded one odd-looking column for another. */
.growth-list td.growth-influenced { color: var(--ink); }
/* The divider itself, down the heading and the cells alike. */
.growth-list th.growth-influenced, .growth-list td.growth-influenced {
  border-left: 2px solid var(--line);
}

/* A fallen row is nudged, not shouted at — the ordering already carries it. */
.growth-row-fallen td { background: var(--panel-2); }
.growth-list td, .growth-contacts td { vertical-align: top; }
.growth-list td .muted { display: block; }

/* THE RESPONSE CLOCK ON THE INBOUND-LEADS LIST. Two lines in one cell: the
   reading ("Overdue by 15 working days 5h") and, under it, the instant the
   promise fell due, so the arithmetic can be checked on the row.

   A BREACHED LEAD MUST NOT LOOK LIKE EVERY OTHER ROW — that is the whole point
   of the column. The reading carries the colour and the weight; the row itself
   takes the same faint wash a fallen customer takes on /growth, because the
   order already puts it at the top and shouting twice is not louder. The WORD
   carries the meaning, so nothing is lost printed in grey. */
td.lead-clock, th.lead-clock { min-width: 11rem; white-space: normal; }
.clock-read { display: block; font-weight: 600; }
.clock-due { display: block; font-size: var(--t-cell-min); color: var(--muted); }
.clock-overdue { color: var(--red); }
.clock-duesoon { color: var(--amber); }
.clock-ontrack { color: var(--ink-2); font-weight: 600; }
.clock-answered { color: var(--green); font-weight: 600; }
.clock-late { color: var(--amber); font-weight: 600; }
.clock-none { color: var(--muted); font-weight: 600; }
.lead-row-overdue td { background: var(--panel-2); }
/* A lead with nobody on it says so in words — it is a state, not a gap. */
.lead-unassigned { color: var(--amber); font-weight: 600; }

/* A HOMEOWNER NOBODY HAS BEEN HANDED TO. Not a blank and not a neutral value:
   the homeowner journey terminates in a handover to a customer firm, so
   "nobody" is the failure case and has to read as one. It deliberately takes
   the SAME declaration as .growth-fall-gone_quiet — the At risk chip on
   /customers and /growth — rather than a new colour, because there is one way
   this application says "this row is the problem" and a second one would only
   make the first mean less. The row itself takes the same faint wash an overdue
   lead row takes above. */
.homeowner-unpassed { background: var(--red-soft); color: var(--red); text-transform: none; }
.homeowner-row-unpassed td { background: var(--panel-2); }

/* Signal: the two axes, side by side, so neither can be read as the other. */
.growth-signal { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
/* THE TWO AXES ARE SUB-SECTIONS, NOT BOXES (Task 5, 28 August 2026). They sat
   inside the Signal section as two bordered panels — a box inside a box, which
   is the fault that task is named after — and neither of them is something you
   can press. Each is now its own heading and its own thin rule, which is what
   separates one axis from the other just as well as a frame did. */
.growth-axis { padding: 0; }
.growth-axis h3 {
  margin: 0 0 var(--space-sm); padding-bottom: var(--space-xxs);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-caption); color: var(--muted); font-weight: 600;
}
.growth-axis p { margin: 0.25rem 0; font-size: var(--fs-caption); }

/* Billed and influenced: two rows, a rule between them, never a total row. */
/* PASS 3 §3.4 — THE PAGE-WIDTH CAP. The growth screens do NOT escape the
   1180px `.frame` at 1440px; that was measured and the frame holds. What
   escaped was this table at 768px: a flat `min-width: 32rem` is 512px
   against a frame content box of 498px, and the release in the 720px block
   below fires only under 720px — so from 721px up to about 900px the table
   pushed the whole document sideways by 18px. `min(32rem, 100%)` is the
   same intent without the magic breakpoint: ask for 32rem, take what there
   is when there is less. At 1440px it still resolves to 32rem, so nothing
   about the desktop layout moves. */
.growth-revenue { width: auto; min-width: min(32rem, 100%); }
.growth-revenue th { text-align: left; font-weight: 600; padding: 0.5rem 1.2rem 0.5rem 0; }
.growth-revenue td { padding: 0.5rem 1.2rem 0.5rem 0; }
.growth-revenue tr + tr th, .growth-revenue tr + tr td { border-top: 1px solid var(--line); }
.growth-never-sum { margin-top: 0.4rem; font-style: italic; }
/* THE CONTACT RECORD'S LABEL COLUMN READS ON ONE LINE — 25 September 2026,
   21:28. Keith settled "Influenced revenue" by KEEPING HIS WORDS and giving the
   column the room: measured, the label needs 117.0px and the column gave it
   114.0px at iPad landscape, 107.7px at phone landscape and 84.0px at phone
   portrait, so it folded at three of the five views
   (docs/2026-09-25-sge-heading-wrap-evidence.html, row C32; measured again by
   `node docs/2026-09-25-sge-headings-fix/01-probe.js`).

   `nowrap` AND NOT A STATED WIDTH, because a stated width is a guess and this
   is not: an auto table asks the label for its one-line width and gives the
   column exactly that, so the floor is whatever the words actually measure at
   the house type size and it moves with them. The type does not shrink — 16.5's
   rule is that room is never bought with smaller text.

   WHAT IT COSTS THE ROW, measured at all five views: the third cell on this row
   is the muted note ("jobs their people specified but did not pay for"), which
   is prose and already folds; it takes the width and folds one line further at
   the two phone views and is unchanged at desktop and both iPads. The figure
   cell is `td.num` and is nowrap already, so it is untouched, and the table
   stays inside its card at every view.

   IT IS THIS TABLE ONLY. The ACCOUNT page (/growth/customers/:id) draws the
   same `.growth-revenue` through the compact path and keeps Keith's full
   "Revenue over last 12 months" — he said explicitly that only the contact
   page's heading changes — so the class is written by the contact record's own
   render call (src/growth/render.js) and by nothing else. */
.growth-revenue-oneline th { white-space: nowrap; }
/* PASS 2 §2.2: a money figure is read, not pressed. The rule between the two
   rows is what says they are different questions — the same call the growth
   list's own comment above records for the cell version of this column. */
.growth-influenced { color: var(--ink); }

/* TEST ACCOUNT (migration 081). Worn by a seeded salesperson or customer, and
   only ever seen where somebody has deliberately asked for one — the default
   view has none. It is deliberately the flattest mark on the page: grey, small
   and lettered, because it must read as "this is not a real account" and never
   as a status a real account could hold. */
.tag-test {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.08rem 0.42rem;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: var(--paper-2);
  color: var(--ink-3);
  font-size: var(--t-cell-min);
  font-weight: 600;
  letter-spacing: var(--ls-caption);
  white-space: nowrap;
  vertical-align: middle;
}

/* Every derived number can show its working. */
.growth-why { margin: 0.35rem 0; }
.growth-why summary {
  font-size: var(--t-cell-min); color: var(--muted); cursor: pointer;
  /* 22px before — half the floor, on the four "Why this position / Why this
     reading / Why this step / Who is specifying" disclosures. The height is
     bought with PADDING rather than with `display: flex`, because flex on a
     <summary> costs the element its native disclosure triangle (see the note
     at the identity toggle above) and that triangle is the only thing telling
     a reader this line opens. Padding keeps the marker and centres the text. */
  min-height: var(--tap);
  padding-block: calc((var(--tap) - 1.45em) / 2);
  box-sizing: border-box;
}
.growth-why ul { margin: 0.3rem 0 0.3rem 1rem; padding: 0; font-size: var(--t-cell-min); color: var(--ink-2); }
.growth-why li { margin: 0.15rem 0; }
.growth-unmet { color: var(--faint); }
.growth-src {
  display: inline-block; font-size: var(--t-cell-min);
  letter-spacing: var(--ls-caption); padding: 0 0.35rem; border-radius: var(--r-xs); margin-right: 0.35rem;
}
.growth-src-auto { background: var(--paper-2); color: var(--ink-3); }
/* PASS 2 §2.3: "manual" means somebody keyed this rather than SGE counting it
   — the same fact .chal-badge-declared carries, and SGE already says that in
   amber. Brown was saying it as a fifth meaning for the action colour. */
.growth-src-manual { background: var(--amber-soft); color: var(--amber); }

.growth-inline-form { display: flex; gap: 0.35rem; align-items: center; margin: 0.35rem 0 0; flex-wrap: wrap; }
.growth-inline-form select, .growth-inline-form input[type="text"] { font-size: var(--t-cell-min); padding: 0.2rem 0.35rem; }
.growth-inline-form button { font-size: var(--t-cell-min); padding: 0.2rem 0.6rem; }
.growth-specifiers { margin: 0; padding-left: 1.1rem; font-size: var(--t-cell); }
.growth-specifiers li { margin: 0.25rem 0; }
.growth-notice { color: var(--green); }

/* The "2 of 9 actively specifying" line and other single derived metrics. */
.growth-metric { font-size: var(--fs-caption); margin: 0.4rem 0 0.2rem; }
.growth-withheld { font-style: italic; }
.growth-subhead { font-size: var(--fs-caption); color: var(--muted); font-weight: 600; margin: 0.7rem 0 0.3rem; }

/* THE SUMMARY STRIP ABOVE THE GROWTH TABLE. The app's own tile, unchanged —
   only the grid is told to fit the space rather than to be exactly three
   across, because a rep sees two of these tiles and a manager three, and on a
   phone either number has to stack. Written as `.tiles.minis.growth-summary`
   at full strength for the reason the rollup above it documents: `.tiles.minis`
   is two classes and would otherwise win. */
.tiles.minis.growth-summary {
  max-width: none; margin: 1rem 0 0.9rem;
  /* ONE ROW, WHETHER THERE ARE TWO TILES OR THREE. `repeat(auto-fit, minmax(17rem,
     24rem))` stood here and wrapped two-then-one at 1440: three tiles at their
     24rem ceiling plus the gaps is wider than the 1180px frame, so the money tile
     — the largest figure on the strip — was pushed onto a second row on its own.
     grid-auto-flow: column lays whatever tiles exist across a single row and
     shares the width between them, so a rep's two and a manager's three both read
     as one strip. The row is still wide enough for a whole ringgit figure at
     nowrap ("MYR 2,122,300.00"): a third of 1180px is 380px, and that number is
     about 150px. */
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
}
@media (max-width: 900px) {
  /* Below this a third of the row is narrower than the money figure, so they
     stack rather than truncate. */
  .tiles.minis.growth-summary {
    grid-auto-flow: row; grid-auto-columns: auto;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  }
}

/* ============================================================
   THE GROWTH REPORT — /growth, 28 August 2026.

   Keith, reviewing the old page: "instead of showing the list, should this page
   show detailed statistics and numbers, I mean it's more like a report page in
   the way for director". So the rows went to /growth/list and this page is
   figures. Every one of them is an <a> into that list.

   AND ON A PHONE IT IS THE FIGURES ALONE, because of his standing rule for a
   report page: "everything is in one pitch, not doing the scroll" — the figures
   are visible without scrolling and going deeper is a tap on a figure. The three
   breakdown tables are therefore NOT DRAWN under 768px. That is the catalogue's
   own answer to a screen that will not fit (16.5 tier 1): "space is bought by
   removing content, not by shrinking type". Nothing on this page is smaller on a
   phone than it is at a desk, and no figure is lost — each one is still a tap.

   NO SIZE BELOW THE FLOOR. Every rule here takes an existing type token: the
   figure is --fs-display-md or --fs-lead-airy, everything else is --fs-caption
   or --fs-tagline. Keith's constraint, in his words: "Body text minimum is 14px,
   absolute minimum 12px, whole pixels only." The smallest thing on this page is
   13px, which is the size he settled the data region at on 27 August. */
/* ------------------------------------------------------------
   THE TWELVE MONTHS ON ACCOUNT HEALTH — TWO LAYERS, THREE CHARTS EACH,
   29 August 2026.

   Keith, on a page that showed only today: "as i look at this it is information
   as of now.. iuser wouldn't know how ther fair across the tiem". And on the
   drawing that showed the year without saying what it counted: "It need to
   clearly indicate which is Accoutn and which are contacts."

   SO THE LAYER IS SAID FOUR TIMES AND NO GLANCE CAN MISS ALL FOUR — a bracket
   down the left of each layer with its name at the top, the noun printed beside
   every count, the noun inside every line underneath, and headed columns in the
   preview panel. Three of those four are markup; this sheet draws the bracket
   and keeps the noun legible beside the figure.

   Keith, on the version that put all three measures in one picture: "Is there a
   reason why all 3 must fit into one graph?" There is not. So six charts, six
   scales, and every scale PRINTED beside its own bars — which is the entire
   reason the three came apart.

   NO BOXES AND NO NEW COLOURS. The visual language is 2g and 2h, the two
   drawings he called stripped back and better: nothing is carded, the layer
   bracket is a rule rather than a panel, the only colour is the house green /
   amber / red already carrying those three meanings everywhere else in SGE, and
   every size here is an existing token — 13px caption and 17px tagline, nothing
   under the floor. */

/* ===========================================================================
   ACCOUNT HEALTH, IN FOUR BANDS — 12 September 2026.

   docs/2026-09-12-account-health-rethink.html, read by Keith and answered
   "Proceed with the reccomendation". The page printed fifty-four figures and
   seventy-two bars and none of them was the answer. Now: the answer, what it is
   counted over, the queue beside one chart per layer, and who holds it.

   EVERY TOKEN BELOW IS ALREADY IN THIS SHEET. No new colour, no new size, no new
   radius, no shadow, no capsule. What is new is where things sit.

   "So remember the 10-30 sec rule to know what is going on." Band one is the ten
   seconds; bands one to three are the thirty.  */

/* ---- BAND 1 — THE ANSWER ----
   One sentence per layer, at the display size, first on the page. The figure and
   the money inside it are tabular so the sentence does not shift as the number
   changes. The red is never alone: the sentence says "are at risk" in words. */
.ah-answer,
.ah-answer2 {
  margin: 0 0 var(--space-xxs);
  font-size: var(--fs-display-md); font-weight: 600; line-height: 1.2;
  letter-spacing: var(--ls-body); color: var(--ink);
  font-variant-numeric: tabular-nums;
}
/* ---- AND WHICH OF THE TWO AT-RISK MEASURES EACH SENTENCE IS ----
   13 September 2026, Keith's "Keep both". Both measures stay and each screen says
   in words which one it is showing. It sits UNDER the sentence it qualifies and
   above the next one, so a reader cannot take the accounts figure for the
   contacts question or the other way round. Quiet type, because it is a label and
   not the answer: the answer is the line above it. */
.ah-measure {
  margin: 0 0 var(--space-xs);
  font-size: var(--t-cell-min); color: var(--faint); max-width: 78ch;
}
.ah-answer + .ah-measure { margin-top: var(--space-xxs); }

/* ---- THE TWO LAYERS, SIDE BY SIDE ----
   KEITH, 26 September 2026: "the top part is also taking too many space
   horizontally", and what the fix has to be worth is his own test — "As long
   the space is reduced and not waste the space to view more records in the list
   view". Four short lines running the whole width is the waste; two columns of
   the width each sentence was already using is the same four lines in half the
   height, and every one of the four keeps its words and its order. (They once
   aligned on a baseline because the two headlines were different sizes; they are
   one size now and align on the top.) Below the band it is one column
   and they stack, which is what the page has always done on a phone.

   NOT `.ah-layer` — that name is taken, by the chart bracket further down this
   sheet, and a block wearing it would come out with a rule down its left edge. */
.ah-answers { display: block; }
.ah-answers > div { min-width: 0; }
/* THE HEADLINE BAND IS A CARD NOW (21 October 2026, Keith: "the layout with
   separate cards"). `.cx-pcards > .scard` (public/customer-record.css) gives the
   panel and takes no padding of its own, so the band pads what it holds. The two
   sentences are ONE SIZE — `.ah-answer, .ah-answer2` above — which is why they
   now align on the top of the grid rather than on a baseline. */
.cx-pcards > .scard > .ah-answers { padding: var(--sp-sm) var(--sp-md) 0; }
.cx-pcards > .scard > .ah-counted { margin: 0; padding: var(--sp-xs) var(--sp-md) var(--sp-sm); }
.cx-pcards + .ah-split { margin-top: var(--space-md); }
@media (min-width: 1024px) {
  .ah-answers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 var(--space-lg);
    align-items: start;
  }
}

/* ---- BAND 2 — WHAT IT IS COUNTED OVER ----
   Quiet, second, and every figure in it is a link into the rows behind it. It was
   the tail of a grey line at the foot of the page and carried no number at all.

   THE CAP IS WIDER THAN PROSE'S — 26 September 2026. 78ch is the measure for a
   SENTENCE, and this is not one: it is six counts separated by middots, and with
   the withheld-money note joining it (see src/growth/render.js) 78ch broke it
   over two lines and left a separator dangling at the end of the first. A list
   of chips reads across; it is still capped, so it never runs the width of a
   very wide monitor. */
.ah-counted {
  margin: 0 0 var(--space-md);
  font-size: var(--t-cell); color: var(--faint); max-width: 120ch;
  font-variant-numeric: tabular-nums;
}

/* ---- BAND 3 — THE QUEUE, AND THE COLUMN THAT BELONGS TO THE QUICK VIEW ----

   KEITH, 26 September 2026, looking at his own screen: "Why can't it be under
   the Quick View? And the top part is also taking too many space horizontally".

   The right track used to be permanent — 360px held open at every moment,
   carrying one grey line about the twelve months whenever no row was clicked.
   It is the QUICK VIEW's track now: with the pane shut there is no second
   column at all and the rows take the whole width; with a row clicked the pane
   opens the track and the twelve-month note, and any chart that column is for,
   fall UNDER the pane — which is the arrangement Keith photographed and the
   only part of it he did not ask to change.

   `ah-split-open` is put on by public/account-health.js when the pane opens and
   taken off when it closes, so with scripting off there is never a second
   column and the note simply reads under the table. Below the desktop band the
   pane does not exist at all (`.ah-peek` is display:none there), and one column
   with the note under the rows is what this always was. */
.ah-split { display: block; }
.ah-main { min-width: 0; }
.ah-side { min-width: 0; margin-top: var(--space-lg); }
@media (min-width: 1280px) {
  .ah-split.ah-split-open {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22.5rem;
    gap: var(--space-lg);
    align-items: start;
  }
  .ah-split.ah-split-open .ah-side { margin-top: 0; }
}

/* THE QUEUE. An ordinary SGE list table — the house row height, the house
   hairlines, one card per row on a touch phone (src/lists.js cardTableHtml) — so
   nobody has to learn a second kind of row. */
.ah-queue { margin: 0; }
/* The queue's heading is the card's (sectionCard), so the table runs edge to edge
   under the grey strip and the two lines that are not a table are padded. */
.ah-queue > p.muted { margin: 0; padding: var(--sp-sm) var(--sp-md); }
.ah-queue > .ah-more { margin: 0; padding: var(--sp-xs) var(--sp-md) var(--sp-sm); }
/* IT STAYS INSIDE THE WINDOW — Keith: "Keep it within the windows. so it can be
   scroll within the box and nto going into another page." Six columns of nowrap
   figures do not fit 390px, and the answer is never fewer facts: the box carries
   the table sideways. `min-width: min-content` is the exact floor the growth list
   uses — the table may never be narrower than its CELLS need, because cells that
   cannot fit their box paint outside it, while the headings still wrap to buy the
   room. Below the card breakpoint the same table is one card per account and
   there is nothing to carry. */
.ah-queue-scroll { overflow-x: auto; }
.ah-queue-scroll .ah-queue-table { min-width: min-content; }
.ah-queue-scroll thead th { top: 0; }
.ah-queue-table { table-layout: auto; }
.ah-queue-table th, .ah-queue-table td { white-space: nowrap; overflow-wrap: normal; }
/* The account name is the one long column, so it is the one that wraps — at word
   boundaries, with enough room to put a word on a line. */
.ah-queue-table th:first-child,
.ah-queue-table td:first-child { white-space: normal; overflow-wrap: break-word; min-width: 11rem; }
.ah-queue-table tbody th {
  font-size: var(--t-cell); color: var(--ink); font-weight: 400;
  text-transform: none; letter-spacing: var(--ls-caption);
}
/* NOBODY ON IT — the loudest figure on the old page, on the rows it is about.
   A word in a hairline box, in the danger ink, beside the health word rather than
   instead of it: two facts, not one replacing the other. Not a capsule — the
   house radius, like every other box in SGE. */
.ah-alone {
  display: inline-block; margin-left: var(--space-xxs);
  padding: 0 var(--space-xxs);
  border: 1px solid var(--red); border-radius: var(--r-xs);
  font-size: var(--t-cell-min); font-weight: 600; color: var(--red); white-space: nowrap;
}
.ah-more { margin: var(--space-xs) 0 0; font-size: var(--t-cell); font-weight: 600; }
/* THE ROW BEING PREVIEWED, so the panel on the right is never anonymous — the
   same surface step and accent edge the chart used to take. */
.ah-queue-table tr.ah-row-on { background: var(--paper-2); box-shadow: inset 2px 0 0 var(--accent); }

/* ---- THE TREND COLUMN ---- */
.ah-trend { margin: 0; }

/* ---- THE LAYER CARD ----
   Each layer is its own card (src/growth/render.js historyHtml), which is what
   the rule down its left edge used to stand in for — 21 October 2026, Keith:
   "the layout with separate cards". The card is `.cx-pcards > .scard`; this pads
   what it holds. */
.cx-pcards > .scard > .ah-layer { padding: var(--sp-sm) var(--sp-md); }
.ah-layer-head {
  display: flex; align-items: baseline; gap: var(--space-xs); flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--space-xxs);
  margin: 0 0 var(--space-xs);
}
.ah-layer-name { font-size: var(--fs-caption); font-weight: 600; color: var(--ink); white-space: nowrap; }
.ah-layer-count {
  font-size: var(--fs-caption); font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ah-layer-of { font-size: var(--fs-caption); color: var(--faint); min-width: 0; }
/* THE LADDER IS NO LONGER DRAWN IN THIS HEADING — 12 September 2026, named as
   decoration: six words joined by arrows, truncated to an ellipsis the moment the
   window narrowed, and nobody did anything differently for having read them.
   Keith's rule puts the whole ladder on a RECORD, as a bar, where it teaches —
   and it is still there, three ways (public/customer-record.css .cx-lad*). The
   `.ah-layer-ladder` rule that used to sit here is gone with the markup. */

/* ---- ONE CHART PER LAYER ----
   It was three, side by side, on three different vertical scales. One question
   asked at three severities is three shapes a reader is invited to compare and
   must not — so the Healthy chart went (a healthy line going up changes nobody's
   day) and the Slipping chart folded into the queue beside it, which lists the
   very same accounts. What is left is the one line that must go down. */
.ah-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
/* THE WHOLE CHART IS THE LINK — the category, the bars and the note all open the
   same list, cut to what the chart counted. Same rule Keith gave for the Account
   column of a list: the whole area of it, not just the words. At desktop width
   one click previews into the panel instead and a double click opens; below
   1280px there is no panel, so one tap opens (public/account-health.js). */
a.ah-chart {
  display: block; min-width: 0; color: var(--ink); text-decoration: none;
  border-radius: 6px; padding: var(--space-xxs);
  margin: calc(var(--space-xxs) * -1);
}
a.ah-chart:hover, a.ah-chart:focus-visible { background: var(--paper-2); color: var(--ink); text-decoration: none; }
a.ah-chart:hover .ah-chart-name { text-decoration: underline; }
/* THE ONE BEING PREVIEWED, so the panel on the right is never anonymous. */
a.ah-chart.ah-chart-on { background: var(--paper-2); box-shadow: inset 2px 0 0 var(--accent); }
.ah-chart-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--space-xs); margin-bottom: var(--space-xxs);
}
.ah-chart-name { font-size: var(--fs-caption); font-weight: 600; white-space: nowrap; }
/* THE THREE MEANINGS, IN THE HOUSE COLOURS. Never the colour alone: the name is
   written beside it and the note underneath says which way it went. */
.ah-chart-healthy .ah-chart-name { color: var(--green); }
.ah-chart-slipping .ah-chart-name { color: var(--amber); }
.ah-chart-gone-quiet .ah-chart-name,
.ah-chart-at-risk .ah-chart-name { color: var(--red); }
.ah-chart-healthy .ah-bar { fill: var(--green); }
.ah-chart-slipping .ah-bar { fill: var(--amber); }
.ah-chart-gone-quiet .ah-bar,
.ah-chart-at-risk .ah-bar { fill: var(--red); }
/* THE ELEVEN MONTHS BEHIND ARE QUIET AND THIS MONTH IS NOT. Keith's drawing has
   the current bar solid and the rest washed; opacity does that without adding a
   colour to the palette. */
.ah-bar { opacity: 0.32; }
.ah-bar-now { opacity: 1; }
/* THE COUNT, ITS NOUN AND THE CHANGE, ALL PRINTED — "287 contacts · −31". Nobody
   reads a value off a bar, and nobody should have to work out from where a chart
   was drawn whether 287 is companies or people. */
.ah-chart-fig { font-size: var(--fs-caption); color: var(--faint); white-space: nowrap; }
.ah-chart-fig b { font-size: var(--fs-tagline); font-weight: 600; color: var(--ink); }
/* The noun is a LABEL, not a figure: it sits in the reading colour beside the
   number rather than competing with it. */
.ah-chart-unit { color: var(--ink-2); font-weight: 400; }
.ah-chart-change { font-weight: 600; }
.ah-better { color: var(--green); }
.ah-worse { color: var(--red); }
/* THE PLOT, with this chart's own ceiling and floor in the gutter. Two numbers,
   so six different scales on one page can never be mistaken for one shared
   scale, and so a chart that does not start at zero says so. */
.ah-chart-plot { display: grid; grid-template-columns: 2.4rem 1fr; gap: var(--space-xxs); }
.ah-chart-scale {
  display: flex; flex-direction: column; justify-content: space-between;
  font-size: var(--fs-caption); color: var(--faint); text-align: right;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.ah-chart-bars {
  display: block; width: 100%; height: 3.5rem;
  border-bottom: 1px solid var(--line);
}
.ah-chart-months {
  display: flex; justify-content: space-between;
  margin: var(--space-xxs) 0 0 calc(2.4rem + var(--space-xxs));
  font-size: var(--fs-caption); color: var(--faint);
}
.ah-chart-now { color: var(--ink); font-weight: 600; }
/* WHAT MOVED, AND WHAT TO DO ABOUT IT. Keith's rule: "every number is supposed
   to be a number to call for action" — so no chart here is left without its
   move, and the move is on its own line in the accent, where the eye finishes. */
.ah-chart-note {
  display: block; margin-top: var(--space-xxs);
  font-size: var(--fs-caption); line-height: 1.45; color: var(--ink-3);
}
.ah-chart-note b { color: var(--ink); font-weight: 600; }
.ah-chart-do { display: block; margin-top: var(--space-xxs); color: var(--accent); font-weight: 600; }

/* ---- THE PREVIEW PANEL, AND IT PREVIEWS AN ACCOUNT ----
   SGE's one interaction standard, in Keith's words: "one click to preview and
   double clic to open.. make this a standard when there is a preview panel. and
   one click to open when there s no preview panel."

   IT USED TO PREVIEW A CHART — five rows behind a band, after which the reader
   still had to go and find the account. It previews the ACCOUNT from the queue
   now, with the facts that decide the call, and it carries Log Activity: "every
   quick view panel in SGE is editable / is where you work". The five-row drawing
   and its `.nm / .of / .fact` columns went with the chart preview.

   THE CLICK HINT THAT USED TO SIT ABOVE IT (`.ah-hint`) IS GONE TOO, named as
   decoration — SGE has one interaction standard and a page that has to explain it
   is a page that broke it. */
.ah-peek {
  border-left: 2px solid var(--line); padding-left: var(--space-sm);
  min-width: 0; margin-bottom: var(--space-lg);
}
.ah-peek[hidden] { display: none; }
.ah-peek-head { display: flex; align-items: baseline; gap: var(--space-xs); }
.ah-peek-titles { min-width: 0; }
.ah-peek-title { font-size: var(--fs-tagline); font-weight: 600; color: var(--ink); margin: 0; }
.ah-peek-sub { font-size: var(--fs-caption); color: var(--faint); margin: 0 0 var(--space-xs); }
.ah-peek-x {
  margin-left: auto; border: 0; background: none; cursor: pointer;
  color: var(--faint); font-size: var(--fs-tagline); line-height: 1; padding: 0 var(--space-xxs);
}
.ah-peek-x:hover { color: var(--ink); }
/* THE FACTS, AS A DEFINITION LIST — label left, value right, figures tabular so
   the column of them reads straight down. The same shape the record's own
   metadata lists use; no box, one hairline per row. */
.ah-peek-facts {
  display: grid; grid-template-columns: auto 1fr;
  gap: var(--space-xxs) var(--space-xs);
  margin: 0 0 var(--space-sm);
}
/* THE LABEL IS AT THE HOUSE FLOOR, not under it. 11px would have been the first
   type in SGE below the 12px Keith set as the absolute floor (DESIGN.md), and the
   token is the only place the number belongs. */
.ah-peek-facts dt { font-size: var(--t-cell-min); color: var(--faint); }
.ah-peek-facts dd {
  margin: 0; font-size: var(--fs-caption); color: var(--ink);
  font-variant-numeric: tabular-nums;
}
/* THE ACTIONS, BOTTOM RIGHT — Keith, 5 September 2026, retiring the earlier
   bottom-left default: "Left corner is only when it make sense. but by default it
   shoul dbe Right bottom corner". Log Activity carries the accent because it is
   what the reader is about to do; Open record is the outlined secondary beside it
   (DESIGN.md, "Secondary, outlined"). */
.ah-peek-acts {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-xs);
  margin: var(--space-md) 0 0; padding: var(--space-sm) 0 0;
  border-top: 1px solid var(--line-soft);
}
.ah-peek-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: 0 var(--space-md);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: transparent; color: var(--ink-2);
  font-size: var(--fs-caption); font-weight: 600; text-decoration: none;
  white-space: nowrap;
}
.ah-peek-btn:hover { background: var(--paper-2); border-color: var(--faint); color: var(--ink-2); }

/* THE HONEST BLANK. A book SGE has held for three weeks has no year behind it,
   and one quiet line is the whole answer — never eleven bars on the floor. */
.ah-charts-none { margin: var(--space-sm) 0 var(--space-lg); }

/* THERE IS NO PANEL BELOW 1280px. SGE draws no preview panel anywhere below the
   desktop band, so this one is not drawn either and one tap opens instead — the
   width that hides the panel is the width that changes the rule
   (public/account-health.js reads the same query). */
@media (max-width: 1279.98px) {
  .ah-peek { display: none; }
}
/* ON A PHONE BOTH LAYERS STAY AND THE PAGE SCROLLS. This page is the one
   exception Keith granted to the one-screen rule for a report — asked whether
   Account Health should scroll on a phone rather than lose a layer, his answer
   was one word: "scrolling". The answer and the queue come first; the year is
   under them, one chart per layer, at the width that makes twelve bars readable
   on a 390px screen.

   NOTHING IS DROPPED BY WIDTH HERE ANY MORE. Until 12 September 2026 the whole
   `.growth-report-detail` block — the age bands, the salespeople and the regions
   — was `display: none` under 768px, so a manager on a phone simply lost "who
   holds it". The age bands and the regions are cut outright now, and who-holds-it
   is drawn BY ROLE (src/growth/render.js), at every width. */
@media (max-width: 767px) {
  .ah-chart-bars { height: 4rem; }
  .ah-answer,
  .ah-answer2 { font-size: var(--fs-tagline); line-height: 1.25; }
}

/* THE SEVEN TILES ARE GONE — 12 September 2026. `.growth-fig`, `.growth-fig-loud`
   and `.growth-fig-money` drew them, and nothing draws them now: three of the
   seven became the headline sentence, four were cut. `.tiles` and `.tile` are the
   shared drawing and are untouched — the Dashboard and the growth list still use
   them.

   THE DIRECTION OF TRAVEL survives, in the who-holds-it table: arrow, tint AND
   the word, so it reads in greyscale and to a reader who does not separate the
   two tints. */
.growth-move {
  display: block; margin-top: var(--space-xxs);
  font-size: var(--fs-caption); font-weight: 600; line-height: 1.35;
}
.growth-move-worse { color: var(--red); }
.growth-move-better { color: var(--green); }
.growth-move-flat, .growth-move-none { color: var(--muted); font-weight: 400; }
/* `.growth-report-detail` IS GONE — 12 September 2026. It was the grid holding
   three breakdown tables; two of the three are cut and the one that is left is
   drawn by role, in the page's own left column. The rule that hid the whole grid
   under 768px went with it — see the phone block above. */
.growth-break p { margin: 0; padding: var(--sp-sm) var(--sp-md); }
.growth-break-table { table-layout: auto; margin-top: 0; }
/* A ROW HEADING HERE IS THE ROW'S SUBJECT, not a column heading — it is the
   band, the person or the region, and it is the link into those accounts. So it
   reads as ordinary text: the house <th> treatment (muted, 600) is for the
   heading of a column. The `text-transform: none` below is now a no-op — the
   shell stopped uppercasing `th` on 13 September 2026 — and is kept so this
   region does not depend on that removal. */
.growth-break-table tbody th {
  font-size: var(--t-cell); color: var(--ink); font-weight: 400;
  text-transform: none; letter-spacing: var(--ls-caption);
}
/* THE MOVEMENT IS ONE PHRASE AND MUST NOT BREAK ACROSS TWO LINES in a table a
   third of the frame wide — it made every row two lines tall and the column of
   figures impossible to scan. The full sentence stays on the tiles above, where
   there is room for it; in the table it is the arrow, the size and the word. */
.growth-break-table .growth-move { white-space: nowrap; margin-top: 0; }
.growth-break-table td.num { width: 1%; }
/* THESE HEADINGS DO NOT PIN. The shared `thead th` rule sticks a column heading
   under the app bar so it stays readable while a long list scrolls past — right
   for a list of hundreds, wrong for a five-row breakdown, where the pinned row
   simply floated down over the second row and hid it (seen on an iPad at 834px).
   A table that is shorter than the screen has nothing to pin for. */
.growth-break-table thead th { position: static; }
.growth-asat { margin-top: var(--space-lg); }
/* The one sentence saying what the figure a reader arrived on counts. It sits
   between the filter bar and the summary strip, above the list it describes. */
.growth-drill-note { margin: var(--space-xs) 0 0; }

/* Activity tiles — the rep's view where a manager sees money. */
.growth-tiles { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.4rem 0; }
/* BOXES IN A ROW STRETCH TO FILL IT (Task 5, 28 August 2026). `flex: 1 1 6rem`
   was declared only under 720px, so on a desktop two tiles sat at their content
   width against the left edge of a 1180px section and the row read two-thirds
   empty. It is the base now and the phone rule that used to carry it is gone —
   one declaration, every width. */
.growth-tile {
  flex: 1 1 6rem;
  border: 1px solid var(--line); border-radius: 6px; background: var(--card);
  padding: 0.6rem 0.9rem; min-width: 6rem; display: flex; flex-direction: column;
}
.growth-tile-n { font-size: var(--fs-tagline); font-weight: 600; color: var(--ink); line-height: 1.1; }
.growth-tile-l { font-size: var(--fs-caption); color: var(--muted); }

.growth-contacts-summary td { vertical-align: top; }
/* THE PERSON'S NAME IS THE WAY INTO THEIR RECORD, and it measured 20px. This
   table is hand-written rather than drawn by src/lists.js cardTableHtml, so it
   inherits neither the row-click that db931f3 built into the shared list
   machinery nor a tap target — the two are the same omission seen twice.

   The floor is given here, in the same shape the card lists give their lead
   link (`td[data-card-lead] > a`). THE ROW-CLICK IS NOT BUILT HERE: making this
   table go through cardTableHtml is a restructure, it is Keith's rule "fixed
   across the whole solution" rather than one screen's, and it belongs to the
   pass that owns rows and actions. This rule only stops the name being the
   smallest target on the screen in the meantime.

   AND THE FLOOR IS NOT WHAT SETS THE ROW ANY MORE — KEITH, 18 September 2026:
   "Compact style wins". A 44px link inside a 27.6px row is the row: every line
   of this table stood at the floor because the name in it did. Where the shared
   compact table style and the 44px minimum disagree ON A LIST ROW, his decision
   is that the compact style wins, so at a fine pointer the name is sized by its
   own line like every other cell in SGE.

   THE FLOOR IS NOT GONE, IT IS WHERE A FINGER IS — the `pointer: coarse` block
   below takes it back, which is the same construction the shared row padding
   uses (--row-pad-y-touch at the head of this file) and the one w2577 used for
   the dashboard tick-off. Dense at a desk, tap-safe on an iPad and a phone. */
.growth-contacts-summary td:first-child > a {
  display: inline-flex; align-items: center;
}
@media (pointer: coarse) {
  .growth-contacts-summary td:first-child > a { min-height: var(--tap); }
}

@media (max-width: 720px) {
  .growth-signal { grid-template-columns: 1fr; }
  .growth-revenue { min-width: 0; width: 100%; }
}

/* ============================================================
   THE DAY · LOG-ACTIVITY CONTEXT · CREATE A PROJECT (build 2)
   Phone-first, thumb-sized targets, no horizontal scroll. Built
   on the same tokens as the rest of SGE — not the report house style.
   ============================================================ */

/* ---- The Day ---- */
.day-picker { margin-bottom: 0.8rem; }
.day-summary { font-size: var(--fs-caption); color: var(--ink); margin: 0.2rem 0 0.9rem; }
.day-summary strong { font-variant-numeric: tabular-nums; }
.day-head { border-bottom: 1px solid var(--line); padding-bottom: 0.3rem; }

.day-cap {
  background: var(--amber-soft); border: 1px solid var(--amber);
  border-left: 4px solid var(--amber); border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem; margin: 0.4rem 0 1rem;
}
.day-cap-soft { background: var(--paper-2); border-color: var(--line); border-left-color: var(--faint); }
.day-cap-head { font-weight: 600; color: var(--amber); margin: 0 0 0.3rem; }
.day-cap p { margin: 0.2rem 0; font-size: var(--fs-caption); }
.day-withheld { margin: 0.3rem 0 0; padding-left: 1.1rem; font-size: var(--fs-caption); color: var(--ink-2); }
.day-withheld-rule { font-weight: 600; color: var(--ink); }
/* WHAT WAS HELD BACK, ONE TAP AWAY (29 August 2026). The list used to be open
   above the day's work — on the sample day, four rules each with a sentence
   of explanation, before a rep reached the first thing they had to do. The
   summary is a real tap target at every width. */
.day-withheld-more > summary {
  cursor: pointer; font-size: var(--fs-caption); color: var(--ink-2);
  min-height: var(--tap); display: flex; align-items: center;
}
.day-withheld-more > summary:hover { color: var(--accent); }

.day-list { list-style: none; margin: 0.4rem 0 1.2rem; padding: 0; }
.day-item {
  display: flex; gap: 0.7rem; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 0.7rem 0.85rem; margin-bottom: 0.55rem;
}
.day-rail { flex: 0 0 4px; border-radius: var(--r-xs); background: var(--faint); }
.day-rail-task { background: var(--green); }
.day-rail-visit { background: var(--teal); }
.day-item-overdue { background: var(--amber-soft); border-color: var(--amber); }
.day-item-overdue .day-rail { background: var(--amber); }
.day-item-done { opacity: 0.7; }
.day-item-asleep { opacity: 0.75; }
.day-body { flex: 1 1 auto; min-width: 0; }
.day-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem; font-size: var(--fs-caption); }
.day-kind {
  font-size: var(--fs-caption); letter-spacing: var(--ls-caption);
  color: var(--ink-3); background: var(--paper-2); border-radius: var(--r-xs); padding: 0.05rem 0.35rem;
}
.day-time { font-variant-numeric: tabular-nums; font-weight: 600; font-size: var(--fs-caption); }
.day-why { font-style: italic; color: var(--ink-2); }
.day-reason { font-size: var(--fs-caption); color: var(--ink-2); margin: 0.3rem 0 0.4rem; }
.day-badge {
  font-size: var(--fs-caption); letter-spacing: var(--ls-caption);
  border-radius: var(--r-xs); padding: 0.05rem 0.4rem; background: var(--paper-2); color: var(--ink-3);
}
.day-badge-overdue { background: var(--warning-fill); color: var(--on-accent); }
.day-badge-due { background: var(--green-soft); color: var(--green); }
.day-badge-done { background: var(--green-soft); color: var(--green); }
.day-badge-flag { background: var(--red-soft); color: var(--red); }
.day-log { font-weight: 600; text-decoration: none; color: var(--teal); white-space: nowrap; }

/* THE SALES-MANAGER QUEUE ON THE DAY LIST — work that belongs to nobody yet, so
   its rail is neither the rep's green nor a visit's teal. The breach badge
   borrows the clock tones the leads list already uses (.clock-overdue and the
   rest above), so the same lead cannot read one way here and another there. */
/* PASS 2 §2.2: a rail and a card border are structure. The queue rail stays
   distinct from the base rail's --faint by being the dark neutral, so "belongs
   to nobody yet" still reads at a glance without the action colour and without
   borrowing the amber that already means overdue on this very list. */
.day-rail-queue { background: var(--ink-3); }
.day-item-queue { border-color: var(--line); }
.day-badge.day-clock { text-transform: none; letter-spacing: 0; background: var(--paper-2); }

.day-tick { margin-top: 0.3rem; }
.day-tick > summary {
  cursor: pointer; font-size: var(--fs-caption); font-weight: 600; color: var(--green);
  list-style: none; display: inline-flex; align-items: center; gap: 0.3rem;
  min-height: 2.4rem;
}
.day-tick > summary::-webkit-details-marker { display: none; }
.day-tick-form { margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px dashed var(--line); }
.day-outcomes { border: 0; padding: 0; margin: 0 0 0.5rem; }
.day-outcomes legend { font-weight: 600; font-size: var(--fs-caption); color: var(--ink-2); padding: 0; }
/* KEITH, 27 August 2026, on Log Activity: "Looks very messy. So I think the whole
   box everything. I need to real line." Each outcome option was a bordered card;
   it becomes a ruled row instead — a line BETWEEN the options, no box round each. */
.day-outcome {
  display: block; border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0;
  padding: 0.55rem 0.2rem; margin: 0; cursor: pointer; min-height: var(--tap);
}
.day-outcome:last-of-type { border-bottom: 0; }
.day-outcome input { width: auto; margin-right: 0.4rem; }
.day-outcome-l { font-weight: 600; }
.day-outcome-b { display: block; font-size: var(--fs-caption); color: var(--ink-3); margin-left: 1.3rem; }
.day-extra { display: block; margin: 0.4rem 0; font-size: var(--fs-caption); }
.day-sleeping > summary { cursor: pointer; font-weight: 600; color: var(--ink-2); margin: 0.6rem 0; }
.day-foot { margin-top: 1rem; }

/* ---- Log-Activity context ---- */
.log-context { background: var(--card); }
.log-promise {
  background: var(--amber-soft); border: 1px solid var(--line);
  border-left: 4px solid var(--amber); border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem; margin-bottom: 0.7rem;
}
.log-promise-overdue { border-left-color: var(--red); }
.log-promise-none { background: var(--paper-2); border-left-color: var(--faint); }
.log-promise-k {
  font-size: var(--fs-caption); letter-spacing: var(--ls-caption);
  color: var(--amber); margin-bottom: 0.25rem;
}
.log-promise-d > summary { cursor: pointer; list-style: none; }
.log-promise-d > summary::-webkit-details-marker { display: none; }
.log-promise-t {
  font-weight: 600; font-size: var(--fs-caption); color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.log-promise-full { margin: 0.3rem 0 0; font-size: var(--fs-caption); }
.log-promise-m { font-size: var(--fs-caption); color: var(--ink-2); margin-top: 0.35rem; }
.log-pill {
  font-size: var(--fs-caption); letter-spacing: var(--ls-caption);
  background: var(--warning-fill); color: var(--on-accent); border-radius: var(--r-xs); padding: 0.05rem 0.4rem;
}
.log-strip { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 0.5rem; margin-bottom: 0.6rem; }
.log-rd { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.45rem 0.55rem; min-width: 0; }
.log-rd-k { font-size: var(--fs-caption); letter-spacing: var(--ls-caption); color: var(--ink-3); }
.log-rd-v { font-weight: 600; font-size: var(--fs-caption); }
.log-rd-s { font-size: var(--fs-caption); color: var(--ink-3); }
.log-risk { color: var(--amber); font-weight: 600; }
.log-history > summary { cursor: pointer; font-weight: 600; color: var(--ink-2); min-height: var(--tap); display: flex; align-items: center; gap: 0.4rem; }
.log-h-panel { padding: 0.3rem 0 0.2rem; }
.log-h-k { font-size: var(--fs-caption); letter-spacing: var(--ls-caption); color: var(--green); margin: 0.5rem 0 0.2rem; }
.log-h-row { display: flex; justify-content: space-between; gap: 0.7rem; font-size: var(--fs-caption); padding: 0.2rem 0; border-bottom: 1px dashed var(--line-soft); }
.log-h-d { font-variant-numeric: tabular-nums; font-size: var(--fs-caption); color: var(--ink-3); flex: none; }
.log-fastpath { margin: 0.5rem 0 0; }

/* ---- who asked for this sample (migration 083) ----
   A two-value answer given per sample line, on the Log Activity form and the
   edit form. It is a pair of RADIOS styled as chips, never a <select>: opening
   a menu to choose between two things is a tap spent on nothing, and the form
   has to work with script off, where a radio is the only control that does.
   Written against the existing .chip vocabulary — same border, same radius,
   same type floor — rather than as a second look for the same idea.
   Each chip is a --tap (44px) target at every width, per BS-001 rule V8, and
   the group wraps to its own line on a phone rather than squeezing the chips
   below that floor. */
/* The choice takes its own line under the item it belongs to, at EVERY width.
   The line already carries an item code, a description and a quantity box, and
   at 375px there is no room left for two 44px chips beside them — and a choice
   that has to be hunted for on the line above is a choice a rep will skip. One
   rule rather than a phone override: the layout is the same everywhere, which
   is also what keeps this out of the media block the filter chips own. */
.log-init {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.35rem; margin-top: 0.35rem;
}
.log-init-q {
  font-family: var(--font); font-size: var(--t-cell-min); color: var(--ink-3);
  letter-spacing: var(--ls-caption);
}
.log-init-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  min-height: var(--tap); padding: 0.28rem 0.8rem;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--panel); color: var(--ink-2);
  font-family: var(--font); font-size: var(--t-cell-min); font-weight: 600;
  cursor: pointer; margin: 0;
}
/* The radio itself stays VISIBLE inside the chip. The fill below says which is
   chosen where :has() is supported; the native dot says it everywhere else, so
   the answer is never invisible. */
.log-init-chip input { display: inline; width: auto; margin: 0; }
.log-init-chip:hover { border-color: var(--accent); color: var(--accent-deep); }
.log-init-chip:has(input:checked) {
  background: var(--accent-soft); border-color: var(--accent); color: var(--ink);
}
.log-init-chip .muted { font-size: var(--t-cell-min); }

/* ---- switcher: a control the ordinary path never needs ----
   Where SGE already knows the answer (which customer, which campaign) the
   screen states it and folds the picker away. Rules B20/B21/B24 — the common
   path must not spend a tap confirming what the system just displayed. */
.switcher { margin: 0 0 0.7rem; }
.switcher > summary {
  /* A <summary> is pressed, so it keeps the action colour — at the named
     value now rather than the step below it (§2.2). */
  cursor: pointer; font-size: var(--fs-caption); color: var(--accent);
  /* WAS 2.6rem, which is 41.6px — two and a half pixels under the floor, on a
     control that is pressed. It was the whole 42px group in the grid check.
     The token says what the number is for; 2.6rem did not. */
  min-height: var(--tap); display: flex; align-items: center; gap: 0.4rem;
}
/* NO UNDERLINE ON HOVER — Keith, 4 September 2026. A <summary> is a button, so
   it takes the colour step every other control takes and leaves the underline
   to links. */
.switcher > summary:hover { color: var(--accent-deep); }
.switcher > p { margin: 0.2rem 0 0.5rem; }
.switcher .search { margin: 0; }

/* THE WAY BACK IS A CONTROL. Every record and every form in SGE carries a
   "\2190 Back" link under its title, and it measured 20px tall — an inline run
   of text, which is what an <a> is by default. It is the most-pressed control
   on a phone in the field and it was the smallest.

   Given a box the same way the card lists already give one to their lead link
   (`td[data-card-lead] > a`, below): inline-flex so the link keeps its place in
   a "\00B7"-separated nav line, a floor so a thumb can find it. Nothing moves
   horizontally and no colour changes.

   SCOPE IS DELIBERATELY NARROW. It is the nav line under a page title and the
   paragraphs explicitly marked as a way back — NOT every muted link, because a
   link inside a sentence cannot be given a 44px box without breaking the
   sentence, and rewriting those into buttons is pass 5's job, not this one's. */
.pagehead p.muted a,
p.backlink a {
  display: inline-flex; align-items: center; min-height: var(--tap);
}

/* ---- Create a project ---- */
.project-scard { max-width: 34rem; }
.project-phone { display: flex; gap: 0.5rem; align-items: flex-end; flex-wrap: wrap; }
.project-phone label { flex: 1 1 12rem; }
.project-phone button { width: auto; flex: 0 0 auto; min-height: 2.9rem; }
.project-note { font-size: var(--fs-caption); color: var(--ink-2); }
.project-prefill {
  display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.8rem;
  background: var(--green-soft); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem; margin: 0.6rem 0;
}
.project-prefill-l { font-size: var(--fs-caption); letter-spacing: var(--ls-caption); color: var(--ink-3); align-self: center; }
.project-prefill-v { font-weight: 600; }
.project-pick, .project-new { margin: 0.6rem 0; }
/* A ruled row per option, not a box round each (Keith, 27 August 2026). */
.project-pick-opt { display: block; border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; padding: 0.55rem 0.2rem; margin: 0; cursor: pointer; min-height: 2.8rem; }
.project-pick-opt:last-of-type { border-bottom: 0; }
.project-pick-opt input { width: auto; margin-right: 0.45rem; }
.project-form button[type="submit"] { min-height: 3rem; }

.project-done .project-done-mark { font-weight: 600; color: var(--green); font-size: var(--fs-body); }
.project-done-ref { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.7rem 0.85rem; margin: 0.6rem 0; }
.project-done-refv { font-family: var(--mono); font-size: var(--fs-tagline); font-weight: 600; letter-spacing: var(--ls-caption); color: var(--ink); }
.project-done-table th { text-align: left; color: var(--ink-3); font-weight: 600; padding-right: 1rem; white-space: nowrap; vertical-align: top; }
.project-done-attach { margin: 0; padding-left: 1.1rem; }

@media (max-width: 720px) {
  .log-strip { grid-template-columns: 1fr; }
  .day-line { font-size: var(--fs-caption); }
}

/* =====================================================================
   THE TEAM BOARD — who is where today, said in names, and how busy the
   week was, said in numbers. Built from SGE's own tokens (paper, ink,
   green, amber), readable across a room. Larger type than the tables: a
   director may view it on a shared screen.
   ===================================================================== */
/* THE VIEW SWITCH — the calendar's own bar (.cal-views + .pill), which
   carries no margin of its own because it sits inside a toolbar there.
   Here it sits under the page head, so it is given the one gap it needs
   and nothing else. */
.board-views { margin: 0 0 var(--sp-md); }
.board-summary {
  font-size: var(--fs-body); margin: 0.4rem 0 1.1rem; color: var(--ink);
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
/* NO CODE FONT ON BUSINESS TEXT — Keith, 5 September 2026. Counts, region
   names, waiting times and status tags on this board are business text and are
   set in the house face. `tabular-nums` stays wherever figures have to line up
   in a column; that is a feature of the normal face, not of the mono stack. */
.board-summary strong { font-size: var(--fs-tagline); font-variant-numeric: tabular-nums; }
.board-now { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--green); }
.board-amber {
  background: var(--warning-fill); color: var(--on-accent); font-weight: 600; font-size: var(--fs-caption);
  border-radius: var(--r-pill); padding: 0.15rem 0.7rem; margin-left: 0.2rem;
}
.board {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.board-lane { display: flex; align-items: stretch; border-top: 1px solid var(--line); }
.board-lane:first-child { border-top: none; }
.board-lane-empty { background: var(--amber-soft); }
.board-rep {
  flex: 0 0 168px; padding: 0.9rem 1rem; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 0.25rem;
}
.board-name { font-size: var(--fs-body); font-weight: 700; color: var(--ink); text-decoration: none; }
.board-name:hover { color: var(--accent-deep); }
/* The region name loses the code font, and now its capitals too — Keith,
   13 September 2026: "Strip the Foreced Capital". It renders as it is stored. */
.board-terr {
  font-size: var(--fs-caption); letter-spacing: var(--ls-caption);
  color: var(--muted);
}
.board-tally {
  display: inline-block; font-variant-numeric: tabular-nums; font-size: var(--fs-caption); font-weight: 600;
  color: var(--green); background: var(--green-soft); border-radius: 6px;
  padding: 0.1rem 0.5rem; margin-top: 0.2rem; white-space: nowrap; align-self: flex-start;
}
.board-tally-warn { color: var(--amber); background: var(--amber-soft); }
.board-stops {
  flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: 0.55rem;
  padding: 0.7rem 0.8rem; align-content: flex-start;
}
.board-stop {
  flex: 1 1 190px; min-width: 178px; max-width: 260px;
  border: 1px solid var(--line); border-left: 3px solid var(--green);
  border-radius: var(--radius-sm); padding: 0.5rem 0.7rem; background: var(--card);
}
.board-stop-top {
  display: flex; align-items: baseline; gap: 0.5rem;
  font-variant-numeric: tabular-nums; font-size: var(--fs-caption); font-weight: 600; margin-bottom: 0.15rem;
}
.board-time { font-variant-numeric: tabular-nums; }
.board-tag {
  font-size: var(--fs-caption); font-weight: 700; letter-spacing: var(--ls-caption);
  border-radius: var(--r-xs); padding: 0.05rem 0.4rem; line-height: 1.6;
}
.board-tag-done { color: var(--green); background: var(--green-soft); }
.board-tag-next { color: var(--on-accent); background: var(--success-fill); }
.board-tag-late, .board-tag-missed { color: var(--on-accent); background: var(--warning-fill); }
.board-cust { font-size: var(--fs-caption); font-weight: 600; line-height: 1.25; }
.board-cust a { color: var(--ink); text-decoration: none; }
.board-cust a:hover { color: var(--accent-deep); }
.board-meta { font-size: var(--fs-caption); color: var(--ink-2); margin: 0.1rem 0 0; }
.board-why { font-style: italic; }
.board-flag {
  font-size: var(--fs-caption); font-weight: 600; color: var(--amber);
  margin: 0.3rem 0 0;
}
/* done stops settle back; anything wrong comes forward in amber */
.board-stop-done { background: var(--paper); border-left-color: var(--faint); }
.board-stop-done .board-cust a, .board-stop-done .board-cust { color: var(--ink-3); }
.board-stop-done .board-stop-top { color: var(--ink-3); }
.board-stop-late, .board-stop-missed, .board-stop-warn {
  background: var(--amber-soft); border-color: var(--amber); border-left-color: var(--amber);
}
.board-empty { flex: 1 1 auto; display: flex; align-items: center; gap: 0.8rem; padding: 0.9rem 1rem; }
.board-empty-mark {
  font-size: var(--fs-caption); font-weight: 700; letter-spacing: var(--ls-caption);
  color: var(--on-accent); background: var(--warning-fill);
  border-radius: 6px; padding: 0.15rem 0.6rem; white-space: nowrap;
}
.board-empty-say { font-size: var(--fs-caption); color: var(--amber); font-weight: 600; }
.board-empty-say small { display: block; font-weight: 400; color: var(--ink-2); font-size: var(--fs-caption); }
.board-legend, .wk-legend {
  display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap;
  font-size: var(--fs-caption); color: var(--ink-2); margin: 0.7rem 0.1rem 0;
}
.board-lg { display: flex; align-items: center; gap: 0.4rem; }
.board-lg-chip { width: 13px; height: 13px; border-radius: var(--r-xs); border: 1px solid var(--line); flex: 0 0 auto; }
.board-lg-done { background: var(--paper); border-left: 3px solid var(--faint); }
.board-lg-live { background: var(--card); border-left: 3px solid var(--green); }
.board-lg-warn { background: var(--amber-soft); border: 1px solid var(--amber); }
.board-foot { margin-top: 1rem; }

@media (max-width: 820px) {
  .board-lane { flex-direction: column; }
  .board-rep { flex: 0 0 auto; border-right: none; border-bottom: 1px dashed var(--line);
    flex-direction: row; align-items: baseline; gap: 0.7rem; }
  .board-tally { margin-left: auto; margin-top: 0; }
  .board-stop { max-width: none; }
}

/* =====================================================================
   THE WEEK GRID — numbers, never a list. Shade by busyness; overdue is
   a stock shown only at the moment and never summed.
   ===================================================================== */
.wk-scroll { overflow-x: auto; }
table.wk-grid { border-collapse: separate; border-spacing: 3px; width: 100%; }
.wk-grid th { text-align: center; font-size: var(--t-cell-min); border: none; }
.wk-grid th.wk-corner { text-align: left; }
/* PASS 2 §2.2: a column heading is structural, today or not. */
.wk-grid th.wk-today { color: var(--ink); }
/* The grid's own figures: house face, tabular so the columns line up. */
.wk-dnum { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }
/* THE REP CELL IS A <td> SINCE 12 SEPTEMBER 2026 (outstanding row 19). The grid
   goes through the list machinery now so it becomes one card per salesperson on
   a phone, and that machinery labels the <td>s in order — a leading <th> is not
   counted, so every field on every card would have been labelled with the
   heading of the column before it. It keeps the look it had as a heading cell:
   left, no rule, and the small caption size the rest of this grid is set in. */
.wk-grid td.wk-rep { text-align: left; font-size: var(--t-cell-min); border: none; }
.wk-rep { white-space: nowrap; }
.wk-rep a { color: var(--ink); font-weight: 600; text-decoration: none; }
.wk-rep a:hover { color: var(--accent-deep); }
.wk-role { display: block; font-size: var(--t-cell-min); letter-spacing: var(--ls-caption);
  color: var(--muted); }
.wk-c { padding: 0; border: none; border-radius: var(--r-sm); text-align: center; }
.wk-link {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 54px; min-height: 44px; padding: 0.3rem; text-decoration: none; position: relative;
}
.wk-v { font-variant-numeric: tabular-nums; font-weight: 700; font-size: var(--fs-caption); color: var(--ink); }
.wk-t { font-variant-numeric: tabular-nums; font-size: var(--t-cell-min); color: var(--ink-2); }
.wk-blank { color: var(--faint); }
.wk-od {
  display: inline-block; font-variant-numeric: tabular-nums; font-size: var(--t-cell-min); font-weight: 700;
  color: var(--on-accent); background: var(--warning-fill); border-radius: var(--r-pill); padding: 0 0.35rem;
  min-width: 1.1rem; text-align: center;
}
.wk-link .wk-od { position: absolute; top: 2px; right: 2px; }
.wk-h0 { background: repeating-linear-gradient(45deg, var(--paper), var(--paper) 4px, var(--paper-2) 4px, var(--paper-2) 8px); }
/* THE HEAT RAMP. Four steps of the SAME hue — the house's success green — mixed
   into whatever surface is under them, so the ramp reads the same way up on a
   black tile as on parchment. It was four light-theme literals ending in a mid
   green with near-black text on it, which on the dark ground was a bright block
   nobody could read.

   THIS IS THE ONE PLACE A RAMP OF ONE HUE IS THE POINT rather than decoration:
   the darker the cell the busier the week, which is a quantity, and the document
   has no token for a quantity ramp. Flagged in the report. */
.wk-h1 { background: color-mix(in srgb, var(--success) 12%, var(--panel)); }
.wk-h2 { background: color-mix(in srgb, var(--success) 26%, var(--panel)); }
.wk-h3 { background: color-mix(in srgb, var(--success) 44%, var(--panel)); }
.wk-h4 { background: color-mix(in srgb, var(--success) 68%, var(--panel)); }
.wk-h4 .wk-v, .wk-h4 .wk-t { color: var(--on-accent); }
.wk-tot, .wk-tot-day { background: var(--paper-2); border-radius: var(--r-sm); text-align: center; }
.wk-tot .wk-v, .wk-tot-day .wk-v { display: block; }
.wk-tot .wk-t, .wk-tot-day .wk-t { display: block; }
.wk-odn { display: block; font-variant-numeric: tabular-nums; font-size: var(--t-cell-min); font-weight: 700; color: var(--amber); }
.wk-totals th, .wk-totals td { border-top: 2px solid var(--ink); }
.wk-sw { width: 14px; height: 14px; border-radius: var(--r-xs); display: inline-block; }
.wk-note { margin-top: 1rem; }

/* =====================================================================
   THE SALES MANAGER'S VIEW — the outcome mix, the money, the clock.
   ===================================================================== */
.mgr-mix {
  display: inline-block; font-size: var(--t-cell-min); border-radius: var(--r-pill);
  padding: 0.05rem 0.5rem; background: var(--paper-2); color: var(--ink-2); margin: 0 0.15rem 0.15rem 0;
}
.mgr-mix-not_now { background: var(--amber-soft); color: var(--amber); }
.mgr-mix-using_competitor { background: var(--red-soft); color: var(--red); }
.mgr-mix-job_coming { background: var(--green-soft); color: var(--green); }
.mgr-od { color: var(--amber); font-weight: 700; }
.mgr-rule { font-weight: 600; }
.mgr-overdue { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.mgr-overdue li { margin-bottom: 0.35rem; font-size: var(--t-cell-min); }
.mgr-row-warn td { background: var(--panel-2); }
.mgr-row-detail td { border-bottom: 1px solid var(--line); padding-top: 0; }

/* ---- A STALE FIGURE CARRIES AN AMBER DOT — row 178, answered by Keith on
   18 September 2026. Worn by the Feeds block on Settings and by the same rows
   on /admin/health, which is the same mark drawn from one constant in
   src/app.js so the two screens cannot say different things about one feed.

   IT IS NEVER THE COLOUR ALONE. The word "Stale" is in the markup beside the
   dot and the dot carries aria-hidden, so a reader who cannot tell amber from
   grey, and a screen reader, both get the word and neither gets it twice.

   AND IT DOES NOT MAKE THE ROW TALLER. The dot is 8px inside the line box, so
   a compact table row stays the height it was — Keith, 17 September 2026:
   "Compact style wins". */
.stale-mark {
  display: inline-flex; align-items: center; gap: 0.3rem;
  color: var(--amber); font-weight: 600; font-size: var(--t-cell-min);
  white-space: nowrap;
}
/* AND WHERE THE MARK IS A WAY THROUGH — row 178's own clause, the half built on
   18 September 2026: a stale figure anywhere in SGE carries the dot LINKING to
   the Feeds block in Settings, which is the screen that says why. The mark keeps
   the amber it has as a span, because the colour is the signal and a link-blue
   dot would stop reading as a warning; what says it is a link is the underline
   on hover, which is a link's own behaviour and not a button's (Keith's rule
   there is about buttons). The Feeds block's own copy is a span and gets none of
   this — there is nowhere for it to go. */
a.stale-mark { color: var(--amber); text-decoration: none; }
a.stale-mark:hover, a.stale-mark:focus-visible { text-decoration: underline; }
.stale-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--amber); flex: 0 0 auto;
}

/* ---- WORKING THE BOOK, REBUILT — 17 September 2026, row A11.
   KEITH: "wahh this is wasy too messy.. how to read?"

   THE MIX IS ONE LINE. It was free text stacked vertically, so the row heights
   jumped between about 30px and 100px and the eye could not run down a column.
   Two chips and a "+N", on one line, always. */
/* THE ROW HAS A CEILING. A table lays its columns out to fit their content, so
   a cell of chips that will not wrap would widen the whole table past the page
   — which is how the Outcome mix column came to run off the right edge. The
   ceiling is on the flex row, so the column asks for no more than this and the
   chips inside it give way instead. */
.mgr-mixrow {
  display: flex; gap: 0.2rem; align-items: center;
  min-width: 0; max-width: 20rem; white-space: nowrap;
}
.mgr-mixrow .mgr-mix { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* AND THE COLUMNS ARE GIVEN THEIR SHARE AT DESK WIDTH. `.projects-table` is
   `table-layout: fixed` and declares no column widths, so seven columns each
   took a SEVENTH of the table — which gave "Asleep", a column of single digits,
   exactly as much room as the outcome mix, and clipped two chips to "1 Job c…"
   on a 1440px screen with space to spare. A min-width cannot answer this: fixed
   layout ignores it. So the share is stated, and it is stated ONLY in the desk
   band — below 1024px the seventh each is already close to right and the Owner
   names wrap either way, and a narrower share there would clip what reads
   today. The seven add to 100. */
@media (min-width: 1024px) {
  .mgr-owners th:nth-child(1) { width: 20%; }
  .mgr-owners th:nth-child(2),
  .mgr-owners th:nth-child(3),
  .mgr-owners th:nth-child(4),
  .mgr-owners th:nth-child(5) { width: 8.5%; }
  .mgr-owners th:nth-child(6) { width: 16%; }
  .mgr-owners th:nth-child(7) { width: 30%; }
}
/* THE "+N" NEVER SHRINKS. It is the shortest thing in the row and the one that
   says how much is not being shown, so the answers beside it give way to it
   rather than the other way round. Only the "+N" — the two real answers shrink
   evenly between them, which is why this is a class and not :last-child. */
.mgr-mix-more { flex: 0 0 auto; }

/* THE FIGURES LINE UP. `.num` is right-aligned by the rule at the head of this
   sheet; what this adds is the tabular face on this table's own cells, so the
   digits sit in columns of equal width and a column of them reads as a column.
   The Owner and Outcome mix cells are not figures and keep the house alignment. */
.mgr-owners td.num, .mgr-owners th.num {
  text-align: right; font-variant-numeric: tabular-nums;
}
/* THE ROW ITSELF EXPANDS — the overdue commitments open INSIDE the Overdue
   cell rather than in a second full-width row under every owner. The summary
   is the figure, so the column still reads as a column when every row is shut;
   opened, the list takes the cell's width and pushes the row down. */
/* THE SUMMARY IS THE FIGURE AND NOTHING ELSE — no marker, no box, no height of
   its own. It sits on the row's own line, exactly where the figure sat when it
   was not a control, so the Overdue column still reads as a column of numbers.
   The whole cell is the target (`.mgr-owners td.num:has(…)` would be the other
   way to say it, and is not supported everywhere this has to run). */
.mgr-od-why > summary {
  list-style: none; cursor: pointer; display: block; text-align: right;
}
.mgr-od-why > summary::-webkit-details-marker { display: none; }
.mgr-od-why > summary:hover .mgr-od { color: var(--accent); }
.mgr-od-why[open] { text-align: left; }
.mgr-od-why .mgr-overdue { white-space: normal; text-align: left; min-width: 14rem; }

/* THE CAPTION over the table — one line, where three lines of prose with five
   figures buried in them used to be. */
.mgr-caption {
  margin: 0 0 var(--space-xs); font-size: var(--t-cell-min); color: var(--ink-2);
}
.mgr-caption strong { color: var(--ink); }
.mgr-why { font-size: var(--t-cell-min); }
.mgr-why summary { cursor: pointer; color: var(--accent); }
.mgr-why ul { margin: 0.4rem 0 0.4rem 1.1rem; }
.mgr-misfire, .mgr-over { background: var(--warning-fill); color: var(--on-accent); }
.mgr-ok { background: var(--green-soft); color: var(--green); }
.mgr-grace { background: var(--paper-2); color: var(--ink-3); }
/* These pills carry SENTENCES, not one-word statuses, and .status capitalises
   every word: "badly calibrated" came out "Badly Calibrated", "over — zero
   allowance" as "Over — Zero Allowance", "121.4% over" as "121.4% Over". Same
   call as .status-score-* above. */
.mgr-misfire, .mgr-over, .mgr-grace, .mgr-clock { text-transform: none; }
.mgr-unassigned { background: var(--red-soft); color: var(--red); }
.mgr-money-heads { display: flex; gap: 0.8rem; flex-wrap: wrap; margin: 0.4rem 0 0.8rem; }
.mgr-tile {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.7rem 1rem; min-width: 160px;
}
/* The money on the sales-manager page is money, not code — house face,
   tabular figures (Keith, 5 September 2026). */
.mgr-tile-n { display: block; font-variant-numeric: tabular-nums; font-size: var(--fs-tagline); font-weight: 700; color: var(--ink); }
.mgr-tile-l { display: block; font-size: var(--fs-caption); color: var(--muted); }

/* =====================================================================
   CAMPAIGNS — the checklist call and the campaign report.
   Nothing new is invented here: the tiles, cards, chips and tables are
   SGE's own. These rules only give the checklist its shape.
   ===================================================================== */
.campaign-chooser { align-items: flex-end; }
/* The campaign SGE attached for itself, on the ordinary activity form. It sits
   at the TOP of the form and reads as a statement of what saving will do, not
   as one more optional field — that is the whole difference between this and
   the selector it replaced. */
.campaign-attach { margin: 0 0 1rem; background: var(--paper-2); border-radius: var(--radius-sm); }
.campaign-attach label.inline { display: block; margin: 0.35rem 0; }
.campaign-attach > p.muted { margin: 0.15rem 0 0.5rem; font-size: var(--fs-caption); }
.campaign-checklist { margin: 1rem 0; }
.campaign-points { margin: 0.6rem 0 0; padding-left: 1.2rem; }
.campaign-point { margin-bottom: 1rem; }
.campaign-point > p.muted { margin: 0.15rem 0 0.4rem; font-size: var(--fs-caption); }
.campaign-point textarea { margin-top: 0.2rem; }
/* The follow-up is the decision the call ends on, so it reads as its own
   block rather than as a fourth point. */
.campaign-followup { margin-top: 0.8rem; background: var(--paper-2); border-radius: var(--radius-sm); }
.campaign-order-form .qty { width: 4.5rem; }
.campaign-tiles { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1000px) { .campaign-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .campaign-tiles { grid-template-columns: repeat(2, 1fr); } }

/* =====================================================================
   THE SALES CHALLENGE — a manager sets a target, SGE measures it, and
   everyone sees how far they are.
   Almost nothing new: the progress bar is .score-bar/.score-fill with the
   enumerated .w-N widths (CSP forbids an inline style attribute), the
   tables and cards are SGE's own. These rules exist for ONE reason —
   the two badges below must never be mistaken for each other.
   ===================================================================== */
/* A challenge badge is a status tag a salesperson reads, not a code value. */
.chal-badge {
  font-size: var(--t-cell-min); letter-spacing: var(--ls-caption);
  border-radius: var(--r-xs); padding: 0.05rem 0.4rem; background: var(--paper-2); color: var(--ink-3);
  white-space: nowrap;
}
/* DECLARED, NOT MEASURED — amber, because it is neither a fault (red) nor a
   fact SGE stands behind (neutral). Somebody keyed this number and SGE cannot
   check it, and the reader has to know that at a glance, on every screen it
   appears on. Same treatment "projects in hand" gets. */
.chal-badge-declared { background: var(--amber-soft); color: var(--amber); }
/* (auto) — counted by SGE, read-only. House rule 3. */
.chal-badge-auto { background: var(--paper-2); color: var(--ink-3); }
.chal-badge-reached { background: var(--green-soft); color: var(--green); }
/* THE LIST PAGE'S CARD (21 October 2026). The panel is `.cx-pcards > .scard`
   (public/customer-record.css); the card has no heading of its own, so the chips
   take the card's inner padding, and the table runs edge to edge inside it. */
.chal-cards > .scard > .chips { margin: 0; padding: var(--sp-sm) var(--sp-md); }

/* The participant's own line, ON THE DAY LIST — one strip, not a second list
   to check. It sits above the day's items and reads in one glance. */
.challenge-strip {
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem; margin: 0 0 1rem;
}
.challenge-strip .score-bar { margin: 0.4rem 0; }
.challenge-figures { margin: 0.2rem 0; font-size: var(--fs-caption); }
/* The sentence that turns the figure into an instruction. It is the point of
   the strip, so it is not muted into the background. */
.challenge-reading { margin: 0.3rem 0 0; font-size: var(--fs-caption); color: var(--ink-2); }
.challenge-mix { margin: 0.3rem 0 0; font-size: var(--fs-caption); }

/* The sentence that is the same for everybody, said ONCE above the standings
   instead of copied against every name. It is the same sentence the per-person
   column carries, so it takes the same weight — lifting it out must not demote
   it to a footnote. */
.challenge-common-reading { margin: 0.2rem 0 0.5rem; font-size: var(--fs-caption); color: var(--ink-2); }

.challenge-standings .score-bar { min-width: 6rem; }
.challenge-reached td { background: var(--green-soft); }
.challenge-form label, .challenge-declared-form label { display: block; margin: 0.55rem 0; }
.challenge-form fieldset, .challenge-declared-form fieldset { margin: 0.8rem 0; }
.challenge-form details { margin: 0.2rem 0 0.8rem; }

/* THE PROGRESS BAR ON THE GUIDED SETUP — Keith's own addition, 3 September 2026:
   "there should be a process bar so the salesmanager/director know how far they
   are in when setting the challenge".

   THE BAR IS THE ONE SGE ALREADY HAS (.score-bar/.score-fill with the enumerated
   .w-N widths — CSP forbids an inline style attribute). What is new is only the
   named steps beside it: a percentage says how far along somebody is and nothing
   about what is left, and Keith asked for both. Same corner shape as everything
   else, no capsules. */
.challenge-progress { margin: 0 0 var(--space-md); }
.challenge-progress-said { margin: 0 0 var(--space-xs); font-size: var(--fs-caption); }
.challenge-steps {
  display: flex; flex-wrap: wrap; gap: var(--space-xs);
  list-style: none; margin: var(--space-xs) 0 0; padding: 0;
}
.challenge-step {
  font-size: var(--t-cell-min); letter-spacing: var(--ls-caption);
  border-radius: var(--r-xs); padding: 0.1rem 0.45rem;
  background: var(--paper-2); color: var(--ink-3); white-space: nowrap;
}
/* Behind you, and done. */
.challenge-step-done { background: var(--green-soft); color: var(--green); }
/* Where you are. It is the one thing on the bar that has to be findable without
   reading, so it takes the accent rather than a third grey. */
.challenge-step-now { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.challenge-step-now .muted { color: inherit; }
/* Back, Next and Save-and-finish-later sit on one line, wrapping on a phone
   rather than shrinking into three unreadable buttons. */
.challenge-nav { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin: var(--space-md) 0 var(--space-xs); }

/* CROWNING A FINISHED SALES CHALLENGE — the screen the Sales Manager decides on.

   THE TIMESTAMP IS NOT A FOOTNOTE. Keith asked for it by name, and the manager
   is being asked to commit on the strength of it, so it reads at full weight
   beside the totals it describes rather than shrinking into the muted grey the
   rest of the page's asides use. */
.challenge-asof {
  margin: 0 0 0.6rem; font-size: var(--fs-caption); color: var(--ink);
  border-left: 3px solid var(--line); padding-left: 0.6rem;
}
.challenge-asof .muted { display: block; font-size: var(--fs-caption); }

/* BOTH TEAMS SIDE BY SIDE, because the decision is a comparison. They wrap onto
   one column on a phone rather than shrinking into two unreadable ones. */
.challenge-teams { display: flex; flex-wrap: wrap; gap: 1rem; }
.challenge-team {
  flex: 1 1 18rem; min-width: 0;
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 0.8rem 0.9rem;
}
/* NEITHER CARD IS STYLED AS THE WINNER, deliberately: "Sale Manager will
   decide", and a card the screen has already picked out would be SGE answering
   the question it is supposed to be asking. */

.challenge-crown-form label { display: block; margin: 0.55rem 0; }
.challenge-crown-form fieldset { margin: 0.8rem 0; }

/* Who crowned it and when, kept on the screen for good. */
.challenge-decision { margin: 0.4rem 0 0; font-size: var(--fs-caption); }

/* =====================================================================
   THE MENU AT THE THREE SIZES IT IS OPENED ON, and one card per record
   on a phone. Both are docs/menu-prototype.html brought into the app —
   the drawing Keith was shown, not a second design.

   THE THREE BANDS, as the prototype names them:
     up to 767px  — COMPACT. One "Menu" button in the header that never
                    scrolls away; pressing it covers the screen with every
                    section, every name under it, the Guide, and the
                    account with Log out at the foot.
     768–1023px   — MEDIUM (an iPad upright). The same five sections, same
                    order, same names, standing down the LEFT. Never
                    hidden, never behind a control.
     1024px and up — EXPANDED. The rail stands on the page. Keith moved this
                    line down from 1280 on 30 August 2026 so that an iPad in
                    landscape, which is exactly 1024px, gets the panel rather
                    than the hamburger.

   NOTHING OPENS ON HOVER, because there is no hover on an iPad, and every
   disclosure here is a native <details>: it opens on click, on Enter and on
   Space with no script and no inline handler (the CSP forbids those).
   public/account-menu.js adds only Escape and click-outside.

   THE FLOOR IS 44 x 44 on every control at these two widths — the same floor
   .pill and the phone logo link already hold themselves to.
   ===================================================================== */

/* Drawn only inside its own band. */
.nav-sheet { display: none; }
.nav-rail { display: none; }
/* The rail's head carries the brand, and the brand is the control that widens the
   panel. Both only mean anything where the panel STANDS ON THE PAGE — the desk
   band. In the drawer bands the panel is already at its full width, the way out
   of it is the Close at its foot, and the mark stays on the app bar, so the head
   is not drawn there. */
.nav-rail-head { display: none; }
/* The app bar's Menu button belongs to the 768-and-up band, where the drawer it
   opens exists. On a phone the sheet carries its own Menu button already. */
.nav-open-toggle { display: none; }
.nav-scrim { display: none; }
.nav-ico { width: 20px; height: 20px; flex-shrink: 0; display: block; }

/* ---------- THE LEFT RAIL HOLDS NO SPACE — IT OPENS ON DEMAND ----------------
   KEITH, 29 August 2026: "So that fixed area on the left should be gone. it's
   open opens up on demand".

   Until this pass the rail owned a permanent grid column at every width above
   the phone — 232px standing, 60px when it was collapsed to icons — so even a
   user who never touched it paid for it on every screen. It pays for nothing
   now: the body is ONE column, the page runs the full width of the window, and
   the rail is a drawer that floats over the page when it is asked for.

   ASKED FOR IN ONE PLACE, ON EVERY PAGE: the Menu button at the start of the
   app bar (src/app.js, navOpenToggleHtml). Nobody can be stranded on a page with
   no way to navigate — the way back is the first control on the bar, in the same
   position the phone's Menu button already occupies one breakpoint down.

   The earlier rule this replaces is Keith's own, from 27 August: "make sure it
   can be collapse for more space". Collapsing to a 60px strip was as far as that
   sentence went; "the fixed area should be gone" goes further and supersedes it. */
@media (min-width: 768px) {
  /* Header across the top, page under it — full width, nothing reserved. */
  body:has(.appbar) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "head" "main";
    min-height: 100vh;
    /* The base `body` rule centres its children (the sign-in page's body IS the
       centring flexbox). Here the body is a grid and `align-items` carries over:
       stretch is what this layout assumes — the page fills its column and its
       background runs full height. */
    align-items: stretch;
  }
  .appbar { grid-area: head; }
  /* THE NAME IS THE LAST THING TO GIVE WAY, NOT THE FIRST — 12 September 2026.
     Measured by `node scripts/w2147-width-walk.mjs`: in a 890px window every
     page's name was cut to a 148px box — /growth read "Account …", /manager
     "Sales ma…" — while ten titles wanted between 150px and 448px. Keith's rule
     is that a reader knows where they are in ten to thirty seconds, and the one
     thing on the screen that says which page this is was the one thing the bar
     was written to sacrifice.

     WHY IT WAS CUT. `.page-id` is `flex: 0 1 auto` with `min-width: 0` and
     everything else on the bar is `flex: 0 0 auto` — the mark, the Menu
     control and the whole 455.5px right-hand block (measured by `node
     scripts/w2147-navright-parts.mjs`: Log Activity 113.1, Showcase 116.9,
     Quick access 117.6, the account button 71.9). So when the bar is full the
     name gives up exactly as much as everything else needs, down to nothing,
     and the box being the same 148px on every page is not a width anybody set:
     it is what was left over, and what is left over is the same on every page
     because the rest of the bar is.

     THE BAR TAKES A SECOND ROW INSTEAD, AND ONLY WHEN IT MUST. `min-width` on
     the name's box means it can no longer be squeezed below the width its own
     words need, so a bar that cannot hold everything on one line wraps — the
     right-hand block drops beneath and keeps its right edge. Where there is
     room, and that is every desk width measured (1280 and 1512, rail slim or
     wide), nothing moves at all and the bar is the 56px it has always been.

     NOTHING IS REMOVED AND NOTHING IS SHRUNK. DESIGN.md: "When the type stops
     fitting, space is bought by removing content, not by shrinking type" — and
     what could be removed here is Log Activity, Showcase and Quick access,
     which are Keith's and not a worker's to take off his bar. The other answer
     that was in the code — public/page-title-fit.js, shrinking the type by a
     different amount on every page until it fitted — is the one DESIGN.md
     names outright: "never a smaller font". It is gone.

     AND `min()` IS THE FLOOR'S OWN FLOOR. A name longer than the whole bar
     would push the page sideways, which is catalogue 16.1 tier 1; capped at
     100% of the bar it takes the line and ends in the ellipsis it has today. */
  .appbar-inner {
    max-width: none; min-height: 56px; padding: 0.5rem 1rem;
    flex-wrap: wrap; row-gap: var(--sp-xs);
  }
  .page-id { min-width: min(100%, max-content); }
  /* THE PILL BAR IS GONE. The rail carries the navigation at every width now. */
  .navbar { display: none; }
  .nav-right { margin-left: auto; }
  body:has(.appbar) > main { grid-area: main; min-width: 0; }
  /* THE PAGE ITSELF MUST NOT SCROLL SIDEWAYS — catalogue 16.1 tier 1. `.frame`
     carries auto inline margins, and an auto margin on a grid item switches off
     the stretch that holds it to its track; `width: 100%` resolves against the
     grid AREA, pinning it to its column while the max-width still caps it. */
  body:has(.appbar) > main.frame {
    /* The horizontal padding matches .appbar-inner's 1rem EXACTLY, so the page
       name in the bar and the content column under it share a left edge —
       Keith, 3 September 2026, on the project record page: "Alignment issue".
       At 1.2rem the content sat 3px right of the title on every shell page.
       THE PADDING IS UNCHANGED BY THE 17 SEPTEMBER SPACE PASS, deliberately:
       it is what holds that alignment, and taking it would move the content off
       the page name to buy 16px.
       THE TOP MARGIN CAME DOWN — Keith, 17 September 2026: "There are many blank
       space on the top and the sides." 1.2rem was 19.2px and was on no rung of
       DESIGN.md's ladder at all; `--sp-sm` is 12px and is.
       AND THE BOTTOM CAME DOWN TO MEET IT — 18 September 2026, Keith on the
       Dashboard: "There is a blank band across the bottom of the page." This is
       the rule that actually governs every shell page, so the base `.frame`
       rule alone would have changed nothing on screen; the two now say the same
       thing. The reasoning and the measurement are written once, at `.frame`. */
    margin: var(--sp-sm) auto var(--sp-sm); padding: 0 1rem;
    width: 100%;
  }

  /* THE MENU BUTTON — the one way back to the navigation, first on the bar.
     It takes the app bar's own quiet control look (.nav-help is its neighbour),
     and the 44px floor every control at these widths holds itself to. */
  .nav-open-toggle {
    /* The base `button` rule is `width: 100%` — right for a form, wrong for a
       control sitting in the app bar's flex row, where it would push the whole
       right-hand block off the end. It sizes to its own label. */
    display: inline-flex; align-items: center; gap: 0.5rem;
    width: auto; flex: 0 0 auto;
    min-height: 44px; padding: 0 0.7rem;
    border: 1px solid var(--line); border-radius: var(--r-sm);
    background: var(--panel); cursor: pointer;
    font-family: var(--font); font-size: var(--t-ui-min); font-weight: 500;
    letter-spacing: var(--ls-caption); color: var(--t1);
  }
  .nav-open-toggle:hover { background: var(--panel-2); }
  .nav-open-ico { width: 20px; height: 20px; flex-shrink: 0; display: block; }

  /* THE DRAWER. Out of the layout entirely — `position: fixed` means it takes no
     column and no space, which is the whole of Keith's instruction. It sits under
     the app bar so the Menu button that opened it stays visible and can shut it
     again, and it scrolls itself if the sections outrun the window. */
  .nav-rail {
    position: fixed; top: var(--appbar-h); left: 0; bottom: 0; z-index: 60;
    width: 232px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 2px;
    padding: 0.6rem 0.5rem;
    background: var(--panel); border-right: 1px solid var(--line);
    /* SHUT IS THE DEFAULT. `visibility` — not `display` — so the drawer can
       animate, and so nothing inside it can be reached by Tab while it is away. */
    transform: translateX(-100%); visibility: hidden;
    transition: transform 160ms ease, visibility 160ms;
  }
  html.nav-open .nav-rail { transform: none; visibility: visible; }

  /* The page behind the drawer is dimmed, and a click on it puts the drawer away. */
  .nav-scrim {
    display: block;
    position: fixed; inset: var(--appbar-h) 0 0 0; z-index: 55;
    background: var(--scrim);
    opacity: 0; visibility: hidden;
    transition: opacity 160ms ease, visibility 160ms;
  }
  html.nav-open .nav-scrim { opacity: 1; visibility: visible; }
  .nav-rail-group { position: static; }
  .nav-rail-btn {
    list-style: none;
    display: flex; align-items: center; gap: 0.6rem;
    width: 100%; min-height: 44px; padding: 0 0.6rem;
    border-radius: var(--r-sm); text-align: left; text-decoration: none;
    font-family: var(--font); font-size: var(--t-ui-min); font-weight: 400; letter-spacing: var(--ls-caption);
    color: var(--t1); cursor: pointer; user-select: none;
  }
  .nav-rail-btn::-webkit-details-marker { display: none; }
  .nav-rail-btn:hover { color: var(--t1); background: var(--panel-2); }
  .nav-rail-btn .account-caret { margin-left: auto; }
  /* WHERE YOU ARE takes the one accent here, so the rail names the current page. */
  .nav-rail-btn.active { background: var(--accent-fill); color: var(--on-accent); font-weight: 600; }
  .nav-rail-btn.active .account-caret { color: var(--on-accent); }
  .nav-rail-btn.active:hover { background: var(--accent-fill-hover); color: var(--on-accent); }
  .nav-rail-group[open] > .nav-rail-btn .account-caret { transform: rotate(180deg); }
  .nav-rail-panel { display: flex; flex-direction: column; gap: 2px; padding: 2px 0 0.3rem 0.4rem; }
  .nav-rail-item {
    display: flex; align-items: center;
    width: 100%; min-height: 44px; padding: 0 0.6rem 0 1.9rem;
    border-radius: var(--r-sm); text-decoration: none;
    font-family: var(--font); font-size: var(--t-ui-min); font-weight: 400; color: var(--t1);
  }
  .nav-rail-item:hover { background: var(--panel-2); color: var(--accent); }
  .nav-rail-item.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }

  /* The two controls on the bar are pressed with a thumb here too. */
  .nav-help { width: 44px; height: 44px; }
  .account-toggle { min-height: 44px; }

  /* THE WAY OUT, at the foot of the drawer. public/nav-collapse.js drives it,
     along with the Menu button, the scrim and Escape. */
  .nav-collapse-toggle {
    margin-top: auto;
    display: flex; align-items: center; gap: 0.6rem;
    width: 100%; min-height: 44px; padding: 0 0.6rem;
    border: 0; border-radius: var(--r-sm); background: transparent;
    font-family: var(--font); font-size: var(--t-ui-min); font-weight: 400;
    letter-spacing: var(--ls-caption); color: var(--t2); cursor: pointer;
  }
  .nav-collapse-toggle:hover { background: var(--panel-2); color: var(--t1); }
  .nav-collapse-ico { width: 20px; height: 20px; flex-shrink: 0; display: block; }

  /* WHO IS SIGNED IN, AT THE FOOT OF THE RAIL — the fulfilment office's own
     shape. It is a marker, not a menu: the actions (Admin, Settings, Log out)
     stay in the one account menu on the app bar. */
  .nav-rail-who {
    display: flex; align-items: center; gap: 0.55rem;
    padding: 0.5rem 0.6rem; min-height: 44px;
    border-top: 1px solid var(--line-soft);
  }
  .nav-rail-initial {
    flex: 0 0 auto;
    display: grid; place-items: center;
    width: 28px; height: 28px;
    border-radius: var(--r-sm);
    background: var(--panel-2); color: var(--t1);
    font-size: var(--fs-caption); font-weight: 700; line-height: 1;
  }
  .nav-rail-id { display: flex; flex-direction: column; min-width: 0; }
  .nav-rail-id .id-name {
    font-size: var(--t-ui-min); font-weight: 600; color: var(--t1);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .nav-rail-id .id-role {
    font-size: var(--fs-caption); letter-spacing: var(--ls-caption);
    color: var(--t3);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }

  /* OPEN: the drawer is over the page, so the Menu button that summoned it reads
     as pressed and its icon turns into the way back out. The page underneath is
     untouched — the drawer reserves nothing, so nothing reflows when it opens or
     shuts and the reader does not lose their place in a table. */
  html.nav-open .nav-open-toggle {
    background: var(--accent-fill); color: var(--on-accent); border-color: var(--accent-fill);
  }
}

/* ---------- iPAD ONLY (768–1279): the page and its tables stay inside the
   column at the narrower width, where a desk has room to spare. ---- */
@media (min-width: 768px) and (max-width: 1279px) {
  /* Pinned to its column at iPad width — 16.1 tier 1. */
  body:has(.appbar) > main.frame { width: 100%; }

  /* A TABLE TOO WIDE FOR AN iPAD SCROLLS ITSELF, and the page does not.
     Catalogue 16.1 tier 1 draws the line: a sideways scroll inside a table is
     a decision 16.4 permits, "the page scrolling sideways is a defect". The
     phone band has had this containment since survey #46; the iPad band never
     got it, so at 820px /contacts ran to 1125px and /leads to 1369px and the
     whole page — rail, header and all — went with them.
     Deliberately WITHOUT the `white-space: nowrap` the phone rule carries: at
     this width a heading that wraps is what keeps the table narrow enough not
     to need the scroll at all. The exclusions are the same tables the phone
     rule excludes, which draw their own frames. */
  table:not(.cal-week):not(.cal-month):not(.compared):not(.growth-revenue):not(.debrief-dl) {
    display: block;
    overflow-x: auto;
    max-width: 100%;
  }
  /* AND THE HEADING IS NOW MEASURED AGAINST THE TABLE, NOT THE WINDOW, so its
     offset is zero here. See "AN OFFSET THAT DESCRIBES THE WINDOW" above: the
     rule that scrolls the table sideways is the rule that has to say this, or
     `top: 56px` draws the column headings 56px INSIDE the list — and 160px
     inside it on a list whose top is frozen. Every table this band scrolls had
     that fault; /customers at 820px drew its heading below its own third row. */
  table:not(.cal-week):not(.cal-month):not(.compared):not(.growth-revenue):not(.debrief-dl) thead th {
    top: 0;
  }
  /* AND THE HEADINGS STILL DO NOT SCROLL AWAY. Keith, 27 August 2026, is why
     they stick at all; an offset of zero against a box that never scrolls
     vertically would put them at the top of the list and let them leave with the
     rows. So the list's scrollport is bounded to the height it actually has —
     the window, less the chrome frozen above it — and the rows scroll inside it
     with the heading held at its top.
     ONLY ON A LIST SCREEN, and `.list-page` is the app's own word for one
     (src/app.js: page(), variant 'list'). A `cardlist` also draws the day's
     tasks on the Dashboard and the scoreboard on Objectives, and bounding those
     would change a page nobody asked about.
     The second rule is the same measurement for a list whose whole top is
     frozen, which reserves --list-bar-h more (the .filter-bar block above). */
  .list-page table.cardlist { max-height: calc(100vh - var(--appbar-h)); }
  .list-page .filter-bar ~ .list-results table.cardlist {
    max-height: calc(100vh - var(--appbar-h) - var(--list-bar-h));
  }
  /* The charts are drawn at their natural width and shrink to the column
     rather than pushing the page sideways — the phone rule, at iPad width. */
  svg { max-width: 100%; height: auto; }

  /* THE FILTER PANEL OPENS INWARDS. It hangs from the left of its button and
     is 24rem wide; at 820px the button sits about 690px across, so the panel
     reached 1073px and took the page with it. Anchored to the button's right
     edge it opens back over the page instead of off it. Left alone at desk
     width, where there is room either way. */
  .filter-panel-card { left: auto; right: 0; }
}

/* ---------- THE DESKTOP NAVIGATION IS A RAIL, NOT A DRAWER (1024 and up) -----
   KEITH, 29 August 2026: "The collapse menu bar on the right is not like that.
   this is for Mobile view.. for Desktop it shuld work like how the Fulfilment
   app office".

   The fulfilment office (src/app/office/OfficeNav.tsx, and the screenshot at
   ~/Vault/fulfilment-office-nav-reference-2026-08-29.png) is a rail that is
   ALWAYS on the page from its `md` breakpoint up — `md:static`, never a drawer —
   showing icons at 48px, with one control at its head that widens it to
   icons-plus-names at 256px, the choice kept per device, and the signed-in
   person at its foot. That is the BEHAVIOUR copied here. The skin is not: every
   colour, radius, space and size below is SGE's own token, because the
   Enterprise Application Design governs this application.

   AND KEITH'S OTHER RULE STILL HOLDS — "So that fixed area on the left should be
   gone. it's open opens up on demand". What he was looking at was 232px of
   NAMES standing on every page whether anyone read them or not. The rail is 56px
   here: a column of drawings, which is the width of one control, and the names
   are what opens on demand. Nothing else on the page pays for the menu.

   BELOW 1024 NOTHING HERE APPLIES and the drawer above is what runs — that is
   the mobile pattern, and Keith's sentence says it is right there.

   WHY 1024 AND NOT 1280. Keith, 30 August 2026, on the same pass that moved the
   card layout off the window width: the hamburger IS the mobile pattern, and an
   iPad in landscape is 1024px wide, so at 1280 a landscape iPad fell on the
   hamburger side of a line drawn for phones. 1024 is the landscape-tablet
   boundary, so the panel now stands on the page from a landscape iPad upward.
   ONLY THIS ONE THRESHOLD MOVED. The preview panel is still a desk-only thing
   at 1280 (public/list-preview.css, public/list-preview.js) and the iPad band's
   table containment still runs to 1279 — neither was asked about, and the rail
   band below overrides what it needs from the drawer band above it.
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  :root { --rail-w: var(--rail-w-slim); }

  /* A PINNED BAR STARTS WHERE THE PAGE STARTS, NOT WHERE THE WINDOW DOES.
     `.lg-actionbar` and `.ic-actionbar` are both `position: fixed; left: 0`, so
     from 1024px up — where the rail stops being a drawer over the page and
     becomes a COLUMN OF IT — the bar's first 56px sat underneath the rail and
     whatever it carried on the left was cut in half by it. MEASURED with
     `node scripts/w-secc-box-probe.mjs "/visits/new" --view desktop --sel
     ".lg-actionbar-in"`: the bar left=0 while main.frame left=56, and the bar's
     own 24px of padding put the saving line at x=24 — behind the rail. On
     /visits/new?customer_id=7116 at 1366x1024 it read "g: In person · Follow-up
     · Phoebe …", the tail of "Logging:".

     ONE WORD SAYS IT, AND IT IS THE SHELL'S — `page-actionbar`, the same word
     the bottom-bar rule below already answers to, so the next screen to pin a
     bar gets this for nothing.

     AND IT IS SAID AS HEAVILY AS THE RULES IT ANSWERS, for the reason written
     out at that other rule: `.lg-actionbar` and `.ic-actionbar` are
     single-class rules in stylesheets that load after this one.

     Only `left` moves. The bar keeps its height, its blur, its stacking order
     and its contents, and the buttons stay in the bottom-right corner Keith
     asked for — `margin: 0 auto` inside it still centres against the page's own
     1760px ladder, which is now measured from the page's edge instead of the
     window's. Below 1024 the rail is a drawer laid OVER the page and `--rail-w`
     is 0, so nothing there changes. */
  body:has(.page-actionbar) .page-actionbar { left: var(--rail-w); }
  /* Set on <html> by public/nav-collapse.js from the user's remembered choice.
     `html.nav-rail-wide` out-weighs `:root` on the same element, so the one
     token below drives the shell grid, the rail and the preview panel's tracks
     at once and they cannot fall out of step. */
  html.nav-rail-wide { --rail-w: var(--rail-w-wide); }

  /* THE SHELL: rail down the left, everything else — the app bar and the page —
     in the column beside it, the way the fulfilment office shell is built. */
  body:has(.appbar) {
    grid-template-columns: var(--rail-w) minmax(0, 1fr);
    grid-template-areas: "rail head" "rail main";
  }

  /* THE RAIL IS ON THE PAGE. Everything the drawer band set to float it over the
     page is undone here: it is a grid item with a column of its own, it is
     never translated away, and it is never hidden. */
  .nav-rail {
    grid-area: rail;
    position: sticky; top: 0; left: auto; right: auto; bottom: auto;
    align-self: start; z-index: 30;
    width: auto; height: 100vh;
    /* Slim, the rail is 56px and a control inside it still holds the 44px tap
       floor, so its side padding is 4px and not the drawer's 8 — 4 + 44 + 4.
       WRITTEN AS TOKENS, because the section panel below has to step over this
       exact side padding to clear the rail's edge, and the two must not be able
       to drift apart. Same values as the 0.5rem / 0.25rem they replace. */
    padding: var(--sp-xs) var(--sp-xxs);
    overflow: visible;
    transform: none; visibility: visible;
    transition: none;
  }
  html.nav-rail-wide .nav-rail { padding: 0.5rem 0.5rem; overflow-y: auto; }
  /* The signed-in person is pushed to the very foot, which is where the
     fulfilment office keeps them. `.nav-collapse-toggle` used to carry this auto
     margin and it is not drawn at this width, so a display:none element cannot
     hold the foot down. */
  .nav-rail-who { margin-top: auto; }

  /* THE WAY OUT OF A DRAWER HAS NOTHING TO DO HERE. There is no drawer at this
     width: no Menu button on the app bar, no dimmed page behind it, no Close.
     A rail that is always present cannot strand anybody, which is the whole
     reason the Menu button existed. */
  .nav-open-toggle { display: none; }
  .nav-scrim { display: none; }
  .nav-collapse-toggle { display: none; }

  /* THE BRAND STANDS AT THE HEAD OF THE PANEL, with the collapse control beside
     it — KEITH, 29 August 2026: "When Expanded it should say 'KOMPACPLUS' when
     collapse it should show the logo", and, later the same evening, "Show the
     icons when it is collapsed". So collapsed is the mark over a column of
     drawings, and the way back to the names is the toggle under the mark.
     The mark is on the app bar at every width below this one, where there is no
     panel standing on the page to carry it; here it would be the same mark twice. */
  .appbar .logo-link { display: none; }
  .nav-rail-head { display: flex; align-items: center; margin-bottom: 0.4rem; }
  .nav-wide-toggle {
    display: inline-flex; align-items: center; gap: 0.6rem;
    width: 100%; min-height: 44px; padding: 0 0.6rem;
    border: 0; border-radius: var(--r-sm); background: transparent;
    font-family: var(--font); font-size: var(--t-ui-min); font-weight: 400;
    letter-spacing: var(--ls-caption); color: var(--t2);
    text-align: left; cursor: pointer;
  }
  .nav-wide-toggle:hover { background: var(--panel-2); color: var(--t1); }
  .nav-rail-brand { justify-content: center; padding: 0; }
  .nav-rail-logo { height: 30px; }
  /* THE CONTROL'S NAME IS READ, NOT SEEN. It says what pressing it will do
     (public/nav-collapse.js keeps it and the aria-label in step), and it is the
     button's title on hover — but drawn beside the mark it would be a word
     standing in a panel Keith asked to hold only the logo. */
  .nav-wide-word {
    position: absolute; width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }

  /* ---- COLLAPSED: THE LOGO, THEN THE ICONS -------------------------------
     KEITH, 29 August 2026, looking at a collapsed panel that held the mark and
     nothing else: "Show the icons when it is collapsed".

     So collapsed is an ICON RAIL and not an empty strip: the mark at the top,
     the five section drawings down it, the signed-in person's initial at the
     foot. What goes away is the WORDS, which is what the 232px was ever spent
     on — the rule this replaces put the drawings away with them.

     THE NAMES ARE READ, NOT SEEN. Every name stays in the markup and is taken
     off the screen with the clip-path `.nav-wide-word` already uses, so a
     drawing on its own still has an accessible name; `title` on the same
     control (src/app.js navRailHtml) is the tooltip a pointer gets. Hiding the
     span with `display: none` would have taken the name out of the accessible
     tree with the pixels, which is the one thing an icon rail must not do. */
  html:not(.nav-rail-wide) .nav-rail-btn > span:not(.account-caret),
  html:not(.nav-rail-wide) .nav-rail-who .nav-rail-id {
    position: absolute; width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
  /* THE CARET IS NOT A NAME AND HAS NOWHERE TO POINT in a 56px column — the
     panel it would turn for flies out to the side rather than dropping under
     the heading, so it is simply not drawn. */
  html:not(.nav-rail-wide) .nav-rail-btn > .account-caret { display: none; }
  /* A 44px square with the drawing in the middle of it: the same control the
     wide rail draws, with the label's width taken off. */
  html:not(.nav-rail-wide) .nav-rail-btn,
  html:not(.nav-rail-wide) .nav-rail-who {
    justify-content: center; gap: 0; padding: 0;
  }

  /* A SECTION STILL OPENS, AND IT OPENS BESIDE THE RAIL. Eight names cannot be
     read in a 56px column, so the group's panel leaves the column: it is laid
     over the page to the right of the drawing that opened it, in the panel's own
     material. It is still the native <details> — opened by click, Enter and
     Space, never by hover.

     ONE OF THEM AT A TIME, and that part is not CSS. A <details> knows nothing
     about its neighbours, so all four sections could stand open together, each
     panel laid at the top of its OWN 44px drawing and therefore 46px down and
     over the one before it. Keith saw the result on 30 August 2026: four panels
     in a stack reading as a single list that mixed sections. What closes the
     others is public/nav-collapse.js, and only here — in the wide rail and in
     the drawer the panels drop into the column, cannot collide, and are left as
     they were.

     AND IT CLEARS THE RAIL. `left: 100%` is the GROUP's right edge, and the
     group stands inside the rail's own side padding, so 100% put the panel one
     pixel INSIDE the rail (left 55, rail right 56, measured). That padding is
     added back with the token the rail is padded from, and then a gap, so the
     panel stands off the rail rather than on it. */
  html:not(.nav-rail-wide) .nav-rail-group { position: relative; }
  html:not(.nav-rail-wide) .nav-rail-group[open] > .nav-rail-panel {
    position: absolute; top: 0; z-index: 40;
    left: calc(100% + var(--sp-xxs) + var(--sp-xs));
    min-width: 200px; padding: 0.3rem;
    background: var(--panel);
    border: 1px solid var(--line); border-radius: var(--r-sm);
    box-shadow: 0 6px 20px rgba(15, 18, 22, 0.14);
  }
  /* Inside the flyout the items are not indented under a heading — there is no
     heading above them to indent from. */
  html:not(.nav-rail-wide) .nav-rail-group[open] > .nav-rail-panel .nav-rail-item {
    padding: 0 0.6rem; white-space: nowrap;
  }
}

/* ---------- ON A TABLET THE EXPANDED RAIL IS LAID OVER THE PAGE ------------
   w1886, 8 September 2026, on the fault w1810 measured and left alone: at
   1024x768 with the rail expanded, FIVE lists ran off the side of their own box
   — accounts (box 743, table 856), contacts (743/881), activities (743/766),
   approvals (743/831) and review (743/1031). With the rail slim at the same
   1024 the box is 919 and every one of them fits.
   (command: `node scripts/w1886-list-fit-probe.mjs before`, fit-before.json)

   SO THE 232px IS THE FAULT, NOT THE TABLES. On a landscape iPad the expanded
   rail takes 23% of the screen away from the page and hands it to a column of
   names — and it takes it from every list at once, which is why five screens
   broke together and none of them broke with the rail slim.

   AND KEITH'S OWN RULE SAYS SO: "So that fixed area on the left should be gone.
   it's open opens up on demand" (29 August 2026). The rail keeps its column at
   the desk, where 232px of 1440 is affordable and where he works with it open.
   Here it OPENS OVER THE PAGE instead: the grid column stays slim, so the list
   below is exactly as wide as it is with the rail shut, and the names are drawn
   on top of it while they are being read. Nothing is hidden that a tap on the
   same toggle does not bring back, and nothing about the rail's own appearance,
   its remembered state or its contents changes.

   THE BAND IS 1024-1279, WHICH IS THE ONE THIS FILE ALREADY CALLS THE TABLET:
   below it the rail is a drawer laid over the page already (the block above),
   and at 1280 the desk begins — the preview panel appears (public/list-preview.css)
   and the iPad band's table containment stops. No new breakpoint is invented.

   ONE DECLARATION EACH, AND BOTH READ FROM THE SAME TOKENS. The grid is driven
   by `--rail-w` and nothing else (the desk block above says so), so holding that
   token slim is the whole of "the page keeps its width"; the rail is then given
   the wide width on itself. It is a grid item with the panel's own background
   and z-index 30, so it paints over the page and reads as a panel standing on
   it. It cannot widen the page: 56 + 232 is 288px of a 1024px window. */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  html.nav-rail-wide { --rail-w: var(--rail-w-slim); }
  html.nav-rail-wide .nav-rail { width: var(--rail-w-wide); }

  /* THE DIMMED PAGE BEHIND IT. 21 October 2026, Keith's screenshot at about
     1030px: the expanded rail stood over the account Profile with the page
     bright underneath, so the card headings and every field label from x=56 to
     x=232 were simply covered. The rule above lays the rail over the page but the
     desk block's `.nav-scrim { display: none }` had left it with no scrim — an
     overlay that looked like a column. Laid over the page it is a drawer, and a
     drawer dims what it covers and puts itself away on a click on that. It sits
     under the rail (30) and over the page; public/nav-collapse.js answers the
     click, and does not restore this state on load. */
  html.nav-rail-wide .nav-scrim {
    display: block;
    position: fixed; inset: 0; z-index: 29;
    background: var(--scrim);
  }
}

/* ---------- COMPACT (up to 767): one button, and the whole menu over it ---- */
@media (max-width: 767px) {
  .navbar { display: none; }
  .nav-right { display: none; }

  /* THE QUICK DOCK COMES OFF THE BAR AND FLOATS AT THE BOTTOM RIGHT, inside the
     reach of a thumb (Keith, 27 August 2026 — "one tap that goes there, you go
     in"). The bar copy goes with .nav-right; this is the phone copy, and it is a
     sibling of the header rather than a child of it, because .appbar carries a
     backdrop-filter and that makes a fixed child resolve against the bar.

     It floats over the page, so it takes the one kind of depth this house allows
     something that floats — backdrop blur, with its fallback and both prefixes,
     exactly as the app bar and the Log Activity save bar do. */
  /* AND IT IS INSET THE SAME ON BOTH SIDES. MEASURED on /customers at 390x844
     on 22 September 2026: the dock drew x 4.3..373 — 17px of margin on the
     right, 4.3px on the left, 12.7px out of true, and 368.7px of a 390px
     screen. Anchored on the right with no left anchor and no width, the row
     simply grew leftward until it ran out of screen, so the one thing on the
     page that is meant to read as FLOATING read as a second bar.
     The left anchor is the same token as the right, and `row-reverse` keeps the
     contents packed at the right-hand end of it, so the dock stops short of
     both edges; the gap steps down to --sp-xxs at this width to buy back the
     few pixels the second inset costs, rather than squeezing a label. */
  .qdock-fab {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-end;
    gap: var(--sp-xxs);
    position: fixed;
    left: var(--sp-md);
    right: var(--sp-md);
    bottom: calc(var(--sp-md) + env(safe-area-inset-bottom, 0px));
    z-index: 30;
  }
  .qdock-fab .qdock-go {
    padding: 0 var(--sp-lg);
    border-radius: var(--r-md);
  }
  .qdock-fab .qdock-toggle {
    background: color-mix(in srgb, var(--panel) 80%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
  }
  /* The panel opens UPWARDS from a control at the foot of the window.

     AND IT OPENS INSIDE THE WINDOW, INSET THE SAME ON BOTH SIDES. MEASURED on
     22 September 2026 and again on 24-09-2026, on thirteen of the fourteen
     pages at 390x844: the panel drew x -96.9..129.9 in a 390px window — 96.9px
     of it, and every destination in it, off the LEFT edge and unreachable.

     The cause is an anchor that is right everywhere else. `.qdock-panel` hangs
     `right: 0` from `.qdock-more`, which puts a dropdown under the right-hand
     end of its own toggle — correct in the app bar, where the toggle sits at
     the right of the window. In the floating copy the row is `row-reverse`, so
     that toggle is the LEFTMOST thing on the screen, and a 226.8px panel hung
     leftward from a control 130px in has nowhere to go.

     So at this width the panel stops hanging off the toggle and takes the
     DOCK'S OWN WIDTH: `.qdock-more` gives up its positioning, which makes the
     fixed dock the panel's containing block, and `left: 0; right: 0` spans it.
     The dock is already inset `--sp-md` on both sides (finding 9 of the same
     survey), so the panel inherits both insets exactly and reads as one thing
     with the control that opened it. `bottom: calc(100% + 8px)` now measures
     from the dock row instead of the toggle — the same 44px box, so the panel
     opens in the same place it always did.

     IT CANNOT REACH A DESK TWICE OVER: this block stops at 767px, and
     `.qdock-fab` is `display: none` above it (the bar copy is a different
     element). Fingerprinted at 1280x800 and 1440x810 with the panel open,
     before and after — 28 views, 28 identical. */
  .qdock-fab .qdock-more { position: static; }
  .qdock-fab .qdock-panel {
    top: auto; bottom: calc(100% + 8px);
    left: 0; right: 0;
  }
  /* The page ends above the dock rather than under it — the same courtesy the
     Log Activity screen already pays its own pinned bar. */
  body:has(.qdock-fab) > main.frame { padding-bottom: calc(var(--tap) + var(--sp-xl)); }
  /* AND TWO BARS NEVER SHARE THE SAME CORNER. A screen that pins its OWN bar to
     the foot of the window — New project's "Create project", and every screen
     built to the same pattern — had the dock painted straight on top of it:
     measured on /projects/new at 390x844 on 5 September 2026, the dock covered
     the Create project button by 35px, so the one button the screen exists for
     could not be pressed on a phone. The clearance rule above cannot reach this,
     because the trapped control is not in the page at all — it is in the bar.

     So the dock steps up and stands ON the bar's shoulder. 61px is the measured
     height of these bars at this width (they are `--tap` plus their own padding
     row, and every one of them is drawn by the same rule); the gap and the safe
     area are the dock's own, unchanged. The page's clearance already covers the
     dock's new position twice over — the frame reserves 76px here and each of
     these screens reserves its own bar's height again on top of that.

     ONE WORD SAYS IT, AND IT IS THE SHELL'S. A screen that pins its own bar to
     the foot of the window puts `page-actionbar` on that bar — New project and
     Log Activity do today — and this rule answers to the word, not to a list of
     five page-specific class names that live in five other stylesheets. The
     next screen to pin a bar copies the word and gets this for nothing. */
  body:has(.page-actionbar) .qdock-fab {
    bottom: calc(61px + var(--sp-md) + var(--sp-xs) + env(safe-area-inset-bottom, 0px));
  }
  @supports not (backdrop-filter: blur(1px)) {
    .qdock-fab .qdock-toggle { background: var(--panel); }
  }
  .nav-sheet { display: block; position: relative; flex: 0 0 auto; }
  .appbar-inner { flex-wrap: nowrap; gap: 0.5rem; padding: 0.45rem 0.75rem; }
  /* The mark is a link home and is pressed with a thumb (22 August 2026). */
  .logo-link {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 44px; min-height: 44px;
  }

  /* WHERE YOU ARE. It used to be "You are on Accounts", set beside the Menu
     button because the page's name was not at the top. The name IS at the top
     now, at every width, so this is that same sentence said once and said
     properly — the page's own heading, in the bar, sized for a phone.

     THE PAIR MOVES AS ONE THING. The push to the right-hand end of the bar was
     `.page-name`'s own margin; the name and its entity are one box now
     (`.page-id`), so the margin belongs to the box. Left on the name it would
     have pushed the name away from the very code it is meant to sit beside. */
  .page-id { margin-left: auto; }
  .page-name { text-align: right; }
  .page-name h1 { font-size: var(--fs-tagline); line-height: 1.3; }

  /* …AND ON A PHONE THE NAME TAKES A SECOND LINE RATHER THAN BEING CUT SHORT.
     Keith, 5 September 2026: /projects/unattached read "Projects with no ac…"
     and /report/pipeline "Project Pipeline & Colle…" at 390x844.

     WHY NOT w1704's TREATMENT. At the iPad size the same two names were SHRUNK
     to fit (public/page-title-fit.js), with a 17px floor chosen so a name never
     goes below a size the app already sets. That cannot be copied here, and the
     arithmetic says so before anything is tried: measured by
     `node scripts/w1712-phone-header-dom.mjs`, the first name lays out at
     281.9px in a 169px box, so one line needs about 10px of type — smaller than
     anything in SGE, and unreadable. And the box is not the thing at fault:
     `.page-id` already runs from the Menu control's right edge to the bar's own
     right padding, so there is no width going spare to give it.

     A SECOND LINE COSTS ALMOST NOTHING, which is the whole reason it is the
     answer here. The bar's height is set by the 44px controls in it, not by the
     name, so two lines of 17px — 44.2px — very nearly fits inside the height
     the bar already claims. Measured by `node scripts/w1712-phone-title-try.mjs`
     with the candidate served rather than committed: the bar goes 59.4px →
     59.6px and the top of the page under it 67.4 → 67.6, and on /contacts,
     /customers, /activities and /approvals — every name that already fits —
     the bar, the top of the page, the mark, the Menu control and the number of
     lines are all unchanged.

     CLAMPED AT TWO. A name longer than two lines ends in an ellipsis as it does
     now, so the bar can never be pushed open by a long title. `overflow:
     hidden` and the ellipsis come from the base rule at the top of this file
     and are not restated. */
  .page-name h1 {
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  /* THE ONE BUTTON. */
  .nav-sheet-toggle {
    list-style: none;
    display: inline-flex; align-items: center; gap: 0.45rem;
    min-height: 44px; padding: 0 0.85rem;
    border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--panel);
    font-family: var(--font); font-size: var(--t-ui-min); font-weight: 600;
    letter-spacing: var(--ls-caption); color: var(--t1);
    cursor: pointer; user-select: none; white-space: nowrap;
  }
  .nav-sheet-toggle:hover { background: var(--panel-2); }
  .nav-sheet-toggle::-webkit-details-marker { display: none; }
  .nav-sheet-face-open { display: none; }

  /* OPEN: the same element becomes the sheet and its head. */
  .nav-sheet[open] {
    position: fixed; inset: 0; z-index: 60;
    display: flex; flex-direction: column;
    background: var(--paper);
  }
  .nav-sheet[open] > .nav-sheet-toggle {
    display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
    min-height: 56px; padding: 0.55rem 0.75rem;
    border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
    background: var(--paper);
  }
  .nav-sheet[open] .nav-sheet-face-shut { display: none; }
  .nav-sheet[open] .nav-sheet-face-open {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.6rem; width: 100%;
  }
  .nav-sheet-title {
    font-size: var(--t-ui-min); font-weight: 600; letter-spacing: var(--ls-caption);
    color: var(--t3);
  }
  /* The way out is written down, not guessed at. */
  .nav-sheet-close {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; min-width: 44px; padding: 0 0.85rem;
    border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--panel);
    font-size: var(--t-ui-min); font-weight: 600; letter-spacing: var(--ls-caption);
    color: var(--t1);
  }
  .nav-sheet-close:hover { background: var(--panel-2); }
  .nav-sheet-body { flex: 1 1 auto; overflow-y: auto; padding: 0.5rem 0.7rem 1.6rem; }
  /* The page behind does not scroll while the menu is over it. */
  body:has(.nav-sheet[open]) { overflow: hidden; }
  /* THE MENU IS A SOLID PANEL, NOT A TRANSPARENT ONE. Keith, 27 August 2026: at
     phone width the menu opened with no opaque ground — the page showed through
     and the words overlapped. The sheet is position:fixed with inset:0, but
     .appbar carries a backdrop-filter, and a backdrop-filter establishes the
     containing block for a fixed descendant: `inset: 0` resolved to the ~50px bar
     instead of the viewport, so the menu's own --paper ground covered only the
     bar and its body painted straight over the page. Dropping the filter while
     the sheet is open frees the sheet to fill the viewport over its solid ground.
     The full-screen menu is the panel Keith chose; a solid full-bleed panel needs
     no separate dimmed backdrop because nothing of the page is left showing. */
  body:has(.nav-sheet[open]) .appbar {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .nav-sheet-sec { border-bottom: 1px solid var(--line-soft); padding: 0.15rem 0; }
  .nav-sheet-btn {
    list-style: none;
    display: flex; align-items: center; gap: 0.65rem;
    width: 100%; min-height: 52px; padding: 0 0.5rem;
    text-align: left; text-decoration: none;
    font-family: var(--font); font-size: var(--fs-body); font-weight: 600;
    line-height: 1.24; letter-spacing: var(--ls-body); color: var(--t1);
    cursor: pointer; user-select: none;
  }
  .nav-sheet-btn:hover { background: var(--panel-2); }
  .nav-sheet-btn::-webkit-details-marker { display: none; }
  .nav-sheet-btn .account-caret { margin-left: auto; }
  .nav-sheet-btn.active { color: var(--accent); }
  .nav-sheet-sec[open] > .nav-sheet-btn .account-caret { transform: rotate(180deg); }
  .nav-sheet-panel { display: flex; flex-direction: column; padding: 0 0 0.4rem 0.3rem; }
  .nav-sheet-item {
    display: flex; align-items: center;
    width: 100%; min-height: 48px; padding: 0 0.6rem 0 2.15rem;
    border: 0; border-radius: var(--r-sm); background: transparent;
    text-align: left; text-decoration: none;
    font-family: var(--font); font-size: var(--fs-caption); font-weight: 400;
    line-height: 1.29; letter-spacing: var(--ls-caption); color: var(--t1);
    cursor: pointer;
  }
  .nav-sheet-item:hover { background: var(--panel-2); color: var(--accent); }
  .nav-sheet-item.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
  /* Your own account, at the foot where the thumb is. */
  .nav-sheet-foot { padding: 0.7rem 0.2rem 0; display: flex; flex-direction: column; }
  .nav-sheet-who { display: flex; align-items: baseline; gap: 0.5rem; padding: 0.2rem 0.5rem 0.4rem; }
  .nav-sheet-who .id-role { display: inline; }
  .nav-sheet-foot form { margin: 0; }
  .nav-sheet-foot .nav-sheet-item { padding-left: 0.5rem; }
  .nav-sheet-logout { color: var(--muted); font-weight: 600; }

  /* THE CHIPS ARE ONE ROW ON A PHONE, and it scrolls. Catalogue 16.3 tier 1:
     "Active filters as removable chips, horizontally scrollable on compact —
     Section 2 already requires chips with clear-all; scrolling is the compact
     form." They were a wrapping block: on /events at 390px two applied filters
     plus the clear-all took three lines under the button, which is the shape
     Keith ruled out for this bar. Nothing is dropped and nothing is hidden
     behind a control — the row is dragged, and clear-all is at the end of it,
     which is where section 2 puts it. */
  .applied-filters { flex-wrap: nowrap; overflow-x: auto; }
  .applied-filters > * { flex: 0 0 auto; }

  /* Every control on the filter bar is a thumb target at this width. */
  .filter-panel-toggle { min-height: 44px; }
  .search button, .filter-panel-foot button, .list-filters button { min-height: 44px; }
  .search input[type="search"], .list-filter select, .filter-panel-body select { min-height: 44px; }
  .applied-chip { padding: 0.1rem 0.1rem 0.1rem 0.7rem; }
  .applied-x { width: 44px; height: 44px; font-size: var(--fs-body); }
  .applied-clear { display: inline-flex; align-items: center; min-height: 44px; }

  /* WHAT THE LIST OPENS WITH, on a phone: one column rather than two, and each
     row a thumb target like every other list row at this width. */
  .list-openers { grid-template-columns: 1fr; gap: var(--space-md) 0; }
  .opener-row > a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* =========================================================================
   SHOWCASE IN THE SHELL — DECISION 1, 11 SEPTEMBER 2026.

   KEITH, pointing at docs/2026-09-11-showcase-navigation-options.html: "Point 1.
   can be this mix. but cannot have duplicate menu."

   THE MIX IS TWO FRAMES OUT OF THAT FILE AND THEY NEVER OVERLAP.
     * FROM 768px UP — option A's desk frame: an outlined control in the app
       bar's right-hand block, carrying the layers drawing and the word
       "Showcase", standing beside Log Activity. Log Activity keeps the one
       accent fill in that block, because only one thing there can be loudest.
       Showcase is NOT also a sixth entry in the rail: the rail is on the screen
       at the same moment this control is, and that is the duplicate.
     * UP TO 767px — option B's phone frame: a permanent bar at the foot of the
       window holding Dashboard, Accounts, Activity, Showcase and Menu. The
       control above is not drawn here at all, because .nav-right is not.

   AND MENU MOVED RATHER THAN BEING COPIED. The hamburger that stood at the
   start of the app bar on a phone is this bar's fifth entry — the same
   <details>, the same full-screen sheet, the same Escape key, rendered in one
   place (src/app.js navBar). There is no second Menu button in the document to
   turn off with a rule.

   EVERY VALUE BELOW IS A TOKEN THIS FILE ALREADY DECLARES. The 44px floor, the
   8/11px corners, --panel/--line/--t1/--t3/--accent and the --sp- ladder. No
   colour, size or space is invented for either control.
   ========================================================================= */

/* ---- THE CONTROL ON THE APP BAR (768 and up, via .nav-right) ------------- */
/* The house's outlined secondary: transparent on a hairline, the 11px corner
   .overflow-toggle already uses for a secondary standing beside a primary, and
   --fs-body at 600 so the word sits level with "Log Activity" beside it. The
   accent is on the INK, not on a fill — the fill in that block is spoken for. */
.nav-showcase {
  display: inline-flex; align-items: center; gap: 0.45rem;
  min-height: var(--tap); padding: 0 0.7rem;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--panel);
  font-family: var(--font); font-size: var(--fs-body); font-weight: 600;
  line-height: 1.29; letter-spacing: var(--ls-body); color: var(--accent);
  text-decoration: none; white-space: nowrap; flex: 0 0 auto;
}
.nav-showcase:hover { background: var(--panel-2); color: var(--accent-deep); }
/* WHERE YOU ALREADY ARE. The accent edge and nothing else — this is a
   destination control and not a state box, so it takes the same quiet marking
   the rail's own current section takes rather than a second fill on the bar. */
.nav-showcase.active { border-color: var(--accent); background: var(--accent-soft); }

/* ---- AND THE SAME TWO CONTROLS, FOLDED INTO QUICK ACCESS ------------------
   A SHORT WINDOW IS NOT A NARROW ONE, and until now only the width was asked.
   MEASURED on /customers at 844x390 — a phone turned sideways — on 22 September
   2026: `.appbar-inner` is allowed a second row from 768px up so a long page
   name is never cut in half, which is right and is Keith's; but at 844px the
   five action buttons do not fit beside the name, so the second row appears and
   the bar takes 113px of a 390px-tall window. 29% of the screen gone before any
   work is visible, and four list rows left underneath it.

   Nothing consults the fact that the window is 390px TALL. This block does, and
   it does the one thing that buys the row back without cutting the page name or
   shrinking any type: the two secondary controls come off the bar and are
   reached through the Quick access menu standing right beside them — the same
   two anchors, rendered a second time inside that panel (src/quick-access.js,
   `panelExtraHtml`) and hidden everywhere but here. Log Activity keeps its place
   on the bar, because it is the one a rep presses in the field.

   IT CANNOT REACH A DESK. A desk monitor is never 460px tall, and the band is
   capped at 1279.98px as well, so both conditions have to be false for anything
   here to apply. Below 768px it applies to nothing either: `.nav-right` is not
   drawn at that width, and the FAB copy of the dock is handed no second copy. */
.qdock-panel-extra { display: none; }

@media (max-width: 1279.98px) and (max-height: 460px) {
  .nav-right > .qdock > .nav-showcase { display: none; }
  .qdock-panel-extra {
    display: flex; flex-direction: column; gap: var(--sp-xxs);
    margin: 0 0 var(--sp-xxs);
  }
  .qdock-panel-extra .nav-showcase { justify-content: flex-start; }
}

/* ---- THE PHONE'S BOTTOM BAR (up to 767) --------------------------------- */
/* Drawn only inside its own band, exactly as .nav-sheet and .nav-rail are. */
.nav-bottombar { display: none; }

@media (max-width: 767px) {
  /* THE BAR'S OWN HEIGHT, AS A TOKEN, DECLARED ONCE. Everything at the foot of
     the window reads it — the bar itself, the thumb dock standing on its
     shoulder, and the page making room above it — so the three can never
     disagree about how much room the bar takes. 44px of control plus its
     4px/8px padding row, which is the same sum every other bar in this file
     makes. The safe area is a token here too, because it is written into a
     `calc()` in three places and a fallback repeated three times is a fallback
     that drifts. */
  :root { --bottombar-h: 56px; --safe-bottom: env(safe-area-inset-bottom, 0px); }

  /* A SIBLING OF THE HEADER AND FIXED TO THE FOOT. It carries no backdrop
     blur: it is a solid --panel strip, which is what the frame draws, and a
     backdrop-filter here would make this bar the containing block for the
     full-screen menu inside it and resolve its `inset: 0` to the height of the
     bar — the exact fault the app bar had on 27 August 2026. */
  .nav-bottombar {
    display: flex; align-items: stretch;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--panel);
    border-top: 1px solid var(--line);
    padding: var(--sp-xxs) 0 calc(var(--sp-xs) + var(--safe-bottom));
  }
  /* Five equal columns, and every one of them clears the touch floor on its
     own. The drawing above the word is how a bar of five names fits 390px
     without any of them being shortened — and the word is always there, so no
     control in SGE is ever a drawing on its own.

     THE TYPE IS THE SHELL'S OWN FLOOR AND NOT THE DRAWING'S 11px. The mock-up
     set these labels at 11px; SGE's shell floor is --t-ui-min, held by
     test/shell-type-floor.test.js, and it is there because this application is
     read in bright sun at arm's length. Five names at that size fit 390px
     across — 78px a column — so the floor costs nothing here and no label has
     to be shortened, which is the thing SGE never does to buy space. */
  .nav-bb, .nav-bottombar .nav-sheet-toggle {
    flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: var(--sp-xxs); min-height: var(--tap); padding: 0 var(--sp-xxs);
    border: 0; border-radius: var(--r-sm); background: transparent;
    font-family: var(--font); font-size: var(--t-ui-min); font-weight: 400;
    line-height: 1.2; letter-spacing: var(--ls-caption); color: var(--t3);
    text-align: center; text-decoration: none; white-space: nowrap;
  }
  .nav-bb .nav-ico,
  .nav-bottombar .nav-sheet-face-shut .nav-ico { width: 22px; height: 22px; }
  .nav-bb span { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .nav-bb:hover, .nav-bottombar .nav-sheet-toggle:hover { background: var(--panel-2); }
  /* WHERE YOU ARE, said the way every other current item in SGE says it. */
  .nav-bb.active { color: var(--accent); font-weight: 600; }

  /* THE MENU CONTROL IS ONE OF THE FIVE AND IS DRAWN AS ONE. Its own shut face
     is an icon and a word side by side, from when it was a pill on the app bar;
     in this bar it stacks like its four neighbours. Nothing about the sheet it
     opens changes — the rules for .nav-sheet[open] above are untouched and
     still take it full screen over everything. */
  .nav-bottombar .nav-sheet { display: flex; flex: 1 1 0; min-width: 0; position: static; }
  .nav-bottombar .nav-sheet-face-shut {
    display: flex; flex-direction: column; align-items: center; gap: var(--sp-xxs);
  }
  /* OPENED, THE SHEET IS THE WHOLE WINDOW AGAIN and stops behaving as a column
     of this bar. `position: static` above is what makes it a column, and it is
     said at the same specificity as the [open] rule further up this file, so
     the fixed full-screen state is restated here rather than left to the order
     the two rules happen to sit in. */
  .nav-bottombar .nav-sheet[open] {
    display: flex; flex-direction: column;
    position: fixed; inset: 0; z-index: 60;
  }
  .nav-bottombar .nav-sheet[open] > .nav-sheet-toggle {
    flex: 0 0 auto; flex-direction: row; gap: 0.6rem;
    font-size: var(--t-ui-min); color: var(--t1);
  }
  .nav-bottombar .nav-sheet[open] .nav-sheet-face-shut { display: none; }

  /* ---- AND EVERYTHING ELSE AT THE FOOT MAKES ROOM FOR IT ----------------
     Two things already live in this corner and each is raised by exactly the
     bar's own height, read from the one token above. A screen's own pinned
     action bar keeps the 61px this file already measured on 5 September 2026.

     THE THUMB DOCK STANDS ON THE BAR'S SHOULDER, which is what option B's frame
     draws — two bars never share the same corner. */
  /* AND IT STOPS FLOATING OVER THE PAGE. Keith, 25 September 2026, item 3, on
     the guide at 390x844: "On phone portrait the floating Quick access row
     covers the page." Measured by `node scripts/w-b12-dock-probe.mjs`: the row
     drew 341x44 at y=736 with an 8px gap under it, and through that gap the page
     showed — on /guide as Director it was painted straight over the link "8. The
     weekly review", and on a module page over the previous/next pager, which is
     that page's only way forward.
     It was inset on both sides and raised clear of the bottom bar so that it
     would READ as floating (22 September 2026, finding 9). At this width that is
     the fault: a row of three opaque buttons floating in the middle of a list is
     not furniture, it is something dropped on the page. So the foot of a phone
     window is ONE block now — this row standing directly on the bottom bar, the
     same --panel ground and the same hairline the bar itself draws, with the
     page's own clearance (main.frame below: --bottombar-h + --tap + --sp-xl =
     132px) already more than the 53px this row adds to the 56px bar.
     THE CONTROLS DO NOT MOVE and none is removed: Log Activity keeps the right
     of the row, Ask Kate and Quick access keep their places beside it, and the
     panel still opens upward, inset by this row's own padding. */
  .qdock-fab {
    left: 0; right: 0;
    bottom: calc(var(--bottombar-h) + var(--safe-bottom));
    padding: var(--sp-xxs) var(--sp-md);
    background: var(--panel);
    border-top: 1px solid var(--line);
  }
  /* A screen with a pinned bar of its own keeps the three of them stacked, in
     the same order and with no gap between any two. */
  body:has(.page-actionbar) .qdock-fab {
    bottom: calc(var(--bottombar-h) + 61px + 1px + var(--safe-bottom));
  }
  /* AND SO DOES THE SCREEN'S OWN PINNED BAR, which was the half of this that was
     never written. MEASURED on /visits/new at 390x844 on 22 September 2026: both
     bars are pinned to `bottom: 0` and this one wins the stacking order — 40
     against the form bar's 20 — so Log it and Cancel were drawn and then painted
     over. A tap at Log it's centre landed on `summary.nav-sheet-toggle` and
     opened the Menu; a tap at Cancel's landed on `a.nav-bb` and went to
     Activity. The form could not be finished on a phone. Save costs on
     Investment costs is the same collision reached through the same word.

     IT IS SAID AS HEAVILY AS THE RULES IT ANSWERS. `.lg-actionbar` and
     `.ic-actionbar` are single-class rules in stylesheets that load AFTER this
     one, so a single-class rule here would lose the cascade to them however
     right it was.

     THE HEIGHT IS THE BAR'S OWN TOKEN plus the hairline the bar draws on top of
     itself, so the two stand on each other exactly — no overlap and no gap. The
     stacking order clears the bar at 40 and stays under the full-screen menu at
     60, which still covers everything when it is open. The page's clearance
     already reserves --bottombar-h + --tap + --sp-xl below, which is more than
     the bar's new top edge. */
  body:has(.nav-bottombar) .page-actionbar {
    z-index: 45;
    bottom: calc(var(--bottombar-h) + 1px + var(--safe-bottom));
  }
  /* AND THE PAGE ENDS ABOVE ALL OF IT rather than under it — the same courtesy
     the dock was already paid. */
  body:has(.nav-bottombar) > main.frame {
    padding-bottom: calc(var(--bottombar-h) + var(--tap) + var(--sp-xl));
  }
}

/* =====================================================================
   ONE CARD PER RECORD, below 768px AND ONLY WHERE THE POINTER IS A FINGER
   (src/lists.js: cardTableHtml).
   A list stops being a table and becomes one card per row: the thing that
   identifies the row on top, then every other field with its own column
   heading printed beside it. Nothing is dropped and nothing is reached by
   dragging sideways — the heading is the table's OWN <th>, so the label on
   a phone can never disagree with the label on a desktop.

   KEITH, 30 August 2026, dragging a desktop window narrow and watching the
   Accounts list turn into cards: "Then how will it behave once bring down the
   window to very small. Curenlty I see it be came a Mobile view...Is this how
   you propose when user is viewing on a desktop?" — and then, asked whether
   the pointer should decide it instead of the width: "Yes".

   SO THE WIDTH IS NO LONGER THE WHOLE TEST. A card is an interface built for
   a finger: 44px targets, one field to a line, no columns to compare across.
   A machine with a mouse never wants one, however narrow its window is
   dragged. `pointer: coarse` is the browser's own answer to "is the primary
   input a finger", so it is asked rather than inferred from a number of
   pixels — a phone and a tablet get the cards, a mouse or a trackpad keeps
   the TABLE at every width. The block directly below is what a narrow desk
   window gets instead: the same table, scrolling inside its own box.
   ===================================================================== */
@media (max-width: 767px) and (pointer: coarse) {
  table.cardlist { display: block; width: 100%; font-size: var(--fs-caption); }
  table.cardlist > thead { display: none; }
  table.cardlist > tbody { display: block; }
  table.cardlist > tbody > tr {
    display: block;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.8rem 0.9rem;
    margin: 0 0 0.7rem;
  }
  table.cardlist > tbody > tr:hover > td { background: transparent; }
  /* THE OPENED MARK ON A PHONE IS THE CARD, NOT THE CELLS, and it is now the
     TEXT that steps rather than the fill — the design document's house rule,
     "its text steps from t1 to t2". At this width the <tr> IS the card, so the
     colour is set on the row and inherited by everything inside it, which is
     the same fact drawn in the shape this width uses. It also keeps the card's
     own fill free to answer the pointer.

     The cells stay transparent so the card's padding and its content are one
     colour, which is the reason the mark was moved up to the row in the first
     place. */
  table.cardlist > tbody > tr[data-row-href].is-opened { color: var(--t2); }
  table.cardlist > tbody > tr[data-row-href].is-opened > td,
  table.cardlist > tbody > tr[data-row-href].is-opened > td a,
  table.cardlist > tbody > tr[data-row-href].is-opened:hover > td { color: var(--t2); background: transparent; }
  /* THE [data-label] IS PART OF THE SELECTOR ON PURPOSE, not decoration. Three
     of these tables carry their own two-class cell rules — `.growth-list th,
     .growth-list td` and `.events-table th, .events-table td` both declare
     `white-space: nowrap`, and `.projects-table th, .projects-table td` sets the
     padding and a bottom border. Those weigh two class names; a bare
     `table.cardlist > tbody > tr > td` weighs one and would lose to all three,
     leaving every card value on a single line — exactly the fault this is here
     to fix. The attribute is what makes the cell a field of a card, so naming it
     is both correct and heavy enough to win.

     AND THE VALUE SIDE IS ONE FLOW, NOT A ROW OF GRID ITEMS (22 August 2026).
     This cell was a two-column grid, and a grid gives EVERY element child a cell
     of its own — so a value made of more than one element ran on into the next
     grid cell, which is the LABEL column of the row below. Two faults on the
     phone, one cause:

       Position · At risk   the pills are `<pos> <span class="growth-sep">·</span>
                            <fall>` — three items, so the separator landed on the
                            label side on a line of its own, joining nothing and
                            reading as a typo;
       Activity status      a customer carrying "Cold" and "Won" is two items, so
                            "Won" wrapped back under the label and the label and
                            value columns stopped lining up for the rest of the card.

     So the heading is FLOATED into the cell's own left padding instead: the float
     sits entirely outside the content box (margin-left cancels the padding), so it
     never shortens a line, and every line of the value — text, pills, a separator
     between them, a second block under them — begins at the same 8.2rem and wraps
     inside the value column, exactly as the desktop table reads it. `flow-root`
     is what contains the float, so a heading wrapping to two lines still sets the
     height of its own row and can never lean into the row beneath. */
  table.cardlist > tbody > tr > td[data-label] {
    display: flow-root;
    width: auto; max-width: none; min-width: 0;
    margin: 0.4rem 0 0;
    padding: 0.4rem 0 0;
    border: 0; border-top: 1px solid var(--line-soft);
    text-align: left; white-space: normal; overflow-wrap: anywhere;
    font-family: var(--font); font-size: var(--t-cell);
  }
  /* THE HEADING STANDS ABOVE ITS VALUE, NOT BESIDE IT (23 August 2026).
     It used to float into a 8.2rem gutter at 0.66rem — 10.56px, which is the
     size catalogue 16.5 tier 1 forbids outright. At the 14px floor the gutter
     stops working: "Position · At risk (auto)" wants about 200px of a 330px
     card, so a side-by-side heading would have to buy its room back out of the
     value — and 16.5 says in the same table that space is bought by removing
     content, never by shrinking type. Stacked, both the heading and the value
     get the whole width of the card, nothing has to wrap to fit a gutter, and
     the reason the float was introduced in the first place still holds: this is
     one block flow, so a value made of several elements — two pills and the
     separator between them — cannot spill into the field below it. */
  table.cardlist > tbody > tr > td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font); font-size: var(--t-cell-min); font-weight: 600;
    letter-spacing: var(--ls-caption); color: var(--muted);
    margin-bottom: 0.15rem;
  }
  /* A figure stays a figure — on the left with its label, because a card has
     no column to right-align against. It used to be set in the mono face here
     too; that went with the table rule above (Keith, 5 September 2026), and the
     two have to agree or the same money reads two ways at two widths. */
  table.cardlist > tbody > tr > td.num[data-label] {
    text-align: left; white-space: normal;
  }

  /* THE CARD'S OWN NAME — the first cell, which is what identifies the row. */
  table.cardlist > tbody > tr > td[data-card-lead] {
    display: block;
    margin: 0; padding: 0;
    border-top: 0;
    font-size: var(--fs-body); font-weight: 600; line-height: 1.35;
  }
  table.cardlist > tbody > tr > td[data-card-lead]::before { content: none; }
  table.cardlist > tbody > tr > td[data-card-lead] > a { color: var(--ink); text-decoration: none; }
  table.cardlist > tbody > tr > td[data-card-lead] .muted { font-size: var(--t-cell-min); font-weight: 400; }
  /* EVERY LINK IN A CARD IS A THUMB TARGET. On a table these are 20px-tall words
     in a row; on a card each one sits on its own line and is the way into the
     record, the firm or the person, so each is at least 44 tall. The text still
     wraps — a flex item wraps at the width it is given. */
  table.cardlist > tbody > tr > td[data-label] a,
  table.cardlist > tbody > tr > td[data-card-lead] > a {
    display: inline-flex; align-items: center; min-height: 44px;
  }

  /* THE TICK IS A CONTROL, NOT A FIELD. The report drill carries a checkbox
     column headed "☐" beside its Follow-up column; on a card that heading would
     print as a labelled line holding nothing. The control is kept — it is how a
     follow-up is marked done — and it simply sits above the Follow-up line it
     belongs to, with no label of its own. */
  table.cardlist > tbody > tr > td.tick-col[data-label] {
    display: block; border-top: 0; margin: 0; padding: 0;
  }
  table.cardlist > tbody > tr > td.tick-col[data-label]::before { content: none; }

  /* The empty state spans the whole table, so it is a sentence, not a field. */
  table.cardlist > tbody > tr > td:not([data-label]) {
    display: block; border-top: 0; margin: 0; padding: 0;
  }
  table.cardlist > tbody > tr > td:not([data-label])::before { content: none; }
  /* A cell holding a control keeps that control a thumb target — the events
     triage buttons are the only ones a list draws today. */
  table.cardlist > tbody > tr > td button,
  table.cardlist > tbody > tr > td .btn,
  table.cardlist > tbody > tr > td .evt-act { min-height: 44px; }

  /* ===================================================================
     ONE LINE PER RECORD — Keith, 27 August 2026.

     "The list should let me see in ten seconds who is healthy and who is at
     risk", and on a phone the card carrying seven labelled lines meant two
     accounts filled the screen. With the four statuses read into one band
     (src/health.js) the card has one thing to say per record, so it says it on
     one line: the name, and the band, and nothing else.

     THE OTHER FIELDS ARE NOT DELETED — they are columns at iPad and desktop
     widths, and they are on the record's own page at every width, which is
     where Keith put the detail. This rule is the phone's reading of the same
     table, exactly as the card rule above is.
     =================================================================== */
  table.cardlist.list-oneline > tbody > tr {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    margin: 0 0 var(--space-xxs);
  }
  /* THE LEAD CELL CARRIES BOTH ATTRIBUTES — cardStampRows stamps every cell
     with its column's heading and marks the first one as the card's name — so
     the hide rule has to say "every labelled field EXCEPT the two that stay",
     or the row would be a band with no company against it.

     THE ONE SIGNAL IS NOT ALWAYS THE HEALTH BAND. `.health-cell` was the only
     class that survived here while /customers, /contacts and Account Health were
     the only one-line lists; a list whose one signal is something else — "Why it
     is here" on the queue of projects with no account (Keith, 30 August 2026) —
     marks its cell `.list-signal` and takes the same slot. Nothing about the
     health band changes: both classes are honoured, side by side. */
  table.cardlist.list-oneline > tbody > tr > td[data-label]:not([data-card-lead]):not(.health-cell):not(.list-signal) {
    display: none;
  }
  table.cardlist.list-oneline > tbody > tr > td[data-card-lead] {
    display: block; flex: 1 1 auto; min-width: 0;
    font-size: var(--t-cell); font-weight: 600;
  }
  /* The band is the one field that stays, and it keeps its own size rather than
     being squeezed by a long company name. */
  table.cardlist.list-oneline > tbody > tr > td.health-cell[data-label],
  table.cardlist.list-oneline > tbody > tr > td.list-signal[data-label] {
    display: block; flex: 0 0 auto;
    margin: 0; padding: 0; border-top: 0;
  }
  table.cardlist.list-oneline > tbody > tr > td.health-cell[data-label]::before,
  table.cardlist.list-oneline > tbody > tr > td.list-signal[data-label]::before { content: none; }
  /* The row IS the tap target here (public/row-click.js), so the name does not
     need to be 44 tall on its own — that rule would put a card at 60px and undo
     the whole point of the line. */
  table.cardlist.list-oneline > tbody > tr > td[data-card-lead] > a { display: inline; min-height: 0; }
  /* The empty state still spans the card and reads as a sentence. */
  table.cardlist.list-oneline > tbody > tr > td:not([data-label]) { flex: 1 1 100%; }
}

/* =====================================================================
   A NARROW DESK WINDOW: THE TABLE STAYS, AND IT SCROLLS INSIDE ITS BOX.
   The other half of Keith's rule above. With the card block off, a
   `.cardlist` at 600px would be a plain table again — and the block near the
   top of this file that contains a too-wide table's scroll EXCLUDES
   `.cardlist` by name, because until now a cardlist was never a table at
   this width. So it would have taken the whole page sideways with it, which
   is the fault survey #46 fixed and 16.1 tier 1 calls a defect.

   It gets exactly what every other table on a narrow screen gets: its own
   scrollport, the page held still, the column headings pinned to the top of
   the box it scrolls in. /customers already sits inside `.acct-scroll`,
   which is its own box — the rule below is written so a table already
   inside a scroller is not given a second one inside the first, the same
   care the iPad band takes.
   ===================================================================== */
@media (max-width: 767px) and (pointer: fine) {
  table.cardlist {
    display: block;
    overflow-x: auto;
    max-width: 100%;
    white-space: nowrap;
  }
  table.cardlist thead th { top: 0; }
  /* A cell holding a sentence still wraps — only the row is kept on one line. */
  table.cardlist td.wrap, table.cardlist td[colspan] { white-space: normal; }
  /* THE BOX ABOVE IS THE SCROLLER. `.acct-scroll` already scrolls both ways;
     a second scrollport inside it would trap the rows in a box within a box. */
  .acct-scroll > table.cardlist { display: table; overflow-x: visible; max-width: none; }

  /* AND THE BOX MUST BE THE WIDTH OF THE WINDOW, NOT THE WIDTH OF THE TABLE.
     Measured at 600px on 30 August 2026: the page ran to 975px. The Accounts
     shell is a column of nested FLEX boxes, and a flex column stretches its
     children to the widest thing on the line — so the table's 910px of columns
     travelled up the chain (.acct-scroll → .acct-main → .acct-body →
     .acct-shell → .scard → main.frame) and took the toolbar and the page with
     it. `.acct-scroll` scrolls, but it was never asked to be narrower than what
     was inside it.

     From 768px up this cannot happen: the shell body is a GRID whose column is
     `minmax(0, 1fr)`, and the 0 is the cap. Below 768 the body is a flex column
     with no such cap, which was harmless while a narrow list was a stack of
     cards with no columns at all. It is not harmless now, so the cap is stated
     here — one declaration, on the chain that carries the width. */
  body:has(.acct-shell) > main.frame,
  body:has(.acct-shell) > main.frame > .scard,
  .acct-shell, .acct-body, .acct-main, .acct-main > .list-results, .acct-scroll {
    min-width: 0; max-width: 100%;
  }
}

/* =====================================================================
   AND THE SAME CAP ON A PHONE, WHICH IS WHERE IT WAS ALWAYS NEEDED MOST.

   THE FAULT. The cap above — the one that stops a wide box dragging the whole
   page sideways — sits inside `(pointer: fine)`, so it reaches a NARROW DESK
   WINDOW and never reaches a phone, where the pointer is always coarse. The
   reason for the cap has nothing to do with the pointer: a flex column
   stretching to its widest child does it whatever is pointing at the screen.

   MEASURED AT 390x844 with `node scripts/w-secc-sweep.mjs --views
   phone-portrait`, before this block:
     /calendar?view=month   page 698px in a 390px window (+308)
     /planner               page 393px in a 390px window (+3)
     /planner?view=week     page 393px in a 390px window (+3)
   The month grid is `.cal-month`, which declares `min-width: 640px` and is
   deliberately excluded from every rule that makes a table scroll itself,
   because it draws its own frame and `.cal-body` is its scroller. With no cap
   on the chain above it, those 640px travelled up .cal-body → .acct-main →
   .acct-body → .acct-shell → .scard → main.frame and took the toolbar, the
   date and the app bar with them.

   KEITH'S OWN RULE IS THE RULE HERE — "Keep it within the windows. so it can
   be scroll within the box and nto going into another page". The wide grid
   still scrolls, in its own box; the page stays still.

   `.cal-body` and `.cal-scroll` join the chain, because on the calendar they
   are the links that carry the width. Nothing here changes a colour, a size,
   a word or what any screen shows.
   ===================================================================== */
@media (max-width: 767px) {
  body:has(.acct-shell) > main.frame,
  body:has(.acct-shell) > main.frame > .scard,
  .acct-shell, .acct-body, .acct-main, .acct-main > .list-results,
  .acct-scroll, .cal-body, .cal-body > .cal-scroll {
    min-width: 0; max-width: 100%;
  }
}

/* =====================================================================
   THE VISIT-APPROVAL SCREEN'S TWO TABLES (/plan/approvals).
   Enterprise Application Pattern Catalogue r2, section 16.

   WHAT WAS ON THE SCREEN, MEASURED IN CHROME ON 23 AUGUST 2026.
   The queue is ELEVEN columns drawn through the shared `.projects-table`,
   which is `table-layout: fixed` and declares no column widths. Inside the
   1087px frame at 1440px every column but the tick got the same 103px,
   whatever it held, and three things followed — all of them visible:

     * A money cell is `.num`, which is `white-space: nowrap`. Not collected
       is "MYR 118,646" plus how old it is, 140px of content in a 103px box;
       Quote waiting is "MYR 570,098 108× · 108d old", 205px in the same box.
       Overflow is visible by default, so both were painted straight across
       the column beside them. Two facts, one unreadable smear — and the
       headings "Realised Revenue / Not collected / Quote waiting" ran into
       each other for the same reason.
     * `.projects-table` cells carry `overflow-wrap: anywhere`, so anything
       that COULD wrap broke MID-WORD in 103px: "Salesperso / n".
     * The Decide column's note field is a full-width input in a 103px cell,
       so 84px of box showed "Send bc" of the word "Send back…" — which read
       on a phone as a broken button rather than a field.

   And below 1280px it was worse, not better. At 820px the navigation rail
   takes its share and the table is left a 504px frame: every word broke to
   one letter a line, and the PAGE itself scrolled sideways by 29px, which
   16.1 rates a defect outright. At 390px the table's scrollWidth was 1700
   inside a 329px box with no visible affordance — the row simply stopped at
   the edge, which is the failure 16.4 opens with.

   WHAT THIS BLOCK DOES, AND WHAT IT DELIBERATELY DOES NOT.
   `.projects-table` is shared with the manager screens, the growth screens,
   src/app.js and the salesperson's own planner, so NOT ONE of its rules is
   touched here. Everything below hangs off `.approvals-table`, which only
   these two tables carry. The priority order of the columns is declared in
   src/visit-plan/render.js, once, and read from there at every width.
   ===================================================================== */

/* THE FRAME BOTH TABLES SIT IN.
   `container-type: inline-size` is the point of it: 16.4 tier 2 says layout
   follows the CONTAINER, not the device — "a split pane at 1440px is a
   compact container" — and that is exactly this screen's problem. An iPad in
   portrait is 820px of viewport, which 16.1 puts in Medium, but after the
   navigation rail the table has 504px, which is compact by any honest
   measure. Keying the card form off the container is how the same screen
   answers 390px and 820px correctly without inventing a third breakpoint
   number, which 16.1 tier 1 forbids.
   `overflow-x: auto` is the floor under all of it: if content ever outgrows
   the frame it is dragged INSIDE the table, never by the page (16.1). */
.approvals-scroll { overflow-x: auto; container-type: inline-size; container-name: approvals; }

/* CONTENT-DRIVEN WIDTHS, the fix .growth-list already uses: each column takes
   the width its content needs instead of an equal share of the frame. */
.approvals-table { table-layout: auto; }
/* Word boundaries, not anywhere — this is what un-breaks "Salesperso / n".
   And eleven columns × two paddings is 211px of the frame spent on air, so the
   gutters come in: 16.5's "space is bought by removing content, not by
   shrinking type" — chrome comes off, the 14px floor does not move. */
.approvals-table th, .approvals-table td { overflow-wrap: break-word; padding: 0.5rem 0.35rem; }
/* 16.5 tier 1: table text never below 14px. `.projects-table th` is 0.78rem
   (12.5px) and `.btn-inline` is the same; both are raised to 14px here, for
   this screen only, because the shared rules are out of scope. */
.approvals-table th { font-size: var(--fs-caption); white-space: normal; }
/* AND THIS IS NOT A DUPLICATE OF THE LINE ABOVE — the same trap .growth-list
   fell into. `.projects-table .num` is two class names and outranks a bare
   `.approvals-table th`, so without naming `.num` here the money HEADINGS stay
   nowrap — and they are exactly the headings that are longer than the figures
   under them: "Realised Revenue" alone claimed 167px of an 1087px frame. The
   headings wrap; the CELLS stay nowrap, because a money figure that wraps is
   two numbers. */
.approvals-table th.num { white-space: normal; }
.approvals-table .btn-inline { font-size: var(--fs-caption); }
/* The rest of the 14px floor, hunted down cell by cell on the rendered page.
   Every one of these is a SHARED rule that sits below 14px everywhere in SGE
   — `th.num, td.num` and `.filter-help` are 0.85rem, `.muted` is 0.85rem, a
   `.status` pill is 0.74rem — and every one of them is raised HERE ONLY,
   under this screen's own class, because the shared rules are out of scope.
   The type scale is not being invented against: 0.875rem is 14px, which is
   16.5's floor, and nothing on this screen is now printed below it. */
.approvals-table th.num, .approvals-table td.num { font-size: var(--fs-caption); }
.approvals-table .filter-help { font-size: var(--fs-caption); }
.approvals-table .muted { font-size: var(--fs-caption); }
.approvals-table .status { font-size: var(--fs-caption); }
/* THE MONEY QUALIFIER TAKES A LINE OF ITS OWN. "MYR 570,098" and "108× ·
   108d old" are two facts, and asking them to share a nowrap line is what
   demanded 205px. Split, each line is a figure's width. No word changes. */
.approvals-table td.num .muted { display: block; }

/* The width each column needs to hold its own content, and no more. They add
   up to about 1020px, inside the 1087px the frame gives at 1440px. */
.approvals-table .apr-when { min-width: 5.4rem; }
.approvals-table .apr-who { min-width: 5.5rem; }
.approvals-table .apr-cust { min-width: 6rem; }
.approvals-table .apr-seen { min-width: 4.5rem; }
.approvals-table .apr-stand { min-width: 6rem; }
/* REALISED REVENUE IS THE ONE HEADING HERE THAT IS NOT ALLOWED TO BE SHORTENED,
   so it is given the width to sit on one line instead — 29 August 2026.
   Keith settled that word himself (it replaces both "Revenue" and "Billed",
   which are a different figure), and his other rule says a wrapping heading is
   shortened. The two meet on this one cell and the naming rule governs. The
   room comes from the three headings that WERE shortened in the same pass —
   Last seen, Not collected and Quote waiting are now Seen, Owed and Quotes out
   (src/visit-plan/vocabulary.js) — so the table is no wider than it was and
   still does not scroll sideways. 9.5rem is the measured width of "REALISED
   REVENUE" set in this screen's own caption size with its letter-spacing. */
.approvals-table .apr-billed { min-width: 9.5rem; }
.approvals-table .apr-owed { min-width: 5.5rem; }
.approvals-table .apr-quote { min-width: 5.5rem; }
.approvals-table .apr-reason { min-width: 5.5rem; }
.approvals-table .apr-state { min-width: 5.5rem; }
.approvals-table .apr-note { min-width: 8rem; }
.approvals-table .apr-decide { min-width: 8.5rem; }

/* THE REASON COLUMN IS ONE WIDTH, LIKE EVERY OTHER STATE COLUMN (Keith,
   29 August 2026 — "all other similar display with a box no matter where the
   list view is, it shoul dbe the same width So it looks neat").

   These boxes carry the visit reason, which is a PHRASE — "Stood high and has
   fallen", "Never specified a job" — so they cannot take the 112px standard the
   one-word states take. What they can do is all be the same as each other: the
   box fills its column, so the ten reasons on an approvals screen draw one
   straight edge instead of six ragged ones between 112px and 178px. The same
   The REVIEW page's kind box is deliberately NOT given this treatment. It sits
   in the same cell as the account name rather than in a column of its own, so
   filling the cell widened the Account column to 190px on an iPad and squeezed
   "Why it is stuck" — a column of real sentences — into 90px, which added 760px
   to the page. Its three values are reported to Keith as the one state box left
   at three different widths. */
.approvals-table td.apr-reason > .status { display: block; width: 100%; }

/* THE DECIDE COLUMN IS A STACK, NOT A ROW. Stacked, the column needs the
   width of ONE control rather than three side by side, and the note field
   gets the whole of it — which is all "Send back…" ever needed to be
   readable. The 0.5rem below each button is 16.6's 8px between targets. */
.approvals-table td.apr-decide button { display: block; width: 100%; margin: 0 0 0.5rem; }
.approvals-table td.apr-decide input[type="text"] { display: block; width: 100%; margin: 0; }

/* MEDIUM AND BELOW: THE PRIORITY TAIL GOES (16.4 tier 1 — dropped, not
   squeezed to unreadable). Last seen, Not collected and Quote waiting are
   the three lowest-priority columns of the eleven; 1280 is 16.1's own
   breakpoint token, not a number this screen invented. The selector is
   heavy on purpose: the card rules below weigh 0,2,3 and a lighter one
   would lose to them and put the dropped columns back on the card. */
@media (max-width: 1279.98px) {
  .approvals-table th.apr-drop,
  table.approvals-table > tbody > tr > td.apr-drop[data-label] { display: none; }
}

/* Off the card only: "How it came about" reads Planned on almost every
   decided row, so it is the one column that column can spare on a phone. */
@media (max-width: 767.98px) {
  .approvals-table th.apr-drop-card,
  table.approvals-table > tbody > tr > td.apr-drop-card[data-label] { display: none; }
}

/* =====================================================================
   ONE VISIT, ONE CARD — whenever the table's own frame drops under 700px.
   At 390px this fires alongside the shared `.cardlist` block above and says
   the same thing; at 820px, where that block does not reach, it is the only
   thing standing between a manager and a 504px eleven-column table.

   16.4 tier 1 asks for 3–5 fields on a card, and this is five: When,
   Salesperson, Standing, Reason and Realised Revenue, under the customer's
   name and above the tick and the two decisions. The identifier leads, the
   number and the date are both on it, and the row order is set with `order`
   rather than by moving a column, so the desktop table keeps the order it
   has always had.
   ===================================================================== */
@container approvals (max-width: 700px) {
  /* THE [data-label] IS LOAD-BEARING, not decoration. `td[data-label]` below
     weighs exactly as much as a bare `td.apr-drop` — four elements and two
     names each — and on a tie the later rule wins, so without this the three
     dropped columns came straight back as fields on the card, above the
     customer's name. Measured at 390px on 23 August 2026. */
  .approvals-table th.apr-drop-card,
  table.approvals-table > tbody > tr > td.apr-drop-card[data-label],
  table.approvals-table > tbody > tr > td.apr-drop[data-label] { display: none; }

  table.approvals-table { display: block; width: 100%; font-size: var(--fs-caption); }
  table.approvals-table > thead { display: none; }
  table.approvals-table > tbody { display: block; }
  table.approvals-table > tbody > tr {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.8rem 0.9rem;
    margin: 0 0 0.7rem;
  }
  table.approvals-table > tbody > tr:hover > td { background: transparent; }

  /* The heading stands above its value — the same construction as `.cardlist`,
     and changed with it on 23 August 2026 so the two card shapes stay ONE
     design (16.1 tier 1). w1088 could not raise this label off 0.66rem because
     the shared `.cardlist` block was out of its scope and a card that differed
     from every other card would have traded a 16.5 breach for a 16.1 one; that
     is the pass this is. */
  table.approvals-table > tbody > tr > td[data-label] {
    display: flow-root;
    width: auto; max-width: none; min-width: 0;
    margin: 0.4rem 0 0;
    padding: 0.4rem 0 0;
    border: 0; border-top: 1px solid var(--line-soft);
    text-align: left; white-space: normal; overflow-wrap: break-word;
    font-family: var(--font); font-size: var(--t-cell);
  }
  table.approvals-table > tbody > tr > td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font); font-size: var(--t-cell-min); font-weight: 600;
    letter-spacing: var(--ls-caption); color: var(--muted);
    margin-bottom: 0.15rem;
  }
  table.approvals-table > tbody > tr > td.num[data-label] {
    text-align: left; white-space: normal;
  }

  /* The card's own name: which firm is being visited. */
  table.approvals-table > tbody > tr > td[data-card-lead] {
    display: block;
    margin: 0; padding: 0; border-top: 0;
    font-size: var(--fs-body); font-weight: 600; line-height: 1.35;
  }
  table.approvals-table > tbody > tr > td[data-card-lead]::before { content: none; }
  table.approvals-table > tbody > tr > td[data-card-lead] .muted { font-size: var(--fs-caption); font-weight: 400; }

  /* Identifier, then the facts, then the tick and the decision. */
  table.approvals-table > tbody > tr > td.apr-cust { order: 1; }
  table.approvals-table > tbody > tr > td.apr-when { order: 2; }
  table.approvals-table > tbody > tr > td.apr-who { order: 3; }
  table.approvals-table > tbody > tr > td.apr-stand { order: 4; }
  table.approvals-table > tbody > tr > td.apr-state { order: 4; }
  table.approvals-table > tbody > tr > td.apr-reason { order: 5; }
  table.approvals-table > tbody > tr > td.apr-billed { order: 6; }
  table.approvals-table > tbody > tr > td.apr-note { order: 6; }
  table.approvals-table > tbody > tr > td.apr-tick { order: 7; }
  table.approvals-table > tbody > tr > td.apr-decide { order: 8; }

  /* 16.6: every target 44px, 8px apart. The two decisions stay two labelled
     buttons rather than collapsing behind a menu — 16.4 asks that row
     actions not be a row of icon buttons at compact, and stacked, named and
     full width they are not; putting Approve behind a disclosure would add a
     tap to the one thing this screen exists to do. */
  table.approvals-table > tbody > tr > td button { min-height: 44px; }
  table.approvals-table > tbody > tr > td.apr-decide input[type="text"] { min-height: 44px; }
  /* The Note disclosure is a target too, and a 21px word is not one. */
  table.approvals-table > tbody > tr > td .filter-help summary {
    display: flex; align-items: center; min-height: 44px;
  }
  /* Bulk selection still works here (16.4), so the tick is a real target:
     the label is the tap area, the box itself just has to be seen. */
  table.approvals-table > tbody > tr > td.apr-tick label.inline {
    display: inline-flex; align-items: center; min-height: 44px; min-width: 44px;
  }
  table.approvals-table > tbody > tr > td.apr-tick input[type="checkbox"] { width: 20px; height: 20px; }
}

/* THE COMPACT ROW KEEPS THE TAP FLOOR. The row itself is a target — the whole
   of it opens the record (tr[data-row-href]) — and Keith's rule of 8 September
   2026 on the 44px minimum is "understand.. then maintan it". So where the
   pointer is coarse the vertical padding goes back up: dense at a desk, where
   he asked for the density, and still hittable with a thumb. Density follows
   the INPUT, not the screen size — the same tier-2 rule the block below keeps. */
@media (pointer: coarse) {
  th, td { padding: var(--row-pad-y-touch) var(--row-pad-x); }
}

/* AN IPAD IN LANDSCAPE IS 1194px OF ROOM AND STILL A FINGER. 16.5 tier 2 —
   density follows the input, not the screen size — so where the pointer is
   coarse the table form gets touch sizing too. */
@media (pointer: coarse) {
  .approvals-table td.apr-decide button,
  .approvals-table td.apr-decide input[type="text"] { min-height: 44px; }
  /* 16px, not the data region's 13px, for the iOS reason --fs-input-touch names:
     under 16px iOS zooms the page the moment the manager taps the box. Keyed to
     the pointer, so a narrow desktop window keeps the ordinary field size. */
  table.approvals-table > tbody > tr > td.apr-decide input[type="text"] { font-size: var(--fs-input-touch); }
  .approvals-table td.apr-tick label.inline {
    display: inline-flex; align-items: center; min-height: 44px; min-width: 44px;
  }
  .approvals-table td .filter-help summary { display: flex; align-items: center; min-height: 44px; }
}

/* THE ONE TARGET ON THIS SCREEN THAT IS NOT IN A TABLE. Bulk approve is the
   control Keith asked for by name — "there should be an option for sales
   manager to do bulk approval" — and it sits under the queue, outside it, so
   the card rules never reached it: 38px tall on a phone, six short of 16.6. */
.apr-bulk { min-height: 44px; }

/* =========================================================================
   QUOTE REQUESTS (migration 084).

   Nine rules, and the reason each exists rather than an existing class being
   reused is written beside it. NOTHING EXISTING IS RESTYLED: every selector
   below sits inside a .qr-* of its own, so no rule here can reach a screen
   built before tonight.

   THE TYPE FLOOR AND THE TARGET FLOOR ARE WHY HALF OF THEM ARE HERE. The
   global `label` rule is 0.85rem (13.6px) and the global `input` padding
   leaves a control about 40px tall — below catalogue 16.5 tier 1 (body text
   never under 14px) and 16.6 tier 1 (44px minimum target, BS-001 rule V8).
   Those two rules are shared by every form in SGE and are NOT touched; this
   feature's own fields opt UP to the floor instead. Raising the global rule
   would restyle every screen in the build, which tonight's specification
   forbids outright — and it is recorded in the build notes as a real finding
   about the shared form rules rather than left unsaid.
   ========================================================================= */

/* One field: the label above, the control below, both at the floor. Used on the
   raise form and the edit form — the two screens a rep fills in standing up. */
.qr-field { font-size: var(--t-cell-min); margin-bottom: 0.5rem; }
.qr-field input, .qr-field select, .qr-field textarea { min-height: var(--tap); }
@media (pointer: coarse) {
  /* AT LEAST 16px WHERE A FINGER TYPES: anything smaller and iOS zooms the page
     on focus, which on a phone throws away the layout the rep is halfway through
     filling in. Keyed to the POINTER, not the window — a mouse-and-keyboard
     screen takes the shared field size (--fs-caption, set on `input, select,
     textarea` above), the same as every other field in SGE. Keith, 28 October
     2026: "the inout text are so huge". */
  .qr-field input, .qr-field select, .qr-field textarea { font-size: var(--fs-input-touch); }
}
.qr-field textarea { min-height: calc(var(--tap) * 2); }

/* The sentence under a field. `.muted` alone is 0.85rem, so the size is
   restated here rather than the shared rule being moved. */
.qr-help { font-size: var(--t-cell-min); margin: -0.2rem 0 0.9rem; }

/* WHAT SGE ALREADY KNOWS, on the raise form — the firm, the salesperson, the
   date. Shown so the rep can see it is right, and shown as FACTS rather than as
   fields: a field asking for something the system already holds is the defect
   Keith named by name, work handed back to the user. */
.qr-known { margin-bottom: 1rem; }

/* ONE REQUEST, ONE LINE — the customer record, the contact growth record and
   the day list all draw this. A list item rather than a table row because there
   are only three or four facts on it, and a four-column table at 375px is
   exactly what cardTableHtml exists to avoid. Each line clears 44px, and the
   whole line is reachable through the link inside it. */
.qr-lines { list-style: none; margin: 0.2rem 0 0.6rem; padding: 0; }
.qr-line {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem;
  min-height: var(--tap);
  padding: 0.25rem 0;
  font-size: var(--t-cell);
  border-bottom: 1px solid var(--line-soft);
}
.qr-line:last-child { border-bottom: 0; }
/* THE LINK IS THE TARGET, so it has to be the height of the row and not the
   height of the words in it. Measured before this rule the row was 44px and the
   link inside it 22px — which is a 22px target, and 16.6 tier 1 is about what a
   finger can actually hit, not about the box around it. */
.qr-line a { display: inline-flex; align-items: center; min-height: var(--tap); }

/* The pre-filled facts on the raise form use the shared .detail list, whose own
   dt/dd are 0.85rem. That rule is on every record screen in SGE and is left
   exactly where it is; this raises only the copy inside this feature's own
   block, so the floor is met without restyling anything that already exists. */
.qr-known dt, .qr-known dd { font-size: var(--t-cell-min); }
/* A link inside one of those rows is a target, and .detail's own dd gives it no
   height at all — measured at 20px before this rule. */
.qr-known dd a { display: inline-flex; align-items: center; min-height: var(--tap); }

/* B53, 17 SEPTEMBER 2026 — AND THAT IS WHY THE ACCOUNT FIELD SAT APART FROM THE
   REST. KEITH: "the Account field sits apart from the four fields below it with
   a gap and different spacing."

   MEASURED at 1440x900: Account at y=317 and the next field, Who asked, at
   y=369 — 52px down — while Who asked, Salesperson, Raised and Rough value sat
   25px apart from each other. Account is the one row whose value is a LINK, and
   the rule above gives that link a 44px touch target, so its row was 44px tall
   where every other row was 19px. One row twice the height of its neighbours in
   a five-row list reads as a block of its own, which is exactly what Keith saw.

   EVERY ROW TAKES THE SAME HEIGHT, and the touch target is kept rather than
   traded away for evenness — Keith's rule of 5 September: "understand.. then
   maintan it." The five rows are one list again, at one rhythm. */
.qr-known { align-items: center; row-gap: 0; }
.qr-known dt, .qr-known dd {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  /* A flex container drops the white space BETWEEN its children, and one of
     these values is a figure followed by the words that say it is an estimate —
     "RM 14,500.00" and "the account's estimate, not a quote". Without this they
     run together into one word. The gap is what the space was. */
  gap: 0.35rem;
}

/* A ROUGH VALUE IS AN ESTIMATE AND SAYS SO BESIDE ITSELF. Keith's standing rule
   that a figure which is not a real amount is never presented as one. */
.qr-est { font-size: var(--t-cell-min); }

/* What they asked for, on the record. It is the whole point of the screen, so
   it is the one thing set larger than a cell, and it keeps the line breaks the
   rep typed rather than running two thoughts into one paragraph. */
.qr-asked { font-size: var(--fs-body); white-space: pre-wrap; margin: 0 0 0.8rem; }

/* THE MOVES. One or two buttons side by side rather than the full-width block
   the global `button` rule makes, because they are alternatives to each other
   and a stack of full-width buttons reads as a sequence to work through. */
.qr-moves { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; margin: 0.4rem 0 0.6rem; }
.qr-moves .qr-field { margin-bottom: 0; flex: 0 0 auto; }
/* AND ON A PHONE IT SHRINKS RATHER THAN RUNNING OFF THE SIDE. `flex: 0 0 auto`
   refuses to shrink, so the date field inside the label kept its own 399px in a
   332px row and the page went sideways with it: measured at 390x844 on
   /quote-requests/87 (node scripts/w-secc-box-probe.mjs /quote-requests/87
   --view phone-portrait --sel ".dfield") — label.qr-field right edge 428 in a
   390px window, page 428. The field keeps its size wherever there is room for
   it; below the phone breakpoint it takes the line it is on. */
@media (max-width: 767px) {
  .qr-moves .qr-field { flex: 1 1 100%; min-width: 0; max-width: 100%; }
}
.qr-move { width: auto; }

/* THE RFQ REQUEST RECORD IN THE SHARED CARD STACK — 28 October 2026
   (docs/handoff/2026-10-28-rfq-record-page-and-photographs-contract.md, D1–D8).
   `.cx-pcards` (public/customer-record.css) gives the cards their panel, edge,
   heading strip, two-pairs-to-a-line field list and bottom-right foot; these are
   only the paddings for the three things this record puts straight into a card
   that the account record does not: the sentence that was asked, the colours
   picked, and the one-line statements (Won / Lost, the Project ID). They are
   scoped under `.qr-record` so no other record's cards move. */
.qr-record > .scard > .qr-asked { margin: 0; padding: var(--sp-sm) var(--sp-md) 0; }
.qr-record > .scard > .qr-lines { margin: 0; padding: var(--sp-xs) var(--sp-md) 0; }
.qr-record > .scard > p:not(.qr-asked) { margin: 0; padding: var(--sp-sm) var(--sp-md); }
.qr-record .qr-history-list {
  list-style: none;
  margin: 0;
  padding: 0 var(--sp-md) var(--sp-sm);
  font-size: var(--fs-caption);
  color: var(--t2);
}
.qr-record .qr-history-list li { padding: var(--sp-xxs) 0; overflow-wrap: anywhere; }
/* The date the quote went out stands in the card's foot, on the line of the
   button that uses it: label and box side by side, no margin of its own. */
.qr-sent { display: flex; align-items: center; gap: var(--sp-xs); margin: 0; }
/* B53 — THE MOVES LEFT THAT ROW AND JOINED THE CARD'S ACTION ROW. Keith: they
   "sit at opposite ends of the same row with a wide gap between them" — measured
   at x=241 and x=1283 on a 1440px window, a thousand pixels apart, because the
   date field beside them took the width and the row justified what was left.
   They are two alternatives to one question, so they stand together at the
   card's foot with the third alternative, Mark as lost. The form that carries
   them holds nothing else, so it lays its buttons out as a plain inline row. */
.qr-move-acts { display: inline-flex; flex-wrap: wrap; gap: var(--sp-xs); align-items: center; }

/* The four disclosures on these screens — closed requests, the extra fields,
   the lost form, the change history. Native <details>, the same shape as the
   Filters panel and the growth Why-blocks, so they open on click, Enter and
   Space with no script and no inline handler. Each summary is a real target and
   is written at the floor. */
.qr-closed > summary, .qr-more > summary, .qr-lost > summary, .qr-history > summary {
  display: flex; align-items: center;
  min-height: var(--tap);
  font-size: var(--t-cell-min); font-weight: 600; color: var(--accent);
  cursor: pointer;
}
.qr-history ul, .qr-photos { list-style: none; margin: 0.3rem 0 0; padding: 0; font-size: var(--t-cell-min); }
/* THE TWO LISTS ARE ROWS, AND A LIST ROW IS THE COMPACT HEIGHT — Keith,
   18 September 2026: "Compact style wins". Both of these carried the 44px floor
   and read 44px a row, so eight photographs and a change history filled the
   screen. The floor stays where a finger is: a CHANGE-HISTORY row is a line of
   text with nothing on it to press and takes the floor off outright; a
   PHOTOGRAPH row is a link, so at a fine pointer it is the compact height and
   under `pointer: coarse` — an iPad, a phone — it takes the whole target back.
   That is the same construction the shared row padding uses (--row-pad-y /
   --row-pad-y-touch, at the head of this file). */
.qr-photos li, .qr-history li { display: flex; align-items: center; }
@media (pointer: coarse) {
  .qr-photos li { min-height: var(--tap); }
}

/* ---- the manager's weekly review (src/review/*, migration 085) ------------
   SIX CLASSES, and each is here because nothing existing would do. They are
   listed with their reasons in SGE-BUILD-NOTES-2026-08-26-B.md; the reasons are
   repeated beside the rules below because that is where somebody changing one
   will be standing.

   `.review-btn` is a SECONDARY button at the 44px touch floor, and SGE had none.
   `.btn-inline` above is about 24px tall (0.1rem of padding on a
   var(--t-cell-min) line) and fails catalogue 16.6 tier 1 / BS-001 rule V8 at
   every width. `.overflow-item` is a menu row that only exists inside a
   disclosure. `.list-filters button` is bound to the filter form and gets its
   floor from a media query. `.btn-primary` is the right size but wears the
   accent fill, and "Close it" and "Carry it forward" are two alternatives to
   each other — two accent-filled buttons side by side is not a hierarchy, it is
   a row of buttons again (13.6).

   Every value below is an EXISTING token: no new colour, no new spacing scale,
   no new type size. The box is `.overflow-toggle`'s, which is the secondary
   control SGE already draws at this height.

   The two settle buttons sit side by side rather than as the full-width blocks
   the global `button` rule makes, for the same reason `.qr-moves` above does:
   a stack of full-width buttons reads as a sequence to work through, and these
   are alternatives. */
.review-settle { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.4rem 0 0; }
.review-settle p { flex: 1 1 100%; margin: 0.2rem 0 0; }
.review-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; min-height: var(--tap);
  padding: 0.5rem 0.9rem;
  font-family: var(--font); font-size: var(--t-ui-min); font-weight: 600;
  color: var(--ink-2); background: transparent;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  cursor: pointer; white-space: nowrap;
}
.review-btn:hover { background: var(--paper-2); border-color: var(--faint); color: var(--ink); }

/* The coaching point is ONE LINE agreed in a meeting, not a report, so the box
   is two rows and the button beside it is not full width. Same shape as the
   moves on a quote request. */
.review-write { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-end; }
/* The global `label` rule is 0.85rem — 13.6px, just under the 14px floor
   `--t-cell-min` sets, on every form in SGE. That is not this build's to fix
   everywhere; it IS this build's not to repeat, so the one label this screen
   adds takes the token. */
.review-write label { flex: 1 1 22rem; margin-bottom: 0; font-size: var(--t-cell-min); }
.review-write button { flex: 0 0 auto; }

/* THE MONTHLY REVENUE TARGET, ON THE SALES OBJECTIVES PAGE — Keith, 13 September
   2026: "the target box lives on the Sales objectives page". One row per
   salesperson (src/objectives/kpi-render.js teamTargetBoxHtml): the name and the
   month, and the figure. The rows are a column with a hairline between them so
   five people read as a list rather than as five stacked cards.

   ONE SAVE FOR THE WHOLE CARD SINCE 17 SEPTEMBER 2026 (fault 4). Each row used
   to be its OWN little form carrying its own Save button, so eight salespeople
   put eight buttons down the page; the rows are now plain rows inside one form
   whose single button sits under the lot. The row therefore has to declare the
   flex it used to inherit from `.review-write` — same layout, one less form. It
   still introduces no new spacing, size, radius or colour of its own.

   AND THE ROWS FILL THE CARD INSTEAD OF RUNNING DOWN ONE EDGE OF IT. Taking the
   button off each row left the right-hand two thirds of every row empty and the
   eight of them as a long thin column — dead space, which is the fault Keith
   names oftenest ("Alignment and deadspace"). So they are a grid that fits as
   many whole rows across as the card is wide, at a floor of 20rem each: three
   across on a desk, two on an iPad, one on a phone, and no gap beside any of
   them. Nothing is hand-sized — auto-fill reads the card. */
.kpi-target-rows {
  /* The card is a `.review-write` flex row, so this block has to claim the full
     width before a grid inside it has any width to divide. Without this it sizes
     to its content and auto-fill only ever finds room for one column. */
  flex: 1 1 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 0 var(--sp-md);
}
.kpi-target-rows .kpi-target-row {
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-end;
}
/* The figure sits beside the name rather than under it, so a row is one line
   tall and eight people are a block a manager can read down. */
.kpi-target-rows .kpi-target-row label {
  display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: baseline;
}
/* AND EVERY FIGURE STARTS AT THE SAME PLACE. The names are different lengths, so
   an input that simply followed its name would leave the boxes ragged and the
   column unreadable down its edge — `margin-left: auto` pushes each one to the
   end of its own cell, which is the same edge for all of them. */
.kpi-target-rows .kpi-target-row input[type="number"] {
  flex: 0 0 auto; width: 9rem; margin-left: auto;
}
.kpi-target-rows .kpi-target-row { padding: var(--sp-xs) 0; border-bottom: 1px solid var(--line-soft); }
.kpi-target-rows .kpi-target-row:last-child { border-bottom: 0; }
/* The figure is a number in a box, not a paragraph — it takes the width it needs
   and the name beside it takes the rest, which keeps the button on the same row
   at every width down to the phone, where the label wraps above it. */
.kpi-target-row label { flex: 1 1 16rem; }
.kpi-target-row input[type="number"] { max-width: 14rem; }

/* THE STUCK LIST IS THE EASIEST THING ON THE SCREEN TO READ — the
   specification's own requirement. It is a `cardlist`, so below 768px it is
   already one card per row and nothing is cut off or scrolled sideways.

   NO EXPLICIT COLUMN WIDTHS, and that is a decision rather than an omission.
   The table is left on the browser's automatic layout, which balances the four
   columns against what is actually in them. Fixed widths were tried on
   26 August 2026 — 20% on the customer and 8rem on each of the two short
   columns, the same targeted shape docs/sge-design-audit-2026-08-21.md A3
   prescribes for the growth table — and made it WORSE: the page grew from
   7,241px to 10,097px tall at 768px, because a customer name like "Site Lead 1
   (Bukit Damai Projects)" broke into six lines inside a 20% column while the
   two nowrap age columns could not give any of their 8rem back. Measured, not
   assumed. Below 768px none of this applies: it is one card per row. */
.review-stuck td { vertical-align: top; }

/* WHAT IS HAPPENING, IN ONE LINE — Keith, about this screen: "Too long to scroll
   down.. it should be limited somehow to a more standard length.." and "it's very
   messy".

   The sentences in this column are the ENGINES' OWN and some of them run to
   forty words. Left to wrap, every row was three lines deep and seventeen stuck
   rows filled a page and a half — measured at 1440 on 30 August 2026, rowHeight
   82px at 820 and 44px only where the sentence happened to be short. Clamped,
   every row is the same height and the same seventeen fit one window.

   `max-width: 0` with `width: 100%` is the auto-layout table's own way of saying
   "take whatever is left and no more": without the max-width the cell sizes to
   its content and the ellipsis never fires. Nothing is hidden by it — the whole
   sentence is the cell's title, and it is a line in the quick-view panel one
   click away, which is the drill-in rather than a truncation.

   Below the card breakpoint this cell is not drawn at all (the `list-oneline`
   card rules fold every non-lead cell away), so the phone is unaffected. */
.review-stuck td.review-detail {
  max-width: 0; width: 100%;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}

/* AND THE COLUMN BESIDE IT KEEPS ITS WORDS ON ONE ROW — Keith's standing rule:
   "Idealy when the text is not long, it should show it in one row not text
   wrap." "Task past its by-when" is five short words and there is room for them.

   It needs saying because of the rule directly above: `width: 100%` on the
   detail cell asks the browser for everything that is going, and an auto-layout
   table answers by squeezing every other column down to its longest WORD rather
   than its longest line — so a five-word label broke over two lines on a screen
   1440px wide with space to spare. These are declared labels from
   src/review/vocabulary.js, the longest of them 30 characters, so nowrap costs
   the table about 210px and the detail cell gives it up.

   ABOVE THE CARD BREAKPOINT ONLY. Below it the row is a card, one field per
   line, and a nowrap there would push a label off the side of a phone. */
@media (min-width: 768px) {
  .review-stuck td.list-signal,
  .review-stuck td[data-card-lead] { white-space: nowrap; }
}

/* =====================================================================
   THE PROGRESS CELL ON THE SALES OBJECTIVES LIST — 30 August 2026.

   KEITH, about that screen: "if this is the page that will show the indepth
   information of the Sales' performace then it should be much clearer and fast
   for anyone to see in under 1 min. infographics or analytical presentation will
   be helpful here."

   THE BAR IS NOT A NEW DRAWING. `.score-bar` / `.score-fill` / `.w-N` are
   already the ONE bar in SGE — the effectiveness score, the guide's progress and
   every Sales Challenge standing — and no colour, no size and no width step is
   added here. This rule does ONE thing: it puts the reading and the bar on the
   SAME LINE.

   WHY THAT MATTERS AND IS NOT a preference. Stacked, the cell made those rows a
   line and a half tall while every other row stayed one line, so a dense list
   read as a ragged one — and Keith's rule is "I don't want a 2dn line
   information of the row" and "the list should be pack like this". Side by side,
   every row on the list is the same height.

   THE BAR IS THE ELASTIC HALF: the reading ("3 of 5 · 60%") is as wide as its
   words and never wraps, and the track takes whatever is left, down to a floor
   at which it can still be read as a proportion.
   ===================================================================== */
.obj-progress { display: flex; align-items: center; gap: var(--space-xs); white-space: nowrap; }
.obj-progress > .obj-progress-said { flex: 0 0 auto; }
/* Spans rather than divs, because the cell's content is phrasing content; the
   two bar classes carry no display of their own, so it is given here. */
.obj-progress > .score-bar { display: block; flex: 1 1 4rem; min-width: 3rem; }
.obj-progress > .score-bar > .score-fill { display: block; }

/* WHICH KIND OF STUCK, as a neutral pill beside the customer. It composes with
   `.status` and changes two things about it, both for a reason:

   `text-transform: none` — `.status` title-cases every word, which turned "Task
   past its by-when" into "Task Past Its By-When" and "Quote sent, no answer"
   into "Quote Sent, No Answer". Those are DECLARED words from
   src/review/vocabulary.js, not raw stored values, and the CSS was rewriting
   them: the same fault chipsHtml in src/lists.js documents and solves with
   `.chip-plain`.

   The two colours are `.status-cold`'s own, token for token — no new colour is
   introduced. A neutral pill is right here: the kind is a LABEL, not a warning,
   and colouring five kinds five ways would be five new meanings on a screen
   whose urgency is already carried by the order of the rows. */
.status.review-kind { text-transform: none; background: var(--paper-2); color: var(--ink-3); }

/* EVERY LINK THIS SCREEN ADDS IS A REAL TARGET, at every width — catalogue 16.6
   tier 1 / BS-001 rule V8, 44 x 44px on touch. Measured on 26 August 2026 the
   week arrows, the rep arrows and the two plan links were 20px each, which is
   the height of a line of inline text and not a thing anybody hits with a thumb.
   They are laid out as a row of standalone links rather than as prose with links
   inside it, so raising them to the floor changes no sentence.

   `--tap` is the existing token and the gap is the existing spacing step; no new
   colour, no new size. */
.review-nav, .review-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.9rem; margin: 0 0 0.4rem; }
/* `.review-stuck td a` CAME OUT OF THIS SELECTOR ON 30 AUGUST 2026, and it is a
   deletion with a reason rather than a tidy-up. It raised the customer link in
   every stuck row to the 44px touch floor, which was right while that link was
   the ONLY way into the record. It is not any more: the stuck list is the
   Accounts pattern now, so src/lists.js stamps the row's own destination on the
   <tr> and public/row-click.js makes the WHOLE ROW the target — which is both a
   bigger target than 44px and Keith's own rule ("can;t the whole row be
   clickable like a card"). Left in, it fought the other rule he gave for every
   list in SGE — "the list should be pack like this" — by holding each row of
   this one table half as tall again as the same table on /customers. */
.review-nav a, .review-links a {
  display: inline-flex; align-items: center; min-height: var(--tap);
}
.review-nav strong { display: inline-flex; align-items: center; min-height: var(--tap); }

/* THE TILE LABEL ON THIS SCREEN IS AT THE FLOOR. `.tile-label` is 0.78rem
   (12.48px) and `.tile-label em` 0.72rem (11.52px) app-wide, which is below the
   14px floor `--t-cell-min` sets — a pre-existing fault on every dashboard tile
   in SGE and not this build's to fix everywhere. It IS this build's to not
   repeat, so the rule is scoped to the review's own tiles: same token, no new
   size, and nothing else in SGE moves. */
.review-tiles .tile-label, .review-tiles .tile-label em { font-size: var(--t-cell-min); }

/* =====================================================================
   INTERFACE PASS 3 — THE FORM GRID AND THE OPTION GRID
   docs/SGE-BUILD-INTERFACE-1-3.md §3.1 and §3.2.

   Two rules written once near the top of this file decide the shape of
   every form in SGE and were never overridden anywhere:

     label            { display: block }                    (line 186)
     input, select,
     textarea         { display: block; width: 100% }       (line 194)

   inside a `.frame` capped at 1180px (line 460). One field per line, every
   field the width of the page — so a date box is 1132px wide on a desktop
   and a form of twelve short answers is twelve screens long on a phone.
   Two places already fight those rules locally rather than fixing them
   (see the notes at `td.pick-col` and `.setting input[type="range"]`).

   Both grids below are OPT-IN BY WRAPPER CLASS. Nothing changes shape
   until a form is given `.fgrid` or a group of options is given `.ogrid`,
   which is what §3.1 asks for: existing forms adopt this deliberately, one
   at a time, rather than all moving at once on the day the class lands.
   ===================================================================== */

/* ---- §3.1 THE FORM FIELD GRID --------------------------------------
   Four columns, because the spec's width table has four steps and a
   quarter is the narrowest of them:

     narrow (span 1) — date, time, quantity, number, currency
     half   (span 2) — name, phone, email, short select
     full   (span 4) — address, description, notes, long select

   A CHILD IS FULL-WIDTH UNTIL IT IS TOLD OTHERWISE. That is the safe
   default: adding `.fgrid` to a form and marking nothing leaves every
   field exactly the width it already was, so adoption can never quietly
   break a field nobody looked at. Only `.f-half` and `.f-narrow` move it.

   `.fcell` is for a field that is more than one element — the quote
   screens put a `<p class="qr-help">` under each label, and the guidance
   has to travel with the field it explains rather than landing in the
   next column (the catalogue's "guidance sits beside the decision").

   The row gap is 0: `label` already carries `margin-bottom: 0.95rem`, and
   adding a row gap on top of it would space a gridded form further apart
   than the ungridded one beside it. */
.fgrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 1rem;
  align-items: start;
}
/* `hidden` STILL MEANS HIDDEN. `[hidden] { display: none }` is a UA rule
   and an author `display: grid` beats it — which matters here more than
   anywhere, because public/visit-form.js hides the blocks that do not
   belong to the chosen activity kind by setting `el.hidden`, and those
   blocks are exactly the ones this grid is applied to. Without this the
   grid would put every field of every activity type back on the screen. */
.fgrid[hidden], .ogrid[hidden], label.otile[hidden] { display: none; }
.fgrid > * { grid-column: 1 / -1; min-width: 0; }
.fgrid > .f-half { grid-column: span 2; }
.fgrid > .f-narrow { grid-column: span 1; }
/* A cell's own label must not keep the bottom margin twice over. */
.fgrid > .fcell > label { margin-bottom: 0.35rem; }
.fgrid > .fcell { margin-bottom: 0.95rem; }
.fgrid > .fcell > p:last-child { margin-bottom: 0; }

/* IN A GRID THE BOX TAKES ITS CELL — 28 October 2026. Keith, of the Edit RFQ
   Request form: "Why is this format so poorly done. this is not SGE
   Standard..", and, answering the standards contract's Q2, that Log Activity
   and Edit activity move with it. `.fc-full`, `.fc-boxed` and `.fc-inline`
   (public/shells.css) already say in as many words that inside a grid the box
   takes its cell; `.fgrid` never did, so the content caps at the top of this
   file (34rem for text, 8rem for a number, a select as wide as its longest
   option) left boxes floating at unrelated points across cells that line up.
   The caps keep doing their job wherever a control is NOT in a grid — a
   `.field-row`, a filter bar, a list toolbar. Check boxes, radios, files and
   the native pickers are left as they are; the date field fills its cell with
   its picker button at the end, as it does in `.fc-inline`. */
.fgrid label :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="date"]):not([type="time"]):not([type="datetime-local"]):not(.dfield-text):not(.dfield-clock), select, textarea) {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
}
.fgrid label > .dfield { display: flex; flex-wrap: nowrap; }
.fgrid .dfield > .dfield-text { width: auto; flex: 1 1 auto; min-width: 0; }

/* SINGLE COLUMN BELOW THE PHONE BREAKPOINT. 767.98px is the compact-band
   boundary this stylesheet already uses (see the approvals table), not a
   number this block invented. A quarter of 346px is 78px, which is not a
   date field. */
@media (max-width: 767.98px) {
  .fgrid { grid-template-columns: minmax(0, 1fr); }
  .fgrid > *, .fgrid > .f-half, .fgrid > .f-narrow { grid-column: 1 / -1; }
}

/* ---- §3.2 THE OPTION GRID ------------------------------------------
   `label.inline { display: inline-block; margin-right: 1.25rem }` sizes
   every option by the length of its own words, so a group of eight comes
   out as a ragged paragraph of boxes — "Visit" 54px beside "Courier
   sample drop" 167px — and the ragged edge gets worse the narrower the
   screen. The four wrapper classes that would have been the place to fix
   it (`.entry-kind`, `.kind-block`, `.debrief-section`, `.debrief-multi`)
   carried no rules at all.

   EQUAL COLUMNS, NOT EQUAL CONTENT: every tile in a row is exactly the
   same width by construction, whatever its words, at every width — which
   is the measurement §"Done when" asks for.

   NOT TABS, per §3.2: these are values being recorded, not views being
   switched, and a tab strip on a phone scrolls options out of sight.

   BUT EQUAL IS NOT THE SAME AS FULL-WIDTH, AND `1fr` MADE IT SO. The
   columns were written `repeat(n, minmax(0, 1fr))` — two, then three at
   768px, then four at 1280px — and an `fr` divides up the whole row
   whether or not anything in it wants the room. KEITH, 17 September 2026:
   "must it cover the whole width of the page", and the rule under it —
   "Controls and fields in SGE are sized to their content, not stretched
   across the full page width… they sit in a row, left-aligned, and the
   rest of the width is left alone." He had already said it about this
   very control: "the entry kind yourself is a little bit too long… if you
   all the same size as a product presentation, you may be able to fit
   everything in one row or something because space is very very
   important."

   MEASURED on /visits/new at 1440, before this rule changed
   (node scripts/w-b9b-ogrid-probe.mjs --tag before): the seven Entry kind
   tiles drew 322.3px apiece around 95.7px of words, and because four to a
   row is all 1280px allows, the seven took two rows. "When the follow-up
   is due" drew the same 322.3px around 120.8px. That is 249.7px of empty
   box on the widest tile of the group.

   `auto-fit` WITH A CONTENT MAX IS THE WHOLE FIX. The track floor stays a
   floor — 8.5rem, the number the debrief group below already measured and
   justified, and comfortably over the 120.8px that is the widest thing any
   option grid in SGE holds — so a two-letter value still draws a tile big
   enough to press and every tile in these groups lands on the same width.
   `max-content` in place of `1fr` means a track never takes room its words
   did not ask for, and `justify-content: start` leaves that room where
   Keith wants it: at the end of the row, unused. The media queries go with
   the `fr` — how many tiles fit is now arithmetic the browser does from
   the width it actually has, so there is nothing left for a breakpoint to
   say. Seven Entry kind tiles at 136px come to one row inside 1313px,
   which is the row he asked for. */
.ogrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, max-content));
  justify-content: start;
  gap: 0.5rem;
  margin: 0.4rem 0 0.6rem;
}

/* A GROUP WHOSE OPTIONS ARE SENTENCES gets fewer, wider columns. The quiz
   answers, the follow-up yes/no and the campaign match rows are clauses,
   not one-word values; at 160px each they wrap to five lines and the grid
   makes them harder to read rather than easier. Every tile in a row is
   still exactly the same width, which is what the pass is measured on. */
/* "PRODUCTS SHOWN" IS SIZED BY ITS CONTAINER, NOT BY THE WINDOW — Keith,
   4 September 2026: "The products shown looks wrong", and, asked whether he
   meant the layout or the products themselves: "layout".

   WHAT WAS WRONG. The column count above is a WINDOW media query: at 1280px and
   over, four columns. The debrief form is also drawn inside the QUICK VIEW
   PANEL, which is 340px wide (Keith presses Edit and the activity's own form
   comes into the panel). A 1440px window therefore cut a 308px group into four
   65px tiles, and "KompacTop", "KompacWall" and "KompacFlow" each rendered as
   "Ko", "Sink Cover" spilled out of its box, and "Profile Kit" was left on a row
   of its own — which is the screenshot he sent
   (~/Vault/Attachments/SGE/2026-09-04-195856-image.png).

   THE FIX IS TO ASK THE CONTAINER. `auto-fit` with a floor means the browser
   fits as many columns as will hold a whole product name and no more, so the
   group reads in full in a 340px panel (two columns) and in a full-width form
   (all five on one row, with no orphan). No media query is involved, so it is
   right at every window width and inside every container, now and later.

   8.5rem = 136px is the floor: the longest label is "KompacWall", which sets at
   about 78px in the caption size, plus the checkbox, the 0.45rem gap and the
   tile's own 0.6rem padding on each side — about 113px, with room left. It is
   the group's own rule and not `.ogrid`'s, because this is the group Keith was
   looking at. In the 308px the panel leaves it that is two columns; on the full
   form it is all five across, with no orphan row.

   THE OTHER HALF OF THE FAULT WAS NOT HERE. The panel was also making every
   checkbox as wide as the column, which is what pushed the names out of their
   boxes altogether — public/list-preview.css says so where it is fixed.

   THE FIVE PRODUCTS ARE NOT TOUCHED. Keith has asked what they are for and has
   not said whether they are the right five (src/visits/debrief.js PRODUCTS);
   nothing here adds, removes or renames one.

   THE `1fr` HERE IS THE ONE THING B9 COULD NOT FINISH, 18 September 2026. It is
   the same fault the base `.ogrid` above was just cured of — an `fr` divides the
   whole row up whether or not anything wants the room — and it measures the same
   way: the five tiles draw 256.2px apiece around 109.9px of words at 1440, where
   the base rule would give them 136px (node scripts/w-b9b-ogrid-probe.mjs). This
   rule sits at (0,2,0) and overrides the base one, so the group is NOT fixed by
   the change above. The one-word change is `1fr` to `max-content`, and it is not
   made here because test/review-corrections-2026-09-04.test.js asserts this
   track list literally and that file belongs to another batch. Whoever holds it
   re-points that assertion and changes this word in the same commit. */
.debrief-multi .ogrid {
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
}

.ogrid-wide { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .ogrid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .ogrid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* THE TILE. Also usable on its own, without a grid around it, for the
   places where there is genuinely one option — the approval queue's tick,
   the login form's "keep me signed in", a checklist point. A grid of one
   is not a grid, but the 44px target and the box are the same thing.

   `label.otile` rather than `.otile` on purpose: `label.inline` weighs
   (0,1,1) and would otherwise win on specificity and put the right margin
   and the inline-block back. Height, not padding, carries the floor —
   `--tap` is the existing token (44px, BS-001 rule V8 / catalogue 16.6). */
label.otile, .ogrid > label {
  display: flex; align-items: center; gap: 0.45rem;
  min-height: var(--tap);
  margin: 0; padding: 0.3rem 0.6rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel);
  font-weight: 400; font-size: var(--fs-caption); color: var(--ink);
  cursor: pointer;
}
/* The native control stays VISIBLE inside the tile — the same call pass 2
   made for `.log-init-chip`: where `:has()` is not supported the dot is
   the only thing saying which answer is chosen. */
label.otile > input, .ogrid > label > input {
  display: inline; width: auto; margin: 0; flex: 0 0 auto;
}
label.otile:hover, .ogrid > label:hover { border-color: var(--accent); }
label.otile:has(input:checked), .ogrid > label:has(input:checked) {
  background: var(--accent-soft); border-color: var(--accent);
}
/* An option carrying a strong lead and a hint keeps them on one line each. */
label.otile > span, .ogrid > label > span { min-width: 0; }

/* The sample line's "Who asked?" pair is already chips; the grid only has
   to stop them being two different widths (238px beside 221px at 1440).
   The question is not an option, so it takes the whole first row. */
.log-init.ogrid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.log-init.ogrid > .log-init-q { grid-column: 1 / -1; align-self: center; }
.log-init.ogrid > .log-init-chip { margin: 0; width: 100%; justify-content: flex-start; }

/* The approval queue's tick is a tile in a 3.4rem column, so it is centred
   and carries no border of its own — the row is already a row. */
td.pick-col label.otile {
  justify-content: center; padding: 0; border: none; background: none;
  min-width: var(--tap);
}

/* ---- §3.3 THE QUANTITY LABEL ---------------------------------------
   Quantity is captured on all three code paths and is NOT NULL CHECK
   (quantity > 0) in the schema. The no-JS fallback row has a label; the
   line the picker builds in the browser, and the line the server re-emits
   after a validation bounce, did not — which is why it read as a bare box
   with no word anywhere near it. One word, on both of them. */
.qty-field {
  display: inline-flex; align-items: center; gap: 0.35rem;
  margin: 0 0.4rem; font-size: var(--t-cell-min); color: var(--ink-3);
}
/* AND THE BOX ITSELF IS A TARGET. It measured 72 x 41 — three pixels under
   the 44px floor, and the only control on any form this pass touches that
   missed it. The cause is not the padding, which is the same 0.6rem every
   other field carries: `#sample-lines li` USED TO SET `font-family: var(--mono)`
   and `input { font-family: inherit }` handed the monospace stack to this box
   alone, whose `normal` line box is shorter than the interface font's. That
   mono declaration went on 5 September 2026 with the no-code-font-on-business-
   text pass, so the cause is gone — but the floor stays asserted rather than
   arrived at by arithmetic, which is what `--tap` is for. Nothing else about
   the field moves: same 4.5rem width, same padding. */
#sample-lines .qty-field .qty { margin: 0; min-height: var(--tap); }

/* §3.4, the page-width cap, is fixed where the rule that broke it lives —
   see `.growth-revenue` above. Nothing is redeclared here. */

/* =========================================================================
   INTERACTION STATES — REST, HOVER, PRESS, FOCUS, FOR THE WHOLE APPLICATION.

   The design document's own section, applied once here rather than a hundred
   times at the call sites. Its four states "compose rather than replace each
   other": a hovered row that is pressed shows both the surface step and the
   scale, and a focus ring sits on top of either.

   IT IS LAST IN THE FILE ON PURPOSE. Nothing above may quietly out-order the
   focus ring, which is the one state a keyboard user has.
   ========================================================================= */

/* ---- THE POINTER IS A HAND OVER ANYTHING CLICKABLE, ALWAYS ---- */
a[href], button, summary, label, select, [role="button"], tr[data-row-href] { cursor: pointer; }
button:disabled, [aria-disabled="true"] { cursor: default; }

/* ---- A BUTTON'S LABEL IS NEVER UNDERLINED ON HOVER ----
   KEITH, 4 September 2026: "When mouse over, can the words not be underline?
   this is the same for most of the current button behaviour."

   WHERE IT CAME FROM. Line 457 says `a:hover { text-decoration: underline }`,
   which is right for a link in a sentence. Almost every control in SGE is an
   <a> — the Month button, the chips, the view rows, the tabs, the nav items —
   and each of them sets `text-decoration: none` in its own block at (0,1,0),
   which `a:hover` at (0,1,1) then out-ordered on hover. So a button that had
   deliberately been drawn without an underline grew one under the pointer.

   THE STATE IS NOT LOST, IT IS SAID THE OTHER WAY. Every control listed here
   already steps its background or its ink on hover in its own block above —
   that is the hover, and it is what his rule asks for. Underline is left to
   links, which are untouched: nothing here matches a link in prose.

   IT IS WRITTEN BY ELEMENT AND ROLE FIRST — <button>, <summary>, role=button —
   so a control added tomorrow is covered without anybody remembering to ask.
   Then by the SHAPE OF THE NAME: every button, tab and action SGE draws as an
   <a> is called `…btn…`, `…-tab…` or `…-act…` somewhere in this file
   (`.btn-primary`, `.cap-btn`, `.pj-btn`, `.pr-btn`, `.sv-btn`, `.mw-count-btn`,
   `.col-tab`, `.appr-tab`, `.cx-tab`, `.preview-tab`, `.evt-act`, `.pv-act`,
   `.inline-action`…), so three substring selectors cover the whole family and
   the one added tomorrow. The names after those are the controls that follow
   none of those shapes.

   scripts/w1652-button-underline-sweep.mjs is the check: it walks the app,
   hovers every anchor drawn as a control, and reports any that still
   underlines. */
/* AND NOT AT REST EITHER. A control drawn as an <a> takes the browser's own
   underline unless its block says otherwise, and several did not — "Response
   speed" on /leads (`.review-btn`) was an outlined button with an underlined
   word inside it. A button's label is not underlined in any state. */
a[class*="btn"], a[class*="-tab"], a[class*="-act"],
button:hover, button:focus,
summary:hover, summary:focus,
[role="button"]:hover, [role="button"]:focus,
a[class*="btn"]:hover, a[class*="-tab"]:hover, a[class*="-act"]:hover,
.pill:hover, .chip:hover,
.tb-icon:hover, .tb-toggle:hover .tb-face,
.applied-chip:hover, .applied-x:hover,
.account-item:hover, .nav-group-item:hover, .overflow-item:hover,
.nav-rail-btn:hover, .nav-rail-item:hover, .nav-sheet-btn:hover, .nav-sheet-item:hover,
/* SHOWCASE'S TWO CONTROLS, 11 September 2026 — the outlined button in the app
   bar's right-hand block and the entries in the phone's bottom bar. Both are
   drawn as <a>, both are buttons, and neither follows the `btn`/`-tab`/`-act`
   name shapes above, so both are named. At rest as well as on hover: the bar
   entries are a drawing over a word and the word must not carry a rule under
   it. */
.nav-showcase, .nav-showcase:hover, .nav-bb, .nav-bb:hover,
.nav-item:hover, .nav-help:hover, .nav-logout button:hover,
.view-row:hover, .day-log:hover, .health-word:hover, .status-word:hover,
.cal-move > a:hover, .fmulti-x:hover, .pv-edit-open:hover, .pv-close:hover,
.switcher > summary:hover, .lbtn-en:hover, .lbtn-zh:hover,
.planner-place:hover, .planner-navigate:hover, .ecal-link:hover,
.board-name:hover, .cal-dnum:hover, .ref-link:hover,
/* THE THREE THE SWEEP FOUND. scripts/w1652-button-underline-sweep.mjs hovered
   469 controls across 25 screens and these were what still underlined: the top
   bar's own Log Activity — the most-pressed button in SGE — and the Dashboard's
   two clickable blocks, which are filled panels and not links in a sentence. */
.qdock-go, .qdock-go:hover,
.dash-chip, .dash-chip:hover, .dash-stat, .dash-stat:hover,
a.tile:hover, a.pill:hover, a.chip:hover {
  text-decoration: none;
}

/* ---- HOVER AND PRESS RUN AT --dur-fast ----
   Only background, colour, border and transform transition. Nothing that
   affects layout does, so a hover can never move the thing under the pointer. */
a, button, summary, .pill, .chip, .status, .badge, .btn-primary, .btn-inline,
.account-item, .nav-group-item, .overflow-item, .tile, .applied-chip,
.nav-rail-btn, .nav-rail-item, .nav-sheet-btn, .nav-sheet-item,
tbody tr, tbody tr td {
  transition:
    background-color var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    color var(--dur-fast) ease,
    transform var(--dur-fast) ease;
}

/* ---- PRESS ----
   `transform: scale(0.95)`, the document's system-wide micro-interaction, on
   every pressable control. It says in the same paragraph that scale alone is
   not enough on a small control, so anything under 32px painted ALSO steps its
   background for the duration of the press; the step is applied to every
   control here rather than measured one by one, because a step on a large
   control costs nothing and a missing step on a small one is a lost signal. */
button:active,
summary:active,
.pill:active,
.chip:active,
.btn-primary:active,
.btn-inline:active,
.account-item:active,
.nav-group-item:active,
.overflow-item:active,
.applied-x:active,
.nav-rail-btn:active,
.nav-rail-item:active,
.nav-sheet-btn:active,
.nav-sheet-item:active,
.evt-act:active,
a.tile:active,
a.chip:active {
  transform: scale(0.95);
}

/* ---- REDUCED MOTION ----
   The document: "Under prefers-reduced-motion: reduce the transform drops and
   the background step becomes the entire feedback — press feedback is not
   decoration and does not disappear with motion." So the transform goes and
   the surface step is left standing, rather than the whole state being
   switched off. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  button:active, summary:active, .pill:active, .chip:active, .btn-primary:active,
  .btn-inline:active, .account-item:active, .nav-group-item:active,
  .overflow-item:active, .applied-x:active, .nav-rail-btn:active,
  .nav-rail-item:active, .nav-sheet-btn:active, .nav-sheet-item:active,
  .evt-act:active, a.tile:active, a.chip:active {
    transform: none;
    background-color: var(--panel-2);
  }
}

/* ---- FOCUS ----
   2px solid, 2px offset, on `:focus-visible` ONLY — never bare `:focus`, so a
   mouse press does not leave a ring behind. The colour is a token, so light
   takes #0071e3 (4.70:1 on panel, 4.31:1 on bg) and dark takes #2997ff (6.96:1
   on bg, 4.94:1 on panel), both clear of the 3:1 non-text minimum in WCAG 2.2
   SC 1.4.11. There is no `outline: none` anywhere in this file.

   THE RING IS ON THE ELEMENT, NOT ON A CLASS LIST, because a control that is
   added tomorrow must get one without anybody remembering to ask. */
:focus-visible {
  outline: 2px solid var(--accent-focus);
  outline-offset: 2px;
  /* The offset ring must not be clipped by a scrolling ancestor on a table
     whose frame is `overflow-x: auto`. */
  outline-color: var(--accent-focus);
}
/* A <details> summary and a table row are focusable through the markup rather
   than by being a button, so they are named to make sure the ring reaches them
   through any `display` override. */
summary:focus-visible,
tr[data-row-href]:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-focus);
  outline-offset: 2px;
}

/* =====================================================================
   THE COLUMN MENU — the small arrow beside a heading, and what it opens.

   KEITH, 29 August 2026, on how a heading divides between the sort and the
   menu, given the recommendation: "Go with your receommendation". The words
   sort; a small arrow beside them opens the menu; THE TWO NEVER SHARE A CLICK
   TARGET. That is the whole reason this is a separate element with a hit box of
   its own rather than a glyph inside the sort link.

   It is a native <details> (src/lists.js colMenuHtml) — the same disclosure the
   Filters button, the account menu and the record overflow already use — so it
   opens on click, on Enter and on Space, with no inline handler for the CSP to
   refuse and nothing to load.

   ADDED WHOLE ON 29 AUGUST 2026 AND IT ALTERS NO EXISTING RULE. Every
   declaration below is on a `col-menu` selector nothing else in this file names,
   except the one `thead th:has(...)` line, which adds a z-index only while a
   menu is open and is inert otherwise.
   ===================================================================== */
.col-menu { position: relative; display: inline-block; vertical-align: baseline; }
/* The arrow is quiet until it is wanted: always present, so it can be found,
   at the weight of a hint rather than of a control competing with the heading
   it sits beside. */
.col-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.15rem; height: 1.15rem; margin-left: 0.15rem;
  font-size: var(--t-cell-min); line-height: 1;
  color: var(--muted); cursor: pointer;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  list-style: none;
}
.col-menu-toggle::-webkit-details-marker { display: none; }
.col-menu-toggle::marker { content: ""; }
.col-menu-toggle:hover { color: var(--accent); background: var(--paper-2); border-color: var(--faint); }
.col-menu[open] > .col-menu-toggle { color: var(--accent); border-color: var(--accent); }

/* THE PANEL RISES ABOVE THE HEADINGS BESIDE IT. Every `thead th` is sticky with
   a z-index of its own, so a later column would otherwise paint over an open
   menu in an earlier one. The heading holding the open menu is lifted for as
   long as it is open, and drops back the moment it is not. */
thead th:has(.col-menu[open]) { z-index: 8; }
.col-menu-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 40;
  min-width: 12rem;
  display: flex; flex-direction: column;
  padding: 0.25rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  /* A heading is nowrap; the menu inside it is not. The `text-transform: none`
     is a no-op since the shell stopped uppercasing `th` on 13 September 2026. */
  white-space: normal; text-transform: none; letter-spacing: normal;
}
/* A heading near the right edge opens its menu to the left instead of off the
   page — the table is not allowed to scroll sideways to reach a menu. */
th:last-child .col-menu-panel { left: auto; right: 0; }
/* AND "NEAR THE RIGHT EDGE" IS NOT "THE LAST HEADING". The comment above says
   the first; the selector says the second, and below the desk they stop being
   the same thing. MEASURED on /leads at 834x1194 on 22 September 2026, opening
   every one of the page's column menus in turn: the first eight are clear, and
   then Channel drew x 677.6..845.6 — 11.6px past the window — and Salesperson
   x 736.6..904.6, 70.6px past it, with Ascending, Descending and Filter… cut
   through the middle of the words. The document's scrollWidth stays 834, so the
   menu is CLIPPED and cannot be reached by scrolling to it at all.

   THE DESK IS THE REASON THIS IS TWO CONDITIONS AND NOT ONE. Applying the flip
   to every column unscoped was tried in the live page and does cure the iPad —
   Salesperson moved to x 592.6..760.6 — but it would also right-align every
   column menu on a desk monitor, where they open leftward today and are
   correct. So the band stops at 1279.98px, one hundredth of a pixel below where
   the desk begins (the rail stands at 1280 and list-preview.css gives the quick
   view its own column there), and NOTHING above that line is touched.

   AND IT IS THE LAST THREE HEADINGS, NOT ALL OF THEM, so the cure cannot become
   the fault at the other end: a narrow FIRST column flipped to `right: 0` would
   put a 168px panel off the LEFT edge of the window instead. Three is what the
   iPad measurement needs — Channel, Salesperson and the hidden Created sit in
   that run — and it leaves every heading in the body of the table opening the
   way it always has. */
@media (max-width: 1279.98px) {
  th:nth-last-child(-n+3) .col-menu-panel { left: auto; right: 0; }
}
.col-menu-item {
  padding: 0.4rem 0.6rem; border-radius: var(--radius-sm);
  font-size: var(--fs-caption); font-weight: 500;
  text-transform: none; letter-spacing: normal;
  /* `th a` paints every link in a heading as heading-grey; a menu item is a
     control being read, not the name of a column. */
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.col-menu-item:hover { background: var(--paper-2); color: var(--accent-deep); }
/* "Filter…" ON THE ACCOUNTS LIST IS A <label>, NOT A LINK — it ticks the filter
   pane's own switch rather than pointing at a fragment, so the × and the funnel
   can still shut the pane afterwards (src/lists.js colMenuHtml says the whole
   of why). It has to READ as the item beside it: a label is not focusable or
   clickable-looking by itself, so it takes the same box, the same cursor and a
   focus ring of its own. */
.col-menu-open { cursor: pointer; display: block; }
.col-menu-open:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* =====================================================================
   THE ACCOUNTS LIST, REBUILT — Keith, the night of 29 August 2026.

   SEVENTEEN THINGS, ONE SCREEN. Everything in this block is either scoped to
   `.acct-shell` (the Accounts list and nothing else, until he has looked at it)
   or is a SHELL rule — the navigation panel's wordmark and its collapse control,
   and the one chevron the disclosures on the page open with — which by its
   nature shows on every screen and is meant to.

   IT ADDS; IT DOES NOT REWRITE. Every selector below is either new or an
   explicit override of an earlier rule by a later one, so a list that does not
   draw `.acct-shell` is untouched byte for byte.
   ===================================================================== */

/* ---- ONE ARROW STYLE (item 12) -------------------------------------------
   A thin outlined chevron, not a solid triangle. It is drawn by one function
   (src/lists.js: chevronSvgHtml) and used by the column headings on this list,
   by Quick access and by the user button — which is what "one arrow style
   throughout" means on the screen Keith was looking at. `.account-caret` keeps
   its own rotation rules, so every disclosure that already turned its caret on
   opening still turns this one. */
.account-caret { display: inline-flex; align-items: center; line-height: 0; }
.chev-ico { width: 0.95em; height: 0.95em; display: block; }

/* The column heading's ONE mark. It opens the menu, and on the column the list
   is ordered by it points the way the order runs — down for descending, which
   is the drawing's own direction, and up for ascending. */
.col-chev { display: inline-flex; align-items: center; line-height: 0; transition: transform var(--dur-fast) ease; }
.col-chev-asc { transform: rotate(180deg); }
/* THE ONE MARK HAS TO SAY WHICH COLUMN IS SORTED. Pointing down is also the
   drawing's resting direction, so on a list ordered DESCENDING the sorted
   column's chevron would be the same shape as the five beside it. The sorted one
   takes the accent; the rest stay the weight of a hint. */
.col-chev-asc, .col-chev-desc { color: var(--accent); }
.col-menu-toggle { width: 1.35rem; height: 1.35rem; }

/* ---- THE NAVIGATION PANEL'S HEAD (items 1 and 2) — SHELL, EVERY PAGE ------
   Expanded it reads KOMPACPLUS; collapsed it is the mark alone. The collapse is
   its own control — the standard sidebar toggle, a rounded square with the left
   edge marked off — sitting opposite the wordmark when the panel is open and
   under the mark when it is shut. The logo is no longer a button.

   SGE HOLDS NO WORDMARK IMAGE, so the wordmark is SET, in the app's own family
   at the ink and the weight its headings already use. Nothing new is invented
   and no logo file is added.

   1024, NOT 1280, SINCE 30 AUGUST 2026. This is the SECOND half of the rail's
   band — the head of the panel is written down here, the body of it is written
   in "THE DESKTOP NAVIGATION IS A RAIL" above — so when that threshold moved
   this one had to move with it or the rail would be half-built between 1024 and
   1279. Measured at 1024 before this line changed: the panel was drawn, and the
   KOMPACPLUS wordmark stood in a 56px column and ran across the page heading,
   because `.nav-rail-wordmark { display: none }` lives in here. */
@media (min-width: 1024px) {
  .nav-rail-head {
    display: flex; align-items: center; gap: var(--sp-xxs);
    margin-bottom: var(--sp-xs);
  }
  .nav-rail-brand {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 0; text-decoration: none;
  }
  .nav-rail-wordmark { display: none; }
  .nav-wide-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: auto; min-width: 44px; min-height: 44px; padding: 0;
    border: 0; border-radius: var(--r-sm); background: transparent;
    color: var(--t3); cursor: pointer;
  }
  .nav-wide-toggle:hover { background: var(--panel-2); color: var(--t1); }
  .nav-panel-ico { width: 20px; height: 20px; }

  /* COLLAPSED: the mark on its own line, the toggle under it. */
  html:not(.nav-rail-wide) .nav-rail-head { flex-direction: column; }
  html:not(.nav-rail-wide) .nav-rail-brand,
  html:not(.nav-rail-wide) .nav-wide-toggle { width: 100%; }

  /* EXPANDED: the wordmark on the left, the toggle opposite it on the right. */
  html.nav-rail-wide .nav-rail-head { flex-direction: row; justify-content: space-between; }
  html.nav-rail-wide .nav-rail-brand { justify-content: flex-start; padding: 0 var(--sp-xxs); }
  html.nav-rail-wide .nav-rail-logo { display: none; }
  html.nav-rail-wide .nav-rail-wordmark {
    display: inline-block;
    font-family: var(--font);
    font-size: 15px; font-weight: 700; line-height: 1;
    letter-spacing: 0.02em; color: var(--t1);
    white-space: nowrap;
  }
}

/* ---- THE SHELL OF THE SCREEN --------------------------------------------
   A column: the toolbar, then a row holding the left pane, the list and the
   right pane. `min-height: 0` on every link of that chain is what lets the
   innermost box — the list — be the thing that scrolls; without it a flex item
   refuses to shrink below its content and the PAGE scrolls instead, which is
   exactly what Keith asked to stop. */
.acct-shell { display: flex; flex-direction: column; min-height: 0; }
.acct-body {
  display: flex; align-items: stretch; gap: var(--sp-sm);
  flex: 1 1 auto; min-height: 0; min-width: 0;
}
.acct-main { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.acct-main > .list-results { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }

/* THE LIST STAYS INSIDE THE WINDOW (item 17) — AND NOT BY ARITHMETIC.
   Keith: "Keep it within the windows. so it can be scroll within the box and nto
   going into another page."

   The obvious way to write this is `height: calc(100vh - <the app bar> - <the
   margins>)`, and it is wrong: measured on 29 August 2026 the app bar is 61px,
   not the 56 this file's sticky offsets assume, so the page overflowed by
   exactly 5px and scrolled. A number typed twice is a number that will disagree
   with itself.

   So nothing is measured. The window is given to the body, the body gives what
   is left under the app bar to the page, the page gives it to this shell, and
   the shell gives it to the list — one flex chain, every link carrying
   `min-height: 0` so it may shrink below its own content. Whatever the app bar
   turns out to be, the list is exactly the rest, and there is nothing left over
   for the page to scroll.

   ONLY WHERE THIS SHELL IS DRAWN. `:has(.acct-shell)` is true on the Accounts
   list and on no other screen in SGE. */
@media (min-width: 768px) {
  body:has(.acct-shell) { height: 100vh; grid-template-rows: auto minmax(0, 1fr); }
  body:has(.acct-shell) > main.frame {
    display: flex; flex-direction: column; min-height: 0;
    margin-top: var(--sp-sm); margin-bottom: var(--sp-sm);
  }
}
@media (max-width: 767px) {
  /* Below 768 the body is a block, not a grid, so the same chain is made with a
     flex column. The dock's own clearance at the foot (`padding-bottom` on the
     frame, further up this file) is deliberately left standing: the list ends
     above the floating Log Activity button rather than under it.

     AND `min-height`, NOT `height`, IS WHAT MAKES THAT TRUE. Measured on
     /approvals at 390x844 on 5 September 2026: the head of that page — two
     number tiles whose labels are sentences, the tab strip and the notice — is
     taller than a phone on its own, so `height: 100vh` clamped the frame to a
     window and everything past it painted OUT of the frame's padding box. The
     clearance was still declared and was simply overflowed past: with the page
     scrolled as far down as it goes, the search box, the applied-filter chips
     and the "23 of 65 visits · Filtered" line all sat under the floating dock,
     and there was no further to scroll.

     `min-height` is the same box whenever the content fits — every list whose
     head is short is pixel-for-pixel what it was, and the flex chain below
     still hands the leftover window height to the list — and lets the frame
     grow when the content does not fit, which is the only state in which the
     padding at its foot has anything to do. Above 767px nothing here applies:
     the desk keeps `height: 100vh` and its one-screen shell. */
  body:has(.acct-shell) {
    display: flex; flex-direction: column; align-items: stretch;
    justify-content: flex-start; min-height: 100vh;
  }
  body:has(.acct-shell) > main.frame {
    display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0;
    margin-top: var(--sp-xs); margin-bottom: 0;
  }
}
body:has(.acct-shell) > main.frame > .scard {
  display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0;
  margin-bottom: 0;
}
/* ONLY THE CARD THAT HOLDS THE SHELL MAY SHRINK. The rule above hands the
   leftover window height down the flex chain, and `min-height: 0` is what lets
   each link give way to the one below it. That is right for the card the list
   is in and WRONG for a card that is merely its sibling: a sibling is content,
   not a viewport, and `flex: 1 1 auto; min-height: 0` lets it be squeezed
   BELOW ITS OWN CONTENT, which — with `overflow: visible` — paints straight out
   of the bottom and under whatever comes next in the flow.

   Measured on /approvals at 1440x900 on 4 September 2026 (the page was one card
   when the rule above was written; it is now the numbers card and then the list
   shell). The numbers card was squeezed to 157.7px holding 179.3px of tiles, so
   the tiles spilled 72.9px past its bottom edge at 275.3 — and the tab strip,
   the next thing in the flow, begins at exactly 275.3 and was painted over them
   by 36.6px. Same 36.6px at 820 and at 390. Keith on this kind of fault:
   "Alignment issue" — nothing overlapping.

   Nothing else is given back: the sibling keeps the column and keeps
   `margin-bottom: 0`, so no other screen's spacing moves. It is only told to
   take its own height and to refuse to be shrunk.
   `node scripts/w1638-approvals-header-geometry.mjs` measures it either way. */
body:has(.acct-shell) > main.frame > .scard:not(:has(.acct-shell)) {
  flex: 0 0 auto; min-height: auto;
}
.acct-shell { flex: 1 1 auto; }

/* ---- THE TOOLBAR: ONE ROW (items 3–6) ------------------------------------ */
.acct-toolbar {
  flex: 0 0 auto;
  display: flex; align-items: center; flex-wrap: wrap;
  gap: var(--sp-xs);
  padding: 0 0 var(--sp-xs);
  background: var(--bg);
}
.tb-left { display: flex; align-items: center; gap: var(--sp-xs); flex: 1 1 18rem; min-width: 0; }
/* THE PAGE'S OWN ACTIONS. One row wherever the row is wide enough to hold them
   — which is Keith's instruction for this cluster, given on the Inbound leads
   toolbar: "All of it goes on one row, one height, one baseline".

   AND IT WRAPS RATHER THAN RUNNING OFF A PHONE. The toolbar itself has wrapped
   since it was written, so the cluster drops to a line of its own when the
   search box beside it leaves no room; the cluster's own CONTENTS did not, and a
   page with more than the usual two actions then ran past the right edge of the
   window and took the whole document with it. MEASURED on /leads at 390x844,
   which carries "Response speed" and "New lead" as well as the three pane
   switches: `.tb-right` drew 398px in a box 346px wide, its last switch ended at
   x=427, and the document scrolled to 427 against a 390px window — the only one
   of ten pages swept that did (command: `node scripts/w-b9-leads-phone-probe.mjs`
   and `node scripts/w-b9-control-width-probe.mjs --tag before`).

   `flex-wrap` costs nothing at any width that fits, because a flex line only
   breaks when it has to; `justify-content` only has free space to work with once
   it has broken, and then it keeps the primary action at the end of the cluster
   where Keith put it. Nothing on a desk moves.

   AND WRAPPING ALONE DOES NOTHING WITHOUT LEAVE TO SHRINK, which is why the
   flex shorthand changes with it. `flex: 0 0 auto` sizes this box to its
   max-content width and REFUSES to be squeezed below it, so a wrap it is never
   narrow enough to need never happens: with `flex-wrap` alone it still measured
   398px in a 346px line. `0 1 auto` with `min-width: 0` lets the line it sits on
   press it down to the width that is actually there, and the wrap then does the
   work. At any width where the cluster fits there is free space rather than a
   squeeze, so nothing shrinks and nothing moves. */
.tb-right {
  display: flex; align-items: center; gap: var(--sp-xs);
  flex: 0 1 auto; min-width: 0; margin-left: auto;
  flex-wrap: wrap; justify-content: flex-end;
}
.acct-toolbar > .applied-filters { flex: 1 1 100%; min-width: 0; margin: var(--sp-xxs) 0 0; }
.tb-left > .search { flex: 1 1 10rem; max-width: 24rem; margin: 0; }
.tb-left > .search input[type="search"] {
  width: 100%; margin: 0; min-height: var(--tap);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
/* The page's own action keeps the button it has always been — the record
   header's `.rh-actions` and `.btn-primary`, moved into this row rather than
   redrawn, so nothing about it is new.

   B34, 17 September 2026 — AND IT KEEPS ITS PADDING TOO, WHICH IS THE FAULT.
   KEITH: "and the New Project is alignment off".

   MEASURED on /projects at 1440px before this line was written: the search box
   sat at top 77 and each of the three toolbar icons at top 77, and New project
   at top 81 — four pixels out of the row it shares, at 1440 and at 820 alike
   (command: `node scripts/w2455-projects-shots.mjs --shots
   docs/reports/w2455-projects/before --widths 1440,820,390`, the `toolbarTops`
   field). The cause is one declaration one rule away: `.rh-actions` carries
   `padding-top: 0.5rem` for the RECORD HEADER it was written for, where the
   actions sit beside a two-line identity block. In a toolbar there is no such
   block — every item is one 44px control on one baseline — so that padding makes
   the button's box 8px taller than its neighbours' and `align-items: center`
   then drops the button by half of it.

   The margin was already being reset here; the padding was not. It is now, and
   the record header's own rule is untouched. */
.acct-toolbar .rh-actions {
  display: flex; align-items: center; gap: var(--sp-xs);
  margin: 0; padding: 0;
}

/* A PANE SWITCH. The checkbox IS the control — laid over its own face at full
   size, so the thing under the pointer is the input itself: it is in the tab
   order, it answers the space bar, and it needs no script and no label
   indirection. `opacity: 0` and not `display: none`, because a hidden input is
   not focusable. */
.tb-toggle { position: relative; display: inline-flex; flex: 0 0 auto; }
.pane-switch {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; padding: 0; opacity: 0; cursor: pointer; z-index: 2;
  min-height: 0;
}
.tb-face {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem;
  min-width: var(--tap); height: var(--tap); padding: 0 0.45rem;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--panel); color: var(--t2);
}
.tb-toggle:hover .tb-face { background: var(--panel-2); color: var(--t1); border-color: var(--faint); }
/* AN ICON THAT IS ON IS FILLED SOLID BLUE, THE SAME AS THE SELECTED MONTH
   BUTTON — Keith, 4 September 2026: "I click when the icon is click, it should
   be filled blue like the month. these should be the standard behaviour for all
   button like icon."
   It was an outline: accent ink on the pale panel with an accent border, which
   sat beside a Month pill filled in `--accent-fill` and did not read as the
   same state. The fill, the ink and the hover step are `.pill.active`'s own
   (line 816) rather than a second set of values, so the two cannot drift.
   BOTH ON-STATES take it. `:checked` is the pane this icon opens standing open;
   `.is-on` is the funnel while the list is filtered with its pane shut. Either
   way the icon is on, and Keith's rule is about the icon being on. */
.pane-switch:checked + .tb-face,
.tb-toggle.is-on .tb-face {
  background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent);
}
.tb-toggle:hover .pane-switch:checked + .tb-face,
.tb-toggle.is-on:hover .tb-face {
  background: var(--accent-fill-hover); border-color: var(--accent-fill-hover); color: var(--on-accent);
}
.pane-switch:focus-visible + .tb-face { outline: 2px solid var(--accent); outline-offset: 2px; }
.tb-ico { width: 20px; height: 20px; flex: 0 0 auto; }
.tb-face .filter-n { flex: 0 0 auto; }
/* …AND THE COUNT ON A FILLED FACE INVERTS. The badge is accent-fill on
   on-accent ink, which was legible on the pale face it used to sit on and is
   blue on blue now that an on icon is filled. So on a filled face it becomes
   the on-accent paper with accent ink — the same two tokens, swapped, so the
   number is still readable and no third colour is introduced. */
.pane-switch:checked + .tb-face .filter-n,
.tb-toggle.is-on .tb-face .filter-n {
  background: var(--on-accent); color: var(--accent);
}

/* THE EXPORT IS THE ICON (item 6) — a box with an arrow leaving it, in SGE's
   own accent blue and not the teal of the reference image. On this screen the
   "More" menu held exactly one item, so the menu is gone and this IS that item.
   Who may press it is unchanged: canExport decides whether it is drawn at all. */
.tb-icon {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--tap); height: var(--tap); padding: 0 0.45rem;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--panel); text-decoration: none;
}
.tb-icon:hover { background: var(--panel-2); border-color: var(--faint); text-decoration: none; }
.tb-export { color: var(--accent); }
.tb-export:hover { color: var(--accent-deep); }
/* How many rows are ticked, said in words beside the actions (item 13). */
.tb-count {
  flex: 0 0 auto; white-space: nowrap;
  font-size: var(--fs-caption); font-weight: 600; color: var(--accent);
}

/* ---- THE TWO PANES (items 7, 8, 9, 10) ----------------------------------
   Shut by default; each opened by its own switch, so opening one never shuts
   the other.

   THE SWITCH IS THE ONLY THING THAT OPENS A PANE — Keith, 29 August 2026: "The
   filiter box cannot be closed after it is opened."

   It could not, and this rule is why. `.acct-pane-left:target` used to open the
   left pane as well, so that the column menu's "Filter…" could reach it through
   a #filters fragment. But `:target` is STICKY: once the address carries
   #filters the pane is held open by the URL, and neither the × in its head nor
   the funnel in the toolbar — both of which only untick the checkbox — can shut
   it again. One press of Filter… and the pane was there for good.

   So the fragment is gone and the column menu's Filter… is a <label> pointing
   at this same switch (src/lists.js colMenuHtml). It opens the pane with no
   script, exactly as the fragment did, and the switch stays the single piece of
   state — which means the × closes it, and the funnel toggles it. */
.acct-pane {
  display: none;
  flex: 0 0 15.5rem; width: 15.5rem; min-width: 0;
  flex-direction: column; min-height: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  overflow: hidden;
}
/* EVERY PANE IS IN THE RIGHT-HAND SLOT, INCLUDING THE FILTERS — Keith,
   13 September 2026: "it was suppose to on the right side. not the quick view
   panel".

   The filters used to stand in a slot of their own on the LEFT, and earlier that
   same evening they were moved off the pane mechanism altogether onto a dropdown
   card with the word "Filters" on it. Both are undone here. Filters, Columns and
   Export are one icon each on the right of the toolbar, and each opens a pane in
   the ONE right-hand slot — which is not, and has never been, the quick view
   panel. Keith's own words for this slot on 30 August 2026: "the right panel like
   the "Column" in accounts? not the quick view panel right … okie go with this.
   Same for all exports."

   ONE SLOT MEANS ONE PANE AT A TIME. Two panes side by side would take the width
   off the table twice and would not be the slot he pointed at, so each rule names
   the pane it shows and hides every other occupant of the slot. Each keeps its own
   switch, so each still toggles and each still closes by its own ×;
   public/list-filters.js unticks the others when one is ticked, so the toolbar
   always says what is actually in the slot. These rules are the answer with that
   file absent: whichever is written last holds the slot rather than two at once.

   `.list-panes` IS THE SAME SLOT ON A SCREEN THAT IS NOT BUILT ON `.acct-shell` —
   Account Health, Quote requests, Events and the campaign master list (src/lists.js
   listPanesHtml). Keith: "i don't want to see any page missing this out."

   EXPORT WAS THE ONE THAT MISSED IT, and until 18 September 2026 it had only the
   `.acct-shell` half. So on the two Account Health screens — /growth/list and the
   report — the icon was in the toolbar, the pane was in the page, and NOTHING
   opened it: the switch ticked, the icon lit, and the slot stayed empty. (A
   campaign's leads list draws `.list-panes` too, but inside an `.acct-shell`, so
   the `.acct-shell` half already reached its pane.) The pane is not a second
   mechanism; it is the Columns pane's, so it takes the Columns pane's rules.

   ITS FOUR RULES ARE WRITTEN OUT ONE PER LINE rather than grouped two-and-two the
   way Filters and Columns are, and that is deliberate: test/accounts-pane-controls
   pins the `.acct-shell` export rule as an exact string, so grouping it would
   break a test to make a stylesheet tidier. Same four selectors either way. */
.acct-shell:has(#acct-pane-filters:checked) .acct-pane-filters,
.list-panes:has(#acct-pane-filters:checked) .acct-pane-filters { display: flex; }
.acct-shell:has(#acct-pane-filters:checked) .acct-pane-right:not(.acct-pane-filters),
.list-panes:has(#acct-pane-filters:checked) .acct-pane-right:not(.acct-pane-filters) { display: none; }
.acct-shell:has(#acct-pane-columns:checked) .acct-pane-columns,
.list-panes:has(#acct-pane-columns:checked) .acct-pane-columns { display: flex; }
.acct-shell:has(#acct-pane-columns:checked) .acct-pane-right:not(.acct-pane-columns),
.list-panes:has(#acct-pane-columns:checked) .acct-pane-right:not(.acct-pane-columns) { display: none; }
.acct-shell:has(#acct-pane-export:checked) .acct-pane-export { display: flex; }
.list-panes:has(#acct-pane-export:checked) .acct-pane-export { display: flex; }
.acct-shell:has(#acct-pane-export:checked) .acct-pane-right:not(.acct-pane-export) { display: none; }
.list-panes:has(#acct-pane-export:checked) .acct-pane-right:not(.acct-pane-export) { display: none; }

/* AND THE WEEKLY REVIEW PUTS A THIRD PANE IN THE SAME SLOT — Keith, about that
   screen: "Too long to scroll down.. it should be limited somehow to a more
   standard length.."

   What was five cards stacked down the page is the stuck LIST plus this: the
   week's figures, the quarter's three objectives, next week's plan and the
   coaching point, read at the two ends of the meeting and costing the page no
   height in between. The rules are the export pane's, in the same shape and for
   the same reason — one slot, one pane, each with its own switch and its own ×,
   and public/list-filters.js unticks the others so the toolbar says what is
   actually in the slot.

   IT IS WIDER THAN THE OTHER TWO, and only on this screen. A filter row and a
   column tick fit 15.5rem; four tiles, three objective lines and a coaching
   textarea do not, and a pane that makes a manager scroll sideways would be the
   same fault in a smaller box. Below the desk breakpoint every pane is already
   full width (the phone rules further down), so this changes nothing there. */
.acct-shell:has(#acct-pane-review:checked) .acct-pane-review { display: flex; }
.acct-shell:has(#acct-pane-review:checked) .acct-pane-right:not(.acct-pane-review) { display: none; }
@media (min-width: 1024px) {
  .acct-pane-review { flex: 0 0 22rem; width: 22rem; }
}

.pane-head {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-xs);
  padding: var(--sp-xs) var(--sp-sm); border-bottom: 1px solid var(--line);
}
/* SENTENCE CASE, NOT CAPITALS — Keith, 5 September 2026. A pane's own name is a
   section heading: "Filters", "Columns", "Export". The words are untouched. */
.pane-title {
  font-size: var(--t-ui-min); font-weight: 600; letter-spacing: var(--ls-caption);
  text-transform: none; color: var(--muted);
}
.pane-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.6rem; height: 1.6rem; margin: 0;
  border-radius: var(--r-sm); color: var(--t3); cursor: pointer;
  font-size: 1.1rem; line-height: 1;
}
.pane-x:hover { background: var(--panel-2); color: var(--t1); }
/* `flex-wrap: nowrap` and `align-items: stretch` are NOT decoration. The filter
   form carries `.list-filters` as well, which is a WRAPPING row aligned to its
   baseline — right where that class is used on its own, and wrong here: in a
   column that is not allowed to wrap-around, a body taller than the pane threw
   the foot into a SECOND COLUMN beside it, so "Clear all filters" and "Apply
   filters" appeared halfway down the page over the table. Seen on
   /customers?health=at_risk at 1440 on 29 August 2026. */
.acct-pane .list-filters, .acct-pane .cols-form, .acct-pane .export-form {
  display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch;
  min-height: 0; flex: 1 1 auto; margin: 0;
}
.pane-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: var(--sp-xs);
  padding: var(--sp-xs) var(--sp-sm) var(--sp-sm);
}
.pane-body .list-filter { width: 100%; }
.pane-foot {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-xs);
  padding: var(--sp-xs) var(--sp-sm);
  border-top: 1px solid var(--line); background: var(--panel-2);
}
/* A BUTTON'S WORDS STAY ON ONE ROW — Keith's standing rule on wrapping. "Reset
   to default" broke over two lines in the columns pane at 15.5rem. */
.pane-foot button, .pane-foot .cols-reset {
  width: auto; margin: 0; padding: 0.45rem 0.7rem;
  font-size: var(--fs-caption); min-height: var(--tap); white-space: nowrap;
}
.pane-sub {
  font-size: var(--t-ui-min); font-weight: 600; letter-spacing: var(--ls-caption);
  text-transform: none; color: var(--muted);
}

/* ---- THE PANE SLOT ON A SCREEN WITHOUT `.acct-shell` ---------------------
   KEITH, 13 SEPTEMBER 2026: "i don't want to see any page missing this out",
   and "it was suppose to on the right side. not the quick view panel".

   Account Health, Quote requests, Events and the campaign master list are not
   built on `.acct-shell` — they are a `.filter-bar` and a table — so they had
   nowhere to put a pane, which is the whole reason those screens grew a second
   way of doing this. `listPanesHtml` (src/lists.js) gives them the slot: the bar
   and the list in one column, the panes beside it, and the switching rules above
   name `.list-panes` alongside `.acct-shell` so one set of rules serves both.

   IT IS NOT `.acct-shell` AND MUST NOT BECOME IT. That class also asks the page
   to be exactly the window's height with the table scrolling inside its own box
   (`body:has(.acct-shell)`, further up this file) — a different change to those
   four screens, and not one that was asked for here. So this block does the one
   thing it needs to: lay the column and the pane side by side, and let the
   column be narrow enough to make room.

   The row itself is `.acct-body`, whose rules are already above; these three
   only say what a pane-bearing list column is when it is NOT inside the
   full-height shell. */
.list-panes { min-width: 0; }
.list-panes > .acct-body { align-items: flex-start; }
.list-panes .acct-main { min-width: 0; }

/* THE TWO ICONS SIT AT THE RIGHT-HAND END OF THE BAR — Keith, 13 September 2026:
   "it was suppose to on the right side", "And the Filter and Column are Icons".
   `margin-left: auto` is what pushes the group there, so the search box keeps the
   left and the icons keep the right at every width; below the phone breakpoint
   the bar already wraps and the group simply starts its own row rather than being
   pushed off the edge. */
.filter-bar-right {
  display: flex; align-items: center; gap: var(--space-xs);
  flex: 0 0 auto; margin-left: auto;
}

/* ---- THE EXPORT PANE'S OWN CONTENT (Keith, 30 August 2026) ----------------
   It says WHAT THE FILE WILL CONTAIN and it is read, not operated: a sentence,
   the count, what is filtering, the date range it covers and the columns it
   carries. Only two things in it are controls — the date range and the button —
   so everything else is set quiet and dense, in the pane's own type sizes, and
   nothing here introduces a colour, a radius or a spacing of its own. */
.export-state { margin: 0; font-size: var(--fs-caption); }
.export-picked {
  margin: 0; font-size: var(--fs-caption); font-weight: 600; color: var(--accent);
}
.export-none { margin: 0; font-size: var(--fs-caption); }
.export-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: var(--sp-xxs);
}
/* A label and its value on ONE row where the pane has room for them, wrapping
   to a second only when the value itself is long — Keith's standing rule that
   short text does not wrap. */
.export-item {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-xxs);
  font-size: var(--fs-caption); line-height: 1.35;
}
.export-item-name { color: var(--muted); }
.export-item-value { color: var(--t1); font-weight: 600; }
.export-file { font-size: var(--fs-caption); margin: 0; }

/* ---- ONE PANE, TWO REGISTERS ---------------------------------------------
   Keith, 30 August 2026: "Export in SGE opens a pane in the right-hand slot…
   Same for all exports." /leads carries the inbound-leads queue AND the
   homeowners register, and the second one used to be a plain "Export CSV"
   anchor under the table — a SECOND export mechanism on a page that is only
   allowed one. So the choice of which file moves inside the pane, and there is
   one control on the screen again.

   WHICH SUMMARY IS ON SHOW IS DECIDED HERE, off :checked, so the chooser needs
   no script: pick Homeowners and the pane stops describing the leads file and
   starts describing the homeowners one. That matters more than the convenience
   — this pane exists to say what the file will contain, and a chooser that left
   the wrong count, the wrong filters and the wrong columns standing would make
   it lie about the one thing it is for.

   `:has()` is the same selector the panes themselves open by (the .acct-shell
   rules above), so this introduces no new requirement of the browser. Four
   positions are written because the component takes a list; /leads uses two. */
.export-choice { display: flex; flex-direction: column; gap: var(--sp-xs); }
/* The radio itself is not drawn — its label is the target, and a 15.5rem pane
   has no room for a dot and a word where the word alone says it. It keeps its
   place in the layout for the keyboard, which is why it is clipped rather than
   display:none'd. */
.export-pick {
  position: absolute; width: 1px; height: 1px; margin: 0;
  padding: 0; border: 0; overflow: hidden; clip-path: inset(50%);
}
.export-picks { display: flex; flex-wrap: wrap; gap: var(--sp-xxs); }
.export-pick-label {
  flex: 1 1 auto; margin: 0; padding: 0.3rem var(--sp-xs);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--panel); color: var(--t2);
  font-size: var(--fs-caption); line-height: 1.3; text-align: center;
  white-space: nowrap; cursor: pointer;
}
.export-pick-label:hover { background: var(--panel-2); color: var(--t1); }
.export-choice:has(.export-pick-1:checked) .export-picks > .export-pick-label:nth-child(1),
.export-choice:has(.export-pick-2:checked) .export-picks > .export-pick-label:nth-child(2),
.export-choice:has(.export-pick-3:checked) .export-picks > .export-pick-label:nth-child(3),
.export-choice:has(.export-pick-4:checked) .export-picks > .export-pick-label:nth-child(4) {
  background: var(--panel-2); border-color: var(--accent);
  color: var(--t1); font-weight: 700;
}
/* THE KEYBOARD CAN SEE WHERE IT IS. The radio is clipped, so the ring has to be
   drawn on the label it operates — each one matched to its own position, never
   all four at once. */
.export-choice:has(.export-pick-1:focus-visible) .export-picks > .export-pick-label:nth-child(1),
.export-choice:has(.export-pick-2:focus-visible) .export-picks > .export-pick-label:nth-child(2),
.export-choice:has(.export-pick-3:focus-visible) .export-picks > .export-pick-label:nth-child(3),
.export-choice:has(.export-pick-4:focus-visible) .export-picks > .export-pick-label:nth-child(4) {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.export-set { display: none; flex-direction: column; gap: var(--sp-xs); }
.export-choice:has(.export-pick-1:checked) > .export-set-1,
.export-choice:has(.export-pick-2:checked) > .export-set-2,
.export-choice:has(.export-pick-3:checked) > .export-set-3,
.export-choice:has(.export-pick-4:checked) > .export-set-4 { display: flex; }
.export-note { margin: 0; font-size: var(--fs-caption); line-height: 1.35; }

/* THE VIEWS STRIP (item 8) — named views you press to apply: the built-in four,
   then the SAVED section beneath them (migration 098, src/saved-views/).

   IT IS ONE ROW UNTIL IT IS ASKED FOR, AND IT SITS UNDER THE FILTERS — Keith,
   4 September 2026: "i find this is taking up too much of the height space..
   before the actual filter list by..". It stood 235px tall at the TOP of the
   pane, before the controls the reader opened the pane for; it is a <details>
   now, shut, showing which view is on, below the filter form and above the
   pane's foot (src/lists.js listFilterFormHtml). */
.pane-views {
  flex: 0 0 auto;
  padding: var(--sp-xxs) var(--sp-sm) var(--sp-xs);
  border-top: 1px solid var(--line-soft);
}
.pane-views-sum {
  display: flex; align-items: center; gap: var(--sp-xxs);
  min-height: var(--tap); cursor: pointer; list-style: none;
}
.pane-views-sum::-webkit-details-marker { display: none; }
/* WHICH VIEW IS ON, on the shut row — the one thing the open strip said at a
   glance, kept. */
.pane-views-on {
  flex: 1 1 auto; min-width: 0;
  font-size: var(--fs-caption); font-weight: 600; color: var(--t1);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pane-views-sum .filter-caret { margin-left: auto; }
.pane-views-on + .filter-caret { margin-left: 0; }
.pane-views[open] .pane-views-sum .filter-caret { transform: rotate(180deg); }
.pane-views-list { display: flex; flex-direction: column; gap: 0; }
.pane-views .pane-sub { flex: 0 0 auto; }
.view-row {
  display: block; padding: 0.3rem var(--sp-xxs);
  border-radius: var(--r-sm);
  font-size: var(--fs-caption); color: var(--accent); text-decoration: none;
}
.view-row:hover { background: var(--panel-2); text-decoration: none; }
.view-row.active { color: var(--t1); font-weight: 700; }

/* ---- SAVED VIEWS (migration 098) ----------------------------------------
   KEITH, 29 August 2026: "Yes a Saved View will be good. This should be doable
   by the user and admin can set a global saved view and assigned to role or
   user".

   THE SAME ROW AS A BUILT-IN VIEW, because it is the same kind of thing — a
   named filter set you press. What is added is only what has to be: a mark on
   the ones an admin assigned, and the two controls on the ones that are the
   reader's own. NOTHING NEW IS INVENTED: every colour, space, radius and size
   below is a token this file already declares. */
.pane-saved {
  display: flex; flex-direction: column; gap: 0;
  margin-top: var(--sp-xs);
  padding-top: var(--sp-xs);
  border-top: 1px solid var(--line-soft);
}
.pane-saved .pane-sub { margin-bottom: var(--sp-xxs); }
/* The row is the link plus whatever sits at its end; the link takes the room. */
.sv-row { display: flex; align-items: center; gap: var(--sp-xxs); }
.sv-row > .view-row { flex: 1 1 auto; min-width: 0; }
/* `.sv-empty` had a rule here. The sentence it styled — "Nothing saved yet.
   Filter the list, then save it under a name." — came off on 4 September 2026
   (src/saved-views/render.js), so nothing draws it and nothing styles it. */
.sv-error {
  margin: 0 0 var(--sp-xxs); padding: var(--sp-xxs);
  font-size: var(--fs-caption); line-height: 1.4;
  color: var(--danger);
  background: var(--panel-2); border-radius: var(--r-sm);
}
/* WHOSE VIEW THIS IS, SAID ONCE. An admin's assigned view carries this and no
   delete; the reader's own carries the controls and no mark, because nobody
   else can see it (src/saved-views/repo.js forViewer). */
.sv-tag {
  flex: 0 0 auto;
  font-size: var(--fs-caption); letter-spacing: var(--ls-caption);
  color: var(--t3); white-space: nowrap;
}

/* RENAME AND DELETE, BEHIND ONE DISCLOSURE so the strip stays a strip. A native
   <details>: it opens on click, on Enter and on Space with no script and no
   inline handler, which the app's CSP forbids — the same construction the
   filters panel and the column chooser use. */
.sv-edit { position: relative; flex: 0 0 auto; }
.sv-edit-toggle {
  list-style: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  border-radius: var(--r-sm);
  font-size: var(--fs-caption); line-height: 1; color: var(--t3);
  cursor: pointer;
}
.sv-edit-toggle::-webkit-details-marker { display: none; }
.sv-edit-toggle:hover { background: var(--panel-2); color: var(--t1); }
.sv-edit[open] > .sv-edit-toggle { background: var(--panel-2); color: var(--t1); }
.sv-edit-card {
  position: absolute; top: 100%; right: 0; z-index: 30;
  display: flex; flex-direction: column; gap: var(--sp-xs);
  min-width: 13rem; margin-top: var(--sp-xxs); padding: var(--sp-sm);
  background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  box-shadow: 0 6px 20px rgba(15, 18, 22, 0.14);
}

/* SAVING THE VIEW ON SCREEN. One disclosure at the foot of the section — it is
   an action, not a view, so it is not a row in the strip. */
.sv-save { margin-top: var(--sp-xxs); }
.sv-save-toggle {
  list-style: none;
  display: block; padding: 0.3rem var(--sp-xxs);
  border-radius: var(--r-sm);
  font-size: var(--fs-caption); font-weight: 600; color: var(--accent);
  cursor: pointer;
}
.sv-save-toggle::-webkit-details-marker { display: none; }
.sv-save-toggle:hover { background: var(--panel-2); }
.sv-save-card {
  display: flex; flex-direction: column; gap: var(--sp-xs);
  margin-top: var(--sp-xxs); padding: var(--sp-sm);
  background: var(--panel-2);
  border: 1px solid var(--line); border-radius: var(--r-sm);
}
.sv-form { display: flex; flex-direction: column; gap: var(--sp-xxs); margin: 0; }
.sv-name-label, .sv-sub-label {
  margin: 0;
  font-size: var(--fs-caption); font-weight: 600; color: var(--t2);
}
/* The 44px floor holds on a field as much as on a button (catalogue 16.6). */
.sv-name, .sv-select {
  width: 100%; min-height: var(--tap); margin: 0; padding: 0.35rem 0.5rem;
  font-family: var(--font); font-size: var(--t-ui-min); color: var(--t1);
  background: var(--panel);
  border: 1px solid var(--field-line); border-radius: var(--r-sm);
}
.sv-btn {
  width: auto; min-height: var(--tap); margin: 0; padding: 0.45rem 0.7rem;
  font-family: var(--font); font-size: var(--fs-caption); font-weight: 600;
  color: var(--ink-2); background: transparent;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  cursor: pointer; white-space: nowrap;
}
.sv-btn:hover { background: var(--paper-2); border-color: var(--faint); color: var(--ink); }
.sv-btn-go { color: var(--on-accent); background: var(--accent-fill); border-color: var(--accent-fill); }
.sv-btn-go:hover { background: var(--accent-fill-hover); border-color: var(--accent-fill-hover); color: var(--on-accent); }
.sv-btn-danger { color: var(--danger); }

/* "WHO GETS IT" — the admin's half of Keith's sentence, and drawn only for the
   people who may answer it (src/saved-views/routes.js decides; the form simply
   is not rendered for anybody else). */
.sv-who {
  display: flex; flex-direction: column; gap: var(--sp-xxs);
  margin: 0; padding: var(--sp-xs);
  border: 1px solid var(--line); border-radius: var(--r-sm);
}
.sv-who-legend {
  padding: 0 var(--sp-xxs);
  font-size: var(--fs-caption); font-weight: 600; letter-spacing: var(--ls-caption);
  color: var(--muted);
}
.sv-who-row {
  display: flex; align-items: center; gap: var(--sp-xxs);
  min-height: var(--tap); margin: 0;
  font-size: var(--t-ui-min); color: var(--t1);
}
.sv-who-row input { width: auto; min-height: 0; margin: 0; }

/* ---- THE LIST IN ITS OWN BOX (item 17) ---------------------------------- */
.acct-scroll {
  flex: 1 1 auto; min-height: 0;
  overflow: auto;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--panel);
  /* AND IT IS THE THING THE TABLE INSIDE IT ANSWERS TO. 16.4 tier 2, which
     `.approvals-scroll` already builds on: "a split pane at 1440px is a compact
     container" — and so is this box on a laptop with the rail open, which is
     1159px of a 1440px window. Every width question a list asks is about THIS
     box and never about the window, so the box is named as a container and the
     rules that answer it are container queries (the block under the Account
     column below). No new breakpoint number is invented and nothing about the
     box's own appearance changes. */
  container-type: inline-size; container-name: list;
  /* The scroll-end room this box reserved for Ask Kate's bubble came off with
     the bubble — 17 September 2026. The last row is read by scrolling to it,
     because nothing floats over the foot of the box any more. */
}
/* A STICKY OFFSET BELONGS TO WHOEVER SCROLLS. Inside a scrollport `top: 56px`
   means 56px INSIDE the box, which draws the heading between the rows — the
   fault this file already documents for the iPad band and the preview panel.
   Here the box scrolls, so the offset is zero and the heading pins to its top. */
.acct-scroll thead th { top: 0; }
/* THE COUNT LINE RESERVES A FIXED BOX, AND THAT IS WHY THE PANES LINE UP.
   KEITH, 4 September 2026: "The top of the column panel is not align with the
   main list pane."
   Measured on /activities at 1440 with `node scripts/w1652-pane-align.mjs`
   before the change: the panes and the main column all began at y=125, but the
   TABLE — the box a reader sees as the list — began at y=148, because the count
   line stands above it inside the main column and outside any box. So the
   columns pane's top edge sat 23px above the table's.
   The line is given a stated height here, and the panes take exactly that much
   off their own top (below), so the two are one number rather than two that
   happen to agree. */
:root { --list-count-h: 23px; }
/* NOT `display: flex`. The line is a SENTENCE with <strong> inside it ("All
   264 activities"), and a flex container makes every one of those a flex item
   and eats the spaces between them — "All8leads". It stays an ordinary
   paragraph; the height is stated on the box instead.

   AND THE STATED HEIGHT IS A FLOOR, NOT A CEILING — 26 September 2026. It was
   `height`, which is a ceiling, and the line overflowed it in silence: the box
   stayed 23px, `overflow` stayed `visible`, and the second line painted on top
   of whatever stood underneath. w3332 caught it on the drilled Account Health
   list, /growth/list?drill=untouched, where the count line carries the sort
   sentence as its tail and so wraps at EVERY width — measured at 1440px wide it
   was 46px of text in a 23px box, and the overflow landed 15px into
   `p.growth-drill-note` below it (command:
   `node scripts/drill-count-overflow-2026-09-26.mjs --stamp before`; the 15px
   is that run's `countLine.rect.top` 255 plus its `scrollHeight` 46 against its
   `note.rect.top` 286 — NOT its `overlapPx` field, which compared the line's
   BOX to the note and so read -8, the box never being the thing that
   overflowed. docs/2026-09-26-drill-count-overflow/README.md carries the table
   at all five widths).
   The line is allowed to take the height it needs instead. It is NOT clipped
   and the type is NOT shrunk — 13px is SGE's data floor (`--t-cell-min`) and
   this line sits on it. `min-height` holds the one-line height at exactly
   `--list-count-h`, so on every list where the line fits — which is every
   `.acct-shell` list, whose count line carries no tail — the panes and the
   table sit precisely where they did and the alignment this token was bought
   for is untouched.
   public/approvals.css:59 already carried this same two-line rule as a
   per-screen override, for the same symptom on the same element; the fault was
   in the shared rule all along, so it is answered here. That override is now
   saying what this rule says and is left where it is. */
.acct-main .list-count {
  flex: 0 0 auto; height: auto; min-height: var(--list-count-h); margin: 0;
  line-height: var(--list-count-h);
}
/* …AND THE PANES START WHERE THE TABLE STARTS. Only on a screen that HAS a
   count line: the calendar has none, and its pane must stay level with the grid
   as it always has. */
.acct-body:has(.list-count) .acct-pane { margin-top: var(--list-count-h); }
/* "· Filtered" — Keith, 30 August 2026: "if it's been filtered. Add ther word
   Filtered." It is the one word on the line that is a STATE and not a count, so
   it takes the label weight the rest of the shell gives a state, and it is drawn
   only when the list is actually narrowed (src/lists.js: countLineHtml). */
.list-filtered { font-weight: 600; color: var(--t2); }
.acct-main .list-loaded { flex: 0 0 auto; margin: var(--sp-xxs) 0 0; }
/* A chip row under the count line (RFQ Requests' Project stage) is its own line,
   not pressed against the count above it. */
.acct-main .list-results > .chips { flex: 0 0 auto; margin: var(--sp-xs) 0; }
/* A NOTE UNDER THE TABLE THAT IS ABOUT A COLUMN, not about the rows — used by
   /projects for the Quoted value column, which says in words that SGE cannot see
   the Dynamics CRM quotations behind it. Same footing as the loaded line: it
   takes no height from the scrolling box above it. */
.acct-main .list-note { flex: 0 0 auto; margin: var(--sp-xxs) 0 0; font-size: var(--t-cell-min); }

/* ---- NOTHING STANDS IN A CORNER OF THE PAGE ANY MORE ----------------------
   17 September 2026. Two blocks lived here — one reserving width beside the
   pager, the column footnotes and a page-level `.card-actions` above 768px,
   one reserving height under the same three below it — and both existed for a
   single reason: Ask Kate's bubble was `position: fixed` in the lower right of
   every page, so on the screens that scroll inside a box rather than scrolling
   the document, a band at the foot of the page sat under it permanently.

   KEITH MOVED HER INTO THE APP BAR — "tonight's decision" — and the bubble is
   removed, so the corner is empty and the reserves come off with it. Every one
   of those bands goes back to the full width it is entitled to, and
   /challenges' "Set up a Sales Challenge" sits in the bottom-right corner
   Keith's own rule puts it in, with nothing over it. */

/* ---- THE SECOND REGISTER AT THE FOOT OF /leads ---------------------------
   The homeowners list was consolidated onto the Inbound leads page on 9 August
   2026 ("the director wants one place") and it is still there. It cannot be a
   second full section under the shell: this page does not scroll, so a second
   section would either take the window back off the leads queue or push the page
   into scrolling — and the queue is what the screen is for.

   So it is a disclosure INSIDE the shell, under the leads box. Shut it is one
   line saying what is in it and costs nothing; open it is its own scrolling box,
   capped so the queue above it never disappears. `flex: 0 0 auto` is what keeps
   it out of the leads box's height while it is shut. */
.lead-homeowners { flex: 0 0 auto; margin-top: var(--sp-xs); min-height: 0; }
.lead-homeowners-head {
  cursor: pointer; list-style: none;
  display: flex; align-items: baseline; gap: var(--sp-xs);
  padding: var(--sp-xxs) 0; min-height: var(--tap);
  font-weight: 600; color: var(--t1);
  border-top: 1px solid var(--line);
}
.lead-homeowners-head::-webkit-details-marker { display: none; }
.lead-homeowners-head::before {
  content: '▸'; color: var(--t3); font-size: 0.8em; line-height: 1;
}
.lead-homeowners[open] > .lead-homeowners-head::before { content: '▾'; }
.lead-homeowners-body { max-height: 40vh; overflow: auto; }
/* ROW 85 OF THE 5 SEPTEMBER REVIEW IS NOT CLOSED, AND THE 40vh ABOVE IS WHY IT
   IS STILL 40vh. The report: at 1024x768 this box measured 307px holding 462px,
   a stump with a third of the register cut off inside it. 40vh is a fraction of
   the WINDOW, which knows nothing about what this page has already spent on its
   toolbar, its panes and the leads queue above, so on the shorter screen it was
   shortest exactly where it was already short — the reading is right.

   TWO FIXES WERE BUILT AND BOTH MEASURED WORSE, so neither is here.
     `flex: 1 1 auto` on the open disclosure — each box then asks for its own
     CONTENT height, the two together exceed the column, and THE PAGE ITSELF
     started scrolling: 93px past the foot at 1512x950, 317px at 390x844.
     `flex: 1 1 0` on both boxes, so they divide what the column has — the
     disclosure was squashed to a 27px box holding 506px of content, which spilled
     out of `div.acct-main` (623px box, 1102px of content, overflow visible) and
     the page scrolled again: 340px past the foot at 1512x950.
   (commands: node scripts/w1766-probe2.mjs, node scripts/w1766-homeowners-chain.mjs)

   WHAT IT ACTUALLY WANTS. `div.acct-main` is not a bounded column — it is
   `flex: 1 1 auto` with `overflow-y: visible` all the way up to `main.frame`, so
   nothing in the chain ever tells the two lists how much height there is to
   divide. Making it one is a change to the leads shell at three widths and
   affects every list built on `.acct-shell`, not this disclosure. The bounded
   box above is left exactly as it was: the page does not scroll, the whole
   register is reachable inside the box, and that is Keith's own rule ("Keep it
   within the windows... scroll within the box"). It reads short, which is the
   complaint, and closing it honestly is a shell pass. */
/* A STICKY OFFSET BELONGS TO WHOEVER SCROLLS. Inside this box `top: 56px` would
   draw the headings between the rows — the same fault the leads box above states
   for itself. Here the box scrolls, so the offset is zero. */
.lead-homeowners-body thead th { top: 0; }
.lead-homeowners-body > .scard { margin: 0; border: 0; padding: 0; }

/* "Never" IS THE ANSWER, NOT A BLANK — the Responded column on /leads, where a
   lead nobody has rung is the one this queue exists to act on. It takes the
   danger ink because that is what it is; `.status-word` above has already taken
   the capsule off. */
.status-word.lead-never { color: var(--danger); }

/* ---- DENSE (item 16) -----------------------------------------------------
   Keith: "And i think the list should be pack like this", holding up a Business
   Central list. The type does NOT shrink — 13px is this file's absolute floor
   and space is bought by removing padding, not by removing legibility — so what
   comes out is the vertical padding, which is where the height was going. */
.acct-table th, .acct-table td { padding: var(--sp-xxs) var(--sp-xs); vertical-align: middle; }
.acct-table td { line-height: 1.35; }
.acct-table > thead th { padding-top: 0.4rem; padding-bottom: 0.4rem; }
.acct-table > tbody > tr > td:first-child { padding-left: var(--sp-xs); }

/* THE ACCOUNT COLUMN ON /customers, WIDE ENOUGH FOR AN ORDINARY NAME.
   KEITH, 29 August 2026: "Idealy when the text is not long, it should show itin
   one row not text wrap."

   The table lays itself out from its content, and with six other columns asking
   for room the Account column settled at 233px at 1024px wide — enough for about
   twenty-six characters, so "Meridian Interiors (Penang) Sdn Bhd" and "Northgate
   Main Contractors Sdn Bhd" each took two lines while Type sat at 87px with a
   single short word in it (`node scripts/w1745-shots.mjs`, before-measures.json).

   16rem ≈ 256px is the floor: the width the longest ordinary account name in the
   book needs on one line. It is a MINIMUM and not a fixed width — the browser
   still gives the column more where there is room, and a genuinely long name
   still wraps rather than pushing the table past its frame.

   IT ONLY APPLIES FROM 1024px UP, and that boundary is a measurement rather than
   a guess. A table is never made to scroll sideways (B5's rule, and Keith's own),
   and in a 900px-wide desk window this table already fits its frame exactly at
   836px: forcing 74px more into one column pushed it to 872px and gave it a
   sideways scrollbar — trading a wrap for the worse fault. At 1024px there is
   room and the table still fits, so the floor is held there and above and the
   narrow desk window keeps the layout it already had.
   Measured both ways by `node scripts/w1745-column-fit-probe.mjs`, which serves
   the stylesheet twice — once with this declaration and once with it set to 0 —
   and counts the wrapped cells in every column. */
@media (min-width: 1024px) {
  .acct-table th.acct-name-col, .acct-table td.acct-name-col { min-width: 16rem; }
}

/* THE MONEY COLUMN ON /approvals, WIDE ENOUGH FOR THE NAME IT NOW CARRIES.
   KEITH, 17 September 2026: "Approve rename to "Lifetime Realised Revenue"",
   asked about this very heading and told the column would have to be widened or
   allowed a second line.

   IT IS WIDENED. Keith's own earlier rule is that a heading with room does not
   wrap ("when the text is not long, it should show itin one row not text wrap")
   and that a table is never made to scroll sideways instead, so the first line
   is bought with width where the box has it. The floor is the same SHAPE as the
   Account column's above: a MINIMUM and not a fixed width, so the browser still
   gives the column more where there is room and still folds the words where
   there is none.

   14rem ≈ 224px is the measurement and not a guess: the heading settles at
   221.6px when the table has room to lay it out for itself
   (`node scripts/approvals-lifetime-heading-shots.mjs`, measures.json), so the
   floor holds exactly the width the content already asks for.

   AND IT ONLY FIRES WHERE THE BOX CAN AFFORD IT. The list's own container is
   what decides — not the window, because the rail takes a different amount of
   it at every width. Below that the floor drops to the smaller one below and the
   heading takes a second line, which is the trade Keith named himself.
   `.acct-billed-col` is written by src/visit-plan/render.js onto the heading and
   the cell together.

   THE SECOND LINE, WHEN IT COMES, IS THE LAST ONE. In a narrow box the heading
   folds — but three lines of two words is not reading, it is a stack. 9.5rem is
   the width "Realised Revenue" holds on one line at this type size (it is the
   width `.apr-billed` held for the whole heading before the rename), so the
   break falls after "Lifetime" and the settled phrase stays together. The two
   floors are written in this order because they carry the same weight: the
   narrow one first, the roomy one after it, so the container query wins where
   it applies. */
.acct-table th.acct-billed-col { min-width: 9.5rem; }
@container list (min-width: 1200px) {
  .acct-table th.acct-billed-col { min-width: 14rem; }
}

/* TWO MONEY HEADINGS ON /projects KEEP KEITH'S WORDS AND ARE GIVEN THE ROOM —
   25 September 2026, 21:28, settled line by line.

   WHAT WAS WRONG, measured rather than eyeballed
   (docs/2026-09-25-sge-heading-wrap-evidence.html row C22, re-measured by
   `node docs/2026-09-25-sge-headings-fix/01-probe.js`): "Open, not approved"
   needs 120.9px on one line and held 81.0px at desktop, 63.2px at iPad
   portrait, 77.2px at iPad landscape and 57.6px at both phone views — two lines
   at the first three and THREE at the phones. "Confirmed, not invoiced" needs
   146.2px and held 85.0–107.6px — two lines at all five.

   THE HEADINGS DO NOT CHANGE. Keith's standing rule of 19 August is that a
   heading with no room is shortened; on 25 September he took these two the
   other way and said to keep the words and widen the columns. His later word
   governs, and it is recorded here so the older rule is not read as a
   contradiction by whoever comes next.

   `nowrap` AND NOT A STATED WIDTH. A number here would be a guess rounded up,
   and rounding up is paid for by the column beside it: 8.75rem and 10.5rem —
   the two round figures that cover the measurement — reserve 23px more than the
   words need in the narrow box, where `.acct-table` halves its own gutters to
   4px a side (the block below). `nowrap` asks the heading what it actually
   measures and the auto table gives the column exactly that and no more, at
   every band, and it keeps measuring if the type scale ever moves. It overrides
   the `white-space: normal` release below on these two headings only — that
   release exists so a heading MAY fold when its column cannot afford the first
   line, and Keith has said these two may not.

   AND IT HOLDS IN A NARROW BOX, which is the one way it differs from its
   neighbours above, whose floors come off below 1000px. Keith asked for one
   line at ALL FIVE of his standing views, phones included.

   WHAT IT COSTS, measured at each of the five
   (`node docs/2026-09-25-sge-headings-fix/04-tdcost.js`): at both phone views
   nothing at all — the table is already wider than `.acct-scroll` and the other
   columns do not move, so only the sideways scroll that box is built for gets
   longer. At desktop and iPad landscape the room comes out of the Project and
   Account columns, which are addresses and company names and already fold; the
   box does not overflow at either. At iPad portrait the box is 919px for ten
   columns and there is no slack to find: the list gains a short sideways scroll
   and the address column folds further. That is the one view where this trade is
   visible, and it is reported rather than hidden.

   CENTS ARE COMING AND THIS SURVIVES THEM. `proj-open-col` carries a COUNT of
   open quotations and no money at all, so cents never reach it. `proj-notinv-col`
   carries money and the heading is the wider of the two by a long way: the
   heading needs 146.2px, where "RM 999,999.00" measures 91.3px and
   "RM 999,999,999.00" measures 117.8px in the cell's own font
   (`node docs/2026-09-25-sge-headings-fix/03-cost.js`). Two decimals cost about
   16px and the heading still decides the column. The one figure that would
   outgrow it is a two-currency cell (210.8px), which this column cannot hold —
   it draws one confirmed order's own amount. */
.acct-table th.proj-open-col, .acct-table th.proj-notinv-col { white-space: nowrap; }
/* AND THE THIRD MONEY HEADING, 21 October 2026, Keith: "the layout with separate
   cards" — the Projects list's heading row read ragged because "Realised
   Revenue" folded onto two lines (right-aligned) while "Confirmed, not invoiced"
   and "Recorded" beside it held one. It was the only heading of the row left
   to the release below; it takes the same nowrap as its neighbour and the
   words are unchanged. */
.acct-table th.proj-realised-col { white-space: nowrap; }

/* ---- AND WHERE THE BOX IS TIGHT, THE TABLE FOLDS RATHER THAN GROWS -------
   w1886, 8 September 2026. A list table is `width: 100%` inside `.acct-scroll`,
   so it can never leave a gap — but `table-layout: auto` still cannot draw it
   narrower than its own minimum, and where that minimum is bigger than the box
   the table runs off the side and the reader drags it sideways. Measured with
   `node scripts/w1886-list-fit-probe.mjs before` (fit-before.json): /leads at
   1440 needed 1356px of a 1335px box, and at 1024 with the rail open five more
   lists were over their box as well.

   WHAT MAKES THE MINIMUM, AND IT IS NOT THE DATA. Three things, and every one of
   them is a floor this stylesheet asked for at a WIDTH rather than in a BOX:
   the column headings are `white-space: nowrap` (public/style.css `th`), so
   "Connected account" claimed 187px on /leads whatever the box had to give; the
   Account column carries a 16rem floor from 1024px of WINDOW up, which on an
   iPad with the rail open is a floor of 256px inside a 743px box; and the
   response clock and the review detail cell each hold a floor of their own.

   SO THE FLOORS ARE KEPT WHERE THERE IS ROOM AND GIVEN UP WHERE THERE IS NOT,
   and the box is what decides. NOTHING IS DROPPED AND NOTHING SHRINKS: the type
   does not move off its floor, no column is taken off any width, and every one
   of these rules is SELF-LIMITING — `white-space: normal` lets a heading wrap,
   it does not make it wrap, so a column with room keeps its heading on one line
   exactly as Keith's rule asks ("when the text is not long, it should show itin
   one row not text wrap"). What changes is only what happens when the room runs
   out: the words fold inside the column instead of the table leaving the box. */
@container list (max-width: 1400px) {
  /* A HEADING MAY TAKE A SECOND LINE WHEN ITS COLUMN CANNOT AFFORD THE FIRST.
     This is the same choice `.approvals-table th` already makes on the eleven-
     column approval queue, for the same reason and in the same words: "the
     headings wrap; the CELLS stay nowrap". A cell's own nowrap — a reference, a
     date, a figure (`td.oneline`, `th.num`, `td.num`) — is untouched here, so
     "KMMY-LD-26007" and "16-06-2026" still read as one token.

     `.acct-table` AND NOT `.acct-scroll th`, because the box is shared. The
     planner's day list and its week grid are drawn inside this same scroller
     (src/planner/render.js reads listScrollHtml for both) and the week grid's
     headings are declared nowrap for reasons of their own. Every LIST table in
     SGE carries `acct-table` and neither planner table does, so naming it is
     what keeps this pass inside the lists it was asked about. */
  .acct-table th { white-space: normal; }
}

/* AND IN A GENUINELY NARROW BOX — an iPad, or a desk window dragged in — the
   three stated floors come off as well. 1000px is the box a 1024px tablet gives
   a list once the rail and the shell are paid for (919px measured), so this is
   the tablet's own state and not a fourth breakpoint. */
@container list (max-width: 1000px) {
  /* The Account column's 16rem. Its own note above says the floor was held at
     1024px "because at 1024px there is room and the table still fits" — that
     was measured against the WINDOW, and with the rail open the same window
     leaves 743px, where it does not fit. The floor is a minimum and not a
     width, so giving it up costs a long name a second line and nothing else. */
  .acct-table th.acct-name-col, .acct-table td.acct-name-col { min-width: 0; }
  /* The response clock's 11rem, which is 176px of /leads' twelve columns. */
  .acct-table th.lead-clock, .acct-table td.lead-clock { min-width: 0; }
  /* The review queue's account-and-contact cell, which is nowrap from 768px of
     WINDOW up and cost that table 374px of a 919px box. Its note says nowrap is
     there because the detail cell asks for `width: 100%` and an auto table then
     squeezes the labels to their longest word "on a screen 1440px wide with
     space to spare" — which is a statement about a box with room in it. Here
     there is none, so the name and the label wrap and the queue fits. */
  .acct-table.review-stuck td.list-signal,
  .acct-table.review-stuck td[data-card-lead] { white-space: normal; }
  /* AND THE GUTTERS COME IN — the last of it, and the one place this block
     buys room rather than giving up a floor. 16.5's rule is that space is
     bought by removing chrome and never by shrinking type, and this is the
     same sum `.approvals-table` did for its eleven columns: /leads is twelve
     columns, and at 8px each side that is 192px of a 919px box spent on air.
     At 4px — the token below it, not a new number — half of it comes back and
     the 14px floor does not move. It fires only in this narrow box, so a
     laptop and a desk keep the gutters they have. */
  .acct-table th, .acct-table td { padding-left: var(--sp-xxs); padding-right: var(--sp-xxs); }
  .acct-table > tbody > tr > td:first-child { padding-left: var(--sp-xxs); }

  /* AND ONE COLUMN GOES, ON THE ONE LIST WHERE EVERYTHING ABOVE WAS NOT ENOUGH.
     /leads is twelve columns — the widest list in SGE by four — and in a 919px
     box it still measured 921.5px with every floor given up and the gutters
     halved (`node scripts/w1886-leads-th-probe.mjs`): the Reference token at
     113px, "SALESPERSON" at 101px and ten more, none of which can be folded any
     further without breaking a word or a reference in half. Twelve columns do
     not fit a tablet, and 16.4 tier 1's answer to that is the column is
     DROPPED, not squeezed to unreadable — which is what `.approvals-table`
     already does with its own priority tail below 1280.

     WHICH COLUMN IS DECIDED IN src/app.js, BESIDE THE COLUMN, and it is Created
     — the one fact on the row that another column already carries, because
     Response due is computed from it. This rule knows only that a column asked
     to go; no list has a column named in this stylesheet.

     IT IS THIS BOX ONLY. At a laptop, at a desk, and at any box over 1000px the
     class does nothing and every column is on the screen. And on a phone the
     card rules below outweigh this one deliberately: a card gives every field a
     line of its own, so there is no room to buy and nothing to drop. */
  .acct-table th.list-narrow-drop,
  .acct-table td.list-narrow-drop { display: none; }
}

/* THE PROJECT ADDRESS COLUMN GETS A WIDTH OF ITS OWN, AT EVERY WIDTH.
   KEITH, 25 September 2026, 22:21, VERBATIM: "give the Project address column
   its own width".

   WHAT IT CARRIES. A project in SGE is not named by hand — Keith took the
   "Project name" field off the New project form on 17 September — so the first
   column of /projects holds the site address, and the longest of them in the
   book is "Lot4.14.00, Pavilion Damansara Heights Corporate Tower 2, 3 Jalan
   Damanlela, Pusat Bandar Damansara, 50490 Kuala Lumpur", which wants 822.7px
   on one line.

   WHAT WAS WRONG, measured rather than eyeballed
   (`node docs/2026-09-25-sge-projects-address-col/02-probe.js`,
   probe-before.json). This column is the only one on the list with no floor of
   its own: the four money and count columns are nowrap, Recorded and the
   reference are one-line tokens, and the auto table hands the address whatever
   the other nine leave over. In a narrow box that is 92.7px — at iPad portrait
   (919px box) and at phone landscape (795px box), the same figure at both —
   and 92.7px folded all fifty addresses, put the worst of them on FOURTEEN
   lines, and made the table 8628px tall. An address read down a 92.7px ribbon
   is not an address; a reader cannot tell one job from the next without
   counting lines.

   IT IS NOT THE COLUMNS BESIDE IT THAT GIVE. Keith settled "Open, not
   approved" and "Confirmed, not invoiced" at 21:28 the same evening by KEEPING
   HIS WORDS and widening those columns (e974fc35, the block above). Taking the
   room back off them would undo that, so the room is not taken: the table grows
   and `.acct-scroll` — a box that is a scrollport already, and which was
   scrolling 126px at phone landscape before this rule existed — carries it.

   16rem ≈ 256px, AND THE NUMBER IS MEASURED
   (`node docs/2026-09-25-sge-projects-address-col/03-candidates.js`,
   candidates.json — every floor from 12rem to 24rem laid out and counted at the
   three narrow views). At iPad portrait the worst cell and the column's total
   lines run 14/454 at no floor, 5/187 at 12rem, 5/161 at 14rem, 4/145 at 16rem,
   4/127 at 18rem, 3/117 at 20rem, 3/100 at 24rem, while the sideways scroll in
   the box runs 2, 102, 134, 166, 198, 230 and 294px. 16rem is where the reading
   stops improving faster than the drag gets worse: it costs 164px more sideways
   and takes 5141px OFF the table's height (8628 → 3487), which is the scroll a
   reader actually pays. It is also not a new number in this stylesheet — it is
   the same 16rem `.acct-name-col` already holds for an account name, the width
   the longest ordinary name in the book needs.

   A MINIMUM AND NOT A WIDTH, so an address too long for 256px still WRAPS
   inside the column — three or four lines of ordinary address rather than
   fourteen — and is never clipped, never truncated and never given an ellipsis.
   Nothing is hidden: every word of every address is on the screen.

   1260px AND NOT 1000px, AND THE BOUNDARY IS MEASURED TOO
   (`node docs/2026-09-25-sge-address-column/gap.js`, the window walked in ten
   steps from 1024 to 1440). Scoped to a 1000px box this floor stops the moment
   the box passes 1000px — and Keith's five standing views jump straight from a
   919px box at iPad portrait to a 1261px box at iPad landscape, so they never
   land in the band between and a rule that fails there passes every screenshot.
   Walked across it, that band was the worst of the whole page: at a 1015px box
   the column fell to 105.7px with the worst address on FOURTEEN lines — a harder
   squeeze than iPad portrait ever had — and it did not climb back to 16rem until
   a 1215px box. A person dragging a desktop window sits in that band. The floor
   therefore runs to 1260px, which is every box where the column would otherwise
   be under its own width, and the column is now never narrower than 16rem at any
   window width at all.

   AND IT STOPS THERE RATHER THAN RUNNING ON, because above that box the column
   already holds more than the floor — 271px at iPad landscape, 320.7px at
   desktop — and `min-width` is not free even when it is slack: written with no
   ceiling it changes what the auto table hands the other nine columns, and
   measured at those two views it pulled the address column out to 316.6px and
   362.3px and folded Confirmation at 48 of 50 cells at iPad landscape where 7
   fold today. Keith settled a width for the ADDRESS column; taking room off
   columns he did not raise is not in that. Above 1260px the table is left
   exactly as e974fc35 committed it.

   AT PHONE PORTRAIT IT IS INERT for a different reason again — the
   `table.cardlist` band below 768px sets every row nowrap, so the address lays
   out at 830.7px on one line already, measured identical at every candidate
   floor. */
@container list (max-width: 1260px) {
  .acct-table th.proj-address-col, .acct-table td.proj-address-col { min-width: 16rem; }
}

/* THE SELECTION COLUMN (item 13). Its own click target, and its own width. */
.acct-table th.tick-col, .acct-table td.tick-col { width: 2.2rem; text-align: center; }
.acct-table .row-tick, .acct-table .tick-all {
  width: auto; min-height: 0; margin: 0; accent-color: var(--accent); cursor: pointer;
}
.acct-table tbody tr.is-picked > td { background: var(--panel-2); }

/* NO PILLS (item 15) — the same word in the same band colour, set bold, with
   the capsule taken off. The colour rules are the existing `.health-*` ones, so
   nothing about which band is which colour is restated here. */
.health-word, .status-word {
  display: inline; padding: 0; border: 0; background: none;
  border-radius: 0; text-transform: none; text-decoration: none;
  font-weight: 700; font-size: var(--t-cell);
}
/* NO HOVER UNDERLINE. `.health-word` and `.status-word` are <span>s holding a
   VALUE in a cell — never links (Keith's rule: no cell inside a list row is a
   hyperlink). The underline was left over from when the band was a link, and on
   a span it says "press me" about something that cannot be pressed. Gone with
   the rest of them on 4 September 2026. */
/* "Lost" is the one band drawn as a filled block rather than as coloured text;
   as bold text it takes the same ink every other band takes. */
.health-word.health-lost { background: none; color: var(--t2); }
.status-word.status-warm { color: var(--warning); }
.status-word.status-active { color: var(--success); }
.status-word.status-cold { color: var(--t2); }
.status-word.status-won { color: var(--success); }
/* The three the visit-approval queue needs, added when that screen took the
   Accounts pattern (30 August 2026) and its two capsules came off with it: where
   a visit stands, and the early-warning word beside an account's position. Same
   ink the capsule took; only the capsule went. */
.status-word.status-overdue { color: var(--danger); }
.status-word.status-closed { color: var(--t2); }
.status-word.status-converted { color: var(--success); }
/* THE FOUR THE PROJECTS LIST NEEDS (12 September 2026) — where a project stands
   against Business Central. Keith's rule for what CONFIRMED means, given that
   night: "Synced to BC will be better. good call". The one a person acts on is
   the money confirmed and not yet billed, so it takes the warning ink and the
   other three stay quiet; a list on which every state shouted would tell a
   reader nothing in ten seconds. */
.status-word.project-confirmed_not_invoiced { color: var(--warning); }
.status-word.project-confirmed_invoiced { color: var(--success); }
.status-word.project-not_confirmed { color: var(--t2); }
.status-word.project-no_project_id { color: var(--t3); }
/* B40, 17 September 2026 — a quotation still out with nobody's approval on it.
   Keith: "customer did not proceed with confirmation that counter will be an
   indicator". The warning ink, the same one "Confirmed, not invoiced" takes,
   because both say the same kind of thing: somebody has to go and do something
   about this. The cell is only drawn at all when the count is above zero
   (src/projects/list-render.js), so nothing on the page shouts a nought. */
.status-word.project-open-unapproved { color: var(--warning); font-variant-numeric: tabular-nums; }
.status-word.buying-active { color: var(--success); }
.status-word.buying-lapsed { color: var(--danger); }
.status-word.buying-dormant { color: var(--warning); }
.status-word.buying-never { color: var(--t2); }
/* WHAT CAME OF AN ACTIVITY — the Outcome column on /activities (Keith, 30 August
   2026, on the list that takes Log Activity's place in the rail). Same rule as
   every band above it: the word, bold, in ink, with no capsule round it. The
   five words are the visit's own case vocabulary (src/visits/caseStatus.js) plus
   the two states that have no outcome column at all — still open, and never
   tracked either way, which is most of the book and is therefore the quietest
   of the five rather than a gap. */
.status-word.activity-outcome-won { color: var(--success); }
.status-word.activity-outcome-lost { color: var(--danger); }
.status-word.activity-outcome-dropped { color: var(--warning); }
.status-word.activity-outcome-open { color: var(--accent); }
.status-word.activity-outcome-not-tracked { color: var(--t2); }
/* WHY A PROJECT IS ON THE "no account or contact" QUEUE (Keith, 30 August 2026 —
   the screen that stopped being three cards and became a list). Same rule as
   every band above it: the word, bold, in ink, with no capsule round it. Two
   values and two different jobs — nothing of that name is a name to go and look
   up upstream, which is the warning; more than one of that name is a choice a
   person can make here and now, which takes the accent every actionable word on
   a list takes. */
.status-word.unattached-no-match { color: var(--warning); }
.status-word.unattached-many-matches { color: var(--accent); }

/* ---- ATTACHING A PROJECT THAT HAS NO ACCOUNT ----------------------------
   Keith, 30 August 2026: "For this.. I think it's too big for a card. Do we
   need to selec the contact?" — and, on a list with the account required and the
   contact optional, "okie Go ahead with this proposal. for both".

   ONE FORM, TWO PLACES. It is rendered once by the server
   (src/projects/render.js attachFormHtml) and lives either in the quick-view
   panel — moved there by public/project-attach.js — or on the project's own
   record page. So its rules are here, in the app's own stylesheet, rather than
   in either screen's: neither place owns it.

   THE WRAPPER IS HIDDEN, NOT THE FORM. `.atp-source` is where the list parks it
   until a row is clicked; `hidden` on the wrapper is what keeps it off the page,
   so the form itself never has to be un-hidden by anything but the move. */
.atp-source { display: none; }
.atp-form { display: block; }
.atp-field { margin-top: var(--sp-sm); }
.atp-lbl { display: block; font-weight: 600; margin-bottom: var(--sp-xxs); }
.atp-form select { width: 100%; }
.atp-req { color: var(--danger); font-weight: 600; }
.atp-opt, .atp-note { color: var(--t2); font-weight: 400; }
.atp-lead, .atp-note { margin: var(--sp-xxs) 0 0; font-size: var(--t-cell); }
.atp-err { color: var(--danger); font-weight: 600; margin: 0 0 var(--sp-xs); }
.atp-actions { margin-top: var(--sp-sm); }

/* =========================================================================
   THE ACTION AT THE END OF A CARD SITS AT ITS BOTTOM RIGHT.

   THE LEFT-CORNER RULE IS RETIRED, BY KEITH HIMSELF. He gave it on 4 September
   2026 — "And make sure the action button is on the left bottom corner. think of
   are like that when in this setting." — and retired it the same day:

     "retire old rule. Left corner is only when it make sense. but by default it
      shoul dbe Right bottom corner"

   and, naming the buttons: "Another thing all button eg add contact open
   contact, log activity should be bottom right corner". So the default flips and
   the left corner is now the exception that has to earn itself. This is
   checklist item 48, reported against /campaigns, where "Create campaign" sat
   at x=80 in a 1512px window.

   WHY ANYTHING HAD TO CHANGE AT ALL. `button { width: 100% }` (line 608) is
   SGE's base rule, and it is right for a phone form and wrong for a card: a Save
   that spans a 900px card is not a button in a corner, it is a bar. So the
   selectors below give a card's action its own width and then put it at the END
   of the line rather than the start.

   TWO WAYS IN, ONE RESULT:
     * `.card-actions` — a row a card can wrap one or more actions in. It is
       what a card with a cancel beside its save wants.
     * the bare submit that is the LAST thing in a form inside a section card —
       which is most of SGE's forms, and which gets the rule without 72 call
       sites being edited one at a time.

   WHAT IS DELIBERATELY NOT TOUCHED, each because it is not this shape:
     * `.lg-actionbar` — Log Activity's action bar is FIXED to the bottom of the
       window across its full width, which Keith settled on 29 August 2026. It
       is a page bar, not a card.
     * `.pane-foot` — the filter, columns and export panes put Clear at the left
       and Apply at the right of a footer strip. That is a two-ended bar and was
       drawn that way on his own instruction.
     * `.preview-panel .pv-edit-form button[type="submit"]` — the quick view's
       Save, in a 340px column where full width IS the left-hand corner and the
       right-hand one at once.
     * `.visit-filter` and the three CASE-CONTROL forms — horizontal bars and a
       cluster, not cards with an action at the end. `.visit-filter`'s submit
       sits inline after the control it acts on ("Filter" after a date box,
       measured at x=374 in a 1408px card); sending it to the far right would be
       a button 1000px away from its own field. `.case-form`, `.case-open-form`
       and `.case-reopen` are three one-line forms inside ONE `.case-control`
       section, drawn one under another ("Mark open", "Close case", "Reopen
       case"), so moving one of the three and not the others would split a
       cluster across both corners. This is the "left corner only when it makes
       sense" half of Keith's rule.
   ========================================================================= */
.card-actions {
  display: flex; align-items: center; justify-content: flex-end;
  gap: var(--sp-xs); margin-top: var(--sp-md);
}
/* An overflow menu inside a bottom-right action row opens UPWARD. The row is
   the last thing on its page (the account and contact records since the
   5 September review's row 50), and a panel dropping below the final element
   is absolutely positioned — it would be clipped by the viewport with nothing
   to scroll to. */
.card-actions .overflow-panel { top: auto; bottom: calc(100% + 8px); }
/* Doubled class: lifts the row above `.visit-form button[type="submit"]` and
   `.manage-form button[type="submit"]` (0.6rem top margin), as `.fc-foot` does. */
.card-actions.card-actions > :is(button, .btn-primary, .btn-inline, a) {
  width: auto; margin: 0; flex: 0 0 auto;
}
.scard form > button[type="submit"]:last-child,
.scard form > p:last-child > button[type="submit"]:only-child {
  display: block; width: auto; margin-left: auto; margin-right: 0;
}
/* The bars and the case cluster named above keep the corner they have. */
.scard form.visit-filter > button[type="submit"]:last-child,
.scard form.case-form > button[type="submit"]:last-child,
.scard form.case-open-form > button[type="submit"]:last-child,
.scard form.case-reopen > button[type="submit"]:last-child {
  margin-left: 0; margin-right: auto;
}

/* ---- DENSE MENUS (item 18) ----------------------------------------------
   Keith: "Can make it denser.. too widly arare now". The column menu on this
   screen and the filter pane's own tick rows sit closer together; the 44px tap
   floor is kept where a finger is the pointer (the touch block below).
   Scoped to this screen, so no other list's menu moves tonight. */
.acct-shell .col-menu-item { padding: 0.22rem 0.5rem; }
.acct-shell .col-menu-panel { padding: 0.18rem; min-width: 10.5rem; }
.acct-shell .fmulti-row { min-height: 0; padding: 0.15rem 0; }
.acct-shell .fmulti-toggle { min-height: 2.1rem; }
.acct-shell .cols-row { min-height: 0; padding: 0.15rem 0; }

/* ---- iPAD AND PHONE ------------------------------------------------------
   The panes cannot stand beside a table on a narrow screen, so below 1024px an
   open pane takes the full width above the list and the list keeps the rest.
   Nothing is hidden and nothing is unreachable; the shape changes. */
@media (max-width: 1023px) {
  .acct-body { flex-direction: column; }
  /* AND THE COLUMN IS THE WINDOW'S WIDTH, NOT ITS CONTENT'S. `.list-panes >
     .acct-body` takes `align-items: flex-start` above, written for the desk,
     where the row runs ACROSS and that declaration only stops a pane stretching
     down. The moment the row turns into a column — the line directly above —
     the same declaration stops governing height and starts governing WIDTH, and
     the list column is sized to fit its content instead of to the window.
     MEASURED on /growth at 390x844 on 22 September 2026: `.acct-main` drew
     529.4px in a 366px box and the document scrolled to 541 against a 390px
     window, so every heading, sentence and account card was cut at the right
     edge; at 834x1194 it drew 832px in an 802px box. The table then scrolls
     sideways inside `.ah-queue-scroll`, which is the box written to do it.
     Quote requests, Campaigns and the growth list share this slot and carry the
     same fault latently — their content simply happens to be narrower today. */
  .list-panes > .acct-body { align-items: stretch; }
  .acct-pane { flex: 0 0 auto; width: 100%; max-height: 38vh; }
  /* ONLY WHILE A PANE IS ACTUALLY OPEN. With one stacked above it the list keeps
     a usable depth and the STACK is what scrolls — inside the shell, never the
     page; measured at 820px and 390px with both panes open, which was the one
     case that pushed the document past the window. With no pane open the list is
     the only thing in the column and goes back to being the box that scrolls,
     with its column headings frozen at the top of it. */
  .acct-shell:has(.pane-switch:checked) .acct-body { overflow-y: auto; }
  .acct-shell:has(.pane-switch:checked) .acct-main { flex: 1 0 auto; min-height: 14rem; }
}

/* A TABLE THIS FILE ALREADY SCROLLS SIDEWAYS AT iPAD WIDTH must not be given a
   second scrollport inside its own: the box above is the scroller, and the
   table inside it is an ordinary table again.

   AND IT HAS TO BE WRITTEN AS HEAVILY AS THE RULE IT ANSWERS, or it never
   lands. KEITH, 5 September 2026, on a landscape iPad with the rail's names
   showing: the Salesperson column on /contacts sits past the right edge of its
   frame. Measured at 1024x768 by scripts/w1710-ipad-title-and-table.mjs — the
   last heading's right edge 43.9px past the frame on /contacts and 221.7px on
   /activities, with no scrollbar drawn and nothing to say there is more.

   WHY THERE WAS NOTHING TO SEE. The containment rule near the top of this band
   is `table:not(.cal-week):not(.cal-month):not(.compared):not(.growth-revenue)
   :not(.debrief-dl)` — five classes' worth of weight. This line carried two,
   so it lost wherever the two met, and a list table became a scrollport inside
   `.acct-scroll`, which is a scrollport already. Its own bottom edge — the only
   place a sideways scrollbar can be drawn — then landed at y=861 in a 768px
   window, 93px below the screen, while `.acct-scroll`'s bottom edge sits at 756
   and is on it. So the column was reachable by a gesture with no feedback
   anywhere a reader could see.

   The `:not()` chain below is that same chain, so the two rules are written at
   the same weight and this one, being later, is the one that stands. It is the
   sentence above it, finally said loudly enough — no new behaviour is invented
   here. Nothing outside 768–1279 is touched: desktop and phone measure
   identical before and after (scripts/w1710-ipad-title-and-table.mjs). */
@media (min-width: 768px) and (max-width: 1279px) {
  .acct-scroll > table.cardlist:not(.cal-week):not(.cal-month):not(.compared):not(.growth-revenue):not(.debrief-dl) {
    display: table; overflow-x: visible; max-width: none; max-height: none;
  }
  .acct-scroll { overflow: auto; }
  .acct-scroll thead th { top: 0; }
  /* The rows relax a little where a finger is the pointer, without giving back
     the whole of the density Keith asked for. */
  .acct-table td { padding-top: 0.35rem; padding-bottom: 0.35rem; }
}

@media (max-width: 767px) {
  .acct-toolbar .rh-actions { margin-left: auto; }
  .acct-pane { max-height: 60vh; }
}

/* A phone card has no columns, so it has no selection column either — the ticks
   and the export they drive are a desk job. It follows the CARD and not the
   width (Keith, 30 August 2026): a narrow desk window still draws the table, and
   a table without its tick column would have lost the export selection to a
   window drag. Same test as the card block itself. */
@media (max-width: 767px) and (pointer: coarse) {
  .acct-table th.tick-col, .acct-table td.tick-col { display: none; }
}

/* ---- DECIDING ONE PLANNED VISIT ------------------------------------------
   Keith, 30 August 2026, on the visit-approval queue: "one click will open the
   rigth panels and Sales Manager or director can approve it."

   ONE FORM, TWO PLACES. src/visit-plan/render.js renders it once; on the list
   public/visit-approve.js moves it into the quick-view panel's foot, and on the
   visit's own record — which is the answer below 1280px, where there is no panel
   — it is already in the page. So the rules are here rather than in
   public/list-preview.css: the same control has to look the same in both.

   The panel foot is a wrapping flex row, so the form claims a whole line of it
   and lays its own three controls out. */
.vap-decide {
  flex: 1 1 100%;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-xs);
  margin: 0;
}
.vap-lead { flex: 1 1 100%; margin: 0; font-size: var(--fs-caption); color: var(--t2); }
/* WHAT YOU WANT CHANGED takes the whole line above the buttons. It was the
   84px-wide field in the old Decide column that read "Send bc" — a control
   nobody could read is a control nobody uses. */
.vap-note { flex: 1 1 100%; display: block; margin: 0; font-size: var(--fs-caption); }
.vap-note input[type="text"] { display: block; width: 100%; margin: 0; }
.vap-decide button { flex: 1 1 8rem; }

/* THE BULK ACTION ON THE TOOLBAR. With nothing ticked it is disabled, and a
   disabled primary button that still looks pressable is a button that gets
   pressed — so it reads as unavailable rather than merely refusing. */
.vap-bulk { margin: 0; }
.vap-bulk button[disabled] { opacity: 0.45; }

/* 16.6 — every target a finger can reach is 44px. An iPad in landscape is
   Expanded-width and still driven by a finger, so this keys off the POINTER and
   not off the window, exactly as the queue's own touch rules do. */
@media (pointer: coarse) {
  .vap-decide button { min-height: 44px; }
  .vap-note input[type="text"] { min-height: 44px; font-size: var(--fs-input-touch); }
}

/* ---- ACTING ON A SUGGESTION, IN THE QUICK VIEW PANE -----------------------
   KEITH, 26 September 2026, on "Who SGE suggests": "Yes. Why don't you move the
   actions into the Quick View pane;"

   w3307 moved them (commit 496b96b1) and could not write this file — it was
   locked while w3308 wrote the Account Health block above. So the controls
   arrived in the pane with no rules of their own and fell back to the document's
   defaults: every <label> a block, every field on a line of its own, the decline
   reading as one more step of the same form. This is the block it had written.

   IT IS THE SAME SHAPE `.vap-decide` ABOVE ALREADY TAKES, for the same reason —
   one form, rendered once by src/visit-plan/render.js and MOVED into the panel
   foot by script (public/plan-suggest.js). The foot is a wrapping flex row, so
   the block claims a whole line of it and lays its own controls out inside.

   NOTHING HERE CHANGES THE MARKUP, THE CONTROLS OR WHAT THEY POST. Every rule
   below is layout and type: where a field sits, and how big its words are. */
.plan-actions {
  flex: 1 1 100%;
  min-width: 0;
  margin: 0;
}

/* WHY SGE SUGGESTED THIS ONE — the sentence that used to be the second line of
   the table row. It reads at 14px, not at the 13px the `.muted` it wears gives
   it in this panel: Keith's type rule is "Body text minimum is 14px, absolute
   minimum 12px, whole pixels only", and this is a sentence a person reads rather
   than a figure they scan. --fs-body is 14px and is declared in whole pixels. */
.plan-why {
  margin: 0 0 var(--space-sm);
  font-size: var(--fs-body);
  line-height: 1.43;
}

/* THE THREE FIELDS SIDE BY SIDE, not one per line. The pane is 340px wide, so
   the row wraps rather than pretending all three fit: Date and Time take the
   first line, Purpose and the button take the second. That is the panel's width
   deciding it, which is the right thing to decide it — the catalogue's own rule
   for a box this narrow is that "space is bought by removing content, not by
   shrinking type" (16.5 tier 1), so nothing is squeezed to force a third field
   onto a line it does not fit. Four lines became two.

   `align-items: flex-end` is what keeps the button's baseline level with the
   fields beside it: a label is a column of caption-then-control and the button
   is a control on its own, so they only line up from the bottom. */
.plan-add {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-xs);
  margin: 0;
}
/* NO FIELD GROWS. A growing field fills the line it is on and pushes the next
   one onto a line of its own, which is the stacking this block exists to undo —
   each one takes the width its own content needs and the next sits beside it
   while there is room. */
.plan-add > label {
  display: flex;
  flex-direction: column;
  gap: var(--space-xxs);
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  font-size: var(--fs-body);
}
/* Each control takes the width of the column it is in — a label is the column
   now, and a control that kept its own fixed width would sit short inside it. */
.plan-add > label > .dfield,
.plan-add > label > input,
.plan-add > label > select {
  width: 100%;
  min-width: 0;
  margin: 0;
}
/* THE DATE BOX HOLDS A DATE'S WORTH OF SPACE — Keith: "A date box holds a
   date's worth of space", and the reason it has to be said here is that an
   <input> with no width asks for about twenty characters. Left at that the date
   took the whole line on its own and Time could not sit beside it, which is the
   stacking again under another name. --fw-short is the 8rem SGE already gives a
   short field; DD-MM-YYYY at 14px is well inside it, and the picker beside it
   keeps its 44px.

   TWO REM FIGURES, AND NEITHER IS A GUESS. 7rem is 112px, and DD-MM-YYYY at
   14px in this face measures 80px inside 26px of padding and border — 106px, so
   the box holds the date it is for with room left. 10rem on the label is the
   same device `.vap-decide button` above uses: a basis a little under what the
   field asks for, so Time fits on the line beside it, with the grow handing the
   slack straight back to the box. Both are checked rather than asserted — the
   run records `clipped: false` for every control in the pane
   (docs/2026-09-26-sge-visit-plan-quickview/after-pane-fit.json). */
.plan-add > label:has(.dfield) { flex: 1 1 10rem; }
.plan-add > label > .dfield > .dfield-text {
  width: 7rem;
  min-width: 0;
  flex: 1 1 auto;
}
/* AND THE WORDS INSIDE THE CONTROLS ARE 14px TOO. The date, the time and the
   purpose are read, not scanned, and the document draws a field's own text at
   13px. Whole pixels, from the same token as the labels. */
.plan-add > label > .dfield .dfield-text,
.plan-add > label > input,
.plan-add > label > select,
.plan-decline > select {
  font-size: var(--fs-body);
}
/* THE ACTION AT THE RIGHT-HAND END OF ITS LINE — Keith, 4 September 2026:
   "by default it shoul dbe Right bottom corner". Its label reads at 14px for the
   same reason the fields do: `.btn-inline` is drawn at --t-cell-min, which is
   13px, and a button in this pane is read and pressed rather than scanned down a
   column. Only these two buttons are raised; the shared class is untouched. */
.plan-add > button,
.plan-decline > button { flex: 0 0 auto; font-size: var(--fs-body); }
.plan-add > button { margin-left: auto; }

/* TURNING THE SUGGESTION DOWN IS THE OTHER DECISION, AND THE RULE SAYS SO.
   Without it the decline dropdown reads as a fourth field of the form above it
   and "Not this one" as a second way to submit that form. The hairline is
   --line-soft, the same one the panel's own foot and its `.atp-form` are
   separated by (public/list-preview.css) — no new ink, no new weight. */
.plan-decline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  margin: var(--space-md) 0 0;
  padding: var(--space-md) 0 0;
  border-top: 1px solid var(--line-soft);
}
.plan-decline > select { flex: 1 1 auto; min-width: 0; margin: 0; }

/* ---- THE APPROVALS PAGE'S TAB STRIP --------------------------------------
   KEITH, 3 September 2026: "maybe with tabs to switch between different
   approvals and a quick view".

   THE ONE PIECE OF FURNITURE THIS PAGE ADDS, and it is added because SGE had
   nothing that does this. `.pane-views` is the nearest thing and it is a
   VERTICAL column inside the filter pane — a strip of tabs across the top of a
   page is a different job. Everything else on the page is borrowed: the tiles
   are the Sales KPI page's (`.tiles`, `.tile`), the list is the Accounts
   pattern's, the quick view is the shared panel.

   NOTHING NEW IS INVENTED BELOW. Every colour, space, radius and size is a
   token this file already declares, and the shape is Keith's one shape — a
   rectangle with rounded corners (27 August 2026: "we should all standardize to
   the square or rectangular with a round corner"). No pills.

   THE OPEN TAB IS NOT SIGNALLED BY COLOUR ALONE: it carries the page ground, a
   heavier weight and the ink colour, and the markup carries aria-current with
   it, so it survives greyscale and reaches a screen reader.

   IT WRAPS RATHER THAN SCROLLS SIDEWAYS. Two kinds today and a third coming;
   at 390px three tabs stack onto two lines, which is the guard `.tiles` and
   `.pair-row` already take. */
.appr-tabs {
  display: flex; flex-wrap: wrap; gap: var(--sp-xs);
  margin: 0 0 var(--space-md);
}
.appr-tab {
  display: inline-flex; align-items: center; gap: var(--sp-xxs);
  padding: var(--sp-xs) var(--sp-sm);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: var(--panel-2);
  color: var(--t2); text-decoration: none;
  font-size: var(--fs-caption); font-weight: 600;
}
.appr-tab:hover { border-color: var(--accent); text-decoration: none; }
.appr-tab.active {
  background: var(--panel);
  border-color: var(--accent);
  color: var(--t1);
  font-weight: 700;
}
/* THE COUNT ON A TAB — the reason a tab is worth pressing before you press it.
   Set in the figure face the tiles use, so the number on the tab and the number
   on its tile read as the same number. */
.appr-tab-n {
  font-variant-numeric: tabular-nums; font-weight: 700; color: var(--t1);
}
/* 16.6 again — a finger-driven pointer gets a 44px target. */
@media (pointer: coarse) {
  .appr-tab { min-height: 44px; }
}

/* ---- THE APPROVALS NUMBERS, GIVEN LESS ROOM SO THE LIST GETS MORE ---------
   KEITH, 5 September 2026: the head of /approvals takes so much of the window
   that hardly any of the queue is left under it. Measured before this block:
   the head above the list frame was 607.6px of a 950px window at the desk and
   697.4px of a 768px one on an iPad, which left the frame 212.8px and 0px.

   NOT ONE WORD AND NOT ONE FIGURE CHANGES. Every sentence on the two tiles is
   still there, at the size it was, and the type scale is untouched (catalogue
   16.5 tier 1 - space is bought by removing content, not by shrinking type; the
   content taken here is space, not words). What comes off is the padding the two
   tiles sat in and the air above and below the row.

   SCOPED TO THIS PAGE AND NOWHERE ELSE. `.appr-tiles` is set on the approvals
   head alone (src/approvals/render.js) and is the same class the phone rule
   further up this file already keys off. The Sales KPI page's tiles, whose
   markup this borrows, are not touched.

   THE CARD'S OWN BOTTOM MARGIN IS NOT SET HERE, AND IT WAS TRIED AND MEASURED.
   On a list screen `body:has(.acct-shell) > main.frame > .scard` already sets
   `margin-bottom: 0` and outranks a `.scard:has()` written at this point, so
   such a rule changed nothing on the visits tab and would only have moved the
   Grow tab, which is not what was asked for. */
.tiles.appr-tiles { margin: var(--sp-xs) 0; }
.appr-tiles .tile { padding: var(--sp-xs) var(--sp-sm); }
.appr-tiles .tile-label em { margin-top: 0.1rem; line-height: 1.3; }
.appr-tiles .tile-note { margin-top: 0.15rem; }

/* ---- AND THE AIR BETWEEN THE HEAD'S BLOCKS, FOR THE IPAD SIZE --------------
   THE FAULT THIS ANSWERS. The pass above gave the desk its list back but left
   the iPad landscape size showing ONE row of twenty-three: with the rail's
   names showing, the head above the list frame was 570.3px of a 768px window
   and the frame 112.7px (command: node scripts/w1714-head-parts.mjs). The rail
   is on screen at that width — Keith's own rule puts it there — and the same
   sentences that sit on one line at the desk wrap onto two and four in the
   narrower column, so the head costs more in a window that is 182px shorter.

   WHAT THE HEAD IS MADE OF at that size, largest part first (same command):
   the "What is waiting" card 318px, the toolbar 125.7px, the opening sentence
   50.2px, the tab strip and its gap 53.6px, the count line 23px. Inside the
   card the two tiles are 192px of the 318px, and 101.4px of THAT is the Grow
   tile's two explanatory sentences — a tile for a feature whose database change
   has not been run is what sets the row's height and squeezes the queue.

   SO THIS TAKES SPACE AND ONLY SPACE. Not one word, not one figure and not one
   type size changes, and no tile loses a line — what comes off is the margins
   between the head's blocks. The toolbar and the count line are the shared list
   furniture every other list page wears, so they are not touched at all.

   WHAT IT IS WORTH, measured (command: node scripts/w1714-head-routes-try.mjs
   docs/reports/w1714): iPad rail-wide head 570.3px -> 505.3px and 1 row -> 2;
   iPad rail-slim 499.4px -> 434.4px and 3 rows -> 4; desktop 482.5px -> 417.5px
   and 13 rows -> 15, so the pass above loses nothing. The phone keeps its own
   shape — its frame starts below the fold and the PAGE scrolls, which predates
   both passes — and only has 65px less to scroll past.

   IT DOES NOT REACH "SEVERAL ROWS" AT THE IPAD RAIL-WIDE SIZE, AND NOTHING
   KEYED ON SPACING CAN. The same command prices the rest: taking the opening
   sentence AND the note under the tiles as well would give 3 rows, and taking
   the Grow tile's unavailable sentence on top of that would give 4. Those are
   words, and words in SGE are Keith's, so they are measured and left alone.

   SCOPED TO THIS PAGE. `.appr-tiles` and `.appr-tabs` are drawn by
   src/approvals/render.js and by nothing else in the app, so no rule here can
   reach /customers, /contacts, /activities, /review or /planner. Column left
   edges are byte-identical before and after at all three sizes in both rail
   states — see the "COLUMN LEFT EDGES" table the same command prints. */
body:has(.appr-tabs) > main.frame > p.muted { margin-top: 0; margin-bottom: var(--sp-xs); }
.scard:has(> .tiles.appr-tiles) > .slabel { margin-bottom: var(--sp-xxs); }
.tiles.appr-tiles { margin: var(--sp-xxs) 0; }
.scard:has(> .tiles.appr-tiles) > p.muted { margin-top: var(--sp-xxs); margin-bottom: 0; }
.appr-tabs { margin-bottom: var(--sp-xs); }

/* =====================================================================
   ASK KATE IS A PANEL OVER THE PAGE, NOT A PAGE OF HER OWN.

   KEITH, 18 September 2026, in four words: "Panel over the current page".
   The control that opens it does not move — it is the app bar control beside
   Showcase (his decision of the 17th) — and pressing it no longer takes a
   person off the screen they are reading. src/app.js kateSlideOverHtml draws
   the panel on every screen that has the bar; public/kate-panel.js reveals it.

   IT IS THE QUICK-VIEW PANEL'S SHAPE, AND THAT IS ON PURPOSE. Same width
   (--preview-w, declared in public/list-preview.css), same side — every quick
   view in SGE opens on the right, which is Keith's own rule — and the same
   top edge, below the app bar. SGE gets no second idea of what a side panel
   looks like. What it does NOT take from that panel is the grid track: the
   quick view is a COLUMN of the page and re-flows the list beside it, and
   "over the current page" is the other thing. So this one is fixed, floats,
   and the page under it does not move by a pixel.

   AND IT DIMS NOTHING AND DISABLES NOTHING, which is where it parts company
   with the form card above it in the stack (public/shells.css .fc-scrim /
   .fc-card). A form card holds the whole of what a person is doing. Kate is
   asked ABOUT what is on the screen, so the table underneath has to stay
   readable, scrollable and clickable while she is open.

   WHERE IT SITS IN THE STACK. public/shells.css keeps the one ladder: app bar
   20, navigation rail 30, menus 40, form card 51 over its scrim 50, phone menu
   sheet 55 over its scrim 60. This takes 45 — the level that has stood empty
   since the floating bubble left on 17 September — so it is over everything a
   person is reading and under the menu that has to cover the whole window.

   EVERYTHING KATE'S OWN IS STILL HERS. The conversation surface inside the
   panel — .kate-live, the transcript, the box to type in — is dressed by
   public/assistant.css and is not touched here. This block is the panel it
   arrives in and nothing else.
   ===================================================================== */
.kate-panel {
  position: fixed;
  z-index: 45;
  top: var(--appbar-h);
  right: 0;
  bottom: 0;
  width: min(var(--preview-w, 340px), 100vw);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
/* HIDDEN MEANS HIDDEN. The rule above gives the panel a display of its own, and
   an author display rule beats the browser's own [hidden] { display: none } —
   which is exactly the fault Keith hit on Kate's box on 15 September 2026. The
   panel is rendered hidden by the server and must stay that way until it is
   asked for. */
.kate-panel[hidden] { display: none; }

/* The head: her name, the way through to the full page, and the way out. One
   row, one height, the way every other panel head in SGE reads. */
.kate-panel-head {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: var(--sp-xs) var(--sp-sm);
  border-bottom: 1px solid var(--line);
}
.kate-panel-title {
  flex: 1 1 auto;
  margin: 0;
  font-size: var(--fs-tagline);
  font-weight: 600;
  line-height: 1.19;
  letter-spacing: var(--ls-tagline);
  color: var(--t1);
}
/* THE PAGE IS NOT REMOVED AND THIS IS THE DOOR TO IT. /assistant still answers,
   still holds the whole conversation, and is where a person lands with no
   JavaScript — so the panel says where it is rather than pretending it is the
   only Kate there is. */
.kate-panel-page {
  flex: 0 0 auto;
  font-size: var(--fs-caption);
  line-height: 1.29;
  letter-spacing: var(--ls-caption);
  color: var(--accent);
}
.kate-panel-x {
  flex: 0 0 auto;
  width: auto;
  min-width: var(--tap);
  min-height: var(--tap);
  margin: 0;
  padding: 0 var(--sp-xs);
  background: none;
  border: 0;
  color: var(--t3);
  font-size: var(--fs-body);
  line-height: 1;
  cursor: pointer;
}
.kate-panel-x:hover { color: var(--t1); }

/* The conversation scrolls inside the panel rather than growing it, the same
   rule the list obeys — so the box to type in stays where it is put. */
.kate-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: var(--sp-sm);
}

/* A PHONE TAKES THE WHOLE WINDOW. 767px is the application's own compact
   boundary, and below it a 340px panel down one edge is a strip. The app bar
   stays visible above it, because the control that closes the panel is not the
   only way back and the bar is how a person knows where they are. */
@media (max-width: 767px) {
  .kate-panel {
    left: 0;
    width: 100%;
    border-left: 0;
  }
}

/* ===========================================================================
   THE TOUCH FLOOR ON LINKS AND DISCLOSURES — 25 September 2026.

   KEITH, 17 September 2026: "understand.. then maintan it." — the 44px touch
   floor of build standard BS-001 rule V8 stays, on every width. It is declared
   once at the head of this file as `--tap: 44px`.

   The sweep of 25 September (docs/2026-09-25-sge-tap-targets/measure.mjs, whose
   threshold IS that 44) found the floor asserted in exactly two places: on
   `input`/`select`/`textarea` (line 732) and on `button` (line 946). Nothing
   asserted it on `<a>` or on `<summary>`, and that single gap is most of what
   it measured short. This block closes it.

   TWO TOOLS, AND WHY EACH IS USED WHERE IT IS.

   1  A TRANSPARENT `::after` EXPANDER. The house idiom, already written down at
      public/capability.css:112 — "a compact control earns its 44px through a
      transparent ::after rather than by inflating the painted box". Nothing is
      repainted, no text re-flows, and no layout Keith has approved changes
      shape. It is the default here.

   2  A REAL `min-height` / `min-width`. Used only where the control sits in an
      overlay, or in a flex row, that can take the extra height without pushing
      anything else about the page around.

   WHAT IS DELIBERATELY NOT TOUCHED is listed at the foot of this block, with
   the reason for each. Growing those would cover the control beside them, and
   the brief for this work is explicit: do not redesign a screen to win a
   measurement.
   ========================================================================= */

/* --- 1. THE BAND ---------------------------------------------------------
   The band is CENTRED on the link, so it reaches equally above and below, and
   equally either side, and the word itself does not move. It is a thumb tall
   always, and a thumb wide only where the link is narrower than that — a link
   already wider keeps its own width, because `width: 100%` governs and
   `min-width` only ever raises it.

   WHICH LINKS, AND WHY THIS IS A LIST RATHER THAN `p > a`. Every selector
   below is one the sweep measured short. The obvious shortcut — a band on
   every link in a paragraph or a table cell — was written, measured and taken
   back out: docs/2026-09-25-sge-tap-targets-fix/overlap-before-after.mjs asks
   the browser, at both widths and over thirty-two pages, whether any control's
   own centre now answers to something ELSE, and separates what this change
   caused from what was already true. `p > a` plus `td > a` caused 26 controls
   to lose their own centre — a band 14px past a 16px link reaches further than
   SGE's phone layouts leave between two links. This list caused none. */
p.muted > a,
p.sub > a,
p.fc-nav > a,
p.pj-back > a,
p.planner-links > a,
p.cx-who > a,
p.dash-note > a,
p.dash-frac > a,
span.pr-eyebrow > a,
.guide-toc > li > a,
.guide-list > li > a,
.list-pager-controls > a,
.review-group-open,
.btn-inline,
.edit-link,
thead th > a,
td > strong > a {
  position: relative;
}
p.muted > a::after,
p.sub > a::after,
p.fc-nav > a::after,
p.pj-back > a::after,
p.planner-links > a::after,
p.cx-who > a::after,
p.dash-note > a::after,
p.dash-frac > a::after,
span.pr-eyebrow > a::after,
.guide-toc > li > a::after,
.guide-list > li > a::after,
.list-pager-controls > a::after,
.review-group-open::after,
.btn-inline::after,
.edit-link::after,
thead th > a::after,
td > strong > a::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  min-width: var(--tap);
  height: var(--tap);
  transform: translate(-50%, -50%);
}

/* --- 2b. WIDTH ONLY, WHERE HEIGHT IS NOT THIS CONTROL'S TO TAKE -----------
   The health word in a row is a link: it filters the list to its own band. A
   list row measures between 29.7 and 47.3px, so a 44px BAND on it would reach
   into the row above and the row below — and those rows are themselves targets
   (`tr[data-row-href]`), so the tap would land on the wrong record's word.
   That is worse than a small target, so the height is left to the row and only
   the width is taken: measured at 39.7px for "Watch", 4.3px short. In the card
   layout below 768px, where the row is 62px tall, this is the last thing
   between the word and the floor and it clears it. */
.health-word,
.status-word { position: relative; }
.health-word::after,
.status-word::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  min-width: var(--tap);
  height: 100%;
  transform: translate(-50%, -50%);
}

/* --- 3. A REAL FLOOR, WHERE THE BOX CAN AFFORD TO GROW -------------------- */

/* A line in an open column menu. The menu is an overlay: it grows downward
   over the table and the page beneath it does not move at all. */
.col-menu-item {
  display: flex;
  align-items: center;
  min-height: var(--tap);
}

/* A filter chip measured 41.7px wide — 2.3px short, and only because the word
   inside it is "all". The height was already right. */
a.chip { min-width: var(--tap); }

/* A tick box is a 13px glyph; what a thumb hits is the <label> wrapped round
   it, which is what the sweep measures and what DESIGN.md calls the target.
   The label is a row on a form, or a cell on a settings table, and either is
   free to be a row's height. */
label.inline,
td > label:has(> input[type="checkbox"]) {
  display: flex;
  align-items: center;
  min-height: var(--tap);
}

/* A <summary> is the other tag the floor was never asserted on. The one a form
   carries is "Remove this address" / "Remove this number" — a disclosure at the
   foot of a card, with room under it. */
details.fc-wide > summary {
  display: flex;
  align-items: center;
  min-height: var(--tap);
}

/* ---------------------------------------------------------------------------
   LEFT ALONE, ON PURPOSE. Each of these can only reach 44px by covering the
   control next to it or by changing a shape Keith has approved.

   .col-menu-toggle  — the arrow beside a column heading. 2.4px of margin
       separates it from the sort link on its left, so a 44px reach would sit
       on top of the column's own name. Widening the painted arrow instead
       widens every heading in every list.
   .row-tick / .tick-all — the tick boxes on a list. A compact row is shorter
       than 44px, so a 44px band would overlap the rows above and below, whose
       own bands overlap back: the effective target ends up offset from the box
       a person can see, which is worse than a small one. Keith, 16 September
       2026: "Compact style wins" — the row is the compact height.
   .cal-dnum / .cal-more — the day number and the "+n more" link on a month
       calendar. Both are stacked inside one day cell with the event chips
       between them, and every chip is itself a target; a 44px band on either
       would cover a chip.
   .health-word / .status-word IN A TABLE ROW — the width is taken above, the
       height is not, for the reason written beside it: the row it sits in is
       shorter than 44px and the rows either side of it are targets.
   ------------------------------------------------------------------------ */

/* THE WEEKLY REVIEW'S TWO LISTS ARE TWO SHARED CARDS — 21 October 2026, Keith:
   "the layout with separate cards". "Still stuck" and "Reviewed" are
   sectionCard()s in `.cx-pcards` (public/customer-record.css), so each
   heading is its card's own grey strip with its sentence, its count line and its
   table inside the same panel. The stack stays one column of the list shell's
   flex chain (`.list-results` is flex, `.acct-scroll` is the box that scrolls),
   with the stuck card taking the height and the reviewed card its own. The
   tables keep their own box inside the card and take its inner padding. */
.cx-pcards.review-cards { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.review-cards > .scard { display: flex; flex-direction: column; flex: 0 0 auto; min-height: 0; }
.review-cards > .scard:first-child { flex: 1 1 auto; }
.review-cards > .scard > .acct-scroll { margin: 0 var(--sp-md) var(--sp-md); }
/* THE STUCK TABLE'S HEADING ROW IS EVEN — the same fix as the Projects list's
   `proj-realised-col`. "What it is", "Why it is stuck" and "How long" folded onto
   two lines where "Account or contact" and "What is happening" held one. The
   container query on `.acct-table th` lets a heading wrap; a class on the
   heading outranks it, and the words are unchanged. */
.acct-table th.review-col-nowrap { white-space: nowrap; }
