/* =========================================================================
   IMC Scheduler — visual system

   The audience is anesthesiologists reading a dense grid under time pressure,
   so the categorical palette borrows the one colour language they already read
   fluently: physiologic monitor traces. ECG green, SpO2 cyan, arterial red,
   PA yellow, agent violet. A cardiac partner seeing cyan on the CV row is not
   learning a new convention.

   Type is IBM Plex — Sans for interface, Mono for the grid. Monospace in the
   grid is functional, not decorative: name abbreviations align into columns so
   a scheduler can scan a row for a repeat without reading it.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Sans+Condensed:wght@600&display=swap');

:root {
  /* How far installTips() (web/case-form-kit.js) has slid an open circled-i
     bubble back inside the screen; 0 until it has. */
  --tip-shift: 0px;
  /* LIGHT IS THE DEFAULT NOW, and the three-block shape is unchanged — only
     its polarity is. Chris, 25 Oct 2026, asked for a feel closer to Claude
     Desktop, Chrome and Google Drive and chose light-first with dark fully
     kept, and near-neutral greys with a faint cool cast over warm paper.

     EVERY VALUE BELOW WAS MEASURED, not picked. The ratios quoted are against
     --panel-2, where most text in this app is drawn. */
  --ink:        #F1F3F4;
  --panel:      #FFFFFF;
  --panel-2:    #F8F9FA;
  --panel-3:    #ECEFF1;
  /* SURFACES SIT ONE STEP APART, and --line is almost invisible on purpose:
     1.37:1, the weight Drive and Chrome use for a divider. Separation is done
     by SPACING and by panel-3 on hover, not by fencing every box. */
  --line:       #DADCE0;
  --line-soft:  #E8EAED;
  /* AND A CONTROL KEEPS A REAL BORDER. 3.87:1 on --panel, 3.67:1 on --panel-2,
     against the 3:1 floor for a graphic. A divider may whisper; an input,
     select or outlined button may not, because it has to be found before it
     can be operated. NEVER use --line on a control. */
  --line-strong: #7E8287;
  --text:       #1F2328;
  /* --text-dim IS THE FAINTEST INK THAT MAY LAND ON A WASHED CELL, which is
     the floor that set it: 5.81:1 on the weekend wash and 4.89:1 on the
     holiday wash, where the holiday composites over --panel-3 and is the
     darkest surface this app draws quiet text on. #5F6368 — Google's own
     secondary grey, and the first choice here — is 4.06:1 there, under the
     floor. Darkening the TEXT rather than lightening the wash is deliberate:
     Chris ruled on 22 Oct 2026 that the bands be stronger ("Keep it neutral,
     make it stronger"), so the band keeps its weight and the text meets it. */
  --text-dim:   #53575C;
  /* AND --text-faint IS FAINTER, which is the whole point of having both.
     5.02:1 on --panel-2 and 4.76:1 on --ink, the page itself — above the
     floor on every ordinary surface — and 4.23:1 on the weekend wash, which
     is UNDER it. That is not a defect: it is why band days step --text-faint
     up to --text-dim, and the step-up is only honest while this number
     genuinely fails there.
     It was #6B7076 until 31 Oct 2026, which read 4.49:1 on --ink: the rail's
     practice name, the nav counts and the header's icon buttons sat just
     under the floor on every view (the design audit; Chris: "Fix the 3 bugs
     now"). One step darker clears it and the wash still fails. */
  --text-faint: #676C72;

  /* THE PALETTE IS A PHYSIOLOGIC MONITOR and the mapping is load-bearing:
     ecg is the accent and the live state, spo2 informational, art DESTRUCTIVE
     and hard violations, pa caution and drafts, agent automated rows. A green
     that means danger anywhere in this app is a bug, not a variation.
     Every one of these is legible AS TEXT on --panel-2, not merely as a fill:
     ecg 5.10:1, spo2 5.44, art 5.50, pa 5.62, agent 6.75, grey 5.74. The old
     light --ecg #0E9C63 was 3.35:1 — under the floor, on the colour of every
     primary button and selected row. */
  --ecg:    #0B7A4E;
  --spo2:   #0B6E92;
  --art:    #C5221F;
  --pa:     #8A5A00;
  /* THE PIN ON A PINNED CELL (web/pin-mark.js), a non-text glyph, so the floor
     is 3:1 and it is drawn well past it. Paper-ink amber, a step deeper than
     --pa: 4.86:1 on the worst surface a cell is ever drawn on (--panel-3 under
     the holiday wash), 6.47:1 measured on a plain cell. Dark, below: 6.51:1
     on its worst (--panel-3 under the Liver wash), 11.86:1 on a plain cell. */
  --pin-ink: #7A4E00;
  /* THE REQUEST MARK (web/request-mark.js), also a non-text glyph, so 3:1 is the
     floor. Paper-ink indigo, kept off the amber the pin uses and the cyan of
     the draft mark; measured in scripts/a-request-wears-a-marker-browser-test.mjs
     against every cell surface, worst figure stated in the PR. */
  --request-ink: #24408F;
  --agent:  #5B3FC4;
  --grey:   #5F6368;
  /* Between amber and red, and it had to exist: a three-step scale needs a
     real middle — green, amber, ORANGE, red — or the fourth step is the third
     one again. 5.85:1 on --panel-2. */
  --warn:      #9A4C00;
  --warn-soft: rgba(154,76,0,.11);

  /* TEXT DRAWN ON AN ACCENT, which is a PAIR and not a hue. CLAUDE.md, 21 Oct
     2026: "white on the light theme's deep green, near-black on the dark
     theme's bright green. A single literal cannot serve both, and a button
     with invisible text is the usual result." White on --ecg is 5.37:1. */
  --on-accent: #FFFFFF;
  /* THE BRAND PAINTS AND THE INK READS -- three roles for one accent.
   *
   * CHRIS'S RULING, 28 Oct 2026, verbatim: "Brand for marks, readable accent
   * for text: Keep the brand green for logos, bars and fills where it reads
   * well. Text, links, selected tabs and button labels use a darker green
   * tuned per theme so they pass 4.5:1. The look stays MWA-green, but
   * readable."
   *
   * WHY THREE AND NOT ONE. wearBranding() in web/app.js used to write the
   * practice's accent over --ecg, inline on <html>, which beats every block in
   * this file. MWA's is #4ADE80 (migration 011), so on the light palette every
   * green WORD in the app -- the selected tab, the rail's current item, the
   * calendar gutter's "Q4", focus rings, white on every primary button --
   * was drawn at 1.5:1 to 1.74:1. One literal cannot be legible on a white
   * panel and a near-black one; no choice of literal fixes that.
   *
   *   --brand        the practice's colour, untouched. MARKS ONLY: the ECG
   *                  trace, accent bars and borders, fills that carry no
   *                  words. Nothing is read off a mark.
   *   --accent-ink   the brand's hue, darkened (light) or lifted (dark) until
   *                  it clears 4.5:1 on every surface text lands on. Text,
   *                  links, selected tabs, current-nav labels, selection
   *                  outlines.
   *   --accent-fill  the brand's hue, moved until --on-accent clears 4.5:1 ON
   *                  it. Primary buttons, selected pills, today's disc.
   *
   * WITH NO PRACTICE COLOUR ALL THREE ARE --ecg, which is exactly what the app
   * drew before they existed: these are aliases here, and only
   * wearBranding() writes them inline, from shared/brand-ink.js, re-derived
   * whenever the theme changes. --ecg ITSELF IS NEVER REWRITTEN NOW -- it is
   * the monitor palette's green again, and no rule reads it directly; every
   * accent use names its ROLE (scripts/the-brand-paints-and-the-ink-reads-
   * test.mjs holds that line).
   *
   * Defined ONCE, on bare :root, and NOT copied into the dark blocks. A var()
   * resolves against the element's own computed properties, so when the dark
   * theme redefines --ecg to its brighter #3DDC97 these follow it for free,
   * and an inline value on <html> beats this declaration and is followed by
   * every alias below it. One definition that cannot drift beats three that
   * can. */
  --brand:       var(--ecg);
  --accent-ink:  var(--ecg);
  --accent-fill: var(--ecg);
  /* THE FOCUS RING, which had no token and therefore no floor. It is the INK,
     not the brand: a ring has to clear 3:1 against what is next to it (WCAG
     1.4.11), and the brand on the light palette is 1.5:1. Unbranded it is
     --ecg as it always was -- 5.10:1 against --panel-2 in light, and the
     literal each dark block used to carry, #3DDC97, in dark. */
  --focus:       var(--accent-ink);
  /* THE ACTIVE ACCENT is the readable one. A rule that writes var(--accent)
   * is asking for "the accent colour" and almost always draws words with it;
   * pointing the alias at the ink means the default is the legible choice. */
  --accent:      var(--accent-ink);
  --accent-soft: var(--ecg-dim);
  --ok-soft:     var(--spo2-dim);
  --ecg-dim:   rgba(11,122,78,.10);
  --spo2-dim:  rgba(11,110,146,.10);
  --art-dim:   rgba(197,34,31,.10);
  --pa-dim:    rgba(138,90,0,.12);
  --agent-dim: rgba(91,63,196,.10);

  /* THE INK OF A SHIFT CHIP, ONE PER KIND, AND NONE OF THEM IS --ecg.
   *
   * Chris, 28 Oct 2026, with a phone screenshot of My schedule's month: "The
   * trades calendar needs to display the actual shift assignments similar to
   * the personal schedule calendar (though font color needs to be more
   * legible)". The chips he pointed at were the green Call ones -- "IMC 3rd",
   * "IMC Night" -- pale green on pale green.
   *
   * THE STYLESHEET SAID 4.69:1 AND THE PHONE DREW 1.52:1, and the gap is the
   * reason these exist. `.calb-call` took its ink from --ecg, and --ecg is
   * the one token the app rewrites at runtime: wearBranding() in web/app.js
   * sets the practice's accent INLINE on <html>, which beats every theme
   * block. MWA's branding row has carried "#4ADE80" since migration 011 -- a
   * green chosen when the app was dark-first -- so on the light palette, the
   * default since 25 Oct, every call chip was #4ADE80 on a pale green wash:
   * 1.52:1. Measured in a real browser by
   * the-trade-calendar-names-the-shift-browser-test before this change.
   *
   * SO A CHIP'S INK IS THE THEME'S AND NOT THE PRACTICE'S. A practice colour
   * belongs on the chrome that says whose app this is; it cannot also be the
   * text colour of the schedule, because one literal cannot be legible on
   * both a white panel and a near-black one. These five are declared in each
   * theme block and nothing writes them from script.
   *
   * AND 7:1, NOT 4.5. On a phone a chip is 9.5px, where 4.5:1 is a floor
   * and not a target, and the old inks sat at 4.69 to 6.11 here on paper --
   * a pass that still reads as faint at that size. Each is the same
   * hue as its palette colour, darkened until it clears AAA on its own wash
   * over --panel: call 7.23, tier 7.29, OB 7.32, away 7.29, post 7.35.
   * the-month-draws-a-run-test recomputes every one from these values. */
  --call-ink: #075A3A;
  --tier-ink: #08546F;
  --ob-ink:   #4F36AD;
  --away-ink: #694400;
  --post-ink: #4A4D52;

  /* RADIUS IS A RULE NOW, NOT A HABIT. Chris, 25 Oct 2026: "keep 8px as the
     card radius, 6px for controls." --radius keeps its name and its 6px
     because every control in this file already reads it; what was drifting
     was ten bare `8px` declarations on cards, which now have a token. */
  --radius: 6px;
  --radius-sm: 3px;
  --radius-card: 8px;
  --radius-pill: 999px;
  --cell-w: 40px;
  /* The size a grid draws its names at. Set per grid by the +/- (colVar in
     app.js) together with --cell-w and --row-h; this is "fit". */
  --cell-fs: 11px;
  --row-h: 25px;
  --rail-w: 212px;
  --rail-w-collapsed: 64px;
  --task-w: 178px;
  /* SEVEN TYPE SIZES, and every interface font-size names one. Chris, 31 Oct
     2026, after the design audit counted 25 sizes in this file and 22 drawn
     (half-pixel steps among them): "Seven sizes" -- 11/12/13/14/15/18/22.
     The old values were folded DOWN to the nearest step (11.5 -> 11,
     12.5 -> 12, 13.5 -> 13, 16 -> 15, 20 -> 18), so no line got longer;
     10.5 went UP to 11, the floor.
     NOT ON THE SCALE, on purpose: the grid, which keeps its zoom
     (--cell-fs); icon glyphs, which are sized as pictures; the 16px on
     phone fields, which stops iOS zooming on focus; and the sub-11px labels
     inside calendar cells, tab-bar items and badges, left as they were
     until Chris rules on them. */
  --fs-xs: 11px;      /* labels, captions, chips, table meta */
  --fs-sm: 12px;      /* secondary lines, help, dense rows */
  --fs-ui: 13px;      /* controls and most interface text */
  --fs-body: 14px;    /* reading text */
  --fs-title: 15px;   /* page and panel titles */
  --fs-lg: 18px;      /* stat values, sheet titles */
  --fs-xl: 22px;      /* the one big number or heading on a screen */
  /* ONE CONTROL HEIGHT, ONE CHIP. The audit (31 Oct 2026) counted 45 button
     renderings, inputs and selects from 22 to 33px tall and eight chip
     variants in five shapes; Chris: unify "buttons, fields, chips" first.
     A button and the field beside it are the same height now, a small
     button is one size rather than three, and a chip is either a LABEL
     (square, says what something is) or a PILL (round, a state or a toggle).
     The touch floor is separate and waits on Chris's 24/44 choice. */
  --control-h: 30px;     /* .btn, inputs, selects */
  --control-h-sm: 24px;  /* .btn.small / .btn.tiny */
  --tag-px: 6px;         /* a label's side padding */
  --tag-lh: 1.6;         /* and its line, which sets its height */
  --pill-h: 24px;        /* a toggle pill: filter, tier, team */
  --pill-px: 10px;
  /* ONE DAY LIST. The case log (.cdl-*), the shift log (.slog-*) and the
     day's record (.logday-*) each draw a day as a card of rows; they share
     these so the three read as one list (the audit, 31 Oct 2026). */
  --day-r: var(--radius-card);
  --day-pad: 6px 10px;
  --day-rule: 1px solid var(--line-soft);
  /* SPACING IS THE DIVIDER. With borders gone from most surfaces, the gap
     between two regions is what tells the eye where one ends — removing a
     border and keeping the old padding gives mush, not calm. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  /* The minimum height of an interactive list row. Dense type in a comfortable
     target is the whole of "condensed and friendly"; shrinking the target to
     match the type is what makes an app feel cramped. The GRID is exempt and
     keeps --row-h: it is a spreadsheet, not a list. */
  --row-min: 40px;
  /* WEEKEND AND HOLIDAY BANDS. Neutral on purpose: every hue in this palette
     already means a kind of work, and a weekend is a property of the DAY, not
     a kind of work. The strengths are Chris's, 22 Oct 2026 — "needs to be more
     clear throughout... Keep it neutral, make it stronger" — and they are held
     against a floor: --text-dim must stay at 4.5:1 on every surface a wash can
     produce. the-band-reaches-the-header-test recomputes all of it from these
     very values, so a later raise past a floor fails CI rather than shipping.
     On the light palette: weekend 4.83:1, hatch 4.54:1, holiday 4.88:1. */
  --variant-ink: rgba(31,35,40,.50);
  --vtag-ink: rgba(31,35,40,.66);
  --wknd-wash: rgba(31,35,40,.09);
  --holi-wash: rgba(31,35,40,.13);
  --holi-hatch: rgba(31,35,40,.12);
  --band-edge: rgba(95,99,104,.88);
  /* THREE STEPS, NOT ONE SLAB. The old single `0 16px 48px rgba(0,0,0,.5)` sat
     under menus, cards and modals alike and read as a 2015 dialog on all of
     them. Raised is barely there; --shadow is a menu or the drawer; modal is
     the only thing that floats above the whole app. */
  --shadow-raised: 0 1px 2px rgba(31,35,40,.09);
  --shadow: 0 4px 14px rgba(31,35,40,.12), 0 1px 3px rgba(31,35,40,.08);
  --shadow-modal: 0 12px 32px rgba(31,35,40,.18);
  /* The scrim behind a modal, which was three different literals. */
  --scrim: rgba(31,35,40,.45);
  color-scheme: light;
}

/* ------------------------------------------------------------ density ---
 *
 * Chris, 26 Oct 2026: "Do most users prefer expanded rows rather than the
 * compact? Am I forcing my personal preference over the average user
 * preferences?" -- and, answering himself, "My personal preference is almost
 * always compact, but we need to accommodate multiple other users of catering
 * age and tech comfort."
 *
 * THE TOKENS WERE ALREADY THE RIGHT SHAPE, which is why this is forty lines
 * and not a rewrite: `--space-1` through `--space-6` and `--row-min` are read
 * by every view in this sheet, so one block per level moves all of them at
 * once. Nothing below this line knows a density exists.
 *
 * `comfortable` IS THE VALUES THE APP ALREADY HAD. It is written out rather
 * than left implicit so the three read as one table -- a reader comparing
 * levels should not have to scroll up to the `:root` block to find the middle
 * one. It also means `data-density` is always present and always meaningful.
 *
 * THE GRID IS EXEMPT, as `--row-min`'s own note says: it keeps `--row-h`
 * because it is a spreadsheet, not a list, and a committee member reading
 * ninety columns of quarter wants the same cell height whatever they chose
 * for the lists.
 *
 * WHICH ONE IS WRITTEN is decided in web/app.js from the stored preference
 * and, for `auto`, the viewport -- see resolveDensity in
 * shared/display-prefs.js, where the 1280px breakpoint Chris named lives with
 * its own test. */
:root[data-density="compact"] {
  --space-1: 3px;
  --space-2: 6px;
  --space-3: 9px;
  --space-4: 12px;
  --space-6: 18px;
  /* 32px still clears the 24px a mouse needs comfortably. It is under the
     44px a thumb wants, which is exactly why `auto` never chooses this on a
     phone. */
  --row-min: 32px;
}
:root[data-density="comfortable"] {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --row-min: 40px;
}
:root[data-density="spacious"] {
  --space-1: 6px;
  --space-2: 11px;
  --space-3: 16px;
  --space-4: 22px;
  --space-6: 32px;
  /* Past the 44px both Apple and Google ask for a touch target, which is the
     point of this level: it is chosen by somebody whose thumb keeps catching
     the wrong row. */
  --row-min: 48px;
}

/* BOTH THEMES ARE OFFICIAL, AND THE SHAPE IS WHAT KEEPS THEM REACHABLE.
   CLAUDE.md records Chris on 21 Oct 2026: "Always create official dark and
   light modes." Both palettes were here before and NEITHER was reachable as
   intended — index.html carried `<html data-theme="light">` hard-coded, so the
   dark palette was dead code on every device.

   THE THREE BLOCKS, each earning its place: light on a bare :root is the
   default when nothing is known; the media query follows the device, which is
   the answer for almost everybody; and the explicit attribute wins over both,
   which is what a toggle needs. `:not([data-theme="light"])` is what stops the
   media query overriding someone who deliberately chose LIGHT on a dark-mode
   device — the guard a rewrite loses first, and losing it is the whole reason
   both-themes-reachable-test exists.

   THE DARK VALUES APPEAR TWICE. There is no build step here — zero runtime
   dependencies is a constraint of this project, not an accident — so the
   duplication is the honest cost of the pattern. It is not left to discipline:
   both-themes-reachable-test parses this file and fails if the two blocks stop
   agreeing, token for token and value for value.

   WHICH PALETTE IS DUPLICATED FLIPPED ON 25 OCT 2026 with the default. It was
   light written twice; it is dark now. The structure, the guard and the test
   are otherwise unchanged. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --ink:        #121316;
  --panel:      #1B1D21;
  --panel-2:    #202327;
  --panel-3:    #282B30;
  --line:       #35383D;
  --line-soft:  #2A2D32;
  --line-strong: #7E8287;
  --text:       #E8EAED;
  --text-dim:   #BDC1C6;
  --text-faint: #8E9398;
  --ecg:    #3DDC97;
  --spo2:   #35C4E8;
  --art:    #FF6B78;
  --pa:     #F7C948;
  --pin-ink: #F7C948;
  --request-ink: #B0C4FF;
  --agent:  #B39CFC;
  --grey:   #9AA0A6;
  --warn:      #FFA552;
  --warn-soft: rgba(255,165,82,.15);
  --on-accent: #0B1210;
  --ecg-dim:   rgba(61,220,151,.14);
  --spo2-dim:  rgba(53,196,232,.14);
  --art-dim:   rgba(255,107,120,.16);
  --pa-dim:    rgba(247,201,72,.14);
  --agent-dim: rgba(179,156,252,.13);
  /* Chip inks: see the light block. Lifted toward white rather than darkened,
     to 7:1 on each wash over the dark --panel -- call 7.10, tier 7.26, OB
     7.24, away 7.81, post 7.12. Call and away already cleared it as the
     palette colours and are those colours, written here as literals so the
     practice accent cannot reach them. */
  --call-ink: #3DDC97;
  --tier-ink: #5ED0EE;
  --ob-ink:   #C6B5FD;
  --away-ink: #F7C948;
  --post-ink: #B4B8BD;
  --variant-ink: rgba(232,234,237,.58);
  --vtag-ink: rgba(232,234,237,.72);
  --wknd-wash: rgba(232,234,237,.075);
  --holi-wash: rgba(232,234,237,.10);
  --holi-hatch: rgba(232,234,237,.13);
  --band-edge: rgba(154,160,166,.90);
  --shadow-raised: 0 1px 2px rgba(0,0,0,.40);
  --shadow: 0 4px 16px rgba(0,0,0,.50);
  --shadow-modal: 0 12px 36px rgba(0,0,0,.60);
  --scrim: rgba(0,0,0,.62);
  color-scheme: dark;
  }
}

/* An explicit choice beats the device, in either direction. */
:root[data-theme="dark"] {
  --ink:        #121316;
  --panel:      #1B1D21;
  --panel-2:    #202327;
  --panel-3:    #282B30;
  --line:       #35383D;
  --line-soft:  #2A2D32;
  --line-strong: #7E8287;
  --text:       #E8EAED;
  --text-dim:   #BDC1C6;
  --text-faint: #8E9398;
  --ecg:    #3DDC97;
  --spo2:   #35C4E8;
  --art:    #FF6B78;
  --pa:     #F7C948;
  --pin-ink: #F7C948;
  --request-ink: #B0C4FF;
  --agent:  #B39CFC;
  --grey:   #9AA0A6;
  --warn:      #FFA552;
  --warn-soft: rgba(255,165,82,.15);
  --on-accent: #0B1210;
  --ecg-dim:   rgba(61,220,151,.14);
  --spo2-dim:  rgba(53,196,232,.14);
  --art-dim:   rgba(255,107,120,.16);
  --pa-dim:    rgba(247,201,72,.14);
  --agent-dim: rgba(179,156,252,.13);
  --call-ink: #3DDC97;
  --tier-ink: #5ED0EE;
  --ob-ink:   #C6B5FD;
  --away-ink: #F7C948;
  --post-ink: #B4B8BD;
  --variant-ink: rgba(232,234,237,.58);
  --vtag-ink: rgba(232,234,237,.72);
  --wknd-wash: rgba(232,234,237,.075);
  --holi-wash: rgba(232,234,237,.10);
  --holi-hatch: rgba(232,234,237,.13);
  --band-edge: rgba(154,160,166,.90);
  --shadow-raised: 0 1px 2px rgba(0,0,0,.40);
  --shadow: 0 4px 16px rgba(0,0,0,.50);
  --shadow-modal: 0 12px 36px rgba(0,0,0,.60);
  --scrim: rgba(0,0,0,.62);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; height: 100%;
  /* Mobile Safari and Chrome Android inflate text in a narrow column, so the
     14px this file sets arrives on a phone as 17 and the careful hierarchy
     between a lede, a label and a hint collapses. The page is already
     responsive; it does not want a second opinion. */
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  background: var(--ink);
  color: var(--text);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: var(--fs-body);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--spo2); }

/* ------------------------------------------------------------------ shell */

/* 100dvh, not 100vh. On iOS Safari and Chrome Android the large viewport unit
 * includes the URL bar that is NOT actually there, so a 100vh shell is taller
 * than the window and the bottom tab bar -- the only navigation a phone has --
 * sits below the fold until the address bar retracts. `dvh` tracks the visual
 * viewport. The vh line stays first as the fallback for anything that does not
 * know dvh. */
/* THE TICKER: one thin line of status above everything.
 *
 * Chris, 23 Oct 2026: "make this a thin ticker of information along the very
 * top of the screen instead of text tiles." The four chips said what is true
 * of the block on screen and did it from inside the header, competing for the
 * same row as the block picker and the builder.
 *
 * THE APP LOSES ITS HEIGHT TO IT, which is why `.app` is a calc rather than a
 * flat 100dvh: the grid sizes itself to the viewport, and a strip added above
 * it without this pushes the last row off the bottom of every screen.
 *
 * FLAT, NOT PILLS. "Instead of text tiles" is the whole instruction -- the
 * chips keep their colour, which is what carries the meaning, and lose the
 * border and the background that made each one a tile.
 */
.ticker {
  display: flex; align-items: center; gap: 0;
  height: var(--ticker-h); padding: 0 12px;
  background: var(--panel-2); border-bottom: 1px solid var(--line);
  font-size: var(--fs-xs); line-height: 1; white-space: nowrap;
  overflow-x: auto; scrollbar-width: none;
}
.ticker::-webkit-scrollbar { display: none; }
.ticker .chip {
  border: 0; background: none; padding: 0 10px; border-radius: 0;
  font-size: var(--fs-xs); letter-spacing: .04em;
}
/* A hairline between items, which is what separates them now that the pill
 * outline is gone. Not before the first, and never before a hidden one. */
.ticker .chip + .chip:not([hidden]) { border-left: 1px solid var(--line); }
.ticker .chip[hidden] { display: none; }
/* A TICKER WITH NOTHING TO SAY TAKES NO ROOM, and that is the common case
 * rather than an edge: on any screen that is not about a block the view gate
 * hides four of the five chips, and a partner session hides three of them
 * outright. An empty 24px band above the header is the thing he asked to be
 * rid of on 8 Oct, so render() decides whether the strip says anything and
 * marks the body; both halves of the consequence are here.
 *
 * TWO HALVES, because the shell is the viewport LESS the strip: hiding the
 * strip alone would leave a 24px hole at the bottom of every screen, so the
 * variable goes to zero in the same breath and the calc below takes the height
 * back. See the comment on `no-ticker` in app.js for why the decision cannot
 * be made from the markup. */
:root { --ticker-h: 24px; }
.ticker[hidden] { display: none; }
body.no-ticker { --ticker-h: 0px; }

.app { display: grid; grid-template-columns: var(--rail-w) 1fr;
       height: calc(100vh - var(--ticker-h)); height: calc(100dvh - var(--ticker-h)); }
/* COLLAPSED: the rail keeps its labels in the DOM and loses its width.
 *
 * Chris, 25 Aug 2026: "make the left navigation pane collapsible to maximize
 * screen space." A quarter-block grid is wide, and on a laptop the rail is the
 * only thing that can give room back.
 *
 * Width on the grid rather than display:none on the rail, so the buttons stay
 * focusable and a keyboard user can still tab the navigation while it is
 * narrow. The labels are clipped, not removed. */
.app.rail-collapsed { grid-template-columns: 44px 1fr; }

/* THE RAIL LOST ITS FENCE, which is the whole of the 25 Oct direction in one
   rule. Chris asked for a feel closer to Claude Desktop, Chrome and Drive, and
   what those three have in common is mostly subtraction: the navigation sits
   on the page GROUND (--ink) and the content sits on a --panel surface beside
   it, so the step between two surfaces does the separating a 1px line was
   doing. A border here and a border on every card is how a tool comes to look
   like a form from 2009. */
.rail {
  background: var(--ink);
  display: flex; flex-direction: column; min-height: 0;
  position: relative; overflow: hidden;
}

/* THE TOGGLE FLOATS, SO THE ROW UNDER IT HAS TO KNOW HOW WIDE IT IS.
   Its size and offset are variables because .rail-top reserves exactly that
   much on its right: the toggle is absolutely positioned over the top of the
   rail, and the account row's last item -- Sign out -- sat directly beneath
   it. The way out of the app was covered by the control that hides the menu.
   Chris, 27 Aug 2026: "logout is obscured by the left panel collapse arrows."
   Two numbers in one place, so they cannot drift apart again. */
:root { --rail-toggle: 24px; --rail-toggle-gap: 6px; }

.rail-toggle {
  position: absolute; top: 8px; right: var(--rail-toggle-gap); z-index: 3;
  width: var(--rail-toggle); height: var(--rail-toggle); padding: 0; line-height: 1;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--text-faint);
  cursor: pointer; font-size: var(--fs-ui);
}
.rail-toggle:hover { background: var(--panel-3); color: var(--text); }

/* What a 44px rail shows: the current view's marker and the counts that say
   something needs attention. Everything else is clipped rather than deleted. */
.rail-collapsed .brand,
.rail-collapsed .rail-foot { display: none; }
.rail-collapsed .rail-toggle { right: 10px; }
.rail-collapsed .nav { padding: 40px 4px 10px; }
/* COLLAPSED, A PILL IS THE WRONG SHAPE: at 64px there is no text for it to
   wrap, so the item becomes a rounded square around its mark. Same states and
   the same tokens, different geometry. */
.rail-collapsed .nav button {
  padding: 8px 4px; justify-content: center; gap: 0; overflow: hidden;
  border-radius: var(--radius-card); min-height: 40px;
}
.rail-collapsed .nav button .label { display: none; }
.nav button .mark { display: none; }
.rail-collapsed .nav button .mark {
  display: block; font-family: 'IBM Plex Sans Condensed', sans-serif;
  font-size: var(--fs-ui); font-weight: 600; text-transform: uppercase;
}
.rail-collapsed .nav .count {
  margin: 0; position: absolute; right: 2px; top: 2px; font-size: 9px;
}
.rail-collapsed .nav button { position: relative; }

.brand { padding: 16px 16px 12px; }
.brand h1 {
  margin: 0; font-size: var(--fs-body); letter-spacing: .14em; text-transform: uppercase;
  font-family: 'IBM Plex Sans Condensed', sans-serif; color: var(--text);
}
/* THE WORDMARK OWNS ITS OWN CLASS, and the rename is the whole fix.
   It was `.cal`, which `#458` later took for the CALENDAR component:
   `.cal { display: flex; border: 1px solid var(--line); border-radius: 8px }`.
   This rule only ever set `color`, so flex and the border applied
   unopposed -- and a flex container is block-level, so the wordmark broke
   across two lines with "strata" boxed underneath "OR". On the sidebar, and
   on both sign-in cards. Specificity never came into it: the two rules were
   not fighting over one property, they were setting different ones. */
.brand h1 .strata { color: var(--accent-ink); }
.brand .sub { margin-top: 3px; font-size: var(--fs-xs); color: var(--text-faint); }

/* The ECG mark: a real lead-II morphology drawn once, small, as the wordmark's
   companion. It is the only ornament in the interface. */
.ecg-mark { display: block; width: 100%; height: 26px; margin-top: 10px; overflow: visible; }
.ecg-mark path {
  fill: none; stroke: var(--brand); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 300; stroke-dashoffset: 300;
  animation: trace 2.4s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes trace { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .ecg-mark path { animation: none; stroke-dashoffset: 0; }
}

/* THE TWO HATS, at the top of the rail where the thing it governs begins.
 *
 * A segmented pair rather than one toggle: both states are named and visible,
 * so which one you are in is readable without clicking. A control labelled
 * only with where it would TAKE you is the one half the room misreads as
 * where they ARE.
 *
 * Only drawn for an account that has both -- see bothHats() -- so a partner
 * and a non-clinician chair never see a switch with one side that does
 * nothing. */
.mode-switch {
  display: flex; gap: 2px; margin: 0 2px 8px;
  padding: 2px; background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.nav .mode-switch button.mode-btn {
  flex: 1; width: auto; justify-content: center; gap: 0;
  padding: 5px 8px; font-size: var(--fs-sm); font-weight: 600;
  color: var(--text-dim); border-radius: calc(var(--radius) - 2px);
}
.nav .mode-switch button.mode-btn:hover { background: var(--panel-2); color: var(--text); }
.nav .mode-switch button.mode-btn.on {
  background: var(--panel-3); color: var(--text); box-shadow: none;
}
/* Collapsed, the words do not fit and the switch still has to work -- it is
   the one control in the rail that has no other route to it. The .mark/.label
   rules below already swap a tab's words for its initial, and these buttons
   carry the same pair, so this only has to stack them. */
.rail-collapsed .mode-switch { flex-direction: column; margin: 0 0 8px; }
.rail-collapsed .nav .mode-switch button.mode-btn { padding: 5px 0; }

/* THE MENU SCROLLS, BECAUSE IT OUTGREW THE SCREEN AND THE RAIL CLIPS.
 *
 * Chris, 24 Oct 2026: "even in full screen mode, the options on the left run
 * off the bottom of the screen with no scroll to get to the other items."
 *
 * `.rail` is `overflow: hidden` and `.app` is exactly the viewport less the
 * ticker, so anything past the fold was cut off rather than reachable -- and
 * `.rail-foot`, which holds the way OUT of the app, went with it. That is the
 * same injury as "logout is obscured by the left panel collapse arrows" from
 * 27 Aug, by a different route.
 *
 * IT IS NOT AN EDGE CASE AND IT GETS WORSE. A chair is offered every one of
 * PARTNER_VIEWS and COMMITTEE_VIEWS -- twenty-nine entries at roughly 35px,
 * so better than a thousand pixels of menu before the brand block is counted.
 * Every view added to either list makes it worse, and views get added.
 *
 * `min-height: 0` IS THE HALF THAT DOES THE WORK. A flex child's floor is its
 * content, so `overflow-y: auto` alone never engages: the nav simply stays
 * tall and the rail goes on clipping it. Removing this line restores the bug
 * while leaving the scroll declaration sitting there looking correct. */
.nav {
  padding: 10px 8px; display: flex; flex-direction: column; gap: 1px;
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
}
/* A PILL, AND A 40px TARGET. --row-min is what makes this condensed AND
   comfortable at once: the type stays at 13px where a dense rail needs it,
   and the thing you tap does not shrink to match it. Shrinking the target to
   the type is what makes an app feel cramped rather than compact. */
.nav button {
  display: flex; align-items: center; gap: 9px; width: 100%;
  min-height: var(--row-min);
  padding: 8px 12px; background: none; border: 0;
  border-radius: var(--radius-pill);
  color: var(--text-dim); cursor: pointer; text-align: left; font-size: var(--fs-ui);
}
.nav button:hover { background: var(--panel-3); color: var(--text); }
/* SELECTION IS A FILLED PILL, not an edge bar. The `inset 2px 0 0` rule this
   replaces was doing the job of a border on a rail that no longer has one, and
   it read as a fifth kind of line on a screen already carrying four. The
   accent wash with the accent ink says "this one" in the vocabulary the rest
   of the app already uses for it. */
.nav button[aria-current="true"] {
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 600;
}
.nav .count {
  margin-left: auto; font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-xs);
  color: var(--text-faint);
}
.nav .count.bad { color: var(--art); font-weight: 600; }

/* The account block, now at the top of the rail with the wordmark. Sitting at
   the bottom of a seventeen-item list, it was below the fold on a short
   window -- and the first thing anybody looks for is who they are signed in
   as. */
.rail-top {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 10px;
  /* Clear of the floating collapse control. See .rail-toggle. */
  padding-right: calc(var(--rail-toggle) + var(--rail-toggle-gap) + 4px);
}
.rail-top .me { flex: 1; min-width: 0; font-size: var(--fs-xs); }
/* Small, quiet, and the same size as each other: a display preference and the
   way out are both incidental to the work, and neither deserves a full-width
   button. */
.btn.icon {
  flex: none; width: 26px; height: 26px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--fs-ui); line-height: 1; text-decoration: none;
  background: none; border: 1px solid transparent; color: var(--text-faint);
}
.btn.icon:hover { color: var(--text); border-color: var(--line); background: var(--panel-2); }
.rail-collapsed .rail-top { display: none; }
/* THE NAME GETS A LINE OF ITS OWN IN THE SIDEBAR (Chris, 13 Nov 2026: the
   username and the bell overlapped between about 861 and 1180px). The row is
   name | bell | theme | sign out in a 168px rail (212px above 1180), less the
   room kept clear of the collapse arrow: the name's box came out 6px wide, and
   its text, unclipped, was drawn on across the bell. Wrapping the buttons to a
   second line gives the name the whole row, and it ellipsises there instead of
   running under anything. Phones keep their one-line strip (see the 860px
   block, which sets its own flex and clipping). */
@media (min-width: 901px) {
  .rail-top { flex-wrap: wrap; row-gap: 4px; }
  .rail-top .me { flex: 1 1 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* THE INBOX BELL, beside the theme button and the same size as it (Chris,
   29 Oct 2026). The count rides its corner rather than sitting beside it, so
   the strip on a phone is no wider with twelve unread than with none. In the
   accent and its own ink token, not in --art: a new notice is news, not a
   violation, and red in this app means something is wrong. */
.inbox-bell { position: relative; }
.inbox-bell svg { width: 14px; height: 14px; fill: currentColor; }
/* THE SIGN-OUT ICON: a door and an arrow drawn in the text colour, so it follows
   both themes (an emoji glyph does not). Stroked, not filled. */
.signout-icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.inbox-count {
  position: absolute; top: -4px; right: -5px;
  min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px;
  background: var(--accent-fill); color: var(--on-accent);
  font-size: 9.5px; font-weight: 700; line-height: 15px; text-align: center;
  pointer-events: none;
}

/* ------------------------------------------------- a settings segment
   The Settings panel's two controls. `segctl` rather than `seg`, which is
   already the grid's coloured band segment: one stylesheet, one namespace.
   Real <button>s in a role="tablist", so Tab reaches them and a screen reader
   is told which is chosen -- a div with an onClick is skipped entirely. */
.segctl {
  display: flex; gap: 4px; margin-top: 8px; padding: 4px;
  background: var(--panel-2); border: 1px solid var(--line-soft);
  border-radius: 10px;
}
.segctl button {
  flex: 1; min-height: 40px; padding: 4px 8px; border: 0; border-radius: 7px;
  background: none; color: var(--text-dim); font: inherit; font-size: var(--fs-ui);
  cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
}
.segctl button:hover { color: var(--text); }
/* --shadow-raised, NOT --shadow. `--shadow` is the menu-and-drawer step --
   `0 4px 14px` -- and under a 30px pill it reads as the button floating a
   centimetre off the page. It was always the wrong step; it only became
   obvious when the control shrank into a settings row on 26 Oct 2026. */
.segctl button[aria-selected="true"] {
  background: var(--panel-3); color: var(--text); box-shadow: var(--shadow-raised);
}
.segctl button[aria-selected="true"] .segctl-label { font-weight: 600; }
.segctl button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
/* The example IS the answer for a time format, so it is drawn in the grid's
   own mono -- "7:12 PM" against "19:12" is what the choice actually looks
   like, where "Standard" and "Military" only name it. */
.segctl-eg {
  font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-xs);
  color: var(--text-faint); letter-spacing: -.01em;
}
.segctl button[aria-selected="true"] .segctl-eg { color: var(--spo2); }

/* ======================================== the shift list, as a list
 *
 * Chris, 26 Oct 2026: "the list format should be much more compact, contain
 * all the pertinent data still, but be a true list not a column of tiles
 * while remaining a modern aesthetic."
 *
 * WHAT MADE IT A COLUMN OF TILES. Every day was a `.card` with its own
 * padding, its own border and 8px of air under it, so a day holding one shift
 * cost 78px to say eleven words. And nothing lined up: each tile sized itself,
 * so the eye could not run down the dates, or the tasks, or the hours.
 *
 * A TRUE LIST IS COLUMNS THAT HOLD. Three of them, the same width on every row
 * of the screen. The hours column is a FIXED width rather than `auto` for
 * exactly that reason: `auto` is measured per grid, and one grid per day would
 * give each day its own answer and lose the alignment that makes this a list.
 *
 * THE ROW KEEPS ITS TARGET. --row-min is for things you press; these rows are
 * read, not pressed -- the block's list is the clickable one -- so they are
 * sized to the type instead, which is where the compaction comes from. */
.daylist {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-card); overflow: hidden;
}
.dl-day {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 46px;
  align-items: baseline;
  column-gap: var(--space-3); row-gap: 1px;
  padding: 5px 12px;
}
.dl-day + .dl-day { box-shadow: inset 0 1px 0 var(--line-soft); }
/* The band days, so a Saturday can be found by running down the column --
   which is most of what somebody scanning their own past is doing. */
.dl-day.wknd { background: var(--wknd-wash); }
.dl-day.today { box-shadow: inset 2px 0 0 var(--brand); }
.dl-day.today + .dl-day { box-shadow: inset 0 1px 0 var(--line-soft); }

/* ONE DATE PER DAY, spanning its own rows: a day with a call and a tier is one
   date and two shifts, and printing it twice would read as two days. */
.dl-date {
  grid-column: 1; align-self: start;
  display: flex; align-items: baseline; gap: 6px;
  font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-xs);
  color: var(--text-faint); white-space: nowrap;
}
.dl-day.wknd .dl-date { color: var(--text-dim); }
.dl-date b {
  font-family: 'IBM Plex Sans Condensed', sans-serif;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-dim);
}
.dl-task {
  grid-column: 2; min-width: 0;
  display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap;
  font-size: var(--fs-ui); line-height: 1.5;
}
.dl-task.gone s { color: var(--text-faint); }
.dl-task.away { color: var(--pa); }
/* The hospital and the clock are the same weight of fact: present when they
   add something, never competing with the name of the shift. */
.dl-site, .dl-clock { font-size: var(--fs-xs); color: var(--text-faint); }
.dl-clock { font-family: 'IBM Plex Mono', monospace; }
.dl-tag {
  padding: 0 var(--tag-px); border-radius: var(--radius-pill);
  background: var(--spo2-dim); color: var(--spo2);
  font-size: var(--fs-xs); line-height: var(--tag-lh);
}
.dl-h {
  grid-column: 3; text-align: right;
  font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums; color: var(--text-dim);
}

@media (max-width: 560px) {
  /* The date goes above its shifts rather than beside them: 104px of a 390px
     screen is a quarter of the row spent on something the eye only needs
     once per day. The hours stay on the right of their own shift, which is
     the column worth keeping. */
  .dl-day { grid-template-columns: minmax(0, 1fr) 46px; padding: 6px 10px; }
  .dl-date { grid-column: 1 / -1; grid-row: auto !important; }
  .dl-task { grid-column: 1; }
  .dl-h { grid-column: 2; }
}

/* ==================================================== settings, as a list
 *
 * Chris, 25 Oct 2026: "settings should be concise not spread out like
 * currently (detailed explanations can instead be hover shown or collapsed),
 * see examples from chrome, windows 11 settings."
 *
 * THE DECISION IS THE LINE. Label on the left, control on the right, and the
 * paragraph that used to sit under every one of them behind the chevron. The
 * row keeps --row-min as its height because that is the rule the shell set on
 * 25 Oct -- dense type in a comfortable target is the whole of "condensed and
 * friendly", and shrinking the target to match the type is what makes an app
 * feel cramped.
 *
 * ONE HAIRLINE BETWEEN ROWS AND NONE AT THE EDGES, which is the Chrome and
 * Windows 11 shape and the reason `inset 0 -1px 0` is used rather than
 * border-bottom: the last row would otherwise draw a line onto the card's own
 * rounded corner. */
.setgroup { margin-bottom: var(--space-4); }
.setgroup-name {
  margin: 0 0 7px 2px;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .09em;
  text-transform: uppercase; color: var(--text-faint);
}
.setlist {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-card); overflow: hidden;
}
.setrow:not(:last-child) { box-shadow: inset 0 -1px 0 var(--line-soft); }
.setrow-main {
  display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;
  min-height: var(--row-min);
  padding: calc(var(--space-2) - 2px) calc(var(--space-3) + 2px);
}
.setrow-label {
  flex: 1 1 200px; min-width: 0;
  display: flex; align-items: center; gap: 6px; font-size: var(--fs-ui);
}
/* THE CHEVRON IS DRAWN, NOT TYPED. A glyph would be whatever the reader's
   font has for it, which on Windows is often a different weight from the one
   beside it; two borders rotated are the same shape everywhere and take the
   row's own colour. */
.setrow-why {
  flex: 0 0 18px; width: 18px; height: 18px; padding: 0;
  border: 0; border-radius: var(--radius-pill);
  background: none; color: var(--text-faint); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.setrow-why::before {
  content: ''; width: 6px; height: 6px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .12s ease;
}
.setrow.open .setrow-why::before { transform: translateY(1px) rotate(225deg); }
.setrow-why:hover { background: var(--panel-3); color: var(--text); }
.setrow-why:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.setrow-value {
  font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-sm); color: var(--text-dim);
}
.setrow-ctl { flex: 0 0 auto; margin-left: auto; }
/* A row that states a fact rather than offering a choice still needs its right
   column filled, or the label floats alone and reads as a heading. */
.setrow-fixed { margin-left: auto; font-size: var(--fs-sm); color: var(--text-dim); }
/* `pre-line`, because the chosen option's own note is appended to the shared
   explanation with a blank line between them: one paragraph about the setting,
   then one about what the current answer means. Collapsed whitespace would run
   the two into each other. */
/* The point-tracker import on Logs (web/tracker-import-panel.js). */
.tri { margin-top: var(--space-4); padding: var(--space-3) var(--space-4); }
.tri-file { margin: 2px 0 6px; max-width: 100%; }
.tri-preview { margin-top: var(--space-2); }
.tri-list { margin: 0 0 var(--space-2); padding-left: 1.2em; }
.tri-list li { margin: 2px 0; }
.tri-open { margin-top: var(--space-2); border-top: 1px solid var(--line-soft); }
.tri-open-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 4px 0; }

/* ---------------------------------------------------------------- tiles
 *
 * A long settings page as a stack of closed tiles (web/fold-tiles.js). Chris,
 * 27 Oct 2026, of his point tracker's Compensation Rules screen: "I love the
 * way these rules/explanations are detailed to collapsed tiles". A tile is a
 * card with its name on one line and a chevron at the end; open, its section
 * sits inside it. */
.tile {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-card); margin: 0 0 var(--space-2);
}
.tile-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3); width: 100%; min-height: var(--row-min);
  padding: var(--space-3) var(--space-4); background: none; border: 0;
  border-radius: var(--radius-card); color: var(--text); cursor: pointer;
  font: inherit; font-size: var(--fs-title); font-weight: 600; text-align: left;
}
.tile-head:hover { background: var(--panel-2); }
/* A long section name wraps rather than pushing the chevron off the edge. */
.tile-title { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.tile-head:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.tile-chev {
  /* inline-block: a transform does nothing to an inline box, which left the
   * open tile's chevron pointing right. */
  display: inline-block;
  color: var(--text-faint); font-size: var(--fs-sm); flex: none;
  transition: transform .15s ease;
}
.tile.open > .tile-head .tile-chev { transform: rotate(90deg); }
.tile.open > .tile-head { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.tile-body { padding: 0 var(--space-4) var(--space-4); }
.tile-body[hidden] { display: none; }
/* A self-contained group inside a tile: the tile IS its card, so the group's
 * own frame goes, and its rows run edge to edge under the tile's title. */
.tile-body:has(> .setgroup) { padding: 0; }
.tile-body > .setgroup { margin-bottom: 0; }
.tile-body > .setgroup .setlist {
  border: 0; border-top: 1px solid var(--line-soft); border-radius: 0;
  background: transparent;
}
.tile-bar {
  display: flex; gap: var(--space-2); align-items: center; justify-content: flex-end;
  margin: 0 0 var(--space-2);
}
.tile-bar .linkish {
  background: none; border: 0; padding: 2px 0; color: var(--text-faint);
  font: inherit; font-size: var(--fs-sm); cursor: pointer;
}
.tile-bar .linkish:hover { color: var(--accent-ink); text-decoration: underline; }
.tile-bar .linkish:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .tile-chev { transition: none; } }

.setrow-note {
  margin: 0; padding: 0 14px 11px; max-width: 74ch;
  white-space: pre-line;
  font-size: var(--fs-sm); line-height: 1.55; color: var(--text-dim);
}

/* THE SEGMENTED CONTROL, COMPACT, now that it sits in a row rather than under
   a heading. Same control, same reasoning -- see the note at .segctl -- with
   the panel's top margin and its stretch-to-fill taken off. */
.setrow-ctl .segctl { margin-top: 0; padding: 3px; gap: 3px; }
.setrow-ctl .segctl button { flex: 0 0 auto; min-height: 30px; padding: 3px 11px; }

@media (max-width: 560px) {
  /* The control drops under the label rather than squeezing beside it: three
     options and a label do not share 320px, and a segmented control that has
     to be read sideways is a dropdown with extra steps. */
  .setrow-ctl, .setrow-fixed { margin-left: 0; width: 100%; }
  .setrow-ctl .segctl button { flex: 1 1 0; }
  .setrow-main { padding-bottom: 9px; }
}

/* ------------------------------------------- the way into a role view
   Chris, 22 Oct 2026: "view the app option should be in the top left header
   minimized under the login name and rung."
   So it is a fold under .rail-top, quiet by default: a control a platform
   account reaches for a few times a week does not earn a button that looks
   like an action. The ACTIVE state is not here -- it stays a band across the
   pane on every view, in the attention colour. See roleViewBar in app.js. */
.viewas { margin: -4px 0 10px; }
.rail-collapsed .viewas { display: none; }
.viewas-toggle {
  display: flex; align-items: center; gap: 4px; width: 100%;
  padding: 3px 0; background: none; border: 0; cursor: pointer;
  color: var(--text-faint); font: inherit; font-size: var(--fs-xs);
  letter-spacing: .02em; text-align: left;
}
.viewas-toggle:hover { color: var(--text-dim); }
.viewas-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.viewas-toggle .caret { font-size: 9px; }
.viewas-body { padding-top: 6px; }
/* The picker inside the fold. NOT `.acting`, whose full-width band and bottom
   border would draw a rule across the middle of the sidebar: in here it is a
   stacked label, select and note in a 212px column. */
.viewas-pick { display: flex; flex-direction: column; gap: 5px; font-size: var(--fs-sm); }
.viewas-pick label {
  color: var(--text-faint); text-transform: uppercase;
  letter-spacing: .06em; font-size: 10px;
}
.viewas-pick select { max-width: 100%; width: 100%; font-size: var(--fs-sm); }
.viewas-pick .acting-note { color: var(--text-dim); font-size: var(--fs-xs); line-height: 1.45; }

/* A SIMULATED RUNG IS NOT A HELD ONE, and the chip says which. The attention
   colour rather than is-platform's violet or is-chair's amber, so the two
   cannot be confused at a glance. */
/* Colour and weight, no fill: `.whoami-role` is `display: block`, so a
   background here would be a band the full width of the rail rather than a
   chip around two words. */
.whoami-role.is-viewing { color: var(--art); font-weight: 600; }

/* Acting for another partner. Loud on purpose: the hazard is not permission,
   it is a committee member editing somebody else's record believing it is
   their own. */
.acting {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 14px; border-bottom: 1px solid var(--line);
  background: var(--panel); font-size: var(--fs-sm);
}
.acting label { color: var(--text-faint); text-transform: uppercase;
                letter-spacing: .06em; font-size: var(--fs-xs); }
.acting select { max-width: 280px; }
.acting.on { background: var(--warn-soft, var(--panel-3)); border-bottom-color: var(--art); }
.acting.on label { color: var(--art); }
.acting-note { color: var(--text-dim); }

/* ------------------------------------------------------------------- main */

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

.topbar {
  display: flex; align-items: center; gap: 12px;
  /* Wraps rather than clips. With every committee control present the row
     overflows even a 1600px window, and the overflow cut the LAST button --
     which is Rebuild, the one that matters. A second row costs 40px of
     height; a clipped primary action costs the feature. */
  flex-wrap: wrap; row-gap: 6px;
  padding: 10px 16px; border-bottom: 1px solid var(--line);
  background: var(--panel); flex-shrink: 0;
  /* The builder popover anchors to this, so it needs a positioned ancestor.
     Added 23 Oct 2026 when those actions stopped being an inline row. */
  position: relative;
}
.topbar h2 {
  margin: 0; font-size: var(--fs-title); font-weight: 600;
  font-family: 'IBM Plex Sans Condensed', sans-serif; letter-spacing: .02em;
}
.spacer { flex: 1; }

/* ONE BUTTON FOR THE WHOLE CONTROL CLUSTER -- ON A PHONE, AND ONLY THERE.
 *
 * `display: contents` is the whole trick. Above 860px the wrapper is not a box
 * at all: the block select, Blocks… and the four chips inside it are still
 * direct flex children of .topbar, laid out exactly as they were before they
 * were wrapped. Below 860px the wrapper becomes a real box that the Controls
 * button shows and hides.
 *
 * The alternative -- moving these nodes into a sheet element on resize -- was
 * rejected: #monthSel carries a selection and every one of these carries a
 * handler, and re-parenting on a media-query change is how both get lost. */
.topbar-controls { display: contents; }
/* THE VIEW GATE HIDES BY ATTRIBUTE, so the attribute has to win. `[hidden]`
 * carries the same specificity as the class above it and lives in the UA
 * stylesheet, which an author rule beats -- without this line a gated group
 * would keep displaying its contents on views it does not belong to. */
.topbar-controls[hidden] { display: none; }
.controls-toggle, .controls-note { display: none; }
/* The phone header's slot for the page name and the site (placeHeader in
 * app.js), and nothing above 860px, where they sit in the topbar. */
.page-menu { display: none; }
.brand-marks { display: contents; }
.site-badge { display: none; }

select.month {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 6px 10px;
  font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-ui);
  /* The topbar is a flex row and these two selects were its only members with
   * no width floor, so the moment the violations chip and the solver buttons
   * appeared, flex took the slack from HERE and both collapsed to a bare
   * arrow -- the site and block pickers, the two controls that say what
   * everything else on screen is about, were the first things sacrificed.
   * They may still shrink under real pressure, but never below legibility,
   * and never below the buttons' convenience. */
  min-width: 150px; max-width: 280px;
  text-overflow: ellipsis;
}

/* The hidden ATTRIBUTE must always win. Its native effect is display:none,
   but that loses to any class that sets display -- so `.chip { display:
   inline-flex }` was overriding `hidden` and two empty pill outlines sat in
   every partner's toolbar where the compare and lockout chips were
   "hidden". One rule, or every displayed class re-fights this fight. */
[hidden] { display: none !important; }

/* The builder's collapsible group. One flex item inside the topbar, so it
   wraps as a unit rather than shedding buttons one at a time -- and when it is
   folded the whole row it was occupying goes with it. */
/* THE BUILDER ACTIONS POP UP, rather than unfolding into a row of their own.
 *
 * Chris, 23 Oct 2026: "use an icon like this to pop up a consolidated version
 * of this." Open, the row used to push the first grid cell down the page --
 * which is the complaint that folded it in the first place ("the header is
 * taking up too much space"), returning every time somebody opened it. A
 * popover costs no layout: it floats over the grid and the grid stays where
 * it was.
 *
 * ANCHORED TO THE TOGGLE, which is why the header needs `position: relative`
 * -- see the rule below. Right-aligned to the button rather than left, because
 * the toggle sits in the right half of a wide header and a left-anchored panel
 * would run off the window. */
.builder-actions {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  position: absolute; top: calc(100% + 6px); right: 12px; z-index: 40;
  max-width: min(680px, calc(100vw - 24px));
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); box-shadow: var(--shadow);
}
@media (prefers-reduced-motion: no-preference) {
  .builder-actions:not([hidden]) { animation: gridtools-in .12s ease-out; }
}
.builder-toggle { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.builder-toggle .caret { font-size: 10px; opacity: .7; margin-left: 3px; }
.builder-toggle[aria-expanded="true"] { color: var(--accent-ink); }
/* 22px, not 16. Chris, 24 Oct 2026, of both icons on the live header: "both
 * are too small". 16 was sized for a glyph I had drawn to read at 16; his is a
 * hammer crossed with a pencil, which has twice the detail and needs the room
 * for the crossing to read as a crossing rather than a smudge. */
.builder-icon { display: inline-flex; width: 22px; height: 22px; }
.builder-icon svg { width: 22px; height: 22px; }
/* The word goes on wide windows only: the glyph carries it, and the header is
 * the thing being given its space back. */
@media (max-width: 1180px) { .builder-label { display: none; } }

/* HOVER SAYS WHAT THE ICON DOES. Chris, 24 Oct 2026, in the same message that
 * asked for the ring off and the glyphs bigger: "hover over the icon gives the
 * explanation of the function."
 *
 * ALL THREE CONTROLS ALREADY HAD A `title`, which is exactly the point. The
 * native tooltip waits out the browser's own delay -- a second or more, and
 * not settable -- draws in the operating system's colours in neither of this
 * app's two themes, and never appears at all on a touch screen. This file
 * already carried the verdict in another comment: "a tooltip nobody hovers".
 * With the ring gone the glyph has to carry its own meaning, so the sentence
 * had to become something that actually shows up.
 *
 * `title` IS REMOVED WHEREVER data-hint IS SET, never both: two tooltips for
 * one control is the browser's over the top of this one. The accessible name
 * moves to aria-label, which is what `title` was quietly serving as on the two
 * glass buttons -- they have no text of their own.
 *
 * EVERY COLOUR HERE IS AN EXISTING TOKEN -- panel-3, text, line, shadow --
 * rather than three new ones. A tooltip needs a raised surface, a hairline and
 * a shadow in both themes, and those three are already defined in all three
 * blocks (bare :root, the dark media query, and [data-theme="dark"]). A new
 * token is a fourth place to forget one of them. */
[data-hint] { position: relative; }
[data-hint]::after {
  content: attr(data-hint);
  position: absolute; top: calc(100% + 7px); left: 0; z-index: 60;
  width: max-content; max-width: 240px;
  padding: 6px 9px; border-radius: 8px;
  background: var(--panel-3); color: var(--text);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  /* Stated, not inherited: these sit on chips and toolbar buttons that are
   * uppercase, letter-spaced and nowrap, and a tooltip wearing those is a row
   * of shouting that runs off the pane. */
  font-size: var(--fs-sm); font-weight: 500; line-height: 1.35;
  letter-spacing: 0; text-transform: none; white-space: normal; text-align: left;
  opacity: 0; visibility: hidden;
  transition: opacity .1s linear, visibility 0s linear .1s;
}
/* The delay is on the way IN only. Without it the tooltip flashes at every
 * icon the pointer crosses on the way somewhere else; without the instant way
 * OUT it hangs over whatever you moved to. */
[data-hint]:hover::after, [data-hint]:focus-visible::after {
  opacity: 1; visibility: visible;
  transition: opacity .1s linear .4s, visibility 0s linear .4s;
}
/* Anchored to the right edge for a control that sits near one -- the header's
 * Builder button is the last thing on its row, and a tooltip dropping left
 * from it would hang off the window. */
[data-hint].hint-right::after { left: auto; right: 0; }
@media (prefers-reduced-motion: reduce) {
  [data-hint]::after, [data-hint]:hover::after, [data-hint]:focus-visible::after {
    transition: none;
  }
}

.chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 0 var(--tag-px); line-height: var(--tag-lh); border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid transparent;
}
.chip.draft     { background: var(--pa-dim);    color: var(--pa);    border-color: var(--pa); }
.chip.published { background: var(--ecg-dim);   color: var(--accent-ink);   border-color: var(--brand); }
.chip.clean     { background: var(--ecg-dim);   color: var(--accent-ink); }
.chip.bad       { background: var(--art-dim);   color: var(--art); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.btn {
  /* A control's target grows with the setting, which is half of what
     "spacious" is for: the other half of a thumb catching the wrong row is a
     button too small to hit. */
  padding: calc(var(--space-2) - 2px) var(--space-3); border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--panel-2);
  color: var(--text); cursor: pointer; font-size: var(--fs-ui);
  min-height: var(--control-h); line-height: 1.2; text-decoration: none;
}
/* THE BUTTON'S BOX AT ZERO SPECIFICITY. A dozen rules show or hide a .btn by
   display alone (`.controls-toggle { display: none }` above it, and others),
   and a `display` on .btn itself would win every one of those it follows. */
:where(.btn) { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { background: var(--panel-3); border-color: var(--text-faint); }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn.primary {
  /* --on-accent rather than a literal and a light override. The token's own
     note defines it for exactly this: "white on the light theme's deep green,
     near-black on the dark theme's bright green. A single literal cannot serve
     both." It also makes the rule theme-free, so it cannot be left behind when
     a theme becomes reachable a new way. */
  background: var(--accent-fill); color: var(--on-accent); border-color: var(--accent-fill); font-weight: 600;
}
.btn.primary:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: none; }
/* A full-width action at the bottom of a card: the clock punch, a copy
   button under a link. It used to live in the sign-in block and moved here
   when that screen got buttons of its own -- three callers outside it. */
.btn.big { width: 100%; padding: 11px 14px; font-size: var(--fs-body); }

.body { flex: 1; min-height: 0; display: flex; }
.pane { flex: 1; min-width: 0; overflow: auto; }
/* The pane's own breathing room follows the setting too: a compact reader
   asking for more on screen means the margins as well as the rows. */
.pad { padding: calc(var(--space-4) + 2px) calc(var(--space-4) + 4px) calc(var(--space-6) + 16px); }

/* --------------------------------------------------------- solve progress
   CP-SAT has no honest percent-complete: it has an incumbent and a lower bound
   and the gap closes unevenly. So the bar tracks elapsed against the time
   limit, which IS knowable, and the text carries what actually matters --
   solutions found and how far the gap has closed. */
.solve { border-bottom: 1px solid var(--line); background: var(--panel); }
.solve-bar { height: 3px; background: var(--panel-3); overflow: hidden; }
.solve-bar div {
  height: 100%; background: var(--brand); transition: width .5s linear;
  box-shadow: 0 0 8px var(--brand);
}
.solve-text {
  padding: 5px 16px; font-size: var(--fs-xs); color: var(--text-dim);
  font-family: 'IBM Plex Mono', monospace;
}

/* The long half of a progress note. Bounded, so a build that is short of three
   hundred slots reports it in four lines with a scrollbar rather than in three
   hundred and pushing the stop button off the screen. Wrapping on `anywhere`
   because the content is semicolon-joined identifiers with no spaces to break
   at when a single entry is long. */
.solve-note {
  margin: 0 16px 6px; padding: 6px 8px;
  max-height: 5.4em; overflow-y: auto; overscroll-behavior: contain;
  background: var(--panel-2); border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-xs); line-height: 1.35;
  color: var(--text-faint); overflow-wrap: anywhere;
}

/* ------------------------------------------------------------- filter bar */
.btn.grp { color: var(--text-faint); border-style: dashed; }
.btn.grp.on {
  color: var(--text); border-style: solid; background: var(--panel-3);
  border-color: var(--line);
}
.filterbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 8px 12px; border-bottom: 1px solid var(--line);
  background: var(--panel); flex-shrink: 0;
}

/* THE GRID'S CONTROLS, FOLDED INTO THE CORNER.
 *
 * Chris, 23 Oct 2026: "replace this filter/display bar with a small magnifying
 * glass with 'options gear' icon in the glass that overlaps the top left
 * corner, clicking it temporarily expands to show the current filter and
 * display options."
 *
 * Closed, the strip is the height of the glass and carries two things: the
 * glass and the row count. The grid begins directly under it instead of under
 * forty pixels of controls nobody is reading.
 *
 * THE PANEL FLOATS rather than pushing the grid down. Expanding is temporary
 * -- his word -- and a panel that reflowed the grid every time it opened would
 * move the rows somebody opened it to filter. */
.gridtools {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 4px 10px; background: var(--panel); flex-shrink: 0;
  border-bottom: 1px solid var(--line); min-height: 34px;
}
/* NO RING, AND BIGGER. Chris, 24 Oct 2026: "both are too small - ditch the
 * circle around the glass ring and gear and increase the size of both".
 *
 * The circle was doing two jobs and only one of them survives the removal.
 * It drew a hit target, which the 32px box still does; and it carried the
 * state -- `border-color: currentColor` was how open and on were shown. With
 * no border at rest there is nothing to recolour, so the state moves to a
 * soft filled rounded square that appears on hover and stays while the panel
 * is open. A control that shows no change on hover reads as decoration, and
 * this one opens a panel. */
.gridtools-glass {
  display: inline-flex; align-items: center; justify-content: center;
  position: relative; width: 32px; height: 32px; flex: 0 0 auto;
  border: 0; border-radius: 9px;
  background: transparent; color: var(--text-dim); cursor: pointer;
  /* Overlapping the corner, which is what he asked for: pulled up and left so
   * it sits over the join between the strip and the grid rather than inside
   * either. The z-index keeps it above the sticky header row. */
  margin: -6px 0 -6px -4px; z-index: 3;
}
/* THE GLYPH, NOT THE BOX, IS WHAT HE CALLED TOO SMALL. The size is set here
 * rather than left to makeGlassIcon's width attribute so the two bars cannot
 * drift apart; the attribute stays as the fallback for anything that renders
 * the SVG without this sheet. */
.gridtools-glass svg { width: 26px; height: 26px; }
.gridtools-glass:hover { color: var(--text); background: var(--panel-3); }
.gridtools-glass[aria-expanded="true"] {
  color: var(--accent-ink); background: var(--panel-3);
}
/* ON, AND SAYING HOW MANY. A closed panel with filters behind it is a grid
 * showing fewer rows than it has for a reason nobody can see -- the same
 * failure the day-scope strip exists to prevent. */
.gridtools-glass.on { color: var(--accent-ink); }
.gridtools-count {
  position: absolute; top: -3px; right: -3px; min-width: 14px; height: 14px;
  /* --text, STATED, not var(--accent, --text). This read `var(--accent, ...)`
   * while --accent was undefined, so it has always been --text; now that
   * --accent is defined the fallback would silently change it to --ecg, and
   * MEASURED that is the wrong way to go: --on-accent on --ecg is 11.14:1 on
   * dark but 3.53:1 on light, under the 4.5 a 9px bold digit needs. On --text
   * it is 16.89 and 17.28. So the badge keeps the colour it has always
   * actually had, and says so. */
  padding: 0 3px; border-radius: 7px; background: var(--text);
  /* --on-accent, NOT a #fff literal. `--bg` is defined nowhere in this file,
   * so `var(--bg, #fff)` was always the literal, and the badge's background
   * falls back to --text -- near-WHITE on the dark theme. White on white: the
   * count was invisible on the theme this product calls home, and it only
   * showed up once the ring came off the glass on 24 Oct and left the badge
   * with nothing to sit against. This is the failure CLAUDE.md names in so
   * many words: "Text drawn ON an accent needs its own token (--on-accent) ...
   * A single literal cannot serve both, and a button with invisible text is
   * the usual result." --on-accent is #070B14 on dark and #FFFFFF on light,
   * which is the right ink for --text in each. */
  color: var(--on-accent); font-size: 9px; line-height: 14px; font-weight: 700;
  text-align: center;
}
.gridtools-rows { font-size: var(--fs-sm); color: var(--text-faint); }
/* The rule check's own filter row, folded to the same glass. Its panel is the
 * drawer itself rather than a popover -- the drawer is already a narrow column
 * that scrolls, so the controls sit in it and push the list down by the one
 * row they occupy, which is what they did before. What changed is that they
 * are not there until asked for. */
.findings-filter-row.collapsed { display: flex; align-items: center; gap: 8px; }
.findings-count.inline { margin: 0; }
.gridtools-panel {
  position: absolute; top: calc(100% + 4px); left: 6px; z-index: 30;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  max-width: calc(100vw - 40px);
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); box-shadow: var(--shadow);
}
.gridtools-panel .spacer { flex: 1 1 auto; }
@media (prefers-reduced-motion: no-preference) {
  .gridtools-panel { animation: gridtools-in .12s ease-out; }
  @keyframes gridtools-in {
    from { opacity: 0; transform: translateY(-4px); }
  }
}

/* The rule check's filters. Narrower than the grid's bar because the drawer is
 * narrow: the chips wrap into rows of their own rather than competing with the
 * search box for one line. Sticky, because the answer to "how many of these
 * are OB" has to stay readable while scrolling the ones that are. */
/* THE Z-INDEX HERE BELONGS TO THE POPUP, NOT TO THE BAR.
 *
 * Chris, 24 Oct 2026, with a screenshot: "layers got mixed up with the filter
 * menu popups" -- the MEDIUM band heading and the "select all 10" row were
 * painting straight THROUGH the open Filters panel.
 *
 * `.filter-pop` says `z-index: 40` and that number was never reachable. A
 * positioned element with a z-index of its own starts a STACKING CONTEXT, so
 * this sticky bar's `z-index: 2` sealed its whole subtree into one layer worth
 * 2, and the popup's 40 only ever sorted it against its own siblings inside
 * that box. Against `.sev-head`, which is also 2 and comes LATER in the
 * document, the tie broke on document order and the heading won.
 *
 * So the bar's own number is the only one that can lift the popup, and it has
 * to clear everything that scrolls underneath it: `.sev-head` and the rule
 * heads at 2, the grid's own header at 3. Raising `.filter-pop` instead
 * changes nothing at all -- which is worth knowing before someone tries it. */
.findings-filter {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-direction: column; gap: 5px;
  padding: 8px 0 8px; margin-bottom: 4px;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.findings-filter-row { display: flex; gap: 6px; align-items: center; }
.findings-filter input[type="text"] { flex: 1; min-width: 0; font-size: var(--fs-sm); padding: 4px 8px; }
.findings-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.findings-count {
  display: flex; align-items: center;
  font-size: var(--fs-xs); color: var(--text-faint);
}

/* THE FILTERS, FOLDED AWAY -- but never the ones that are ON.
 *
 * The failure mode of a collapsed filter UI is forgetting a filter is set and
 * reading a partial grid as the whole month, so what is active stays on screen
 * as a chip and the button carries a count. */
.filter-chip {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: var(--pill-h); padding: 0 6px 0 var(--pill-px); font-size: var(--fs-xs); line-height: 1.6;
  background: var(--panel-3); color: var(--text-dim);
  border: 1px solid var(--line); border-radius: var(--radius-pill); cursor: pointer;
}
.filter-chip:hover { color: var(--text); border-color: var(--text-faint); }
.filter-chip .x { font-size: var(--fs-ui); opacity: .7; }

.filterbar { position: relative; }
.filter-pop {
  position: absolute; top: calc(100% + 4px); left: 8px; z-index: 40;
  display: flex; flex-direction: column; gap: 8px;
  min-width: 260px; max-width: min(460px, calc(100vw - 32px));
  padding: 10px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.findings-filter { position: sticky; }
.findings-filter .filter-pop { left: 0; right: 0; min-width: 0; }
.filter-pop-row { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-pop-sect {
  font-size: 10px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-faint); border-top: 1px solid var(--line); padding-top: 8px;
}

/* ------------------------------------------------------------------- grid */

.grid-wrap { overflow: auto; height: 100%; }
table.grid { border-collapse: separate; border-spacing: 0; font-family: 'IBM Plex Mono', monospace; }
/* EVERY DAY THE SAME WIDTH.
   Chris, 26 Aug 2026: "fix the width of the columns to all be the same rather
   than auto sized". Under the default auto layout a column is as wide as its
   longest cell, so a week of short names drew narrow columns and the week
   beside it drew wide ones -- and the eye cannot run down a column that keeps
   moving. Fixed layout takes every width from the header row instead, which
   is where --cell-w is set.

   Across only. The days-down layout's first header row is colspanned band
   titles, and fixed layout would take its column widths from those -- one
   band's worth of columns sized as a single cell. Its columns already honour
   --cell-w through the shared thead rule, so the +/- still works there; what
   it does not get is the uniformity, because the row that would provide it
   says something else. */
/* BOTH layouts, and no stretching.
   `min-width: 100%` made a short block fill the pane, and paid for it by
   redistributing the surplus across every column -- so when the virtual
   scroller changed the body's height and the vertical scrollbar came or went,
   the pane's width changed and every column rescaled. Chris, 26 Aug 2026: "the
   width should remain the same unless +/- is clicked." A grid that fills the
   pane is worth less than a grid that holds still.

   The days-down grid can join now: its colspanned first header row was the
   reason it could not use fixed layout, and the colgroup makes the first row
   irrelevant. */
table.grid { table-layout: fixed; }
table.grid th, table.grid td {
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  height: var(--row-h); padding: 0;
}
table.grid thead th {
  position: sticky; top: 0; z-index: 3; background: var(--panel);
  font-weight: 600; font-size: var(--fs-xs); color: var(--text-dim);
  min-width: var(--cell-w); width: var(--cell-w);
}
/* THE DATE IS DRAWN AT THE NAME'S SIZE, and the day and the counts a point
 * below it, as they always were -- so the header and the column under it zoom
 * together rather than an 18px "Dangerfield" sitting under an 11px 10/14.
 * The 8px floor is the cells' own (see CELL_FS in app.js). */
table.grid thead th.dnum { border-bottom: 0; padding-top: 4px; font-size: var(--cell-fs); }
table.grid thead tr.dow th {
  top: var(--row-h); color: var(--text-faint);
  font-size: max(8px, calc(var(--cell-fs) * 10 / 11));
}
/* HOW MANY ARE ON AND HOW MANY ARE AWAY, under the day of the week.
 *
 * Two numbers in a column that can be forty pixels wide, so they are set in
 * the tabular figures the rest of the grid uses and separated by a hairline
 * rather than by a character -- a slash or a dot would cost a digit's width on
 * every day of the block. The away count is the darker of the two only when it
 * is not zero: a day nobody is off should read as one number and a blank, not
 * as a score. */
/* THE FLEX GOES ON A WRAPPER, NEVER ON THE CELL.
 *
 * The first version of this set `display: flex` on the th itself, and that
 * is not a layout tweak -- it takes the element OUT of the table. A row whose
 * cells are no longer table-cells gets its children wrapped in one anonymous
 * cell, so ninety-one days of counts stacked vertically into column one and
 * the header grew tall enough to push the whole grid off the screen. Chris saw
 * it in production within the hour: "the partner count and vacation count
 * ended up in column 1 instead of row header??? and no shift assignments are
 * displaying."
 *
 * grid-guard-test now refuses any display that de-table-ifies a th or td
 * inside table.grid, because this is not a mistake worth making twice. */
table.grid thead tr.counts th {
  top: calc(var(--row-h) * 2); font-weight: 500;
  font-size: max(8px, calc(var(--cell-fs) * 10 / 11));
  font-variant-numeric: tabular-nums;
  height: var(--row-h); vertical-align: middle;
}
table.grid tr.counts .cnt {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  line-height: var(--row-h);
}
table.grid thead tr.counts .n-on { color: var(--text-dim); }
table.grid thead tr.counts .n-away,
td.task .daycount .n-away { color: var(--text-faint); }
table.grid .n-away.zero, table.grid .n-on.zero { color: var(--line); }
table.grid button.n-away {
  background: none; border: 0; padding: 0 2px; cursor: pointer;
  font: inherit; color: var(--text-faint);
  text-decoration: underline dotted; text-underline-offset: 2px;
}
table.grid button.n-away:hover { color: var(--text); }
/* Rotated, the pair rides at the right-hand end of the date cell -- again on a
 * wrapper inside the cell, not on the cell. */
table.grid.down td.task .taskline {
  display: flex; align-items: center; gap: 6px;
}
table.grid.down td.task .taskline > span:first-child {
  flex: 1; overflow: hidden; text-overflow: ellipsis;
}
td.task .daycount {
  display: inline-flex; gap: 5px; font-size: 10px;
  font-variant-numeric: tabular-nums; color: var(--text-faint);
}
table.grid th.corner {
  left: 0; z-index: 5; width: var(--task-w); min-width: var(--task-w);
  text-align: left; padding-left: 10px; background: var(--panel);
}
table.grid td.task, table.grid th.task {
  position: sticky; left: 0; z-index: 2; background: var(--panel);
  width: var(--task-w); min-width: var(--task-w);
  font-family: 'IBM Plex Sans', sans-serif; font-size: var(--fs-xs);
  color: var(--text-dim); padding: 0 8px 0 10px; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-right: 1px solid var(--line);
}
tr.group td {
  background: var(--panel-2); color: var(--text-faint);
  font-family: 'IBM Plex Sans Condensed', sans-serif;
  font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase;
  height: 22px; padding-left: 10px; position: sticky; left: 0;
}
/* A HOLIDAY STOPS BORROWING LIVER'S COLOUR, which it had since the grid was
   written. `--pa-dim` was the holiday column, the Liver band AND a soft
   violation -- three meanings, one wash, in both themes -- and the note on
   td.cell.viol below has been saying so: "a pale yellow wash is already the
   holiday column and the Liver band". Both of these are neutral panel steps
   now, so the pale yellow means exactly one thing again. */
th.wknd, td.wknd { background: var(--panel-2); }
th.holi, td.holi { background: var(--panel-3); }

/* ------------------------------------- AND THE HEADERS, WHICH LOST BOTH
 *
 * Chris, 22 Oct 2026: "include schedule page contrast on day/date headers to
 * match, and needs to be more clear throughout."
 *
 * THE HEADERS WERE CLASSED, AND SHOWED NOTHING AT ALL -- which is #392's own
 * fault one level up, and the reason it reads as missing rather than as
 * subtle. `table.grid thead th` above sets `background: var(--panel)` so the
 * sticky header is opaque and rows scroll under it. That selector is one class
 * and THREE elements; `th.wknd` is one class and one. So it wins twice over:
 *
 *   background-color -- `--panel` beats `--panel-2`;
 *   background-image -- the `background` SHORTHAND resets it to `none`, which
 *                       beats the band's layer list in the rule below.
 *
 * Measured rather than reasoned, in this container's own Chromium against this
 * stylesheet: `thead th.wknd` computed to `background-color: rgb(255,255,255)`
 * and `background-image: none`, while `td.cell.wknd` in the same table
 * computed to the panel step AND the bracket gradient. The header was drawing
 * a plain panel on every day of the block.
 *
 * So the header's band is restated at `table.grid thead` specificity, in the
 * two channels separately: `background-color` as a LONGHAND, which cannot
 * reset the image the way the shorthand above does, and the image in the
 * composition rule below. The header keeps an opaque base either way -- these
 * panel steps are opaque -- so stickiness is unaffected. */
table.grid thead th.wknd { background-color: var(--panel-2); }
table.grid thead th.holi { background-color: var(--panel-3); }

/* THE NAME IS THE SIZE THE +/- SAYS. Chris, 28 Oct 2026: "Perhaps having the
 * + & - change the partner name font size instead of the cell size?" -- he
 * chose font and width together, so --cell-fs and --cell-w are set side by
 * side from one stop (colVar in app.js), the column measured to fit the name
 * at that size. "fit" is 11px, which is what this rule said before it read a
 * variable; a td.cell outside a grid inherits that from :root. */
td.cell { text-align: center; font-size: var(--cell-fs); cursor: pointer; position: relative; }
/* A NAME WIDER THAN ITS COLUMN IS CUT AT THE COLUMN, not spilled into the next
 * day. Since 28 Oct 2026 a column is the width the +/- says and nothing in it
 * can widen it (see gridWidth in app.js), so below "fit" the longest names no
 * longer fit -- and without this they were drawn across their neighbours. The
 * full name is in the cell's title, as on the partner-per-row grid, which has
 * always clipped this way.
 *
 * A LAST RESORT NOW, the same day: the +/- shrinks the name with the column,
 * so the roster's longest abbreviation fits at every stop and this only cuts
 * what is longer than that -- a label nobody measured. */
table.grid td.cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.cell:hover { outline: 1px solid var(--text-faint); outline-offset: -1px; }
/* View-only: still hoverable and readable, but visibly not yours to change. */
td.cell.locked { cursor: default; }
td.cell.locked:hover { outline: 1px dashed var(--text-faint); outline-offset: -1px; }
tr.spacer td { background: transparent; }

/* ------------------------------------------------- a row for each partner
 *
 * Chris, 23 Oct 2026: "add a sort by partner (alphabetic) along with
 * assignment", and then, from the options, "a new partner-per-row view".
 *
 * THE CELL SAYS A SHIFT, NOT A NAME, which is the one way this grid differs
 * from the other two and the only thing it needs of its own. A task label is
 * longer than an abbreviation, so the text is clipped rather than wrapped --
 * a row that grows to two lines breaks the alignment that makes a grid
 * readable down a column, and the full name is in the title either way. */
table.grid.bypartner td.cell {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 0 2px; letter-spacing: -.01em;
  /* Half a point under the names, at every stop, as at "fit" -- a shift label
     is longer than an abbreviation -- and never under the 8px floor. */
  font-size: max(8px, calc(var(--cell-fs) * 10.5 / 11));
}
/* MORE THAN ONE SHIFT IN A DAY IS MARKED, because "Tier 3 +1" read quickly is
   "Tier 3" and the +1 is the part that matters: a partner holding two things
   on one day is either a mirror pair or a mistake. */
table.grid.bypartner td.cell.stacked { font-style: italic; }
table.grid.bypartner td.cell.empty { background: var(--panel-2); }
/* The count of everything this partner holds in the block, beside their name.
   It is the figure the question "what has she got this quarter" actually
   wants, and it costs one span.
   
   IN A WRAPPER, NOT BY FLEXING THE CELL, and grid-guard-test caught the first
   draft doing the latter. A `td` with `display: flex` stops being a table
   cell: the row's contents collapse into one anonymous cell in column 1, and
   since the widths here are declared per column, a row that has stopped
   producing columns disagrees with every other row rather than merely looking
   wrong. The across layout's counts row learned this already -- see the note
   on `.cnt` -- and the guard exists because the lesson does not transfer by
   itself. */
table.grid.bypartner td.task .pname {
  display: flex; justify-content: space-between; align-items: baseline; gap: 6px;
}
table.grid.bypartner td.task .pcount {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10px; color: var(--text-faint);
}
td.cell.sel  { outline: 2px solid var(--accent-ink); outline-offset: -2px; z-index: 1; }
td.cell.has { color: var(--text); }
td.cell.empty { color: transparent; }

td.cell.ob    { background: var(--ecg-dim); }
td.cell.cv    { background: var(--spo2-dim); }
td.cell.lv    { background: var(--pa-dim); }
td.cell.tier  { background: var(--agent-dim); }
td.cell.vac   { color: var(--text-faint); font-style: italic; }
/* Not yet assigned. Dimmer than vacation and not clickable: these name a
   person who is free, not a slot anybody can edit, and the whole band empties
   as the build fills in. */
td.cell.spare { color: var(--text-dim); }
td.cell.spare:hover { background: transparent; }
/* No-call is not vacation and must not read as it: the partner is at work.
   Amber rather than grey, and upright rather than italic. */
td.cell.nocall { color: var(--pa); font-weight: 600; }
/* Unavailable is neither of the other two, so it does not borrow either
   colour: a partner the hospital has, or who is part-time, is a third state. */
td.cell.unavail { color: var(--art); font-weight: 600; }

/* THE DAYS THE REQUESTS GRID SHOWS BUT DOES NOT OWN.
 *
 * Chris, 26 Oct 2026: "the dates viewable should extend to the full extent by
 * default of the 9months for IMC". The grid now draws the whole request
 * window, which is three or four blocks -- but a granted row is an assignment
 * INSIDE one block, so only the block on the picker can be marked from here.
 *
 * QUIETER, NOT GREYED OUT. The marks out there are real: somebody's July
 * vacation is as true as their October. So the INK keeps its colour and the
 * square loses its affordance -- no hover response, and a cursor that says
 * the click goes somewhere else rather than nowhere. */
td.cell.off-block { opacity: .72; cursor: alias; }
td.cell.off-block:hover { background-image: none; }

/* THE INSTRUCTIONS, FOLDED. Eight lines of prose above a table pushed the
   table itself below the fold, so the page opened on an explanation of
   something nobody could see. The three marks stay printed -- they are the
   KEY to the grid and nobody learns them once -- and the method goes behind
   this. */
.howto { margin: 0 0 10px; max-width: 76ch; font-size: var(--fs-sm); color: var(--text-dim); }
.howto > summary {
  width: fit-content; padding: 2px 0; cursor: pointer;
  color: var(--accent-ink); font-size: var(--fs-sm);
}
.howto > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.howto > p { margin: 4px 0 0; line-height: 1.55; }

/* a manual override: corner fold, so it reads at a glance across a month */
td.cell.manual::after {
  content: ''; position: absolute; top: 0; right: 0;
  border-width: 0 7px 7px 0; border-style: solid;
  border-color: transparent var(--agent) transparent transparent;
}
/* a pinned cell: the committee decided this one by hand and rebuilds cannot
   move it. The fold sits in the LEFT corner so a cell that is both manual and
   pinned shows both marks, and the underline says "held down" without taking
   the colour channels violations and staging already use. */
td.cell.pinned { text-decoration: underline; text-underline-offset: 2px; }
/* THE PIN GLYPH (web/pin-mark.js) TOOK THE FOLD'S CORNER AND THE FOLD WENT.
   Chris, 24 Nov 2026: "pinned assignments should be given a little pin icon in
   the top right or left". Top left because the manual fold and the swap arrows
   own the right. Absolute and out of flow, so it adds nothing to the cell's
   box and cannot move the name; pointer-events off, so a click still opens the
   cell; sized with the name inside 10-12px like the swap mark. A cell with no
   glyph (spare band, masked) shows no fold either: nothing there is pinned. */
td.cell.pinned::before { content: none; }
.pin-mark {
  --pin-size: clamp(10px, calc(var(--cell-fs) * 10 / 11), 12px);
  position: absolute; top: 1px; left: 1px; z-index: 1;
  width: var(--pin-size); height: var(--pin-size);
  line-height: 0; color: var(--pin-ink); text-decoration: none;
  pointer-events: none;
}
.pin-mark svg { display: block; width: 100%; height: 100%; }
/* THE REQUEST MARK (web/request-mark.js): bottom right, the one corner the pin,
   the manual fold, the swap arrows, the draft tag and the variant stamp leave
   free. Out of flow and pointer-events off, so it adds nothing to the cell's
   box and a click still opens the cell; sized with the name inside 10-12px. */
.request-mark {
  --request-size: clamp(10px, calc(var(--cell-fs) * 10 / 11), 12px);
  position: absolute; bottom: 1px; right: 1px; z-index: 1;
  width: var(--request-size); height: var(--request-size);
  line-height: 0; color: var(--request-ink); text-decoration: none;
  pointer-events: none;
}
.request-mark svg { display: block; width: 100%; height: 100%; }
/* On a draft cell the 'draft' tag fills the bottom, so the mark moves to the
   corner the pin would have had: no draft cell is ever pinned. */
.request-mark.at-top-left { top: 1px; left: 1px; bottom: auto; right: auto; }
/* A by-partner day holding a draft and a pinned shift: pin top left, tag bottom
   left, so the right edge at mid-height is the clear place. */
.request-mark.at-mid-right {
  top: 50%; bottom: auto; transform: translateY(-50%);
}
/* THE PARTNER SCREENS (My schedule, Who's on). Each is out of flow except in
   Who's on, where the name is a line of text and the mark follows it. */
/* Who's on: after the name, inline, 10px, and never wrapped away from it. */
.request-mark.in-name {
  position: static; display: inline-block; flex: none;
  --request-size: 10px; margin-left: 3px; vertical-align: -1px;
}
/* A list row (My schedule's block list and Past/Upcoming): the left of the
   hours cell, at the row's middle. The hours cell is right-aligned and a few
   characters wide, so the left of it is free; the cell is the anchor. */
.myrow .h.has-request, .dl-h.has-request { position: relative; }
.myrow .h.has-request > .request-mark,
.dl-h.has-request > .request-mark {
  --request-size: 10px;
  top: 50%; bottom: auto; right: 100%; left: auto; margin-right: 2px;
  transform: translateY(-50%);
}
.dl-h.has-request > .request-mark { right: auto; left: 0; margin-right: 0; }
/* The month board: the top right of the day (bottom right where logged hours
   already take the top). The day is a flex column; the mark is out of flow. */
.calb-day.has-mark { position: relative; }
.request-mark.in-day-top { top: 3px; bottom: auto; right: 3px; }
.request-mark.in-day-low { bottom: 2px; right: 2px; }
/* In the legend line it is in flow, at the text's size. */
.request-mark.in-legend {
  position: static; display: inline-block; --request-size: 12px; vertical-align: -2px;
}
.request-legend {
  margin: 0 0 6px; font-size: var(--fs-sm); color: var(--text-dim);
}
/* A DRAFT ROW: NEITHER PUBLISHED NOR PINNED.
 *
 * Chris, 28 Oct 2026: "Unpublished or unpinned shifts should never be shown to
 * partners, only committee+ and there needs to be a visual sign on each shift
 * assignment that is not pinned or published to make sure it is clear." The
 * server never sends such a row below committee, so only the committee meets
 * this mark -- on the rows a partner cannot see.
 *
 * A thin DASHED edge in the SpO2 cyan, which no other cell state uses: staged
 * is a thick amber dash, a violation an inset ring, a selection solid green.
 * The selection and a staged edit draw over it (both are declared later, or
 * excluded here), so the louder signals keep their meaning. And a small
 * "draft" tag in the bottom corner, on ::before because a draft row is by
 * definition not pinned -- the one other state that draws there. A fully
 * published block carries none of it. */
td.cell.draftrow:not(.sel):not(.staged) {
  outline: 1px dashed var(--spo2);
  outline-offset: -3px;
}
td.cell.draftrow::before {
  content: 'draft'; position: absolute; left: 1px; bottom: 0;
  padding: 0 2px; border-radius: 3px;
  font-size: 7.5px; line-height: 1.25; font-weight: 600;
  letter-spacing: .03em; text-transform: uppercase; text-decoration: none;
  color: var(--spo2); background: var(--spo2-dim);
  pointer-events: none;
}
/* The legend above the grid, only when something on screen carries the mark. */
.draft-legend {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  margin: 0 0 6px; font-size: var(--fs-sm); color: var(--text-dim); cursor: help;
}
.draft-legend .draft-tag { margin-left: 0; }
/* The same mark in a list rather than a grid: the shift's line on a
 * committee member's own schedule, and its key in the grid's legend. */
.draft-tag {
  display: inline-block; margin-left: 6px; padding: 0 var(--tag-px); line-height: var(--tag-lh);
  border: 1px dashed var(--spo2); border-radius: var(--radius-sm);
  font-size: 10px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--spo2); background: var(--spo2-dim);
  vertical-align: middle; cursor: help;
}
/* A CELL IN VIOLATION SAYS HOW BADLY, NOT JUST THAT IT IS.
 *
 * Chris, 28 Aug 2026: "red - Hard, Orange - Medium, Yellow - Soft."
 *
 * Only hard was ever marked, so a medium and a soft were invisible here and
 * findable only by reading the drawer and matching a date to a column by eye.
 *
 * The RING is the signal in all three, because the tints are not free: a pale
 * yellow wash is already the holiday column and the Liver band, so a soft
 * violation coloured by its background alone would be indistinguishable from
 * an ordinary Liver Tuesday. The ring is drawn by nothing else.
 *
 * Hard also takes the text colour and the weight. That asymmetry is the
 * point: hard blocks a publish and medium and soft do not, so hard should be
 * the one you see from across the room. All six values are theme tokens, so
 * the light theme gets its own darker set without another rule here. */
td.cell.viol {
  box-shadow: inset 0 0 0 1.5px var(--art);
  background: var(--art-dim);
}
td.cell.viol-hard {
  color: var(--art); font-weight: 600;
}
td.cell.viol-medium {
  box-shadow: inset 0 0 0 1.5px var(--warn);
  background: var(--warn-soft);
}
td.cell.viol-soft {
  box-shadow: inset 0 0 0 1.5px var(--pa);
  background: var(--pa-dim);
}

/* ===================== WEEKEND AND HOLIDAY, DOWN THE WHOLE GRID =============
 *
 * Chris, 22 Oct 2026: "The schedule grid needs to provide contrast to weekends
 * and holidays for easy scanning through for build quality."
 *
 * IT WAS ALREADY CLASSED AND STILL INVISIBLE, which is the bug under the
 * request. `th.wknd, td.wknd` above sets a background COLOUR, and every rule
 * between here and there -- the four tone bands, all three violation tints --
 * sets `background` too, later and at higher specificity. So the weekend tint
 * only ever showed on an EMPTY cell, and a built block is almost entirely full
 * cells. The columns were tinted precisely where there was nothing to scan.
 *
 * SO THE BAND IS PAINTED IN `background-image`, THE ONE CHANNEL NOTHING ELSE
 * USES. The other three are all taken, and taking one back would cost more
 * than it buys:
 *   background-color -- the four tones and the three violation tints;
 *   box-shadow       -- the violation RING, and the note above explains why
 *                       that ring is the only signal three severities share;
 *   ::before/::after -- the pinned corner and the manual corner.
 * A later rule that sets only `background-image` composes with all of them:
 * the tone keeps its colour and the wash sits over it, so a Liver Saturday in
 * soft violation still reads as all three things at once.
 *
 * THE BRACKET IS THE WEEKEND, NOT THE DAY. CLAUDE.md: "The UNIT is the
 * weekend ... not saturdays or sundays individually, but weekends (Sat +
 * Sun)". Two independent tints draw something the rules do not believe in, so
 * the run gets ONE bracket -- an edge down its first day and its last -- and a
 * holiday joins the run it touches. Thanksgiving Thursday, the Friday, the
 * Saturday and the Sunday are one band with one bracket, which is what the
 * block looks like to anybody who works it. shared/day-bands.js computes the
 * run; this only paints it.
 *
 * COMPOSED THROUGH CUSTOM PROPERTIES rather than one rule per combination.
 * There are eight (weekend or holiday) x (start, end, both, neither) and
 * writing the layer list out eight times is how one of them ends up missing a
 * layer. Custom properties resolve per element regardless of declaration
 * order, so each class contributes its own layer and the single
 * `background-image` below assembles whatever the cell happens to carry.
 * `none` is a valid empty layer, which is what makes the default work. */
/* THE VARIANT WEDGE JOINS THE BAND'S OWN LAYER STACK rather than claiming a
   channel of its own, because there is no channel left: background-color is
   the tones and the violation tints, box-shadow is the violation ring,
   ::before is the pinned corner and ::after is the manual one. Adding a fourth
   layer here costs nothing and composes with all of them -- a TOSH cell that
   is also staged, in soft violation and on a Saturday draws all four.

   BOTTOM-LEFT, because the two top corners are taken: pinned folds the
   top-left and manual the top-right, so a cell can carry all three marks and
   still be read. A 45deg gradient paints the bottom-left corner, which is why
   the wedge is a gradient rather than a shape. */
/* `table.grid thead th.wknd` rather than a bare `th.wknd`: see the note above
 * the two colour rules. At one class and one element this list lost its
 * background-image to the sticky header's `background` shorthand, which is why
 * the headers drew nothing. The custom properties below are unaffected either
 * way -- they resolve per element whatever the order -- so only this one
 * declaration needed the weight. */
td.cell.wknd, td.cell.holi, td.cell.variant,
table.grid thead th.wknd, table.grid thead th.holi,
th.wknd, th.holi {
  background-image: var(--variant-mark, none), var(--band-a, none),
                    var(--band-b, none), var(--day-wash, none);
}
td.cell.variant {
  --variant-mark: linear-gradient(45deg, var(--variant-ink) 0 6px, transparent 6px);
}
/* THE DESIGNATION STAMP, and the wedge standing down for it.
 *
 * Chris, 22 Oct 2026: "the wedges are too subtle, perhaps a small TOSH stamp
 * on the bottom corner." A wedge can say THAT a rung is held elsewhere; it
 * cannot say WHICH designation, and which one is the whole point -- the TOSH
 * scheduler reads the designation as its pick order, so a day carrying two
 * 5/6 and no 1/2 is broken in a way a uniform mark cannot show.
 *
 * A REAL ELEMENT, because every other channel on this cell is already the
 * sole signal for something: background-color is the four tones and the three
 * violation tints, box-shadow is the violation ring, ::before is the pinned
 * corner, ::after the manual one, and background-image is the weekend band
 * plus the wedge. A span is the one thing left, and it is also the only one
 * that can carry text.
 *
 * `td.cell` has been position: relative since the grid was written, for the
 * two corner folds -- so this needs no change there, and a cell that is a
 * TOSH assignment AND on a Saturday AND in soft violation still draws all
 * three underneath the stamp.
 *
 * THE WEDGE REMAINS THE FALLBACK. variantTag returns '' for a variant whose
 * label shares nothing with its base, no `tagged` class is written, and the
 * wedge is what that cell gets -- so the signal never disappears entirely on
 * a practice whose labels this cannot read. */
/* THE STAMP ZOOMS WITH THE NAME. Above "fit" the row grows in proportion
 * (rowHeight in app.js), so an 8px stamp under an 11px name becomes, say, a
 * 10px one under 14px -- the same corner, the same clearance, nothing new to
 * overlap. Below "fit" the row stays 25px and the name shrinks away from the
 * stamp, so the stamp only needs to stay readable: 7px, not the 5.8 the ratio
 * would give it at 8px names. */
td.cell .vtag {
  position: absolute; left: 3px; bottom: 0; pointer-events: none;
  font-size: max(7px, calc(var(--cell-fs) * 8 / 11));
  line-height: 1.2; letter-spacing: .02em;
  color: var(--vtag-ink);
  max-width: calc(100% - 4px); overflow: hidden;
  white-space: nowrap; text-overflow: clip;
}
/* Both at once would be one mark too many in a 28px cell, and the stamp is
 * strictly the more informative of the two. */
td.cell.variant.tagged { --variant-mark: none; }
/* A PAGER'S SEAT THE BUILD DID NOT WRITE, drawn so the tier band counts what
 * the rule check counts. Chris, 28 Oct 2026: "they should show every day
 * (perhaps with a similar small tag in the bottom corner)". It carries the
 * same stamp as a written seat; italics are the one difference, because
 * there is no row behind it -- a click opens the pager, not the seat. Font
 * style is the one channel no other mark on a cell uses. */
td.cell.derived { font-style: italic; }
/* ===================== A SHIFT THAT CHANGED HANDS ON THE TRADE BOARD ======
 *
 * Chris, 28 Oct 2026: "any shift that gets swapped should be tagged as
 * swapped in a way that is visible to anyone looking at the schedule, e.g. a
 * small swap icon to top right of the shift assignment."
 *
 * ONE MARK, FOUR SURFACES, and the same corner on all of them: web/swap-mark.js
 * draws it, the Worker's markSwapped decides which rows carry it.
 *
 * WHY A REAL ELEMENT, on the grid as on the stamp: every other channel on a
 * cell is already the sole signal for something -- background-color the tones
 * and violation tints, box-shadow the violation ring, outline the selection
 * (and the draft outline), ::before the pinned corner (top LEFT), ::after the
 * manual fold (top RIGHT), background-image the weekend band and the variant
 * wedge, and the .vtag stamp the bottom left. The top right is the corner
 * Chris named, and the manual fold already lives in it, so a cell carrying
 * both steps the icon in by the fold's width rather than drawing on it.
 *
 * ROOM IS MADE, NOT TAKEN: a swapped cell or chip pads its right edge by the
 * icon's width, so a name that fills its column ellipsises a character
 * earlier instead of running under the mark.
 *
 * THE INK IS --accent-ink, the readable accent (Chris, 28 Oct 2026: "Text,
 * links, selected tabs and button labels use a darker green tuned per theme
 * so they pass 4.5:1"), which the brand-ink guard measures against every
 * surface and the accent wash in both themes. Inside a calendar chip it
 * takes the chip's own ink instead: those are tuned against exactly the wash
 * the chip is drawn on, and a selected trade pill is --on-accent on the
 * accent fill, where a green mark would vanish. */
.swap-mark {
  --swap-size: 11px;
  display: inline-block; flex: none;
  width: var(--swap-size); height: var(--swap-size);
  line-height: 0; color: var(--accent-ink);
}
.swap-mark svg { display: block; width: 100%; height: 100%; }

/* On a grid cell: the committee's grid, the partner-per-row grid, and the
   strip on My schedule. Sized with the name, inside 10-12px. */
.swap-mark.in-cell {
  --swap-size: clamp(10px, calc(var(--cell-fs) * 10 / 11), 12px);
  position: absolute; top: 1px; right: 1px; pointer-events: auto;
}
table.grid td.cell.swapped {
  padding-right: calc(clamp(10px, calc(var(--cell-fs) * 10 / 11), 12px) + 1px);
}
td.cell.manual > .swap-mark.in-cell { right: 8px; }
table.grid td.cell.manual.swapped {
  padding-right: calc(clamp(10px, calc(var(--cell-fs) * 10 / 11), 12px) + 8px);
}

/* On a calendar chip or bar: My schedule's month, and the trade board. */
.calb-chip.swapped, .cal-shift.swapped { position: relative; padding-right: 13px; }
.calb-bar.swapped { padding-right: 13px; }
.swap-mark.in-chip {
  --swap-size: 10px;
  position: absolute; top: 1px; right: 2px; color: inherit;
}

/* On a list row, after the shift's name: the block list and Past/Upcoming. */
.swap-mark.in-row { --swap-size: 12px; align-self: flex-start; margin-top: 2px; }
.myrow .w.swapped .swap-mark.in-row { vertical-align: text-top; margin: 1px 0 0 3px; }
.dl-task.swapped { gap: 5px; }

/* On a name in Who's on, raised to the name's top right like an exponent. */
.who { white-space: nowrap; }
.who.swapped { padding-right: 1px; }
.swap-mark.in-name { --swap-size: 10px; vertical-align: super; margin-left: 2px; }

/* A PHONE KEEPS THE MARK AND DROPS THE WORDS. "traded in" beside the icon is
   the same fact twice, and at 390px the second copy is what pushes the clock
   onto its own line. The icon's own label still says it all to a screen
   reader and a long press. */
@media (max-width: 560px) {
  .dl-task.swapped .dl-tag { display: none; }
}

td.cell.wknd, th.wknd { --day-wash: linear-gradient(var(--wknd-wash), var(--wknd-wash)); }
/* A HOLIDAY IS HATCHED AS WELL AS WASHED, so it is not telling itself apart
   from a Saturday by lightness alone -- there are only so many steps of grey
   between a panel and a panel, and somebody scanning ninety columns should not
   have to judge which of two greys is the darker one. */
td.cell.holi, th.holi {
  --day-wash:
    repeating-linear-gradient(135deg, var(--holi-hatch) 0 2px, transparent 2px 7px),
    linear-gradient(var(--holi-wash), var(--holi-wash));
}
/* ------------------------------- THE FAINTEST INK IS NOT USED ON A BAND DAY
 *
 * A stronger wash costs text contrast, and the three places that would have
 * paid for it are the three the eye goes to on a weekend column: the Sa/Su
 * label under the date, the away count beside it, and a vacation name in the
 * cell. All three are --text-faint, which is the FAINTEST token the palette
 * has, and on the raised weekend wash it computes to 3.95:1 (dark) and 3.98:1
 * (light) -- under the 4.5:1 the text tokens are held to, and already under it
 * at the old alphas (4.24 and 4.28).
 *
 * So the ink steps up one token exactly where the wash is strongest, which
 * makes the weekend MORE legible rather than less -- which is the request.
 * --text-dim is 5.34:1 (dark) and 5.46:1 (light) on the same surface. Stepping
 * the ink rather than holding the wash back is what lets the wash move at all.
 *
 * The zeroes are deliberately left at --line: a day nobody is off reads as one
 * number and a blank, per the note on that rule, and a blank is not text. */
table.grid thead tr.dow th.wknd,
table.grid thead tr.dow th.holi { color: var(--text-dim); }
table.grid thead tr.counts th.wknd .n-away,
table.grid thead tr.counts th.holi .n-away { color: var(--text-dim); }
td.cell.vac.wknd, td.cell.vac.holi { color: var(--text-dim); }

/* The bracket. Days ACROSS the top, so the edges are left and right. */
td.cell.band-s, th.band-s {
  --band-a: linear-gradient(90deg, var(--band-edge) 0 2px, transparent 2px);
}
td.cell.band-e, th.band-e {
  --band-b: linear-gradient(270deg, var(--band-edge) 0 2px, transparent 2px);
}
/* Days DOWN the side: the same band, rotated, so the bracket stays around the
   weekend rather than around each of its days. */
table.grid.down td.cell.band-s, table.grid.down td.task.band-s {
  --band-a: linear-gradient(180deg, var(--band-edge) 0 2px, transparent 2px);
}
table.grid.down td.cell.band-e, table.grid.down td.task.band-e {
  --band-b: linear-gradient(0deg, var(--band-edge) 0 2px, transparent 2px);
}
/* The task column in the rotated grid is a day, so it takes the wash too --
 * and the panel step with it, in the same two channels and for the same reason
 * as the header. `table.grid td.task` is sticky and opaque (`background:
 * var(--panel)`, one class and three elements), so the colour has to be
 * restated at this weight as a LONGHAND or the band loses both halves exactly
 * as it did in the header. Two rules at the end of the file used to do the
 * colour half and did it with the shorthand -- see the note where they were. */
table.grid.down td.task.wknd { background-color: var(--panel-2); }
table.grid.down td.task.holi { background-color: var(--panel-3); }
table.grid.down td.task.wknd, table.grid.down td.task.holi {
  background-image: var(--band-a, none), var(--band-b, none), var(--day-wash, none);
}
table.grid.down td.task.wknd { --day-wash: linear-gradient(var(--wknd-wash), var(--wknd-wash)); }
table.grid.down td.task.holi {
  --day-wash:
    repeating-linear-gradient(135deg, var(--holi-hatch) 0 2px, transparent 2px 7px),
    linear-gradient(var(--holi-wash), var(--holi-wash));
}
/* A SPARE-BAND CELL CLEARS ITS BACKGROUND ON HOVER and would otherwise keep
   the wash, which reads as a cell that half-responded. */
td.cell.spare:hover { background-image: none; }

/* ------------------------------------------------- coverage ribbon (signature)
   Site-wide continuous coverage rendered as real clock time. Each service is a
   band; each assignment a segment sized to the hours it actually covers. A gap
   is literal empty space, an overlap is a stacked notch. This is the one place
   the schedule is drawn as time rather than as cells. */

.ribbon { padding: 4px 0 14px; }
.ribbon-head {
  display: flex; align-items: baseline; gap: 10px; margin: 6px 0 10px;
}
.ribbon-head h3 {
  margin: 0; font-size: var(--fs-sm); letter-spacing: .12em; text-transform: uppercase;
  font-family: 'IBM Plex Sans Condensed', sans-serif; color: var(--text-dim);
}
.ribbon-head .hint { font-size: var(--fs-xs); color: var(--text-faint); }
.svc { display: grid; grid-template-columns: 108px 1fr; align-items: center; gap: 10px; margin-bottom: 3px; }
.svc-name { font-size: var(--fs-xs); color: var(--text-dim); text-align: right; }
/* Neutral by default: empty track means "not running", which is a normal
   state for weekend-only services. Only a real uncovered window is red. */
.svc-track {
  position: relative; height: 15px; border-radius: 3px;
  background: repeating-linear-gradient(45deg,
    var(--line-soft) 0 5px, transparent 5px 10px);
  outline: 1px solid var(--line-soft); overflow: hidden;
}
.seg { position: absolute; top: 0; bottom: 0; }
.seg[data-tone="ob"]   { background: var(--brand); }
.seg[data-tone="cv"]   { background: var(--spo2); }
.seg[data-tone="lv"]   { background: var(--pa); }
.seg[data-tone="gen"]  { background: var(--grey); }
.seg[data-tone="aps"]  { background: var(--agent); }
.seg + .seg { border-left: 1px solid var(--line); }
.seg.alt { filter: brightness(.78); }
.svc-track .gapmark {
  position: absolute; top: 0; bottom: 0; min-width: 2px;
  background: repeating-linear-gradient(45deg,
    var(--art) 0 4px, rgba(255,92,108,.45) 4px 8px);
  box-shadow: 0 0 0 1px var(--art);
}

/* ------------------------------------------------------- the tier ladder
 *
 * Chris, 22 Oct 2026: the coverage page "should also include providers on tier
 * assignments (exclusive of those already listed), perhaps a row for each tier
 * that is either completely or partially filled in color based on numbers, and
 * another final row for vacation."
 *
 * The same 108px + 1fr grid as the service tracks above, so the two read as
 * one table against one date axis: a reader answering "who was on that
 * Tuesday" runs a finger down a column, and that only works while the
 * day-for-day geometry is identical.
 *
 * FOUR CHANNELS, NOT ONE. The HEIGHT of each day's bar is the fill fraction,
 * the NUMBER is printed in it wherever the columns are wide enough, a GLYPH
 * marks short and over, and each row says its own tally in words beside its
 * name. Hue is the fifth and the least load-bearing -- which is the point: a
 * fill state carried by colour alone is unreadable to a colour-blind reader
 * and gone entirely in the printout somebody brings to a committee meeting.
 *
 * The hues themselves are the ones the rest of the app already means by them.
 * --agent is "a tier" (it is the tier tone in the grid), so it edges the track
 * and names the row; the BAR says the state in the grid's own three steps,
 * --ecg filled, --warn wrong, --art wrong on a tier that blocks a publish. No
 * new colour is minted here: a tier being short is not a new kind of fact. */
.ladder-head {
  display: flex; align-items: baseline; gap: 10px; margin: 18px 0 8px;
  border-top: 1px solid var(--line); padding-top: 12px; flex-wrap: wrap;
}
.ladder-head h3 {
  margin: 0; font-size: var(--fs-sm); letter-spacing: .12em; text-transform: uppercase;
  font-family: 'IBM Plex Sans Condensed', sans-serif; color: var(--text-dim);
}
.ladder-head .hint {
  font-size: var(--fs-xs); color: var(--text-faint); flex: 1 1 320px; line-height: 1.45;
}
/* Taller than a service track: these cells carry a number. */
.svc.ladder { margin-bottom: 2px; }
.svc.ladder .svc-name {
  display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2;
}
.svc.ladder .svc-name b { font-weight: 600; color: var(--text-dim); }
.svc.ladder .svc-name i {
  font-style: normal; font-size: 9.5px; color: var(--text-faint);
  letter-spacing: .02em;
}
.svc-track.ladder {
  height: 22px; background: none; outline: 1px solid var(--line-soft);
}
.fday {
  position: absolute; top: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center;
  border-left: 1px solid var(--line-soft);
}
/* The bar: grounded at the bottom, so a column of them reads as a bar chart
   and a half-filled tier is visibly half. */
.fday b {
  position: absolute; left: 1px; right: 0; bottom: 0; border-radius: 1px 1px 0 0;
}
.fday span {
  position: relative; z-index: 1;
  font-family: 'IBM Plex Mono', monospace; font-size: 9.5px; font-weight: 600;
}
.fday u {
  position: absolute; top: 0; right: 1px; z-index: 1;
  text-decoration: none; font-size: 7px; line-height: 1;
}
/* THE NUMBER IS NOT A STATE COLOUR, and that is a contrast decision rather
   than a stylistic one. --ecg is 3.52:1 on the light theme's near-white page,
   which is fine for a 24px card figure and under the 4.5:1 floor for a 9.5px
   one -- and this is the smallest text on the page. So the count is drawn in
   --text, which both themes measure for exactly this, and the STATE is carried
   by the bar, its top edge, and the glyph. A number nobody can read is not a
   second channel. */
.fday span { color: var(--text); }
.fday.fill-full b  { background: var(--ecg-dim); outline: 1px solid var(--brand); }
/* The top edge drawn as well as the fill: --warn-soft is a 15% wash, right for
   a badge and too faint to read a LEVEL off at 22px, and the level is the
   whole point of a bar. The edge is where the fill reaches. */
.fday.fill-short b { background: var(--warn-soft); outline: 1px solid var(--warn); }
.fday.fill-over b  { background: var(--warn-soft); outline: 1px solid var(--warn); }
.fday.fill-short u,
.fday.fill-over u  { color: var(--warn); }
/* A tier the chair cannot publish past is the grid's hard red, not amber --
   Tiers 1 to 5 are contracted coverage; Tier 6 and the bullpen absorb whoever
   is left, so the same shortfall there is a different fact. */
.fday.crit b       { background: var(--art-dim); outline-color: var(--art); }
.fday.crit u       { color: var(--art); }
/* NO DENOMINATOR, DRAWN AS NO DENOMINATOR.
   The Tier 7 bullpen has no target -- "a range with no fixed number of
   positions" that absorbs whoever the day leaves -- and Tier 1's positions are
   roles checked in the rows above. Neither has a fraction, so neither gets a
   height that could be measured: a fixed hatched band, the same neutral hatch
   this page already uses for a service that is not running, meaning "not
   measured" rather than "half full". */
.fday.nodenom b {
  background: repeating-linear-gradient(45deg,
    var(--line-soft) 0 4px, transparent 4px 8px);
  outline: 1px solid var(--line-soft);
}
/* Quieter than a measured number, because it is not measured against
   anything -- but still a text token rather than an accent, for the same
   reason the rule above gives. */
.fday.nodenom span { color: var(--text-dim); }
/* The tier rows' own identity, in the colour the grid already uses for a
   tier. On the name and the track edge only -- never on the bar, which has
   the state to say. */
.svc.ladder.k-rung .svc-name b,
.svc.ladder.k-roles .svc-name b,
.svc.ladder.k-bullpen .svc-name b { color: var(--agent); }
.svc.ladder.k-rung .svc-track { outline-color: var(--agent-dim); }
/* Work on no tier and no required service: Endo, and the ICU shifts the
   hospital assigns. Neutral -- it is not a rung and must not look like one. */
.svc.ladder.k-other .svc-name b { color: var(--grey); }
/* VACATION IS ABSENCE, AND LAST. Its separation is a rule and not a margin:
   nothing here is in a coverage total or in any tier's fill. Quiet and
   italic, the same way the grid draws the Away band -- a vacation row that
   looked like coverage would be the one misreading this page cannot afford. */
.svc.ladder.k-vac { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 6px; }
.svc.ladder.k-vac .svc-name b { color: var(--text-faint); font-style: italic; }
.svc.ladder.k-vac .fday b {
  background: repeating-linear-gradient(45deg,
    var(--line-soft) 0 3px, transparent 3px 7px);
}
.svc.ladder.k-vac .fday span { color: var(--text-faint); font-weight: 400; }

/* --------------------------------------------------------------- findings */

.drawer {
  /* 380px IS NOW ONLY THE DEFAULT. `--drawer-w` is written by the grip below
   * and remembered per viewer. `.drawer.shut` is two classes against this
   * rule's one, so folding still wins over whatever width was chosen. */
  width: var(--drawer-w, 380px); flex-shrink: 0;
  border-left: 1px solid var(--line);
  background: var(--panel); display: flex; flex-direction: column; min-height: 0;
  position: relative;          /* the grip is positioned against this edge */
}

/* ------------------------------------------------------- sizing the drawer
   Chris, 20 Oct 2026: "make the rule check tray sizeable, not just
   collapsible."

   Folding answers "get out of the way". It cannot answer "I need to read
   thirty findings against the grid", which is the other half of the job and
   the thing 380px was always a compromise about -- see the note below on why
   that number was a compromise in the first place.

   WIDTH IS THE ONLY AXIS, AND THAT IS NOT AN OMISSION. This panel is only
   ever a right-hand column: `@media (max-width: 900px)` sets
   `.drawer { display: none }` and the findings move into the mobile sheet, so
   there is no viewport where it is both open and stacked. (The
   `width: 100%; max-height: 40vh` rules in the 860px block are older than
   that hide and unreachable for an open drawer.) A vertical drag was built
   here first and deleted: a second axis no layout can reach is dead code with
   a test pretending otherwise.

   7px of grab area over a 1px line, because a border is not a target and a
   3px one is a target you miss. Drawn only on hover, on focus and while
   dragging, so the chrome stays quiet until somebody reaches for it. */
.drawer-grip {
  position: absolute; left: -3px; top: 0; bottom: 0; width: 7px; z-index: 3;
  cursor: col-resize; background: transparent; touch-action: none;
}
/* A THUMB IS NOT A CURSOR. 7px is a fine target for a mouse and a miss for
 * a finger, so on a touch screen the grab area is 20px, still drawn only while
 * it is in use. */
@media (pointer: coarse) {
  .drawer-grip { left: -10px; width: 20px; }
}
.drawer-grip:hover,
.drawer-grip:focus-visible,
.drawer.sizing .drawer-grip { background: var(--brand); opacity: .5; }
.drawer-grip:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
/* NO TEXT SELECTION WHILE A DRAG IS IN FLIGHT. Dragging across the findings
   list would otherwise select it, which reads as the drag having broken. The
   cursor is held on <body> for the same reason: leave it to the grip and it
   flickers back to a caret the moment the pointer outruns the element. */
.drawer.sizing { user-select: none; }
body.drawer-sizing { cursor: col-resize; user-select: none; }
/* A folded panel is a 40px spine. There is no size to drag, and a handle that
   does nothing is worse than no handle. */
.drawer.shut .drawer-grip { display: none; }
.drawer h3 {
  margin: 0; padding: 12px 14px; font-size: var(--fs-sm); letter-spacing: .1em;
  text-transform: uppercase; font-family: 'IBM Plex Sans Condensed', sans-serif;
  color: var(--text-dim); border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 8px;
}
.drawer .list { overflow: auto; flex: 1; }
/* THE SUMMARY WRAPS INSIDE THE DRAWER. ".chip" never wraps, and a busy block's
 * reads "1 critical · 0 hard · 1 medium · 1 accepted · 150 pinned" -- wider
 * than a 260px drawer. It ran past the drawer, the page past the screen, and a
 * phone answers that by zooming the whole app out to fit: the blank band down
 * the right and along the bottom of Chris's landscape screenshot, 28 Oct 2026.
 * Open only: folded, the chip is on its side and wraps by length already. */
.drawer:not(.shut) h3 { flex-wrap: wrap; row-gap: 6px; }
.drawer:not(.shut) #drawerChip { white-space: normal; min-width: 0; max-width: 100%; line-height: 1.35; }

/* ------------------------------------------------------ folding the drawer
   380px is a quarter of a 13" laptop, permanently, describing a grid you
   cannot see enough of while you act on what it says. Folded it keeps its
   width for the spine and nothing else: the title turns on its side and the
   count stays legible, because a panel that hides how many findings there are
   is a panel nobody opens again. */
.drawer-toggle {
  background: none; border: 0; color: var(--text-dim); cursor: pointer;
  font-size: var(--fs-title); line-height: 1; padding: 2px 4px; border-radius: 4px;
  transition: transform .12s ease;
}
.drawer-toggle:hover { background: var(--panel-2); color: var(--text); }
.drawer-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.drawer.shut { width: 40px; }
.drawer.shut .list { display: none; }
.drawer.shut h3 {
  flex-direction: column; gap: 10px; padding: 10px 0; border-bottom: 0;
  height: 100%; align-items: center;
}
.drawer.shut .drawer-toggle { transform: rotate(180deg); }
.drawer.shut .drawer-title { writing-mode: vertical-rl; letter-spacing: .18em; }
/* Vertical too, so a two-digit count does not force the spine wider. */
.drawer.shut .chip { writing-mode: vertical-rl; padding: 6px 2px; }

/* CHECK IT AGAIN. A quiet glyph rather than a labelled button, and since
 * 26 Oct 2026 it is the glass's neighbour rather than the severity chip's --
 * Chris: "move the rule check refresh icon to the the left of the rule check
 * viewglass settings icon."
 *
 * So it takes the glass's box exactly: the same 32px square, the same 9px
 * radius, the same soft fill on hover. Two icons of different sizes sitting
 * together read as two unrelated things that happen to be adjacent; at one
 * size they read as the pair they are -- what the list shows, and whether
 * what it shows is current. The glyph itself is set a little under the
 * glass's 26px, because a circled arrow at 26px is a heavier mark than a
 * magnifier at the same size. */
.drawer-refresh {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; flex: 0 0 auto;
  padding: 0; border: 0; border-radius: 9px;
  background: none; color: var(--text-dim); cursor: pointer;
  /* MEASURED AGAINST THE GLASS, not chosen. The magnifier is a 26px SVG with
   * ink out to its edges; a 19px glyph beside it read as the smaller of the
   * two and broke the pair the move was for. 22px is where the two marks
   * weigh the same -- still under 26, because a circled arrow is the heavier
   * shape at any given size. */
  font-size: var(--fs-xl); line-height: 1;
}
.drawer-refresh:hover { color: var(--text); background: var(--panel-3); }
.drawer-refresh[disabled] { opacity: .5; cursor: default; }
/* Spinning while it works, for the same reason the commit button greys out:
 * a control that looks idle during a round trip gets pressed again. */
.drawer-refresh.busy { animation: drawer-spin .9s linear infinite; }
@keyframes drawer-spin { to { transform: rotate(360deg); } }

/* A BUTTON THAT IS WORKING SAYS SO.
 *
 * Chris, 23 Oct 2026: "perhaps a sand timer or spinner when something has been
 * clicked and is still in process instead of leading the user to click again?"
 *
 * Grey alone is ambiguous -- it reads as "not allowed" as readily as
 * "working", and somebody who thinks a button is refusing them goes looking
 * for what they did wrong instead of waiting. The spinner is a pseudo-element
 * so no caller has to add a node, and it rides in front of whatever label the
 * button already has.
 *
 * `currentColor` so it is legible on a primary and on a ghost without a second
 * rule, and `prefers-reduced-motion` stops it turning -- the disabled state and
 * the label still carry the message, so the animation is the decoration. */
.btn.working { position: relative; }
.btn.working::before {
  content: ''; display: inline-block; width: .8em; height: .8em;
  margin-right: .45em; vertical-align: -.08em;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: btn-spin .7s linear infinite;
}
.btn.working[disabled] { opacity: .85; }   /* readable, not faded out */
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn.working::before, .drawer-refresh.busy { animation: none; }
}
/* The folded spine has no refresh any more: it moved into the findings bar,
 * which `.drawer.shut .list` hides along with the findings it is a bar for.
 * Nothing is lost by that -- opening the drawer re-runs the check on its own
 * (see the drawerBtn handler), so the gesture that makes the list visible is
 * already the gesture that makes it current. */

/* ONLY WHERE THE LAYOUT ACTUALLY STACKS, which is 860px and under (`.body
 * { flex-direction: column }` below). This said 1100 until 28 Oct 2026, and
 * between 861 and 1100 -- a phone held sideways -- the grid and the rule
 * check sit SIDE BY SIDE, so a folded drawer at `width: 100%` took the whole
 * row and squeezed the grid to nothing. Chris: "When rule check is collapsed
 * [it] blocks the schedule completely." There it folds to the spine, as on a
 * desktop. the-screen-is-all-yours-browser-test measures both widths. */
@media (max-width: 900px) {
  /* Stacked under the grid rather than beside it, so folding means height. */
  .drawer.shut { width: 100%; max-height: 40px; }
  .drawer.shut h3 { flex-direction: row; height: auto; padding: 8px 12px; }
  .drawer.shut .drawer-title,
  .drawer.shut .chip { writing-mode: horizontal-tb; }
  .drawer.shut .drawer-toggle { transform: rotate(90deg); }
}
/* TWO LINES, NOT FIVE.
 *
 * Chris, 26 Oct 2026: "how can we compact these rule violation findings
 * without loosing details or the modern aesthetic?"
 *
 * Measured on his own Q4 drawer, a finding was about 160px: a line for the
 * word "select", a line for the severity tag, a line for the message, two for
 * the explanation and a forty-pixel button row of its own. Four of those five
 * lines were chrome around one sentence. What is left is a control line --
 * tick-box, severity, date, task, Accept -- and the sentence under it, and
 * nothing that was on screen has gone: see the notes in app.js on where each
 * piece went.
 *
 * The padding comes down with it, but not to nothing: these rows are a click
 * target that scrolls the grid to a cell, and a 24px row is a row people miss.
 */
.finding {
  padding: calc(var(--space-2) - 1px) var(--space-3) var(--space-2);
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer; border-left: 3px solid transparent;
}
.finding-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
/* `width: auto` because the sheet sizes form controls to fill their row, which
 * is right for a text input in a dialog and wrong for a tick-box on a list. */
.finding-pick { width: auto; flex: 0 0 auto; margin: 0; cursor: pointer; }
/* THE QUIET END OF THE LINE. It is a real button at a real size -- 11px text
 * in a bordered box clears the hit target a thumb needs -- but it is a ghost,
 * so a column of thirty of them reads as a margin rather than as thirty
 * things demanding to be pressed. `margin-left: auto` puts it hard right,
 * which is also what keeps the date and the task from being pushed around by
 * whether a row happens to be acceptable. */
.finding-accept {
  /* A SMALL BUTTON ON A 24px LINE: the finding's control line holds a
     tick-box, the severity, the date and this, and must stay one line
     (a-drawer-that-fits-test). --control-h-sm, not the full control. */
  flex: 0 0 auto; margin-left: auto; min-height: var(--control-h-sm);
  padding: 0 8px; font-size: var(--fs-xs); line-height: 1.6;
}
.finding:hover { background: var(--panel-2); }

/* ALL FOUR SEVERITIES, AND THE TWO THAT MATTER MOST WERE THE MISSING ONES.
 *
 * Chris, 9 Oct 2026: "there was no visual cue to differentiate critical from
 * hard from medium from soft (e.g. subtle color highlighting or small label or
 * small icon)."
 *
 * Only `hard` and `soft` had a rule. `.finding` sets a TRANSPARENT left
 * border, so critical and medium both fell back to it -- which left the one
 * severity that blocks publication with no cue at all, while the one below it
 * was red. Two rows a hundred apart in consequence looked identical, and the
 * drawer's severity ordering was therefore invisible: the list IS sorted
 * critical-first, and reads as unsorted because nothing says which band you
 * are in.
 *
 * The palette is the GRID'S palette (td.cell.viol-*), so a cell and its
 * finding are the same colour: --art for the two that block, --warn for
 * medium, --pa for soft. Critical and hard share red there and share it here;
 * what separates them is the tint and the label, because a colour nobody can
 * name is not a cue. */
.finding.critical { border-left-color: var(--art); background: var(--art-dim); }
.finding.hard   { border-left-color: var(--art); }
.finding.medium { border-left-color: var(--warn); }
.finding.soft   { border-left-color: var(--pa); }
.finding.critical:hover { background: var(--art-dim); filter: brightness(0.98); }

/* ONE MOVE 'FIX MECHANICALLY' TRIED, under the finding it declined to fix: the
 * move in bold, then the blocking rule it would have broken. A hairline above
 * each so several moves read as separate attempts; tokens only, so both
 * themes draw it from their own --line. */
.finding .det.refusal-move {
  margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line);
}

/* THE LABEL, because colour alone is not a cue for everyone who reads this.
 * Eight per cent of men cannot tell --art from --warn reliably, and this
 * drawer is what a committee uses to decide whether a quarter can publish. */
.sev-tag {
  display: inline-block; margin-right: 6px; padding: 0 var(--tag-px); border-radius: var(--radius-sm);
  font-family: 'IBM Plex Sans Condensed', sans-serif;
  font-size: 9.5px; font-weight: 600; letter-spacing: .08em; line-height: 1.7;
  text-transform: uppercase;
  border: 1px solid currentColor;
  /* On a flex line rather than in a run of text since 26 Oct 2026, so the old
   * `vertical-align` nudge has nothing to act on and `align-self` does the
   * work instead. */
  flex: 0 0 auto; align-self: center;
}
.finding.critical .sev-tag { color: var(--art); }
.finding.hard   .sev-tag { color: var(--art); }
.finding.medium .sev-tag { color: var(--warn); }
.finding.soft   .sev-tag { color: var(--pa); }
/* An accepted finding is settled, so its tag stops shouting with the rest. */
.finding.waived .sev-tag { color: var(--text-faint); }
.finding .when {
  flex: 1 1 auto; min-width: 0;
  font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-xs); color: var(--text-faint);
  /* One line. The date and the task are a label for the sentence underneath,
   * and a label that wraps to two lines is the sentence's size again. The
   * full text is on the row's own title in the grid it jumps to. */
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.finding .msg { margin-top: 1px; font-size: var(--fs-sm); line-height: 1.4; }
.finding .det { margin-top: 2px; font-size: var(--fs-xs); color: var(--text-dim); line-height: 1.4; }
.empty-state { padding: 26px 16px; color: var(--text-faint); font-size: var(--fs-ui); text-align: center; }

/* A POSITION HELD BY SOMEBODY THE PARTNER FILTER IS HIDING.
 *
 * Not drawn as an empty cell, because it is not one: filtering for LarsonC
 * blanks the other fifty-eight names, and an ordinary blank would invite
 * putting a partner into a seat that is already taken. Hatched rather than
 * white, so a reader can see at a glance that the row is occupied and the
 * shape of LarsonC's own quarter still stands out against it. */
.cell.masked {
  background: repeating-linear-gradient(
    135deg, transparent, transparent 4px,
    var(--line) 4px, var(--line) 5px);
  opacity: .45; cursor: default;
}
.cell.masked:hover { filter: none; }

/* ------------------------------------------------ the drawer's two headings
 *
 * Severity, then the rule, then the date -- see groupFindings. The bands are
 * the only thing in the drawer that stays put while it scrolls, which is what
 * makes a list of 77 long runs readable as 77 of ONE thing rather than as a
 * list that will not end. */
.sev-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 8px;
  margin: calc(var(--space-2) + 2px) 0 0;
  padding: calc(var(--space-1) + 1px) var(--space-2);
  background: var(--panel); border-radius: 5px;
  border-left: 3px solid var(--line);
  font-family: 'IBM Plex Sans Condensed', sans-serif;
  font-size: var(--fs-xs); letter-spacing: .09em; text-transform: uppercase;
}
.sev-head.critical { border-left-color: var(--art); background: var(--art-dim); }
.sev-head.hard     { border-left-color: var(--art); }
.sev-head.medium   { border-left-color: var(--warn); }
.sev-head.soft     { border-left-color: var(--pa); }
/* THE GREY IS THE OTHER HALF OF THE 20 OCT RULING. Chris: accepting "should be
 * greyed out and demoted to an Approved/Accepted violation section". So this
 * band takes no severity colour at all -- it is the one band whose rows are
 * not asking for anything -- and the dim is deliberately short of invisible:
 * a reader scrolling past must still be able to count them. */
.sev-head.accepted {
  border-left-color: var(--line);
  color: var(--text-dim);
}
.sev-head.accepted .sev-head-name { font-weight: 500; text-transform: none; letter-spacing: .03em; }
.sev-head-name  { font-weight: 600; }
.sev-head-count { margin-left: auto; color: var(--text-faint); letter-spacing: .04em; }

.rule-head {
  margin: calc(var(--space-2) - 1px) 0 1px;
  padding: var(--space-1) var(--space-2) var(--space-1) var(--space-3);
  border-left: 2px dotted var(--line);
}
/* CENTRE, NOT BASELINE, since the line now carries a tick-box and sometimes a
 * button: baseline-aligning a checkbox against 12.5px text hangs it a third of
 * its own height below the words. */
.rule-head-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
/* The title gives way, not the tray: with the touch floor the fold arrow
   beside it is 24px wide on a phone, and a long rule name has to wrap inside
   what is left rather than push the count past the tray's edge. */
.rule-head-title { font-size: var(--fs-sm); font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.rule-head-pick { width: auto; flex: 0 0 auto; margin: 0; cursor: pointer; }
.rule-head-count {
  margin-left: auto; font-family: 'IBM Plex Mono', monospace;
  font-size: var(--fs-xs); color: var(--text-faint); white-space: nowrap;
}
/* NOT A GHOST, unlike the one on a row: this is the control that accepts a
 * dozen findings at once, it is only on screen once something is ticked, and
 * a reader who has just ticked twelve boxes is looking for it. */
.rule-head-accept {
  flex: 0 0 auto; padding: 1px 9px; font-size: var(--fs-xs); line-height: 1.6;
}
/* The rule's own sentence, printed once where every finding under it would
 * otherwise repeat it. Indented to the title, so it reads as belonging to the
 * heading rather than to the first row under it. */
.rule-head-why {
  margin: 3px 0 0 20px; font-size: var(--fs-xs); line-height: 1.4;
  color: var(--text-dim);
}

/* THE SAME CONTROL ONE LEVEL UP, on the medium and soft band headings only.
 * `margin-left: auto` pushes it to the right of the count rather than beside
 * it: the heading reads "medium -- 66 in 9 rules" as a sentence, and a
 * checkbox wedged into the middle of it breaks the sentence. On a narrow
 * drawer the row wraps and it lands underneath, which is also fine. */
.sev-head-bulk {
  display: flex; align-items: center; gap: 10px; margin-left: auto;
  font-size: var(--fs-xs); color: var(--text-dim); text-transform: none;
  letter-spacing: 0; font-weight: 400;
}
.sev-head-bulk label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.sev-head-bulk .btn { padding: 2px 9px; font-size: var(--fs-xs); }

/* The fold arrow is a real button so it is reachable by keyboard and announced
 * as expanded or collapsed; it just does not look like one. */
.fold {
  appearance: none; background: none; border: 0; padding: 0;
  color: var(--text-faint); font-size: var(--fs-xs); line-height: 1; cursor: pointer;
}
.fold:hover { color: var(--text); }
.fold:focus-visible { outline: 2px solid var(--pa); outline-offset: 2px; border-radius: 2px; }

/* EVERY finding in a batch, listed, because the reason about to be written is
 * a claim about all of them and that cannot be judged against a list that
 * stops at forty. Tall enough to read, short enough that the reason box and
 * the button are still on screen under it. */
.waive-list {
  max-height: 220px; overflow: auto; margin: 10px 0;
  padding: 6px 8px; font-size: var(--fs-sm);
  border: 1px solid var(--line); border-radius: 5px; background: var(--panel);
}
/* EVERY ROW GOES SOMEWHERE. Chris, 26 Oct 2026: "from violation acceptance
 * window link each of the violations so that they can be edited directly from
 * this pane."
 *
 * A button that has to read as a line in a list: the sheet sizes form controls
 * to fill their row and gives them a border and a background, all three of
 * which would turn this list into a stack of grey slabs. So the button is
 * stripped back to text and given its affordance by behaviour instead -- a
 * hover fill and a pointer -- which is what a row in a list that goes
 * somewhere looks like everywhere else in this app.
 *
 * `text-align: left` because a button centres its label, and a centred date
 * in a column of dates is the one thing that would give it away as a control
 * dressed as a row. */
.waive-row {
  display: block; width: 100%; text-align: left;
  margin: 0; padding: 3px 5px;
  border: 0; border-radius: 4px; background: none; color: inherit;
  font: inherit; line-height: 1.45; cursor: pointer;
}
.waive-row:hover { background: var(--panel-3); color: var(--text); }
.waive-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -1px; }
.waive-read {
  display: flex; gap: 9px; align-items: flex-start; margin: 10px 0;
  padding: 8px 10px; border-radius: 5px;
  background: var(--art-dim); border: 1px solid var(--art);
  font-size: var(--fs-sm); cursor: pointer;
}

/* ---------------------------------------------------------------- tables */

table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-ui); }
table.data th {
  text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line);
  font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint); font-weight: 600; position: sticky; top: 0;
  background: var(--ink);
}
table.data td { padding: 6px 10px; border-bottom: 1px solid var(--line-soft); }
/* Inputs in a data table should be the width of their content, not the column. */
table.data td input[type="text"] { max-width: 150px; }
table.data td input[type="number"] { max-width: 76px; }
table.data td input[type="date"] { max-width: 148px; }
table.data tr:hover td { background: var(--panel-2); }
table.data td.num, table.data th.num { text-align: right; font-family: 'IBM Plex Mono', monospace; }

/* Every text-ish input, not a list of the ones that existed when this was
   written. input[type="email"] was missing, so the sixty address fields on the
   Roster tab fell back to the browser's own styling -- a different background,
   a different border and a different text colour from every field beside
   them. type="tel" is here for the phone columns for the same reason. */
input:not([type]), input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="number"], input[type="date"], input[type="time"],
input[type="password"], input[type="search"], select, textarea {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 5px 8px; width: 100%;
  min-height: var(--control-h);
}
/* THE FIELD'S SIZE AT ZERO SPECIFICITY, so the phone rule further down
   (`input, select, textarea { font-size: 16px }`, which stops iOS zooming on
   focus) still wins on a touch screen. */
:where(input, select, textarea) { font-size: var(--fs-ui); }
/* An <input> with no type attribute IS a text field, but no attribute
   selector matches it, so Pay, Catalogue, Billing and Access drew eleven of
   them with the browser's own inset border (the audit, 31 Oct 2026). */
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--focus); outline-offset: -1px; border-color: transparent;
}
textarea { font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-sm); line-height: 1.5; }

.pill {
  display: inline-flex; align-items: center; min-height: var(--pill-h);
  padding: 0 var(--pill-px); margin: 1px 2px 1px 0;
  border-radius: var(--radius-pill); background: var(--panel-3); border: 1px solid var(--line);
  font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-xs); color: var(--text-dim);
  cursor: pointer;
}
.pill.on { background: var(--spo2-dim); border-color: var(--spo2); color: var(--spo2); }
/* Swinging is a SHAPE of OB rather than a team of its own, so it reads as a
   different kind of pill: same row, own colour, and only ever shown beside an
   OB the partner is already on. */
.pill.swing { font-style: italic; }
.pill.swing.on {
  background: var(--ecg-dim); border-color: var(--brand); color: var(--accent-ink);
}

/* ------------------------------------------------- the roster, at a glance

   Chris, 28 Oct 2026: "each row should be compacted to see the most pertinent
   details (e.g. full name, abbreviated name, class, phone number, teams, night
   call) other details available through click". Six cells on the row, the rest
   in a second row that opens under it.

   THE TABLE IS A TABLE AGAIN ON A PHONE. The narrow-screen rule below turns
   every table.data into a block that scrolls inside itself and sizes its rows
   to max-content -- right for a wide table, wrong for this one, where the
   expanded row is a grid that would then lay every field side by side in one
   line and drag the compact row out to match. This table is built to fit, so
   it keeps table layout and its wrapper is the scroller of last resort. */
.roster-wrap { max-width: 100%; }
.roster-wrap > table.data.roster-table { display: table; width: 100%; }
table.data.roster-table td { vertical-align: middle; }
table.data th.roster-toggle, table.data td.roster-toggle { width: 30px; padding: 6px 0 6px 6px; }
table.data.roster-table td.roster-name input[type="text"] { min-width: 150px; max-width: 240px; }
table.data.roster-table td.roster-abbr input[type="text"] {
  width: 104px; font-family: 'IBM Plex Mono', monospace;
}
table.data.roster-table td.roster-class { white-space: nowrap; color: var(--text-dim); }
table.data.roster-table td.roster-phone input { width: 132px; }
table.data.roster-table td.roster-teams { min-width: 120px; }
table.data.roster-table td.roster-night select { width: auto; min-width: 104px; }
/* The whole row is the click target, so it says so. */
.roster-row { cursor: pointer; }
table.data .roster-row.open td { background: var(--panel-2); border-bottom-color: transparent; }
table.data .roster-detail td {
  background: var(--panel-2); padding: 4px 12px 14px 36px; cursor: default;
}
table.data tr.roster-detail:hover td { background: var(--panel-2); }
.roster-detail-body { display: flex; flex-direction: column; gap: 12px; }
.roster-fields {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 6px 16px; align-items: start;
}
.roster-fields .field { margin: 0; min-width: 0; }
.roster-fields .field input, .roster-fields .field select,
.roster-fields .field textarea { max-width: none; }
.roster-wide { grid-column: 1 / -1; }
/* A value somebody may read and not change, set as text rather than as a
   disabled box -- a greyed input reads as "broken", text reads as "yours to
   look at". */
.roster-ro {
  display: inline-block; padding: 5px 0; color: var(--text);
  overflow-wrap: anywhere; white-space: pre-wrap;
}
.roster-over { color: var(--art); font-weight: 600; }
.roster-detail-body .roster-staged { margin: 0; }
.roster-personal { border-top: 1px solid var(--line); padding-top: 10px; }
.roster-personal h4 { margin: 0 0 4px; }
.roster-personal .help { margin: 0 0 8px; }
.roster-actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* Drawn only where the row has dropped the cells it repeats -- see below. */
.roster-narrow-only { display: none; }
table.data.roster-practice td { vertical-align: top; }

/* A HEADING THAT SORTS. The button takes the heading's own type rather than a
   button's, so the row of headings still reads as headings; the arrow is the
   only thing that marks the active one, and aria-sort says the same to a
   screen reader. */
table.data th.sortable { padding: 0; }
table.data th.sortable .sort-head {
  display: inline-flex; align-items: center; gap: 4px; width: 100%;
  padding: 8px 10px; background: none; border: 0; cursor: pointer;
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  color: inherit; text-align: left;
}
table.data th.sortable[aria-sort] { color: var(--text); }
table.data th.sortable .sort-head:hover { color: var(--text); }
/* --accent-ink, not --ecg: #545 ("the brand paints and the ink reads") moved
   every accent use onto a named role, and #550 landed this ring the same day
   from a branch that predated it, so main carried one bare --ecg and
   the-brand-paints-and-the-ink-reads-test went red on it. */
table.data th.sortable .sort-head:focus-visible {
  outline: 2px solid var(--focus); outline-offset: -2px;
}
.sort-arrow { display: inline-block; min-width: 9px; font-size: 9px; }

/* ON A PHONE THE ROW KEEPS WHO IT IS. Name, abbreviation and teams identify a
   partner; class, phone and night call are what they hold, and they move into
   the expanded row, where .roster-narrow-only draws them. Measured at 390px:
   the row then fits with no sideways scroll at all. */
/* Only below the width where every table.data scrolls inside itself: above it
   the page is the scroller, and a wrapper that scrolled would take the sticky
   headings with it. */
@media (max-width: 900px) {
  .roster-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
}
@media (max-width: 700px) {
  table.data.roster-table .roster-class,
  table.data.roster-table .roster-phone,
  table.data.roster-table .roster-night { display: none; }
  .roster-narrow-only { display: grid; }
  table.data.roster-table td.roster-name input[type="text"] { min-width: 96px; width: 100%; }
  table.data.roster-table td.roster-abbr input[type="text"] { width: 76px; }
  table.data.roster-table td, table.data.roster-table th { padding-left: 6px; padding-right: 6px; }
  table.data.roster-table th.sortable { padding: 0; }
  table.data.roster-table th.sortable .sort-head { padding: 8px 6px; }
  table.data .roster-detail td { padding: 4px 8px 12px; }
  .roster-fields { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* ---------------------------------------------------------------- modals */

.scrim {
  position: fixed; inset: 0; background: var(--scrim);
  display: flex; align-items: center; justify-content: center; z-index: 50;
  padding: 20px;
}
.modal {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); width: min(560px, 100%); max-height: 86vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.modal.wide { width: min(880px, 100%); }
.modal header {
  padding: 14px 16px; border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 10px;
}
.modal header h3 { margin: 0; font-size: var(--fs-title); }
.modal .content { padding: 14px 16px; overflow: auto; }
.modal footer {
  padding: 12px 16px; border-top: 1px solid var(--line-soft);
  display: flex; gap: 8px; justify-content: flex-end; background: var(--panel-2);
}

/* A SHEET IS THE SAME DIALOG, RISEN FROM THE BOTTOM EDGE.
   Chris, 21 Oct 2026: "this should read and flow like iOS or Android native
   layouts". The native form for an action on a thing -- a day, a punch, a
   request -- rises from the edge your thumb is already at.
   On a phone .modal is ALREADY bottom-anchored and top-rounded (see the phone
   block below), so this adds the rise, the handle and a sheet's width. On a
   desktop it stays a centred dialog: a 400px-wide panel pinned to the bottom
   of a 1440px window is a phone pattern worn by something that is not one. */
.modal.sheet { width: min(640px, 100%); }
.modal.sheet .grab {
  width: 38px; height: 4px; border-radius: 999px; background: var(--line);
  margin: 9px auto 2px; flex: none;
}
@media (max-width: 900px) {
  .modal.sheet {
    width: 100%; max-height: 88dvh; border-radius: 20px 20px 0 0;
    animation: sheet-rise .26s cubic-bezier(.32, .72, 0, 1);
  }
  /* Nothing moves for somebody who asked for nothing to move. The sheet still
     arrives -- it just arrives already there. */
  @media (prefers-reduced-motion: reduce) {
    .modal.sheet { animation: none; }
  }
}
@keyframes sheet-rise { from { transform: translateY(100%); } to { transform: none; } }

/* ---------------------------------------- the explanation that collapses

   Chris, 21 Oct 2026: "collapsing any unnecessary information after first view
   and use (many explanations do not need to remain shown after subsequent
   uses)". The card is the first reading; the chip is every reading after, and
   it reopens the card. Neither is an alert: this is information somebody
   chose, so it is drawn in the calm accent and not the attention one. */
.tip {
  background: var(--spo2-dim); border: 1px solid var(--spo2);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 12px;
  display: flex; gap: 11px; align-items: flex-start;
}
.tip p { margin: 0; font-size: var(--fs-ui); color: var(--text-dim); line-height: 1.5; }
.tip strong { color: var(--text); font-weight: 600; }
.tipx {
  flex: none; align-self: center; min-height: 32px; padding: 0 11px;
  border-radius: 8px; border: 1px solid var(--spo2); background: transparent;
  color: var(--spo2); font: inherit; font-size: var(--fs-sm); font-weight: 600;
  cursor: pointer;
}
.tipx:hover { background: var(--spo2-dim); }
.tipchip {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 12px;
  min-height: 30px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel-2);
  color: var(--text-faint); font: inherit; font-size: var(--fs-sm); cursor: pointer;
}
.tipchip:hover { border-color: var(--spo2); color: var(--text-dim); }
/* The "i" is a glyph doing a job, so it gets the accent and the mono column
   width that keeps a row of these aligned. */
.tipchip b {
  color: var(--spo2); font-family: 'IBM Plex Mono', monospace; font-weight: 600;
}

/* THE CANDIDATE ROW READS LEFT TO RIGHT AS A DAY DOES.
 *
 * yesterday | who | tomorrow | what they are owed | why not
 *
 * A grid rather than a flex row, so the four columns line up down the whole
 * list: the point of putting the neighbouring days beside the name is that a
 * reader can run an eye down the column and see who is already working either
 * side, and ragged columns destroy exactly that. */
.cand, .cand-head {
  display: grid; align-items: center; gap: 10px; padding: 6px 8px;
  /* yesterday | who | TODAY | why not | tomorrow | owed.
   * The reason sits against the name it belongs to; the number everybody
   * scans down stays in one column at the right edge. The subject day sits
   * between the name and the reason because it is neither: it is what
   * choosing this name will CLEAR, which is the most consequential thing on
   * the row and used to be reachable only as a refusal. */
  grid-template-columns: 10rem 6rem 10rem minmax(7rem, 1fr) 10rem 8.5rem;
  border-radius: var(--radius); cursor: pointer;
}
/* Stays put while sixty names scroll under it -- a long list whose column
 * labels have scrolled away is five unlabelled columns. */
.cand-head {
  position: sticky; top: 0; z-index: 2;
  cursor: default; padding: 4px 8px 5px; font-size: 10px;
  text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint);
  background: var(--panel); border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.cand-head .who, .cand-head .eqx { font-family: inherit; }
.cand-head .nbr.prev, .cand-head .nbr.next { opacity: 1; font-style: normal; }
/* The list scrolls inside itself, so the header has something to stick to. */
#candList, .cand-list { max-height: 46vh; overflow-y: auto; }
.cand:hover { background: var(--panel-2); }
.cand .who { font-family: 'IBM Plex Mono', monospace; }
.cand .why {
  font-size: var(--fs-xs); color: var(--text-faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Only an actual refusal is red. Every row used to carry the alarm colour
 * whether it said anything or not. */
.cand .why.blocked { color: var(--art); }
.cand .why.nochange { color: var(--spo2); }
.cand[aria-disabled="true"] { opacity: .62; }

.cand .nbr {
  font-size: var(--fs-xs); color: var(--text-faint); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
/* Yesterday hard left, tomorrow hard right -- Chris, 25 Aug 2026. They used to
   hug the name in the middle, which reads as three things about one person;
   pushed to the edges they read as a timeline with the name in its middle, and
   the eye can run down either column on its own. */
.cand .nbr.prev, .cand-head .nbr.prev { text-align: left; }
.cand .nbr.next, .cand-head .nbr.next { text-align: right; }
/* The subject day reads as neither neighbour: what is there now is about to be
   cleared, so it is the one of the three that is not just context. */
.cand .nbr.today, .cand-head .nbr.today {
  text-align: left; color: var(--text-dim);
}
.cand .nbr.today.dim { color: var(--text-faint); }
.cand .nbr.dim { opacity: .5; font-style: italic; }
.nbr-more { font-size: 10px; opacity: .7; margin-left: 3px; }
.nbr-st {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em;
  padding: 1px 4px; border-radius: 3px; margin-left: 4px;
  background: var(--panel-3); color: var(--text-faint);
}
.nbr-st.pinned { background: var(--accent-soft); color: var(--accent-ink); }
.nbr-st.staged { background: var(--warn-soft, var(--panel-3)); color: var(--warn, inherit); }
.nbr-st.published { background: var(--ok-soft); color: var(--spo2); }
/* A pager is CARRIED by the row beside it rather than replacing it, so the
   badge reads as information about the arrangement rather than as a warning
   about a change. Chris, 20 Oct 2026: APS "should not automatically remove
   other assignments". */
.nbr-st.rides { background: var(--panel-3); color: var(--text-dim); }

/* A deficit is the number that matters, so it is the number that is legible:
 * tabular figures, and owed reads warm while over-served reads faint. */
.cand .eqx {
  font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums;
  font-size: var(--fs-xs); color: var(--text-faint); white-space: nowrap;
  text-align: right;
}
/* OWED READS GREEN, EVEN READS AMBER, OVER-SERVED READS RED.
   Chris, 25 Aug 2026. The bands are whole shifts because that is the unit the
   committee moves: half a shift either side of even is even, one clear shift
   is a lean, two is the thing to fix. The number is still printed, so the
   colour is a second reading of it and never the only one. */
.cand .eqx.owed-lots { color: var(--accent-ink); font-weight: 600; }
.cand .eqx.owed      { color: var(--accent-ink); }
.cand .eqx.even      { color: var(--pa); }
.cand .eqx.over      { color: var(--warn); }
.cand .eqx.over-lots { color: var(--art); font-weight: 600; }
.cand-head .eqx { text-align: right; }

.cell-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-bottom: 2px;
}
.cell-head-task { font-size: var(--fs-title); font-weight: 600; }
.cell-head-when { font-size: var(--fs-sm); color: var(--text-faint); }

@media (max-width: 900px) {
  .cand, .cand-head { grid-template-columns: 1fr 6rem 1fr; }
  .cand .why { grid-column: 1 / -1; white-space: normal; }
  .cand .eqx { grid-column: 1 / -1; }
  /* On a phone the subject day keeps its own line rather than being squeezed
     between two others: it is the column that says what a tap will undo. */
  .cand .nbr.today { grid-column: 1 / -1; text-align: left; }
  .cand-head .eqx, .cand-head .why, .cand-head .nbr.today { display: none; }
}

/* The column-width control. Grouped like the layout toggle beside it, and the
   readout is a button because it is also the way back to the default. */
.wstep { display: inline-flex; gap: 4px; align-items: center; }
.wstep .wstep-val {
  font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums;
  font-size: var(--fs-xs); padding: 4px 8px; min-width: 48px; text-align: center;
  color: var(--text-faint);
}
.wstep .btn[disabled] { opacity: .4; cursor: default; }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: var(--fs-xs); color: var(--text-dim); margin-bottom: 4px; }
/* A single number does not need the width of the viewport. */
.field input[type="number"] { max-width: 140px; }
.field input[type="date"] { max-width: 170px; }
.field .help { font-size: var(--fs-xs); color: var(--text-faint); margin-top: 4px; }

/* --------------------------------------- the ASA physical status factors

   The chair's pricing table on the Pay tab. Its own class rather than the
   bare `tbl` the file already uses in places, because `tbl` carries no rules
   at all and adding some would restyle every other table that borrowed the
   name. Tokens only, so both themes come free. */
.statusfx { border-collapse: collapse; font-size: var(--fs-ui); }
.statusfx th, .statusfx td {
  padding: 5px 14px 5px 0; text-align: left; vertical-align: middle;
}
.statusfx thead th {
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-dim); border-bottom: 1px solid var(--line);
  padding-bottom: 5px;
}
.statusfx tbody tr + tr td { border-top: 1px solid var(--line-soft); }
.statusfx .help { font-weight: 400; }
/* A factor nobody may change still reads as a value rather than as a broken
   control: dimmed, not greyed into the background. */
.statusfx input[disabled] { opacity: .75; cursor: default; }

/* ------------------------------------------------------------- the case log

   web/caselog.js. Dense on purpose: it is filled in between cases, so the
   whole form has to be readable without scrolling past the part you came for.

   EVERY COLOUR HERE IS A TOKEN defined on bare :root, which is what makes the
   light theme a redefinition rather than an inversion -- a colour whose only
   definition lived in this block would be invisible in the other theme, and
   this form has two surfaces that are nothing but a tinted panel. */
.caselog h4 {
  margin: 18px 0 8px; font-size: var(--fs-sm); text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-dim);
  border-bottom: 1px solid var(--line-soft); padding-bottom: 5px;
}
.caselog h4:first-of-type { margin-top: 10px; }

/* A checkbox and its words on one line. There were four of these drawn with
   an inline style apiece before this existed, which is four places for them
   to disagree about the gap. */
.inline-check {
  display: flex; gap: 8px; align-items: center;
  margin: 5px 0; font-size: var(--fs-ui); color: var(--text);
}

/* THE TIERS A SEAT SWAP TAKES BACK, as one row of chips (web/market.js
   tiersWanted). Chris, 30 Oct 2026: "Compact this to take less space". They
   wrap on a narrow phone rather than scroll. */
.tier-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.tier-chip {
  min-width: 34px; min-height: var(--pill-h); padding: 0 8px; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--panel-2);
  color: var(--text-dim); font-size: var(--fs-sm); line-height: 1.2; cursor: pointer;
}
.tier-chip.on { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); font-weight: 600; }
.tier-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.tier-pick .help { margin: 4px 0 0; }

/* A SEAT SWAP THE READER'S SEAT CANNOT ANSWER, greyed where it stands, with
   the three-way offered under it at full strength; and a three-way itself,
   marked on its edge (web/market.js offerRow, Chris 30 Oct 2026). */
.panel.offer-grey > .row2 { opacity: .55; }
.threeway-ask { margin-top: 8px; }
.threeway-ask .btn { margin-top: 4px; }
.panel.offer-three { border-left: 3px solid var(--brand); }
.threeway-take { margin-top: 8px; }

/* ONE ADDITIONAL PROCEDURE. A panel rather than a rule between rows, because
   a nerve block is four fields and two rows of them run together without a
   boundary -- and "which start time belongs to which block" is exactly the
   question a billing audit asks. */
.proc-row {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px;
}
.proc-row .field:last-child { margin-bottom: 0; }

/* THE TYPED-IN BLANK, MARKED. A value somebody typed because the list was
   wrong is worth seeing as such: it is the one on the form that nothing
   validated, and it is the one the chair may want in the catalogue. Amber
   rather than red -- it is not an error, it is a note. */
.caselog input.fill-in {
  border-color: var(--warn); background: var(--warn-soft);
}

/* The two blocks that exist only while a gate is open: the patient, and
   contact and coverage. Separated from the clinical fields by more than a gap,
   because what governs them is a signature rather than a preference. */
.caselog .gated-block, .caselog .help.gated {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
}
.caselog .gated-block h4 { margin-top: 0; }

/* ONE SCREEN. Chris, 29 Oct 2026: "Case entry needs to be compact, ideally a
   single screen, don't delete the other information/instructions but hide them
   behind info icon." So the case log keeps two fields to a row even on a
   phone, where every other form drops to one; the times, and their minutes,
   share a row; the explanations sit behind an ⓘ; and the rarer half folds
   away (.cl-sec). Field heights come down with the gaps. */
.caselog .row2 { grid-template-columns: 1fr 1fr; gap: 8px; }
.caselog .row3 { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: start; }
/* ONE LABEL ROW, ONE CONTROL ROW, across the fields side by side. Chris, 10 Nov
   2026, of a phone screenshot: the "Start ⓘ" label stood taller than "Stop", so
   the Start box sat lower than the Stop box and the minutes on a third line.
   Each field shares its row's tracks (subgrid): label, control, then anything
   under the control (a hint), so an ⓘ -- or an opened one -- makes the whole
   label row taller and never one field's box. The labels sit at the foot of
   that row, and in the times row the minutes read on the boxes' baseline. */
@supports (grid-template-rows: subgrid) {
  .caselog .row2, .caselog .row3 { grid-template-rows: auto auto auto; row-gap: 0; }
  .caselog .row2 > .field, .caselog .row3 > .field {
    display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; align-items: baseline;
  }
  .caselog .row2 > .field > label, .caselog .row3 > .field > label { align-self: last baseline; }
}
.caselog .field { margin-bottom: 8px; min-width: 0; }
.caselog .field select, .caselog .field input:not([type="checkbox"]) {
  width: 100%; max-width: none; padding: 6px 8px; min-width: 0;
}
/* The OB box says it is unset while the date's schedule is unread. */
.caselog .cl-ob-note { color: var(--warn); font-size: .85em; }
.caselog .cl-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px;
}
.caselog .cl-head .ai-actions { margin: 0 !important; }
.caselog .cl-minutes { display: block; padding: 7px 0; font-weight: 600; color: var(--text); white-space: nowrap; }
/* The coding-reference note's ⓘ, on a line of its own above the codes. */
.cl-refnote { margin: 0 0 4px; }
.cl-info { display: inline; }
.cl-info > summary {
  display: inline; list-style: none; cursor: pointer; color: var(--text-dim); font-size: var(--fs-ui);
}
.cl-info > summary::-webkit-details-marker { display: none; }
.cl-info[open] > p {
  display: block; margin: 4px 0 6px; text-transform: none; letter-spacing: 0; font-size: var(--fs-sm);
}
/* [P1]..[P6][E] (Chris, 29 Oct 2026: "This can have a very small footprint,
   e.g. [P4][E]"). The segmented control's look, smaller. */
.caselog .cl-asa { display: flex; gap: 3px; flex-wrap: nowrap; }
.caselog .cl-asa button {
  flex: 1; min-width: 0; padding: 6px 0; border: 1px solid var(--line); border-radius: 6px;
  background: var(--panel-2); color: var(--text-dim); font: inherit; font-size: var(--fs-sm); cursor: pointer;
}
.caselog .cl-asa button[aria-pressed="true"] {
  background: var(--panel-3); color: var(--text); font-weight: 600; box-shadow: var(--shadow-raised);
}
.caselog .cl-asa .cl-asa-e { margin-left: 4px; }
/* ONE TAP, ONE KIND OF CASE (ruling 45, Chris, 9 Nov 2026): a single strip
   that scrolls inside itself on a phone, so the form's first screen loses one
   line and the page never scrolls sideways. */
.caselog .cl-types {
  display: flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto; margin: 0 0 8px;
  padding-bottom: 2px; scrollbar-width: thin; max-width: 100%;
}
.caselog .cl-types .cl-type {
  flex: 0 0 auto; padding: 5px 9px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel-2); color: var(--text-dim); font: inherit; font-size: var(--fs-sm);
  white-space: nowrap; cursor: pointer;
}
.caselog .cl-types .cl-type[aria-pressed="true"] {
  background: var(--panel-3); color: var(--text); font-weight: 600; border-color: var(--accent, var(--line));
}
/* A hand-off drafted for this partner, not yet confirmed: it pays nothing. */
.case-tile.draft { border-left: 3px dashed var(--warn); }
.case-tile .case-draft { color: var(--warn); font-size: var(--fs-xs); letter-spacing: .06em; }
.caselog .cl-asa .cl-asa-e[aria-pressed="true"] { border-color: var(--warn); background: var(--warn-soft); }
.cl-info[open] > p { white-space: pre-line; }
/* TYPE OR PICK (web/caselog.js picker): the box, and its ranked suggestions
   under it. */
/* TODAY'S CASES: a tile opens its case; a live one says so and can be stopped
   (Chris, 29 Oct 2026). */
.case-tile { cursor: pointer; }
.case-tile:hover { background: var(--panel-3); }
.case-tile.live { border-left: 3px solid var(--warn); }
.case-tile .live-dot { color: var(--warn); font-size: var(--fs-sm); letter-spacing: .06em; }
/* TWO LINES (Chris, 30 Oct 2026): the description and the surgeon on one line,
 * cut with an ellipsis rather than wrapped; then the times, code and units. */
.case-tile .case-tile-w { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.case-tile .case-tile-l1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.case-tile .case-tile-surgeon { color: var(--text-dim); }
/* THE TIMES LEAD LINE 1 (Chris, 3 Nov 2026), in the figures' own tabular
   digits, so the ellipsis at the end of the line takes the surgeon first. */
/* The name after them is the line's own ink; the ellipsis cuts it last. */
.case-tile .case-tile-name { color: var(--text); }
/* THE TIME IS THE FAR-LEFT COLUMN (Chris, 12 Nov 2026): start over -stop in
   the row's own ink, the duration smaller and quieter directly beneath. A
   fixed column, so every tile's middle block starts at the same x. */
.myrow.case-tile { grid-template-columns: 76px minmax(0, 1fr) auto; }
.case-tile .case-tile-d { gap: 1px; line-height: 1.2; min-width: 0; }
.myrow.case-tile .case-tile-when { display: flex; flex-direction: column; font-variant-numeric: tabular-nums;
  font-size: var(--fs-sm); color: var(--text); text-transform: none; white-space: nowrap; }
.myrow.case-tile .case-tile-when span { font-size: inherit; color: inherit; text-transform: none; }
.case-tile .case-tile-t0, .case-tile .case-tile-t1 { display: block; }
.myrow.case-tile .case-tile-ran { font-size: var(--fs-xs); color: var(--text-dim); text-transform: none; }
.case-tile .case-tile-l2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-sm); }
.case-tile .case-tile-pts { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; white-space: nowrap; }
.case-tile .case-tile-stop { padding: 3px 8px; }
/* DELETE ON THE TILE (Chris, 13 Nov 2026): a 44px target, quiet until pressed,
   in the theme's own ink so it reads in both themes. */
.case-tile .btn.case-tile-del { min-height: 44px; min-width: 44px; padding: 0 8px; font-size: var(--fs-xs);
  color: var(--text-dim); }
.case-tile .case-tile-del:hover, .case-tile .case-tile-del:focus-visible { color: var(--art); }
.caselog .dup-box { margin: 8px 0; }
.caselog .dup-box .ai-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.caselog .dup-box .dup-save, .caselog .dup-box .dup-open, .caselog .dup-box .dup-cancel { min-height: 44px; }
.void-dialog .void-why, .void-dialog .void-note input { min-height: 44px; width: 100%; box-sizing: border-box; }
.case-tile .case-tile-points { font-variant-numeric: tabular-nums; }
.case-tile .case-tile-ran { white-space: nowrap; }
/* The gap between two cases: small, quiet, centred. */
.case-turnover {
  display: flex; justify-content: center; align-items: center;
  margin: -2px 24px; padding: 2px 8px; min-height: 20px;
  border: 1px dashed var(--line); border-radius: var(--radius);
  color: var(--text-faint); font-size: var(--fs-xs); letter-spacing: .04em;
}
.case-turnover.break { border-style: dotted; }
.btn.case-stop { margin: 4px 0 10px; }
.case-incomplete {
  display: block; width: fit-content; margin: 2px 0; padding: 1px 7px; border-radius: 10px;
  font-size: var(--fs-xs); color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn);
}
.caselog .cl-combo { position: relative; }
.caselog input.cl-combo-in { width: 100%; }
.caselog .cl-combo-list {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 20; margin-top: 2px;
  max-height: 220px; overflow-y: auto; background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: var(--shadow);
}
.caselog .cl-combo-opt, .caselog .cl-combo-none {
  padding: 7px 10px; font-size: var(--fs-ui); cursor: pointer; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.caselog .cl-combo-opt.on, .caselog .cl-combo-opt:hover { background: var(--panel-3); }
.caselog .cl-combo-opt.custom { color: var(--warn); font-weight: 600; }
.caselog .cl-combo-none { color: var(--text-dim); cursor: default; }
/* Where the room's default came from (ruling 85): one quiet line under the box. */
.caselog .cl-room-hint { margin: 2px 0 0; font-size: var(--fs-xs); line-height: 1.3; color: var(--text-dim); }
.cl-info[open] > .cl-asa-guide { display: block; margin: 4px 0 6px; text-transform: none; letter-spacing: 0; }
.cl-asa-guide p { margin: 0 0 6px; white-space: pre-line; }
.caselog .cl-sec { border-top: 1px solid var(--line-soft); margin-top: 6px; padding-top: 4px; }
.caselog .cl-sec > summary {
  cursor: pointer; padding: 6px 0; font-size: var(--fs-sm); text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-dim);
}

.note-req {
  background: var(--art-dim); border: 1px solid var(--art); border-radius: var(--radius);
  padding: 8px 10px; font-size: var(--fs-sm); margin-bottom: 12px;
}

/* A copied rule set waiting to be confirmed. WARN rather than ART: nothing is
 * wrong and nothing has failed -- the rules are somebody else's until a chair
 * here says otherwise, which is a hold, not an error. Red is what this app
 * uses for a violation, and spending it on a setup step that is working
 * exactly as designed would teach people to ignore it. */
.note-req.unconfirmed {
  background: var(--warn-soft); border-color: var(--warn);
}
.unconf-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-soft);
}
.unconf-row:first-of-type { margin-top: 6px; }
.unconf-title { font-weight: 600; }
/* The reason sits under its own title and must not stretch to the button. */
.unconf-row .help { max-width: 62ch; }

/* --------------------------------------------------------------- equity */

/* THE LADDER'S THREE COLUMNS ARE DECLARED ONCE.
 *
 * Chris, 28 Aug 2026, with a screenshot: "190.5/23" reading as "190.5/2". The
 * value column was 54px and its contents are a rate, a count, a denominator
 * and an FTE -- "8.3  190.5/23.0mo @0.8" -- which is a hundred and fifty
 * pixels of monospace. It did not wrap, it did not scroll, it was simply cut,
 * and the half that got cut was the denominator: the number the whole
 * correction is about.
 *
 * The widths are custom properties so the three places that care (here, the
 * tablet step-down, the phone stack) each set them once rather than repeating
 * a grid template. They stay FIXED rather than max-content because every row
 * is its own grid: content-sized columns would give each partner a different
 * bar origin and the ladder would go ragged, which is the one thing a ladder
 * cannot do. */
.bars { display: flex; flex-direction: column; gap: 2px; --eq-nm: 92px; --eq-v: 10.5rem; }
.bar-row {
  display: grid; grid-template-columns: var(--eq-nm) minmax(0, 1fr) var(--eq-v);
  align-items: center; gap: 8px;
}
.bar-row .nm {
  font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-xs); color: var(--text-dim);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* THE NAME IS A CONTROL, so it has to look like one.
 *
 * A button styled to sit inside running text still has to say it is
 * clickable, or the drill-down is a feature only the person who built it
 * knows about. Underlined on hover rather than always, so a column of sixty
 * names does not read as sixty links -- and it inherits the mono face and
 * colour of the cell it replaced, so the ladder looks exactly as it did.
 *
 * Both tokens are theme-aware. --text-dim and --ecg are defined on :root
 * and redefined per theme, so nothing here needs its own dark variant. */
.bar-row .nm .linkish {
  font: inherit; color: inherit; background: none; border: 0; padding: 0;
  cursor: pointer; text-align: left; text-decoration: none;
}
.bar-row .nm .linkish:hover { color: var(--accent-ink); text-decoration: underline; }
.bar-row .nm .linkish:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px;
}
.bar-track { height: 13px; background: var(--panel-2); border-radius: 2px; position: relative; }
.bar-fill { position: absolute; inset: 0 auto 0 0; border-radius: 2px; background: var(--spo2); opacity: .85; }
.bar-fill.over { background: var(--art); }
.bar-fill.under { background: var(--pa); }
.bar-mean { position: absolute; top: -2px; bottom: -2px; width: 1px; background: var(--text); opacity: .55; }
.bar-row .v {
  font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums;
  font-size: var(--fs-xs); text-align: right; color: var(--text-dim); white-space: nowrap;
}

/* THE STAT TILE, SMALLER AND NOT IN A TYPEWRITER FACE.
 *
 * Chris, 26 Oct 2026, looking at the three above My schedule: "these tiles are
 * much larger than necessary, and the font used inside is archaic."
 *
 * THE FONT FIRST, because that is the whole of "archaic". The value was IBM
 * Plex MONO at 22px -- a typewriter face doing a job it is not for. Mono earns
 * its place where characters have to LINE UP: a column of dates in the grid, a
 * tier number under another tier number, hours against hours. A tile says one
 * figure, once, with nothing under it to align to. It is IBM Plex Sans
 * Condensed 600 now -- the same face as the headings, already loaded, and
 * narrow enough that "Tier 6 IMC" fits a 150px column without shrinking.
 * `tabular-nums` keeps the one thing mono was genuinely buying: 26 and 6 sit
 * on the same stem when a row of tiles is read down.
 *
 * AND 20% SHORTER, measured: 105px to 84px per tile. Nothing was removed --
 * the padding, the gap, the label and the value each gave up two or three
 * pixels, which is where a tile's height actually goes. The spacing tokens
 * rather than the old literals, so the row sits in the same rhythm as
 * everything else #486 condensed. */
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-2); margin-bottom: var(--space-3);
}
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-card);
  /* Through the tokens, so the density setting reaches it. Its own 8/12/9
     asymmetry is kept -- the optical correction at the bottom of a tile is
     not a thing a density should flatten. */
  padding: var(--space-2) var(--space-3) calc(var(--space-2) + 1px);
}
.card .k { font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-faint); }
.card .v {
  font-family: 'IBM Plex Sans Condensed', 'IBM Plex Sans', system-ui, sans-serif;
  font-weight: 600; font-size: var(--fs-lg); line-height: 1.2; margin-top: 1px;
  font-variant-numeric: tabular-nums;
  /* A value is somebody's task name, not always a number: "IMC Liver 2nd Call"
     must break rather than widen its column and push the tile beside it off
     the row. */
  overflow-wrap: anywhere;
}
.card .n { font-size: var(--fs-xs); color: var(--text-dim); margin-top: 1px; }

h3.sect {
  margin: 22px 0 10px; font-size: var(--fs-sm); letter-spacing: .12em; text-transform: uppercase;
  font-family: 'IBM Plex Sans Condensed', sans-serif; color: var(--text-dim);
}
p.lede { color: var(--text-dim); max-width: 68ch; line-height: 1.6; margin: 0 0 14px; }

.ai-log { display: flex; flex-direction: column; gap: 10px; }
.ai-msg { padding: 10px 12px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line-soft); font-size: var(--fs-ui); line-height: 1.55; white-space: pre-wrap; }
.ai-msg.me { background: var(--panel-3); }
.ai-msg h4 { margin: 0 0 6px; font-size: var(--fs-sm); color: var(--accent-ink); }
.ai-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }

/* THE WARNINGS MOVED TO THE TOP, AND THEY WAIT TO BE READ.
 *
 * Chris, 24 Oct 2026: "Move warnings like this and all other toasts up to top
 * middle screen with a dismiss/acknowledge button." He wrote that around the
 * lock card, which had interrupted him mid-sentence -- half his message
 * arrived with the card's own text sitting inside it.
 *
 * THE HOST IS THE LANE, AND IT DID NOT USED TO BE ANYTHING. Every `.toast`
 * carried `position: fixed; bottom: 18px; left: 50%` on its OWN, and
 * #toastHost had no rule at all, so two at once landed on exactly the same
 * eighteen pixels and the second hid the first. Nobody noticed while a toast
 * lasted 2.6 seconds; a dismiss button makes it certain, because an error now
 * waits instead of expiring. So the host is a column and the toasts are rows.
 *
 * AND IT ALSO LEAVES THE TAB BAR ALONE. At `bottom: 18px` with z-index 80 a
 * toast sat ON the phone's fixed tab bar (z-index 40) -- the navigation was
 * under the message. The top has no such tenant.
 *
 * `pointer-events: none` ON THE HOST IS LOAD-BEARING. This is a fixed box
 * sitting over the toolbar and the ticker; without it the empty column
 * swallows clicks on the chrome underneath whether or not anything is
 * showing. Each toast takes its own back. */
#toastHost {
  position: fixed; top: calc(var(--ticker-h) + 10px); left: 50%;
  transform: translateX(-50%); z-index: 80;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: max-content; max-width: min(520px, calc(100vw - 24px));
  pointer-events: none;
}
/* A CARD, NOT A PILL (Chris, 30 Oct 2026: "make the notifications look more
 * professional"). Each kind -- done, information, warning, error -- has its
 * own coloured edge and an icon in a disc of that colour; the words stay in
 * the ordinary text colour, which reads better than red text on a card. It
 * drops in from above and settles, unless motion is reduced. */
.toast {
  --toast-c: var(--accent-fill);
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 10px;
  max-width: 100%; box-sizing: border-box;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-left: 4px solid var(--toast-c);
  padding: 8px 6px 8px 10px; border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.14), 0 1px 3px rgba(0,0,0,.08);
  font-size: var(--fs-ui); line-height: 1.4; text-align: left;
  animation: toast-in .22s ease-out;
}
/* UPDATES WAITING (web/app.js showWaiting; Chris's ruling on #675 L2). A
 * redraw held while somebody types says so here, in the toast column, and a
 * tap draws it. The ordinary ink on the panel, so it reads in both themes,
 * with the accent as its edge; 32px tall, over the 24px touch floor. */
.updates-chip {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; min-width: 24px; box-sizing: border-box;
  padding: 4px 14px;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-left: 4px solid var(--accent-fill);
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0,0,0,.14), 0 1px 3px rgba(0,0,0,.08);
  font: inherit; font-size: var(--fs-ui); line-height: 1.3; cursor: pointer;
}
.updates-chip[hidden] { display: none; }
/* What an 835 said (web/claims-panel.js eraForm): marked so it can be let go
 * of, and seen to be, when the page is left (#685 L4). */
.claims-era-result { margin-top: 8px; }
.updates-chip:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }
body > .updates-chip {
  position: fixed; top: calc(var(--ticker-h) + 10px); left: 50%;
  transform: translateX(-50%); z-index: 80;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
.toast.toast-info { --toast-c: var(--spo2); }
.toast.toast-warn { --toast-c: var(--warn); }
.toast.toast-error, .toast.bad { --toast-c: var(--art); }
.toast-ic {
  flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--toast-c); color: var(--on-accent);
  font: 700 var(--fs-sm)/1 'IBM Plex Sans', system-ui, sans-serif;
}
.toast.toast-info .toast-ic { font-style: italic; font-family: Georgia, serif; }
/* A long message wraps as a paragraph inside the same card. */
.toast.wrap { border-radius: 10px; }
.toast .msg { padding-top: 1px; min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.toast .count {
  flex: 0 0 auto; align-self: center;
  padding: 1px 7px; border-radius: 100px; font-size: var(--fs-xs);
  background: var(--panel-2); color: var(--text-dim);
}
.toast .x {
  flex: 0 0 auto; width: 22px; height: 22px; padding: 0;
  border: 0; border-radius: 50%; background: none; color: inherit;
  font: 400 16px/1 'IBM Plex Sans', system-ui, sans-serif;
  cursor: pointer; opacity: .6;
}
.toast .x:hover { opacity: 1; background: var(--panel-2); }
.toast .x:focus-visible {
  outline: none; opacity: 1; box-shadow: 0 0 0 2px var(--ecg-dim);
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  /* AND STILL ONE COLUMN WHEN THE SIDEBAR WAS FOLDED ELSEWHERE. Folding it is
     remembered per browser ('railShut'), and `.app.rail-collapsed` -- two
     classes -- outranks the one-class rule above, so a phone that had ever
     folded it (in landscape, say) kept a 44px column for a sidebar it does not
     draw: Chris, 28 Oct 2026, "The far left is occupied by a non-functional
     tray on my mobile phone in portrait." */
  .app.rail-collapsed { grid-template-columns: 1fr; }
  .rail { display: none; }
  .drawer { display: none; }
}


/* ------------------------------------------------------- staged changes
   Nothing is written until it has been reviewed. A staged cell reads as
   provisional at a glance -- dashed outline, amber -- so a month with edits in
   flight can never be mistaken for a committed one, by the editor or by the
   four people watching over their shoulder. */

td.cell.staged {
  outline: 2px dashed var(--pa);
  outline-offset: -2px;
  /* `background-color` AND NOT THE SHORTHAND. `background:` resets
     background-image, which is where the weekend and holiday band is painted
     -- so a staged cell on a Saturday lost its band, and a draft block full of
     staged edits is exactly what somebody is scanning. Only the colour is
     wanted here; the band shows through underneath it. */
  background-color: var(--pa-dim);
  font-weight: 600;
}
/* Staged AND in violation: the staged outline takes the severity's colour, so
   an edit in flight that breaks a soft rule does not read as a hard one. */
td.cell.staged.viol { outline-color: var(--art); }
td.cell.staged.viol-medium { outline-color: var(--warn); }
td.cell.staged.viol-soft { outline-color: var(--pa); }

/* ------------------------------------------------- somebody else is in here
   A cell another committee member currently has open. Deliberately quieter
   than a staged cell: staged means "this WILL change when I commit", held
   means "somebody is looking at it", and confusing the two would make the
   louder signal cheap. A corner flag rather than an outline, so it can sit on
   a cell that is already staged, in violation, or selected without any of
   them losing their mark.

   Not a lock, and it must not look like one -- greying the cell out would say
   "you cannot", and you can. The rule about who wins is in the write path:
   whoever commits second is told the cell moved, and nothing is overwritten. */
td.cell.held::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  border: 5px solid transparent;
  border-top-color: var(--agent);
  border-right-color: var(--agent);
}

.btn.warn {
  background: var(--pa-dim);
  border-color: var(--pa);
  color: var(--pa);
  font-weight: 600;
}
.btn.warn:hover:not(:disabled) { background: var(--pa); color: #14181d; }

.commit-list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow: auto; }
.commit-row {
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 9px 11px; background: var(--panel-2);
  display: flex; flex-direction: column; gap: 6px;
}
.commit-row.breaks { border-color: var(--art); background: var(--art-dim); }
.commit-what { font-size: var(--fs-sm); }
.commit-when { color: var(--text-faint); font-weight: 400; }
.commit-move {
  font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-sm);
  display: flex; align-items: center; gap: 10px;
}
.commit-move .from { color: var(--text-faint); text-decoration: line-through; }
.commit-move .arrow { color: var(--text-faint); }
.commit-move .to { color: var(--accent-ink); font-weight: 600; }
.commit-breaks { font-size: var(--fs-sm); color: var(--art); }
.commit-row input[type="text"] { width: 100%; }

/* A conflict is a decision, not a toast. The two buttons are the modal's
 * own, which already sit on the 30px control height, above the 24px floor. */
.conflict-screen { display: flex; flex-direction: column; gap: 10px; }
.conflict-line {
  margin: 0; padding: 10px 12px;
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  background: var(--panel-2); color: var(--text);
}

/* A staffing exception is the one shortfall the committee may accept, so it is
   drawn as a decision to make rather than as a failure. */
.exception {
  border: 1px solid var(--pa); border-radius: var(--radius);
  background: var(--pa-dim); padding: 10px 12px; margin-bottom: 8px;
  display: flex; flex-direction: column; gap: 6px;
}
.exception.done { border-color: var(--brand); background: var(--ecg-dim); }
.exception .hd { font-size: var(--fs-sm); font-weight: 600; }
.exception .by { font-size: var(--fs-xs); color: var(--text-faint); }

/* =======================================================================
   PARTNER SURFACES, BANNERS, AND MOBILE
   Everything below arrived with partner logins. Until now the only user was a
   committee member at a desk with a wide screen; now most sessions are one
   physician on a phone in a corridor, asking one of four questions about
   themselves. That is a different interface, not a smaller one.
   ======================================================================= */

/* ------------------------------------------------------------- sign-in */
/* --------------------------------------------------------------- sign-in
   Shaped like the sign-in everyone has already used: full-width provider
   buttons carrying the provider's own mark, a bare OR, one field, one solid
   primary action, the legal line last. See viewSignIn in partner.js. */
.signin {
  min-height: 100dvh; display: grid; place-items: center; padding: 24px;
  background: var(--ink);
  /* SPAN THE APP GRID, because this is used in two places with different
     parents. The sign-in page renders it under <body>, where this does
     nothing. The no-rules gate renders it INTO `.app`, which is
     `grid-template-columns: var(--rail-w) 1fr` -- so without this the card
     becomes the first grid child, lands in the NAV RAIL column, and draws
     itself about 240px wide against an empty viewport. Reported 29 Sep 2026
     with a screenshot of exactly that. */
  grid-column: 1 / -1;
}
/* INSIDE `.app` IT IS THE APP'S HEIGHT, NOT THE VIEWPORT'S. The no-rules gate
 * renders this card into `.app`, and `.app` is now the viewport LESS the
 * ticker strip -- so a `min-height: 100dvh` child overflows its parent by
 * exactly the ticker and puts a scrollbar on a page holding one card. 100% of
 * a grid area with a definite height is that height, which is what was meant
 * both times. The rule under <body>, where there is no definite height to take
 * a percentage of, stays the viewport unit above. */
.app .signin { min-height: 100%; }
.signin-card {
  width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 32px 28px 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.signin-card h1 {
  margin: 0; font-size: var(--fs-xl); letter-spacing: .1em; text-transform: uppercase;
  font-family: 'IBM Plex Sans Condensed', sans-serif;
}
.signin-card h1 .strata { color: var(--accent-ink); }
.signin-card .lede { margin: -6px 0 12px; }

/* One button shape for both roads in. The provider button is the outlined
   variant and the email button the solid one, because they are the same size
   of decision and only one of them is the default. 48px is a comfortable
   thumb target and matches the field between them. */
.signin-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; box-sizing: border-box; min-height: 48px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel-2); color: var(--text);
  font: 500 var(--fs-title)/1.2 'IBM Plex Sans', system-ui, sans-serif;
  text-decoration: none; cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.signin-btn:hover { background: var(--panel-3); border-color: var(--text-faint); }
.signin-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.signin-btn svg { flex: none; }

/* The primary action reads as ink on the page's own accent rather than a
   borrowed black: on the light theme a black pill is the only pure black on
   screen, and on the dark theme it disappears into the card.

   The light theme deepens the green rather than reusing --ecg. This button
   carries 15px semibold text and is the most important control on the screen,
   and white on --ecg (#0E9C63) is 3.53:1 -- under the 4.5:1 that size needs.
   #0A7A4E is 5.38:1 and still plainly the same accent. Scoped here rather
   than moved into the token, because --ecg is also a TRACE colour on the grid
   where it is drawn on ink and darkening it would dim the whole schedule. */
/* THE DEEP GREEN IS THE RESTING STATE NOW. This read `var(--ecg)` with
   `var(--ink)` on top and was deepened only for light readers, because dark
   was the default; with light the default those two swap, and the token pair
   does the work a literal was doing. --on-accent is white on light and
   near-black on dark, which is the whole reason it exists. */
.signin-btn.solid {
  background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent);
  font-weight: 600;
}
/* DELIBERATELY NOT TOKENISED (see above), so it needs the same pair of
   selectors the palette has. Without the media query this would apply only to
   someone who had explicitly chosen dark, and everyone on a dark-mode device
   would get the light treatment on the dark palette. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .signin-btn.solid {
    background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent);
  }
}
:root[data-theme="dark"] .signin-btn.solid {
  background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent);
}
.signin-btn.solid:hover { filter: brightness(1.08); }
.signin-btn.solid:disabled { opacity: .6; cursor: default; filter: none; }

.signin-form { display: flex; flex-direction: column; gap: 10px; }
.signin-input {
  width: 100%; box-sizing: border-box; min-height: 48px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel-2); color: var(--text);
  font: 400 var(--fs-title)/1.2 'IBM Plex Sans', system-ui, sans-serif;
}
.signin-input::placeholder { color: var(--text-faint); }
.signin-input:focus {
  outline: none; border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--ecg-dim);
}

/* Bare, with no rules through it. The rules were doing the work of separating
   two things the whitespace already separates, and at 42% each they met in
   the middle of a three-letter word on a narrow phone. */
.signin .or {
  text-align: center; color: var(--text-faint); font-size: var(--fs-sm);
  letter-spacing: .12em; text-transform: uppercase; margin: 4px 0;
}
.signin-msg { font-size: var(--fs-sm); color: var(--accent-ink); min-height: 18px; }
.fineprint { font-size: var(--fs-xs); color: var(--text-faint); margin-top: 14px; line-height: 1.5; }

/* -------------------------------------------------------------- banners
   Request lock-out is stated on every screen it affects. A partner who does not
   know requests are closed submits into a void and finds out a month later. */
.banner {
  border-radius: var(--radius); padding: 10px 13px; font-size: var(--fs-ui);
  margin-bottom: 14px; border: 1px solid var(--line);
  background: var(--panel-2); line-height: 1.5;
}
.banner.ok   { border-color: var(--brand); background: var(--ecg-dim); }
.banner.info { border-color: var(--spo2); background: var(--spo2-dim); }
.banner.warn { border-color: var(--pa);  background: var(--pa-dim); }
/* THE ONE ABOUT THE BUILD IS A LINE, NOT A PARAGRAPH.
 *
 * Chris, 26 Oct 2026: "Both notifications also take up way too much space."
 * Two of these stacked came to 230px of a 760px phone, above a schedule
 * nobody had read yet. It carries one sentence now -- the explanation is on
 * its title, and in full in the refusal a partner meets if they try anything
 * against the block -- so it takes a line's worth of room and keeps the
 * banner's colour, which is the part that was doing the work at a glance.
 *
 * `cursor: help` because there IS more here: a banner with a tooltip and no
 * sign of one is a tooltip nobody finds. */
.banner.buildnote {
  padding: 7px 12px; margin-bottom: 10px; line-height: 1.45; cursor: help;
}
.chip.warn   { background: var(--pa-dim); color: var(--pa); }

/* A SITE WITH NO RULES IS UNCHECKED, NOT CLEAN AND NOT FAILING.
 *
 * Chris, 28 Oct 2026: "the rule checker should provide warning that rules are
 * not established to evaluate." The chip therefore takes the WARNING ink --
 * the orange the drawer already uses for a medium finding -- rather than the
 * green of a pass or the red of a violation, and a dashed edge so it does not
 * read as the amber "draft" chip beside it either. Both inks are tokens with a
 * light and a dark value. */
.chip.norules {
  background: var(--warn-soft); color: var(--warn);
  border: 1px dashed var(--warn);
}
.banner.norules-banner { border-color: var(--warn); background: var(--warn-soft); }
/* The block list did not load / a clock read failed (11 Nov 2026): calm, in
 * the existing banner tokens, with a 44px target for the one button. */
.banner.months-error .btn, .banner.clock-failed .btn { min-height: 44px; }
.empty-state.norules-note { color: var(--warn); }
.empty-state.norules-note p { margin: 0 0 6px; }

/* --------------------------------------------------------- partner views */
/* "Narrow" is a READING width, not a phone width. These views are mostly
   prose-shaped rows, and a 60-character line is easier to scan than one
   stretched across a 27" monitor -- but pinning the column to the LEFT edge
   of a wide window wastes the other two thirds of the screen and looks
   broken rather than considered. Centred, with a cap that fits the cards row
   comfortably. Anything genuinely wide inside -- the strip, a grid -- opts
   out with .wide and takes the whole pane. */
.pad.narrow { max-width: 860px; margin-inline: auto; }
/* The waiting screen's claim: name and site, stacked, a reading width wide. */
.claim-form { display: grid; gap: 10px; max-width: 420px; margin: 14px 0; }
.claim-form label { display: grid; gap: 4px; font-size: var(--fs-ui); color: var(--text-dim); }
.claim-form .btn { justify-self: start; }
.pad.narrow > .wide { width: 100%; }
.panel {
  background: var(--panel-2); border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: calc(var(--space-3) + 2px) var(--space-4);
  margin-bottom: calc(var(--space-3) + 2px);
}
.panel h3 { margin: 0 0 8px; font-size: var(--fs-ui); display: flex; align-items: center; gap: 8px; }
.panel h3 .count {
  background: var(--panel-3); color: var(--text-dim); border-radius: 999px;
  padding: 1px 8px; font-size: var(--fs-xs); font-weight: 500;
}
.panel h3 .count.bad { background: var(--art-dim); color: var(--art); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.mylist { display: flex; flex-direction: column; gap: 3px; }
/* The month at each change of month in the list (Chris, 29 Oct 2026). */
.my-month, .dl-month {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-dim); padding: 10px 2px 2px;
}
.my-month:first-child { padding-top: 2px; }
.dl-month { padding: 8px 12px 4px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.myrow {
  display: grid; grid-template-columns: 58px 1fr auto; align-items: center;
  gap: 10px; padding: 8px 10px; border-radius: var(--radius);
  background: var(--panel-2); font-size: var(--fs-ui);
}
.myrow .d { display: flex; flex-direction: column; line-height: 1.1; }
.myrow .d strong { font-size: var(--fs-title); font-family: 'IBM Plex Mono', monospace; }
.myrow .d span { font-size: var(--fs-xs); color: var(--text-faint); text-transform: uppercase; }
.myrow .clock { color: var(--text-faint); font-family: 'IBM Plex Mono', monospace; }
.myrow .h { font-family: 'IBM Plex Mono', monospace; color: var(--text-dim); font-size: var(--fs-sm); }
.myrow.today { box-shadow: inset 0 0 0 1.5px var(--brand); }
.myrow.vac   { color: var(--text-faint); font-style: italic; }
.myrow.wknd  { background: var(--panel-3); }
/* ------------------------------------------- a day you can click, and a day
   that holds a request rather than a shift

   Chris, 22 Oct 2026: clicking a day on My schedule opens what can be done
   with it. So the rows and the strip's cells are real controls now, and they
   have to LOOK like controls and take a focus ring -- a row that is
   interactive only to a mouse is a row a keyboard cannot reach.

   `.req` is a day with a granted or waitlisted request and no assignment: an
   ask, not a promise. Drawn as a dashed edge rather than a solid one, which is
   the distinction being made -- nothing is scheduled there yet. Deliberately
   NOT reusing the confirmed/waitlisted colours the request lists use: those
   say which state an ask is IN, and this says that the day holds an ask at
   all. The state is on the row's own text and in the sheet.

   Both themes get the same rules because every value here is a token, and
   --spo2 is re-chosen for light (#0B7FA8 against #35C4E8) in the block at the
   top of this file. A literal would have been a glowing cyan hairline on
   white. */
.myrow[role="button"], .mystrip table.grid td.cell[role="button"] { cursor: pointer; }
.myrow[role="button"]:hover { background: var(--panel-3); }
.mystrip table.grid td.cell[role="button"]:hover { background: var(--spo2-dim); }
.myrow[role="button"]:focus-visible,
.mystrip table.grid td.cell[role="button"]:focus-visible {
  outline: 2px solid var(--spo2); outline-offset: -2px;
}
.myrow.req {
  border-left: 3px dashed var(--spo2);
  background: var(--spo2-dim);
}
.myrow.req .w { color: var(--spo2); text-transform: capitalize; }
.mystrip table.grid td.cell.req { color: var(--spo2); font-weight: 600; }

.myrow.v-unworked   { border-left: 3px solid var(--art); }
.myrow.v-unassigned { border-left: 3px solid var(--pa); }
.myrow.v-over, .myrow.v-under { border-left: 3px solid var(--spo2); }

/* ---------------------------------------------------------- the punch bar
   One button, unmissable, and the state above it in words. Somebody doing this
   at 06:50 in a corridor should not have to read a legend. */
.punchbar {
  background: var(--panel-2); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px; text-align: center;
}
.punch-state { font-size: var(--fs-ui); color: var(--text-dim); margin-bottom: 10px; }
/* COMPACT (Chris, 29 Oct 2026: "Clock in and clock out is ugly and too big"):
   the state, the time and the button on one row; the window behind an ⓘ. */
.punchbar.compact { padding: 8px 12px; text-align: left; }
.punchbar.compact .punch-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.punchbar.compact .punch-state { margin: 0; flex: 1 1 auto; }
.punchbar.compact .btn.small { padding: 5px 12px; font-size: var(--fs-ui); }
.clockout-panel { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
/* ONE SHORT STATUS LINE (Chris, 3 Nov 2026). The hint after the state is
   quieter than the state, and the paragraphs that used to open INSIDE the card
   open over the page below it from the \u24d8 (.cl-pop), so the card keeps its
   height. */
.punchbar.compact .punch-row { position: relative; }
/* A chosen clock-out on an earlier day, said before it is kept (#681 L1). */
.clockout-panel .clockout-earlier { margin: 0 0 8px; font-size: var(--fs-sm); }
.punch-state .punch-state-hint { color: var(--text-dim); font-weight: 400; }
.punch-info[open] > .cl-pop {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0;
  padding: 8px 10px; background: var(--panel); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow-raised);
}
.punch-info .cl-pop > p { margin: 0 0 6px; font-size: var(--fs-sm); text-transform: none; letter-spacing: 0; }
.punch-info .cl-pop > p:last-child { margin-bottom: 0; }
/* THE DAY'S PAIRS under the clock (web/partner.js punchList): each one a
   button that opens the day's clock to correct, then the day's total. */
.punch-list { display: flex; flex-direction: column; gap: 2px; margin: -8px 0 14px; }
.punch-pair {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px; width: 100%;
  min-height: 32px; padding: 5px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); color: var(--text); font: inherit; font-size: var(--fs-ui);
  font-variant-numeric: tabular-nums; text-align: left; cursor: pointer;
}
.punch-pair:hover { background: var(--panel-3); }
.punch-pair.open .punch-pair-t { color: var(--accent-ink); font-weight: 600; }
.punch-pair .punch-pair-note { color: var(--text-dim); font-size: var(--fs-sm); white-space: nowrap; }
.punch-list-total {
  display: flex; justify-content: space-between; padding: 2px 12px; font-size: var(--fs-sm);
  color: var(--text-dim); font-variant-numeric: tabular-nums;
}
.punch-list-total strong { color: var(--text); }
/* Acting at a rung that may not read the partner's day (web/partner.js
   actingRefused): said once, where the pairs would be. */
.punch-refused { margin: -8px 0 14px; }
.punch-state.on { color: var(--accent-ink); font-weight: 600; }
.punch-state .pulse {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand); margin-right: 7px; animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .25 } }
.btn.warn { background: var(--pa-dim); border-color: var(--pa); color: var(--pa); }

/* ------------------------------------------------------- day / waitlist rows
   Every day carries its own state and reason, because "3 confirmed, 2
   waitlisted" is the normal outcome of a five-day request and a form that only
   says yes or no cannot express it. */
.daylist { display: flex; flex-direction: column; gap: 3px; }
.dayrow {
  display: grid; grid-template-columns: 128px 92px 1fr auto; gap: 10px;
  align-items: center; padding: 7px 10px; border-radius: var(--radius);
  background: var(--panel); font-size: var(--fs-sm); border-left: 3px solid transparent;
}
/* THE PICKED-LIST ROW IS THREE THINGS, NOT FOUR, and sharing `.dayrow` with
   the verdict rows put its Remove button in the `1fr` reason column -- which
   is why it ran the full width of the calendar above it. The button sizes to
   itself here and a trailing empty column absorbs the slack. */
.dayrow.pick { grid-template-columns: 128px minmax(110px, 150px) auto 1fr; }
.dayrow.confirmed  { border-left-color: var(--brand); }
.dayrow.waitlisted { border-left-color: var(--pa); }
.dayrow.declined   { border-left-color: var(--art); }
.dayrow.returned   { border-left-color: var(--line); color: var(--text-faint); }
.dayrow .dd { font-family: 'IBM Plex Mono', monospace; }
.dayrow .tag {
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-faint);
}
.dayrow .why { color: var(--text-dim); }
.preview { margin-top: 12px; }

.sources { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 16px; }
.sources .src {
  font-size: var(--fs-xs); padding: 3px 10px; border-radius: 999px;
  background: var(--panel-2); color: var(--text-faint); border: 1px solid var(--line-soft);
}
.sources .src.on { color: var(--accent-ink); border-color: var(--brand); background: var(--ecg-dim); }

.rail-foot .me {
  font-size: var(--fs-xs); color: var(--text-dim); margin-bottom: 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* =====================================================================
   MOBILE — phones and tablets
   The month grid is not made small; it is replaced. Sixty rows by thirty-one
   columns has no readable phone rendering, and pretending otherwise produces
   something nobody uses. On a phone a partner gets their own views and the
   committee grid stays on the desktop where it belongs.
   ===================================================================== */

.tabbar { display: none; }
/* Hidden by default and turned on by the phone block, for the same reason the
   tab bar is: above 860px the rail is on screen naming every screen at once,
   which is the better control when there is room for it. The default MUST sit
   before the media block -- equal specificity means source order decides. */
.subnav { display: none; }

/* Hidden by default; the phone block below turns it on. The default MUST sit
   before the media block -- equal specificity means source order decides, and
   this rule after the block silently re-hid the phone explainer, leaving a
   blank pane where the "needs a wider screen" message belongs. */
.no-grid-mobile { display: none; }

@media (max-width: 900px) {
  /* THE ROWS ARE DECLARED, AND THAT IS THE WHOLE BALLOON.
   *
   * Chris, 8 Oct 2026, with a screenshot: "header engulfs way to much space."
   * The strip itself was never the problem -- it measures 47px and always did.
   * What was tall was the ROW it sits in. .app is a grid sized to the viewport
   * (100dvh, less the ticker strip when one is showing) with
   * no `grid-template-rows` at this width, so both rows are auto, and auto
   * rows under the default `align-content: stretch` share out whatever height
   * the content does not use. Any screen whose content is shorter than the
   * viewport therefore hands the leftover to row one -- the header -- which
   * grows a band of empty page under the wordmark exactly as wide as the
   * screen and as tall as the slack. It is invisible in a window full of grid
   * and enormous on a phone, which is where the content is shortest.
   *
   * It also made the fix below self-defeating: folding 81px out of the topbar
   * simply moved 81px of slack into the strip's row, and the page was not one
   * pixel shorter for it.
   *
   * `auto minmax(0, 1fr)` says what was always meant: the strip is as tall as
   * the strip, and everything else is the rest. minmax(0,…) rather than 1fr so
   * the content row may shrink below its content -- it scrolls inside .body --
   * instead of pushing the page past the viewport. */
  .app { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .rail {
    position: sticky; top: 0; z-index: 30; border-right: 0;
    border-bottom: 1px solid var(--line-soft);
    display: flex; align-items: center; gap: 12px; padding: 8px 12px;
  }
  .rail .brand { padding: 0; border: 0; flex: 1; }
  .rail .brand h1 { font-size: var(--fs-ui); }
  .rail .ecg-mark, .rail .brand .sub { display: none; }
  .rail .nav { display: none; }              /* replaced by the bottom tab bar */
  .rail-foot { display: flex; gap: 8px; align-items: center; padding: 0; border: 0; }
  .rail-foot .btn, .rail-foot a.btn { width: auto !important; padding: 4px 10px; font-size: var(--fs-xs); }
  .rail-foot .me { margin: 0; max-width: 90px; }

  /* THE IDENTITY BAR IS ONE LINE, NOT THREE.
   *
   * Chris, 28 Aug 2026: "the header is taking up too much space, minimize the
   * login bar."
   *
   * .rail-top (who you are, theme, sign out) sits INSIDE .brand, above the
   * wordmark, which is right in a vertical sidebar and wrong the moment the
   * sidebar becomes a horizontal strip: it drew the account on one line and
   * ORSTRATA on the next, ninety pixels for what is a caption. Turned on its
   * side here -- wordmark left, account right -- it is one 34px row.
   *
   * The collapse arrow goes with it. It folds the rail's NAV, and the nav is
   * already display:none at this width in favour of the tab bar, so it was a
   * control that visibly did nothing, sitting in the corner people reach for
   * first. */
  /* A ROW, and it has to say so. The base .rail is flex-direction: column and
     this block never overrode it, so `align-items: center` was centring the
     strip's contents horizontally and every `margin-left: auto` in here had no
     axis to push along. It looked like a row because only one child was ever
     visible at a time. */
  .rail { flex-direction: row; padding: 4px 10px; }
  .rail .brand {
    display: flex; flex-direction: row; align-items: center; gap: 10px;
    padding: 0; border: 0; flex: 1; min-width: 0;
  }
  .rail .brand h1 { font-size: var(--fs-ui); order: 1; }
  .rail .rail-top {
    order: 2; margin: 0 0 0 auto; padding-right: 0; flex: 0 0 auto;
  }
  .rail .rail-top .me { flex: 0 1 auto; font-size: var(--fs-xs); }
  .rail .rail-toggle { display: none; }

  /* AND THE STRIP ITSELF CANNOT BALLOON EITHER.
   *
   * The row above is what made the header tall. This is the second belt: the
   * strip measures 47px in Chromium at every phone size, with a 33-character
   * name in it, but nothing was STOPPING it growing -- and a device setting
   * this browser cannot emulate (Android inflates text sizes outside the
   * page's control) is the one thing that would. So rather than chase a
   * setting, the height is BOUNDED BY CONSTRUCTION:
   *
   *   - a cap, in rem as well as px, so larger text makes the strip taller in
   *     proportion rather than unbounded: at this page's own root size it is
   *     48px, a pixel clear of the 47 the strip already measured, and at 150%
   *     text it is 82 and stops there;
   *   - nowrap on the strip, so a child can never start a second row;
   *   - one ellipsised line for the account, which is the only child whose
   *     content is arbitrary -- a long name used to take two lines inside the
   *     38px touch target and a longer one would have taken three, which is
   *     the balloon.
   *
   * mobile-chrome-test.mjs measures all of it in a real browser and fails if
   * the strip, or the chrome as a whole, grows past its budget. */
  /* 3.4rem rather than a round number: the strip is one 38px touch target
     (see the coarse-pointer block) plus 8px of padding and a 1px border, so
     the px floor has to clear 47 or the cap clips the target it is sized for.
     At the root size this page sets, 3.4rem is 47.6 and the floor wins. */
  .rail { flex-wrap: nowrap; max-height: max(48px, 3.4rem); overflow: hidden; }
  .rail .brand h1 { white-space: nowrap; }
  .rail .rail-top .me {
    max-width: 38vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  /* The role goes BESIDE the name, not under it. display:block is right in a
     vertical sidebar, where a second line is free; in a horizontal strip it is
     the second line that makes the strip two lines tall. Inline here, so the
     pair ellipsises together and the rung -- "am I about to do this as myself
     or as ORstrata?" -- survives the fold. */
  .rail .rail-top .me .whoami-role { display: inline; margin: 0 0 0 6px; }

  /* THE MARKS ARE THE WAY TO THE PAGE AND THE SITE (Chris, 29 Oct 2026: "an
   * option reached by clicking on the practice logo", with "a small
   * superscript icon to the top right of the practice logo indicating which
   * site is being navigated"). The account, theme and sign-out keep the
   * right of the strip. */
  .rail .brand-marks {
    display: flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 auto;
    cursor: pointer; border-radius: 6px;
  }
  .rail .brand-marks:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  .rail .brand-logo { position: relative; flex: 0 1 auto; min-width: 56px; margin: 0; }
  .rail .brand-logo img { max-width: 100%; height: auto; }
  /* TOP LEFT of the mark (Chris, 30 Oct 2026: "move the [site] superscript
   * to the top left instead of the top right of the practice/ORstrata
   * wordmark"), where it no longer sits over the end of the practice's name. */
  /* A FILL WITH WORDS ON IT, so it wears the fill/on-accent PAIR. It was
   * white on --accent-ink, and the dark theme lifts --accent-ink to a bright
   * green: 1.74:1 on every phone view (the design audit, 31 Oct 2026). */
  .site-badge {
    display: inline-block; position: absolute; top: -3px; left: -6px;
    font-size: 9px; line-height: 1; font-weight: 700; letter-spacing: .02em;
    padding: 2px 4px; border-radius: 999px; color: var(--on-accent); background: var(--accent-fill);
    pointer-events: none;
  }
  .site-badge[hidden] { display: none; }
  .rail .brand-marks > .site-badge { position: static; align-self: flex-start; order: -1; }
  /* THE NAME GIVES WAY FIRST, then the practice's mark scales inside its box;
   * the theme and sign-out buttons never leave the strip. */
  .rail .rail-top { order: 3; flex: 0 1 auto; min-width: 0; }
  /* THE SIDEBAR'S COLLAPSE IS A LAPTOP PREFERENCE, AND IT MUST NOT REACH A
   * PHONE. Chris, 30 Oct 2026, with a screenshot of his phone: "The header is
   * still not displaying the login name, light/dark switch, or logout."
   * `.rail-collapsed .rail-top { display: none }` folds the account away with
   * a collapsed sidebar, and `railShut` is remembered per browser -- so a
   * phone that had ever stored it (the collapse arrow was reachable on a phone
   * until it was hidden here) drew its header with no way to see who was
   * signed in, change the theme or sign out, and nothing on the phone could
   * undo it. Below 860px there is no sidebar to collapse, so the account
   * shows whatever the flag says. */
  .app.rail-collapsed .rail .rail-top { display: flex; }
  .rail .rail-top .me { flex: 1 1 0; min-width: 0; }
  .rail .rail-top .btn { flex: 0 0 auto; }
  .rail .brand { gap: 8px; }
  .page-menu {
    display: flex; flex-direction: column; gap: 8px; position: fixed; z-index: 40;
    top: 52px; left: 10px; min-width: 14rem; max-width: calc(100vw - 20px);
    padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
    background: var(--panel); box-shadow: 0 8px 24px rgba(0,0,0,.18);
  }
  .page-menu[hidden] { display: none; }
  .page-menu h2 {
    margin: 0; font-size: var(--fs-body); font-weight: 600;
    font-family: 'IBM Plex Sans Condensed', sans-serif; letter-spacing: .02em;
  }
  .page-menu select { width: 100%; font-size: 16px; }
  .topbar.topbar-empty { display: none; }

  /* ONE ROW, AND ONE BUTTON FOR THE REST.
   *
   * The button keeps a note of which block is selected and whether it is a
   * draft, because the failure mode of a collapsed header is reading a draft
   * as a published schedule -- the same reason the grid's active filters stay
   * on screen as chips. app.js keeps the note in step with the chips it
   * mirrors; see syncControlsNote(). */
  .controls-toggle { display: inline-flex; align-items: center; gap: 6px; }
  .controls-note {
    display: block; min-width: 0; max-width: 42vw;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: var(--text-faint); font-size: var(--fs-xs); font-weight: 400;
  }
  .controls-note:empty { display: none; }
  .topbar-controls { display: none; }
  /* Its own row, under the one with the actions on it: `order` last and
     `width: 100%` so the wrap is forced rather than hoped for. */
  .topbar-controls.open:not([hidden]) {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    width: 100%; order: 99; padding-top: 7px;
    border-top: 1px solid var(--line-soft);
  }

  .topbar { flex-wrap: wrap; gap: 6px; padding: 8px 12px; }
  /* Not a row of its own. "Schedule" is eight characters and the tab bar at
     the bottom already says which screen this is; a full-width heading spent a
     whole line saying it twice. */
  .topbar h2 { font-size: var(--fs-body); }
  .topbar .btn { padding: 5px 10px; font-size: var(--fs-sm); }

  .body { flex-direction: column; }
  .drawer { width: 100%; max-height: 40vh; border-left: 0; border-top: 1px solid var(--line-soft); }
  .pad { padding: 12px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .row2 { grid-template-columns: 1fr; }
  .dayrow { grid-template-columns: 1fr auto; row-gap: 2px; }
  .dayrow .why { grid-column: 1 / -1; font-size: var(--fs-xs); }
  .modal { width: 100%; max-height: 92dvh; border-radius: 14px 14px 0 0; }
  .scrim { align-items: flex-end; }

  /* A THUMB, NOT A CURSOR -- the same rule `.lock-btn` states at 48px.
     22px is a comfortable mouse target and a poor thumb one, and on a phone
     this button now carries more weight than it does on a desktop: an error
     no longer expires on its own, so the × is the ONLY way to clear one. A
     partner clearing it in a corridor is the case that matters. The toast
     grows a few pixels here and nowhere else. */
  .toast .x { width: 36px; height: 36px; font-size: 18px; }
  .toast { padding: 9px 7px 9px 14px; gap: 6px; }

  /* Bottom tab bar, thumb-reachable, clear of the home indicator. */
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--panel); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .tabbar button {
    flex: 1; background: none; border: 0; color: var(--text-faint);
    font-size: var(--fs-xs); padding: 9px 2px 7px; display: flex; flex-direction: column;
    align-items: center; gap: 3px; cursor: pointer;
  }
  .tabbar button[aria-current="true"] { color: var(--accent-ink); }
  .tabbar button .ic { font-size: 16px; line-height: 1; }
  /* EVERY GLYPH IN A BOX 19px TALL, drawn or emoji, so the five labels under
     them sit on one line. The drawn ones were 19px and the emoji 16px, and
     the labels under Today and Schedule hung lower than their neighbours'.
     A drawn glyph is as wide as its own shape: the clock is square, the
     Schedule calendar wider than it is tall. */
  .tabbar button .ic { height: 19px; line-height: 19px; display: flex;
                       align-items: center; justify-content: center; }
  /* AND THE BAR KEEPS ITS HEIGHT. A 19px box is 3px taller than the 16px
     line an emoji sat on, which took the bar from 49px to 52px and the
     phone's chrome over the budget mobile-chrome-test holds it to; the 3px
     come off the top padding instead, so the glyphs sit a little higher and
     the bar is the height it was. */
  .tabbar button { padding-top: 6px; }
  .tabbar button .ic.drawn svg { display: block; height: 100%; width: auto; }
  /* FIVE ITEMS, so the label has to survive a 390px phone divided by five:
     78px a tab, less the padding. The labels are one word each by design and
     this stops the one long one (Schedule) from wrapping a tab taller than its
     neighbours and pushing the bar up over the content. */
  .tabbar button {
    min-width: 0; font-size: 10px; padding-inline: 1px;
  }
  .tabbar button > span:last-child {
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  /* THE COUNT RIDES THE TAB. An open punch is an hour nobody is paid for or
     one paid twice, so it is drawn in the attention colour and positioned over
     the glyph rather than after the label -- a badge in the text baseline moves
     the label, and a label that moves when a number arrives is a label nobody
     can aim at. Absolutely positioned against the button, which is why the
     button is a containing block. */
  .tabbar button { position: relative; }
  .tabbar .tabdot {
    position: absolute; top: 4px; left: 50%; margin-left: 6px;
    min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
    background: var(--art); color: var(--on-accent);
    font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
  }

  /* The strip that says which screen inside the tab. It SCROLLS rather than
     wrapping: Admin holds seventeen screens and no arrangement makes seventeen
     segments fit a phone, but a strip that scrolls with the current one brought
     into view is what every native control of this size does. Wrapping instead
     would give the committee four rows of chips above every screen. */
  .subnav {
    /* flex: none, because .main is a flex column and .body below it is flex:1.
       Without it the strip is a shrinkable item: on a short window in landscape
       the browser takes its height to give the pane room, and the chips get
       clipped instead of the content scrolling. */
    display: flex; flex: none; gap: 6px; overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    /* 5px, NOT 8px, AND THE CHIPS BELOW ARE 26px RATHER THAN 32px.
     *
     * This strip is permanent chrome on a phone, and it was costing 49px.
     * With the identity strip (47), the toolbar (55) and the tab bar (47)
     * that was 198 of an iPhone SE's 667 pixels gone before a single row of
     * schedule appeared -- 30% of the display, which mobile-chrome-test
     * caught against a budget written before this strip existed.
     *
     * 26 + 5 + 5 + 1 of border is 37. The chips stay well above the 24px a
     * pill of text needs to be legible, and nothing here touches the
     * HORIZONTAL padding: a chip that is hard to hit sideways is a worse
     * problem than a band that is 13px too tall, and the row scrolls.
     *
     * AND THESE FOUR NUMBERS ARE DELIBERATELY NOT SPACING TOKENS, which is
     * the one place in this sheet where that is a correctness rule rather
     * than a job not yet done. They add up to the 37 that the hide rule
     * below writes as `margin-top: -37px`, and that margin is what lets the
     * rows underneath take the band back. Put `var(--space-*)` in here and
     * the strip's height follows the density setting while the margin does
     * not -- so at compact it would hide 37px of a 31px band and pull the
     * page up, and at spacious it would leave a gap where the band was.
     * mobile-chrome-test asserts the saving equals the strip's measured
     * height exactly, so it catches this at the default density; at the
     * other two nothing would. */
    padding: 5px 12px; border-bottom: 1px solid var(--line-soft);
    background: var(--panel);
    /* Only moves when the preference asks it to; see the rule below. */
    transition: transform .18s ease, margin-top .18s ease;
  }
  .subnav::-webkit-scrollbar { display: none; }

  /* HIDES AS YOU READ, when the partner has asked for that.
   *
   * Chris, 23 Oct 2026, choosing BOTH this and the thinning: thin by default,
   * with "toggle in partner settings for Hide it on scroll".
   *
   * `margin-top` ALONGSIDE `transform`, because transform alone moves the
   * paint and not the layout: the strip would slide up behind the toolbar and
   * leave its 37px of space empty, which is the band this whole change exists
   * to remove. The negative margin is what the rows below actually take back.
   *
   * `data-navhide` is written by watchScrollForSubnav() in web/app.js, and
   * only ever while `data-subnav="scroll"` -- so the default state has no
   * listener effect at all and this rule cannot match. */
  :root[data-subnav="scroll"][data-navhide] .subnav {
    transform: translateY(-100%);
    margin-top: -37px;
    pointer-events: none;
  }

  /* A PARTNER WHO CANNOT SEE MOTION SHOULD NOT BE SHOWN A SLIDE. The strip
   * still leaves and still comes back -- it just arrives already there, the
   * same bargain #392's banding made with its own animation. */
  @media (prefers-reduced-motion: reduce) {
    .subnav { transition: none; }
  }

  .subnav button {
    flex: none; min-height: 26px; padding: 0 13px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--panel-2);
    color: var(--text-dim); font: inherit; font-size: var(--fs-sm); cursor: pointer;
    white-space: nowrap;
  }
  .subnav button[aria-selected="true"] {
    background: var(--accent-fill); border-color: transparent; color: var(--on-accent);
    font-weight: 600;
  }
  .body, .pane { padding-bottom: 62px; }

}

/* WHERE THE GRID STOPS BEING WORTH DRAWING -- AND IT IS NOT 860px.
 *
 * This cutoff used to sit with the rest of the phone rules, so anything under
 * 860 got the "needs a wider screen" card instead of the schedule. An iPad in
 * portrait is 768 CSS pixels and an iPad mini is 744: both were told to turn
 * their tablet sideways to look at a schedule they had the room to read.
 * Chris named iPad first in the list of platforms to get right.
 *
 * 700px keeps every tablet on the grid and still catches every phone in
 * portrait (the widest is 430). A phone in LANDSCAPE is 844-932px and has
 * been getting the grid all along, which is the tell that this was always a
 * width judgement rather than a phone judgement. .grid-wrap scrolls in both
 * directions on its own, so a grid wider than the tablet costs a swipe inside
 * the grid and nothing outside it. */
@media (max-width: 700px) {
  .grid-wrap { display: none; }
  /* THE GRID'S CONTROLS GO WITH THE GRID. The layout toggle, the column-width
     stepper and the row filter all act on .grid-wrap, which is display:none
     here -- so this bar was 40px of controls for something not on screen,
     directly above the card explaining that it is not on screen. Chris, 8 Oct
     2026: "settings and functions are not intuitively placed."
     Only the grid views render .filterbar (see filterBar() in app.js); the
     rule check's own filters are .findings-filter and are untouched. Not a
     child selector: the grid views wrap the bar and the grid together in a
     flex column, so .filterbar is a grandchild of .pane. */
  /* And the folded version of it, which replaced the bar on 23 Oct 2026 --
   * the reasoning above applies to both, and a rule naming only the old class
   * would have put the controls back on mobile by renaming them. */
  .pane .filterbar,
  .pane .gridtools { display: none; }
  .no-grid-mobile {
    display: block; padding: 20px; text-align: center; color: var(--text-dim);
    font-size: var(--fs-ui); line-height: 1.6;
  }
}

/* Tablets: the grid is usable, the rail is not worth its width. */
@media (min-width: 901px) and (max-width: 1180px) {
  .app { grid-template-columns: 168px 1fr; }
  /* 260px IS THE DEFAULT HERE, NOT A LOCK. This was a plain `width: 260px`,
   * which outranks the `--drawer-w` the grip writes, so on a phone held
   * sideways the edge could be dragged and nothing moved. Chris, 28 Oct 2026:
   * "The rule check tray does not resize on my mobile landscape view." The
   * grip's own clamp still leaves the grid its 360px. */
  .drawer { width: var(--drawer-w, 260px); }
  /* The ladder gives its name column back before it gives up the number. */
  .bars { --eq-nm: 76px; }
}

/* =====================================================================
   NARROW SCREENS: NOTHING SCROLLS SIDEWAYS EXCEPT WHAT IS MEANT TO.

   Chris, 28 Aug 2026: "improve the UI for different screen sizes and the
   most common platforms including ipad, iphone, android ... minimize or
   eliminate horizontal scrolling when possible like on the equity page."

   Two different problems wear the same symptom, and they need opposite
   answers. A page that scrolls sideways because a value column is 54px and
   its contents are 150px is a bug: the fix is to give the content room or
   stack it. A schedule grid ninety columns wide on a 390px phone is not a
   bug: it genuinely is wider than the screen, and the fix is that IT
   scrolls, inside its own box, while the page around it does not.

   So: the page body never scrolls sideways, and anything genuinely wide
   carries its own scroller.
   ===================================================================== */

/* A table with a dozen columns of names, addresses and inputs cannot be made
   to fit a phone, and squeezing it to the viewport only makes every column
   illegible. It scrolls inside itself instead, so the page does not.

   `display: block` on the table is what creates the scroll container; the
   rows keep their table layout inside it via the anonymous table box, and
   `width: max-content` stops that box shrink-wrapping to the viewport, which
   would defeat the whole thing. Sticky headers are dropped here because a
   block-level table has no row box to stick them to. */
@media (max-width: 900px) {
  table.data, table.shifts {
    display: block; overflow-x: auto; overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch; max-width: 100%; min-width: 0;
  }
  table.data > thead, table.data > tbody, table.data > tfoot,
  table.shifts > thead, table.shifts > tbody, table.shifts > tfoot {
    width: max-content; min-width: 100%;
  }
  table.data th { position: static; }
  table.shifts { min-width: 0; }

  /* THE EQUITY LADDER STACKS. Name and number share the top line -- they are
     the two things being compared -- and the bar takes the full width beneath
     them, where it is longer and easier to read than it was in a column. */
  .bar-row {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 3px; padding: 3px 0;
  }
  /* Rows stated, not inferred. The bar spans both columns, so auto-placement
     pushed it past the name into a row of its own and then put the number on a
     THIRD row -- name, bar, number, three lines for what is one fact. */
  .bar-row .nm { grid-column: 1; grid-row: 1; }
  .bar-row .v { grid-column: 2; grid-row: 1; }
  .bar-row .bar-track { grid-column: 1 / -1; grid-row: 2; }

  /* Prose has no business being wider than the pane. */
  p.lede { max-width: none; }
}

/* Small phones (iPhone SE / mini, most Androids in portrait). */
@media (max-width: 430px) {
  /* THREE ACROSS, NOT THREE DOWN. Chris, 26 Oct 2026, of the summary tiles
     above his schedule: "Compact this data to a single row's tile or three
     tiles on the same row instead of three tiles on three rows."
     This rule used to say `1fr` on the argument that two cards side by side
     leave 160px each, "which is not enough for a heading and a 22px figure".
     The figure is 18px now and the heading wraps, so the premise has gone --
     and three tiles stacked cost 270px of a 760px phone to say three short
     things. Measured at 393px: 117px a tile, which fits the longest heading
     this screen has ("SHIFTS THIS BLOCK") on two lines and its value on two.
     The row is the same height as ONE of the tiles it replaced.
     `auto-fit` is deliberately not used here: it would reflow to two-plus-one
     the moment a heading did not fit, which is the ragged shape this is
     getting rid of. Three, or the row is not worth having. */
  .cards { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  /* MY SCHEDULE'S ROW IS TWO NOW (Chris, 29 Oct 2026: days off folded into
     the shifts tile), so it takes two columns rather than leaving a third
     standing empty. */
  .cards.duo { grid-template-columns: repeat(2, 1fr); }
  .cards .card { padding: 7px 8px 8px; }
  /* The heading is the tightest thing in the tile, so it is allowed to break
     rather than to widen its column -- the same bargain `.card .v` already
     made for a task name. */
  .cards .card .k { letter-spacing: .04em; overflow-wrap: anywhere; }
  .cards .card .v { font-size: var(--fs-title); }
  /* 10.5px, OFF THE SCALE FOR NOW: at the 11px floor the phone's narrow
     tiles wrap "worked, not assigned" and the hours line onto one more line
     (Logs, Time clock, Site coverage). Left until the tile is reworked. */
  .cards .card .n { font-size: 10.5px; }
  .pad { padding: 12px 10px; }
  .bars { --eq-v: 9rem; }
}

/* Landscape on a notched phone puts the cutout beside the content, not above
   it, and viewport-fit=cover means the page runs under it. The inset goes on
   the shell rather than on each panel, so it is added once and no rule has to
   restate the horizontal padding it was already using. Everything is
   border-box, so this narrows the grid rather than widening the page --
   which is the point: content stays clear of the cutout without the document
   growing past the viewport and scrolling sideways to prove it. */
@media (max-width: 900px) and (orientation: landscape) {
  .app {
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
  }
  .tabbar {
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
  }
  /* max() rather than the bare inset, because the strip has horizontal padding
     of its own: the bare value is 0 on a phone with no cutout, and the chips
     would sit flush against the edge on every device that is not an iPhone. */
  .subnav {
    padding-left: max(12px, env(safe-area-inset-left, 0));
    padding-right: max(12px, env(safe-area-inset-right, 0));
  }
}

/* =====================================================================
   A TAB'S PAGES, IN A TRAY ABOVE IT -- AND NO STRIP ON A PHONE

   Chris, 28 Oct 2026, on his phone, with a screenshot of another app's More
   menu: "Use a pop-up menu tray similar to this for the other menu item,
   rather than the scrolling page bubbles near the header." And: "Tapping a
   bottom tab you are already on (Schedule, Logs, Admin, Other) pops up a tray
   of that tab's pages, each with an icon, like the screenshot. A first tap
   still opens the tab's main page. The bubble strip under the header is
   removed on phones, which frees that row for the schedule. Desktop keeps its
   current menus."

   The behaviour is openTabTray() in web/app.js; this is the look, and the
   one line that takes the strip away.
   ===================================================================== */

/* THE STRIP GOES ON A PHONE, AND ONLY ON A PHONE.
 *
 * "Removed on phones" -- so the test is a phone, not the tab bar's 860px. A
 * phone is narrower than 700px upright (the widest is 430; 700 is the line
 * the sheet already draws for "every phone in portrait") or shorter than
 * 500px on its side (a landscape phone is 844-932 wide but never 500 tall).
 * An iPad mini upright is 744 by 1133 and keeps its strip: it has the row to
 * spare, Chris named phones, and "desktop keeps its current menus" is the
 * same instruction one size up. That is also what keeps the Screens strip
 * setting meaning something -- it still governs the strip wherever the strip
 * is drawn, and the Settings row says where that is.
 *
 * AFTER the 860px block, deliberately: equal specificity, so source order is
 * what lets `display: none` win over that block's `display: flex`. The strip
 * is still BUILT by buildSubnav -- emptied when a tab has one screen, as
 * before -- and a display:none node is out of the tab order and the
 * accessibility tree, so nothing a keyboard can reach is left behind. */
@media (max-width: 700px), (max-width: 900px) and (max-height: 500px) {
  .subnav { display: none; }
  /* AND LOGS' OWN STRIP, for the same reason: on a phone its four pages are
   * in the Logs tab's tray (Chris, 30 Oct 2026). */
  .log-seg { display: none; }
}

/* THE DIM, under the tray and OVER the page -- but under the tab bar (z 40),
 * so the bar stays bright and live the way the screenshot's does: tapping the
 * same tab again closes the tray, and tapping another goes there. `--scrim`
 * is the modal's own token, redefined in both dark blocks, so the page dims
 * the same amount here as it does under a dialog. `touch-action: none` stops
 * a drag on the dimmed page scrolling the screen behind it. */
.tabtray-scrim {
  position: fixed; inset: 0; z-index: 39;
  background: var(--scrim);
  touch-action: none;
}
.tabtray-scrim[hidden], .tabtray[hidden] { display: none; }

/* THE CARD. A panel-coloured rounded card with the modal shadow -- white in
 * the light theme, as in the screenshot, and the raised panel in dark, from
 * the same tokens every other surface reads, so neither theme needs a rule of
 * its own. Above the bar's z-index so nothing in the bar paints over it.
 *
 * `bottom`, `left` and `max-height` are written by placeTabTray(), measured
 * from the bar and the tab, so this sheet never repeats the bar's height.
 * The width is the content's, never wider than the screen less its two 8px
 * gutters, and long Admin trays scroll INSIDE the card -- `overscroll-
 * behavior` keeps that scroll from chaining to the page underneath. */
.tabtray {
  position: fixed; z-index: 41;
  width: max-content; min-width: 208px; max-width: calc(100vw - 16px);
  overflow-y: auto; overscroll-behavior: contain;
  padding: 6px 0;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-modal);
}
/* A ROW IS A THUMB TARGET: 48px, the `.lock-btn` floor, with the glyph in a
 * fixed column so the labels line up down the card however wide each emoji
 * draws on a given phone. */
.tabtray-item {
  display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: 48px; padding: 0 20px 0 16px;
  background: none; border: 0; color: var(--text);
  font: inherit; font-size: var(--fs-title); text-align: left; cursor: pointer;
}
.tabtray-item .ic {
  flex: none; width: 24px; font-size: 20px; line-height: 1; text-align: center;
}
.tabtray-label {
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tabtray-item:hover { background: var(--panel-3); }
.tabtray-item:focus-visible {
  outline: none; background: var(--panel-3);
  box-shadow: inset 0 0 0 2px var(--focus);
}
.tabtray-item[aria-current="page"]:focus-visible {
  box-shadow: inset 3px 0 0 var(--brand), inset 0 0 0 2px var(--focus);
}
/* WHERE YOU ARE, which a dialog could never say and this must: the accent
 * wash, a bar of the accent at the leading edge, and the weight -- but the
 * LABEL STAYS IN --text. `--ecg` is not only this sheet's: wearBranding() in
 * web/app.js overwrites it inline with the practice's own accent, and the
 * default brand accent (#4ADE80) is 1.5:1 on a light wash -- an accent-
 * coloured label would be the one row nobody can read, in exactly the theme
 * Chris's screenshot is in. The bar says "here" in the brand colour; the
 * text stays at the contrast every other row has. `aria-current="page"` is
 * what a screen reader hears.
 *
 * THE BAR IS --brand SINCE THE SAME EVENING. wearBranding() no longer touches
 * --ecg; the practice's colour is --brand, for marks exactly like this one
 * (Chris: "Keep the brand green for logos, bars and fills where it reads
 * well"), and --accent-ink is the readable green for words. The label could
 * now take the ink and still read; it keeps --text because that was the
 * deliberate choice for this row, and nothing here needs it to change. */
.tabtray-item[aria-current="page"] {
  background: var(--ecg-dim); color: var(--text); font-weight: 600;
  box-shadow: inset 3px 0 0 var(--brand);
}

/* Touch: targets big enough to hit without aiming. */
@media (pointer: coarse) {
  .btn { min-height: 38px; }
  td.cell { min-width: 34px; height: 30px; }
  .dayrow, .myrow { padding-top: 11px; padding-bottom: 11px; }
  input, select, textarea { font-size: 16px; }   /* stops iOS zooming on focus */
  /* THE TOUCH FLOOR IS 24px, WCAG 2.2 AA's minimum target. Chris, 31 Oct
     2026, shown Today, Trades, Equity and Roster as shipped, at 24px and at
     44px: "24px floor". GROW-ONLY, which is why it sits in :where() -- zero
     specificity, so every control that already sets its own minimum (the
     38px button above, a field's --control-h) keeps it, and only what was
     smaller than 24px (Equity's 15px name buttons, the 13px tick-boxes, the
     19px "How this works" summaries) grows to it. Desktop is untouched. */
  :where(button, [role="button"], [role="tab"], [role="switch"], summary, select,
         input:not([type="hidden"]), a.btn) {
    min-height: 24px; min-width: 24px;
  }
  /* Two the floor cannot reach on its own: an inline <summary> (min-height
     does nothing to an inline box), and the period arrows, whose row sets
     min-width: 0 on every child at a higher specificity. */
  .cl-info > summary { display: inline-block; text-align: center; }
  .log-period > .btn { min-width: 24px; }
}

@media print {
  .rail, .topbar, .drawer, .tabbar, .subnav,
  .filterbar, .gridtools, .ticker { display: none !important; }
  /* The strip is hidden, so the shell must stop reserving its height: `.app`
     is `100dvh` minus this variable, and a printed page 24px short of the
     sheet loses the last row of whatever is being printed. Zeroing the
     variable is exact where overriding the height would re-open the question
     of what a printed `.app` is tall. */
  :root { --ticker-h: 0px; }
  .app { grid-template-columns: 1fr; }

  /* A REPORT PRINTS AS THE REPORT, which is what Chris asked for on 1 Oct 2026
   * when he picked a print layout: a page somebody can put in front of a
   * committee, not a screenshot of an application. So the pickers, the span
   * fields and the buttons go, the heading and the note stay -- the note is
   * what says which span and which credit basis the numbers are on, and a
   * table of figures with neither is a table nobody can check later. */
  .no-print, .report-head, .report-controls, .report-list { display: none !important; }
  .reports { padding: 0 !important; }
  .reports .sect { margin-top: 0; font-size: var(--fs-title); }
  .reports .print-note { color: #000; margin-bottom: 10px; }
  .reports table.data { width: 100%; border-collapse: collapse; }
  .reports table.data th, .reports table.data td {
    border: 1px solid #999; padding: 3px 6px; font-size: var(--fs-xs); color: #000;
  }
  .reports thead { display: table-header-group; }   /* repeat on every page */
  .reports tr { break-inside: avoid; }
  .print-brand { display: flex !important; }
}
/* Printed only -- see printHead in web/reports.js. */
.print-brand {
  display: none; align-items: center; justify-content: space-between;
  gap: 16px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid #999;
}
.print-brand img.practice { max-height: 48px; max-width: 260px; object-fit: contain; }
.print-brand img.orstrata { max-height: 36px; max-width: 150px; object-fit: contain; }

/* ---------------------------------------------------------------- reports */
/* The holiday horizon block on the Holidays tab: the year that is due, the
   drafts waiting on the chair, and the two buttons that are their decision.
   Set apart from the published plan below it, because the whole point is that a
   draft is NOT part of that plan yet. */
.horizon {
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); padding: 14px 16px; margin-bottom: 20px;
}
.horizon > .sect:first-child { margin-top: 0; }
.horizon .why { display: inline; margin-left: 8px; }

.report-head {
  display: grid; grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 18px; align-items: start; margin-bottom: 18px;
}
.report-list { display: flex; flex-direction: column; gap: 6px; }
.report-pick {
  text-align: left; background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  cursor: pointer; font: inherit;
}
.report-pick:hover { border-color: var(--text-dim); }
.report-pick.on { border-color: var(--spo2); background: var(--panel-2, var(--panel)); }
.report-pick.off { opacity: 0.55; cursor: not-allowed; }
.report-pick .t { font-weight: 600; font-size: var(--fs-sm); }
.report-pick .b { font-size: var(--fs-xs); color: var(--text-dim); margin-top: 2px; }
.report-controls { display: flex; flex-direction: column; gap: 10px; }
.report-span { display: flex; gap: 12px; flex-wrap: wrap; }
/* Which equity window "Equity by partner" opened on (roadmap 101): one line
 * under the span, wrapping on a phone rather than pushing the page wide. */
.report-controls .eq-window { margin: 2px 0 6px; max-width: 60ch; overflow-wrap: anywhere; }
.report-actions { display: flex; gap: 8px; align-items: center; margin-top: 4px; }

@media (max-width: 760px) {
  .report-head { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ partner view
 *
 * buildNav sets body.partner-only for anyone without canEdit, with the stated
 * intent that "a partner never sees a committee action, because every one of
 * them is refused server-side anyway and a button that always fails is worse
 * than no button." Nothing ever read the class, so the whole committee topbar
 * -- Validate, Export, Publish, Rebuild month, the violation count for the
 * entire group -- was on screen for every partner. The refusals were real; the
 * buttons were the lie.
 *
 * The month selector stays: a partner has every reason to look at their own
 * schedule in another month. So does the request-lockout chip, which is about
 * their own deadline.
 */
body.partner-only #violChip,
body.partner-only #statusChip,
body.partner-only #seatChip,
body.partner-only #validateBtn,
body.partner-only #exportBtn,
body.partner-only #publishBtn,
body.partner-only #solveBtn,
body.partner-only #commitBtn2,
body.partner-only #discardBtn,
body.partner-only #undoBtn,
body.partner-only #drawer {
  display: none !important;
}

/* THE NEUTRAL SHELL, until the role is known (web/role-boot.js).
 *
 * index.html draws the committee's layout, so until the server has said who is
 * signed in the ticker and the header's controls are not drawn at all: the
 * logo, the theme button and sign-out stay, and nobody not yet known to be
 * committee is shown Draft / checking / connecting or a Controls button.
 * `display: none` and not `visibility`, so none of it is laid out, tappable or
 * announced; app.js lifts the class when the first view is drawn. No colour
 * here, so there is nothing to tokenise and both themes read the same. */
body.role-pending #ticker,
body.role-pending .topbar,
body.role-pending #drawer {
  display: none !important;
}

/* An accepted violation is settled, not gone. Dimmed and set back so it reads
 * as handled at a glance, but still legibly a violation with its severity
 * colour intact -- a schedule with three accepted violations should look like
 * a schedule with three accepted violations, not a clean one. */
.finding.waived {
  opacity: 0.72;
  border-left-style: dashed;
}


/* ------------------------------------------------- who is signed in, and as what */

.whoami-role {
  display: block; margin-top: 2px;
  font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-faint);
}
/* The two rungs that can change other people's access are worth seeing at a
   glance, because "am I about to do this as myself or as ORstrata?" is a
   question you should never have to open a menu to answer. */
.whoami-role.is-chair    { color: var(--pa); }
.whoami-role.is-platform { color: var(--agent); }

/* ------------------------------------------------------ the build strip
   Chris, 26 Nov 2026: "during a solve/build the screen keeps jumping because
   the run description needing/not-needing two lines - also the horizontal
   goals bars are nearly meaningless as they are and do not convey any sort of
   progress during the build but take up significant screen space". He chose a
   coverage ring and one summary line, expandable to a sparkline per severity.

   THE STRIP IS ONE ROW OF A FIXED HEIGHT, and that height is the whole fix for
   the jump: the description is a single line that ellipsises (it says the rest
   on hover and in the expansion), so nothing the solver writes can add a line.
   The expansion is an OVERLAY, opened by a click and never by the build, so the
   grid under it does not move either way. Every colour is a token; the ring and
   the sparklines draw in the same four tones the rule check uses. */
#progressHost { position: relative; }
.solve-strip { position: relative; }
.solve-strip .strip-row {
  display: flex; align-items: center; gap: var(--space-2);
  height: 46px; box-sizing: border-box; padding: 0 var(--space-4);
  overflow: hidden;                       /* a fixed height means a fixed height */
}
.strip-ring { flex: none; display: block; }
/* The ok tone is --accent-ink, not --brand: --brand is the practice's own
   colour (MWA's is #4ADE80, 1.74:1 on the light panel) and is for marks that
   are never READ. The ring's arc and the sparkline are read, so they take the
   darkened-or-lifted green that clears 3:1 on the surface they sit on. */
.strip-ring-track { stroke: var(--panel-3); }
.strip-ring-arc { stroke: var(--text-faint); transition: stroke-dasharray .6s ease; }
.strip-ring-arc.tone-ok   { stroke: var(--accent-ink); }
.strip-ring-arc.tone-warn { stroke: var(--pa); }
.strip-ring-arc.tone-bad  { stroke: var(--art); }
.strip-ring-num { fill: var(--text); font: 600 var(--fs-xs) 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }
.strip-line {
  flex: 1 1 0; min-width: 0;              /* the one that gives way */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font: var(--fs-sm) 'IBM Plex Mono', monospace; color: var(--text-dim);
}
.strip-line.tone-ok   { color: var(--accent-ink); }
.strip-line.tone-warn { color: var(--pa); }
.strip-line.tone-bad  { color: var(--art); font-weight: 600; }
.strip-heart { flex: none; }
.strip-follow, .strip-btn, .strip-toggle { flex: none; }
.strip-row [hidden] { display: none; }
.strip-toggle { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; }
.strip-chev { display: inline-block; transition: transform .15s ease; }
.strip-toggle[aria-expanded="true"] .strip-chev { transform: rotate(180deg); }

.strip-panel {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 55;
  max-height: min(70vh, 460px); overflow-y: auto; overscroll-behavior: contain;
  padding: var(--space-3) var(--space-4);
  background: var(--panel); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.strip-panel[hidden] { display: none; }
.strip-sparks {
  display: grid; gap: var(--space-3) var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
/* ONE UNIT PER SEVERITY. Chris, 27 Nov 2026: "this display is ambiguous for what
   the counts 0, 0, 54, 262 are referring to - they look like they go to the wrong
   violation severity." The name sat at the column's left and the count at its far
   right, so each count landed right beside the NEXT column's name. Now the name
   and its count are stacked at the same left edge, the count under the name, and
   a rule down the column's left side (the severity's own tone, with a neutral
   gap between columns) closes the unit. The count stays in --text: tone colours
   are for marks, and the words must clear 4.5:1 in both themes. */
.strip-spark-cell {
  min-width: 0; padding-left: var(--space-3);
  border-left: 3px solid var(--text-faint);
}
.strip-spark-cell[data-tone="ok"]   { border-left-color: var(--accent-ink); }
.strip-spark-cell[data-tone="warn"] { border-left-color: var(--pa); }
.strip-spark-cell[data-tone="bad"]  { border-left-color: var(--art); }
.strip-spark-cell[data-tone="info"] { border-left-color: var(--spo2); }
.strip-spark-head { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.strip-spark-name { color: var(--text-faint); text-transform: uppercase; letter-spacing: .06em; font-size: var(--fs-xs); }
.strip-spark-now { color: var(--text); font: 600 var(--fs-lg) 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }
.strip-spark { display: block; width: 100%; max-width: 220px; height: 34px; overflow: visible; }
.strip-spark-target { stroke: var(--text-faint); stroke-width: 1; stroke-dasharray: 3 3; }
.strip-spark-line { stroke: var(--text-dim); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.strip-spark-line.tone-ok   { stroke: var(--accent-ink); }
.strip-spark-line.tone-warn { stroke: var(--pa); }
.strip-spark-line.tone-bad  { stroke: var(--art); }
.strip-spark-line.tone-info { stroke: var(--spo2); }
.strip-spark-live-seg { stroke: var(--text-dim); stroke-width: 1.5; stroke-dasharray: 2 3; }
.strip-spark-dot { fill: var(--text-dim); }
.strip-spark-dot.tone-ok   { fill: var(--accent-ink); }
.strip-spark-dot.tone-warn { fill: var(--pa); }
.strip-spark-dot.tone-bad  { fill: var(--art); }
.strip-spark-dot.tone-info { fill: var(--spo2); }
/* The live point is an estimate until the pass lands, so it is hollow. */
.strip-spark-dot.live { fill: var(--panel); stroke: var(--text-dim); stroke-width: 2; }
.strip-spark-foot { color: var(--text-faint); font-size: var(--fs-xs); margin-top: 2px; }
.strip-facts { margin-top: var(--space-3); }
.strip-fact { margin: 0 0 var(--space-1); color: var(--text-dim); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.strip-panel .solve-note { margin: var(--space-2) 0 0; }

/* NARROW: the strip stays ONE fixed line. Ring, line, Take this build and the
   chevron stay; the heartbeat and the words on the switch and the toggle drop
   out (the switch keeps its box, with its title and label; the heartbeat's
   reading is in the expansion's first fact). The panel becomes a sheet at the
   bottom, the same place the workspace drawer sits, so a phone has one gesture
   for "more" rather than two. */
@media (max-width: 900px) {
  .solve-strip .strip-row { padding: 0 var(--space-3); }
  .strip-heart, .strip-follow span, .strip-toggle-label { display: none; }
  .strip-panel {
    position: fixed; left: 0; right: 0; top: auto; bottom: 0; z-index: 46;
    max-height: 60vh; border-top: 1px solid var(--line); border-bottom: 0;
  }
}
@media (max-width: 480px) {
  .strip-btn { padding: 4px 8px; font-size: var(--fs-xs); }
}


/* ---- the grid read the other way round -----------------------------------
   Days down the side. The task names become column headers, and at fifty-five
   of them they have to be narrow, so they turn on their side rather than
   truncating to three letters that name nothing. */
table.grid.down th.task-col {
  height: 132px;
  vertical-align: bottom;
  padding: 4px 0 6px;
  white-space: nowrap;
}
table.grid.down th.task-col span {
  display: inline-block;
  transform: rotate(180deg);
  writing-mode: vertical-rl;
  font-weight: 500;
  font-size: var(--fs-xs);
  max-height: 124px;
  overflow: hidden;
}
table.grid.down th.group {
  text-align: left;
  font-size: var(--fs-xs);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--panel-2);
  border-left: 1px solid var(--line);
  padding: 3px 8px;
}
/* THE DATE COLUMN CARRIES THE BAND, and these two rules are why it did not.
 *
 * They are the ROTATED grid's version of the header bug above, and the third
 * instance of one fault: a later `background` SHORTHAND beating an earlier
 * band rule. #392 gave this column the same composed wash and bracket as the
 * cells beside it (`table.grid.down td.task.wknd, ...holi` further up the
 * file), at the same specificity -- and these two sat LATER, so they won, and
 * the shorthand reset the band's `background-image` to none.
 *
 * The holiday one was worse than a missing wash. `--agent-dim` is PURPLE, and
 * in this palette --agent means a tier and a manual override; measured in this
 * container's Chromium, a holiday in the rotated date column computed to
 * `rgba(109,75,214,.12)`. So the one column whose job is to say which day it
 * is said "manual override" instead, in the one orientation where that column
 * is the date.
 *
 * Removed rather than re-specified: the rule they were duplicating is already
 * in the band block above, where it belongs with the other seven, and a second
 * copy here is what let the two disagree in the first place. */


/* A partner's own month as a strip. One row, so it needs no virtualisation and
   no minimum height -- it should take the space it needs and no more. */
.mystrip { max-height: none; margin-top: 10px; }
/* The strip has the same +/- as the committee grid, so it means the same
   thing here: a size for the labels, and a column measured to fit it. */
.mystrip table.grid td.cell { font-size: var(--cell-fs); }


/* Drag and drop. The target outline has to read at a glance while a cursor is
   over it, so it is a ring rather than a fill -- a fill is indistinguishable
   from the weekend and violation shading it sits on top of. */
td.cell[draggable="true"] { cursor: grab; }
td.cell[draggable="true"]:active { cursor: grabbing; }
td.cell.drop {
  outline: 2px solid var(--accent-ink);
  outline-offset: -2px;
  /* `background-color` for the reason above, and this rule's own comment
     already asked for it: "a fill is indistinguishable from the weekend and
     violation shading it sits on top of". The shorthand was removing the very
     shading the comment says it sits on. */
  background-color: var(--ecg-dim);
}


/* Band headings fold. The whole heading is the target rather than just the
   chevron -- a 10px hit area on a row that is already only 25px tall is a
   control people miss and then stop looking for. */
.group-head {
  display: flex; align-items: center; gap: 6px;
  width: 100%; background: none; border: 0; padding: 0;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
/* A BAND HEADING STAYS IN VIEW WHEN THE GRID IS SCROLLED SIDEWAYS.
 *
 * Chris, 26 Nov 2026: "the group header rows (Obstetrics, Subspecialty call,
 * Tier 1) vanished". The heading's cell spans every day of the block, so it is
 * as wide as the table and `position: sticky` on the CELL has nothing to stick
 * inside -- it can never move relative to its own row. The label sat at the far
 * left of a seven-thousand-pixel cell and scrolled out with the first day.
 * The sticky has to be on the BUTTON, which is narrower than the cell it sits
 * in, and it takes its natural 10px (the cell's padding) as its left offset so
 * it does not move when the grid is not scrolled. */
tr.group td > .group-head {
  position: sticky; left: 10px; width: max-content; max-width: 60vw;
}
.group-head .chev { width: 10px; color: var(--text-dim); }
.group-head .pill { margin-left: 6px; }
.group-head:hover .chev { color: var(--text); }
/* Days-down puts the bands in the header, so a collapsed one has no column left
   to live in. They collect above the grid instead, still clickable. */
.shut-bands { display: flex; gap: 8px; flex-wrap: wrap; padding: 6px 0 2px; }
.shut-bands .group-head {
  width: auto; font-size: var(--fs-xs); text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 4px; padding: 2px 8px;
}


/* Per-change actions on a review tile. Ghost buttons, small, right-aligned:
   the row's job is to be read, and three solid buttons per row on a list of
   twenty reads as a wall of controls rather than a list of changes. */
.commit-acts {
  display: flex; gap: 6px; justify-content: flex-end;
  margin-top: 8px;
}
.commit-acts .btn { padding: 2px 10px; font-size: var(--fs-sm); }
.btn.ghost.danger { color: var(--art); }
.btn.ghost.danger:hover { background: var(--art-dim); }

/* ------------------------------------------------- more than one block on screen
   Three quarters end to end is ninety-odd columns, and without a mark where
   one ends the strip reads as a single very long block -- which is how
   somebody reads a quarterly total off three quarters. A rule down the
   boundary and the block's name over its first column. */
td.cell.block-start,
th.dnum.block-start,
.grid thead th.block-start { border-left: 2px solid var(--text-faint); }
.grid thead tr.blockrow th {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-dim); text-align: left; padding: 3px 4px;
  white-space: nowrap; background: var(--panel-2);
}

/* ------------------------------------------------------ coverage date axis
   Eleven tracks of proportional colour and nothing saying which day any of it
   was: matching "uncovered 24.0 h from 09-09" to a red mark meant counting
   columns from the left edge. A tick per day, labelled as often as the width
   allows -- weekly past a month, because "10/05" will not go in eleven
   pixels and a call schedule is read by weekday anyway. */
.svc-axis { margin-bottom: 6px; }
.svc-track.axis { background: none; height: auto; min-height: 26px; }
.svc-track.axis .tick {
  position: absolute; top: 0; bottom: 0;
  border-left: 1px solid var(--line-soft);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  overflow: visible;
}
/* THE SAME TWO WASHES AS THE GRID, AND --pa-dim IS NOT ONE OF THEM.
   The holiday tick was pale yellow, which in this palette is also the Liver
   band and a soft violation -- three meanings for one colour, on a page whose
   whole job is telling a covered hour from an uncovered one. The band tokens
   are neutral luminance steps for exactly this reason: a weekend is not a kind
   of work, it is a property of the day. The holiday keeps its hatch so it is
   not telling itself apart from a Saturday by lightness alone. */
.svc-track.axis .tick.wknd { background: var(--wknd-wash); }
.svc-track.axis .tick.holi {
  background:
    repeating-linear-gradient(135deg,
      var(--holi-hatch) 0 2px, transparent 2px 6px),
    var(--holi-wash);
}
/* AND THE BRACKET, because the unit is the weekend. One edge down the first
   day of an unbroken run of non-weekdays and one down the last, so Thanksgiving
   Thursday through the Sunday reads as one stretch rather than four tinted
   columns -- the same bracket the grid draws, from the same function. */
.svc-track.axis .tick.band-s { border-left: 1px solid var(--band-edge); }
.svc-track.axis .tick.band-e { border-right: 1px solid var(--band-edge); }
.svc-track.axis .tick span {
  display: flex; flex-direction: column; align-items: center; line-height: 1.15;
  /* The label is wider than one day's column and must not be clipped by it. */
  position: absolute; bottom: 2px; white-space: nowrap;
}
.svc-track.axis .tick b {
  font-size: 10px; font-weight: 600; color: var(--text-dim);
  font-family: 'IBM Plex Mono', monospace;
}
.svc-track.axis .tick i {
  font-size: 9px; font-style: normal; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: .04em;
}
/* The month, said once where it changes -- its own lane above the day
   numbers, with a rule marking the boundary in every track below via the
   tick's left border. */
.svc-track.axis { min-height: 38px; }
.svc-track.axis .tick.month-start { border-left: 2px solid var(--text-faint); }
.svc-track.axis .tick u {
  position: absolute; top: 0; left: 2px; text-decoration: none;
  font-size: 9px; font-weight: 600; letter-spacing: .06em;
  color: var(--text-dim); white-space: nowrap;
  font-family: 'IBM Plex Sans Condensed', sans-serif;
}

/* THE COLUMNS ARE A FIXED WIDTH THE READER SETS, and the table scrolls.
   `width: 100%` with `table-layout: fixed` divided the pane by however many
   days were on screen, so a month was readable and a quarter was ninety
   columns of five pixels each -- the state Chris reported as "this view is not
   legible".

   It was replaced by `min-width: 100%`, which kept the nicety of filling the
   pane for a short block, and that turned out to be the next bug: stretching
   the table past the sum of its columns distributes the surplus across all of
   them, so the scrollbar appearing as the virtual scroller rendered was enough
   to rescale every column mid-scroll. Neither is here now. The widths come
   from the colgroup, the wrapper scrolls, and a short block simply does not
   fill the pane -- which is the cheaper of the two prices. */
.mystrip table.grid thead th { width: var(--cell-w); min-width: var(--cell-w); }
.mystrip table.grid th.corner,
.mystrip table.grid td.task { width: 110px; min-width: 110px; }

/* --------------------------------------------------- one partner's schedule
   The list borrows .myrow from the personal views -- it IS a personal
   schedule, just somebody else's, and drawing it differently would suggest a
   different kind of fact. What is added is the acting column and the block
   headings that say which build each stretch of days belongs to. */
.partner-block-head {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 6px; padding-bottom: 4px;
  border-bottom: 1px solid var(--line-soft);
  font-size: var(--fs-ui);
}
.partner-day { grid-template-columns: 58px 1fr auto; }
.partner-asn {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--panel-2); border: 1px solid var(--line-soft);
  border-radius: 6px; padding: 2px 6px; margin: 1px 4px 1px 0;
  font-size: var(--fs-sm);
}
.partner-asn.unavail { color: var(--text-dim); font-style: italic; }
.partner-acts { display: flex; gap: 4px; }

/* Long labels (Vacation, OB Swing Night) must clip at their own column, not
   bleed across the neighbours into an unreadable smear. */
.mystrip table.grid td.cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------- solve liveness
   A busy CP-SAT pass can go a long stretch without a better solution, and a
   frozen panel is indistinguishable from a crashed one. The shimmer says the
   CLOCK is moving even when the numbers are not; the heartbeat says when the
   solver last spoke; amber past twenty quiet seconds, red once the pass
   should have ended and nothing arrived. */
.solve-bar.live > div {
  background-image: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.25) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: solveShimmer 1.6s linear infinite;
}
@keyframes solveShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.solve-timers { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.solve-heart { color: var(--accent-ink); font-size: var(--fs-sm); white-space: nowrap; }
.solve-heart.quiet { color: var(--pa); }
.solve-heart.bad { color: var(--art); font-weight: 600; white-space: normal; }

/* ---------------------------------------------------------- the rule book */

.sect-sub {
  font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-faint); margin: 18px 0 6px;
}
.rule-book { display: flex; flex-direction: column; gap: 8px; }
.rule {
  padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--panel-2);
}
.rule-title { font-weight: 600; font-size: var(--fs-ui); }
.rule-plain { font-size: var(--fs-sm); color: var(--text-dim); margin-top: 3px; max-width: 68ch; }
.rule-since {
  font-size: var(--fs-xs); color: var(--text-faint); margin-top: 5px;
  border-left: 2px solid var(--line); padding-left: 8px; font-style: italic;
}
/* The identifiers, which are the point: one rule, four names. Monospaced
 * because every one of them is something you would paste into a search. */
/* THE SETTINGS UNDER A RULE.
   A label column wide enough for a sentence, the control beside it, and the
   help underneath spanning both -- so a column of controls lines up down the
   card and the prose does not push them out of alignment. */
.rule-settings {
  display: grid; grid-template-columns: minmax(12rem, 22rem) 1fr;
  gap: 4px 14px; margin-top: 9px; padding-top: 8px;
  border-top: 1px solid var(--line-soft);
}
.rs { display: contents; }
.rs-label {
  font-size: var(--fs-sm); color: var(--text-dim); align-self: center;
  padding: 3px 0;
}
.rs-unit {
  font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-xs);
  color: var(--text-faint); margin-left: 6px;
}
.rs-field { align-self: center; padding: 2px 0; }
.rs-field input[type="number"] { font-variant-numeric: tabular-nums; }
.rs-help {
  grid-column: 1 / -1; font-size: var(--fs-xs); color: var(--text-faint);
  max-width: 72ch; margin: -1px 0 7px;
}
/* A key the STORED rules do not carry at all. Four bugs in one day were
   exactly this and none of them was visible: the app showed the rule and never
   the number the rule was running on. */
.rs-help.rs-warn { color: var(--warn); }
.rs-missing .rs-field::after {
  content: 'not set'; font-size: var(--fs-xs); color: var(--warn); margin-left: 8px;
  font-family: 'IBM Plex Mono', monospace;
}
.rs-struct {
  font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-xs);
  color: var(--text-faint);
}
/* The whole list, on or off -- what a rule does NOT cover is usually the
   interesting half, and a multi-select hides it. */
.rs-keys { display: flex; flex-wrap: wrap; gap: 4px; }
.rs-keys .chip {
  padding: 2px 8px; font-size: var(--fs-xs); letter-spacing: .03em; cursor: pointer;
  background: transparent; color: var(--text-faint); border-color: var(--line);
}
.rs-keys .chip.on {
  background: var(--ecg-dim); color: var(--accent-ink); border-color: var(--brand);
}
.rs-keys .chip[disabled] { cursor: default; opacity: .7; }

/* ------------------------------------------- add, delete and disable a rule
 *
 * A DISABLED RULE STAYS LEGIBLE. The temptation is to grey the whole card out,
 * and it is the wrong call: the card is where the reason lives, and a chair
 * deciding whether to turn a rule back on has to be able to read the rule.
 * So the card keeps its type colour and gains a left rule and a chip; only the
 * settings underneath dim, because those are the numbers that have stopped
 * meaning anything.
 *
 * Every colour comes from a token defined on :root and redefined per theme,
 * so nothing here needs its own dark variant. */
.rule-disabled { border-left: 2px solid var(--pa); }
.rule-disabled .rule-settings { opacity: .5; }

.rule-off {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin-top: 8px; font-size: var(--fs-sm); color: var(--text-dim);
}
.rule-off.locked { color: var(--text-faint); }
.rule-off.is-off { color: var(--pa); }
.rid.off { color: var(--pa); border-color: var(--pa); }

.rule-instances { margin-top: 9px; }
.ri-list { list-style: none; margin: 0 0 7px; padding: 0;
           display: flex; flex-direction: column; gap: 4px; }
.ri-list li {
  display: flex; align-items: baseline; gap: 8px; font-size: var(--fs-sm);
  color: var(--text); padding: 4px 7px; border-radius: 3px;
  background: var(--panel-2);
}
/* The sentence takes the room; the control sits at the end and stays put, so
   a column of rules has one delete button in one place. */
.ri-list li > span:first-child { flex: 1 1 auto; }
.ri-bad { color: var(--pa); }
.ri-add { display: flex; flex-wrap: wrap; gap: 5px; }

.btn.small, .btn.tiny {
  /* ONE SMALL BUTTON. `tiny` was defined twice with different padding and
     `small` a third way; all three drew the same 11px label. */
  min-height: var(--control-h-sm); padding: 0 8px; font-size: var(--fs-xs); line-height: 1.4;
}

.rule-ids { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.rid {
  font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-xs);
  padding: 1px 6px; border-radius: 3px;
  background: var(--panel-3); color: var(--text-faint);
  border: 1px solid transparent;
}
.rid.code { color: var(--text-dim); border-color: var(--line); }
.rid.none { font-style: italic; }

/* On a finding, the rule it came from. */
.rule-ref {
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  margin-top: 6px; padding-top: 5px; border-top: 1px dashed var(--line);
  font-size: var(--fs-xs); color: var(--text-faint);
}
.rule-ref-code { font-family: 'IBM Plex Mono', monospace; font-size: 10px; opacity: .75; }

/* How often a site's own history agreed with a rule. Semantic, and separate
 * from the accent: this is the reader's whole judgement about whether a
 * measurement is a policy or a habit, so it has to read at a glance. */
.rule-title .rid { margin-left: 8px; vertical-align: middle; }
.rid.v-always { color: var(--spo2); }
.rid.v-mostly { color: var(--text-dim); }
.rid.v-often, .rid.v-no { color: var(--pa); }
.rid.v-untested { font-style: italic; }

/* --------------------------------------------------------------- backups */

.restore-preview {
  margin: 12px 0 18px; padding: 12px 14px;
  border: 1px solid var(--line); border-left: 3px solid var(--brand);
  border-radius: var(--radius); background: var(--panel-2);
}
/* The four numbers a restore decision is actually made on. Big enough to read
   at a glance, because "1,180 identical" is what says this is a correction
   rather than a different month. */
.restore-counts { display: flex; flex-wrap: wrap; gap: 18px; margin: 10px 0 4px; }
.rc-n {
  font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums;
  font-size: var(--fs-xl); line-height: 1.1;
}
.rc-l {
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-faint);
}
.rc.add .rc-n { color: var(--spo2); }
.rc.del .rc-n { color: var(--art); }
.rc.chg .rc-n { color: var(--pa); }

/* ---------------------------------------------------------------- the setup
 * interview. Two columns: the questions, and what the answers would write.
 * The preview is sticky because it is the reason to read the questions -- a
 * chair changing "does anyone work overnight" should see the rest rule appear
 * without scrolling to find out. */
.setup {
  display: grid; grid-template-columns: minmax(0, 1fr) 22rem;
  gap: 28px; align-items: start; padding: 4px 2px 60px;
}
.setup-qs { min-width: 0; max-width: 44rem; }
.setup-qs h2 { margin: 0 0 6px; font-size: var(--fs-lg); }
.setup-sec {
  border-top: 1px solid var(--line); margin-top: 26px; padding-top: 18px;
}
.setup-sec h3 {
  margin: 0 0 14px; font-size: var(--fs-sm); letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-faint); font-weight: 600;
}
.q { margin: 0 0 22px; }
.q-ask { display: block; font-weight: 600; font-size: var(--fs-body); margin-bottom: 3px; }
.q-why {
  margin: 0 0 9px; font-size: var(--fs-sm); line-height: 1.5; color: var(--text-dim);
  max-width: 40rem;
}
.q-bad-msg { margin: 6px 0 0; font-size: var(--fs-sm); color: var(--warn); }
.q-bad .inp { border-color: var(--warn); }
/* `segbtn`, NOT `seg`. The Yes/No pair used to carry class `seg`, which is
 * ALSO the schedule timeline's coloured band at line 641 -- and that one is
 * `position: absolute; top: 0; bottom: 0`. This rule set display and gap but
 * never cleared the positioning, so on the new-site page the Yes/No group
 * became a full-height green band down the middle of the screen, its two
 * buttons stretched to fill it, and, being out of flow, it reserved no width
 * so the question column was clipped on its left edge.
 *
 * Renamed rather than patched with `position: static`, because an override
 * only holds until the next rule lands on `.seg` -- two unrelated components
 * sharing a class name is the bug, and the override would have hidden it
 * again. setup-classes-test pins that the button group never takes `seg`. */
/* THE PRIORITY ORDER. One row per price, the number beside the sentence, and
   the four moves at the edge. Chris, 23 Oct 2026: "drag-to-order should also
   have a send to top/bottom double arrows, and move up/down one single arrow
   controls at the edge of the rule."

   `list-style: none` with the position drawn as its own element rather than a
   marker, because the marker is not selectable, not styleable across browsers,
   and -- the reason that settles it -- a drop target needs the number inside
   the row it belongs to. */
.prio { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.prio-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel-2);
}
.prio-row[draggable="true"] { cursor: grab; }
.prio-row:hover { border-color: var(--line-soft); }
/* A site that has answered and one that has not must not look alike -- the
   same rule the rule builder holds for a suggested tick. */
.prio-row.own { border-left: 3px solid var(--brand); }
.prio-at {
  flex: none; width: 1.6rem; text-align: right;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: var(--fs-xs); color: var(--text-faint);
}
.prio-what { flex: 1; min-width: 0; font-size: var(--fs-sm); line-height: 1.45; }
.prio-what .help { margin: 2px 0 0; font-size: var(--fs-xs); }
.prio-moves { flex: none; display: flex; gap: 2px; }
.prio-moves .btn { min-width: 1.6rem; padding: 2px 5px; line-height: 1.2; }

.setup .chips, .setup .segbtn { display: flex; flex-wrap: wrap; gap: 6px; }

/* A SEGMENTED BUTTON STATES ITS OWN BACKGROUND, AND THIS IS WHY.
 *
 * Chris, 23 Oct 2026, with two screenshots. On "Which shifts does a team
 * gate?" every chip was green: "not allowing shifts to be selected/
 * deselected". On "Are holidays assigned years in advance?" both answers were
 * green: "both yes and no are selected, these should be exclusive."
 *
 * Neither handler was wrong. `.btn.grp` above sets a colour and a border style
 * and leaves the BACKGROUND to whatever `.btn` means on the page it lands on
 * -- which is fine in the app, where `.btn` is neutral and `.btn.primary` is
 * the filled one, and wrong on the Rule Builder, where `.btn` IS the filled
 * primary (its secondary action is `.btn.ghost`). So interview-ui.js drew
 * `btn grp` for an unselected option and the page painted it exactly like a
 * selected one. Every control it builds was solid green, selected or not, and
 * on a page of thirty chips that reads as a control that will not respond.
 *
 * INHERITING A BASE CLASS ACROSS TWO PAGES THAT DISAGREE ABOUT IT is the bug,
 * so the fix is to stop inheriting: a group button states both of its states
 * here, and neither depends on what `.btn` happens to mean nearby.
 *
 * `--on-accent` on the selected one, not a literal -- white on the light
 * theme's deep green, near-black on the dark theme's bright green, which is
 * what that token exists for. */
.setup .btn.grp {
  background: var(--panel-3); color: var(--text-dim);
  border: 1px solid var(--line); border-style: solid; font-weight: 500;
}
.setup .btn.grp:hover { border-color: var(--spo2); color: var(--text); }
/* `primary` is what interview-ui.js writes; `on` is what the filter bar
   writes. Both mean selected, and a group button must not look different
   depending on which word its caller chose. */
.setup .btn.grp.primary, .setup .btn.grp.on {
  background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent);
  font-weight: 600;
}
.setup .inp { max-width: 26rem; }
.setup .inp.num { max-width: 4.5rem; text-align: right; }
.setup .inp.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; max-width: 8rem; }

table.shifts { border-collapse: collapse; width: 100%; min-width: 34rem; }
table.shifts th {
  text-align: left; font-size: var(--fs-xs); letter-spacing: .05em;
  text-transform: uppercase; color: var(--text-faint); font-weight: 600;
  padding: 0 8px 6px 0;
}
table.shifts th.num { text-align: right; }
table.shifts td { padding: 0 8px 6px 0; vertical-align: middle; }

.setup-preview {
  position: sticky; top: 12px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px;
}
.setup-preview h3 { margin: 0 0 12px; font-size: var(--fs-body); }
.setup-preview h4 {
  margin: 18px 0 8px; font-size: var(--fs-xs); letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-faint); font-weight: 600;
}
.setup-lines, .setup-notes ul, .setup-problems ul { margin: 0; padding-left: 18px; }
.setup-lines li { margin-bottom: 8px; font-size: var(--fs-ui); line-height: 1.5; }
.setup-notes li, .setup-problems li {
  margin-bottom: 8px; font-size: var(--fs-sm); line-height: 1.5; color: var(--text-dim);
}
.setup-actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
/* The file picker that loads a rule-builder sitting is a <label> wrapping a
 * hidden <input type=file>, because a button cannot open one. It has to look
 * and feel like the buttons beside it. */
.setup-actions label.btn { cursor: pointer; display: inline-flex;
  align-items: center; }

@media (max-width: 900px) {
  .setup { grid-template-columns: minmax(0, 1fr); }
  .setup-preview { position: static; }
}

/* The paused-build dialog: one group per contradiction, one line per cell,
 * with the button that releases that cell's pin on the right. A released
 * line stays, struck through, so the person can see what they changed. */
.paused-core { border: 1px solid var(--line, #2A3648); border-radius: 8px;
  padding: 8px 12px; margin: 10px 0; }
.paused-cell { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.paused-cell .who { font-variant-numeric: tabular-nums; }
.paused-cell.released .who { text-decoration: line-through; opacity: .6; }

/* The Updates tab: one row per pull request, run or build, the state as a
 * chip on the right so a glance answers "is it live yet". */
.updates .upd-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.upd-section { margin: 14px 0; }
.upd-section h3 { font-size: var(--fs-sm); letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint); margin: 0 0 6px; }
.upd-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0;
  border-top: 1px solid var(--line-soft); }
.upd-row a { color: inherit; }

/* THE ROADMAP, above the derived half of the same tab. It is prose rather
   than rows, so it does not borrow .upd-row's flex layout -- a long sentence
   in a flex row with `flex-wrap` breaks between its own words at every gap.
   Its h3 keeps the section styling so it reads as one page with what is
   below it; the h4s inside are the parts (settled, planned, waiting). */
.roadmap { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px;
  background: var(--panel); margin-bottom: 18px; }
.roadmap h4 { font-size: var(--fs-sm); letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-faint); margin: 14px 0 4px; }
.roadmap .rm-block:first-of-type h4 { margin-top: 6px; }
.roadmap h5 { font-size: var(--fs-ui); margin: 12px 0 2px; color: var(--text); }
.roadmap .rm-sub { margin-left: 2px; }
.roadmap p { margin: 6px 0; line-height: 1.55; }
.roadmap .rm-list { margin: 6px 0; padding-left: 18px; }
/* The blockers table is two columns of prose; `table-layout: fixed` keeps a
   long "waiting on" cell from squeezing the item name to one word per line. */
.roadmap .rm-table { width: 100%; table-layout: fixed; border-collapse: collapse;
  margin: 8px 0; font-size: var(--fs-ui); }
.roadmap .rm-table th { text-align: left; font-size: var(--fs-xs); letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-faint); padding: 4px 8px 4px 0; }
.roadmap .rm-table td { padding: 5px 8px 5px 0; vertical-align: top;
  border-top: 1px solid var(--line-soft); line-height: 1.45; }
.roadmap s { color: var(--text-faint); }
.roadmap .rm-list li { padding: 3px 0; line-height: 1.5; }
/* The number is the content in "in the order Chris asked for it", so the list
   carries it rather than letting an <ol> renumber from whatever renders. */
.roadmap .rm-n { color: var(--text-faint); margin-right: 6px; }
.roadmap code { font-size: var(--fs-sm); padding: 1px 4px; border-radius: 3px;
  background: var(--ink); }
/* The rule check and the grid describe the last WRITTEN pass; while a build
   searches, both say so rather than pretending to be live. */
.stale-note { margin: 0 0 8px; font-size: var(--fs-sm); }
.pass-refresh { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs);
  color: var(--text-dim); cursor: pointer; user-select: none; }
.pass-refresh input { accent-color: var(--accent-fill); cursor: pointer; }
.grid-stale { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm);
  padding: 5px 10px; border-bottom: 1px solid var(--line);
  background: var(--pa-dim); color: var(--pa); }
/* ------------------------------------------------- the day filter is ON
 *
 * Chris, 22 Oct 2026: "allow for filters to show only weekdays, only
 * weekends/holidays, all days."
 *
 * LOUDER THAN THE OTHER FILTERS ON PURPOSE. Every other filter on that bar
 * narrows rows, and a row that is not drawn is a row nobody was reading. This
 * one hides DAYS, which changes what a reader concludes about a block they are
 * checking: filter to weekdays, get interrupted, come back and scan for
 * weekend call, and there is none -- on a block that is fine. So it borrows
 * the strip the build-stale notice uses, in --warn rather than --pa, because
 * --pa on this page is already a soft violation and a holiday. --warn is
 * neither, and it is the one step in the scale that means "mind this". */
.grid-stale.day-filter-on {
  background: var(--warn-soft); color: var(--warn); font-weight: 600;
  /* A striped edge as well as a colour: the state has to survive a greyscale
     printout and a colour-blind reader, and a strip that is only a hue is one
     channel. */
  border-left: 4px solid var(--warn);
}
.grid-stale.day-filter-on .btn { font-weight: 600; }
.dayfilter { display: flex; gap: 4px; align-items: center; }
/* The chosen state of a HIDING control is not the neutral "on" the layout
   toggles use -- it is the thing the strip is about, so it says so here too. */
.dayfilter .btn.grp.on.hiding {
  color: var(--warn); border-color: var(--warn); background: var(--warn-soft);
}

/* The Builds tab: a build's last log line sits under its row, full width. */
.builds .build-log { flex-basis: 100%; font-size: var(--fs-sm); white-space: pre-wrap; word-break: break-word; }

/* ------------------------------------------------- where the sites disagree
 *
 * The divergence section on the Rules tab (Chris, 5 Oct 2026). Colour carries
 * the copy-scope class, and the choice of which colour is deliberate: none of
 * these is an error, so none of them is --art. A site differing from another
 * site is the normal state of two hospitals. */
.card.sitediff { margin-bottom: 12px; }
.sd-site + .sd-site { margin-top: 14px; }
.sd-site h4 { margin: 0 0 4px; font-size: var(--fs-ui); font-weight: 600; }
.sd-n    { color: var(--warn); }
.sd-same { color: var(--accent-ink); }

.sd-row {
  padding: 7px 0; border-top: 1px solid var(--line-soft);
  font-size: var(--fs-sm);
}
.sd-head { display: flex; align-items: baseline; gap: 8px; }
.sd-head code { font-size: var(--fs-sm); }

/* The class badge, in the three colours the classes already mean elsewhere:
 * ecg for a build setting (the colour the app uses for "working as set"),
 * spo2 for a site's own answer, agent for one that never travels. */
.sd-scope {
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em;
  padding: 1px 6px; border-radius: 999px; white-space: nowrap;
  border: 1px solid currentColor;
}
.sd-scope.travels { color: var(--accent-ink); }
.sd-scope.confirm { color: var(--spo2); }
.sd-scope.reset   { color: var(--agent); }

/* Two values side by side, this site's first -- the question a chair is
 * holding is "what is MY schedule built against", and that answer reads
 * left. Same ordering as the repository-drift report. */
.sd-vals { margin-top: 3px; font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-xs); }
.sd-here  { color: var(--text); }
.sd-arrow { color: var(--text-faint); }
.sd-there { color: var(--text-dim); }

/* ---------------------------------------------------------- practice mark */

/* THE LOGO IN THE RAIL. Height-constrained rather than width-constrained,
   because a practice mark may be a wide wordmark or a square badge and only
   the height is shared between those two. `object-fit: contain` keeps whatever
   aspect it arrived with; the upload has already cropped the margin off, so
   the mark fills the box it is given. */
.brand-logo { margin: 6px 0 2px; }
.brand-logo img {
  display: block;
  max-width: 100%;
  max-height: 34px;
  object-fit: contain;
  object-position: left center;
}
/* A LIGHT PLATE, for a mark drawn in dark ink for letterhead. Padded, because
   a logo flush to the edge of its own background reads as a crop rather than
   as a plate. */
.brand-logo.plated {
  background: #FFFFFF;
  border-radius: 5px;
  padding: 5px 7px;
  display: inline-block;
}
.rail.collapsed .brand-logo { display: none; }

/* THE PRODUCT'S MARK IN THE SIDEBAR, for a practice without its own (see
   wearBranding). On a white plate in both themes, because its type is navy
   and drawn for a light page -- the same arrangement a practice's dark mark
   gets from .brand-logo.plated above. */
.brand-orstrata {
  display: block; width: auto; max-width: 100%; height: auto; max-height: 40px;
  background: #FFFFFF; border-radius: 5px; padding: 4px 6px; margin: 4px 0 2px;
  object-fit: contain; object-position: left center;
}
.brand-orstrata[hidden], #brandText[hidden] { display: none; }

/* THE PRACTICE NAMED IN WORDS when it has no logo (wearBranding), at the top
   of the sidebar and of the phone's strip, where the product's mark used to
   stand. */
.brand-name { display: block; font-weight: 700; font-size: var(--fs-title); letter-spacing: .02em; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-name[hidden] { display: none; }

/* THE PRODUCT'S MARK AT THE FOOT OF EVERY PAGE (productFoot in app.js),
   centred after the content. On the same white plate the sidebar mark had,
   because its type is navy and drawn for a light page. */
.product-foot { display: flex; justify-content: center; padding: 28px 0 16px; }
/* 32px, up from 22 (Chris, 30 Oct 2026: "needs to be a little larger"). */
.product-foot img { width: auto; height: 32px; background: #FFFFFF; border-radius: 5px; padding: 4px 8px;
  opacity: .9; }
.rail.collapsed .brand-orstrata { display: none; }

/* ------------------------------------------------- the practice panel */

.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.field { display: flex; flex-direction: column; gap: 4px; }
.field-label {
  font-family: 'IBM Plex Sans Condensed', sans-serif;
  font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-dim);
}
.brand-logo-row {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start;
  margin-top: 10px;
}
.plate-choice { display: flex; gap: 14px; flex-wrap: wrap; }
.plate-opt {
  display: flex; flex-direction: column; gap: 5px; align-items: flex-start;
  cursor: pointer;
}
/* BOTH BACKGROUNDS AT THE SIZE THEY WILL BE SEEN. A swatch smaller than the
   header would answer a different question than the one being asked. */
.logo-prev {
  display: flex; align-items: center; justify-content: flex-start;
  min-width: 168px; min-height: 48px; padding: 6px 8px;
  border: 1px solid var(--line); border-radius: 6px;
}
.logo-prev-img { max-width: 152px; max-height: 34px; object-fit: contain; }

/* The practice's mark on the sign-in card, in place of the product wordmark:
   somebody signing in is looking for their practice, not for us. */
.signin-mark { margin: 0 0 10px; }
.signin-mark img { display: block; max-width: 230px; max-height: 56px; object-fit: contain; }
.signin-mark.plated {
  background: #FFFFFF; border-radius: 6px; padding: 8px 10px; display: inline-block;
}
.signin-mark img.orstrata-top { max-width: 260px; max-height: 72px; margin: 0 auto; }
/* Ours, under a practice's own mark: bottom centre and a step smaller, which
   is the order Chris set on 27 Oct 2026 -- the practice first. */
.signin-orstrata { display: flex; justify-content: center; margin-top: 8px; }
.signin-orstrata .plate { background: #FFFFFF; border-radius: 6px; padding: 6px 8px; }
.signin-orstrata img { display: block; max-width: 170px; max-height: 44px; object-fit: contain; }

/* ------------------------------------------------- a build, in sentences */

/* The plain-English build report. A list, because Chris's note on the old
   one-line version was that it read as nonsense: the eye needs somewhere to
   stop between "what is left" and "why it stopped". */
.build-story { margin: 8px 0 2px; }
.build-head { margin: 0 0 6px; font-size: var(--fs-ui); font-weight: 600; }
.build-bands { margin: 0 0 6px; padding-left: 18px; }
.build-bands li { font-size: var(--fs-sm); line-height: 1.5; color: var(--text); margin: 2px 0; }
/* HOW THE SOLVER GOT ITS ANSWER (pins dropped, relaxed fallback), on the
   build's own row. The banner tokens already carry both themes (info: SpO2
   cyan, warn: PA amber, each with its own light value) and the text is the
   ordinary --text on them, so nothing here is a colour of its own. Full row
   width and wrapping, so a 360px phone reads a paragraph, not a clip. */
.build-notice { flex: 1 1 100%; margin: 4px 0 2px; padding: 8px 12px;
  font-size: var(--fs-sm); line-height: 1.5; overflow-wrap: anywhere; }
/* The solver's own log, folded away. Still one click from anybody who needs
   the cost totals and the round counts -- which is why it was there. */
.build-raw > summary {
  cursor: pointer; font-size: var(--fs-xs); color: var(--text-dim);
  font-family: 'IBM Plex Sans Condensed', sans-serif;
  letter-spacing: .05em; text-transform: uppercase;
}
.build-raw[open] > summary { margin-bottom: 4px; }
.build-raw .build-log { white-space: pre-wrap; word-break: break-word; }

/* =========================================================== ONE CALENDAR
   web/calendar.js, used by the Trades board and by the request screen.

   Chris, 24 Oct 2026: "build the new calendar ux once to prevent drift."
   These rules replace `.tcal-*` and `.rcal-*`, which were the same layout
   written and styled twice -- a title with two arrows, a weekday row, leading
   pads, a grid -- and had already drifted: the trade board carried its own
   copies of monthName and monthStep a few lines from the shared ones the
   request calendar used.

   THE TABS ARE THE CHANGE, not the grid. Two arrows make a partner looking for
   next March press `>` five times and count; a column of months lets them
   press March. They run as far as the screen's own window does -- the request
   window at one, the months actually held at the other -- so the strip never
   offers a month that would come back empty.

   THE CELL IS NOT STYLED HERE BEYOND ITS BOX, because the two screens put
   different things in it: one is a single tappable number carrying four
   states, the other a number plus a button per shift. Both are below, named
   for what they are rather than for which screen they belong to.

   FOUR STATES ON A REQUEST DAY, and three of them are refusals a partner must
   tell apart at a glance, because the fix differs for each:

     on       chosen, and about to be asked for
     shut     a block being built -- it reopens on its own when that publishes
     held     already confirmed -- open it from My schedule to change it
     waiting  on the waitlist -- cancellable at any time, at no cost
     off      in the past, which nothing can change

   Every value is a token, so both themes hold. An rgba() literal for the
   chosen state would be a glowing wash on one and a smudge on the other. */
.cal {
  display: flex; align-items: stretch; gap: 0;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
}
.cal-main { flex: 1 1 auto; min-width: 0; }
.cal-head {
  display: flex; align-items: center; justify-content: center;
  padding: 7px 8px; background: var(--panel-2);
  border-bottom: 1px solid var(--line-soft);
}
.cal-title { font-weight: 600; font-size: var(--fs-ui); letter-spacing: .01em; }
.cal-dow, .cal-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
}
.cal-dow {
  background: var(--panel-2); border-bottom: 1px solid var(--line-soft);
  font-family: 'IBM Plex Sans Condensed', sans-serif;
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint);
}
.cal-dow span { padding: 4px 6px; text-align: center; }
.cal-day, .cal-pad, .cal-day-box {
  min-height: 46px; border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 3px 4px; box-sizing: border-box;
}
/* ONE CALENDAR LOOK. Chris, 31 Oct 2026, from the design audit: "two
   calendars" among the duplicates to merge first. The request and trade
   calendars (.cal-*) now wear My schedule's month board (.calb-*): a pad at
   the board's opacity, a weekend washed the same, the same hover and focus,
   and -- the visible fault -- a day <button> with the UA's border cleared.
   Only .cal-day's right and bottom borders were set, so the browser kept
   its own 2px outset bevel on the top and left of thirty buttons a month. */
.cal-pad { background: var(--panel-2); opacity: .5; }

/* --------------------------------------------- the months, down the side */
.cal-tabs {
  display: flex; flex-direction: column; flex: 0 0 auto;
  border-left: 1px solid var(--line); background: var(--panel-2);
  overflow-y: auto; max-height: 420px; scrollbar-width: thin;
}
.cal-tab {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 46px; padding: 7px 6px;
  background: none; border: 0; border-bottom: 1px solid var(--line-soft);
  color: var(--text-dim); cursor: pointer;
  font-family: 'IBM Plex Sans Condensed', sans-serif;
  font-size: var(--fs-xs); letter-spacing: .07em;
}
.cal-tab:hover { background: var(--panel-3); color: var(--text); }
.cal-tab:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.cal-tab.on {
  background: var(--panel); color: var(--text); font-weight: 600;
  box-shadow: inset 2px 0 0 var(--brand);
}
/* The year is printed only on the tab that STARTS one. A nine-month window
   crosses a year at most once, so one marker says where and the rest stay
   readable in a 46px column. */
.cal-tab-y { font-size: 9px; color: var(--text-faint); letter-spacing: .04em; }
/* The month, on the tab that names it. Written since #458 and defined
   nowhere, so the abbreviation inherited .cal-tab's 10.5px and the year
   beneath it sat at 9px with no deliberate step between them. One rule, and
   the pair now reads as a heading over a marker. */
.cal-tab-m { font-size: var(--fs-xs); font-weight: 600; }

/* ------------------------------------------------- the nineteen, 24 Oct 2026
 *
 * a-class-nobody-styled-test found nineteen class names written on nodes in
 * web/ and defined in no stylesheet the page loads. An undefined class is the
 * same fault as #462's undefined custom properties one level up: nothing
 * errors, nothing logs, and the screen looks deliberate.
 *
 * Chris asked for all nineteen. SOME GET A RULE AND SOME GET DELETED, which is
 * the part worth saying: a name whose intent is plain gets the rule it was
 * reaching for, and a name that meant nothing beyond its base class is removed
 * from the node instead. Inventing an appearance for a modifier nobody can
 * read the purpose of would be putting a guess on a screen; taking the dead
 * name off is honest and leaves the markup saying what it does.
 *
 * Removed at the call site rather than defined here: `.in` (inputs and selects
 * are already styled by element selector and all four sites set width inline),
 * `.paytable` and `.unpriced` and `.unlinked` (bare modifiers on .grid, .bars
 * and .updates with nothing to add), `.restore-only` (a wrapper whose layout
 * .chk now carries), and `.tbl` (which became .data, the table class every
 * other table in that file already uses). */

/* Secondary text on the document shelf -- twenty-nine of the nineteen's uses.
   The class form of #462's `--muted`, mapped to the same token that fix chose. */
.muted { color: var(--text-dim); }

/* SMALLER TEXT, which fifty nodes already assumed existed. `.small` was
   defined only as `.btn.small`, so `class: 'muted small'` on a div -- thirty-
   four times in documents.js alone, sixteen more in app.js -- set a colour and
   nothing else. The same fault as the nineteen, found by asking whether a
   SELECTOR CAN MATCH rather than whether the name appears somewhere.

   The value is `.btn.small`'s own, so a small button is unchanged: that rule
   is more specific and sets the same size. */
.small { font-size: var(--fs-xs); }

/* A horizontal flex row. Every use adds its own gap and wrapping inline, so
   this is only the axis and the alignment they all assumed. */
.row { display: flex; align-items: center; }

/* A SCROLL CONTAINER FOR A WIDE TABLE ON A NARROW SCREEN, which is what these
   two tables have been missing. `.grid-wrap` is the defined rule doing this
   job a few hundred lines above, and is NOT reused: it carries `height: 100%`
   for a pane that fills its parent, and these two sit in ordinary page flow
   where that would collapse them. Horizontal only -- a table that scrolls
   vertically inside the page is harder to read than one the page scrolls. */
.tablewrap { overflow-x: auto; }

/* A checkbox and its label on one line, reading as one target. */
.chk { display: flex; gap: 8px; align-items: center; cursor: pointer; }

/* The dictate button. `button` inherits the font and nothing else, so this was
   a browser-default button beside the styled fields it belongs to. Sized to
   the input row it sits in. */
.mic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex: 0 0 auto;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--text-dim); cursor: pointer;
}
.mic:hover { color: var(--text); border-color: var(--brand); }
.mic:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
/* Recording. `aria-pressed` is already set by dictate.js, so the state is read
   off the attribute rather than a second class that could disagree with it. */
.mic[aria-pressed="true"] { color: var(--art); border-color: var(--art); }

/* Dim prose under a control. rules.html defines its own `.note` for the Rule
   Builder; this is the same intent for the app, in the units this sheet uses. */
.note { color: var(--text-faint); font-size: var(--fs-sm); line-height: 1.55; }

/* The migrations that failed because they had already been applied -- an
   expected outcome folded away, so it should not read as loudly as a real
   failure beside it. */
.upd-expected { color: var(--text-dim); font-size: var(--fs-sm); }
.upd-expected summary { cursor: pointer; }

/* TWO KINDS OF CHIP THAT DREW IDENTICALLY. `.rid` has seven defined modifiers
   -- .off, .code, .none and four .v-* -- and these two were not among them, so
   a config path and a solver term were tinted the same as a plain id on the
   Rules screen. Distinct now, and from the palette the siblings use rather
   than from new colours. */
.rid.cfg { color: var(--spo2); border-color: var(--spo2); }
.rid.solver { color: var(--accent-ink); border-color: var(--brand); }

/* ------------------------------------------- a day you pick, on a request */
.cal-day {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px;
  appearance: none; -webkit-appearance: none; margin: 0;
  border-top: 0; border-left: 0;
  background: none; color: var(--text); cursor: pointer;
  font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-sm);
}
.cal-day:hover:not(:disabled) { background: var(--panel-3); }
.cal-day:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.cal-day.on { background: var(--spo2); color: var(--ink); font-weight: 600; }
.cal-day.shut { background: var(--pa-dim); color: var(--pa); cursor: default; }
.cal-day.held { background: var(--ecg-dim); color: var(--accent-ink); cursor: default; }
/* WAITING IS NOT HELD, and drawing them alike was hiding the difference that
   matters: a confirmed day is yours, a waitlisted one is a place in a queue
   you may leave at any time without penalty. */
.cal-day.waiting { background: var(--panel-3); color: var(--text-dim); cursor: default; }
/* READ DAILY, READ AT 11. Chris, 31 Oct 2026, on the sub-11px labels the
   type scale left pending: "Raise the daily-read ones to 11px". A partner's
   own day -- which shift, what they hold there, how many spots are open --
   is read every day, so the tag, the shift chip and the figures below are
   --fs-xs; "+N" (a count that says "tap for more") stays a secondary 8.5px.
   They fit a seventh of a 390px phone by layout, not by shrinking back: the
   tag wraps at its space and tracks tighter, the shift chip takes two lines
   (below), the figures wrap the waitlist under the spots. */
.cal-day-tag {
  font-family: 'IBM Plex Sans Condensed', sans-serif;
  font-size: var(--fs-xs); letter-spacing: .02em; text-transform: uppercase;
  line-height: 1.15; text-align: center; max-width: 100%;
}
.cal-day.off:not(.shut):not(.held):not(.waiting) {
  color: var(--text-faint); cursor: default; background: var(--panel-2);
}
/* PAST, TODAY AND AHEAD ON THE REQUEST CALENDAR (task #22). A shift is a
   small chip in its kind's colour, the same palette as My schedule; a request
   shades the whole day, so the two never read as one another. Past days stay
   closed to requests but keep their shift at full contrast: what was worked
   is the point of looking back. Today is ringed, as on My schedule. */
.cal-day-shift {
  display: block; max-width: 100%; padding: 0 3px; border-radius: 3px;
  color: var(--calb-ink);
  background-color: var(--panel);
  background-image: linear-gradient(var(--calb-wash), var(--calb-wash));
  font-family: 'IBM Plex Sans Condensed', sans-serif;
  font-size: var(--fs-xs); line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* TWO LINES, NOT HALF A WORD. At 11px "Post Night" is wider than a seventh
   of a phone, and nowrap cut it to "Pos…" -- on a calendar where a tap picks
   the day rather than opening it, so the title is no help to a thumb. It
   wraps at its space and stops at two lines; a name longer than that still
   ends in an ellipsis inside the cell instead of leaving it. */
@supports (-webkit-line-clamp: 2) {
  .cal-day-shift {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    white-space: normal; overflow-wrap: anywhere; text-align: center;
  }
}
.cal-day-more { font-size: 8.5px; color: var(--text-dim); }
.cal-day.has-shift { justify-content: flex-start; }
.cal-day.past .cal-day-n { color: var(--text-faint); }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--brand); }
.cal-day.today .cal-day-n { color: var(--text); font-weight: 700; }

/* CHRIS'S FOUR ANSWERS ON #617, 31 Oct 2026. Kept apart from #617's rules
   above, so a change to their sizes and this block never touch.
   - "Show pinned, marked": the partner's own pin in a block still being
     built is a chip with a dashed edge and no wash -- the trade calendar's
     .cal-shift.pinned look -- so it never reads as a published shift. The
     ink stays the kind's at full contrast; only the fill goes.
   - "Show a small dot": a past day Logs flags carries a dot in its top
     corner, drawn by a 24px button laid over the day (the day's own button
     is disabled in the past and cannot hold another).
   - "Add a 'Past' tab": a tab above the month column, outside the list of
     months you can request, ruled off from it. */
.cal-day-shift.pinned {
  background: transparent; border: 1px dashed var(--calb-ink); padding: 0 2px;
}
.cal-day-flagged { position: relative; display: grid; min-width: 0; }
.cal-day-flagged > .cal-day { min-width: 0; }
.cal-day-flag {
  position: absolute; top: 0; right: 0; width: 24px; height: 24px;
  margin: 0; padding: 0; border: 0; border-radius: 0;
  appearance: none; -webkit-appearance: none;
  background: none; cursor: pointer;
}
.cal-day-flag::after {
  content: ''; position: absolute; top: 5px; right: 5px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--warn); box-shadow: 0 0 0 1.5px var(--panel);
}
.cal-day-flag:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.cal-side {
  display: flex; flex-direction: column; flex: 0 0 auto; min-width: 0;
  border-left: 1px solid var(--line); background: var(--panel-2);
}
.cal-side > .cal-tabs { border-left: 0; flex: 1 1 auto; min-height: 0; }
.cal-tab.cal-tab-past { border-bottom: 1px solid var(--line); min-height: 24px; }
.cal-tab-past .cal-tab-m { text-transform: uppercase; letter-spacing: .02em; }
.cal-reading { color: var(--text-dim); }

/* ------------------------------------ a day holding shifts, on the board */
.cal-day-box { display: block; }
.cal-day-n { font-size: var(--fs-xs); color: var(--text-dim); display: block; }
.cal-day-box.has .cal-day-n { color: var(--text); font-weight: 600; }
/* A SHIFT ON THE OFFER CALENDAR WEARS ITS KIND, like a chip on My schedule.
   Chris, 28 Oct 2026: "The trades calendar needs to display the actual shift
   assignments similar to the personal schedule calendar (though font color
   needs to be more legible)". web/market.js gives every pill a `.calb-<kind>`
   class from the same kindOfTask the month board uses, which sets
   --calb-ink and --calb-wash; this draws them the way `.calb-chip` does --
   the wash composited over --panel, so the ink is measured against a known
   surface and not against whatever the cell under it happens to be. It was
   one flat grey for every shift, which is part of why a call and a tier on
   the same day were indistinguishable. */
.cal-shift {
  display: block; width: 100%; margin-top: 2px; padding: 3px 4px;
  border: 1px solid var(--line-soft); border-radius: 4px;
  color: var(--calb-ink);
  background-color: var(--panel);
  background-image: linear-gradient(var(--calb-wash), var(--calb-wash));
  font-size: 10px; line-height: 1.2; text-align: left; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* A PINNED SHIFT IN A BLOCK THAT IS STILL BEING BUILT. It is theirs and it is
   drawn, and it cannot be offered -- so it must not look like the toggles
   beside it. Dashed and dimmed, with the default cursor, and the title on the
   element says why. Not `opacity`: that would fade the text past the contrast
   the rest of this stylesheet holds to, and a shift somebody cannot read is
   worse than one they cannot click. */
.cal-shift.pinned {
  cursor: default; border-style: dashed; color: var(--text-dim);
  background: transparent;
}
.cal-shift.pinned:hover { border-color: var(--line-soft); }
.cal-shift:hover { border-color: var(--brand); }
.cal-shift:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.cal-shift.on {
  /* --accent-fill, NOT THE BRAND, FOR THE FILL. Until 28 Oct 2026 this was
     --ecg, the token the practice accent used to override inline, so a
     selected pill was white on #4ADE80 on the light palette -- 1.74:1, and
     the one state on this calendar that has to be unmistakable. #541 moved it
     to --focus, the theme's own green; it is --accent-fill now, which is the
     practice's green moved just far enough that --on-accent clears 4.5:1 on
     it (MWA in light: white on #198842, 4.52:1; in dark the brand itself,
     near-black on #4ADE80, 10.87:1) -- Chris, the same day: "fills where it
     reads well". Unbranded it is the theme's green exactly as before. A
     solid fill against the kind washes either side of it, plus the weight
     below, is what makes selected read as a STATE and not as a sixth kind. */
  background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent);
  /* 700, not 600: colour is not the only signal a selection leaves, which is
     the rule the grid's severity tags follow for the same reason -- a
     selection that survives only in hue is lost to a screenshot, a monochrome
     printout, and a reader who cannot separate those two colours. */
  font-weight: 700;
}

/* ------------------------------------------------- what sits underneath it */
.cal-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 7px 9px; background: var(--panel-2);
}
.cal-count { font-size: var(--fs-xs); color: var(--text-dim); flex: 1 1 auto; }

/* The figures Chris asked for on a request day: how many spots are open of
   how many the date holds, and how many are already waiting for it. A date
   with two left and nine waiting is a different request from an empty one,
   and nothing on the old calendar said which it was. */
.cal-n { display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
         column-gap: 3px; row-gap: 0; max-width: 100%; line-height: 1.2;
         font-size: var(--fs-xs); font-family: 'IBM Plex Sans Condensed', sans-serif; }
.cal-n-spots { color: var(--accent-ink); }
.cal-n-spots.none { color: var(--art); }
.cal-n-wait { color: var(--text-faint); }
.cal-n-wait::before { content: '\2691'; margin-right: 1px; }

@media (max-width: 700px) {
  /* THE SHORT NAME, NOT A DOT. This was `font-size: 0` and a bullet, on the
     reasoning that "the task name will not fit in a seventh of a phone, so
     the chip becomes a dot of colour and the title carries the name". There
     was no colour, and a phone has no hover to show a title -- so a partner
     choosing which shift to give away was choosing between identical dots.
     Chris, 28 Oct 2026: "The trades calendar needs to display the actual
     shift assignments similar to the personal schedule calendar".

     So the same answer My schedule gives at this width: the `.calb-short`
     label ("T3", "3rd", "Night") replaces `.calb-long` -- the swap is the
     month board's own rule further down this sheet, which is why the pill
     carries both spans -- at the month board's 9.5px.

     IT WRAPS RATHER THAN ELLIPSISING. My schedule's chip can truncate,
     because a tap opens the day sheet with the full name in it; here the
     tap SELECTS, so "Post Ni…" would be a shift somebody has to give away
     without having read it. Two short lines in a 45px cell read; half a
     word does not. The aria-label carries the whole task regardless. */
  .cal-day, .cal-pad, .cal-day-box { min-height: 38px; }
  .cal-shift {
    font-size: 9.5px; line-height: 1.15; padding: 2px 2px; text-align: center;
    white-space: normal; overflow-wrap: anywhere;
  }
  /* The month column narrows rather than wrapping under the grid: a tab strip
     below a calendar reads as a second calendar. */
  .cal-tab { min-width: 38px; padding: 6px 3px; font-size: 9.5px; }
}

/* ======================================================= the month board
 *
 * Chris, 25 Oct 2026, on the schedule as rows of tiles: "these large
 * rows/tiles of data are bulky, users are accustomed to viewing very smooth
 * calendars in iCal or Google Calendars that have complex data reflected ...
 * Utilize the full viewable screen (PC and mobile with different default
 * views)." Then, shown the mock: "yes to block boundaries and spanning bars
 * for multi-day runs."
 *
 * TWO THINGS HERE ARE LOAD-BEARING RATHER THAN DECORATIVE.
 *
 * THE WEEK ROWS STRETCH. `.calb` takes a height from the viewport and each
 * `.calb-wk` is `flex: 1 1 0`, so a taller screen shows more of each DAY
 * rather than more empty page below the grid. That is the whole of "utilize
 * the full viewable screen", and it is why this is a flex column of weeks and
 * not `display: grid` with seven columns: a grid of independent cells cannot
 * carry a bar across three of them.
 *
 * A CHIP COMPOSITES OVER --panel, NOT OVER THE CELL. `background-color:
 * var(--panel)` under the wash is what makes the ink measurable: on a weekend
 * cell the wash would otherwise stack on --wknd-wash, and every kind drops
 * under its 7:1 floor there (call to 6.0 in light). Over --panel the five
 * kinds -- call, tier, OB, away, post -- measure 7.23, 7.29, 7.32, 7.29 and
 * 7.35 in light, and 7.10, 7.26, 7.24, 7.81 and 7.12 in dark. Remove the
 * background-color and call duty fades on exactly the days a partner most
 * wants to check.
 *
 * THOSE WERE 4.69, 5.00, 6.11, 5.00, 5.24 / 7.10, 6.32, 5.75, 7.81, 5.38 on
 * paper until 28 Oct 2026 -- and the light call figure was never what a phone
 * drew. The ink was --ecg, which the practice accent overrides inline, so
 * production painted call duty at 1.52:1. Chris: "font color needs to be
 * more legible". --call-ink and its four siblings are why it now is.
 *
 * AND --text-faint DOES NOT LAND ON A BAND DAY. It is 4.19:1 on the weekend
 * wash by deliberate design -- see the token comments -- so the hours in a
 * weekend cell step up to --text-dim, which is the same step-up the grid's
 * band days make.
 */
.calb {
  --calb-gut: 40px;         /* where Google prints a week number */
  --calb-lane-h: 19px;      /* one bar, and the room one bar needs */
  display: flex; align-items: stretch;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-card); overflow: hidden;
}
.calb-main {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column;
}

.calb-dow {
  display: flex; flex: 0 0 auto;
  background: var(--panel-2); border-bottom: 1px solid var(--line-soft);
  font-family: 'IBM Plex Sans Condensed', sans-serif;
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint);
}
.calb-dow span { flex: 1 1 0; min-width: 0; padding: 5px 4px; text-align: center; }
.calb-wk {
  flex: 0 0 auto; min-height: 84px; display: flex;
  border-top: 1px solid var(--line-soft);
}
 /* `.calb-dow + .calb-wk`, NOT `.calb-wk:first-of-type`: the weekday header is
    a div as well, so :first-of-type matches IT and the first week would keep a
    border directly under the header's own. */
.calb-dow + .calb-wk { border-top: 0; }
.calb-gut {
  flex: 0 0 var(--calb-gut); display: flex; justify-content: center;
  align-items: flex-start; padding-top: 5px;
}
/* The block name, in the gutter of the week its first day falls in. Monospace
   so 'Q4' sits at the same width as any other block label.

   IN THE INK, NOT THE BRAND. This is a WORD at 10px (8.5px on a phone), and
   it was #4ADE80 on the light panel -- about 1.5:1 -- on every phone Chris
   looked at. The green line beside it (`.calb-day.edge`) is a mark and keeps
   the brand; the label beside the mark is text and takes --accent-ink. */
.calb-blk {
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 500;
  letter-spacing: .04em; color: var(--accent-ink);
}
/* --lanes IS DECLARED HERE AND OVERRIDDEN INLINE, per week, by the renderer.
   Declared rather than left to a var() fallback for two reasons: a week whose
   inline style never arrives still lays out, and both-themes-reachable-test
   requires every var() in this sheet to name a property the sheet defines --
   a rule it has, because an undefined custom property applies nothing at all
   and says nothing about it. The same goes for the bar's three below. */
.calb-days {
  --lanes: 0;
  position: relative; flex: 1 1 auto; min-width: 0; display: flex;
}

.calb-day, .calb-pad {
  flex: 1 1 0; min-width: 0; box-sizing: border-box;
  display: flex; flex-direction: column; overflow: hidden;
  /* A DAY IS A <button> when the view gives it an action, so the UA's own
     border, padding and font have to be cleared before the cell's own are
     set -- the same reason .cal-day does it. -webkit-appearance for iOS,
     which otherwise draws its own rounded button behind all of this. */
  appearance: none; -webkit-appearance: none;
  border: 0; border-left: 1px solid var(--line-soft);
  margin: 0; padding: 0; text-align: left;
  font: inherit; color: inherit; background: none;
}
.calb-days > :first-child { border-left: 0; }
/* A PAD IS NOT A DAY. monthCells returns leading blanks rather than the
   previous month's dates for exactly this reason: a cell nobody may press
   must not look like one of the thirty-one that follow. */
.calb-pad { background: var(--panel-2); opacity: .5; }
.calb-day { cursor: pointer; }
.calb-day.wknd { background: var(--wknd-wash); }
.calb-day:hover { background: var(--panel-3); }
.calb-day:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
/* WHERE A BLOCK OPENS, which can be any weekday: Q4 2026 starts on Monday
   5 October. Two pixels of accent on the cell's own left edge, so the line
   runs the full height of the week rather than sitting inside the day. */
.calb-day.edge { border-left: 2px solid var(--brand); }

.calb-top { display: flex; align-items: center; gap: 4px; padding: 3px 5px 2px; }
.calb-n {
  font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-xs); color: var(--text-dim);
}
.calb-day.today .calb-n {
  min-width: 19px; height: 19px; border-radius: var(--radius-pill);
  background: var(--accent-fill); color: var(--on-accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 500;
}
/* HOURS CLOCKED, and nothing at all on a day with no punch -- a zero reads as
   a day worked for no hours rather than as a day not yet entered. */
.calb-h {
  margin-left: auto;
  font-family: 'IBM Plex Mono', monospace; font-size: 9.5px; color: var(--text-faint);
}
.calb-day.wknd .calb-h, .calb-day.wknd .calb-n { color: var(--text-dim); }
/* TODAY BEATS THE WEEKEND. The rule above has the same specificity as
 * `.calb-day.today .calb-n` and comes later, so on a Saturday or Sunday it
 * repainted today's number --text-dim on the accent disc: 1.61:1 light,
 * 1.04:1 dark (the design audit, 31 Oct 2026). Naming both outranks it. */
.calb-day.today.wknd .calb-n { color: var(--on-accent); }
/* The room the week's bars occupy, reserved inside every day of it so the
   chips below start under the lowest bar rather than behind it. */
.calb-lane { flex: 0 0 calc(var(--lanes, 0) * var(--calb-lane-h)); }
.calb-body {
  display: flex; flex-direction: column; gap: 2px;
  padding: 0 4px 4px; min-height: 0;
}

.calb-chip {
  display: block; padding: 1px 6px; border-radius: var(--radius-sm);
  font-size: var(--fs-xs); line-height: 1.45;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* A RUN IS ONE BAR LAID OVER THE WEEK. --from and --span are columns, so the
   geometry is the seventh the grid itself uses; the insets are custom
   properties because an edge where the run CONTINUES has none -- that is what
   makes a Saturday-into-Sunday vacation read as one booking cut in two rather
   than as two bookings. */
.calb-bar {
  --from: 0;
  --span: 1;
  --lane: 0;
  --calb-in-l: 3px;
  --calb-in-r: 3px;
  position: absolute; box-sizing: border-box;
  left: calc(var(--from) * (100% / 7) + var(--calb-in-l));
  width: calc(var(--span) * (100% / 7) - var(--calb-in-l) - var(--calb-in-r));
  top: calc(22px + var(--lane) * var(--calb-lane-h));
  height: 17px; line-height: 17px; padding: 0 7px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.calb-bar.open-l {
  --calb-in-l: 0px;
  border-top-left-radius: 0; border-bottom-left-radius: 0;
}
.calb-bar.open-r {
  --calb-in-r: 0px;
  border-top-right-radius: 0; border-bottom-right-radius: 0;
}

/* THE FIVE KINDS, AND NO RED AMONG THEM. --art is the violation colour on
   every other screen; a calendar where ordinary call duty is red is one where
   a real conflict has nothing left to say. shared/shift-kinds.js makes the
   same argument where the mapping is decided. */
/* THE INK IS THE KIND'S OWN TOKEN, NOT THE PALETTE COLOUR, since 28 Oct
   2026 -- see --call-ink in the light block. The WASH is still the palette's
   -dim, which is a literal per theme and so was never what the practice
   accent reached; only the text was. */
.calb-call { --calb-ink: var(--call-ink); --calb-wash: var(--ecg-dim); }
.calb-tier { --calb-ink: var(--tier-ink); --calb-wash: var(--spo2-dim); }
.calb-ob   { --calb-ink: var(--ob-ink);   --calb-wash: var(--agent-dim); }
.calb-away { --calb-ink: var(--away-ink); --calb-wash: var(--pa-dim); }
.calb-post { --calb-ink: var(--post-ink); --calb-wash: var(--panel-3); }
.calb-chip, .calb-bar {
  color: var(--calb-ink);
  background-color: var(--panel);
  background-image: linear-gradient(var(--calb-wash), var(--calb-wash));
}

/* Both labels are in the DOM and CSS picks one: see chipText in
   web/calendar.js for why it is a media query and not a resize handler. */
.calb-short { display: none; }

.calb-legend {
  display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 7px 10px; background: var(--panel-2);
  border-top: 1px solid var(--line-soft);
  font-size: var(--fs-xs); color: var(--text-dim);
}
.calb-key { display: flex; align-items: center; gap: 5px; }
.calb-key.edge { margin-left: auto; }
.calb-sw {
  width: 10px; height: 10px; border-radius: var(--radius-sm); display: inline-block;
  background-color: var(--panel);
  background-image: linear-gradient(var(--calb-wash), var(--calb-wash));
  box-shadow: inset 0 0 0 1px var(--calb-ink);
}
.calb-sw-edge {
  width: 2px; height: 11px; background: var(--brand); display: inline-block;
}

/* THE WINDOW, LESS THE CHROME ABOVE IT: the topbar, the cards, the heading
   row and the legend. Only from the width where a seven-column month is
   readable at all -- below it the grid takes its natural height and the page
   scrolls, because a 300px-tall month on a phone is six rows of nothing.

   AND THE WEEKS ONLY STRETCH WHERE THERE IS SOMETHING TO STRETCH INTO. A
   `flex: 1 1 0` row in a container with no height resolves to its flex base
   of 0, clamped up to min-height -- so below 900px, where .calb has no
   height, equal rows would CLIP a third chip rather than growing for it. A
   clipped chip is a shift the partner cannot see, so outside this query the
   rows size to their content and the page scrolls. */
@media (min-width: 900px) {
  .calb { height: calc(100dvh - 300px); min-height: 480px; }
  .calb-wk { flex: 1 1 0; }
  /* The month tabs run the height of the board. .cal-tabs caps itself at
     420px for the picker, where the grid is short; here that clipped January
     off a board half as tall again. */
  .calb .cal-tabs { max-height: none; }
}

@media (max-width: 700px) {
  /* THE PHONE IS THE DEFAULT READER OF THIS SCREEN, and a seventh of 390px is
     48px. The long label is swapped for the caller's short one, the gutter
     narrows to the two characters a block name needs, and the grid keeps its
     natural height so the page scrolls rather than squeezing six weeks into a
     viewport that also holds a topbar. A tap opens the day sheet, which is
     where the full name, the hours and the actions already live. */
  /* --calb-lane-h 18px, not 15: the bar reads at --fs-xs now (Chris, 31 Oct
     2026, "Raise the daily-read ones to 11px"), 15px tall where it was 13,
     and the lane reserves 3px after it so the bar cannot sit on the day's
     first chip. */
  .calb { --calb-gut: 22px; --calb-lane-h: 18px; }
  .calb-long { display: none; }
  .calb-short { display: inline; }
  .calb-wk { min-height: 62px; }
  .calb-dow { font-size: 9px; letter-spacing: .04em; }
  .calb-dow span { padding: 4px 1px; }
  .calb-top { padding: 2px 3px 1px; }
  /* THE SHIFT NAME IN A DAY READS AT 11 (Chris, 31 Oct 2026: "Raise the
     daily-read ones to 11px"). It was 9.5px here. The chip already ellipsises
     and a tap opens the day sheet with the whole name, so a long short name
     ("Post Night") loses letters, not size. */
  .calb-chip { font-size: var(--fs-xs); padding: 1px 3px; line-height: 1.4; }
  .calb-body { padding: 0 2px 3px; }
  .calb-bar {
    --calb-in-l: 2px;
    --calb-in-r: 2px;
    top: calc(19px + var(--lane) * var(--calb-lane-h));
    height: 15px; line-height: 15px; padding: 0 4px; font-size: var(--fs-xs);
  }
  .calb-blk { font-size: 8.5px; }
  .calb-legend { gap: 8px; font-size: 10px; padding: 6px 8px; }
  .calb-key.edge { margin-left: 0; }
}

/* ------------------------------------------------- the idle lock overlay
 *
 * Chris, 22 Oct 2026: a session that goes quiet locks, and a fingerprint
 * reopens it. This is what a locked session looks like. web/unlock.js builds
 * it; the Worker's gate is what actually enforces the lock.
 *
 * BOTH THEMES, and the scrim is the reason this comment is here. Chris,
 * 21 Oct 2026: "Always create official dark and light modes." A scrim is a
 * theme colour like any other -- rgba(0,0,0,.6) over the dark theme is a
 * smudge that barely separates the card from the page, and over the light
 * theme it is a blackout. So it is a token, defined on bare :root first and
 * redefined for light, exactly as the palette rules require.
 */
:root {
  --lock-scrim: rgba(23, 38, 61, .42);
  --lock-card-shadow: 0 24px 64px rgba(23, 38, 61, .22);
}
/* Lighter AND bluer: a neutral black wash over the clinical light palette
   reads as a dead screen rather than as a dialog in front of a page.

   WRITTEN TWICE, UNDER BOTH SELECTORS, and that is not duplication for its own
   sake. `web/index.html` currently hard-codes data-theme="light", so an
   attribute selector alone works today -- but a sibling change
   (claude/both-themes-are-reachable) removes that attribute and makes light
   arrive from the OS query instead, guarded so an explicit choice still wins.
   With only the attribute form, this overlay would then draw a dark scrim and
   near-black text over a light page for every system-light reader: one theme's
   ink on the other theme's background, which is the exact failure the palette
   rules name. .signin-btn.solid is written both ways on that branch for the
   same reason, so this follows it rather than inventing a third shape. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --lock-scrim: rgba(4, 9, 18, .78);
    --lock-card-shadow: 0 24px 64px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  --lock-scrim: rgba(4, 9, 18, .78);
  --lock-card-shadow: 0 24px 64px rgba(0, 0, 0, .6);
}

/* THE CARD MOVED UP; THE SCRIM DID NOT MOVE AT ALL.
 *
 * Chris asked for "warnings like this" to go to the top, and was asked how far
 * that reached, because this one is not a toast: `inset: 0` plus the blur is
 * what keeps a schedule off an unattended screen, and a dismissible banner
 * would have left 255 partners' assignments readable to the room. He chose to
 * keep the scrim and move only the card, so the covering is untouched and
 * `align-items` is the whole change.
 *
 * It parks in the same lane as #toastHost, a hair below the ticker, so the two
 * things that interrupt you arrive in the same place rather than two.
 *
 * THE COVER IS OPAQUE. The first scrim was a 42% wash on the light theme, and
 * the schedule showed through it -- which is the screen this dialog exists to
 * keep off an unattended desk. web/unlock.js also takes those nodes out of the
 * document; this background is what anything appended while locked is drawn
 * on. --ink is the page ground, defined for both themes. */
.lock-overlay {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: calc(var(--ticker-h) + 10px) 16px 16px;   /* phone gutter; no x-scroll */
  /* Opaque page ground, with the blur kept: a translucent wash left names
   * readable on the light theme. The blur is what a later edit must not drop
   * (the-warnings-move-up-and-wait-test); the fill is what makes the blur
   * not a window. */
  background: var(--ink);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
html.session-locked,
html.session-locked body {
  overflow: hidden;
  background: var(--ink);
}
.lock-card {
  width: 100%; max-width: 380px; box-sizing: border-box;
  padding: 24px; border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--lock-card-shadow);
  text-align: center;
}
.lock-title {
  margin: 0 0 8px; color: var(--text);
  font: 600 var(--fs-lg)/1.2 'IBM Plex Sans', system-ui, sans-serif;
}
.lock-msg {
  margin: 0 0 18px; color: var(--text-dim);
  font: 400 var(--fs-title)/1.45 'IBM Plex Sans', system-ui, sans-serif;
  /* Reserved, so swapping "Unlock" for "Waiting for your fingerprint…" does
     not jump the button out from under a thumb already moving toward it. */
  min-height: 44px;
}
.lock-actions { display: flex; flex-direction: column; gap: 10px; }
.lock-btn {
  display: block; width: 100%; box-sizing: border-box;
  min-height: 48px;                   /* a thumb, not a cursor */
  padding: 12px 16px; border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text);
  font: 500 var(--fs-title)/1.2 'IBM Plex Sans', system-ui, sans-serif;
  text-decoration: none; cursor: pointer;
}
.lock-btn:hover { border-color: var(--text-faint); }
/* The same reasoning as .signin-btn.solid above, and the same resolution:
   --ecg is the DEEP green now that light is the default (5.10:1 on panel-2),
   and --on-accent is the pair that goes on top of it — white here, near-black
   on the dark theme's brighter green. The literal pair this rule carried
   existed only because --on-accent did not reach it. */
.lock-btn.solid {
  background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent);
  font-weight: 600;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lock-btn.solid {
    background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent);
  }
}
:root[data-theme="dark"] .lock-btn.solid {
  background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent);
}
.lock-btn.solid:hover { filter: brightness(1.08); }
.lock-btn:disabled { opacity: .6; cursor: default; filter: none; }
.lock-btn:focus-visible {
  outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--ecg-dim);
}
/* The step timings, only when ?timing=1 or localStorage orstrata.timing=1. A
   * diagnostic, so it is quiet: --text-faint on --panel is the same pair the
   * fine print beside it uses, and the floating copy that outlives the dialog
   * sits on --panel-2 with a hairline so it reads on either page ground. */
.lock-timing {
  margin: 10px 0 0; color: var(--text-faint);
  font: 400 var(--fs-sm)/1.4 'IBM Plex Mono', ui-monospace, monospace;
  word-break: break-word;
}
.lock-timing.floating {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 9001;
  margin: 0; padding: 8px 12px; border-radius: 8px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text-dim);
  pointer-events: none;
}
.lock-fine {
  margin: 16px 0 0; color: var(--text-faint);
  font: 400 var(--fs-sm)/1.4 'IBM Plex Sans', system-ui, sans-serif;
}

/* The registered devices on the Profile tab. A list, so it reads as one to a
   screen reader, with the marker and the indent taken off -- `class: 'plain'`
   was reached for first and does not exist in this file, which would have
   drawn bullets down the middle of a designed panel. */
.lock-devices { list-style: none; margin: 8px 0 14px; padding: 0; }
.lock-devices li {
  display: flex; gap: 12px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--line-soft);
}
.lock-devices li:last-child { border-bottom: 0; }
.lock-devices li > span:first-child { flex: 1; color: var(--text); }
.lock-devices li > span:nth-child(2) {
  color: var(--text-faint); font-size: var(--fs-sm); white-space: nowrap;
}
/* The row stacks on a phone rather than squeezing the Remove button off the
   edge -- 16px gutter, no horizontal scroll. */
@media (max-width: 420px) {
  .lock-devices li { flex-wrap: wrap; gap: 4px 12px; }
  .lock-devices li > span:first-child { flex: 1 0 100%; }
}

/* ================================================ partner credentials
 *
 * Chris, 4 Nov 2026 (ruling 24): a chair's or chief's list of everybody else's
 * credentials, with the person's name on every row. A list rather than a
 * table so the name never scrolls off a phone: the name takes its own line at
 * 390px and the Delete stays on screen. Tokens only, so both themes hold. */
.pcred-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.pcred-tools input[type=search] { flex: 1 1 180px; min-width: 0; max-width: 320px; }
.pcred-list { list-style: none; margin: 8px 0 14px; padding: 0; }
.pcred-list li {
  display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--line-soft); min-width: 0;
}
.pcred-list li:last-child { border-bottom: 0; }
.pcred-who { flex: 0 1 200px; min-width: 0; color: var(--text); font-weight: 600;
  overflow-wrap: anywhere; }
.pcred-what { flex: 1 1 160px; min-width: 0; color: var(--text); overflow-wrap: anywhere; }
.pcred-when { color: var(--text-dim); font-size: var(--fs-sm); }
@media (max-width: 420px) {
  .pcred-who { flex: 1 0 100%; }
}
/* A credential's History line (ruling 38): small, under the credential, on
 * its own line in the Partner list and inside the name cell of the table. */
.cred-hist { font-size: var(--fs-sm); color: var(--text-dim); overflow-wrap: anywhere;
  margin-top: 2px; }
.pcred-list li > .cred-hist { flex: 1 0 100%; margin-top: 0; }
.cred-hist-label { font-weight: 600; color: var(--text); }
.cred-hist-deleted { margin: 8px 0 14px; }
.cred-hist-deleted ul { list-style: none; margin: 4px 0 0; padding: 0; }
.cred-hist-deleted li { padding: 3px 0; border-bottom: 1px solid var(--line-soft); }
.cred-hist-deleted li:last-child { border-bottom: 0; }
/* On a partner's page below chair, the one line that stands where the
 * credential card would be (ruling 38). */
.pcred-below { margin-top: 14px; }

/* ======================================================= filling from a photo
 *
 * Chris, 22 Oct 2026, asked for the camera on the case log, and both themes are
 * official (21 Oct), so every colour below is a token defined on bare :root and
 * redefined for light — with ONE deliberate exception, the crop box, which is
 * explained where it is drawn.
 */
.capture .help { max-width: 68ch; }
.capture .help.bad { color: var(--art); }
.capture .help.warn { color: var(--warn); }

/* The stage is `position: relative` because the crop box is absolutely placed
   over the frozen frame, and `width: fit-content` so the box's coordinates and
   the canvas's are the same space — a stage wider than its canvas would let a
   drag start outside the image and land the crop somewhere it cannot be drawn. */
.capture-stage {
  position: relative; width: fit-content; max-width: 100%;
  margin: 10px 0; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--panel-3);
  overflow: hidden;
}
.capture-view {
  display: block; max-width: 100%; max-height: 52vh;
  /* `touch-action: none` or a drag across the frozen frame scrolls the dialog
     instead of drawing a box, which on a phone is the whole interaction. */
  touch-action: none; cursor: crosshair;
}

/* THE ONE PLACE A THEME TOKEN WOULD BE WRONG, and it is worth saying why
   rather than leaving it looking like an oversight.
   This box is drawn over a PHOTOGRAPH — an OR board under theatre lights, a
   wristband on a white sheet, an EMR screen that is mostly white or mostly
   dark. The pixels underneath belong to no theme, so a hairline in --line is
   invisible over half of all photographs, which on a control the partner must
   see to use is not a cosmetic failure. So: a light outline with a dark one
   outside it, which reads against anything, plus a scrim that dims everything
   outside the box so what is actually being sent is obvious at a glance. */
.capture-crop {
  position: absolute; pointer-events: none;
  outline: 2px solid #FFFFFF;
  border: 1px solid #0A0E17;
  box-shadow: 0 0 0 1px #FFFFFF inset, 0 0 0 9999px rgba(7, 11, 20, .55);
}

.capture-read:empty { display: none; }
.capture-read {
  margin-top: 10px; padding: 10px 12px; border-radius: var(--radius);
  background: var(--spo2-dim); border: 1px solid var(--spo2);
}
.capture-read .help { margin: 0 0 4px; }
.capture-read .help:last-child { margin-bottom: 0; }

/* A FIELD A PHOTOGRAPH FILLED, marked so a partner can tell what they are
   confirming from what they typed. Cyan rather than green: this is "read from
   somewhere, check it", not "good". */
.caselog .field.photo-filled > input,
.caselog .field.photo-filled > select {
  border-color: var(--spo2); background: var(--spo2-dim);
}
.from-photo {
  display: inline-block; margin-top: 4px;
  padding: 1px 7px; border-radius: 999px;
  font-size: var(--fs-xs); letter-spacing: .02em; text-transform: uppercase;
  /* The accent as INK on its own dim tint, which is this file's existing pair
     (.note-req does the same with --art) and is why no --on-accent token is
     needed here: both themes define --spo2 and --spo2-dim against their own
     surfaces, so neither ends up drawing one theme's text on the other's. */
  color: var(--spo2); background: var(--spo2-dim);
  border: 1px solid var(--spo2);
}

/* AND THE BARCODE BADGE IS GREEN, which is a different claim rather than a
   different decoration. A barcode is DECODED on the device -- the checksum
   validated or nothing came back -- so those characters are exact, and the
   photograph was never sent. A modelled reading is a best reading of some
   pixels. Cyan says "read from somewhere, check it"; green says "this is what
   the band says". Flattening the two into one badge would lose the stronger
   guarantee, which is the one a partner acts on differently. */
.from-photo.exact {
  color: var(--accent-ink); background: var(--ecg-dim); border-color: var(--brand);
}

@media (max-width: 700px) {
  /* The camera is the phone case, so the frame gets the room: a 52vh preview
     plus the dialog's own chrome leaves nothing for the crop to be drawn in. */
  .capture-view { max-height: 44vh; }
  .capture-stage { width: 100%; }
}

/* ------------------------------------------------ the shift log (web/shift-log.js) */
.slog { margin-top: 4px; }
.slog-bar { align-items: center; gap: 8px; margin: 4px 0 8px; }
.slog-sum { padding: 8px 10px; margin-bottom: 10px; }
.slog-codes { width: 100%; }
.slog-codes tfoot th { border-top: 1px solid var(--line-strong); }
.slog-days { display: flex; flex-direction: column; gap: 4px; }
.slog-day { border: 1px solid var(--line); border-radius: var(--day-r); background: var(--panel); }
.slog-day > summary {
  display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto 4.5rem auto; gap: 10px;
  align-items: center; padding: var(--day-pad); cursor: pointer; list-style: none;
}
.slog-day > summary::-webkit-details-marker { display: none; }
.slog-day > summary:hover { background: var(--panel-3); }
.slog-day[open] > summary { border-bottom: 1px solid var(--line-soft); }
.slog-date { display: flex; flex-direction: column; line-height: 1.1; }
.slog-date strong { font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-title); }
.slog-date span { font-size: var(--fs-xs); color: var(--text-faint); text-transform: uppercase; }
.slog-what { min-width: 0; display: flex; flex-direction: column; }
.slog-tasks { overflow-wrap: anywhere; }
.slog-clock { font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-sm); color: var(--text-faint); }
.slog-n { font-size: var(--fs-sm); color: var(--text-dim); white-space: nowrap; }
.slog-pts { font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-sm); text-align: right; white-space: nowrap; }
/* Edit day, at the end of the row. */
.slog-edit { white-space: nowrap; padding-left: 8px; padding-right: 8px; }
.slog-detail { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-ui); }
.slog-k { display: inline-block; min-width: 5.5rem; color: var(--text-faint); font-size: var(--fs-sm); }
.slog-codelist, .slog-cases { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.slog-codelist li, .slog-cases li { display: flex; justify-content: space-between; gap: 10px; }
.slog-codelist .num, .slog-cases .num { font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-sm); white-space: nowrap; }
@media (max-width: 520px) {
  .slog-day > summary { grid-template-columns: 2.6rem minmax(0, 1fr) 4rem auto; gap: 8px; }
  .slog-n { display: none; }
}

/* ------------------------------------------------ points by month (web/points-chart.js)
   ITS OWN THREE SLOTS, not the monitor palette: --ecg/--art/--pa mean live,
   destructive and caution in this app, and a pay chart in them would call
   productivity a danger. Blue, orange, aqua, in that fixed order, validated
   (dataviz validate_palette.js) against --panel in both modes: adjacent CVD
   separation 9.2 light, 9.4 dark. The light aqua is 2.82:1 on white, which is
   why the legend, the tooltip and the table view always carry the numbers. */
.pchart {
  --viz-1: #2a78d6; --viz-2: #eb6834; --viz-3: #1baf7a;
  padding: 10px 12px; margin: 10px 0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pchart { --viz-1: #3987e5; --viz-2: #d95926; --viz-3: #199e70; }
}
:root[data-theme="dark"] .pchart { --viz-1: #3987e5; --viz-2: #d95926; --viz-3: #199e70; }
.pchart-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pchart-title { margin: 0; flex: 1 1 auto; }
.pchart-scopes { display: flex; gap: 4px; }
.pchart-site { max-width: 8rem; }
.pchart-plot { position: relative; margin-top: 6px; min-height: 232px; }
.pchart-svg { display: block; overflow: visible; }
.pchart-svg path, .pchart-svg rect:not(.pchart-hit), .pchart-svg text { pointer-events: none; }
.pchart-grid { stroke: var(--line-soft); stroke-width: 1; }
.pchart-base { stroke: var(--line-strong); stroke-width: 1; }
.pchart-tick { fill: var(--text-faint); font-size: var(--fs-xs); }
.pchart-val { fill: var(--text); font-size: var(--fs-xs); font-weight: 600; }
.pchart-hit { fill: transparent; cursor: default; outline: none; }
.pchart-hit:hover, .pchart-hit:focus-visible { fill: var(--panel-3); }
.pchart-tip {
  position: absolute; top: 0; transform: translateX(-50%);
  min-width: 11rem; padding: 6px 8px; border-radius: 6px; pointer-events: none;
  background: var(--panel); border: 1px solid var(--line-strong); color: var(--text);
  font-size: var(--fs-sm); box-shadow: 0 2px 8px rgba(0,0,0,.12); z-index: 2;
}
.pchart-tip-row { display: flex; align-items: center; gap: 6px; }
.pchart-tip-row .num { margin-left: auto; font-variant-numeric: tabular-nums; }
.pchart-tip-total { border-top: 1px solid var(--line); margin-top: 3px; padding-top: 3px; font-weight: 600; }
.pchart-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; font-size: var(--fs-sm); color: var(--text-dim); }
.pchart-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.pchart-sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--text-faint); }
.pchart-sum { margin: 6px 0 0; }
.pchart-more { margin-top: 6px; }
.pchart-more > summary { cursor: pointer; font-size: var(--fs-sm); color: var(--text-dim); }
.pchart-table { margin-top: 6px; width: 100%; }

/* ------------------------------------------------ the case log by the day (web/case-day-list.js) */
.cdl { margin-top: 4px; }
.cdl-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 6px; }
.cdl-search { flex: 1 1 14rem; min-width: 0; }
.cdl-total { margin: 0 0 8px; }
.cdl-days { display: flex; flex-direction: column; gap: 10px; }
.cdl-day { border: 1px solid var(--line); border-radius: var(--day-r); background: var(--panel); overflow: hidden; }
.cdl-dayhead {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px;
  padding: var(--day-pad); background: var(--panel-2); border-bottom: var(--day-rule);
}
.cdl-sub { color: var(--text-dim); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.cdl-row {
  display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) auto auto; gap: 4px 10px;
  align-items: start; padding: var(--day-pad); border-top: var(--day-rule);
}
.cdl-dayhead + .cdl-row { border-top: 0; }
.cdl-row.has-issue { box-shadow: inset 3px 0 0 var(--warn); }
.cdl-when { font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-sm); color: var(--text-dim); padding-top: 1px; }
.cdl-what { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cdl-what > strong { overflow-wrap: anywhere; }
.cdl-meta { font-size: var(--fs-sm); color: var(--text-faint); overflow-wrap: anywhere; }
.cdl-issues { display: flex; flex-wrap: wrap; gap: 4px; }
.cdl-issue {
  font-size: var(--fs-xs); padding: 0 6px; border-radius: 999px;
  color: var(--text); background: var(--warn-soft); border: 1px solid var(--warn);
}
/* A hand-off's unconfirmed overlap (ruling 79): what it is, and the one
 * button that confirms it, under the case's name. */
.cdl-ovl { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.cdl-ovl > .help { margin: 0; }
.cdl-ovl-record { margin-top: 6px; }
.cdl-detail { font-size: var(--fs-sm); color: var(--text-dim); display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.cdl-pts { font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-sm); white-space: nowrap; padding-top: 1px; }
.cdl-acts { display: flex; gap: 2px; }
/* Reconciled or not (web/case-day-list.js reconMark): a reconciled case is
 * tinted and carries a filled mark; the rest a hollow one; a case the billing
 * disagrees with says so in the warning colour. */
.cdl-row.recon-yes { background: var(--ok-soft); }
.cdl-recon { font-size: var(--fs-xs); width: fit-content; padding: 0 6px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-faint); }
.cdl-recon.yes { color: var(--accent-ink); border-color: var(--accent-ink); font-weight: 600; }
.cdl-recon.differs { color: var(--warn); border-color: var(--warn); }
.cdl-recon.rec { color: var(--text-dim); }
.cdl-recon.done { background: var(--panel); }
.cdl-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.cdl-filters select.cdl-filter { width: auto; min-width: 0; max-width: 11rem; font-size: var(--fs-sm); padding: 3px 6px; }
/* Start/stop filters and Show voided (roadmap #13/#14). */
.cdl-time { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); color: var(--text-dim); }
.cdl-time input[data-time-entry] { width: auto; font-size: var(--fs-sm); padding: 3px 6px; }
.cdl-showvoid { font-size: var(--fs-sm); margin: 0; }
.cdl-time input[type=date] { width: auto; font-size: var(--fs-sm); padding: 3px 6px; }
.cdl-filter-note { margin: 0 0 6px; }
.cdl-filter-note-line { display: block; }
.cdl-voided-list { margin-top: 10px; }
.cdl-voided-head { margin: 8px 0 4px; font-size: var(--fs-ui); color: var(--text-dim); }
.cdl-row.cdl-voided { opacity: .72; }
.cdl-row.cdl-voided .cdl-what strong { text-decoration: line-through; }
/* A case's history in the editor (shared/case-history.js). */
.cl-history { display: grid; gap: 8px; }
.cl-hist-row { border-left: 2px solid var(--line); padding-left: 8px; }
.cl-hist-head { font-size: var(--fs-ui); }
.cl-hist-lines { margin: 2px 0 0; padding-left: 18px; font-size: var(--fs-sm); color: var(--text-dim); }
/* Other's note on a void: shown only once Other is picked. */
.cdl-void-note[hidden] { display: none; }
/* ON A PHONE THE TIMES STAY ON THE PROCEDURE'S LINE, to its left (Chris,
   3 Nov 2026: "the start-end times move to the first line, beside the
   procedure name"). They had a row of their own above it. The actions take
   the row under. */
@media (max-width: 520px) {
  .cdl-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 8px; }
  .cdl-when { white-space: nowrap; }
  .cdl-acts { grid-column: 1 / -1; justify-content: flex-end; }
}

/* ------------------------------------------------------ the code reference
 *
 * web/asa-reference.js, inside the case form, for a practice that has signed
 * the coding licence. Chris, 27 Oct 2026, after his tracker's ASA Code
 * Reference: a search box, an Anatomic | Specialty switch, the groups as a
 * two-column grid of rounded buttons with their counts, and each code as a
 * row of number, description and base units. */
.asaref-toggle { margin: 2px 0 6px; }
.asaref-box {
  border: 1px solid var(--line); border-radius: var(--radius-card);
  background: var(--panel); padding: var(--space-3); margin: 0 0 var(--space-3);
}
.asaref-box[hidden] { display: none; }

/* WHICH CODE? -- the bedside disambiguation (web/caselog.js drawWhich,
 * shared/code-disambiguation.js; Chris, 30 Oct 2026). A bordered card under
 * the code, the choices as a wrapping row, each prompt a line. */
.which-code {
  border: 1px solid var(--line); border-radius: var(--radius-card);
  background: var(--panel); padding: var(--space-3); margin: 0 0 var(--space-3);
  display: flex; flex-direction: column; gap: 8px;
}
.which-code[hidden] { display: none; }
.wc-family + .wc-family { border-top: 1px solid var(--line-soft); padding-top: 8px; }
.wc-q { font-size: var(--fs-ui); }
.wc-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.wc-choice { text-align: left; white-space: normal; max-width: 100%; }
.wc-choice[aria-checked="true"] { border-color: var(--accent-ink); color: var(--accent-ink); font-weight: 600; }
.wc-detail { display: flex; flex-direction: column; gap: 6px; }
.wc-prompt { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--fs-ui); }
.wc-prompt select { width: auto; max-width: 55%; }
.wc-yn { display: inline-flex; gap: 4px; flex: none; }
.wc-yn button[aria-pressed="true"] { border-color: var(--accent-ink); color: var(--accent-ink); font-weight: 600; }
.wc-statements { width: 100%; box-sizing: border-box; font: inherit; font-size: var(--fs-ui); }
.wc-confirm { width: auto; }
.wc-confirm-row { display: flex; align-items: center; gap: 6px; font-size: var(--fs-ui); font-weight: 600; }
/* WHERE THE BASE UNITS CAME FROM (web/caselog.js drawUnitsTag; Chris,
 * 30 Oct 2026): a small tag beside the label -- ASA, Practice or CMS -- and,
 * under the row, the "from now on?" question and the higher-unit nudge. */
.units-tag {
  display: inline-block; margin-left: 6px; padding: 0 var(--tag-px); line-height: var(--tag-lh); border-radius: var(--radius-pill);
  border: 1px solid var(--line); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em;
  color: var(--text-dim); vertical-align: middle;
}
.units-tag[hidden] { display: none; }
.units-ask, .units-higher {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  font-size: var(--fs-ui); margin: -4px 0 var(--space-3);
}
.units-ask[hidden], .units-higher[hidden] { display: none; }
.units-keep, .units-once { flex: none; }
.units-higher { color: var(--text-dim); }
.asaref { display: flex; flex-direction: column; }
/* Held at a height while a search narrows, so the form under the panel does
 * not jump up and down with every letter typed. */
.asaref-body { min-height: 180px; }
.asaref-search {
  width: 100%; box-sizing: border-box; padding: 9px 12px; font: inherit;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  color: var(--text);
}
.asaref-modes { margin: var(--space-2) 0; }
.asaref-groups { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.asaref-group {
  padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: var(--panel); color: var(--text); font: inherit; cursor: pointer;
  text-align: center;
}
.asaref-group:hover { border-color: var(--brand); }
.asaref-group:focus-visible, .asaref-row:focus-visible, .asaref-back:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}
.asaref-n { color: var(--text-faint); }
.asaref-crumb { display: flex; gap: var(--space-3); align-items: baseline; margin: 0 0 var(--space-2); }
.asaref-back {
  background: none; border: 0; padding: 0; color: var(--accent-ink); font: inherit;
  text-decoration: underline; cursor: pointer;
}
.asaref-list { max-height: 360px; overflow-y: auto; }
.asaref-row {
  display: grid; grid-template-columns: 5.5ch 1fr auto; gap: var(--space-3);
  align-items: baseline; width: 100%; padding: 7px 4px; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line-soft);
  color: var(--text); font: inherit;
}
button.asaref-row { cursor: pointer; }
button.asaref-row:hover { background: var(--panel-2); }
.asaref-code { font-variant-numeric: tabular-nums; color: var(--accent-ink); }
.asaref-desc { min-width: 0; overflow-wrap: anywhere; }
.asaref-units { color: var(--text-faint); font-variant-numeric: tabular-nums; }
.asaref-count { margin: 0 0 4px; }

/* The equity-ledger rebuild, first thing on the Equity tab (chair+). */
.eq-rebuild { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
              gap: 8px; margin: 0 0 8px; }

/* THE IMPORT PREVIEW'S HELD BLOCKS.
 *
 * Chris, 28 Oct 2026: a year's QGenda export replaced IMC's fourth quarter --
 * built here -- with the 755 rows the file had for it. A block the import
 * would gut, or that holds ORstrata's own work, is now held back with its box
 * unticked (web/qgenda-import-panel.js), and its row says so before anything
 * else on the table does: a warning-tinted row, and the "built in ORstrata"
 * chip in the arterial red of a violation, bordered, so it is the loudest mark
 * on the screen. A future block's "imported as pins" is information, not a
 * hazard, and keeps the quieter amber chip. */
tr.qgi-held > td { background: var(--warn-soft); }
.chip.qgi-built {
  border: 1px solid var(--art); margin-top: 4px;
  white-space: normal; text-transform: none; letter-spacing: 0;
}
.chip.qgi-future { white-space: normal; text-transform: none; letter-spacing: 0; }
/* A PUBLISHED BLOCK THE FILE WOULD CHANGE (task #46, 31 Oct 2026): bordered
 * in the same arterial red as "built", because it is the schedule partners are
 * reading now; what changes is folded beneath it and wraps on a phone. A
 * published block the file matches row for row is said quietly. */
.chip.qgi-published {
  border: 1px solid var(--art); margin-top: 4px;
  white-space: normal; text-transform: none; letter-spacing: 0;
}
.qgi-diff { margin-top: 4px; }
.qgi-diff > summary { cursor: pointer; color: var(--brand); }
.qgi-diff ul { margin: 4px 0; padding-left: 16px; overflow-wrap: anywhere; }
.qgi-same { color: var(--text-dim); }

/* REPLACE OR ADD ON, AND WHAT A REPLACE KEEPS (Chris, 24 Nov 2026). Tokens
 * only, so both themes are the same rule; each choice is a full-width row with
 * a 44px target, and the text wraps rather than scrolls on a 360px phone. */
.qgi-clear { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 8px 0; min-width: 0; }
.qgi-clear > legend { font-weight: 600; padding: 0 6px; }
.qgi-opt { display: flex; align-items: flex-start; gap: 8px; min-height: 44px; padding: 6px 0; overflow-wrap: anywhere; }
.qgi-opt > input { margin-top: 4px; flex: none; }
.qgi-keep { border-top: 1px solid var(--line-soft); margin-top: 6px; padding-top: 6px; }
.qgi-counts { margin: 8px 0; }
.qgi-cat { border-collapse: collapse; width: 100%; }
.qgi-cat th, .qgi-cat td { padding: 4px 6px; border-bottom: 1px solid var(--line-soft); text-align: left; }
.qgi-cat td.num, .qgi-cat th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.qgi-blk > summary { cursor: pointer; color: var(--brand); }
.qgi-blk ul { margin: 4px 0; padding-left: 16px; overflow-wrap: anywhere; }
.qgi-word { border: 1px solid var(--art); border-radius: 8px; padding: 8px 12px; margin: 8px 0; }
.qgi-word input { width: 100%; max-width: 16em; box-sizing: border-box; min-height: 44px; font-size: var(--fs-lg); letter-spacing: .1em; }

/* UNPUBLISH, in the Blocks dialog, on a published block that has not begun.
 * Ghost rather than primary, and in the arterial ink: it takes a schedule off
 * every partner's screen, so it should look like the serious end of the row,
 * not its default. Chair-only (unpublishControl in web/app.js). */
.btn.unpublish-btn {
  padding: 2px 10px; font-size: var(--fs-sm);
  color: var(--art); border-color: var(--art);
}

/* ------------------------------------------------------------ room picks
 * web/room-pick.js. Plain tokens only: the brand paints marks, the ink reads. */
.rp-nav { align-items: center; gap: var(--space-2); margin: var(--space-2) 0; }
.rp-counts { gap: var(--space-2); flex-wrap: wrap; margin: var(--space-2) 0; }
.rp-short { background: var(--warn-soft); color: var(--text); border-color: var(--warn); }
.rp-list { margin: var(--space-1) 0 var(--space-3); padding-left: 1.1em; }
.rp-list li { margin: 2px 0; }
.rp-list .btn { margin-left: var(--space-2); }
.rp-table { width: 100%; border-collapse: collapse; }
.rp-table th, .rp-table td { padding: 4px 6px; border-bottom: 1px solid var(--line-soft); text-align: left; }
.rp-table input[type=text] { width: 100%; }
.rp-dropped td { color: var(--text-faint); text-decoration: line-through; }
.rp-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-2); margin: var(--space-2) 0; }
.rp-room { padding: var(--space-2) var(--space-3); }
.rp-room-head { align-items: baseline; gap: var(--space-2); flex-wrap: wrap; }
.rp-cases { list-style: none; margin: var(--space-1) 0 0; padding: 0; font-size: var(--fs-ui); }
.rp-cases li { padding: 2px 0; border-top: 1px solid var(--line-soft); }
.rp-time { font-variant-numeric: tabular-nums; color: var(--text-dim); }
.rp-locs { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 2px var(--space-2); margin: var(--space-2) 0; }
.rp-loc { display: flex; align-items: center; gap: 4px; font-size: var(--fs-ui); }
.rp-shapes { list-style: none; padding-left: 0; }
.rp-shape { padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.rp-shape details { margin: 2px 0 0 1.6em; }
.rp-shape .row { gap: var(--space-1); align-items: center; flex-wrap: wrap; margin: 2px 0; }

/* A DAY ON LOGS (web/log-day.js): the row's one-line summary, and the sheet
 * the row opens -- the clock to change, the cases to open, the points. */
.myrow.clickable { cursor: pointer; }
.myrow.clickable:hover, .myrow.clickable:focus-visible { background: var(--panel-3); }
.logday-line { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: var(--fs-xs); color: var(--text-dim); margin-top: 2px; }
.logday-flag { color: var(--warn); font-weight: 600; }
.logday-pts { font-family: 'IBM Plex Mono', monospace; }
/* LOGS > CLOCK ROWS LEAD WITH THE CLOCKED TIME (Chris, 11 Nov 2026: "This page
 * is for checking clocked times"). The punches and the worked total are the
 * two big things in a row; the assignment and the points line are quiet. Every
 * colour is a token, so the light theme's deeper ink applies by itself. */
.lc-row { align-items: start; }
.lc-row > .w, .lc-row > .d { min-width: 0; }
.lc-row .lc-clock { display: flex; flex-wrap: wrap; gap: 0 12px; font-size: var(--fs-title); font-weight: 700; line-height: 1.35; color: var(--text); }
.lc-span { white-space: nowrap; }
.lc-row .lc-clock.lc-quiet { font-size: var(--fs-ui); font-weight: 400; color: var(--text-dim); }
.lc-task { font-size: var(--fs-sm); font-weight: 400; color: var(--text-dim); font-family: inherit; line-height: 1.3; }
.lc-row .logday-line { font-weight: 400; color: var(--text-faint); }
.lc-row .lc-total { font-size: var(--fs-lg); font-weight: 700; color: var(--text); white-space: nowrap; line-height: 1.2; }
/* A past day with a shift and no clocked time: words, a mark and a warm edge,
 * never colour alone. */
.lc-row.noclock { border-left-color: var(--warn); background: linear-gradient(var(--warn-soft), var(--warn-soft)), var(--panel-2); }
.lc-flag { display: inline-block; color: var(--warn); font-size: var(--fs-ui); font-weight: 700;
  border: 1px solid currentColor; border-radius: 999px; padding: 0 9px; }
.lc-row.noclock .lc-total { color: var(--text-dim); }
.lc-both { flex-direction: column; gap: 2px; }
.lc-punch { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.lc-src { font-size: var(--fs-xs); font-weight: 400; color: var(--text-dim); font-family: inherit; }
.lc-src-line { margin: 6px 0 2px; }
.lc-notes { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 3px 0 2px; }
.lc-flag.lc-note { font-size: var(--fs-sm); padding: 0 8px; }
.logs-noclock-count { margin: 2px 0 8px; font-size: var(--fs-ui); font-weight: 600; color: var(--warn); }
.hours-tile .hours-dates { color: var(--text-faint); margin: -2px 0 2px; }
.hours-tile .hours-dates.hours-paid { margin-top: -4px; font-size: var(--fs-xs); }
.logday h4 { margin: 12px 0 4px; font-size: var(--fs-ui); }
.logday-sum { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.logday-punch { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.logday-punch input[type=time] { width: auto; }
.logday-cases { list-style: none; padding: 0; margin: 0; }
.logday-case { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 0;
  border-bottom: var(--day-rule); font-size: var(--fs-ui); }
.logday-case.clickable { cursor: pointer; }
.logday-case .num { margin-left: auto; font-family: 'IBM Plex Mono', monospace; }
.logday-ok { color: var(--accent-ink); font-size: var(--fs-sm); }

/* \u2039 Your Q4 2026 \u203a -- the block turned in the page on My schedule and
   Logs (web/partner.js blockStepper; Chris, 30 Oct 2026), in place of the
   header's picker on those screens. */
.block-step { display: inline-flex; align-items: center; gap: 4px; }
.block-step-arrow { min-width: 32px; padding: 2px 8px; font-size: var(--fs-lg); line-height: 1; }
.block-step-arrow[disabled] { opacity: .35; cursor: default; }

/* ------------------------------------------------- the inbox (web/inbox.js)
   A sheet over whatever screen the partner was on. Unread notices carry the
   accent on their edge and a bold subject; read ones are plain; archived ones
   are faint, because Archived is where a notice goes to be found if needed
   rather than to be read again. */
.inbox { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.inbox-tabs { margin-top: 0; }
.inbox-tab-n {
  font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-xs); color: var(--text-faint);
}
.inbox-bar { display: flex; justify-content: flex-end; min-height: 0; }
.inbox-bar:empty { display: none; }
.inbox-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.inbox-item {
  padding: 9px 11px; border-radius: 8px; min-width: 0;
  background: var(--panel-2); border: 1px solid var(--line-soft);
  border-left: 3px solid var(--line);
}
.inbox-item.is-unread { border-left-color: var(--brand); }
.inbox-item.is-archived { opacity: .8; }
.inbox-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.inbox-subject {
  flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere;
}
.inbox-item.is-unread .inbox-subject { font-weight: 700; }
.inbox-when {
  flex: none; font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-xs); color: var(--text-faint);
}
.inbox-body {
  margin: 4px 0 0; font-size: var(--fs-sm); color: var(--text-dim);
  white-space: pre-line; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.inbox-why { margin: 4px 0 0; font-size: var(--fs-xs); color: var(--text-faint); }
.inbox-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.inbox-empty { margin: 6px 0; }
.inbox-clean {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 4px; padding-top: 10px;
  border-top: 1px solid var(--line-soft); font-size: var(--fs-sm); color: var(--text-dim);
}
.inbox-clean input { width: auto; margin-top: 2px; }
.inbox-clean .help { display: block; font-size: var(--fs-xs); color: var(--text-faint); }

/* CALENDAR LINKS (web/admin.js feedList): a card per link, stacked so a
 * partner can manage the link on the phone the calendar is on -- the name,
 * what it covers, the all-day/estimated-times switch, then its buttons. */
.feed-list { display: flex; flex-direction: column; gap: var(--space-2); margin: var(--space-2) 0; }
.feed-card { border: 1px solid var(--line); border-radius: 8px; padding: var(--space-2) var(--space-3);
  display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.feed-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.feed-name { overflow-wrap: anywhere; }
.feed-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: var(--fs-sm); color: var(--text-dim);
  overflow-wrap: anywhere; }
.feed-flag { color: var(--warn); font-weight: 600; }
.feed-times { display: flex; align-items: center; gap: 8px; font-size: var(--fs-ui); cursor: pointer; }
.feed-times input[type=checkbox] { width: auto; margin: 0; }
.feed-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.feed-name-input { width: 100%; max-width: 320px; }
.feed-links { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.feed-url { width: 100%; min-width: 0; font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-sm); }
.feed-older { margin: 0; }
/* The practice's call sheets on Your calendar: read-only, so drawn quieter
 * than the partner's own links above them. */
.sheet-list .feed-card { border-style: dashed; }

/* SHIFT HOURS IN CALENDARS (web/app.js settings): a row per shift, the
 * label above its times on a phone, side by side where there is room. */
.shift-hours-list { list-style: none; padding: 0; margin: var(--space-2) 0; }
.shift-hours-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
  padding: 4px 0; border-bottom: 1px solid var(--line); }
.shift-hours-label { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; display: flex;
  align-items: center; gap: 6px; }
.shift-hours-times { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.shift-hours-times input[type=time] { width: auto; }
.shift-hours-add { border-bottom: 0; }

/* ------------------------------------------------ claims & remittance
 * web/claims-panel.js. Dormant behind phi.mayBill: today it draws the gate's
 * sentence and what opens it. Tokens only, so both themes hold. The table
 * scrolls inside the panel rather than widening a 390px page. */
.claims-panel { margin: 18px 0; padding-top: 12px; border-top: 1px solid var(--line); }
.claims-panel ol { margin: 4px 0 8px 1.2em; padding: 0; }
.claims-panel .grid { display: block; overflow-x: auto; max-width: 100%; }
.claims-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; margin: 8px 0; }
.claims-row label { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-sm); }
.claims-facts { margin: 6px 0 12px; }
.claims-facts .claims-dx { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-sm); max-width: 420px; }
.claims-facts textarea { width: 100%; box-sizing: border-box; font-family: inherit; }
.claims-case-no { width: 9em; }
.claims-subscriber { border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px 6px; margin: 8px 0; min-width: 0; }
.claims-subscriber legend { font-size: var(--fs-sm); padding: 0 4px; }
.claims-row input[type=text] { max-width: 100%; box-sizing: border-box; }
.claims-draft { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-sm); padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--text); }

/* ------------------------------------------------ reconciliation, no patients
 * web/recon-panel.js: the column mapping (patient columns struck and locked),
 * the preview, the typed line and the month's lines against their cases. */
.recon { margin-bottom: 18px; }
.recon-read { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 8px 0; background: var(--panel); }
.recon-map { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.recon-col { display: grid; grid-template-columns: minmax(6rem, 10rem) minmax(8rem, 12rem) 1fr; gap: 8px; align-items: center; font-size: var(--fs-sm); }
.recon-col select { width: 100%; font-size: var(--fs-sm); padding: 3px 6px; }
.recon-col.dropped .recon-head { text-decoration: line-through; color: var(--text-faint); }
.recon-head { font-weight: 600; overflow-wrap: anywhere; }
.recon-drop { color: var(--warn); font-size: var(--fs-sm); }
.recon-eg { color: var(--text-faint); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recon-table { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; }
.recon-line { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 5px 10px; font-size: var(--fs-sm);
  border-top: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; }
.recon-line:first-child { border-top: 0; }
.recon-line .num { margin-left: auto; font-family: 'IBM Plex Mono', monospace; }
.recon-badge { font-size: var(--fs-xs); padding: 0 var(--tag-px); line-height: var(--tag-lh); border-radius: var(--radius-pill); border: 1px solid var(--line); }
.recon-badge.ok { color: var(--accent-ink); border-color: var(--accent-ink); }
.recon-badge.warn { color: var(--warn); border-color: var(--warn); }
.recon-manual { margin: 8px 0; }
.recon-manual summary { cursor: pointer; font-weight: 600; font-size: var(--fs-ui); }
.recon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 8px; margin: 8px 0; }
@media (max-width: 520px) {
  .recon-col { grid-template-columns: 1fr 1fr; }
  .recon-eg { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------ the AOD board
 * web/aod-board.js: a row a partner, three ways of grouping them, and the
 * AOD's Edit panel; the Today header's line; the chair's see/edit matrix. */
.aod { padding-bottom: 24px; }
.aod-own .aod-k { width: auto; }
.aod-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.aod-top .btn { margin-left: auto; }
.aod-groups { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.aod-group { display: flex; flex-direction: column; gap: 6px; }
.aod-glabel { margin: 4px 0 0; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim); }
.aod-row { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 7px 10px;
  display: flex; flex-direction: column; gap: 3px; font-size: var(--fs-ui); }
.aod-row.mine { box-shadow: inset 3px 0 0 var(--accent-ink); }
.aod-row.relieved { opacity: .7; }
.aod-row.soon { border-color: var(--warn); background: var(--warn-soft); box-shadow: inset 4px 0 0 var(--warn); }
.aod-row.soon.mine { box-shadow: inset 4px 0 0 var(--warn), inset 7px 0 0 var(--accent-ink); }
.aod-soon { color: var(--text); font-weight: 600; }
/* The partner's own "finishing in 30-45 min" (web/finishing-soon.js), on the
 * board and at the bottom of Today. Chris, 30 Oct 2026. */
.aod-self { font-style: italic; }
.finishing-soon { margin: 18px 0 6px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.finishing-soon-btn { width: 100%; min-height: 48px; font-weight: 600; border: 1px solid var(--warn);
  background: var(--warn-soft); color: var(--text); white-space: normal; }
.finishing-soon-btn.on { border-width: 2px; box-shadow: inset 6px 0 0 var(--warn); }
.finishing-soon-help { margin: 0; text-align: center; }
.today-foot { display: flex; flex-direction: column; align-items: center; margin: 12px 0 4px; }
.today-foot .finishing-soon { align-self: stretch; }
.today-logs-link { font-size: var(--fs-ui); margin-top: 6px; }
/* A bare link is outside the 24px touch floor's :where() list, so on a touch
   screen the link grows its own hit area to 24px; its text and place do not
   change (the-touch-floor-is-24px-browser-test, Today). */
@media (pointer: coarse) {
  .today-logs-link { display: inline-flex; align-items: center; min-height: 24px; }
}
.aod-controls { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.aod-float { display: inline-flex; gap: 6px; align-items: center; font-size: var(--fs-ui); color: var(--text-dim); cursor: pointer; }
.aod-float input { width: auto; margin: 0; }
.aod-row.is-aod .aod-task { color: var(--accent-ink); font-weight: 600; }
.aod-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.aod-task { color: var(--text-dim); }
.aod-loc { font-weight: 600; }
.aod-clock { margin-left: auto; font-size: var(--fs-xs); color: var(--text-faint); }
.aod-clock.on { color: var(--accent-ink); }
.aod-line { color: var(--text-dim); }
.aod-est { font-variant-numeric: tabular-nums; }
.aod-est.long { color: var(--warn); font-weight: 600; }
.aod-est.none { color: var(--text-faint); }
.aod-next { color: var(--accent-ink); font-weight: 600; }
.aod-note { font-style: italic; }
.aod-relief { color: var(--text-faint); }
.aod-edit { margin-top: 4px; }
.aod-edit summary { cursor: pointer; font-size: var(--fs-sm); color: var(--text-dim); }
.aod-edit-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.aod-edit-row select, .aod-edit-row input { width: auto; min-width: 0; flex: 1 1 8rem; font-size: var(--fs-ui); }
.aod-k { width: 3.5rem; font-size: var(--fs-xs); color: var(--text-faint); }
.aodt-rooms { margin-top: 16px; }
.aodt-rooms-list { list-style: none; padding: 0; margin: 0 0 8px; }
.aodt-room-name { min-width: 6em; font-weight: 600; }
.aodt-roomlist-field { max-width: 12em; }
.aodt-roomlist-btn { white-space: nowrap; }
.aod-next-banner { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.aod-next-big { font-size: 1.25em; font-weight: 600; }
.aod-mine { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 6px 10px; margin-bottom: 8px; border-radius: 8px;
  border: 1px solid var(--accent-ink); background: var(--panel); font-size: var(--fs-ui); }
/* A LONG TURNOVER'S REASON, on its tile (web/turnover-delays.js). Chris, 30
 * Oct 2026: asked from the tile, skippable, and flagged when skipped. */
.tv-ask { display: inline-flex; align-items: center; gap: 6px; }
.case-turnover > .tv-ask, .case-turnover > .tv-reason.given { margin-left: 8px; letter-spacing: normal; }
.tv-flag { color: var(--warn); font-size: var(--fs-ui); }
.tv-reason { font: inherit; font-size: var(--fs-sm); padding: 2px 8px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--warn); background: var(--warn-soft); color: var(--warn); }
.tv-reason.given { border-color: var(--line-soft); background: transparent; color: var(--text-dim);
  max-width: 14em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-picker .tv-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 8px 0; }
.tv-picker .tv-choice { min-height: 44px; }
.tv-picker .tv-choice.on { outline: 2px solid var(--warn); }
.tv-other-row { display: flex; gap: 8px; align-items: center; margin: 4px 0 8px; }
.tv-other-row .tv-other { flex: 1 1 auto; min-width: 0; }
/* TURNOVER DELAYS' REPORT (web/reports.js delayFilters / delaySummary). Chris,
 * 30 Oct 2026: turnovers "filterable" by reason, surgeon, service and day. */
.delay-filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.delay-filters .field { min-width: 0; flex: 1 1 130px; }
.delay-long { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-ui); padding-bottom: 8px; }
.delay-summary { margin: 8px 0 14px; }
.delay-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-bottom: 10px; }
.delay-stat { border: 1px solid var(--line-soft); border-radius: 8px; padding: 6px 10px; min-width: 0; }
.delay-stat .k { font-size: var(--fs-sm); color: var(--text-dim); }
.delay-stat .v { font-size: var(--fs-lg); font-weight: 600; }
.delay-lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 16px; }
.delay-list h4 { margin: 4px 0; font-size: var(--fs-ui); }
.delay-list ul { margin: 0; padding-left: 18px; font-size: var(--fs-ui); }
/* THE AOD TABLE (web/aod-table.js, ruling 80): one row per clocked-in
 * partner, every header a sort button. Wide enough, a table; on a phone each
 * row stacks into a labelled card and the headers wrap into a row of sort
 * chips, so nothing ever scrolls sideways. Colours are the board's tokens, so
 * both themes follow. */
.aodt-wrap { max-width: 100%; }
.aodt { width: 100%; border-collapse: collapse; font-size: var(--fs-ui); }
.aodt th, .aodt td { padding: 6px 8px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.aodt th { white-space: nowrap; }
.aodt-sort { font: inherit; font-weight: 600; color: var(--text-dim); background: none; border: 0; padding: 2px 0; cursor: pointer; }
.aodt-sort.on { color: var(--accent-ink); }
.aodt td { overflow-wrap: anywhere; }
.aodt-row.soon td { background: var(--warn-soft); }
.aodt-row.soon td:first-child { box-shadow: inset 4px 0 0 var(--warn); }
.aodt-row.mine td:first-child { box-shadow: inset 3px 0 0 var(--accent-ink); }
.aodt-none { color: var(--text-faint); }
.aodt-long { color: var(--warn); font-weight: 600; }
.aodt-tag { margin-left: 6px; font-size: var(--fs-xs); color: var(--accent-ink); font-weight: 600; }
.aodt-eta { font-variant-numeric: tabular-nums; }
.aodt-eta.src-self { font-style: italic; }
.aodt-eta.src-aod { color: var(--accent-ink); font-weight: 600; }
.aodt-adjust-row td { padding-top: 0; }
.aodt-page { max-width: 1200px; }
/* The sort arrow keeps its width whether shown or not, so tapping a header
 * never shifts the columns beside it. */
.aodt-arrow { display: inline-block; min-width: 1.2em; text-align: right; font-size: var(--fs-xs); }
.aodt-adjust { margin: 0 0 4px; }
.aodt-adjust > summary { color: var(--accent-ink); }
.aodt-hint { margin: 0 0 4px; font-size: var(--fs-xs); }
.aodt-cases { display: flex; flex-direction: column; gap: 0; margin-top: 6px; }
.aodt-case { padding: 2px 0; border-top: 1px dashed var(--line-soft); }
.aodt-case-label { flex: 1 1 10rem; min-width: 0; color: var(--text-dim); }
/* "Unplaced / not clocked in" (ruling 83): every case nobody clocked in has,
 * under the table, so nothing on the day's schedule vanishes from it. */
.aodt-unplaced { margin-top: 14px; }
.aodt-unplaced h4 { margin: 0 0 6px; font-size: var(--fs-ui); }
.aodt-unplaced-list { list-style: none; margin: 0; padding: 0; }
.aodt-unplaced-item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 6px 8px;
  border-bottom: 1px solid var(--line-soft); font-size: var(--fs-ui); overflow-wrap: anywhere; }
.aodt-unplaced-item .aodt-case-label { flex: 1 1 18rem; }
.aodt-unplaced-item select { width: auto; flex: 0 1 18rem; min-width: 0; max-width: 100%; }
.aodt-why { color: var(--text-faint); }
.aodt-lost { box-shadow: inset 3px 0 0 var(--warn); background: var(--warn-soft); }
@media (max-width: 760px) {
  .aodt, .aodt tbody, .aodt tr, .aodt td { display: block; width: 100%; box-sizing: border-box; }
  .aodt thead tr { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-bottom: 8px; }
  .aodt thead th { display: block; padding: 0; border: 0; }
  .aodt-sort { padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font-size: var(--fs-sm); }
  .aodt-sort.on { border-color: var(--accent-ink); }
  .aodt-row { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); margin-top: 8px; padding: 4px 0; }
  .aodt-row:has(+ .aodt-adjust-row) { border-radius: 8px 8px 0 0; border-bottom: 0; }
  .aodt-row td { display: flex; gap: 8px; padding: 2px 10px; border: 0; }
  .aodt-row td::before { content: attr(data-label); flex: 0 0 7.5rem; color: var(--text-faint); font-size: var(--fs-xs); padding-top: 2px; }
  .aodt-row.soon { border-color: var(--warn); background: var(--warn-soft); }
  .aodt-row.soon td, .aodt-row.soon td:first-child, .aodt-row.mine td:first-child { background: none; box-shadow: none; }
  .aodt-row.mine { box-shadow: inset 3px 0 0 var(--accent-ink); }
  .aodt-adjust-row { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; background: var(--panel); }
  .aodt-adjust-row td { padding: 0 10px 6px; border: 0; }
}
/* The AOD table's QUICK VIEW (11 Nov 2026): one compact row per room, a
 * button that opens that partner's detail under it. Tokens only, so both
 * themes are the table's own; a row is at least 44px tall. Phones draw the
 * room, name and end on one line and the case brief under them; a laptop
 * draws all four on a line. */
.aodq-views, .aodq-sorts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 8px; }
.aodq-views .aodt-sort, .aodq-sorts .aodt-sort { padding: 6px 12px; min-height: 36px; border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: var(--panel); font-size: var(--fs-sm); }
.aodq-views .aodt-sort.on, .aodq-sorts .aodt-sort.on { border-color: var(--accent-ink); }
.aodq-list { list-style: none; margin: 0; padding: 0; }
.aodq-item { margin-top: 6px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--panel); overflow: hidden; }
.aodq-item.soon { border-color: var(--warn); background: var(--warn-soft); }
.aodq-item.mine { box-shadow: inset 3px 0 0 var(--accent-ink); }
.aodq-item.open { border-color: var(--accent-ink); }
.aodq-row { display: flex; align-items: stretch; }
.aodq-main { flex: 1 1 auto; min-width: 0; min-height: 44px; box-sizing: border-box; padding: 6px 10px; text-align: left; font: inherit;
  color: var(--text); background: none; border: 0; cursor: pointer;
  display: grid; grid-template-columns: 4.4rem minmax(0, 1fr) auto; gap: 2px 8px; align-items: baseline;
  grid-template-areas: "room who end" "brief brief brief"; }
.aodq-room { grid-area: room; } .aodq-who { grid-area: who; } .aodq-brief { grid-area: brief; } .aodq-end { grid-area: end; }
.aodq-main:focus-visible, .aodq-note:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.aodq-room { font-weight: 700; overflow-wrap: anywhere; }
.aodq-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aodq-brief { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); font-size: var(--fs-sm); }
.aodq-last { color: var(--text-faint); }
.aodq-nobody { color: var(--text-dim); font-style: italic; }
.aodq-item.nobody .aodt-unplaced-list { margin: 0; padding: 4px 10px 6px; }
.aodq-end { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.aodq-end.src-aod { color: var(--accent-ink); font-weight: 600; }
.aodq-end.src-self { font-style: italic; }
.aodq-mark { margin-left: 4px; font-size: var(--fs-xs); font-style: normal; font-weight: 600; color: var(--accent-ink); }
.aodq-note { flex: 0 0 44px; min-width: 44px; min-height: 44px; padding: 0; font: inherit; font-size: var(--fs-ui); color: var(--accent-ink);
  background: none; border: 0; border-left: 1px solid var(--line-soft); cursor: pointer; }
.aodq-detail { border-top: 1px solid var(--line-soft); padding: 4px 0 6px; }
.aodq-detail .aodt { margin: 0; }
@media (min-width: 761px) {
  .aodq-main { grid-template-columns: 9rem 13rem minmax(0, 1fr) 9rem; gap: 0 12px; align-items: center;
    grid-template-areas: "room who brief end"; }
}
/* The detail card is the table's stacked phone row at every width. */
.aodt-one, .aodt-one tbody, .aodt-one tr, .aodt-one td { display: block; width: 100%; box-sizing: border-box; }
.aodt-one .aodt-row { margin-top: 0; padding: 4px 0; }
.aodt-one .aodt-row td { display: flex; gap: 8px; padding: 2px 10px; border: 0; background: none; box-shadow: none; }
.aodt-one .aodt-row td::before { content: attr(data-label); flex: 0 0 7.5rem; color: var(--text-faint); font-size: var(--fs-xs); padding-top: 2px; }
.aodt-one .aodt-adjust-row td { padding: 0 10px 6px; border: 0; }
.aod-matrix { border-collapse: collapse; margin: 6px 0; font-size: var(--fs-ui); }
.aod-matrix th, .aod-matrix td { padding: 3px 10px; text-align: center; border-bottom: 1px solid var(--line-soft); }
.aod-matrix tbody th { text-align: left; font-weight: 500; }
/* Tier hours from the clock: the chair's tiers, pins and monthly log. */
.hourscal { max-width: 100%; overflow-x: auto; }
.hourscal-tiers, .hourscal-log { border-collapse: collapse; margin: 6px 0; font-size: var(--fs-ui); }
.hourscal-tiers th, .hourscal-tiers td, .hourscal-log th, .hourscal-log td {
  padding: 3px 10px; text-align: left; border-bottom: 1px solid var(--line-soft); }
.hourscal-tiers tbody th { font-weight: 500; }

/* ---------------------------------------------- calendars that swipe
 * shared/cal-window.js and web/swipe.js. Chris, 30 Oct 2026: "On all possible
 * calendars Allow swiping in the calendar to advance forward or back" -- and,
 * asked, a vertical swipe that starts on the grid moves a week ("Calendar
 * takes it"). So the grid alone stops the browser panning; the tabs, the
 * weekday row and the page around it scroll as they always did.
 *
 * `.calb-weeks` is the month board's weeks in one box, so the swipe has one
 * element to listen on; it stretches as the weeks did. */
.cal-swipe { touch-action: none; }
.cal-swipe:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.calb-weeks { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.calb-weeks > .calb-wk:first-child { border-top: 0; }
/* A window across two months is headed by its dates, "Oct 25 – Nov 28". */
.calb-range {
  padding: 6px 10px 4px; font-weight: 600; font-size: var(--fs-ui);
  border-bottom: 1px solid var(--line-soft); background: var(--panel);
}
/* Every day in a window is a day, drawn at full strength -- no pad shading. */
.cal-window .calb-day, .cal-window .cal-day { opacity: 1; }
/* Past the furthest a calendar goes, a small bounce rather than nothing. */
@keyframes cal-bounce-x { 0%, 100% { transform: none; } 40% { transform: translateX(6px); } 70% { transform: translateX(-3px); } }
@keyframes cal-bounce-y { 0%, 100% { transform: none; } 40% { transform: translateY(6px); } 70% { transform: translateY(-3px); } }
.cal-bounce-x { animation: cal-bounce-x .3s ease; }
.cal-bounce-y { animation: cal-bounce-y .3s ease; }
@media (prefers-reduced-motion: reduce) { .cal-bounce-x, .cal-bounce-y { animation: none; } }

/* TODAY, SWIPED A DAY AT A TIME (web/swipe.js daySwipeable; Chris, 16 Nov
 * 2026). pan-y: the browser keeps every vertical movement for its own native
 * scroll (and pinch-zoom stays), and only a sideways one is the page's. The
 * page takes focus for the arrow keys, so it shows a ring from the keyboard. */
.day-swipe { touch-action: pan-y pinch-zoom; }
/* Pinch-zoomed (web/swipe.js marks <html>): the browser pans the zoomed page
 * sideways, and no swipe changes the day (HUB #951 S2). */
.day-zoomed .day-swipe { touch-action: auto; }
.day-swipe:focus { outline: none; }
.day-swipe:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@keyframes day-slide-next { from { transform: translateX(28px); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes day-slide-prev { from { transform: translateX(-28px); opacity: .5; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .day-slide-next { animation: day-slide-next .18s ease-out; }
  .day-slide-prev { animation: day-slide-prev .18s ease-out; }
}
/* TOMORROW, A PREVIEW: greyed, and nothing in it answers a finger or a mouse.
 * The day bar above it stays live, to come back. */
.day-preview { opacity: .55; filter: grayscale(1); pointer-events: none;
  user-select: none; -webkit-user-select: none; }
.day-preview-note { margin: 0 0 var(--space-3, 12px); font-weight: 600; }
/* PAST THE REQUEST WINDOW, GREYED. Chris, 30 Oct 2026: forward to the last
 * scheduled holiday or pinned shift "with greyed out tones". The day and
 * everything on it -- a planned holiday, a pinned shift -- fade together. */
.calb-day.cal-grey, .cal-grey { background: var(--panel-2); }
.calb-day.cal-grey .calb-n, .calb-day.cal-grey .calb-chip,
.cal-grey .cal-day-n, .cal-grey .cal-shift, .cal-grey .cal-day-shift { opacity: .55; filter: grayscale(1); }
/* My schedule's heading: ‹ block › and the glass that holds the view options
 * (Chris, 30 Oct 2026: "The circled settings can all fit behind the
 * magnifying glass with settings gears"). One row on a phone. */
.my-head { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; margin: 4px 0 8px; }
.my-head .block-step { min-width: 0; }
.my-head .block-step h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.view-glass { margin: 0 0 0 auto; }
.view-tools {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 0 0 10px; padding: 8px 10px; border-radius: 8px;
  background: var(--panel-2); border: 1px solid var(--line-soft);
}
/* An arrow into the greyed stretch past the request window. */
.block-step-arrow.cal-grey-arrow { color: var(--text-faint); }

/* ---------------------------------------------- the holiday ledger, as assigned
 * web/partner.js My holidays and web/admin.js Holidays: Chris, 30 Oct 2026,
 * "After 'As Assigned' then in grey Vs Goal then Brought in and Earned", each
 * later plan year greyed in its own column. Scrolls inside its own frame, so
 * a phone never scrolls the page sideways. */
.ledger-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.ledger-table { font-size: var(--fs-ui); }
.ledger-table th, .ledger-table td { padding: 6px 8px; white-space: nowrap; }
.ledger-table th { font-size: var(--fs-xs); }
.ledger-dim { color: var(--text-faint); }
.ledger-me td { font-weight: 600; }
.ledger-who { font-family: 'IBM Plex Mono', monospace; }
/* A partner the baseline sheet never named: brought in is the average of the
 * partners it does (Chris, 30 Oct 2026). Marked, not hidden. */
.ledger-avg { font-style: italic; }
.ledger-avg-note { margin-top: 6px; }

/* ------------------------------------------------ the holiday scoring module
 * web/holiday-scoring.js. Chris's sheet draws the holiday x shift scores green
 * where low and red where high; each cell here washes between the two by its
 * place in the range (--heat, 0-100%), over the panel, so the number stays
 * legible ink on both themes. */
:root { --hs-low: #2E9E4F; --hs-high: #D93025; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --hs-low: #3DDC97; --hs-high: #FF6B78; }
}
:root[data-theme="dark"] { --hs-low: #3DDC97; --hs-high: #FF6B78; }
.hs { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hs-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hs-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.hs-table { border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.hs-table th, .hs-table td { padding: 4px 6px; border: 1px solid var(--line-soft); text-align: center; white-space: nowrap; }
.hs-h { font-size: var(--fs-xs); font-weight: 600; color: var(--text-dim); }
.hs-s { text-align: left; font-weight: 600; position: sticky; left: 0; background: var(--panel); }
.hs-corner { background: var(--panel); }
.hs-cell {
  --heat: 0%;   /* each cell's own, set inline from its score */
  background: color-mix(in srgb, color-mix(in srgb, var(--hs-high) var(--heat), var(--hs-low)) 34%, var(--panel));
  color: var(--text);
}
.hs-input { width: 4.2em; padding: 2px 3px; font: inherit; text-align: center; }
.hs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
/* The solver's goals beside the scores: majors and subspecialty pools. */
.hs-goals { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.hs-goals h4 { margin: 0 0 4px; font-size: var(--fs-ui); }
.hs-checks { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--fs-sm); }
.hs-subs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px 10px; }
.hs-sub { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); }
.hs-sub span { min-width: 44px; color: var(--text-dim); }
.hs-sub input { min-width: 0; flex: 1; }
.hs-goal-line { margin-top: 4px; }
.hs-month { font-size: var(--fs-sm); color: var(--text-dim); display: inline-flex; align-items: center; gap: 4px; }
.hs-notes { margin: 0; padding-left: 18px; font-size: var(--fs-sm); color: var(--text-dim); }
/* Holiday holes on the trade board, and the chair's team change. */
.hh-panel h3 { margin-top: 0; }
.hh-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
          gap: 6px 10px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.hh-what { min-width: 0; flex: 1 1 180px; }
.hh-bid, .hh-chair { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hh-input { width: 84px; }
.hh-lowest { font-weight: 600; }
.hh-cands summary, .hh-team summary { cursor: pointer; font-size: var(--fs-ui); }
.hh-close { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); margin: 6px 0; }
.hh-team { margin-top: 10px; }
.hh-team-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--fs-sm); }
.hh-team-form input { width: 110px; }
.hh-moves { margin: 6px 0; padding-left: 18px; font-size: var(--fs-sm); }
.hs-window { margin-top: 4px; }
.hs-window summary { cursor: pointer; font-weight: 600; }
.hs-wtable { font-size: var(--fs-sm); }
.hs-import { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.hs-import textarea { width: 100%; font-family: 'IBM Plex Mono', monospace; font-size: var(--fs-sm); }
.hs-bad { color: var(--art, var(--text)); }
.hs-preview { display: flex; flex-direction: column; gap: 6px; }
.hs-credit { display: flex; align-items: center; gap: 4px; font-size: var(--fs-sm); }
.hs-off td { background: color-mix(in srgb, var(--hs-high) 12%, var(--panel)); }
.hs-why { font-size: var(--fs-xs); color: var(--text-dim); white-space: normal; max-width: 18em; }

/* ------------------------------------------- the shift an offer is about
 * web/market.js offerForm: named at the top of the offer's terms, which is
 * where "Offer for trade" now lands (Chris, 30 Oct 2026). scroll-margin keeps
 * it clear of the sticky header when scrolled to. */
.offer-terms {
  margin: 14px 0 6px; padding: 10px 12px; border-radius: 8px;
  background: var(--panel-2); border: 1px solid var(--line-soft);
  border-left: 3px solid var(--brand); scroll-margin-top: 12px;
}
.offer-terms-k { font-size: var(--fs-xs); letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); }
.offer-terms-shift { margin-top: 2px; }

/* THE CLOCK LOG'S PERIOD: Day / Week / Month / Quarter / Year, then the
 * arrows either side of its name, on one row (web/log-period.js; Chris, 30
 * Oct 2026). */
.log-period { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; margin: 4px 0 8px; }
.log-period > * { flex: none; min-width: 0; }
.log-period-kind { width: auto; max-width: 7em; }
.log-period-label { flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.05em; }

/* A SHIFT WITH NO COMPLETE CLOCK (web/shift-log.js attentionOf; Chris, 30 Oct
 * 2026: "Flag/highlight any rows where a shift assignment is not accompanied
 * by clock in & out"), and the filter beside the period that shows only those. */
.slog-day.slog-attn { border-left: 3px solid var(--warn); background: var(--warn-soft); }
.slog-attn-why { color: var(--warn); font-weight: 600; }
.slog-attn-btn { white-space: nowrap; }
.slog-attn-btn.on { background: var(--warn-soft); border-color: var(--warn); }
.log-period-today { white-space: nowrap; }
.slog-attn-note { margin: 6px 0; }
/* CASES AND NO CLOCK: availability waits for the punch (Chris, 31 Oct 2026;
 * web/shift-log.js pendingNote, web/log-day.js). */
.slog-pending { margin: 0 0 4px; }
.slog-pending-tag { color: var(--warn); }

/* WHICH DAY, above the clock on Today (Chris, 30 Oct 2026: "< [date, default
 * today, click to open calendar selector]>"). The date input sits under the
 * label, invisible, so the phone's own calendar opens from a tap on the date. */
/* CENTRED (Chris, 2 Nov 2026): three columns, the outer two equal, the
 * selector in the middle one and the day's total at the right of the last. */
/* ONE ROW (Chris, 10 Nov 2026): [compact Emergency] [‹ day ›] [the day's
 * shift], and the day's time and points on a line under it. The outer
 * columns share the space equally while the button fits its share, so the
 * selector is the row's centre at 390px and wider; narrower (360px), the
 * left column holds at the button's own width (min-content) and the shift
 * takes what is left, wrapping between words rather than pushing the row
 * sideways. Nothing in the row may widen the page. */
.day-pick { display: grid; grid-template-columns: minmax(min-content, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "side nav asn" "total total total";
  align-items: center; column-gap: 6px; row-gap: 2px; margin: 0 0 10px; }
.day-pick-nav { grid-area: nav; display: flex; align-items: center; justify-content: center; gap: 2px; min-width: 0; }
/* The left column: the Emergency button on today, the "Today" button on a
 * past day. */
.day-pick-side { grid-area: side; min-width: 0; justify-self: start; }
.day-pick-side .help-call-row { margin: 0; }
/* THE DAY'S SHIFT, at least the size of the Next assignment tile's title
 * (Chris: "at least as big as tomorrow's shift assignment"): --fs-lg where
 * that title is --fs-lg, 16px where it is --fs-title (15px, phones). */
.day-pick-asn { grid-area: asn; justify-self: end; min-width: 0; max-width: 100%; text-align: right;
  font-family: 'IBM Plex Sans Condensed', 'IBM Plex Sans', system-ui, sans-serif;
  font-weight: 600; font-size: var(--fs-lg); line-height: 1.15; color: var(--text);
  overflow-wrap: anywhere; }
.day-pick-asn.is-reading { color: var(--text-faint); }
.day-pick-asn .nowrap { white-space: nowrap; }
.day-pick-asn-v { display: inline; }
/* THE INBOX'S OFFLINE LINE (web/inbox.js; Chris, 10 Nov 2026): quiet, not an
   error -- nothing is wrong with the inbox, only with the signal. */
.inbox-offline { margin: 0 0 8px; color: var(--text-dim); font-size: var(--fs-sm); }
/* PHONES: the Next assignment tile's own title size here (--fs-title,
 * .cards .card .v), never smaller, and the selector a little tighter so the
 * row keeps room for the button and the shift; two lines if it needs them. */
@media (max-width: 430px) {
  .day-pick-asn { font-size: var(--fs-title); }
  .day-pick-label { padding: 4px 8px; }
  .day-pick .block-step-arrow { min-width: 30px; padding: 2px 6px; }
}
/* "Today" over the date, so the selector is narrow enough to share the row. */
.day-pick-label { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; }
.day-pick-rel { font-size: var(--fs-xs); font-weight: 600; color: var(--text-dim); letter-spacing: .02em; }
.day-pick-dot { display: none; }
.day-pick-date { white-space: nowrap; }
/* THE ARROWS STAY PUT (Chris, 12 Nov 2026: "next day and previous day arrows
 * should not move based on the date ... make the DDD ## MMM a fixed size").
 * The box is one width for every date and for "Today", sized in em of its own
 * type so it follows the text size it is drawn at (there is no px constant):
 * 7.6em holds the widest "Wed 30 Sep"/"Wed 28 May" at 600 weight with its
 * padding. And the left column is one width whether it holds the Emergency
 * button or the "Today" button, so the nav's x is the same on both. */
.day-pick .day-pick-label { box-sizing: border-box; width: 7.6em; justify-content: center; }
.day-pick-side { min-width: 6.6em; }
.day-pick-label {
  position: relative; border: 1px solid var(--line); background: var(--panel);
  border-radius: 8px; padding: 5px 12px; font: inherit; font-weight: 600; color: var(--text);
  cursor: pointer; white-space: nowrap;
}
.day-pick-label:hover { background: var(--panel-2); }
.day-pick-input { position: absolute; inset: 0; opacity: 0; pointer-events: none; width: 100%; height: 100%; }
/* THE DAY SO FAR, far right on the same row (Chris, 30 Oct 2026: "a running
 * total of time and points on the same row as the day navigator, far
 * right"). Two short lines, so the date beside it never wraps at 390px. */
/* THE FIGURE STAYS IN ITS COLUMN (#681 review, M6): it may wrap, between
 * terms, but never runs left over the selector -- "pending + 147 + 112.75 =
 * 259.75 pts" is the widest form, and the one most worth reading. */
/* UNDER THE ROW now (Chris, 10 Nov 2026), one compact line at its right:
 * "1h 21m · 80 + 0 + 0 + 0 = 80 pts", wrapping between terms. */
.day-total { grid-area: total; justify-self: end; min-width: 0; max-width: 100%; display: flex;
  flex-direction: row; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; column-gap: .45em;
  line-height: 1.2; font-size: var(--fs-sm); font-variant-numeric: tabular-nums;
  text-align: right; }
.day-total-time { white-space: nowrap; }
.day-total-parts { display: flex; flex-wrap: wrap; justify-content: flex-end; column-gap: 0.3em; }
.day-total-term, .day-total-sum { white-space: nowrap; }
.day-total-time { font-weight: 600; color: var(--text); }
/* "availability + pager + production" over "= total pts" (Chris, 2 Nov 2026),
 * each line its own, so the sum fits beside a centred day at 390px. */
.day-total-pts { color: var(--text-dim); display: flex; flex-direction: row; flex-wrap: wrap;
  justify-content: flex-end; align-items: baseline; column-gap: .3em; }
.day-total-parts { font-size: 0.92em; }
.day-total-term { min-width: 0; }
.day-total-sum { color: var(--text); }
/* TODAY'S DAY BAR IN THE TOP BAR (Chris, 12 Nov 2026: tablet or PC -- the
 * sidebar layout, above 860px). The slot is empty, and so gone, on every other
 * view and on a phone. Inside it the bar is a wrapping row, not the phone's
 * grid: [Emergency or Today] [ < date > ] [the day's shift], the hours and
 * points at the right. A window too narrow for all of it lets the figure drop
 * to a second line of the bar rather than squeeze the arrows, which keep the
 * #756 fixed-width date box. */
.topbar-today { display: none; }
@media (min-width: 901px) {
  .topbar-today:not(:empty) { display: flex; flex: 1 1 auto; min-width: 0; }
  /* The slot takes the spare width itself, so the arrows are never squeezed by a spacer sharing it. */
  .topbar:has(.topbar-today:not(:empty)) > .spacer { display: none; }
  .topbar-today .day-pick { display: grid; align-items: center; flex: 1 1 auto; min-width: 0; margin: 0;
    grid-template-columns: 7em auto minmax(0, 1fr); grid-template-areas: "side nav asn" "total total total";
    column-gap: 16px; row-gap: 2px; }
  .topbar-today .day-pick-side { min-width: 0; }
  .topbar-today .day-pick-asn { text-align: left; justify-self: stretch; font-size: var(--fs-body); overflow-wrap: normal; }
  .topbar-today .day-total { justify-self: end; }
}
/* 1181px AND UP has the room: the hours and points join the row, at its right.
 * Between 861 and 1180 (the narrower rail's range) they sit on a second line
 * of the bar, right-aligned, as they do on a phone. */
@media (min-width: 1181px) {
  .topbar-today .day-pick { grid-template-columns: 7em auto minmax(0, 1fr) auto;
    grid-template-areas: "side nav asn total"; }
}
@media (min-width: 901px) {
  /* A long site name gives way, with an ellipsis, before the bar does. */
  .topbar:has(.topbar-today:not(:empty)) #siteSel { min-width: 0; max-width: 24ch; text-overflow: ellipsis; }
}
/* "Log a case", centred under the day's cases (Chris, 2 Nov 2026). */
.ai-actions.case-log-cta { justify-content: center; }
/* STOP CASE ASKS WHEN (Chris, 2 Nov 2026): the time and its two buttons, each
 * at least the 24px touch floor. */
.stop-sheet .punch-at { min-height: 32px; }
.stop-sheet .btn.small { min-height: 32px; padding: 6px 14px; }
/* THE CLOCK TIME, ASKED WHEN THE BUTTON IS PRESSED (Chris, 30 Oct 2026: "hide
 * it and have it pop up when clicking clock in/out"). */
.punch-sheet { margin: 8px 0 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); }
.punch-sheet-label { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 0 0 8px; }
.punch-sheet .punch-at { width: 8em; padding: 4px 6px; }
/* WHO YOU DIRECT, beside the clock (web/supervising.js). Two small boxes on
 * one line that wrap on a phone; the case form's ask row when both are on. */
.sup-boxes { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; font-size: var(--fs-ui); }
.sup-box { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.sup-box input { width: auto; margin: 0; }
.cl-care-ask { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* ------------------------------------------- Who's on: one row of controls
 * web/whos-on.js. Chris, 30 Oct 2026: "Compact checked area to a single row".
 * The search takes what is left; everything else keeps its own width, so at
 * 390px the six controls share one line. */
.whos-bar { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; margin: 4px 0 8px; min-width: 0; }
.whos-bar > * { flex: none; margin: 0; min-width: 0; }
.whos-site { width: auto; max-width: 6.4em; padding: 4px 2px; font-size: var(--fs-ui); }
.whos-step { min-width: 26px; padding: 0 4px; }
.whos-day { flex: 0 1 8.6em; width: 8.6em; padding: 4px 2px; font-size: var(--fs-ui); }
.whos-today { padding: 0 6px; }
.whos-bar .whos-find { flex: 1 1 5em; min-width: 4.5em; width: auto; padding: 4px 6px; font-size: var(--fs-ui); }
.whos-site-row th { text-align: left; padding-top: 12px; font-size: var(--fs-sm); letter-spacing: .04em; color: var(--text-dim); }
/* THE SHIFT ON ONE LINE. Chris, 30 Oct 2026: "The shift column should be
 * wider to prevent wrapping and blank rows in the second column." A shift
 * name wrapping to two lines left its partner centred in a two-line cell, a
 * blank line above and below; the names now wrap instead, from the top. */
.whos-sheet td:first-child { white-space: nowrap; padding-right: 14px; }
.whos-sheet td { vertical-align: top; }

/* WHAT EQUITY IS MEASURED OVER, at the top of the Equity tab (web/app.js
 * equityBasisControl; Chris, 30 Oct 2026). */
.eq-basis { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.eq-basis .segctl { flex: 0 1 auto; }

/* ---------------------------------------------- the log export (web/log-export.js)
 * Chris, 30 Oct 2026: a partner exports their own clock, shift and case logs,
 * de-identified. The button sits on the Logs heading's row; the sheet is a
 * column of small fieldsets that fits a phone without scrolling sideways. */
.log-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.log-export-btn { flex: none; }
.log-export { display: flex; flex-direction: column; gap: 10px; }
.log-export-set { border: 1px solid var(--line-soft); border-radius: 8px; padding: 6px 10px 8px; margin: 0; min-width: 0; }
.log-export-set legend { font-size: var(--fs-ui); color: var(--text-dim); padding: 0 4px; }
.log-export-opt { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: var(--fs-body); }
.log-export-opt input { width: auto; flex: none; }
.log-export-year-only { margin-top: 0; }
.log-export-row { display: flex; align-items: center; gap: 8px; font-size: var(--fs-body); }
.log-export-person { width: auto; min-width: 8em; }
.log-export-warn { color: var(--warn); margin: 4px 0 0; }
.log-export-dates { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.log-export-dates input { width: auto; min-width: 0; }
.log-export-go { display: flex; justify-content: flex-end; }

/* ---------------------------------------------- payer contracts (chair+)
 * web/payer-contracts.js. Chris, 30 Oct 2026: a "Chair+" payer contract
 * engine. Fields wrap into as many columns as fit, so a phone gets one or two
 * and nothing scrolls sideways. */
.pc-panel { margin: 12px 0 18px; }
.pc-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.pc-item { padding: 10px 12px; }
.pc-item-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; }
.pc-item-terms { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--fs-ui); color: var(--text-dim); margin: 4px 0; }
.pc-editor, .pc-try { padding: 12px; margin: 10px 0; }
.pc-editor h5 { margin: 12px 0 2px; }
.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 12px; }
.pc-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: var(--fs-ui); }
.pc-field input, .pc-field select, .pc-field textarea { width: 100%; min-width: 0; box-sizing: border-box; }
.pc-ps { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px 10px; }
.pc-qc { display: flex; flex-direction: column; gap: 8px; }
.pc-qc-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px 10px; align-items: end; }
.pc-qc-row .pc-check { grid-column: 1 / -1; }
.pc-check { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-ui); }
.pc-check input { width: auto; }
.pc-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0; }
.pc-result { border-top: 1px solid var(--line-soft); margin-top: 8px; padding-top: 6px; }
.pc-line { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-ui); padding: 2px 0; }
.pc-line:last-child { font-size: var(--fs-title); }
.pc-events ul { margin: 6px 0 0; padding-left: 18px; font-size: var(--fs-sm); color: var(--text-dim); }

/* ---------------------------------------------- an emergent call for help
 * web/help-call.js. Chris, 30 Oct 2026: "large red above the clock in-out",
 * and "Banner + tone, not full-screen". The red is fixed in both themes and
 * carries white text at 6:1 -- an alarm should not change colour with a
 * setting. Reduced motion gets a steady banner. */
.help-call-row { margin: 8px 0 12px; }
.help-hold {
  --help-p: 0;
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  width: 100%; min-height: 64px; padding: 10px 14px; border-radius: 14px;
  border: 2px solid #7F0E12; background: #B3141B; color: #FFFFFF;
  font-weight: 800; font-size: var(--fs-lg); letter-spacing: .02em; cursor: pointer;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.help-hold-ring {
  position: absolute; inset: 0; transform-origin: left center;
  transform: scaleX(var(--help-p)); background: rgba(255,255,255,.28); pointer-events: none;
}
.help-hold-label, .help-hold-sub { position: relative; }
.help-hold-sub { font-size: var(--fs-sm); font-weight: 600; opacity: .92; letter-spacing: 0; }
.help-hold.holding { box-shadow: 0 0 0 4px rgba(179,20,27,.35); }
.help-hold:focus-visible { outline: 3px solid #FFD54A; outline-offset: 2px; }
.help-hold-clear { background: #5A0A0E; border-color: #2E0507; }
.help-hold-small { min-height: 44px; width: auto; flex: 1 1 180px; font-size: var(--fs-body); border-color: #FFFFFF; }
.help-hold-call { min-height: 72px; font-size: var(--fs-xl); }
/* COMPACT, in the date row (Chris, 10 Nov 2026): the same red, the same hold,
 * labelled, 44px tall -- the touch floor -- and only as wide as its word. */
.help-call-row.is-compact { margin: 0; }
.help-hold.help-hold-compact { width: auto; min-height: 44px; padding: 4px 9px; border-radius: 10px;
  font-size: var(--fs-sm); letter-spacing: .01em; gap: 0; line-height: 1.1; }
.help-hold-compact .help-hold-sub { font-size: var(--fs-xs); font-weight: 600; }

.help-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9000;
  max-height: 60vh; overflow-y: auto;
  background: #B3141B; color: #FFFFFF; border-bottom: 3px solid #7F0E12;
  padding: max(8px, env(safe-area-inset-top)) 12px 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  animation: help-flash 1s steps(2, jump-none) infinite;
}
.help-banner[hidden] { display: none; }
body.has-help-banner { padding-top: 132px; }
@keyframes help-flash { 0% { background: #B3141B; } 100% { background: #E0262E; } }
.help-banner-call + .help-banner-call { border-top: 1px solid rgba(255,255,255,.4); margin-top: 8px; padding-top: 8px; }
.help-banner-head { font-size: var(--fs-lg); font-weight: 900; letter-spacing: .02em; line-height: 1.2; }
.help-banner-line { font-size: var(--fs-body); font-weight: 600; margin-top: 2px; }
.help-banner-coming { font-size: var(--fs-body); margin-top: 2px; }
.help-banner-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.help-banner-actions .btn { min-height: 44px; font-weight: 800; }
.help-banner .btn.help-coming { background: #FFFFFF; color: #7F0E12; border-color: #FFFFFF; flex: 1 1 140px; }
.help-banner .btn.help-silence { color: #FFFFFF; border-color: rgba(255,255,255,.8); background: transparent; flex: 1 1 140px; }
.help-banner-call.mine .help-banner-head::after { content: ' (yours)'; font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  .help-banner { animation: none; background: #8E0F15; border-bottom-color: #FFFFFF; }
}

.help-pick {
  position: fixed; inset: 0; z-index: 9100; background: rgba(0,0,0,.55);
  display: flex; align-items: flex-end; justify-content: center;
}
.help-pick-card {
  width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  background: var(--panel); color: var(--text); border-radius: 16px 16px 0 0;
  padding: 14px 14px max(14px, env(safe-area-inset-bottom));
}
.help-pick-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.help-pick-head h3 { margin: 0; font-size: var(--fs-xl); }
.help-pick-note { margin: 4px 0 10px; color: var(--text-dim); font-size: var(--fs-body); }
.help-pick-group h4 { margin: 10px 0 6px; font-size: var(--fs-ui); text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); }
.help-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.help-pick-room {
  min-height: 56px; border-radius: 12px; border: 2px solid #B3141B; background: var(--panel-2);
  color: var(--text); font-size: var(--fs-lg); font-weight: 800; cursor: pointer; padding: 6px;
  overflow-wrap: anywhere;
}
.help-pick-room:active { background: #B3141B; color: #FFFFFF; }
.help-pick-other { display: flex; gap: 8px; margin-top: 14px; }
.help-pick-input { flex: 1 1 auto; min-width: 0; min-height: 48px; }
.help-pick .btn.danger { background: #B3141B; border-color: #7F0E12; color: #FFFFFF; min-height: 48px; font-weight: 800; }

.help-settings-row { display: flex; gap: 10px; align-items: center; padding: 4px 0; cursor: pointer; }
.help-settings-people { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.help-person-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2);
}
.help-log-box { margin: 8px 0 14px; }
.help-log { overflow-x: auto; }
.help-log-table { border-collapse: collapse; font-size: var(--fs-ui); width: 100%; }
.help-log-table th, .help-log-table td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.help-pick-body { min-height: 56px; }
.help-settings { margin: 4px 0 12px; }

/* TODAY'S THIS-WEEK TILE, its second line: the calendar month so far against
 * the partner's own twelve-month average (shared/hours.js monthPace). Green
 * on track, the caution amber behind -- both legible as text in either theme;
 * no colour when there is no average yet. */
.card .month-pace.pace-ok { color: var(--accent-ink); font-weight: 600; }
.card .month-pace.pace-behind { color: var(--pa); font-weight: 600; }
.cl-info .cl-equity { margin-top: 6px; }

/* WALKTHROUGH REQUESTS, on the Access tab, platform only (web/admin.js
 * inquiriesPanel). One card per request; the status chip carries the state
 * in a word, and colour only repeats it. */
.inq-list { display: flex; flex-direction: column; gap: var(--space-2); }
.inq-row {
  background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: var(--radius-card); padding: var(--space-3);
  overflow-wrap: anywhere;
}
.inq-row[data-status="new"] { border-left: 3px solid var(--brand); }
.inq-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.chip.inq-status { margin-left: auto; text-transform: capitalize; }
.chip.inq-status[data-status="new"] { color: var(--accent-ink); }
.inq-msg { white-space: pre-wrap; margin: 6px 0 0; }

/* THE HOURS TILES (web/partner.js hoursTile; Chris, 3 Nov 2026): worked is
 * the figure; what is still to come is the muted line under it and the
 * hatched part of the bar. The solid part is the accent's INK, legible as a
 * mark on the panel in both themes (5:1 and over); the hatch is the same ink
 * striped over the panel, and the bar's outline is --line-strong, a control's
 * border, so its full length reads in either theme. */
.hours-tile .hours-more { color: var(--text-dim); }
.hours-bar {
  display: flex; height: 8px; margin-top: 5px; border-radius: 4px; overflow: hidden;
  border: 1px solid var(--line-strong); background: var(--panel);
}
.hours-bar > span { display: block; height: 100%; }
.hours-bar-worked { background: var(--accent-ink); }
.hours-bar-left {
  background: repeating-linear-gradient(135deg, var(--accent-ink) 0 2px, transparent 2px 5px);
}

/* ---------- paging the person on call (web/paging.js) ---------- */
.page-oncall { margin: 12px 0; }
.page-panel { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.page-list { list-style: none; margin: 8px 0 0; padding: 0; }
.page-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.page-list li:first-child { border-top: 0; }
.page-who { min-width: 0; overflow-wrap: anywhere; }
.page-list-head { margin: 12px 0 0; font-size: var(--fs-sm); font-weight: 600; color: var(--text-dim); }
.page-list-oncall { margin-top: 8px; }
.page-list-rest { margin-top: 4px; }
.page-reasons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.page-reasons .btn { min-height: 44px; white-space: normal; line-height: 1.15; padding-left: 4px; padding-right: 4px; }
.page-in-reason { font-weight: 600; }
.page-final-why { margin: 4px 0; }
.page-final-none { margin-top: 6px; }
.page-sms, .page-tel { text-decoration: none; white-space: nowrap; }
.page-ladder { margin-top: 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.page-ladder.step-wait { border-color: var(--line); }
.page-ladder.step-repage, .page-ladder.step-backup { border-color: var(--warn); background: var(--warn-soft); }
.page-ladder.step-aod { border-color: var(--warn); border-width: 2px; background: var(--warn-soft); }
.page-ladder.step-answered { background: var(--ok-soft); }
.page-incoming { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; border: 2px solid var(--warn); background: var(--warn-soft); }
.page-in-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
/* ------------------------------------------------ Logs · Insights (web/analytics.js) */
.analytics { display: flex; flex-direction: column; gap: 4px; }
.an-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.an-controls select { width: auto; min-width: 0; max-width: 11rem; }
.an-pills { display: flex; gap: 4px; }
.an-block { margin: 6px 0 10px; min-width: 0; }
.an-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; margin-bottom: 4px; }
.an-head h4 { margin: 0; }
.an-note { margin: 4px 0 0; }
.an-table { table-layout: fixed; }
.an-table th, .an-table td { padding: 5px 6px; }
.an-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.an-label { overflow-wrap: anywhere; }
.an-scroll { max-width: 100%; overflow-x: auto; }
.an-calc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-ui); }
.an-fte { width: 5rem; }
.an-trend { display: flex; flex-direction: column; gap: 3px; }
.an-trow { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr) 3.6rem 4.4rem; gap: 6px; align-items: center; font-size: var(--fs-sm); }
.an-tm { color: var(--text-dim); }
.an-tbar { position: relative; height: 10px; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.an-tfill { position: absolute; inset: 0 auto 0 0; background: var(--spo2); border-radius: 3px; }
.an-ttick { position: absolute; top: -1px; bottom: -1px; width: 2px; margin-left: -1px; background: var(--text); }
.an-tv, .an-ts { text-align: right; font-variant-numeric: tabular-nums; }
.an-ts { color: var(--text-faint); }
/* THE PAY CARD (web/pay-card.js; Chris, 27 Oct 2026: "All of it, as chair+
 * values"). Each group folds; the task tables scroll inside their own frame
 * so a phone never scrolls sideways. */
.pay-card { max-width: 100%; }
.pay-card-group { margin: 6px 0; }
.pay-card-group > summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.pay-card-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 12px; margin: 6px 0 10px; }
.pay-card-field { display: flex; flex-direction: column; gap: 3px; font-size: var(--fs-ui); min-width: 0; }
.pay-card-field input { width: 100%; min-width: 0; box-sizing: border-box; }
.pay-card-scroll { overflow-x: auto; max-width: 100%; }
.pay-card-hours, .pay-card-sub { width: 64px; }
.pay-card-win { width: 96px; }
.pay-card-tasks td:first-child { white-space: nowrap; }
.pay-card-msg { margin: 6px 0 0; }
.pay-card-money { width: 96px; }
.pay-card-self { font-size: var(--fs-xs); }

/* THE PHONE'S OFFLINE QUEUE (web/offline-queue.js; ruling 36, 4 Nov 2026).
   "N items not yet sent" sits above the tab bar whenever anything is waiting,
   in caution amber: it is a fact the partner must not miss, and not an error. */
.dq-pill {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  background: var(--panel); color: var(--pa); border: 1px solid var(--pa);
  border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18); max-width: calc(100vw - 32px);
}
/* WHAT THIS PAGE HOLDS while there is no signal (web/held-writes.js; Chris,
   10 Nov 2026). The queue's pill, one step higher, so both can show. */
.held-pill { bottom: calc(116px + env(safe-area-inset-bottom, 0px)); }
/* The escape hatch under the pill (Chris, 13 Nov 2026): a busy database holds
   an entry here, and "Copy details" is how it is kept if the page must close.
   Same tokens as the pill, so both themes are official. */
.held-copy { bottom: calc(156px + env(safe-area-inset-bottom, 0px)); font-weight: 500; font-size: .85em; }
.held-copy[hidden], .held-pill[hidden] { display: none; }
.dq-sheet {
  position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 70; max-height: 70vh; overflow: auto; background: var(--panel); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 12px; padding: 14px 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .25);
}
.dq-row { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start;
  padding: 8px 0; border-top: 1px solid var(--line-soft); }
.dq-list { margin: 8px 0 0; }
.dq-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.dq-offline h2 { margin-top: 0; }
.dq-case { display: grid; gap: 10px; margin-top: 16px; }
.dq-field { display: grid; gap: 4px; }
.dq-field input { font: inherit; padding: 8px 10px; border: 1px solid var(--line-strong);
  border-radius: 8px; background: var(--panel); color: var(--text); min-width: 0; }

/* ===================================================== the demo site only
 *
 * Ruling 57 phase 2 (Chris, 9 Nov 2026): web/demo.js draws these on the demo
 * practice alone. Every colour is a token already defined for both themes
 * (warn and warn-soft for the banner, the panel and line tokens for the
 * switch, accent-fill and on-accent for the persona buttons), so each theme is
 * designed rather than inherited. Sized for a 390 px phone with no sideways
 * scroll: the switch wraps, and never grows wider than the screen. */
.demo-banner {
  position: sticky; top: 0; z-index: 60;
  padding: 6px 16px; text-align: center;
  font-size: var(--fs-sm); font-weight: 600;
  color: var(--warn); background: var(--warn-soft);
  border-bottom: 1px solid var(--warn);
}
.demo-picker { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 2px; }
.demo-picker-lede { margin: 0; font-weight: 600; color: var(--text); }
.signin-btn.demo-persona {
  flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  min-height: 44px; padding: 8px 14px;
}
.demo-persona-name { font-weight: 600; }
.demo-persona-blurb { font-size: var(--fs-sm); color: var(--text-dim); }
/* Above the phone's bottom tab bar (about 52px plus the home indicator), so
   the switch never sits over Today, Logs or Schedule; on a wide screen, where
   the tab bar is hidden, the same lift costs nothing. */
.demo-switch {
  position: fixed; left: 16px; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); z-index: 70;
  max-width: calc(100vw - 32px); box-sizing: border-box;
  padding: 6px 10px; border-radius: 10px;
  color: var(--text); background: var(--panel);
  border: 1px solid var(--line-strong);
}
.demo-switch > summary {
  cursor: pointer; font-size: var(--fs-sm); font-weight: 600; color: var(--warn);
  min-height: 28px; display: flex; align-items: center;
}
.demo-switch-body { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 6px; }
.demo-switch label { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); }
.demo-switch select, .demo-switch .demo-undo { min-height: 32px; max-width: 100%; }
.demo-switch .demo-undo {
  color: var(--on-accent); background: var(--accent-fill);
  border: 0; border-radius: 8px; padding: 0 10px; cursor: pointer;
}
.demo-switch-msg { flex-basis: 100%; font-size: var(--fs-sm); color: var(--text-dim); }
.demo-switch-msg:empty { display: none; }
/* The behind-main reminder (platform only): a dot on the folded chip, and in
 * the open chip what to run. Theme tokens only, so both themes are drawn. */
.demo-switch.is-behind > summary .demo-behind-dot { color: var(--warn); }
.demo-version { flex-basis: 100%; font-size: var(--fs-sm); color: var(--text-dim); }
.demo-version strong { color: var(--warn); }
.demo-command { display: block; margin-top: 4px; padding: 6px 8px; border-radius: 6px;
  background: var(--warn-soft); color: var(--text); font-size: var(--fs-sm);
  overflow-wrap: anywhere; white-space: pre-wrap; }

/* A TYPED TIME that could not be read (web/time-field.js). The sentence sits
   under the box in the same arterial red the other form errors use, as a token
   so both themes pick their own ink. */
.time-err { display: block; margin-top: 3px; font-size: var(--fs-sm); line-height: 1.3; color: var(--art); }
input[data-time-entry][aria-invalid="true"] { border-color: var(--art); }
/* The sentence under a stop-sheet / clock-sheet time box takes its own line. */
.punch-sheet-label { flex-wrap: wrap; }
.punch-sheet-label .time-err { flex-basis: 100%; }

/* THE POCKET GUIDE (web/pocket-guide.js): one line of explanation and one
   button that opens the live Google Doc. Theme tokens only (the button is the
   app's own .btn), so both themes are drawn. */
.pocket-guide { max-width: 760px; }
.pg-head h2 { margin: 0 0 4px; }
.pg-meta { margin: 8px 0 0; }

/* QUICK LINKS (web/quick-links.js): a compact list of rows on Today and under
   Other, and the committee's editor in Settings. Tokens only, so both themes
   are drawn; 360px wide, one column, nothing wider than the screen. */
.quicklinks { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ql-item { margin: 0; }
.ql-link { display: block; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.ql-title { display: block; font-weight: 600; }
.ql-note { display: block; color: var(--text-dim); font-size: var(--fs-sm); }
.ql-editor { min-width: 0; }
.ql-edit-list { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ql-edit { padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
  display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ql-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ql-label { color: var(--text-dim); font-size: var(--fs-sm); }
.ql-input { width: 100%; box-sizing: border-box; font-size: var(--fs-ui); padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); }
.ql-input[aria-invalid="true"] { border-color: var(--art); }
.ql-err { color: var(--art); font-size: var(--fs-sm); }
.ql-actions, .ql-foot { display: flex; flex-wrap: wrap; gap: 6px; }
.ql-foot { margin-top: 8px; }

/* THE SECURE INBOX (web/secure-inbox.js; Chris, 13 Nov 2026). Built from the
 * inbox's own pieces; only what is new is here, and it is drawn from the
 * theme's tokens, so light and dark both hold. The banners are the existing
 * .banner.warn: the no-PHI rule and the external-sender warning must read as
 * warnings in either theme. */
.secure-banner { font-weight: 600; }
.secure-external { border-left-color: var(--pa); }
.secure-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.secure-compose { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.secure-compose textarea, .secure-compose input[type="text"], .secure-compose select { width: 100%; }
.secure-hints:empty { display: none; }
.inbox-secure { align-self: flex-start; }
.inbox-secure-slot:empty { display: none; }
.secure-inbox { min-width: 0; }

/* ======================================================================
   SHARED FORM CLASSES (Chris, 19 Nov 2026): "the new form CSS changes should
   be shipped to other areas of the app as well". The Log a case redesign
   built these, and any modal can use them -- label height, bottom-aligned
   rows, the circled-i popover, the need/heard highlight, the 42px icon
   button, select-on-focus's companions, and the keyboard inset. Behaviour is
   in web/case-form-kit.js. Every colour is a token, so both themes follow.
   ====================================================================== */
:root { --kb-inset: 0px; }

/* THE PHONE KEYBOARD (web/case-form-kit.js keepInView writes --kb-inset; the
   viewport meta's interactive-widget=resizes-content shrinks dvh where the
   browser honours it). Only the bottom padding moves, so a modal centred on a
   desktop is exactly where it was. */
.scrim { padding-bottom: calc(20px + var(--kb-inset, 0px)); }
@media (max-width: 900px) {
  .scrim { padding-bottom: var(--kb-inset, 0px); }
  .modal { max-height: calc(92dvh - var(--kb-inset, 0px)); }
}

/* ONE LABEL HEIGHT, so two boxes side by side start on one line whether or not
   the label beside it carries a circled-i. */
.fk-label, .caselog .field > label {
  display: flex; align-items: center; gap: 4px; height: 24px; min-height: 24px; margin-bottom: 4px;
  line-height: 1.2; box-sizing: border-box;
}
.caselog .field > label.inline-check { min-height: 0; }
/* ROWS SIT ON THE BOTTOM EDGE of their tallest cell. */
.fk-row2, .fk-row3 { display: grid; gap: 8px; align-items: end; }
.fk-row2 { grid-template-columns: 1fr 1fr; }
.fk-row3 { grid-template-columns: 1fr 1fr 1fr; }
.caselog .row2, .caselog .row3 { align-items: end; }

/* THE ICON BUTTON, 42px, the same height as a box beside it. */
.fk-ib {
  width: 42px; height: 42px; flex: none; padding: 0; display: inline-flex; align-items: center;
  justify-content: center; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--panel); color: var(--text); cursor: pointer;
}
.fk-ib svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.fk-ib[aria-pressed="true"] { background: var(--art); border-color: var(--art); color: var(--on-accent); }
.fk-typerow { display: flex; gap: 8px; align-items: center; }
.fk-typerow > select { flex: 1; min-width: 0; height: 42px; }

/* A BOX THE FORM SAYS IS STILL NEEDED, and one it heard from speech. */
.fk-need { border-color: var(--art) !important; box-shadow: 0 0 0 2px var(--art); background: var(--warn-soft); }
.fk-needtag { color: var(--art); font-size: var(--fs-xs); font-weight: 700; }
.fk-heard { box-shadow: 0 0 0 2px var(--accent-ink); }
/* A SUGGESTION is dashed and labelled; it becomes a value only when chosen. */
.fk-sug { outline: 2px dashed var(--accent-ink); outline-offset: 2px; border-radius: 6px; }
/* WHAT THE APP FILLED, until the partner types: italic and muted. A
   placeholder is italic too, so neither reads as an entered value. */
.fk-sample, .caselog input.fk-sample { font-style: italic; color: var(--text-dim); }
.caselog input::placeholder, .caselog textarea::placeholder { font-style: italic; }

/* THE CIRCLED-I AS A POPOVER (Chris, 19 Nov 2026: permanent helper captions
   become hover/tap tooltips). The same <details class="cl-info"> as before, so
   it still works with no script; open, its text floats instead of pushing the
   boxes apart, which is what kept a pair on one baseline. */
.caselog .cl-info { position: relative; display: inline-block; }
.caselog .cl-info > summary { cursor: help; }
.caselog .cl-info[open] > p.help,
.caselog .cl-info[open] > .cl-asa-guide {
  position: absolute; z-index: 30; left: -6px; top: calc(100% + 8px); width: max-content;
  max-width: min(260px, 64vw); margin: 0; padding: 8px 10px; border-radius: 8px;
  background: var(--text); color: var(--panel); font-size: var(--fs-sm); line-height: 1.4;
  box-shadow: var(--shadow); white-space: pre-line; text-align: left;
  text-transform: none; letter-spacing: 0; font-weight: 400;
  /* installTips() sets --tip-shift when the bubble would leave the screen. */
  transform: translateX(var(--tip-shift, 0px));
}
/* THE SPEECH-BUBBLE ARROW (Chris, 21 Nov 2026): every circled-i is the same
   bubble, anchored to its icon. The arrow sits under the icon and counter-
   shifts when the bubble was slid back inside the screen. */
.caselog .cl-info[open] > p.help::before,
.caselog .cl-info[open] > .cl-asa-guide::before {
  content: ""; position: absolute; top: -6px; left: calc(8px - var(--tip-shift, 0px));
  border: 6px solid transparent; border-top: 0; border-bottom-color: var(--text);
}
/* THE ASA'S BUBBLE holds several paragraphs and a link: it is the same bubble,
   a little wider, and scrolls inside itself rather than running off the screen.
   Its paragraphs are ordinary .help lines, which are dim on a panel and would
   vanish on the bubble, so they take the bubble's own ink. */
.caselog .cl-info[open] > .cl-asa-guide {
  max-width: min(300px, calc(100vw - 24px)); max-height: min(60vh, 420px); overflow-y: auto;
}
.caselog .cl-info > .cl-asa-guide .help { color: inherit; margin: 0 0 6px; font-size: inherit; }
.caselog .cl-info > .cl-asa-guide .help:last-child { margin-bottom: 0; }
.caselog .cl-info > .cl-asa-guide a { color: inherit; text-decoration: underline; }

/* THE FORM'S FOOTER FIGURE (shared/case-estimate.js): units and points, sticky
   at the foot of the scrolling body so it is always in view above Log it. */
.caselog .cl-est {
  position: sticky; bottom: -14px; margin: 8px -16px -14px; padding: 8px 16px;
  background: var(--panel); border-top: 1px solid var(--line); z-index: 5;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.caselog .cl-est[hidden] { display: none; }
.caselog .cl-est-pts { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: var(--fs-lg); font-weight: 700; }
.caselog .cl-est-note { font-size: var(--fs-sm); color: var(--text-dim); }
/* HAND-OFF & RELIEF: one titled section holding both checks. */
.caselog fieldset.cl-handoff {
  margin: 8px 0; padding: 6px 10px 8px; border: 1px solid var(--line); border-radius: 10px; min-width: 0;
}
.caselog fieldset.cl-handoff > legend { font-weight: 600; font-size: var(--fs-sm); padding: 0 6px; }
.caselog .field[hidden] { display: none; }
/* PAIRS ON ONE BASELINE (Chris, 19 Nov 2026), now that every label is the same
   24px: the subgrid's baseline alignment above let a select and a text box
   settle a pixel apart, so the controls start at the top of their own cell
   instead, directly under an equal label. */
.caselog .row2 > .field, .caselog .row3 > .field { align-items: start; }
.caselog .row2 > .field > label, .caselog .row3 > .field > label { align-self: start; }
/* A SUGGESTION'S LABEL: small, in the accent ink, beside the thing it suggests. */
.caselog .cl-sug-tag { color: var(--accent-ink); font-size: var(--fs-xs); font-weight: 600; margin-left: 4px; }
.caselog .cl-xw-alt { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: var(--fs-sm); margin: 0 0 6px; }
.caselog .cl-xw-alt[hidden] { display: none; }
.caselog label.fk-sug { padding: 2px 4px; }
.caselog .cl-typefield { margin-bottom: 6px; }
/* THE CROSSWALK HELPER, THE MICROPHONE PANEL AND THE REASON BOX (case-log redesign). */
.fk-ib[hidden] { display: none; }
.fk-i { all: unset; cursor: pointer; color: var(--text-dim); font-size: var(--fs-ui); line-height: 1; padding: 0 2px; }
.fk-i:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 50%; }
.caselog .cl-xw-box { margin: 0 0 8px; }
.caselog .cl-xw-panel {
  display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel-2);
}
.caselog .cl-xw-tabs, .caselog .cl-xw-cats, .caselog .cl-voice-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.caselog .cl-xw-tabs button[aria-selected="true"], .caselog .cl-xw-cats button[aria-pressed="true"] {
  background: var(--text); color: var(--panel); border-color: var(--text);
}
.caselog .cl-xw-top, .caselog .cl-xw-list { display: grid; gap: 6px; }
.caselog .cl-xw-hit {
  display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 6px 8px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: var(--fs-sm);
}
.caselog .cl-voice { display: grid; gap: 8px; margin: 0 0 8px; padding: 10px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel-2); }
.caselog .cl-voice-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.caselog .cl-voice textarea { width: 100%; }
.caselog .cl-reason { margin-top: 8px; }
.caselog .cl-voice-host:empty { display: none; }
.caselog .cl-voice .badge { font-size: var(--fs-xs); padding: 2px 8px; border: 1px solid var(--line); border-radius: 99px; color: var(--text-dim); }
.caselog .cl-xw-head { display: flex; gap: 6px; align-items: baseline; }
.caselog .cl-xw-t { min-width: 0; overflow-wrap: anywhere; }

/* THE SAME LABEL HEIGHT AND BOTTOM EDGE IN EVERY MODAL'S PAIRED FIELDS (Chris, 19
   Nov 2026: "the new form CSS changes should be shipped to other areas of the app
   as well"). A label that carries a circled-i or wraps no longer lets one box of a
   pair sit lower than the other. Only a minimum height and the row's alignment:
   nothing is resized or moved otherwise. */
.modal .row2 > .field > label, .modal .row3 > .field > label {
  display: flex; align-items: center; gap: 4px; min-height: 24px;
}
.modal .row2, .modal .row3 { align-items: end; }
.caselog .row3 > .field > label { white-space: nowrap; }

/* THE CODES ROW (ASA CPT#, Surgical CPT, Base units) on a phone (Chris, 21 Nov
   2026: the ASA CPT# box and its circled-i were drawn under the next label).
   Its third column is `auto` and its label is nowrap, so a long "Base units"
   label took the width and left the two code boxes 31px each, overlapping.
   The two code columns now share what is left and are never narrower than a
   five-digit code; Base units gets a fixed, number-sized column and its label
   may wrap. */
.caselog .row3.cl-codes { grid-template-columns: minmax(70px, 1fr) minmax(70px, 1fr) 84px; }
.caselog .row3.cl-codes > .field { min-width: 0; }
.caselog .row3.cl-codes > .field > label { white-space: normal; }

/* THE COMMITTEE DELETE PANEL on the Requests view (Chris, 24 Nov 2026: a delete
   takes two different committee members). A normal page, not the wide grid, so it
   has to fit a 360px phone: every row wraps, nothing is a fixed width, and every
   colour is a token so the two themes are both official. */
.reqdel { margin: 0 0 var(--space-4); padding: var(--space-3); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card); min-width: 0; }
.reqdel h3 { margin: 0 0 var(--space-1); font-size: var(--fs-title); color: var(--text); }
.reqdel h4 { display: flex; align-items: center; gap: var(--space-2); margin: var(--space-3) 0 var(--space-2); font-size: var(--fs-ui); color: var(--text); }
.reqdel .help { color: var(--text-dim); font-size: var(--fs-sm); margin: var(--space-1) 0; overflow-wrap: anywhere; }
.reqdel .chip { white-space: normal; }
.reqdel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.reqdel-item { padding: var(--space-2) var(--space-3); background: var(--panel-2); border: 1px solid var(--line-soft); border-left: 3px solid var(--pa); border-radius: var(--radius); min-width: 0; }
.reqdel-title { font-weight: 600; color: var(--text); }
.reqdel-days { color: var(--text-dim); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.reqdel-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.reqdel-new { margin-top: var(--space-3); }
.reqdel-new > summary { cursor: pointer; color: var(--accent-ink); font-size: var(--fs-ui); }
.reqdel-group { margin-top: var(--space-3); padding-top: var(--space-2); border-top: 1px solid var(--line-soft); }
.reqdel-grouphead, .reqdel-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); justify-content: space-between; }
.reqdel-row { padding: var(--space-1) 0; font-size: var(--fs-sm); color: var(--text); }
.reqdel-row > span:first-child { min-width: 0; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- the idea tracker
   (Chris, 20 Nov 2026, docs/roadmap-ideas.md section 14). Tokens only, so both
   themes are drawn from the same names: a stage chip uses the monitor accent
   for its stage and the SAME accent's dim as its wash, the pairing .chip.draft,
   .chip.published and .chip.bad already prove readable on both surfaces.
   Phone first: one column, nothing wider than the screen, 44px targets. */
.ideas, .coming-up { min-width: 0; max-width: 100%; }
.idea-card { overflow-wrap: anywhere; }
.idea-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) 8px; }
.idea-title { flex: 1 1 12em; min-width: 0; }
.idea-chip.idea-under_review { background: var(--pa-dim);   color: var(--pa);         border-color: var(--pa); }
.idea-chip.idea-in_process   { background: var(--spo2-dim); color: var(--spo2);       border-color: var(--spo2); }
.idea-chip.idea-completed    { background: var(--ecg-dim);  color: var(--accent-ink); border-color: var(--brand); }
.idea-chip.idea-rejected     { background: var(--art-dim);  color: var(--art);        border-color: var(--art); }
.idea-stage, .idea-area, .idea-count { font-size: var(--fs-sm); color: var(--text-dim); }
.idea-area { margin-left: 8px; }
.idea-meta { font-size: var(--fs-sm); color: var(--text-dim); margin: var(--space-1) 0; }
.idea-reason { font-size: var(--fs-ui); color: var(--text); margin: var(--space-1) 0; }
.idea-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.idea-metoo { min-height: 44px; min-width: 44px; }
.idea-reply, .idea-staff { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.idea-reply input[type="text"], .idea-staff input[type="text"] { flex: 1 1 10em; min-width: 0; min-height: 44px; box-sizing: border-box; }
.idea-staff select, .idea-reply .btn, .idea-staff .btn { min-height: 44px; }
.idea-tick { display: flex; align-items: center; gap: 8px; font-size: var(--fs-ui); min-height: 44px; color: var(--text); }
.idea-tick input[type="checkbox"] { width: 20px; height: 20px; flex: 0 0 auto; }
.idea-form { margin: 10px 0; }
.idea-form input[type="text"], .idea-form textarea, .idea-form select { width: 100%; box-sizing: border-box; min-height: 44px; }
.idea-warning, .idea-hint { margin-bottom: 10px; }
.idea-similar { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); padding: 8px; margin-bottom: 12px; }
.idea-similar-row { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; padding: 4px 0; overflow-wrap: anywhere; }
.idea-filter { margin: 10px 0; }
.idea-empty { margin: 12px 0; }
.coming-group h4 { margin: 12px 0 6px; font-size: var(--fs-title); color: var(--text); }
.coming-row { margin-bottom: 8px; overflow-wrap: anywhere; }
.idea-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.idea-note { overflow-wrap: anywhere; color: var(--text); }
.idea-chip { white-space: normal; text-transform: none; letter-spacing: 0; max-width: 100%; }
.idea-merged { font-size: var(--fs-sm); color: var(--text-dim); margin: var(--space-1) 0; }
.idea-staff input[type="number"] { flex: 1 1 8em; min-width: 0; min-height: 44px; box-sizing: border-box; }

/* THE WORKSPACE BESIDE THE SCHEDULE GRID (web/products/schedule/workspace-panel.js;
   Chris, 25 Nov 2026: requests, vacation, pins, builds and import "reachable from
   the same page"). A strip of five buttons above the grid; one panel opens to the
   right of it, and the grid keeps the rest of the width. Every colour is a token
   already defined in both themes, so there is nothing here that reads in one
   theme and not the other: text is --text on --panel (and --text-dim for help),
   the open tab is --on-accent on --accent-fill, the run chips reuse the grid's own
   vacation, no-call and unavailable inks. */
.ws-shell { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ws-strip {
  flex: none; display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap;
  padding: var(--space-1) var(--space-3); border-bottom: 1px solid var(--line-soft);
  background: var(--panel);
}
.ws-strip-label { font-size: var(--fs-sm); color: var(--text-dim); margin-right: var(--space-1); }
.ws-tab {
  display: inline-flex; align-items: center; gap: var(--space-1);
  min-height: 28px; padding: 0 var(--space-3); border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--text);
  font: inherit; font-size: var(--fs-sm); cursor: pointer; white-space: nowrap;
}
.ws-tab:hover { background: var(--panel-3); }
.ws-tab.on { background: var(--accent-fill); border-color: transparent; color: var(--on-accent); font-weight: 600; }
.ws-tab:focus-visible, .ws-close:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }
.ws-count {
  min-width: 18px; padding: 0 5px; border-radius: 999px; text-align: center;
  font-size: var(--fs-sm); line-height: 18px; background: var(--panel-3); color: var(--text);
}
.ws-tab.on .ws-count { background: var(--on-accent); color: var(--accent-ink); }
.ws-body { flex: 1; min-height: 0; display: flex; position: relative; }
.ws-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.ws-main > * { flex: 1; min-height: 0; }
.ws-dock {
  flex: none; width: min(400px, 46%); min-width: 0; display: flex; flex-direction: column;
  border-left: 1px solid var(--line); background: var(--panel); color: var(--text);
}
.ws-dock-head {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--line-soft);
}
.ws-title { margin: 0; font-size: var(--fs-title); color: var(--text); }
.ws-head-acts { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); }
.ws-widths { display: inline-flex; gap: var(--space-1); }

/* THE EQUITY PANEL OVER THE GRID (Chris, 28-29 Nov 2026: a drag handle and
   Narrow / Wide / Full; the panel overlays the grid). Absolutely placed in
   .ws-body, so the grid in .ws-main keeps its full width and nothing reflows as
   the panel opens, closes or is dragged. --ws-dock-w is set by
   workspace-panel.js (pixels, or 100% for Full) and is capped at the body, so a
   remembered width wider than this window still fits it. Below dialogs (50)
   and the grid's popovers (20 and up), above the grid's sticky headers. Every
   colour is a token both themes define: --panel, --line, --line-strong,
   --accent-fill and --shadow, which is a theme colour in each. */
:root { --ws-dock-w: 420px; }   /* Narrow; workspace-panel.js sets it on the dock itself */
.ws-dock.ws-over {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 12;
  width: min(var(--ws-dock-w), 100%); max-width: 100%;
  box-shadow: var(--shadow);
}
/* THE GRID'S LAST COLUMNS CAN BE SCROLLED CLEAR OF THE OPEN PANEL (29 Nov 2026
 * review, M1). The panel lies over the grid's right-hand end, so Sa and Su would
 * sit under it and could never scroll out. The grid's own scroll box takes the
 * panel's width as end padding: its box keeps its size, and only the scrollable
 * run inside it is longer. Only the last columns scroll clear. The grid's
 * vertical scrollbar sits at the box's right edge, which padding does not move,
 * so it stays under the dock; wheel and keyboard scrolling still reach the grid.
 * Wide screens only; at 900px and under
 * the panel is the bottom drawer and covers no part of the grid's right end.
 * --ws-dock-w is set on .ws-body by workspace-panel.js and is capped the same way
 * the dock caps it. Tokens only, so both themes carry it. */
@media (min-width: 901px) {
  .ws-body:has(> .ws-dock.ws-over) .grid-wrap {
    padding-right: min(var(--ws-dock-w), 100%);
    scroll-padding-right: min(var(--ws-dock-w), 100%);
  }
}
.ws-grip {
  position: absolute; top: 0; bottom: 0; left: -6px; width: 12px; z-index: 1;
  cursor: col-resize; touch-action: none; background: transparent;
}
.ws-grip::before {
  content: ''; position: absolute; top: 50%; left: 4px; width: 4px; height: 44px;
  margin-top: -22px; border-radius: 2px; background: var(--line-strong);
}
.ws-grip:hover::before, .ws-dragging .ws-grip::before { background: var(--accent-fill); }
.ws-grip:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: -2px; }
.ws-grip:focus-visible::before { background: var(--accent-fill); }
.ws-dragging { user-select: none; }
/* Motion only for a preset or an arrow press, never under the pointer, and
   never for a reader who asked the system for less of it. */
@media (prefers-reduced-motion: no-preference) {
  .ws-dock.ws-over:not(.ws-dragging) { transition: width .16s ease-out; }
}
.ws-dock-body { flex: 1; min-height: 0; overflow: auto; padding: var(--space-3); overflow-wrap: anywhere; }
.ws-compact .help { color: var(--text-dim); font-size: var(--fs-sm); margin: var(--space-1) 0; }
.ws-compact .reqdel { padding: var(--space-2); }
.ws-pins { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.ws-pin-day h4 { margin: var(--space-3) 0 var(--space-1); font-size: var(--fs-ui); color: var(--text); }
.ws-pin-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-1) var(--space-2); padding: var(--space-1) 0; font-size: var(--fs-ui); color: var(--text);
  border-bottom: 1px solid var(--line-soft); }
.ws-pin-what { min-width: 0; overflow-wrap: anywhere; }
.ws-pin-acts { display: inline-flex; gap: var(--space-2); }

/* NARROW: A DRAWER FROM THE BOTTOM (Chris, 25-26 Nov 2026). Where the page
   stacks -- 900px and under, where the rail and the right-hand rule check have
   already gone -- the workspace is not a column beside the grid. The grid keeps
   its full width; the strip becomes a bar along the bottom edge (above the phone
   tab bar), one tap on a button opens the panel over the grid from that bar, and
   the RULE CHECK is one more button of the same strip: its own #drawer, which
   this width hides, is shown in the same place while that panel is open (the
   :has() rule below), so there is one drawer and not two. Above the phone tab
   bar and the grid, below dialogs (z-index 50) so one opened from a panel sits on
   top. Tokens only: --panel, --line, --shadow, --text are defined in both
   themes. */
@media (max-width: 900px) {
  :root {
    --ws-bottom: calc(62px + env(safe-area-inset-bottom, 0px));
    --ws-strip-h: 52px;
    --ws-head-h: 52px;
    --ws-drawer-h: min(60vh, 520px);
  }
  .ws-shell { padding-bottom: var(--ws-strip-h); }
  .ws-strip {
    position: fixed; left: 0; right: 0; bottom: var(--ws-bottom); z-index: 46;
    height: var(--ws-strip-h); box-sizing: border-box; flex-wrap: nowrap; overflow-x: auto;
    border-bottom: 0; border-top: 1px solid var(--line);
  }
  .ws-strip-label { display: none; }
  .ws-dock {
    position: fixed; left: 0; right: 0; bottom: calc(var(--ws-bottom) + var(--ws-strip-h));
    height: var(--ws-drawer-h); z-index: 45; width: auto;
    border-left: 0; border-top: 1px solid var(--line); box-shadow: var(--shadow);
  }
  /* The overlay is the drawer here too: full width, whatever width was
     remembered on a wider screen, and nothing to drag. */
  .ws-dock.ws-over {
    position: fixed; top: auto; left: 0; right: 0; bottom: calc(var(--ws-bottom) + var(--ws-strip-h));
    z-index: 45; width: auto; max-width: none;
  }
  .ws-grip, .ws-widths { display: none; }
  .ws-dock-head { min-height: var(--ws-head-h); box-sizing: border-box; }
  .ws-tab, .ws-close { min-height: 44px; }
  .ws-dock .btn.small { min-height: 44px; }
  body:has(.ws-dock[data-ws-panel="rule"]) .drawer {
    display: flex; flex-direction: column; position: fixed; left: 0; right: 0;
    bottom: calc(var(--ws-bottom) + var(--ws-strip-h));
    height: calc(var(--ws-drawer-h) - var(--ws-head-h)); max-height: none; width: auto;
    z-index: 46; background: var(--panel); border: 0; border-top: 1px solid var(--line-soft);
  }
  body:has(.ws-dock[data-ws-panel="rule"]) .drawer .list { display: block; }
  body:has(.ws-dock[data-ws-panel="rule"]) .drawer h3 { flex-direction: row; height: auto; padding: 8px 12px; }
  body:has(.ws-dock[data-ws-panel="rule"]) .drawer .drawer-title,
  body:has(.ws-dock[data-ws-panel="rule"]) .drawer .chip { writing-mode: horizontal-tb; }
  body:has(.ws-dock[data-ws-panel="rule"]) .drawer .drawer-toggle,
  body:has(.ws-dock[data-ws-panel="rule"]) .drawer .drawer-grip { display: none; }
}

/* A BLOCK ON ITS WAY IN, and a published block that has ended in the Blocks
 * dialog (26 Nov 2026). Tokens only, so both themes carry them. */
.block-loading { padding: 24px 16px; color: var(--text-dim); }
.block-loading .lede { margin: 0; }
.help.block-ended { color: var(--text-dim); }

/* THE EQUITY SCOPE BAR AND THE SCHEDULE'S EQUITY PANEL (Chris, 26 Nov 2026).
 *
 * Tokens only, so both themes are official: every colour below is one --ecg,
 * --pa, --warn, --art, --brand or a surface that the light and the dark block
 * both define. Nothing is drawn in a literal. Dark is the bare :root's home and
 * light redefines the same names, so nothing here needs a theme block of its
 * own. No text is drawn ON an accent fill: the tag and the verdicts are accent
 * INK on a panel surface, which is the pairing both themes already measure. */
/* THE EQUITY PAGE'S TWO TABS (Chris, 28-29 Nov 2026): Matrix | Per-partner
 * totals. The open tab is --text on the panel with an --accent-fill underline,
 * the others --text-dim; the words carry the state and the underline only
 * underlines it. Tokens both themes define, so nothing here needs a theme block. */
.eq-tabs { display: flex; flex-wrap: wrap; gap: var(--space-1); margin: 0 0 var(--space-3);
  border-bottom: 1px solid var(--line); }
.eq-tab { min-height: 36px; padding: 0 var(--space-3); margin-bottom: -1px; border: 0;
  border-bottom: 3px solid transparent; background: transparent; color: var(--text-dim);
  font: inherit; font-size: var(--fs-ui); cursor: pointer; }
.eq-tab:hover { color: var(--text); background: var(--panel-2); }
.eq-tab.on { color: var(--text); font-weight: 600; border-bottom-color: var(--accent-fill); }
.eq-tab:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: -2px; }
.eq-tabpanel { min-width: 0; }
.eq-scopebar { align-items: center; row-gap: var(--space-2); margin: var(--space-2) 0; }
.eq-pick { min-width: 0; max-width: 100%; }
/* "draft counts" / "published only": a small label, never the only signal --
 * the words say it, the border and weight only underline it. */
.eq-tag {
  display: inline-block; padding: 0 var(--space-2); margin-right: var(--space-1);
  border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 600; line-height: 18px;
  color: var(--text-dim); background: var(--panel-2); vertical-align: baseline;
}
.eq-tag.draft { border-color: var(--pa); color: var(--pa); }

/* The Schedule panel's scope chips sit above whatever the panel says, so a scope with nothing to show can be left by a click. */
.eqi-wrap { display: grid; gap: var(--space-2); }
.eqi-wrap > .eq-scopebar { margin: 0; flex-wrap: wrap; }
.eqi h4 { margin: var(--space-3) 0 var(--space-1); font-size: var(--fs-ui); color: var(--text); }
/* The pre-publish read-out sits in the Publish confirmation, above the finding
 * card, so it is set off from the paragraphs around it by a hairline. Tokens
 * only; both themes define each of them. */
.eqi-publish { margin: var(--space-3) 0; padding: var(--space-2) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* THE FAIRNESS-BY-SHIFT-TYPE MATRIX (Chris, 28 Nov 2026), drawn by
 * web/products/schedule/fairness-matrix.js in the Schedule panel and in the
 * pre-publish dialog. App tokens only, so both official themes carry it: grey
 * is before, the brand green is with the draft, --spo2 is the least in a pool
 * and --warn the most. The matrix scrolls INSIDE .eqm-scroll; min-width: 0 up
 * the chain is what stops it widening the page on a phone. */
.eqi-wrap, .eqi, .eqm { min-width: 0; max-width: 100%; }
.eqm { display: grid; gap: var(--space-2); }
.eqm-show { display: flex; flex-wrap: wrap; gap: var(--space-1); align-items: center; }
.eqm-lbl { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.eqm-legend { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); font-size: var(--fs-xs); color: var(--text-dim); }
.eqm-sw { display: inline-block; width: 18px; height: 6px; margin-right: var(--space-1); border-radius: 2px; vertical-align: middle; }
.eqm-sw.before { background: var(--grey); opacity: .55; }
.eqm-sw.after { background: var(--brand); }
.eqm-sw.least { background: var(--spo2); }
.eqm-sw.most { background: var(--warn); }
.eqm-sw.hatch { height: 10px; border: 1px solid var(--line);
  background: repeating-linear-gradient(135deg, var(--panel-2) 0 3px, var(--line) 3px 4px); }
.eqm-scroll { overflow: auto; max-height: 70vh; max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); }
.eqm-scroll:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
:root { --eqm-g-h: 3.5rem; }   /* the matrix's group-header row: tall enough for the tiers toggle, and the sticky row below sits under it */
.eqm-table { border-collapse: separate; border-spacing: 0; font-size: var(--fs-xs); }
.eqm-table th, .eqm-table td { padding: 0; border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); vertical-align: top; background: var(--panel); }
.eqm-table thead th { position: sticky; z-index: 3; }
.eqm-table tr.eqm-g th { top: 0; height: var(--eqm-g-h); overflow: hidden; padding: var(--space-1) var(--space-2); text-align: left; background: var(--panel-2);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); white-space: normal; line-height: 1.2; }
.eqm-table tr.eqm-hr th { top: var(--eqm-g-h); text-align: left; padding: var(--space-2); min-width: 132px; max-width: 132px; font-weight: 400; }
.eqm-table .eqm-who { text-align: left; position: sticky; left: 0; z-index: 2; min-width: 96px; max-width: 96px; padding: var(--space-1) var(--space-2);
  font-weight: 600; white-space: nowrap; background: var(--panel); vertical-align: middle; }
.eqm-table thead th.eqm-who { z-index: 5; }
.eqm-table tr.eqm-g th.eqm-who { background: var(--panel-2); }
.eqm-counts { background: var(--panel-2) !important; }
th.eqm-h { vertical-align: top; }
.eqm-name { display: block; font-weight: 600; color: var(--text); }
.eqm-pool, .eqm-gap { display: block; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.eqm-range { display: flex; justify-content: space-between; margin-top: var(--space-1); font-variant-numeric: tabular-nums; }
.eqm-range .least { color: var(--spo2); font-weight: 500; }
.eqm-range .most { color: var(--warn); font-weight: 500; }
.eqm-rail { position: relative; display: block; height: 6px; margin: var(--space-1) 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--spo2), var(--grey), var(--warn)); opacity: .6; }
.eqm-mean { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); }
.eqm-verdict { font-weight: 600; color: var(--text-dim); }
.eqm-verdict.narrower { color: var(--accent-ink); }
.eqm-verdict.wider { color: var(--warn); }
.eqm-c { min-width: 132px; max-width: 132px; height: 34px; padding: 5px var(--space-2) !important; }
.eqm-cell { display: flex; align-items: center; gap: var(--space-1); }
.eqm-track { position: relative; flex: 1; height: 14px; border-radius: 3px; background: var(--panel-2); }
.eqm-bar { position: absolute; left: 0; border-radius: 3px; }
.eqm-bar.before { top: 0; height: 6px; background: var(--grey); opacity: .55; }
.eqm-bar.after { top: 7px; height: 7px; background: var(--brand); }
.eqm-bar.count { top: 3px; height: 8px; background: var(--grey); }
.eqm-val { min-width: 44px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text); }
td.eqm-no { text-align: center; vertical-align: middle; color: var(--text-dim);
  background: repeating-linear-gradient(135deg, var(--panel-2) 0 4px, var(--panel) 4px 8px); }
td.eqm-unranged .eqm-bar { opacity: .5; }
td.eqm-unranged .eqm-track { outline: 1px dashed var(--line-strong); }
.eqm-sw.dashed { height: 10px; border: 1px dashed var(--line-strong); background: var(--panel-2); }
.eqm-why { display: block; font-size: var(--fs-xs); color: var(--text-dim); font-variant-numeric: tabular-nums; }
.eqm-tiers { margin-left: var(--space-2); text-transform: none; letter-spacing: 0; }
.eqm-tag { display: block; font-size: var(--fs-xs); font-weight: 400; color: var(--warn); white-space: normal; line-height: 1.2; }
td.eqm-pending { background: var(--panel-2); }
.eqm-table tbody tr:hover td:not(.eqm-no) { background-image: linear-gradient(var(--accent-soft), var(--accent-soft)); }
.eqm-foot { margin: 0; }
