/* Atlas: design tokens (S0b, Material 3 Expressive).
   Spec: docs/superpowers/specs/2026-10-10-visual-style-m3-expressive.md. Names follow Material 3 colour roles.
   Every colour is light-dark(LIGHT, DARK): the theme is chosen by color-scheme on <html> (theme-light,
   theme-dark, or none = the device setting). tests/style.rs reads the pairs below and checks WCAG AA contrast
   in both themes, so keep one token per line in the form  --name: light-dark(#RRGGBB, #RRGGBB);  */

:root {
  color-scheme: light dark;

  /* Brand and accent roles */
  --primary: light-dark(#0B52CC, #B3C5FF);
  --on-primary: light-dark(#FFFFFF, #002B75);
  --primary-container: light-dark(#DAE1FF, #0047B8);
  --on-primary-container: light-dark(#001849, #DAE1FF);
  --secondary-container: light-dark(#E3EEFF, #414659);
  --on-secondary-container: light-dark(#002249, #DDE2F9);
  --tertiary: light-dark(#735471, #E2BBDC);

  /* Surfaces: tonal steps instead of borders and shadows */
  --bg: light-dark(#F2F3FE, #11131B);
  --card: light-dark(#FFFFFF, #1D1F27);
  --surface-container: light-dark(#EDEDF8, #1D1F27);
  --surface-container-high: light-dark(#E7E7F2, #282A32);
  --surface-container-highest: light-dark(#E1E2ED, #32343D);
  --on-surface: light-dark(#191B23, #E1E2ED);
  --on-surface-variant: light-dark(#424654, #C3C6D7);
  --inverse-surface: light-dark(#2E3038, #E1E2ED);
  --inverse-on-surface: light-dark(#F0F0FB, #2E3038);
  --inverse-primary: light-dark(#B3C5FF, #0C59DB);

  /* Lines and focus */
  --outline: light-dark(#737686, #8D90A0);
  --outline-variant: light-dark(#C3C6D7, #424654);
  --divider: light-dark(#E1E2ED, #32343D);
  --focus: light-dark(#0C59DB, #B3C5FF);

  /* Status: container + on-container text (chips, tiles, banners) */
  --ok: light-dark(#1E7B34, #98D598);
  --ok-container: light-dark(#CAF3C7, #1F5027);
  --on-ok-container: light-dark(#003911, #98D598);
  --warn-container: light-dark(#FFE4C4, #633F00);
  --on-warn-container: light-dark(#452B00, #F9BB64);
  --danger: light-dark(#A8221B, #FFB4AB);
  --on-danger: light-dark(#FFFFFF, #690005);
  --danger-container: light-dark(#FFE2DD, #410E0B);
  --on-danger-container: light-dark(#5F150F, #FFB4AB);
  --info-container: light-dark(#DEE9FF, #173F8A);
  --on-info-container: light-dark(#00315F, #B3C5FF);
  --neutral-container: light-dark(#E7E7F2, #32343D);
  --on-neutral-container: light-dark(#424654, #C3C6D7);

  /* Charts (S6): categorical lines and bars, in this fixed order (validated for colour-blind readers, light and dark).
     --chart-3 is under 3:1 on the light card, so a chart always has its words and a table beside it. */
  --chart-1: light-dark(#2A78D6, #3987E5);
  --chart-2: light-dark(#EB6834, #D95926);
  --chart-3: light-dark(#1BAF7A, #199E70);

  /* The Dashboard hero band and its action */
  --hero-action: light-dark(#0C59DB, #DAE1FF);
  --on-hero-action: light-dark(#FFFFFF, #001849);
  /* The soft shape behind the hero text: it darkens the band in dark, so the text keeps its contrast */
  --hero-shape: light-dark(rgb(12 89 219 / 0.12), rgb(0 24 73 / 0.22));
  /* The logo has no reversed version yet: in dark it sits on a white plate */
  --logo-plate: light-dark(#FFFFFF00, #FFFFFF);
  --scrim: light-dark(rgb(12 14 21 / 0.36), rgb(4 5 9 / 0.6));

  /* Scale (owner decision 2026-10-12, the denser scale): the root is 15 px (93.75 % of the browser's own 16 px; it
     was 17 px), and every size below and in the other files is in rem, so this one number scales the whole
     interface. Only hairlines and offsets of 1 to 3 px, shadows and letter-spacing stay in px (tests/style.rs). */
  --root-size: 93.75%;

  /* Type: Lato 400 body, 700 for every title, label and number (the emphasized scale).
     Body text is 16 px (1.0625rem), labels and small text 15 px (1rem). Nothing is drawn smaller than 14 px. */
  --font: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --t-display-s: 700 2.25rem/2.75rem var(--font);
  --t-headline-m: 700 1.75rem/2.25rem var(--font);
  --t-headline-s: 700 1.5rem/2rem var(--font);
  --t-title-l: 700 1.375rem/1.75rem var(--font);
  --t-title-m: 700 1.125rem/1.625rem var(--font);
  --t-title-s: 700 1rem/1.5rem var(--font);
  --t-body-l: 400 1.0625rem/1.625rem var(--font);
  --t-body-m: 400 1rem/1.5rem var(--font);
  --t-label-l: 700 1rem/1.5rem var(--font);
  --t-label-m: 700 1rem/1.25rem var(--font);

  /* Shape ladder (Expressive), in rem like every size: about 4, 8, 11, 15, 19, 26 and 30 px at the 15 px root */
  --r-xs: 0.25rem;
  --r-sm: 0.5rem;
  --r-md: 0.75rem;
  --r-lg: 1rem;
  --r-lg-plus: 1.25rem;
  --r-xl: 1.75rem;
  --r-xl-plus: 2rem;
  --r-full: 9999px;

  /* Elevation: only floating things (menus, dialogs, toasts). Shadows vanish in dark; surfaces step up instead. */
  --shadow: light-dark(rgb(16 24 40 / 0.10), rgb(0 0 0 / 0));
  --shadow-soft: light-dark(rgb(16 24 40 / 0.06), rgb(0 0 0 / 0));
  --e-1: 0 1px 2px var(--shadow-soft), 0 1px 3px var(--shadow);
  --e-2: 0 4px 8px -2px var(--shadow), 0 2px 4px -2px var(--shadow-soft);
  --e-3: 0 20px 24px -4px var(--shadow), 0 8px 8px -4px var(--shadow-soft);

  /* State layers, drawn with color-mix(in srgb, currentColor N%, transparent) */
  --state-hover: 8%;
  --state-press: 12%;

  /* Motion: M3 easing and Expressive spring curves. All of it is off under prefers-reduced-motion (base.css). */
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-effects: cubic-bezier(0.2, 0.6, 0.35, 1);
  --d-short: 150ms;
  --d-medium: 250ms;
  --spring-default: linear(0, 0.071, 0.227, 0.405, 0.572, 0.712, 0.82, 0.898, 0.95, 0.983, 1.002, 1.012, 1.015, 1.015, 1.013, 1.01, 1.007, 1.005, 1.003, 1.002, 1);
  --d-spring: 435ms;
  --spring-fast: linear(0, 0.104, 0.33, 0.579, 0.795, 0.95, 1.044, 1.087, 1.094, 1.08, 1.057, 1.034, 1.015, 1.002, 0.994, 0.991, 0.991, 0.993, 0.995, 0.997, 1);
  --d-spring-fast: 360ms;

  /* Sizes and layout (px at the 15 px root) */
  --target: 2.75rem;           /* 41 px: the smallest click target anywhere (never under 40 px) */
  --control-h: 3rem;           /* 45 px fields */
  --row-h: 3.25rem;            /* 49 px table rows */
  --rail-w: 7.5rem;            /* 112 px collapsed rail, 40-80rem: "Administration" at 15 px bold is 101 px */
  --sidebar-w: 17.5rem;        /* 263 px expanded rail, from 80rem: a name and its count on one line (shell.css) */
  --appbar-h: 4.25rem;         /* 64 px */
  --rail-item-h: 3.2rem;       /* 48 px rail items (Dashboard and the sections) */
  --nav-link-h: 2.8rem;        /* 42 px pages inside a section, in the rail and in a flyout */
  --gutter: 1rem;
  /* W14 B1: ONE spacing scale (4, 8, 12, 16, 24, 32 px at the 15 px root; they grow with the root size). Paddings,
     gaps and margins of the Dashboard use only these; other pages adopt them as they are touched. */
  --space-1: calc(4rem / 15);
  --space-2: calc(8rem / 15);
  --space-3: calc(12rem / 15);
  --space-4: calc(16rem / 15);
  --space-5: calc(24rem / 15);
  --space-6: calc(32rem / 15);
  /* W14 (ux-redesign rule 10): the Dashboard's own targets are 48 px (chips, period switch, (i), Table). */
  --target-l: calc(48rem / 15);
}

html.theme-light { color-scheme: light; }
html.theme-dark { color-scheme: dark; }

/* 1.5rem (M3's 24 dp margin) from 40rem on. From 80rem it was 2rem until 2026-10-16, when the expanded rail took
   those 2 x 0.5rem (15 px) to hold a menu item's name and its count on one line: a card is as wide as it was at
   every window (972 px at 1280), so every table measured against it still fits. */
@media (min-width: 40rem) { :root { --gutter: 1.5rem; } }

/* Base: fonts, page defaults, focus, icons, and the media-query rules every part follows. */

@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/lato-400.woff2") format("woff2");
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/lato-700.woff2") format("woff2");
}

*, *::before, *::after { box-sizing: border-box; }

/* A hidden element stays hidden even when a component rule (.btn is inline-flex) sets display. */
[hidden] { display: none !important; }

html {
  /* The one number that scales the interface (tokens.css): every rem follows it. */
  font-size: var(--root-size);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  color: var(--on-surface);
  accent-color: var(--primary);
  /* Sticky bars never cover the focused element (WCAG 2.4.11). */
  scroll-padding-block: calc(var(--appbar-h) + 0.5rem) 6rem;
}
body { margin: 0; min-height: 100dvh; font: var(--t-body-l); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
a { color: var(--primary); text-underline-offset: 3px; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-size: 1rem; }
strong, b { font-weight: 700; }

h1 {
  font: var(--t-headline-s);
  font-size: clamp(1.5rem, 1.2rem + 1.05vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.2px;
}
h2 { font: var(--t-title-l); }
h3 { font: var(--t-title-m); }
h4 { font: var(--t-title-s); }

/* Focus is always visible: a real outline (forced-colors keeps it), 3 px, offset. */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; inset-inline-start: 0.5rem; top: -6rem; z-index: 200;
  padding: 0.75rem 1.25rem; border-radius: var(--r-full);
  background: var(--primary); color: var(--on-primary); font: var(--t-label-l); text-decoration: none;
}
.skip-link:focus { top: 0.5rem; }

/* Icons: always inside .icon-label next to their word (icons::label), sized with the text, coloured like it. */
.icon { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; }
.icon-label { display: inline-flex; align-items: center; gap: 0.5rem; }

.hint { color: var(--on-surface-variant); font: var(--t-body-m); }
.lede { color: var(--on-surface-variant); max-width: 70ch; margin-bottom: 1.25rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.stack { display: grid; gap: 1.25rem; min-width: 0; }

/* A date and its time never break ("13 Oct 2026, 1:51 am IST" does not end one line with "1:51"). */
time { font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }

/* Motion is opt-in: nothing moves for people who ask for less motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* More contrast on request: muted text becomes full text, dividers become outlines. */
@media (prefers-contrast: more) {
  :root { --on-surface-variant: var(--on-surface); --divider: var(--outline); --outline-variant: var(--outline); }
}

/* Windows High Contrast: selection and focus use system colours; chips keep a border. */
@media (forced-colors: active) {
  :focus-visible { outline: 3px solid Highlight; }
  [aria-current="page"] { outline: 2px solid Highlight; }
  .status, .card, .fsec, .banner, .toast { border: 1px solid CanvasText; }
}

/* Components (web/STYLE.md lists each with its markup). Later pages use these classes and never hand-roll styles. */

/* ---- Buttons: pill at rest, square off to the field radius while pressed (fast spring). 41 px, never under 40. ---- */
.btn {
  --h: var(--target);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: var(--h); min-width: var(--target); padding: 0 1.5rem;
  border: 0; border-radius: calc(var(--h) / 2); background: transparent; color: var(--primary);
  font: var(--t-label-l); text-decoration: none; white-space: nowrap; cursor: pointer;
  position: relative; isolation: isolate;
  transition: border-radius var(--d-spring-fast) var(--spring-fast), box-shadow var(--d-short) var(--ease-effects);
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: currentColor; opacity: 0; transition: opacity var(--d-short) var(--ease-effects);
}
.btn:hover::after { opacity: 0.08; }
.btn:active::after { opacity: 0.12; }
.btn:active { border-radius: var(--r-md); }
.btn .icon { width: 1.2rem; height: 1.2rem; }
.btn-filled { background: var(--primary); color: var(--on-primary); }
.btn-filled:hover { box-shadow: var(--e-1); }
.btn-tonal { background: var(--secondary-container); color: var(--on-secondary-container); }
.btn-outlined { box-shadow: inset 0 0 0 1px var(--outline); }
.btn-text { padding: 0 0.75rem; }
.btn-danger { box-shadow: inset 0 0 0 1px var(--danger); color: var(--danger); }
.btn-m { --h: 3.2rem; padding: 0 1.75rem; font: var(--t-title-m); }
.btn-m:active { border-radius: var(--r-lg); }
.btn-m .icon { width: 1.4rem; height: 1.4rem; }
.btn-wide { width: 100%; }
/* A button whose words come from a record's name and may be long ("Arm A: 10 minutes after publishing"): they wrap
   instead of running off a phone. */
.btn-wrap { white-space: normal; padding-block: 0.5rem; text-align: start; }
/* UX-review-letter G1 (UX fixes spec 2026-10-25 3.6, STYLE.md "Blocked button", UA42, UA79): a blocked button looks
   blocked. A blocked main action is aria-disabled (a tap still reaches it and says why: app.js, crate::blocked), a
   plain one disabled; both are greyed, with no shadow and no hover or press layer. A busy button (c::busy_button,
   disabled while its form is sent) keeps its colour: its loading face shows in it (STYLE.md). */
.btn[aria-disabled="true"], .btn:disabled:not([data-busy]) {
  background: var(--surface-container-highest); color: color-mix(in srgb, var(--on-surface) 38%, transparent);
  box-shadow: none; cursor: not-allowed;
}
.btn[aria-disabled="true"]::after, .btn:disabled::after { opacity: 0; }
.btn[aria-disabled="true"]:active, .btn:disabled:active { border-radius: calc(var(--h) / 2); }

/* On a phone an action button takes the width it can, so none stands alone beside empty space: in a row of buttons
   (.row: Try again, Open in Upwork and Mark as submitted in Upwork) one fills the row, two short ones share it, and two
   that do not fit take a row each. A text button (Copy, a link) keeps its own width. The page header, a submit row,
   the action bar, a dialog and a table's action cell do the same in their own rules. */
@media (max-width: 39.99rem) {
  .row > .btn-filled, .row > .btn-tonal, .row > .btn-outlined, .row > .btn-danger { flex: 1 1 auto; }
  /* A button with long words (the failover's "Send through <Scanner>", "Apply from <freelancer> anyway") takes the
     whole row and may shrink below its words, which then wrap. */
  .btn-wrap { width: 100%; min-width: 0; max-width: 100%; }
  .row > .btn-wrap { flex: 1 1 100%; }
}

/* ---- Connected button group (radio buttons): 2 px apart, outer ends round, the chosen one fully round ---- */
.choice-group { display: grid; gap: 0.5rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.choice-group legend { padding: 0; margin-bottom: 0.5rem; font: var(--t-label-l); }
.choice-row { display: flex; flex-wrap: wrap; gap: 2px; }
.choice {
  position: relative; display: inline-flex; align-items: center; min-height: var(--target); padding: 0 1.125rem;
  border-radius: var(--r-sm); background: var(--surface-container-high); color: var(--on-surface-variant);
  font: var(--t-label-l); cursor: pointer;
  transition: border-radius var(--d-spring-fast) var(--spring-fast), background-color var(--d-short) var(--ease-effects);
}
.choice:first-child { border-start-start-radius: calc(var(--target) / 2); border-end-start-radius: calc(var(--target) / 2); }
.choice:last-child { border-start-end-radius: calc(var(--target) / 2); border-end-end-radius: calc(var(--target) / 2); }
.choice:hover { background: color-mix(in srgb, var(--on-surface) 8%, var(--surface-container-high)); }
.choice:has(input:checked) { background: var(--primary); color: var(--on-primary); border-radius: calc(var(--target) / 2); }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
/* A segment that cannot be chosen now (the page says why beside the group): muted, no hover. */
.choice:has(input:disabled), .choice:has(input:disabled):hover { background: var(--surface-container); cursor: not-allowed; }
.choice input:disabled { cursor: not-allowed; }
.choice .icon { width: 1.2rem; height: 1.2rem; }
/* The radio button covers its whole segment: invisible, but it is what the keyboard and screen readers use. */
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
/* Four options stand two and two, never three and one (what a new experiment tests): equal segments in two columns,
   the group's four outer corners round. A segment's words may take two lines on a phone. */
.choice-pairs .choice-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-pairs .choice { padding-block: 0.375rem; }
.choice-pairs .choice:first-child { border-end-start-radius: var(--r-sm); }
.choice-pairs .choice:nth-child(2) { border-start-end-radius: calc(var(--target) / 2); }
.choice-pairs .choice:nth-last-child(2) { border-end-start-radius: calc(var(--target) / 2); }
.choice-pairs .choice:last-child { border-start-end-radius: var(--r-sm); }
.choice-pairs .choice:has(input:checked) { border-radius: calc(var(--target) / 2); }
/* A group whose segments do not fit one line stacks instead of wrapping ragged: one column of full-width segments
   2 px apart, the first round on top, the last at the bottom, the chosen one still a full pill. .choice-stack
   stacks below 40rem (two long choices: who answers a Selection Prompt); .choice-stack-m below 80rem (three long
   choices in a form section: a Scanner's autopilot). A stacked group is 28rem at most, as a dropdown is. The two
   blocks below are the same rules at two widths. */
@media (max-width: 39.99rem) {
  .choice-stack .choice-row { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 28rem; }
  .choice-stack .choice { padding-block: 0.375rem; border-radius: var(--r-sm); }
  .choice-stack .choice:first-child { border-start-start-radius: calc(var(--target) / 2); border-start-end-radius: calc(var(--target) / 2); }
  .choice-stack .choice:last-child { border-end-start-radius: calc(var(--target) / 2); border-end-end-radius: calc(var(--target) / 2); }
  .choice-stack .choice:has(input:checked) { border-radius: calc(var(--target) / 2); }
}
@media (max-width: 79.99rem) {
  .choice-stack-m .choice-row { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 28rem; }
  .choice-stack-m .choice { padding-block: 0.375rem; border-radius: var(--r-sm); }
  .choice-stack-m .choice:first-child { border-start-start-radius: calc(var(--target) / 2); border-start-end-radius: calc(var(--target) / 2); }
  .choice-stack-m .choice:last-child { border-end-start-radius: calc(var(--target) / 2); border-end-end-radius: calc(var(--target) / 2); }
  .choice-stack-m .choice:has(input:checked) { border-radius: calc(var(--target) / 2); }
}

/* U6 (spec 11): a group of long lines (New user's roles, each with what it may do, and the way to sign in) is one
   column at every width: the same shape as a stacked group above. */
.choice-column .choice-row { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 28rem; }
.choice-column .choice { padding-block: 0.375rem; border-radius: var(--r-sm); }
.choice-column .choice:first-child { border-start-start-radius: calc(var(--target) / 2); border-start-end-radius: calc(var(--target) / 2); }
.choice-column .choice:last-child { border-end-start-radius: calc(var(--target) / 2); border-end-end-radius: calc(var(--target) / 2); }
.choice-column .choice:has(input:checked) { border-radius: calc(var(--target) / 2); }

/* ---- Status chips: icon + word on a tonal container (crate::components::status) ---- */
.status {
  display: inline-flex; align-items: center; min-height: 1.875rem; padding: 0 0.75rem 0 0.5rem;
  border-radius: var(--r-full); font: var(--t-label-m); white-space: nowrap; vertical-align: middle;
  background: var(--neutral-container); color: var(--on-neutral-container);
}
.status .icon-label { gap: 0.375rem; }
.status .icon { width: 1.1rem; height: 1.1rem; }
.status-ok { background: var(--ok-container); color: var(--on-ok-container); }
.status-warn { background: var(--warn-container); color: var(--on-warn-container); }
.status-danger { background: var(--danger-container); color: var(--on-danger-container); }
.status-info { background: var(--info-container); color: var(--on-info-container); }
.status-neutral { background: var(--neutral-container); color: var(--on-neutral-container); }
/* A figure after a chip's word ("Follow-ups current: 92%", crate::components::status_value). */
.status-value { margin-inline-start: 0.25rem; font-variant-numeric: tabular-nums lining-nums; }
/* The note line directly above a report: a chip, then a sentence or two (how current follow-up is, and during the
   trial the double count). From 40rem the sentence stands beside the chip; on a phone under it. */
.note-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.75rem; min-width: 0; color: var(--on-surface-variant); font: var(--t-body-m); }
.note-line > span:last-child { flex: 1 1 18rem; min-width: 0; }

/* A count next to a menu item (Review Queue 3). The count is text; the name says what it counts. Its words never
   break inside the pill ("over 100" is one line, 70 px at the 15 px root) and a row never squeezes it (flex: none):
   where a row has too little room, the name beside it wraps, or the count takes a line of its own. */
.badge {
  display: inline-grid; place-items: center; flex: none; min-width: 1.4rem; height: 1.4rem; padding: 0 0.375rem;
  border-radius: 0.7rem; background: var(--danger); color: var(--on-danger); font: var(--t-label-m);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* ---- Cards and form sections: tonal, large corners (--r-lg-plus), no border ---- */
.card { display: grid; gap: 1rem; min-width: 0; padding: 1.25rem; border-radius: var(--r-lg-plus); background: var(--card); }
/* GigRadar's own words (a long Scanner name, a URL in an error) break where they must instead of widening the page. */
.card, #failover { min-width: 0; overflow-wrap: anywhere; }
.card-title { font: var(--t-title-l); }
/* FK-U: a small heading in label type over a group (Upwork Profile's ready-made questions, the rewrite-skipped banner). */
.label-l { font: var(--t-label-l); }
/* A card in the danger tone: what went wrong, where the page's work stopped, with the one button that fixes it (a
   job at Exception). The banner is for a message; this is a block with its own heading and action. */
.card-danger { background: var(--danger-container); color: var(--on-danger-container); }
.fsec { display: grid; gap: 1rem; min-width: 0; padding: 1.25rem; border-radius: var(--r-lg-plus); background: var(--card); }
.fsec-head h2 { font: var(--t-title-m); }
.fsec-head .hint { margin-top: 0.25rem; }
/* align-content: start, so a lone button is not stretched to the height of the hint beside it. The body is 45rem
   at most at every width (from 64rem that is its grid column; below, where the heading stands above it, a card can
   be 55rem wide), so a form grid's fields share the same rows wherever they stand side by side. */
.fsec-body { display: grid; gap: 1.25rem; align-content: start; min-width: 0; max-width: 45rem; }
@media (min-width: 64rem) {
  .card { padding: 1.75rem; }
  .fsec { grid-template-columns: 14rem minmax(0, 45rem); gap: 1rem 2rem; padding: 1.75rem; }
}

/* Two short cards side by side from 64rem (System Health: the letter writer and GigRadar), each as tall as the
   taller; one under the other below. */
.pair-grid { display: grid; gap: 1.25rem; min-width: 0; }
.pair-grid > * { min-width: 0; }
/* The shorter card is as tall as the taller, and what it holds starts at its top instead of being spread over it. */
.pair-grid > .card { align-content: start; }
@media (min-width: 64rem) { .pair-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* A row of state chips that are links to their cards (System Health's first row): each link is a 41 px target
   around its chip, and the chip says what it is the state of ("Webhook deliveries: Problems found"). */
/* W5a G12 (M082): "sent" on the copy of an Upwork job that went out, in a job's Freelancers part, stays on one line. */
.sent-mark { white-space: nowrap; }
.chip-links { display: flex; flex-wrap: wrap; gap: 0 0.5rem; margin: 0; padding: 0; list-style: none; }
.chip-link { display: inline-flex; align-items: center; gap: 0.5rem; min-height: var(--target); border-radius: var(--r-full); text-decoration: none; }
.chip-link .status { white-space: normal; }
/* W5b SH-E H15d: a filter chip that is also its own remove link (Follow-ups, by experiment). */
.chip { display: inline-flex; align-items: center; gap: 0.375rem; min-height: var(--target); padding: 0 0.75rem; border-radius: var(--r-full); }
.chip-filter { background: var(--info-container); color: var(--on-info-container); text-decoration: none; font: var(--t-body-m); }
.chip-filter:hover { box-shadow: inset 0 0 0 1px currentColor; }
.chip-link:hover .status { box-shadow: inset 0 0 0 1px currentColor; }

/* ---- Facts: label and value rows ---- */
.facts { display: grid; }
.facts > div {
  display: grid; grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr); gap: 0.75rem;
  padding: 0.625rem 0; border-bottom: 1px solid var(--divider);
}
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--on-surface-variant); }
.facts dd { font: var(--t-label-l); overflow-wrap: anywhere; }
@media (max-width: 39.99rem) { .facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
/* Facts grid: short values (a chip, a date, a number, a name) with the label above, three or four across in a main
   column, two in a side rail and on a phone. No row hairlines. A long value takes the whole row (.fact-wide). */
.facts-grid { grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr)); gap: 0.75rem 1.5rem; }
.facts-grid > div { grid-template-columns: minmax(0, 1fr); gap: 2px; align-content: start; padding: 0; border-bottom: 0; }
.facts-grid > .fact-wide { grid-column: 1 / -1; }
/* A chip longer than its column wraps inside it instead of running over the next fact. A value that takes two lines
   in a narrow column takes two even ones (a date stands over its time, not over its zone alone). */
.facts-grid .status { white-space: normal; }
.facts-grid dd { text-wrap: balance; }
/* Everywhere else a date and its time never break (base.css); in a narrow column of a facts grid, and in a table
   cell of a few words, they may take two even lines. */
.facts-grid time, .table .col-words time { white-space: normal; }
/* A status of a few words in a table cell (Knowledge's "In use · new text waits for the next build") wraps in its
   column rather than widening the table past its card. */
.table .col-words .status { white-space: normal; }
/* A second, lesser fact under a value (why an experiment stopped, under when) wraps in its fact's column. */
.facts-grid .cell-note { width: auto; max-width: none; }
/* C6: a date under a value (a snippet's Saved by and Decided by) may take two lines there too, as a date of its own does. */
.facts-grid .cell-note time { white-space: normal; }
@media (max-width: 39.99rem) { .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Facts whose label is a sentence and whose value is a chip or a few words (a Scanner's hard checks): the sentence
   at the start and its value at the end of the same line, from 40rem; on a phone the value stands under it. */
.facts-end > div { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.facts-end dt { color: var(--on-surface); }
@media (max-width: 39.99rem) { .facts-end > div { grid-template-columns: minmax(0, 1fr); } }

/* ---- Forms and fields: label above, 45 px outlined fields (--control-h) with --r-md corners ---- */
.form { display: grid; gap: 1.125rem; min-width: 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
/* Two buttons that send different forms (Replay, Mark as reviewed) stand in one row: each form is drawn as its
   button alone, as in the page header. */
.form-actions > form { display: contents; }
/* On a phone a submit row's buttons share the width: one button fills the row, two short ones stand side by side,
   and two that do not fit one row take a row each. No button stands alone beside empty space. */
@media (max-width: 39.99rem) { .form-actions > .btn, .form-actions > form > .btn { flex: 1 1 auto; } }
.field { display: grid; gap: 0.375rem; min-width: 0; }
.field > label { font: var(--t-label-l); }
/* E5: a link (`type="url"`, the Knowledge page's Add) is drawn as every text field. */
input[type="text"], input[type="email"], input[type="url"], input[type="password"], .field input[type="search"], select {
  width: 100%; min-height: var(--control-h); padding: 0 0.875rem;
  border: 1px solid var(--outline); border-radius: var(--r-md); background: var(--card); color: var(--on-surface);
  font: var(--t-body-l); transition: border-color var(--d-short) var(--ease-effects);
}
input[type="text"]:hover, input[type="email"]:hover, input[type="url"]:hover, input[type="password"]:hover,
.field input[type="search"]:hover, select:hover { border-color: var(--on-surface); }
/* No dropdown is ever page-wide, even in a template that gives it no width class. */
select { max-width: 28rem; }
input[aria-invalid="true"] { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.field-problem { color: var(--danger); font: var(--t-label-l); }
/* A problem of several lines keeps its icon on the first line, not beside the middle of the block. */
.field-problem .icon-label { align-items: flex-start; }
.field-problem .icon { width: 1.1rem; height: 1.1rem; margin-top: 0.2rem; }
/* W8 item 2: the live warning under a number field while it is 0 or under its minimum (app.js data-warn-*). */
.field-warning { margin: 0; padding: 0.25rem 0.5rem; border-radius: var(--r-sm); background: var(--warn-container); color: var(--on-warn-container); font: var(--t-label-l); }
.field-warning[hidden] { display: none; }

/* ---- Content widths: a stand-alone form or reading column that is not inside a form section ---- */
.measure { max-width: 60rem; min-width: 0; }

/* ---- Form grid (2026-10-12): fields side by side, each as wide as what it holds; one column on a phone. Every
   child carries a width class: -s (numbers, days, short fixed words), -m (a name, a stage, a date, a password),
   -l (a named record, an email, a one-line title), -full (links, long text, a hint a row shares). A child with no
   width class takes the whole row.
   20rem and 28rem are the GREATEST widths of -m and -l: each gives up to a fifth of it away (down to 16rem and
   22rem) before it wraps, so two medium fields, or a long and a short one, still share a row in a form section that
   is narrower than 45rem (574 px at a 1024 px window). ---- */
.form-grid { display: flex; flex-wrap: wrap; gap: 1.125rem 1rem; align-items: flex-start; min-width: 0; }
.form-grid > * { flex: 1 1 100%; min-width: 0; }
.form-grid > .field-s { flex: 0 1 12rem; }
.form-grid > .field-m { flex: 1 1 16rem; max-width: 20rem; }
.form-grid > .field-l { flex: 1 1 22rem; max-width: 28rem; }
.form-grid > .field-full { flex: 1 1 100%; }
/* A connected group of two or three is as wide as its segments (-fit), so two groups, or a group and a field,
   share a row; with -full, or no width class, it has the row to itself. */
.form-grid > .field-fit { flex: 0 1 auto; max-width: 100%; }
/* One field and its button on one line, the button as tall as the control and level with it. Its hint goes under
   the row. On a phone the button drops under the field at full width. */
.field-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; min-width: 0; }
.field-row > .field { flex: 1 1 12rem; }
/* A field with a width class keeps that width beside its button (an owner select, a Scanner select). */
.field-row > .field-s { flex: 0 1 12rem; }
.field-row > .field-m { flex: 0 1 20rem; }
.field-row > .field-l { flex: 0 1 28rem; }
/* Fields as wide as their words beside one button (Settings > Paused jobs: two numbers whose labels are a few words
   longer than a short field's 12rem): each label stays on one line and the button level with them. */
.field-row > .field-fit { flex: 0 1 auto; max-width: 100%; }
.field-row > .btn { --h: var(--control-h); flex: none; }
/* A problem of a field that shares its row with a button is the row's last part, not the field's: it takes a line of
   its own under both, as close as a problem is to its control inside a field, so the button stays level with the
   control. On a phone, where the button drops under the field, the problem stands between them, under its field. */
.field-row > .field-problem { flex: 1 1 100%; margin-top: -0.375rem; }
@media (max-width: 39.99rem) {
  .form-grid > .field-s, .form-grid > .field-m, .form-grid > .field-l { flex-basis: 100%; max-width: none; }
  .form-grid > .field-fit { flex-basis: 100%; }
  /* A date field fills its row like its neighbours (its 16rem cap stays from 40rem). */
  .form-grid input[type="date"] { max-width: none; }
  .field-row > .field, .field-row > .btn { flex: 1 1 100%; }
  .field-row > .field-problem { order: 1; }
  .field-row > .btn { order: 2; }
}
/* The sticky bar of a form longer than about two screens, and of the job page at Review: the main action first. */
.action-bar {
  position: sticky; bottom: 0; z-index: 15; display: flex; flex-wrap: wrap; gap: 0.5rem;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--surface-container-high); box-shadow: var(--e-2);
}
/* The bar's height, for what must keep clear of it: a field that takes focus scrolls clear of the bar (WCAG
   2.4.11), and the toast stands above it. app.js measures the bar and sets --action-bar-h on <html>; without script
   the tallest bar is assumed: one row of buttons, or on a phone two rows (the job page at Review). The room kept
   under a focused field is never less than the 6rem every page keeps.
   On a phone the bar is two rows at most, so the letter under it keeps the screen: the filled button has the first
   row, the others stand two across (a lone one fills its row). A button that would make a third row leaves the
   bar on a phone (.phone-hidden) and stands in the page instead (.phone-only: "Write new drafts", at the end of
   step 1). */
html:has(.action-bar) { --action-bar-h: 4.5rem; scroll-padding-block-end: max(6rem, calc(var(--action-bar-h) + 1.5rem)); }
/* U1 (spec 15, #16): a page with the bar ends with room as tall as the bar, so its last field and heading scroll clear
   of it at every width. */
main:has(.action-bar) { padding-block-end: var(--action-bar-h); }
@media (max-width: 39.99rem) {
  .action-bar > .btn { flex: 1 1 calc(50% - 0.25rem); min-width: 0; padding-inline: 0.75rem; }
  .action-bar > .btn-filled { flex-basis: 100%; }
  html:has(.action-bar) { --action-bar-h: 8rem; }
}
/* A part drawn on a phone only, and a part drawn everywhere but on a phone. Only one of the two is ever in the
   page for the eye, the keyboard and a screen reader. */
@media (min-width: 40rem) { .phone-only { display: none !important; } }
@media (max-width: 39.99rem) { .phone-hidden { display: none !important; } }

/* ---- Order grid: one small number per named thing (a Scanner's Writer Profiles in drafting order). Each is a
   5rem number field with the thing's name as its label beside it; three sit in a row in a form section, two at a
   1024 px window, one on a phone. The hint stands once, under the legend of the group. ---- */
.order-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(12rem, 100%), 1fr)); gap: 0.75rem 1rem; min-width: 0; }
.order-field { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.order-field > input[type="number"] { flex: none; width: 5rem; }
.order-field > label { min-width: 0; font: var(--t-label-l); overflow-wrap: anywhere; }

/* ---- Two short fields that belong together (jobs to aim for and the stop target, both per arm): side by side on a
   phone too, as the one exception a form grid makes there. Their labels, controls and hints share three rows
   (subgrid), so the two controls stay level when one label takes two lines. A problem of either stands under the
   pair (`field-problem field-full`), not inside a field. ---- */
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.375rem 1rem; min-width: 0; }
.field-pair > .field { grid-row: span 3; grid-template-rows: subgrid; }
.field-pair > .field > label { align-self: end; }
.form-grid > .field-pair { flex: 0 1 25rem; }
@media (max-width: 39.99rem) { .form-grid > .field-pair { flex-basis: 100%; } }

/* ---- Arm grid (a new experiment's arms): one row per arm from 40rem: the arm, its share (a 7rem number) and what
   it uses (12rem to 22rem, so no dropdown is page-wide), or the minutes it waits. Each arm is a fieldset with its
   legend; the legend is floated, which makes it an ordinary part of the row. The column labels show once, above the
   first row: every input keeps its own label, clipped (not removed) from the second row on, so a screen reader
   still reads it. On a phone an arm is its legend and one row: the share (6.5rem, with a shorter label) and what
   it uses in the rest. ---- */
.arm-grid { display: grid; gap: 0.75rem; min-width: 0; }
.arm {
  position: relative; display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.375rem 0.75rem; align-items: end;
  min-width: 0; margin: 0; padding: 0; border: 0;
}
.arm > legend { float: inline-start; grid-column: 1 / -1; width: 100%; padding: 0; font: var(--t-label-l); }
@media (min-width: 40rem) {
  .arm { grid-template-columns: 4.5rem 9rem minmax(12rem, 22rem); column-gap: 1rem; }
  .arm-grid-timing .arm { grid-template-columns: 4.5rem 9rem 13rem; }
  .arm > legend { grid-column: auto; width: auto; display: flex; align-items: center; min-height: var(--control-h); }
  .arm input[type="number"] { max-width: 7rem; }
  .arm + .arm .field > label {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
}

/* ---- Filter bar (c::filter_bar): a GET form in a slim card with no heading. From 40rem the selects share one row
   and the buttons end it, on a row of their own only when they do not fit. On a phone the selects sit two across
   (each holds one short word; five stacked rows would push the list a screen down) and the buttons take a full row. ---- */
.filter-bar { min-width: 0; padding: 0.75rem 1rem; border-radius: var(--r-lg-plus); background: var(--card); }
.filter-fields {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 1rem; align-items: end;
  min-width: 0; margin: 0; padding: 0; border: 0;
}
/* A filter whose choices are long words ("Writer Profile and version") has a row of its own on a phone, so the
   chosen one is not cut. From 40rem the bar is a flex row and this does nothing. */
.filter-fields > .filter-wide { grid-column: 1 / -1; }
/* The last of an odd number of filters takes the row too, so none stands beside an empty half (All Jobs' three, the
   Pipeline's five). A wide filter has its row anyway and is not counted (All Jobs' search field stands before its
   three selects, 2026-10-16). */
.filter-fields > .field:not(.filter-wide):nth-last-child(1 of .field:not(.filter-wide)):nth-child(odd of .field:not(.filter-wide)) { grid-column: 1 / -1; }
.filter-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; grid-column: 1 / -1; }
.filter-actions > .btn { flex: 1 1 auto; }
/* Two across on a phone a select is about 140 px wide: with less padding its chosen words are whole at 360 px
   ("Last 365 days" is 95 px beside the arrow). */
@media (max-width: 39.99rem) { .filter-fields select { padding-inline: 0.5rem; } }
@media (min-width: 40rem) {
  .filter-fields { display: flex; flex-wrap: wrap; align-items: flex-end; }
  .filter-fields > .field { flex: 1 1 9rem; max-width: 16rem; }
  .filter-actions { flex-wrap: nowrap; margin-inline-start: auto; }
  .filter-actions > .btn { flex: none; }
}

/* ---- Banners (in the page), toasts (after a change) ---- */
.banner { display: flex; padding: 0.875rem 1rem; border-radius: var(--r-lg); font: var(--t-body-m); }
.banner .icon-label { align-items: flex-start; gap: 0.75rem; }
.banner .icon { width: 1.4rem; height: 1.4rem; }
.banner-danger { background: var(--danger-container); color: var(--on-danger-container); }
.banner-info { background: var(--info-container); color: var(--on-info-container); }
.banner-ok { background: var(--ok-container); color: var(--on-ok-container); }
/* C2: a Scheduled job paused (spec 6.10): a warning that waits for a person, not an error. */
.banner-warn { background: var(--warn-container); color: var(--on-warn-container); }

.toast {
  position: fixed; inset-inline: 0.75rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 40; max-width: 33rem; margin-inline: auto;
  display: flex; align-items: center; min-height: 2.8rem; padding: 0.75rem 1rem;
  border-radius: var(--r-sm); background: var(--inverse-surface); color: var(--inverse-on-surface);
  font: var(--t-body-m); box-shadow: var(--e-3);
}
.toast .icon { color: var(--inverse-primary); }
.toast-static { position: static; margin: 0; }
/* Things fixed to the bottom do not cover each other. On a phone the toast stands above the floating "New job"
   button where a page has one (the Dashboard and the Jobs lists); at every width it stands above the sticky action
   bar where a page has one (the job page at Review, a long form). Elsewhere it keeps its place at the bottom. */
@media (max-width: 39.99rem) { body:has(.fab) .toast:not(.toast-static) { bottom: calc(5.5rem + env(safe-area-inset-bottom)); } }
@media (min-width: 40rem) { .toast:not(.toast-static) { inset-inline: calc(var(--rail-w) + 1.5rem) auto; bottom: 1.5rem; margin: 0; } }
@media (min-width: 80rem) { .toast:not(.toast-static) { inset-inline-start: calc(var(--sidebar-w) + 1.5rem); } }
body:has(.action-bar) .toast:not(.toast-static) { bottom: calc(var(--action-bar-h) + 0.75rem); }
@media (prefers-reduced-motion: no-preference) {
  .toast:not(.toast-static) {
    animation: toast-in var(--d-spring) var(--spring-default), toast-out 300ms var(--ease-standard) 8s forwards;
  }
  .toast:hover, .toast:focus-within { animation-play-state: paused; }
}
/* Only movement on the way in: the text keeps full contrast from the first frame. */
@keyframes toast-in { from { translate: 0 1.5rem; } }
@keyframes toast-out { to { opacity: 0; visibility: hidden; } }

/* ---- Dialogs: --r-xl corners; a bottom sheet on phones ---- */
dialog.dialog {
  width: min(33rem, calc(100vw - 2rem)); padding: 1.5rem; border: 0; border-radius: var(--r-xl);
  background: var(--surface-container-high); color: var(--on-surface); box-shadow: var(--e-3);
  max-width: min(100vw, 40rem); overflow-wrap: anywhere;
}
dialog.dialog::backdrop { background: var(--scrim); }
/* An open dialog is a grid: its title, text, fields and buttons keep one gap (a closed one stays display: none). */
dialog.dialog[open] { display: grid; gap: 0.75rem; }
.dialog h2 { font: var(--t-headline-s); }
.dialog p { color: var(--on-surface-variant); }
/* UX-review-letter M241: the Approve confirm says what goes out, then how its opening reads; the reading bar's info
   line (G3: one line, quieter than the buttons under it). */
/* Its version's lines keep the dialog's gap; [hidden] still hides them (base.css). */
.approve-goes-out { display: contents; }
.approve-effect { font-weight: 600; }
.approve-opening { font-style: italic; overflow-wrap: anywhere; }
.bar-info { color: var(--on-surface-variant); }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; margin-top: 0.75rem; max-width: min(100vw, 40rem); min-width: 0; }
@media (max-width: 39.99rem) {
  /* A bottom sheet: the buttons stack at full width, the main action (the last in the HTML) on top, above the
     phone's home bar. */
  dialog.dialog[open] {
    margin: auto 0 0; width: 100%; max-width: 100%; border-radius: var(--r-xl) var(--r-xl) 0 0;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
  }
  .dialog-actions { flex-direction: column-reverse; flex-wrap: nowrap; }
  .dialog-actions > .btn { width: 100%; }
  /* W5b gate fallback (SW11, m3 S1): the Approve and Skip sheets keep Cancel and the main action on the first screen
     however long the closing list grows: the sheet scrolls and its buttons stay at its bottom over the sheet's colour.
     The Skip form's own box is dropped so its buttons can stick to the sheet, not to the form. Other dialogs: next
     release (owner ruling (a)). */
  :is(#approve-dialog, #skip-dialog)[open] {
    max-height: calc(100dvh - 1rem); overflow-y: auto; overscroll-behavior: contain;
    /* m3 S1 (WCAG 2.4.11): a focused field scrolled into view stops above the pinned buttons, not under them. */
    scroll-padding-block-end: calc(9rem + env(safe-area-inset-bottom));
  }
  #skip-dialog > form.form { display: contents; }
  :is(#approve-dialog, #skip-dialog) .dialog-actions {
    position: sticky; bottom: calc(-1.5rem - env(safe-area-inset-bottom)); z-index: 1;
    margin-bottom: calc(-1.5rem - env(safe-area-inset-bottom)); padding-block: 0.75rem calc(1.5rem + env(safe-area-inset-bottom));
    background: var(--surface-container-high); border-top: 1px solid var(--outline-variant);
  }
}
@media (prefers-reduced-motion: no-preference) { dialog.dialog[open] { animation: dialog-in var(--d-spring) var(--spring-default); } }
@keyframes dialog-in { from { opacity: 0; scale: 0.94; } }

/* ---- Tables: calm, hairlines only, 49 px rows (--row-h). A record table (.table-stack, below) becomes short rows
   where its card cannot hold a table; a figures or a technical table scrolls sideways inside its card. ---- */
.table-card { min-width: 0; padding: 0.25rem 0 0.5rem; border-radius: var(--r-lg-plus); background: var(--card); }
/* The scrolling area is positioned: text inside a table that is hidden but read out (.visually-hidden is absolute)
   is then clipped with the table, and cannot widen the page when a table is wider than its card. */
.table-scroll { position: relative; overflow-x: auto; overscroll-behavior-x: contain; container-type: inline-size; }
.table-scroll:focus-visible { outline-offset: -3px; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font: var(--t-body-m); }
/* The caption is never wider than the card (100cqi, the scrolling area's own width) and stays put while a wide table
   scrolls sideways under it, so its words are not cut at the card's edge on a phone. */
.table caption {
  position: sticky; inset-inline-start: 0; max-width: 100cqi;
  padding: 1rem 1.25rem 0.5rem; text-align: start; color: var(--on-surface-variant);
}
.table th {
  height: 2.8rem; padding: 0 0.75rem; text-align: start; white-space: nowrap;
  font: var(--t-title-s); color: var(--on-surface-variant); border-bottom: 1px solid var(--outline-variant);
}
.table td { height: var(--row-h); padding: 0.25rem 0.75rem; vertical-align: middle; border-bottom: 1px solid var(--divider); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color var(--d-short) var(--ease-effects); }
.table tbody tr:hover { background: color-mix(in srgb, var(--on-surface) var(--state-hover), transparent); }
.table tr > :first-child { padding-inline-start: 1.25rem; }
.row-link { display: inline-flex; align-items: center; min-height: var(--target); min-width: var(--target); font: var(--t-title-s); }
/* W18 (owner 6 Nov): a job's name on a list and, right after it, its Upwork job post (components::job_upwork_link): the
   external-link icon alone in a round 41 px target, its word clipped (still the link's name; aria-label and title
   say "Open on Upwork"). The pair sits in the cell's flow as the name did; a long name wraps beside the icon. */
.job-name { display: inline-flex; align-items: center; gap: 0.25rem; max-width: 100%; vertical-align: middle; }
/* The name may shrink beside the icon (a long one wraps) but never under the 41 px target (W18a gate, l4 15:52:
   /insights/turnaround at 375 squeezed its names under 40 px). */
.job-name > a:first-child { min-width: var(--target); }
.job-upwork {
  position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; width: var(--target);
  height: var(--target); border-radius: var(--r-full); color: var(--on-surface-variant);
}
.job-upwork:hover { color: var(--primary); background: color-mix(in srgb, var(--on-surface) var(--state-hover), transparent); }
.job-upwork:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.job-upwork .icon-label > span {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.card .table-card { padding: 0; background: none; }
/* A table's download (c::table_card with an address): one "Download CSV" button of the card. Where the card is
   36rem or wider (a container query: the card's own width, in the root's rem) it stands at the end of the caption's
   row, and the caption keeps clear of it; in a narrower card (a phone, a table beside its chart) under the table. */
.table-card-tools { position: relative; container-type: inline-size; }
.table-tools { display: flex; flex-wrap: wrap; gap: 0 0.25rem; padding: 0.25rem 0.5rem 0; }
.card .table-tools { padding-inline: 0; }
@container (min-width: 36rem) {
  .table-tools { position: absolute; inset-block-start: 0.375rem; inset-inline-end: 0.5rem; padding: 0; }
  .card .table-tools { inset-block-start: 0.125rem; inset-inline-end: 0; }
  .table-card-tools caption { padding-inline-end: 11.5rem; }
  /* Two tools (a sorted table that has a download): "Default order" and "Download CSV" stand side by side, and
     the caption keeps clear of both. */
  .table-card-tools:has(.table-tools > :nth-child(2)) caption { padding-inline-end: 20.5rem; }
}
/* A narrow table with a download fills its card, which is as wide as such a table may be (40rem): the caption has
   the card's width and the button ends its row, instead of standing a card's width away from a table of 20rem. */
.table-card-tools:not(.table-card-reset):has(.table-fit) { max-width: 40rem; }
.table-card-tools:not(.table-card-reset) .table-fit { width: 100%; }
/* A narrow table whose only tool is "Default order" (sorted, no download) keeps its own width, so its columns do
   not move with every sort: the button stands under it at every width, where a phone has it anyway. */
.table-card-reset:has(.table-fit) .table-tools { position: static; padding: 0.25rem 0.5rem 0; }
.card .table-card-reset:has(.table-fit) .table-tools { padding-inline: 0; }
.table-card-reset:has(.table-fit) caption { padding-inline-end: 1.25rem; }

/* ---- Sortable tables (c::sort_th, c::sort_by; web/STYLE.md, "Sortable tables"). A sortable header's word is a
   link: the header's own colour and type, no underline at rest, a 41 px target, the usual focus ring. The sorted
   column (aria-sort) is drawn in the stronger colour and carries the arrow beside its word, so only that column
   gains the arrow's width and a table measured to fit its card still fits. ---- */
.sort-link {
  display: inline-flex; align-items: center; gap: 0.25rem; min-height: var(--target); min-width: var(--target);
  color: inherit; font: inherit; text-decoration: none;
}
.sort-link:hover { text-decoration: underline; }
.sort-link .icon { width: 1em; height: 1em; }
th[aria-sort] .sort-link { color: var(--on-surface); }
/* A number's header ends where its numbers end. */
.table th.num .sort-link { justify-content: flex-end; }
/* Headings that take two lines (.table-wrap-heads): the link wraps with the heading, the arrow stays beside the
   last line and never takes a line of its own. The link keeps the 41 px target by taking the header's own padding. */
.table-wrap-heads thead th:has(.sort-link) { padding-block: 0; }
.table-wrap-heads .sort-link { align-items: flex-end; padding-block: 0.5rem; text-align: inherit; }
.table-wrap-heads .sort-link .icon { margin-block-end: 0.2em; }
/* A heading that wraps at the START of its row (a two-word heading of the column that stays in place, "Experiment
   arm"; a narrow table's first heading on a phone, "Writer Profile"): its link is a block of text, not a row of
   two parts, so the arrow follows the last word instead of standing at the column's end, a word's width away from
   its heading. The arrow takes no room of its own in the line (it stands in the link's end padding), so it never
   wraps to a line by itself. The block is still the 41 px target, its words centred in it. The rules stand below,
   where each of those two columns is set (.table-fit on a phone, .table-sticky in a narrow card). */

/* The "Sort by" control (c::sort_by): a slim card like the filter bar, directly above its table's card. It is
   drawn only where the table is short rows and shows no header row: below 64rem (.table-stack), or below 72rem
   with .sort-by-m (.table-stack-m). On a phone the select has a row and the two direction buttons share the next;
   from 40rem they are one row where the card has the room (a 482 px card at a 640 px window has not: the buttons
   then stand under the select at their own width, and nothing runs off the card). The current direction is the
   tonal button. */
.sort-by {
  display: none; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem 1rem;
  min-width: 0; padding: 0.75rem 1rem; border-radius: var(--r-lg-plus); background: var(--card);
}
.sort-by > .field { flex: 1 1 100%; }
.sort-by-dirs { display: flex; flex: 1 1 100%; gap: 0.5rem; min-width: 0; }
.sort-by-dirs > .btn { flex: 1 1 0; }
@media (max-width: 63.99rem) { .sort-by { display: flex; } }
@media (max-width: 71.99rem) { .sort-by-m { display: flex; } }
/* A sort may land on its table (the address ends "#<caption id>": a table far down its page). Where the control is
   drawn it stands directly above that table's card, so the landing leaves room for it: the control that sorted the
   list is still on screen above the list, ready for the next press. */
@media (max-width: 63.99rem) { .sort-by + .table-card caption { scroll-margin-block-start: 13rem; } }
@media (max-width: 71.99rem) { .sort-by-m + .table-card caption { scroll-margin-block-start: 13rem; } }
@media (min-width: 40rem) {
  .sort-by > .field { flex: 0 1 16rem; }
  .sort-by-dirs { flex: 0 1 auto; }
  .sort-by-dirs > .btn { flex: none; }
}
/* A row header (th in tbody, or in tfoot: a totals row such as Insights > Screening's "All profiles") is drawn like a
   cell; only the column headers in thead keep the header style. */
.table tbody th, .table tfoot th {
  height: var(--row-h); padding: 0.25rem 0.75rem; vertical-align: middle; white-space: normal;
  color: var(--on-surface); border-bottom: 1px solid var(--divider);
}
.table tbody tr:last-child th { border-bottom: 0; }
/* A totals row stands under a rule of its own, apart from the rows it sums. */
.table tfoot tr:last-child > * { border-top: 1px solid var(--outline-variant); border-bottom: 0; }

/* Columns (2026-10-12). In a record table the title cell takes the free width (.col-main, at most two lines) and
   every other cell is as narrow as what it holds and never wraps (.col-tight), so dates, chips and names stay on
   one line; the action cell is last (.col-actions). One long-text column per table may wrap (.col-text). A note goes
   under its chip (.cell-note). Numbers and their headers line up at the end (.num). */
/* A title with no space in it (the failover fixture's 60-character Scanner name) breaks where it must, so its table never grows past its card. */
.table .col-main { min-width: 16rem; overflow-wrap: anywhere; }
/* So does a row's own header (a Scanner's name heading its Insights row), which no .col-main covers. */
.table tbody th[scope="row"] { overflow-wrap: anywhere; }
/* In a card narrower than 72rem (a 972 px card at a 1280 px window) the title gives up to 3rem of that away before
   the table grows wider than its card: a wide chip ("Would submit (trial)", "With GigRadar, waiting to be sent"), a
   long owner's name or the arrow of a sorted column then still fit, and the title keeps its two lines. */
@container (max-width: 72rem) { .table .col-main { min-width: 13rem; } }
.table .col-tight { width: 1%; white-space: nowrap; }
.table .col-actions { width: 1%; white-space: nowrap; text-align: end; }
/* An action cell that holds a next-stage control (Follow-ups) may put its link on a line of its own while its CARD
   is narrower than 72rem (1080 px: in a container query a rem is the root's 15 px); the control's two buttons still
   stay together. The card's width decides, not the window's: at a 1280 px window the expanded rail appears and the
   card is 972 px, narrower than at 1152 px, so "below 80rem" cut the More button off at the most common laptop
   width. Every other action cell keeps its buttons on one line. */
@container (max-width: 72rem) { .table .col-actions:has(.move-actions) { white-space: normal; } }
/* To decide's row actions (C0): three buttons that open the shared dialogs. In a card narrower than 72rem they take
   lines of their own instead of widening the table past its card. */
@container (max-width: 72rem) { .table .col-actions:has([data-row-action]) { white-space: normal; } }
.table .col-text { min-width: 12rem; max-width: 60ch; }
/* A cell of a few words (a person, a profile, a mode) in a table of six columns or more: it keeps 8rem and takes a
   second line where the card is narrow, so the table still fits a 972 px card. Chips, numbers and dates stay
   .col-tight. Without the least width the table squeezes such a cell to one word a line. Its lines are balanced
   (a date that must wrap stands over its time), and a word longer than the cell (a link, an address from the old
   app's data) breaks inside it instead of widening the table. Where two dates and four other columns cannot share
   a 972 px card (Users), the dates are .col-words too. */
.table .col-words { min-width: 8rem; overflow-wrap: anywhere; text-wrap: balance; }
/* C2b (owner, 2026-10-17: "names medium"): a name from data (a Scanner, a person, a profile, a time zone, an
   address) is .col-name, never .col-tight: it keeps 8rem and wraps, so production's long names never widen a table
   past its card. */
.table .col-name { min-width: 8rem; overflow-wrap: anywhere; text-wrap: balance; }
/* W3 P7: Follow-ups has two name columns (Freelancer, Owner) beside the checkbox and three buttons: each keeps 5rem and takes
   a second line, so the table still fits a 972 px card. */
.table .col-name.col-name-s { min-width: 5rem; }
/* W3 P7: Follow-ups' check-due cell (a chip and the date under it) may put the time under the date, as Users' dates do, and its
   job column gives up 3rem in a narrow card: with the checkbox, the Freelancer column and the pinned "Client wrote" chip (now under
   its stage) the table otherwise ran 130 to 150 px past a 972 px card. */
.table .col-due { white-space: normal; min-width: 6.5rem; text-wrap: balance; }
.table .col-due .cell-note { width: auto; max-width: none; }
.table .col-due time, .table .col-due .cell-note time { white-space: normal; }
@container (max-width: 72rem) { .table:has(.row-check) .col-main { min-width: 10rem; } }
/* A technical value (an event type, a task kind, an error code) breaks inside itself rather than widen its table. */
.table td code { overflow-wrap: anywhere; }
/* C2b: a row's buttons stand one under another, as wide as the widest, so a row of three fits its card (To decide);
   in a stacked row they sit side by side and wrap, as every stacked row's buttons do. */
.row-actions { display: flex; flex-direction: column; align-items: stretch; gap: 0.25rem; }
@media (max-width: 71.99rem) { .table-stack-m .row-actions { flex-flow: row wrap; } }
.table-stack-a .row-actions { flex-flow: row wrap; }
/* A note under a chip is as wide as its words up to 18rem: a short one (a word and a date) keeps one line, a
   sentence wraps there instead of stretching its never-wrapping cell. A date and its time never break. Under a
   title (.col-main) a note has the title's own width. */
.cell-note { display: block; width: max-content; max-width: 18rem; white-space: normal; }
.cell-note time { white-space: nowrap; }
.col-main .cell-note { width: auto; max-width: none; overflow-wrap: anywhere; }
/* A run of rows about the same thing (Activity: one job's events) prints its title once: the title cells after the
   first (.col-again) hold it for a screen reader only, and no hairline cuts the title off from its run. */
.table tr:has(+ tr > .col-again) > .col-main { border-bottom-color: transparent; }
.table .num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* A note under a number (a rate's count, "Too few to judge") stands at the number's edge, on one line. */
.table .num .cell-note { margin-inline-start: auto; }
/* A note under a row header (what an arm uses, the chip of a row with too few jobs) wraps in the header's width. */
.table tbody th .cell-note, .table tfoot th .cell-note { width: auto; max-width: none; font: var(--t-body-m); }
/* Headings of a few words may take two balanced lines, so ten columns of short figures fit their card (an
   experiment's arms); the caption gives the full wording. */
.table-wrap-heads thead th { height: auto; padding-block: 0.5rem; white-space: normal; text-wrap: balance; vertical-align: bottom; }
/* (A number's heading too: .num alone keeps a cell on one line, and would keep "No response" from wrapping.) */
.table-wrap-heads thead th.num { white-space: normal; }
/* Its cells stand 0.5rem apart, not 0.75rem, and a chip on a row's label may wrap: ten columns fit a 920 px card. */
.table-wrap-heads th, .table-wrap-heads td { padding-inline: 0.5rem; }
.table-wrap-heads tr > :first-child { padding-inline-start: 1.25rem; }
.table-wrap-heads tbody th .status { white-space: normal; }
/* A table narrower than its card does not stretch across it. On a phone its cells stand 0.375rem apart and its
   first heading may wrap, so four short columns fit the card of a 360 px phone with the arrow of the sorted one
   (Cost: Writer Profile, Drafts, AI cost, Per draft; 0.5rem before the headers sorted, 2026-10-13). */
.table-fit { width: auto; max-width: 40rem; }
@media (max-width: 39.99rem) {
  .table-fit th, .table-fit td { padding-inline: 0.375rem; }
  .table-fit tr > :first-child { padding-inline-start: 1.25rem; }
  .table-fit thead th:first-child { white-space: normal; }
  /* A row header stands as close as the cells (`.table tbody th` would keep 0.75rem), and a number's heading may take
     two lines, so a long row name (Cost's "Questions First version 1", which wraps) does not push the table past its
     card on a 360 px phone. */
  .table-fit tbody th { padding-inline-end: 0.375rem; }
  .table-fit thead th.num { white-space: normal; }
  /* (Its sort link is a block of text whose arrow follows the last word: see "A heading that wraps at the start".) */
  .table-fit thead th:first-child .sort-link { display: block; align-content: center; }
  .table-fit thead th[aria-sort]:first-child .sort-link { padding-inline-end: 1.25em; }
  .table-fit thead th:first-child .sort-link .icon { display: inline-block; vertical-align: -0.125em; margin-inline: 0.25rem calc(-1em - 0.25rem); }
}
@media (min-width: 40rem) {
  /* The title is at most two lines; a single line still fills the 41 px target. */
  /* (Clear borders, not padding, make up the height: a cut third line would show through padding.) */
  .table .col-main .row-link {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
    min-height: 0; border-block: calc((var(--target) - 1.5rem) / 2) solid transparent;
  }
}
/* Figure and technical tables scroll sideways in their card: where the scrolling area is narrower than 56rem (840 px:
   in a container query a rem is the root's 15 px) the first column stays in place. The CARD's width decides, not
   the window's: a card is 866 px at a 1024 px window, where ten columns of figures still scroll, and 972 px at
   1280 px, where they fit. The column is 8.5rem to 9rem wide: a date ("14 Sep 2026", 83 px) and a two-word heading
   ("Week starting", 95 px) keep one line beside the cell's padding, and only a longer label wraps. Without the
   least width the table squeezes the column to its longest word and every row is two lines tall. */
@container (max-width: 56rem) {
  .table-sticky tr > :first-child {
    position: sticky; inset-inline-start: 0; z-index: 1; min-width: 8.5rem; max-width: 9rem; white-space: normal;
    background: var(--card); border-inline-end: 1px solid var(--divider);
  }
  /* While it is the sorted column its heading gains the arrow's width (1.25rem), as any sorted column does, so a
     two-word heading ("Week starting") still stands on one line beside its arrow. */
  .table-sticky thead th[aria-sort]:first-child { min-width: 9.75rem; max-width: 10.25rem; }
  /* A longer heading wraps ("Experiment arm"): its sort link is a block of text whose arrow follows the last word
     (see "A heading that wraps at the start"). */
  .table-sticky thead th:first-child .sort-link { display: block; align-content: center; }
  .table-sticky thead th[aria-sort]:first-child .sort-link { padding-inline-end: 1.25em; }
  .table-sticky thead th:first-child .sort-link .icon { display: inline-block; vertical-align: -0.125em; margin-inline: 0.25rem calc(-1em - 0.25rem); }
  .table-sticky tbody tr:hover > :first-child { background: color-mix(in srgb, var(--on-surface) var(--state-hover), var(--card)); }
  /* A chip under the label of the column that stays in place wraps inside it. */
  .table-sticky tr > :first-child .status { white-space: normal; }
}

/* Record tables: a row is one thing with a title and a few facts, so where a table does not fit its card each row
   becomes a short list. The column headers are clipped, not removed (screen readers keep them); the title cell comes
   first at full width; an empty cell is not drawn; the action cell is last. Nothing scrolls sideways.
   - Below 40rem (a phone) every other cell is a "label: value" line whose label is its data-label, and the buttons
     fill the width. The label is a float pulled into the cell's start padding, 0.5rem from its value: the value
     keeps its own flow beside it, whatever it holds (a chip with a note under it, a time and a hint), and a label
     that wraps makes its line taller instead of running into the next. A row's inline padding is the caption's
     (1.25rem), so titles and labels start under it.
     The label is 30 % of the card (cqi: the scrolling area of c::table_card is the container), but never so wide
     that the value has less than 12.75rem (191 px), and never under 6rem: 100cqi - 15.75rem is the card less the
     row's padding (2.5rem), the gap (0.5rem) and those 12.75rem. The value must hold the widest date of the team's
     zones on one line: "22 May 2026, 12:00 pm ADT" is 187.5 px (digits are all one width; May, pm and ADT are the
     widest of their kind). At a 375 px window the label is 103 px, as it always was; at 360 px it is 94 px and the
     value 191 px. With a plain 30 % and a 0.75rem gap the value had 182 px there, and a date ran 1 to 5 px over it
     on some days and hours; ./scripts/check.sh --e2e now measures that date itself, whatever the clock says.
   - From 40rem up to where the table fits (a tablet; the collapsed rail leaves a card 482 px at a 640 px window) the
     facts sit side by side as "label value" pairs on a wrapping line under the title, the buttons at their own
     width; a long text (.col-text) takes a line of its own beside its label.
   - .table-stack is a table from 64rem: four columns or fewer (a card is 866 px at a 1024 px window).
     .table-stack-m is a table from 72rem: five or six columns of chips and dates, nine of figures, or a long text
     beside a button (All Jobs, the Pipeline, Follow-ups, Scheduled, Exceptions, an experiment's arms). Such a table
     must also fit 972 px, the card at a 1280 px window, where the expanded rail appears.
   Short cells that say when and who (.col-meta: a time and a person, a kind and a time) share one hint line and
   carry no label: what they hold says what it is. A note in such a cell (the Audit Log: who, under the time in the
   table) follows on the same line. A cell whose own words say what it is (.col-plain: what happened,
   on Activity) takes the row's width and its label is not printed. A title cell that only repeats the row above for
   a screen reader (.col-again) takes no line. A short cell that belongs with the title (.col-beside: the record an
   Audit Log entry is about) stands on the title's line, right after it, with no label; where the two do not fit
   one line it takes the next. The row's other cells start on a new line (an empty part as wide as the row ends
   the title's line). The label of a cell is a word from domain::words; one
   that is a name from data (an Archive table's field) and too long for its column breaks inside it. A cell that
   has nothing to say (.cell-none: a dash for "no verdict") is left out of a stacked row, as an empty one is. The
   two blocks below are the same rules at two widths; so are the two after them. */
.table-stack, .table-stack-m { --stack-label: max(6rem, min(30cqi, 100cqi - 15.75rem)); --stack-gap: 0.5rem; }
@media (max-width: 63.99rem) {
  .table-stack, .table-stack caption, .table-stack tbody, .table-stack td, .table-stack tbody th { display: block; }
  /* (Hidden, not only clipped: a sortable header is a link, and a clipped link would still take keyboard focus
     unseen. The Sort by control above the table sorts here, and each cell names itself with its data-label.) */
  .table-stack thead {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
    visibility: hidden;
  }
  .table-stack tr { display: flex; flex-flow: row wrap; gap: 0.25rem 0.75rem; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--divider); }
  .table-stack tbody tr:last-child { border-bottom: 0; }
  .table.table-stack td, .table.table-stack tbody th {
    flex: 1 1 100%; width: auto; max-width: none; min-width: 0; height: auto; padding: 0; border: 0; white-space: normal; text-align: start;
  }
  .table.table-stack td[data-label] { display: flow-root; padding-inline-start: calc(var(--stack-label) + var(--stack-gap)); }
  .table-stack td[data-label]::before {
    content: attr(data-label); float: inline-start; width: var(--stack-label); overflow-wrap: anywhere;
    margin-inline: calc(-1 * (var(--stack-label) + var(--stack-gap))) var(--stack-gap); color: var(--on-surface-variant);
  }
  .table.table-stack td.col-meta { flex: 0 1 auto; padding-inline-start: 0; color: var(--on-surface-variant); }
  .table-stack td.col-meta::before { content: none; }
  .table-stack td.col-meta .cell-note { display: inline; margin-inline-start: 0.75rem; }
  .table.table-stack td.col-plain { padding-inline-start: 0; }
  .table-stack td.col-plain::before { content: none; }
  .table.table-stack td.col-beside { order: -1; flex: 1 1 auto; padding-inline-start: 0; }
  .table-stack td.col-beside::before { content: none; }
  .table.table-stack tr:has(> .col-beside) > .col-main { flex: 0 1 auto; align-self: center; }
  .table.table-stack tr:has(> .col-beside)::after { content: ""; order: -1; flex: 0 0 100%; height: 0; }
  .table-stack .cell-note { width: auto; max-width: none; }
  .table-stack .status { white-space: normal; }
  .table.table-stack td.col-again { position: absolute; }
  .table.table-stack .col-main { order: -1; font: var(--t-title-s); }
  .table.table-stack .col-actions { order: 1; display: flex; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.5rem; }
  .table-stack .col-actions > *, .table-stack .col-actions .btn { flex: 1 1 auto; }
  .table-stack time { white-space: nowrap; }
}
@media (max-width: 71.99rem) {
  .table-stack-m, .table-stack-m caption, .table-stack-m tbody, .table-stack-m td, .table-stack-m tbody th { display: block; }
  .table-stack-m thead {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
    visibility: hidden;
  }
  .table-stack-m tr { display: flex; flex-flow: row wrap; gap: 0.25rem 0.75rem; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--divider); }
  .table-stack-m tbody tr:last-child { border-bottom: 0; }
  .table.table-stack-m td, .table.table-stack-m tbody th {
    flex: 1 1 100%; width: auto; max-width: none; min-width: 0; height: auto; padding: 0; border: 0; white-space: normal; text-align: start;
  }
  .table.table-stack-m td[data-label] { display: flow-root; padding-inline-start: calc(var(--stack-label) + var(--stack-gap)); }
  .table-stack-m td[data-label]::before {
    content: attr(data-label); float: inline-start; width: var(--stack-label); overflow-wrap: anywhere;
    margin-inline: calc(-1 * (var(--stack-label) + var(--stack-gap))) var(--stack-gap); color: var(--on-surface-variant);
  }
  .table.table-stack-m td.col-meta { flex: 0 1 auto; padding-inline-start: 0; color: var(--on-surface-variant); }
  .table-stack-m td.col-meta::before { content: none; }
  .table-stack-m td.col-meta .cell-note { display: inline; margin-inline-start: 0.75rem; }
  .table.table-stack-m td.col-plain { padding-inline-start: 0; }
  .table-stack-m td.col-plain::before { content: none; }
  .table.table-stack-m td.col-beside { order: -1; flex: 1 1 auto; padding-inline-start: 0; }
  .table-stack-m td.col-beside::before { content: none; }
  .table.table-stack-m tr:has(> .col-beside) > .col-main { flex: 0 1 auto; align-self: center; }
  .table.table-stack-m tr:has(> .col-beside)::after { content: ""; order: -1; flex: 0 0 100%; height: 0; }
  .table-stack-m .cell-note { width: auto; max-width: none; }
  .table-stack-m .status { white-space: normal; }
  .table.table-stack-m td.col-again { position: absolute; }
  .table.table-stack-m .col-main { order: -1; font: var(--t-title-s); }
  .table.table-stack-m .col-actions { order: 1; display: flex; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.5rem; }
  .table-stack-m .col-actions > *, .table-stack-m .col-actions .btn { flex: 1 1 auto; }
  .table-stack-m time { white-space: nowrap; }
}

/* From 40rem a stacked row has room to put its facts side by side: "label value" pairs on a wrapping line under the
   title, and its buttons at their own width. A list of chips and dates would scroll sideways as a table here;
   stacked like a phone's it would be three times as long. A long text takes a line of its own, its label beside it
   and every paragraph of it in the same column; where no label is printed (.col-plain) the words stand first and
   their note beside them. */
@media (min-width: 40rem) and (max-width: 63.99rem) {
  .table-stack tr { column-gap: 1.5rem; }
  .table.table-stack td[data-label] {
    flex: 0 1 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; padding-inline-start: 0;
  }
  .table-stack td[data-label]::before { float: none; width: auto; margin: 0; }
  .table.table-stack td.col-text[data-label] {
    flex: 1 1 100%; display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); align-items: start;
  }
  .table-stack td.col-text[data-label] > * { grid-column: 2; }
  .table-stack .col-actions > *, .table-stack .col-actions .btn { flex: 0 1 auto; }
}
/* .table-stack-m's facts sit 1rem apart, not 1.5rem: a Pipeline job's five facts at a 1024 px window fill 830 px,
   and with 1.5rem its last fact dropped to a second line for any date wider than "1:25 pm IST" ("12:28 pm AEDT"
   needs 23 px more than 1.5rem leaves). */
@media (min-width: 40rem) and (max-width: 71.99rem) {
  .table-stack-m tr { column-gap: 1rem; }
  .table.table-stack-m td[data-label] {
    flex: 0 1 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; padding-inline-start: 0;
  }
  .table-stack-m td[data-label]::before { float: none; width: auto; margin: 0; }
  .table.table-stack-m td.col-text[data-label] {
    flex: 1 1 100%; display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); align-items: start;
  }
  .table-stack-m td.col-text[data-label] > * { grid-column: 2; }
  .table-stack-m .col-actions > *, .table-stack-m .col-actions .btn { flex: 0 1 auto; }
}

/* A stacked row of many short figures (.stack-grid: an experiment's arms): on a phone they stand two across, the
   label above each figure and a rate's count beside its percent, instead of nine "label: value" lines. */
@media (max-width: 39.99rem) {
  .table.stack-grid td[data-label] { flex: 0 0 calc(50% - 0.375rem); display: block; padding-inline-start: 0; }
  .stack-grid td[data-label]::before { display: block; float: none; width: auto; margin: 0; }
  .stack-grid td .cell-note { display: inline; }
}
/* Wherever the arms are stacked, a rate's count stands beside its percent, so it is in brackets as the bars above
   the table print it ("27% (3 of 11)"): "27% 3 of 11" reads as one number. In the table the count is on a line of
   its own, under the percent, and needs none. */
@media (max-width: 71.99rem) {
  .stack-grid td .cell-note::before { content: "("; }
  .stack-grid td .cell-note::after { content: ")"; }
}
/* C3: a record table that is short rows at every width (.table-stack-a), for a card that never holds its columns: a
   job's versions in the job page's main column (541 px at a 1280 px window). The rules of .table-stack-m without
   the width condition, the "label value" pairs from 40rem; its Sort by control is .sort-by-a. */
.table-stack-a { --stack-label: max(6rem, min(30cqi, 100cqi - 15.75rem)); --stack-gap: 0.5rem; }
.table-stack-a, .table-stack-a caption, .table-stack-a tbody, .table-stack-a td, .table-stack-a tbody th { display: block; }
.table-stack-a thead {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  visibility: hidden;
}
.table-stack-a tr { display: flex; flex-flow: row wrap; gap: 0.25rem 0.75rem; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--divider); }
.table-stack-a tbody tr:last-child { border-bottom: 0; }
.table.table-stack-a td, .table.table-stack-a tbody th {
  flex: 1 1 100%; width: auto; max-width: none; min-width: 0; height: auto; padding: 0; border: 0; white-space: normal; text-align: start;
}
.table.table-stack-a td[data-label] { display: flow-root; padding-inline-start: calc(var(--stack-label) + var(--stack-gap)); }
.table-stack-a td[data-label]::before {
  content: attr(data-label); float: inline-start; width: var(--stack-label); overflow-wrap: anywhere;
  margin-inline: calc(-1 * (var(--stack-label) + var(--stack-gap))) var(--stack-gap); color: var(--on-surface-variant);
}
.table.table-stack-a td.col-plain { padding-inline-start: 0; }
.table-stack-a td.col-plain::before { content: none; }
.table-stack-a .status { white-space: normal; }
.table.table-stack-a .col-main { order: -1; font: var(--t-title-s); }
.table-stack-a time { white-space: nowrap; }
@media (min-width: 40rem) {
  .table-stack-a tr { column-gap: 1.5rem; }
  .table.table-stack-a td[data-label] {
    flex: 0 1 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; padding-inline-start: 0;
  }
  .table-stack-a td[data-label]::before { float: none; width: auto; margin: 0; }
  .table.table-stack-a td.col-text[data-label] { flex: 1 1 100%; display: block; }
}
.table.table-stack-a td:empty { display: none; }
.sort-by-a { display: flex; }
.sort-by-a + .table-card caption { scroll-margin-block-start: 13rem; }

/* An empty cell, and one that has nothing to say (.cell-none), is not drawn in a stacked row, at any width a table
   stacks at. These stand after the rules above, which lay a labelled cell out and would draw it again. */
@media (max-width: 63.99rem) { .table.table-stack td:empty, .table.table-stack td.cell-none { display: none; } }
@media (max-width: 71.99rem) { .table.table-stack-m td:empty, .table.table-stack-m td.cell-none { display: none; } }
/* In a stacked row a note under a number reads on the number's line, at the start. */
@media (max-width: 71.99rem) { .table-stack-m .num .cell-note { margin-inline-start: 0; } }
@media (max-width: 63.99rem) { .table-stack .num .cell-note { margin-inline-start: 0; } }

/* ---- Empty state: icon in a soft 63 px squircle, heading, one sentence ---- */
.empty {
  display: grid; justify-items: center; gap: 0.75rem; padding: 2.5rem 1.25rem; text-align: center;
  border-radius: var(--r-lg-plus); background: var(--card);
}
.empty-title { font: var(--t-title-l); }
.empty-title .icon-label { flex-direction: column; gap: 1rem; }
.empty-title .icon {
  width: 4.2rem; height: 4.2rem; padding: 1.05rem; border-radius: var(--r-xl);
  background: var(--secondary-container); color: var(--on-secondary-container);
}
.empty p { max-width: 44ch; color: var(--on-surface-variant); }

/* ---- Hero row (Dashboard): the greeting card and the queue tiles on the figures' four-column grid ---- */
/* Owner request 2026-10-13: one row, no empty half. From 64rem the row is the four columns of the figures under it,
   0.5rem apart: the card takes the left two, the tiles the right two (two across, so one or two tiles are one row and
   three or four a two-by-two block as tall as the card). With no tile the card takes the row (hero-row-alone). Below
   64rem the card takes the row and the tiles stand under it, two across from 40rem and one on a phone. */
.hero-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; margin-bottom: 0.5rem; }
@media (min-width: 64rem) {
  .hero-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-row > .hero, .hero-row > .seg-grid { grid-column: span 2; }
  .hero-row-alone > .hero { grid-column: 1 / -1; }
}
/* The greeting card: primary container, --r-xl-plus corners, big emphasized type. Compact: the time, the greeting and
   the one button under them, at the start; as tall as the tiles beside it, its words in the middle of its height. */
.hero {
  position: relative; overflow: hidden; isolation: isolate; display: grid; gap: 0.125rem; align-content: center;
  justify-items: start; min-width: 0; padding: 1rem 1.5rem; border-radius: var(--r-xl-plus);
  background: var(--primary-container); color: var(--on-primary-container);
}
/* The decorative shape starts after the time and the greeting, so they stand on the card's plain part: 23.5rem from
   the card's start in a half-width card (it shows 5rem of itself at a 1024 px window and nothing on a phone, where
   the greeting needs the width), and in the last 28% of a wider one. It costs no space and no contrast. */
.hero::before {
  content: ""; position: absolute; z-index: -1; width: 24.5rem; height: 24.5rem; inset-inline-start: max(72%, 23.5rem); top: -10.5rem;
  border-radius: 38% 62% 55% 45% / 45% 40% 60% 55%; background: var(--hero-shape);
}
.hero-time { font: var(--t-title-s); }
.hero-title { font: var(--t-headline-m); font-size: clamp(1.75rem, 1.25rem + 0.9vw, 2rem); line-height: 1.2; letter-spacing: -0.3px; overflow-wrap: anywhere; }
.hero-body { max-width: 60ch; }
.hero-actions { margin-top: 0.5rem; }
.hero .btn-filled { background: var(--hero-action); color: var(--on-hero-action); }
/* "Your local time" and the time are one line on a 360 px phone, whatever the time is. The widest there is ("22 May
   2026, 12:00 pm +1345": a two-digit day and hour, May, pm, the widest zone a person may choose) makes the line
   309.7 px in 15 px bold, and that phone's card had 285 px for it: the line broke whenever the hour had two digits.
   So on a phone the card's words start where every card's do (1.25rem: 292.5 px at 360) and the line is drawn at the
   scale's floor (14 px: 290.3 px). The time itself never breaks (base.css). */
@media (max-width: 39.99rem) {
  .hero { padding-inline: 1.25rem; }
  .hero-time { font-size: 0.9375rem; }
}

/* ---- Figures (KPI tiles) ---- */
/* Denser since 2026-10-12: 10rem tiles, so two stand side by side on a phone and a row of five holds at 1024; a
   tile's label, number and hint start at its top, whatever the height of its neighbours. */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr)); gap: 0.5rem; }
.kpi {
  display: grid; gap: 2px; align-content: start; min-width: 0; padding: 0.75rem 1rem;
  border-radius: var(--r-lg-plus); background: var(--surface-container-high);
}
/* On a phone the tiles stand two across, and the last of an odd number takes the row: no tile is left alone beside
   an empty half (Cost's five figures). */
@media (max-width: 39.99rem) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.kpi-label { font: var(--t-label-l); color: var(--on-surface-variant); }
.kpi-value { font: var(--t-display-s); font-variant-numeric: tabular-nums lining-nums; overflow-wrap: anywhere; }
.kpi-hint { font: var(--t-body-m); color: var(--on-surface-variant); }
/* Six figures (Trial Comparison): one row from 64rem, three and three from 40rem, two across on a phone; never an
   orphan tile. */
.kpis-six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 40rem) { .kpis-six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .kpis-six { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* ---- Segmented list: tiles 2 px apart inside a --r-lg container, --r-xs inner corners ---- */
.seg { display: flex; flex-direction: column; gap: 2px; border-radius: var(--r-lg); overflow: hidden; }
.tile {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.25rem 0.875rem;
  min-height: 4.2rem; padding: 0.75rem 1rem; border-radius: var(--r-xs); background: var(--card);
  color: var(--on-surface); text-decoration: none; transition: border-radius var(--d-spring) var(--spring-default);
}
.card .tile { background: var(--surface-container-high); }
.seg > li:first-child > .tile { border-start-start-radius: var(--r-lg); border-start-end-radius: var(--r-lg); }
.seg > li:last-child > .tile { border-end-start-radius: var(--r-lg); border-end-end-radius: var(--r-lg); }
.tile:hover { background: color-mix(in srgb, var(--on-surface) 5%, var(--card)); }
.card .tile:hover { background: color-mix(in srgb, var(--on-surface) 5%, var(--surface-container-high)); }
.tile:active { border-radius: var(--r-lg); }
.tile:focus-visible { outline-offset: -3px; }
.tile-text { display: grid; gap: 0.25rem; min-width: 0; }
.tile-label { font: var(--t-title-s); }
.tile-label .icon-label { gap: 0.875rem; }
.tile-label .icon { width: 2.4rem; height: 2.4rem; padding: 0.55rem; border-radius: var(--r-md); }
.tile-ok .tile-label .icon { background: var(--ok-container); color: var(--on-ok-container); }
.tile-warn .tile-label .icon { background: var(--warn-container); color: var(--on-warn-container); }
.tile-danger .tile-label .icon { background: var(--danger-container); color: var(--on-danger-container); }
.tile-info .tile-label .icon { background: var(--info-container); color: var(--on-info-container); }
.tile-neutral .tile-label .icon { background: var(--neutral-container); color: var(--on-neutral-container); }
.tile-hint { padding-inline-start: 3.275rem; font: var(--t-body-m); color: var(--on-surface-variant); }
.tile-count { font: var(--t-display-s); font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
/* Queue tiles as a grid (the Dashboard's first row): two across from 40rem, one on a phone, 0.5rem apart like the
   figures, each tile a card of its own. The tiles of a row are equally tall, and so are the rows of an even number
   of tiles; a lone last tile takes both columns (seg-odd) and is as tall as what it holds, not as the row above it.
   In a tile the icon stands at the start, and the name, the count and the hint share one start edge beside it.

   Where the counts stand is decided for the whole list, never by one tile: all beside their names, or all under
   them ("44" beside its name and "over 30" under its own, in one row, read unevenly). The list is a size container
   and names the room a tile needs for its longest count beside the longest name, "Review Queue" (--count-room; the
   server gives the class from the longest count, components::count_room): 14rem for one digit, 15.2rem for two
   (seg-count-s), 16.4rem for three or four (seg-count-m), 18.1rem for "over 30" (seg-count-l) and 20.8rem for
   "over 100" (seg-count-xl), each 5 px or more above what was measured, so a font drawn a little wider still
   fits. In a tile narrower than that every count takes the whole line (its min-width becomes 100%); in a wider one
   every count stays beside its name. Should one still not fit, it wraps instead of being cut (flex-wrap). */
.seg-grid {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; border-radius: 0; overflow: visible;
  container: seg-grid / inline-size; --tile-width: 100cqi; --count-room: 14rem;
}
.seg-count-s { --count-room: 15.2rem; }
.seg-count-m { --count-room: 16.4rem; }
.seg-count-l { --count-room: 18.1rem; }
.seg-count-xl { --count-room: 20.8rem; }
.seg-grid > li { display: grid; min-width: 0; }
.seg.seg-grid > li > .tile { border-radius: var(--r-lg-plus); }
.seg.seg-grid > li > .tile:active { border-radius: var(--r-md); }
.seg-grid .tile {
  display: flex; flex-wrap: wrap; align-items: center; align-content: start; gap: 0.25rem 0.75rem;
  padding-block: 1.125rem; padding-inline: 4.275rem 1rem;
}
.seg-grid .tile-text { display: contents; }
.seg-grid .tile-label { order: 1; display: flex; align-items: center; min-width: 0; min-height: 2.4rem; }
.seg-grid .tile-label .icon { margin-inline-start: -3.275rem; }
.seg-grid .tile-count { order: 2; min-width: clamp(0rem, (var(--count-room) - var(--tile-width)) * 9999, 100%); overflow-wrap: anywhere; }
.seg-grid .tile-hint { order: 3; flex: 1 1 100%; padding-inline-start: 0; }
@media (min-width: 40rem) {
  .seg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg-grid:not(.seg-odd) { grid-auto-rows: 1fr; }
  .seg-odd > li:last-child { grid-column: 1 / -1; }
  .seg-grid > li:not(:only-child) { --tile-width: calc(50cqi - 0.25rem); }
}

/* ---- Loading: a morphing shape with its word ---- */
.loading { display: inline-flex; align-items: center; gap: 0.75rem; font: var(--t-label-l); color: var(--on-surface-variant); }
/* U1 (spec 15, #6): a ring with a gap, so it reads as work going on even standing still (reduced motion, a screenshot),
   never as a solid square; where motion is welcome it turns. */
.loading-shape {
  flex: none; width: 1.875rem; height: 1.875rem; border-radius: 50%;
  border: 0.25rem solid var(--primary); border-block-start-color: transparent; background: none;
}
@media (prefers-reduced-motion: no-preference) { .loading-shape { animation: morph 1s linear infinite; } }
@keyframes morph { to { rotate: 360deg; } }

/* ---- Busy button (c::busy_button; Sync Scanners' loader, 2026-10-14): two faces in one grid cell, so the button
   keeps the width of the wider. At rest the loading face is hidden (and so not read); at work (data-busy, with
   disabled) the rest face is. The shape is the loading shape at icon size in the button's own colour: it turns only
   where motion is welcome (the rule above), and stands still under reduced motion beside its word. ---- */
.btn-busy { display: inline-grid; place-items: center; }
.btn-busy > span { grid-area: 1 / 1; }
.btn-busy-on { display: inline-flex; align-items: center; gap: 0.5rem; visibility: hidden; }
.btn-busy[data-busy] > .btn-busy-idle { visibility: hidden; }
.btn-busy[data-busy] > .btn-busy-on { visibility: visible; }
.btn-busy[data-busy] { cursor: progress; }
.btn-busy[data-busy]::after { opacity: 0; }
.btn-busy .loading-shape { width: 1.2rem; height: 1.2rem; border-width: 0.1875rem; border-color: currentColor; border-block-start-color: transparent; }

/* ---- Inner card: a block inside a card (one draft on the job page), one tone up from the card ---- */
.subcard {
  display: grid; gap: 0.75rem; align-content: start; min-width: 0; padding: 1rem;
  border-radius: var(--r-lg); background: var(--surface-container-high); color: var(--on-surface);
}

/* ---- Disclosure: closed by default; the summary is a 45 px row with a chevron drawn in CSS (not an icon) ---- */
/* Owner, 2026-10-21: the summary is a tinted band and the open body stands on the card colour, a hairline between,
   so a pane's heading never reads as part of its body (light and dark: the tokens step the same way). */
.disclosure { min-width: 0; border-radius: var(--r-lg); background: var(--card); color: var(--on-surface); }
.disclosure > summary {
  display: flex; align-items: center; gap: 0.75rem; min-height: var(--control-h); padding: 0 1rem;
  border-radius: var(--r-lg); background: var(--surface-container-highest); font: var(--t-label-l); cursor: pointer; list-style: none;
  transition: background-color var(--d-short) var(--ease-effects);
}
.disclosure[open] > summary { border-end-start-radius: 0; border-end-end-radius: 0; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::after {
  content: ""; width: 0.5rem; height: 0.5rem; margin-inline: auto 0.25rem;
  border-inline-end: 2px solid currentColor; border-block-end: 2px solid currentColor;
  rotate: 45deg; transition: rotate var(--d-spring) var(--spring-default);
}
.disclosure[open] > summary::after { rotate: 225deg; }
.disclosure > summary:hover { background: color-mix(in srgb, var(--on-surface) 8%, var(--surface-container-highest)); }
.disclosure > summary:focus-visible { outline-offset: -3px; }
.disclosure-body { display: grid; gap: 1rem; min-width: 0; padding: 0.75rem 1rem 1rem; border-block-start: 1px solid var(--outline-variant); }
/* U6 (spec 10): a fold that holds a table (Insights, a version history) gives the table its card's whole width, as
   when it was not folded. */
.disclosure-body:has(> .table-card) { padding-inline: 0; }
/* A disclosure whose summary is a line of facts (the job page's "Screening (fit)", owner 2026-10-16: folded, its
   verdict and data points in view). The line wraps on a phone with room above and below; the chevron keeps its size;
   the verdict, its first part, is bold. */
.disclosure-glance > summary { padding-block: 0.625rem; }
.disclosure-glance > summary::after { flex: none; }
.glance { min-width: 0; overflow-wrap: anywhere; }
/* A part breaks onto the next line whole ("Must-haves met: 1 of 1" is never split), unless it is wider than the line. */
.glance-part { display: inline-block; max-width: 100%; }
.glance > .glance-part:first-child > .glance-text { font-weight: 700; }
/* C2b: a folded job step says what it holds after its title, in the summary's own line; open, the step shows it. */
.step > summary { flex-wrap: wrap; row-gap: 0.25rem; }
.step-glance { flex: 1 1 16rem; min-width: 0; overflow-wrap: anywhere; font: var(--t-body-m); color: var(--on-surface-variant); }
.step[open] > summary > .step-glance { display: none; }
/* Owner, 2026-10-17: the drafts that could not be written, after the written ones, under a small heading. */
.drafts-failed-title { margin: 0; font: var(--t-title-s); color: var(--on-surface-variant); }

/* ---- Long text: a letter or a job description keeps its line breaks ---- */
.text-block { max-width: 75ch; white-space: pre-wrap; overflow-wrap: anywhere; }
/* E1, A1 (enhancements spec 5.1): a letter or an answer exactly as Upwork shows it (`c::preview`): `.text-block` keeps
   every space and line break, and a long unbroken line wraps anywhere on a phone. The note above it names the
   formatting marks it holds, quietly, outside the text. */
.letter-preview { overflow-wrap: anywhere; }
.formatting-note { margin: 0; overflow-wrap: anywhere; }
/* E1, A2 (enhancements spec 5.2): the line under an answer: its words, and how the writer shortened it. */
.answer-words { margin: 0; }
/* A long text cut to about 12 lines (c::clamp): its end fades, and "Show all" under it is a checkbox drawn as a text
   button, so it opens without script. The checkbox covers its button (as a choice's radio button does): invisible,
   but it is what the keyboard and screen readers use. Ticked, the cut is gone and the button is filled. */
.clamp { display: grid; gap: 0.25rem; justify-items: start; min-width: 0; }
.clamp > :first-child {
  max-height: calc(1.625rem * 12); overflow: hidden;
  mask-image: linear-gradient(to bottom, #000 calc(100% - 3.25rem), transparent);
}
.clamp:has(input:checked) > :first-child { max-height: none; overflow: visible; mask-image: none; }
.clamp-toggle input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.clamp-toggle:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.clamp-toggle:has(input:checked) { background: var(--secondary-container); color: var(--on-secondary-container); }

/* ---- Stacked facts: long labels (screening questions) above their values (answers) ---- */
.facts-stacked > div { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
.facts-stacked dd { font: var(--t-body-m); }
/* In a draft's card the first answer starts right under its heading. */
.subcard .facts-stacked > div:first-child { padding-top: 0; }

/* ---- Timeline: oldest first, a dot on a line down the start edge; each step has its time, what happened and a
   detail. The dot and the line are decoration; the words carry the meaning. W8 item 4: the job's Turnaround moments
   (turnaround-*) are drawn the same way, under their own classes. ---- */
.timeline, .turnaround-moments { display: grid; margin: 0; padding: 0; list-style: none; }
.timeline-item, .turnaround-moment {
  position: relative; display: grid; gap: 2px; margin-inline-start: 0.375rem; padding: 0 0 1rem 1.375rem;
  border-inline-start: 2px solid var(--outline-variant);
}
.timeline-item:last-child, .turnaround-moment:last-child { padding-bottom: 0; border-inline-start-color: transparent; }
.timeline-item::before, .turnaround-moment::before {
  content: ""; position: absolute; inset-inline-start: calc(-0.375rem - 1px); top: 0.375rem; width: 0.75rem; height: 0.75rem;
  border-radius: 50%; background: var(--primary);
}
.timeline-when, .turnaround-when { font: var(--t-body-m); color: var(--on-surface-variant); }
.timeline-what, .turnaround-what { font: var(--t-label-l); }
/* W1 C4: a link inside a step's words ("Approved via job 12") is a full-size target. */
.timeline-item .hint a { display: inline-flex; align-items: center; min-height: var(--target); min-width: var(--target); }

/* ---- Steps (the job page, S2): numbered, open where the work is; a finished step folds but can be opened. The
   summary holds the number and an h2; the chevron is drawn in CSS like the disclosure's ---- */
.step { min-width: 0; border-radius: var(--r-lg-plus); background: var(--card); color: var(--on-surface); }
.step > summary {
  display: flex; align-items: center; gap: 1rem; min-height: var(--control-h); padding: 1rem 1.25rem;
  border-radius: var(--r-lg-plus); cursor: pointer; list-style: none;
  transition: background-color var(--d-short) var(--ease-effects);
}
.step > summary::-webkit-details-marker { display: none; }
.step > summary::after {
  content: ""; width: 0.5rem; height: 0.5rem; margin-inline: auto 0.25rem; flex: none;
  border-inline-end: 2px solid currentColor; border-block-end: 2px solid currentColor;
  rotate: 45deg; transition: rotate var(--d-spring) var(--spring-default);
}
.step[open] > summary::after { rotate: 225deg; }
.step > summary:hover { background: color-mix(in srgb, var(--on-surface) 5%, var(--card)); }
.step > summary:focus-visible { outline-offset: -3px; }
.step-number {
  display: inline-grid; place-items: center; flex: none; width: 2.4rem; height: 2.4rem; border-radius: var(--r-md);
  background: var(--primary-container); color: var(--on-primary-container); font: var(--t-title-m);
}
.step-title { font: var(--t-title-l); }
.step-body { display: grid; gap: 1rem; min-width: 0; padding: 0 1.25rem 1.25rem; }
@media (min-width: 64rem) {
  .step > summary { padding: 1.25rem 1.75rem; }
  .step-body { padding: 0 1.75rem 1.75rem; }
}

/* ---- Long fields (a letter, an answer, a note): like the one-line fields, taller, and they grow by hand ---- */
textarea {
  width: 100%; min-height: calc(var(--control-h) * 2); padding: 0.75rem 0.875rem;
  border: 1px solid var(--outline); border-radius: var(--r-md); background: var(--card); color: var(--on-surface);
  font: var(--t-body-l); resize: vertical; transition: border-color var(--d-short) var(--ease-effects);
}
textarea:hover { border-color: var(--on-surface); }
textarea[aria-invalid="true"] { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
/* U6 (spec 9): a long field that starts as one line and grows with what is typed, still wrapping (a Screening
   Profile's criteria). Where a browser cannot size a field to its content, app.js sets the height as one types. */
textarea[data-grow] { min-height: var(--control-h); field-sizing: content; }

/* ---- Live box: work in progress that htmx refreshes every 10 seconds; the words say what is happening ---- */
.live { display: grid; gap: 0.5rem; min-width: 0; padding: 1rem; border-radius: var(--r-lg); background: var(--surface-container-high); }
/* UX-review-letter M054, M243: how long such a change usually takes, and an AI change's result line (its words, a
   failure's reason, its actions). */
.live-estimate { margin: 0; color: var(--on-surface-variant); }
.ai-result { display: grid; gap: 0.5rem; min-width: 0; }
.ai-result-words, .ai-result-problem { margin: 0; overflow-wrap: anywhere; }
.ai-result-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; }

/* ---- Copy buttons: hidden until app.js can copy; "Copied." appears next to the button ---- */
.copy-done { align-self: center; }

/* A count inside a button (the Review Queue's two views). */
.btn .badge { margin-inline-start: 0.25rem; }

/* ---- Number and code fields (S3): a number has the outline and corners of a one-line field; multi-line text is
   S2's long field (textarea) ---- */
input[type="number"] {
  width: 100%; max-width: 12rem; min-height: var(--control-h); padding: 0 0.875rem;
  border: 1px solid var(--outline); border-radius: var(--r-md); background: var(--card); color: var(--on-surface);
  font: var(--t-body-l); transition: border-color var(--d-short) var(--ease-effects);
}
input[type="number"]:hover { border-color: var(--on-surface); }
/* A number or a dropdown a refused form marks is drawn like a marked one-line field. */
input[type="number"][aria-invalid="true"], select[aria-invalid="true"] {
  border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger);
}
/* Templates and JSON: every character shows as typed. */
.field-code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.hint code { overflow-wrap: anywhere; }

/* ---- Date fields (S5: a contract's start): the outline and corners of a one-line field ---- */
/* C2: a due time (Ask for review, Change due time) is a date-time field drawn as a date field. */
input[type="date"], input[type="datetime-local"] {
  width: 100%; max-width: 16rem; min-height: var(--control-h); padding: 0 0.875rem;
  border: 1px solid var(--outline); border-radius: var(--r-md); background: var(--card); color: var(--on-surface);
  font: var(--t-body-l); transition: border-color var(--d-short) var(--ease-effects);
}
input[type="date"]:hover, input[type="datetime-local"]:hover { border-color: var(--on-surface); }

/* Charts (S6): drawn on the server by crate::charts. The words (labels, values, axis, legend) are text in the page, so
   they stay 15 px or more at every width; the drawings scale. Every chart has a table with the same numbers next to it. */
/* The bars of one chart share one set of columns (from 40rem the list holds them and each row is a subgrid), so
   every track is equally long whatever its row's value says ("Too few to judge" is wider than a percent). On a
   phone a row is its label and value over a full-width bar. */
.chart-bars { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.chart-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; }
.chart-label { overflow-wrap: anywhere; }
.chart-bar { display: block; width: 100%; height: 0.75rem; }
.chart-track { fill: var(--surface-container-highest); }
.chart-fill { fill: var(--chart-1); }
.chart-muted .chart-fill { fill: var(--outline); }
.chart-muted .chart-label, .chart-muted .chart-value { color: var(--on-surface-variant); }
.chart-value { text-align: end; font-variant-numeric: tabular-nums; }
.chart-note { display: block; color: var(--on-surface-variant); }
@media (max-width: 39.99rem) { .chart-bar { grid-column: 1 / -1; grid-row: 2; } }
@media (min-width: 40rem) {
  .chart-bars { grid-template-columns: minmax(8rem, 14rem) minmax(4rem, 1fr) minmax(7rem, auto); column-gap: 0.75rem; }
  .chart-row { grid-column: 1 / -1; grid-template-columns: subgrid; }
}
.chart { display: grid; gap: 0.5rem; margin: 0; }
.chart-title { font: var(--t-title-s); }
.chart-plot { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 0.5rem; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; text-align: end; color: var(--on-surface-variant); font-variant-numeric: tabular-nums; }
.chart-lines { display: block; width: 100%; height: 12rem; }
.chart-grid { stroke: var(--divider); stroke-width: 1; }
.chart-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-series-1 { stroke: var(--chart-1); background: var(--chart-1); }
.chart-series-2 { stroke: var(--chart-2); background: var(--chart-2); }
.chart-series-3 { stroke: var(--chart-3); background: var(--chart-3); }
/* Never colour alone: the second and third lines are dashed and dotted, and so are their legend swatches. */
.chart-line.chart-series-2 { stroke-dasharray: 8 4; }
.chart-line.chart-series-3 { stroke-dasharray: 2 4; }
.chart-swatch.chart-series-2 { background: repeating-linear-gradient(90deg, var(--chart-2) 0 0.5rem, transparent 0.5rem 0.75rem); }
.chart-swatch.chart-series-3 { background: repeating-linear-gradient(90deg, var(--chart-3) 0 2px, transparent 2px 0.375rem); }
.chart-line.chart-dot { stroke-width: 6; stroke-dasharray: none; }
.chart-hit { fill: transparent; }
.chart-hit:hover { fill: color-mix(in srgb, var(--on-surface) 6%, transparent); }
.chart-x { display: flex; justify-content: space-between; padding-inline-start: calc(4rem + 0.5rem); color: var(--on-surface-variant); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.chart-legend li { display: inline-flex; gap: 0.5rem; align-items: center; }
.chart-swatch { display: inline-block; width: 1rem; height: 0.25rem; border-radius: var(--r-full); }
@media (forced-colors: active) { .chart-fill, .chart-line, .chart-swatch { forced-color-adjust: none; } }
/* A chart and the table with the same numbers, side by side from 72rem: the chart takes what the table leaves (28rem
   for a table of words and figures, 24rem with -s for one of short figures). Stacked below. */
.chart-split { display: grid; gap: 1rem 1.5rem; align-items: start; min-width: 0; }
.chart-split > * { min-width: 0; }
@media (min-width: 72rem) {
  .chart-split { grid-template-columns: minmax(0, 1fr) minmax(0, 28rem); }
  .chart-split-s { grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); }
  /* The chart is shorter than a table of fourteen steps: it stays in view while the table scrolls past. */
  .chart-split > :first-child { position: sticky; top: calc(var(--appbar-h) + 1rem); }
}

/* ---- Row lists (S6 Task 17): rows a person adds and removes (Upwork Profile facts). A row's fields sit side by side
   and wrap on phones; Remove ends the row. The buttons stay hidden until app.js shows them; without it one empty row
   waits, and empty rows are not saved. ---- */
.rows { display: grid; gap: 0.75rem; justify-items: start; min-width: 0; }
.rows-list { display: grid; width: 100%; min-width: 0; margin: 0; padding: 0; list-style: none; }
.rows-item {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; min-width: 0;
  padding: 0.75rem 0; border-bottom: 1px solid var(--divider);
}
/* A row holds one line from 40rem, in a form section as narrow as 444 px (a 640 px window): its fields share the
   width, a short one (.field-s: years, a Yes or No) keeps to 7.5rem, and Remove ends the line. On a phone a field
   takes the line, and a short one shares its line with Remove. */
.rows-item > .field { flex: 1 1 7rem; }
.rows-item > .field-s { flex: 0 1 7.5rem; }
@media (max-width: 39.99rem) {
  .rows-item > .field { flex: 1 1 100%; }
  .rows-item > .field-s { flex: 1 1 7.5rem; }
}

/* ---- View switch (c::view_switch): the same page seen another way. One rounded container of equal segments 2 px
   apart, like the connected button group, but links; the current one (aria-current="true") is filled and fully
   round. Full width on a phone, as wide as its words from 40rem. A count is a badge after the word. ---- */
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; min-width: 0; }
.tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-width: 0;
  min-height: var(--target); padding: 0.25rem 0.75rem; border-radius: var(--r-sm);
  background: var(--surface-container-high); color: var(--on-surface-variant);
  font: var(--t-label-l); text-align: center; text-decoration: none;
  transition: border-radius var(--d-spring-fast) var(--spring-fast), background-color var(--d-short) var(--ease-effects);
}
.tab:first-child { border-start-start-radius: calc(var(--target) / 2); border-end-start-radius: calc(var(--target) / 2); }
.tab:last-child { border-start-end-radius: calc(var(--target) / 2); border-end-end-radius: calc(var(--target) / 2); }
.tab:hover { background: color-mix(in srgb, var(--on-surface) var(--state-hover), var(--surface-container-high)); }
.tab[aria-current] { background: var(--primary); color: var(--on-primary); border-radius: calc(var(--target) / 2); }
.tab .icon { width: 1.2rem; height: 1.2rem; }
/* A view whose words are too long for a phone's segment has short ones too (Tab.short): one of the two is drawn. */
.tab-wide { display: none; }
.tab-narrow { display: contents; }
/* On a phone a segment's count stands beside its words where they fit, and on the line under them where they do not
   ("To review" and "over 100" need 171 px; a segment has 149 at a 375 px window). */
@media (max-width: 39.99rem) { .tab { flex-wrap: wrap; gap: 0.25rem 0.5rem; } }
@media (min-width: 40rem) {
  .tabs { display: inline-grid; justify-self: start; }
  .tab { padding: 0 1.125rem; white-space: nowrap; }
  .tab-wide { display: contents; }
  .tab-narrow { display: none; }
}
/* The row under the page header: the view switch at the start, a hint at the end from 40rem; stacked on a phone. */
.toolbar { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
@media (min-width: 40rem) {
  .toolbar { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; }
  .toolbar > .hint { flex: 1 1 20rem; max-width: 60ch; text-align: end; }
}
/* A line of status in the toolbar (the Scanners list's last read of GigRadar): its date and time never break. */
.toolbar time { white-space: nowrap; }

/* ---- Next-stage control (partials/stage_move.html): the one filled button for the stage that comes next, and
   "More" beside it, which opens the menu of every other update. The two never wrap apart; in a stacked table row
   and on a phone they share the width. ---- */
.move-actions { display: inline-flex; flex-wrap: nowrap; gap: 0.5rem; white-space: nowrap; vertical-align: middle; }
/* The menu reads from the start even in an action cell, which is end-aligned. */
.move-actions .menu { white-space: normal; text-align: start; }
/* W3 P3 (M3): an action on a Follow-ups row comes back at the next row (#row-ID): clear of the sticky header. */
.table tr[id^="row-"] { scroll-margin-block-start: 6rem; }
@media (max-width: 39.99rem) {
  .move-actions { display: flex; }
  .move-actions > .btn { flex: 1 1 auto; padding-inline: 1rem; }
  /* "More" is the right-hand button there: its menu opens toward the start, its end edge under the button's, so
     it keeps the card's gutter instead of running to the edge of the screen. */
  .move-actions .menu-anchored { position-area: bottom span-left; }
}
/* In a stacked row of a record table the control is a row of its own among the row's buttons. */
@media (max-width: 63.99rem) { .table-stack .col-actions > .move-actions { display: flex; } }
@media (max-width: 71.99rem) { .table-stack-m .col-actions > .move-actions { display: flex; } }

/* ---- Result list (global search, 2026-10-16): one result per item, its title an h3 whose link is the whole line
   (at least the 41 px target), then a line of facts (a chip first) and a snippet. A match is a <mark>: a tonal
   background AND bold, never colour alone. Hairlines between results, as between a table's rows. ---- */
.results { display: grid; margin: 0; padding: 0; list-style: none; }
.result { display: grid; gap: 0.25rem; min-width: 0; padding: 0.75rem 0; border-top: 1px solid var(--outline-variant); }
.result:first-child { padding-top: 0; border-top: 0; }
.result:last-child { padding-bottom: 0; }
.result-title { margin: 0; font: var(--t-title-s); overflow-wrap: anywhere; }
.result-title a { display: block; min-height: var(--target); padding-block: calc((var(--target) - 1.5rem) / 2); }
.result-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; margin: 0;
  font: var(--t-body-m); color: var(--on-surface-variant); overflow-wrap: anywhere;
}
.result-snippet { max-width: 75ch; margin: 0; font: var(--t-body-m); overflow-wrap: anywhere; }
mark { padding: 0 0.125rem; border-radius: 0.25rem; background: var(--warn-container); color: var(--on-warn-container); font-weight: 700; }

/* ---- C2b: the Style Guide's picture of a Slack card (web/STYLE.md, "Slack card preview"). A picture, never a
   control: the buttons are words in an outline. The JSON wraps, so a phone never scrolls sideways. ---- */
.slack-mock {
  display: grid; gap: 0.5rem; min-width: 0; padding: 0.75rem 1rem;
  border-inline-start: 0.25rem solid var(--outline-variant); border-radius: var(--r-sm); background: var(--surface-container);
}
.slack-mock-text { margin: 0; overflow-wrap: anywhere; }
.slack-mock-head { font-weight: 700; }
.slack-mock-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 1rem; margin: 0; }
.slack-mock-fields dt { font-weight: 700; }
.slack-mock-fields dd { margin: 0; overflow-wrap: anywhere; }
.slack-mock-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; }
.slack-mock-button { padding: 0.25rem 0.75rem; border: 1px solid var(--outline); border-radius: var(--r-sm); }
.slack-json {
  margin: 0; padding: 0.75rem; overflow-wrap: anywhere; white-space: pre-wrap;
  border-radius: var(--r-sm); background: var(--surface-container-high); font: var(--t-body-m);
}

/* ---- C3: two versions compared word by word (web/STYLE.md, "Version parts"). A removed word is struck through on
   the danger container, an added word underlined on the ok container: never colour alone, and each says so to a
   screen reader first. ---- */
.diff del { padding: 0 0.125rem; border-radius: 0.25rem; background: var(--danger-container); color: var(--on-danger-container); text-decoration: line-through; }
.diff ins { padding: 0 0.125rem; border-radius: 0.25rem; background: var(--ok-container); color: var(--on-ok-container); text-decoration: underline; }

/* ---- C6: a file input (a job's Attachments, New Manual Job's step 1) is a control of the form's height, as wide as
   its field, the browser's own button inside it at the label's size. ---- */
input[type="file"] {
  width: 100%; min-height: var(--control-h); padding: 0.375rem 0.875rem;
  border: 1px solid var(--outline); border-radius: var(--r-md); background: var(--card); color: var(--on-surface);
  font: var(--t-body-l);
}
input[type="file"]::file-selector-button { min-height: calc(var(--control-h) - 0.75rem); margin-inline-end: 0.75rem; font: var(--t-label-l); }

/* ---- C6: a manual job's files (web/STYLE.md, "Attachment parts"). One file an item: its name as the download link
   (the paperclip with the name, at least the 41 px target), a line of facts (type, size, pages) with the state of its
   text as a chip, then who added it and when. Hairlines between files, as between search results. ---- */
.file-list { display: grid; margin: 0; padding: 0; list-style: none; }
.file-item { display: grid; gap: 0.25rem; min-width: 0; padding: 0.75rem 0; border-top: 1px solid var(--outline-variant); }
.file-item:first-child { padding-top: 0; border-top: 0; }
.file-name { overflow-wrap: anywhere; }
.file-facts {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; margin: 0;
  font: var(--t-body-m); color: var(--on-surface-variant); overflow-wrap: anywhere;
}

/* ---- C6: a letter's paragraphs with "Save to library" (web/STYLE.md, "Library parts"). One paragraph a line: its
   first words, then its button (or "In the library") at the end; on a phone the button takes the next line. The
   dialog's read-only paragraph is a text block of its own. ---- */
.paragraph-list { display: grid; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.paragraph-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1rem; min-width: 0; }
.paragraph-item > span:first-child { flex: 1 1 16rem; min-width: 0; overflow-wrap: anywhere; }
.library-text { max-width: 75ch; }
/* Without script every paragraph that can be saved stands in the dialog, each under its name (10.10 AL2). */
.library-choice { display: grid; gap: 0.25rem; min-width: 0; }
.library-choice + .library-choice { margin-top: 0.75rem; }

/* ---- U1 (UI rethink spec 3.3): the decision-first parts (web/STYLE.md, "Decision-first parts") ---- */
/* The decision card: first in the page's work. Its tone is a band at its start edge, never colour alone (the headline
   says the state in words). The outcome card is the same card, calmer: no filled button. */
.decision { gap: 0.75rem; border-inline-start: 0.375rem solid var(--neutral-container); }
.decision-neutral { border-inline-start-color: var(--neutral-container); }
.decision-info { border-inline-start-color: var(--info-container); }
.decision-ok { border-inline-start-color: var(--ok-container); }
.decision-warn { border-inline-start-color: var(--warn-container); }
.decision-danger { border-inline-start-color: var(--danger-container); }
.decision-outcome { background: var(--surface-container-high); }
.decision-head { font: var(--t-title-m); }
.decision-reason { font: var(--t-body-l); max-width: 60rem; }
.decision-why > summary { padding-block: 0.375rem; }
.decision-facts { margin: 0; }
.decision-actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; }
.decision-action { display: inline-flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: center; }
.decision-consequence { overflow-wrap: anywhere; }
/* One line of chips next to an action: what blocks it, what it asks first, what it only shows. */
.blocker-line { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0; }
.blocker-line .status { white-space: normal; }
/* W4 l3 G1 core (STYLE.md "Blocked button"): what a tap on a blocked button says (c::explain_region, crate::blocked),
   in a form, a card or a dialog as in a sticky bar. Empty, it takes no room but stays in the page, so a screen reader
   hears it when a tap fills it (a live region must be there before its words are). */
.explain-line { margin: 0; min-width: 0; font: var(--t-body-m); overflow-wrap: anywhere; }
.action-bar > .explain-line { flex: 1 1 100%; }
.explain-line:empty {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
/* The glance strip under the title: 4 to 6 facts, each part breaking whole; where the job came from on line two. */
.glance-strip { display: grid; gap: 0.25rem; min-width: 0; font: var(--t-body-m); }
.glance-strip-second { color: var(--on-surface-variant); }
/* FK-U U4: a part of line two that links (the job's Upwork Profile) is a 41 px target in its line. */
.glance-strip-second a { display: inline-flex; align-items: center; min-height: var(--target); min-width: var(--target); }
/* W7 (hand-send:312): in the strip's own line two (one link) the box stays 41 px, but a negative margin-block takes
   the extra back, so the line keeps body-m's 1.5rem and nothing under the strip (the copy pack's bid row at 1440 x 900)
   moves down. Only there: #group-line (partials/freelancers.html) has a row-link per freelancer and wraps, and its
   41 px lines keep wrapped links from overlapping. */
.glance-strip > .glance-strip-second a { margin-block: calc((1.5rem - var(--target)) / 2); }
/* P-items (spec 6): the AI interviewer's line under the strip: the icon and its words on one line, wrapping whole. */
.glance-strip-note { margin: 0; color: var(--on-surface-variant); }
.glance-strip-second > .glance-part:first-child > .glance-text { font-weight: 400; }
/* A form that opens in place from a text button; never open by default. */
.form-on-demand { min-width: 0; }
.form-on-demand > summary { list-style: none; width: fit-content; }
.form-on-demand > summary::-webkit-details-marker { display: none; }
.form-on-demand-body { display: grid; gap: 1rem; min-width: 0; padding-block: 0.75rem 0.25rem; }
@media (max-width: 39.99rem) {
  .form-on-demand[open] > .form-on-demand-body { padding: 1rem; border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--surface-container-high); }
}
/* Needs attention: a configuration page's risky set-ups as warn chips. A chip's words wrap (a long warning would
   otherwise widen the card past a 375 px phone). */
.needs-attention { display: grid; gap: 0.5rem; min-width: 0; }
.needs-attention .status { white-space: normal; }
.needs-attention-title { font: var(--t-label-l); }
/* A configuration page's read view, then its folded edit sections. */
.read-view { gap: 0.75rem; }
.read-view-facts { margin: 0; }
@media (max-width: 39.99rem) { .read-view-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.edit-section > .disclosure-body > form { min-width: 0; }
.timeline-filtered { display: grid; gap: 0.5rem; }
.pane { min-width: 0; }
/* ---- U2 (UI rethink spec 4.3, 4.4): the job page before and during drafting (web/STYLE.md, "Work rows",
   "People list") ---- */
/* One row per Writer Profile (or failed step) in the decision card: the name, its state chip and its class chip on one
   line that wraps whole, then why, in plain words, and the page that fixes it. */
.work-rows { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.work-row { display: grid; gap: 0.25rem; min-width: 0; padding-block: 0.5rem; border-block-start: 1px solid var(--outline-variant); }
.work-row:first-child { border-block-start: 0; padding-block-start: 0; }
.work-row-head { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0; }
.work-row-line { margin: 0; max-width: 75ch; overflow-wrap: anywhere; }
/* W22 (m3): the one Conversation pane. Under a client message: its Slack thread (state, tagged, the discussion synced
   both ways, the comment form) set in from the message, then our reply block (version, reviewers, forms). */
.client-thread { display: grid; gap: var(--space-2); min-width: 0; margin-block-start: var(--space-2); padding-inline-start: var(--space-4); border-inline-start: 2px solid var(--outline-variant); }
.thread-discussion { gap: var(--space-2); }
.thread-discussion .work-row { padding-block: var(--space-1); }
.message-reply { display: grid; gap: var(--space-2); min-width: 0; padding: var(--space-3); border-radius: 0.5rem; background: var(--surface-container); }
.message-reply h4 { margin: 0; }
/* E2: what a redraft or "More drafts" draft was asked with, and what the newest one did when it made no version. */
.draft-asked { margin: 0; max-width: 75ch; overflow-wrap: anywhere; }
.steer-note { margin: 0; max-width: 75ch; }
.live-card { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; }
/* UX-review-letter M236: after a decision from the Review Queue, its next job, first under the title. */
.next-job { display: grid; gap: 0.5rem; }
.next-job-line { margin: 0; overflow-wrap: anywhere; }
/* The job's description in the decision-first page: cut to about 6 lines, so the folds below stay in the first
   screen (spec 1, the To decide row). The cap goes when "Show all" is ticked (it would outrank .clamp's unclamp rule). */
.job-page-u2 .job-text .clamp:not(:has(input:checked)) > :first-child { max-height: calc(1.625rem * 6); }
/* The card's note (UA62): whole at every width; on a phone a long one is cut to two lines with "Show all" under it (the
   checkbox inside the label, as .clamp's). Screen readers read the whole note either way. */
.decision-reason-clamp { display: grid; gap: 0.25rem; justify-items: start; min-width: 0; }
.decision-reason-more { display: none; }
@media (max-width: 39.99rem) {
  .decision-reason-more { display: inline-flex; position: relative; }
  .decision-reason-clamp:not(:has(input:checked)) > .decision-reason {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  }
}
/* Reassign's people: one radio button per person, 41 px rows, the list scrolls inside the dialog. */
.people-list { display: grid; gap: 0.5rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.people-list > legend { font: var(--t-label-l); padding: 0; margin-block-end: 0.25rem; }
.people-list-items { display: grid; max-height: min(20rem, 50vh); overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.people-list-item { display: flex; gap: 0.75rem; align-items: center; min-height: 2.5625rem; padding-inline: 0.25rem; cursor: pointer; }
.people-list-item input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0; }
/* int/w5b-final (u6 @390, SH-E Copy to Scanners): a name with no space (a Scanner's) wraps inside the list instead of
   widening the list's one column past the screen. */
.people-list, .people-list-items { grid-template-columns: minmax(0, 1fr); }
.people-list-item { min-width: 0; overflow-wrap: anywhere; }
/* On a phone the decision card's actions take the width they can, as every row of buttons does (above): an action that
   is not a text button fills its row, with its consequence under it. */
@media (max-width: 39.99rem) {
  .decision-action:has(> .btn-filled, > .btn-tonal, > .btn-outlined) { flex: 1 1 100%; }
  .decision-action > .btn-filled, .decision-action > .btn-tonal, .decision-action > .btn-outlined { flex: 1 1 auto; }
}
/* ---- U3 (UI rethink spec 4.5, 5.5): the Versions pane and the Compare page (web/STYLE.md, "Version parts") ---- */
/* One row per Version, newest first: its name and chips on one line that wraps whole, how it was made, its actions,
   then its details folded. A list, not a table: nothing scrolls sideways. */
.version-rows { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.version-row { display: grid; gap: 0.25rem; min-width: 0; padding-block: 0.5rem; border-block-start: 1px solid var(--outline-variant); }
.version-row:first-child { border-block-start: 0; padding-block-start: 0; }
.version-row-head { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0; }
/* A changed paragraph: before and after side by side where there is room, one under the other on a phone. */
.compare-pair { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); padding-block: 0.75rem; border-block-start: 1px solid var(--outline-variant); }
.compare-pair > .hint { grid-column: 1 / -1; margin: 0; }
.compare-side { display: grid; gap: 0.25rem; min-width: 0; }
.compare-side-label { font: var(--t-label-l); margin: 0; }
/* UX-review-letter M249: below 36rem a change is one block (its name, then its words struck through and added), not
   two sides; the Compare bar's forms stand as its buttons. */
.compare-inline { display: none; }
@media (max-width: 35.99rem) {
  .compare-pair > .compare-side { display: none; }
  .compare-pair > .compare-inline { display: grid; gap: 0.25rem; min-width: 0; }
}
.compare-bar > form { display: contents; }
/* M247: the reading view's first row: Previous draft, where it stands, Next draft, Compare. */
.draft-steps { align-items: center; gap: 0.25rem 0.5rem; }
/* ---- U3 (UI rethink spec 3.3, 4.5, 13): the letter view (web/STYLE.md, "Letter view") ---- */
/* The letter once, paragraph by paragraph. A paragraph's comments stand after it: under it on a phone, in a rail beside
   it from 72rem (every paragraph keeps the same text width then, so the letter reads as one column). */
.letter-view { display: grid; gap: 0.75rem; min-width: 0; }
.letter-view-head { align-items: center; }
.letter-view-title { font: var(--t-title-s); margin: 0; }
/* E1, A1: the blank lines between paragraphs are the letter's own (`p.letter-text` ends with them), so no gap. */
.letter-paragraphs { display: grid; gap: 0; min-width: 0; }
.letter-paragraph { display: grid; gap: 0.5rem; min-width: 0; }
.letter-text { margin: 0; max-width: 75ch; white-space: pre-wrap; overflow-wrap: anywhere; font: var(--t-body-l); }
.letter-text mark { font-weight: inherit; }
.letter-notes { display: grid; gap: 0.5rem; min-width: 0; }
.letter-note { display: grid; gap: 0.25rem; min-width: 0; padding: 0.5rem 0.75rem; border-inline-start: 0.1875rem solid var(--warn-container); border-radius: var(--r-sm); background: var(--surface-container); }
.letter-note > .row, .letter-note > .hint { margin: 0; }
.letter-answers { margin: 0; }
@media (min-width: 72rem) {
  .letter-view:has(.letter-notes) .letter-paragraph { grid-template-columns: minmax(0, 1fr) 18rem; align-items: start; column-gap: 1.5rem; }
}
/* ---- U3 (UI rethink spec 4.5, 13): the job page at Review (web/STYLE.md, "Review bar") ---- */
/* The description folds under "The job" here; clamped to about 6 lines when opened, as before drafting. The cap goes
   when "Show all" is ticked (it would outrank .clamp's unclamp rule). */
.job-page-u3 .job-text .clamp:not(:has(input:checked)) > :first-child { max-height: calc(1.625rem * 6); }
/* Spec 4.5, 13.3 (UA79): the blocker line is the bar's first row, as wide as the bar and above its buttons, so what
   blocks or asks stands on screen beside Approve wherever the page is scrolled. Its chips stand closer there (the
   label type stays). Without script the room kept for the bar counts the line. */
.review-bar > .blocker-line { flex: 1 1 100%; gap: 0.375rem; }
.review-bar > .blocker-line .status { min-height: 1.5rem; }
html:has(.review-bar > .blocker-line) { --action-bar-h: 7rem; }
/* The card's actions stand in the sticky bar. On a phone the bar is two rows of buttons at most, under its blocker
   line: Approve has the first, Skip and the rest stand two across (More leaves the bar on a phone: "Write new drafts"
   stands with the drafts). */
@media (max-width: 39.99rem) {
  html:has(.review-bar > .blocker-line) { --action-bar-h: 10.5rem; }
  /* Spec 13.3: on a phone the blocker line takes the fewest rows it can: its chips run on as text, each on its tone
     and with its icon, a chip breaking between words; a bar with the line stands its rows a little closer. */
  .review-bar:has(> .blocker-line) { row-gap: 0.375rem; padding-block: 0.5rem calc(0.5rem + env(safe-area-inset-bottom)); }
  .review-bar > .blocker-line { display: block; line-height: 1.5rem; }
  /* UX-review-letter G3 (UX fixes spec 2026-10-25 3.6): the line stays one line, its ellipsis cutting the words (they
     stay whole for a screen reader); overflow: hidden lets it shrink, so it never widens the bar or the page. */
  .review-bar > .blocker-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .review-bar > .blocker-line .status {
    display: inline; min-height: 0; padding: 0.0625rem 0.375rem; margin-inline-end: 0.25rem; border-radius: var(--r-sm);
    -webkit-box-decoration-break: clone; box-decoration-break: clone;
  }
  .review-bar > .blocker-line .status .icon-label { display: inline; }
  /* int/w5b-final (smoke:877 @375): RR H's "Open: n comments / review requests" links make the line longer than a
     phone, and a chip clipped by the line still reaches past the screen. One row still, but its parts shrink, each
     cut with its own ellipsis, so none runs past the edge. */
  .review-bar > .blocker-line { display: flex; flex-wrap: nowrap; align-items: center; gap: 0.25rem; contain: inline-size; }
  .review-bar > .blocker-line > * { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .review-bar > .blocker-line > .status-link { display: flex; }
  .review-bar > .blocker-line > .status-link > .status { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  /* The words, not the chip around them, take the ellipsis, so nothing inside runs past the screen. */
  .review-bar > .blocker-line .status .icon-label { display: flex; align-items: center; min-width: 0; max-width: 100%; }
  .review-bar > .blocker-line .status .icon-label > svg { flex: none; }
  .review-bar > .blocker-line .status .icon-label > span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .review-bar > .blocker-line .status .icon {
    display: inline-block; width: 1rem; height: 1rem; margin-inline-end: 0.25rem; vertical-align: -0.15em;
  }
  .review-bar > .decision-action { flex: 1 1 calc(50% - 0.25rem); min-width: 0; }
  .review-bar > .decision-action:has(> .btn-filled) { flex-basis: 100%; }
  .review-bar > .decision-action:has(> .btn-outlined, > .btn-tonal) { flex: 1 1 calc(50% - 0.25rem); }
  /* (The bar's own phone padding, as .action-bar > .btn has: the card's actions stand one level down, in their span.) */
  .review-bar > .decision-action > .btn { flex: 1 1 auto; min-width: 0; padding-inline: 0.75rem; }
}
/* Spec 1 (UA80), 13: on a phone the letter's first lines stand in the first screen, above the sticky bar. A letter
   title that repeats the card's going-out line is for screen readers only, so Edit and "Comment on this passage" share
   one row; a Reviewer's card is her request (her version, its Writer Profile and the answers stand in the letter view
   under it, who approved in the Discussion); the card's facts read label then value on one line; the parts, the
   card's padding and a fold's two-line summary stand closer (a summary keeps its 45 px row). Nothing leaves the
   page. */
@media (max-width: 39.99rem) {
  .letter-view-title-in-card {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  .review-request-first #decision .decision-facts { display: none; }
  /* W5b RR F (RR.2): beside the request card of the person asked the same holds (her request shows on its own card
     only, and it names what goes out): the decision card keeps its headline, its note and its actions. From
     Scheduled on (job_record.html), a decision card with no action of its own beside her card only repeats it (the
     send time, trial mode, what goes out, who approved), so a phone leaves it out unless its body holds a form or a
     button; the card's answer box takes Send beside it, and the card stands closer. So the letter starts on her first
     screen (ux-review-letter M091 at 390 x 844: 1118.5 px before, request card ending at 790, decision card at 1107).
     The page classes come from the templates (job-page-request: a request card is drawn; request-holds-card: and the
     decision card has no action and no reason line: a paused job's "Why: ..." or a send's line keeps the card, its
     facts hidden, since her stage line names only who paused it; a2 MINOR 7). */
  .job-page-request #decision .decision-facts { display: none; }
  .request-holds-card > #decision:not(:has(form, button)) { display: none; }
  .request-holds-card .request-card { gap: 0.5rem; }
  .request-holds-card .request-goes-out { display: none; }
  .request-card .request-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 0.5rem; }
  .request-card .request-form > * { grid-column: 1 / -1; }
  .request-card .request-form > .field { grid-column: 1; grid-row: 1; }
  .request-card .request-form > p.row:last-child { grid-column: 2; grid-row: 1; margin: 0; }
  /* The going-out card's facts (the answers, who approved) stand in the letter view and the Discussion; an empty
     answer is the bar's blocker line, beside Approve (UA84). */
  .job-page-u3:has(.letter-view-title-in-card) #decision .decision-facts { display: none; }
  .job-page-u3 .decision-facts { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  .job-page-u3 .decision-facts > div { display: flex; flex-wrap: wrap; column-gap: 0.5rem; align-items: baseline; }
  /* W5a C5 (w1-screening C5, /jobs/60 at 390 x 844): HS7's two-line "Other jobs for this Upwork job" summary put the
     letter's Edit and "Redraft this style" under the bar's second row (axe target-size). While that fold is drawn the
     parts stand closer and the title row's "Same Upwork job: ..." line leaves a phone: the fold lists the same jobs,
     each still a link. (A page without the fold keeps 0.75rem: at 0.5rem a manual job's "The job" summary stood as a
     strip at the bar's edge at 375 x 844, hand-send.spec.ts check 7.) */
  .job-page.job-page-u3 { gap: 0.75rem; }
  .job-page.job-page-u3:has(> #pane-freelancers) { gap: 0.5rem; }
  .job-page-u3:has(> #pane-freelancers) > #group-line { display: none; }
  /* 0.5rem since the merge of live 7k (its taller open-fold body): with 0.75rem a fold's summary at 375 x 900 stood
     as a strip at the sticky bar's edge (axe target-size, attachments.spec.ts), U3 final review finding 4. */
  .job-page-u3 > #decision { padding: 0.5rem 1rem; }
  .job-page-u3 > .pane.disclosure-glance > summary { padding-block: 0.375rem; }
}
/* UX-review-letter M252 (UX fixes spec 2026-10-25 3.6): the Review and record edit forms: the letter and each answer
   grow with their text (data-grow) from six lines, so no box scrolls inside the page; the record form's Save stands
   in a sticky bar of its own. */
.letter-edit textarea[data-grow] { min-height: 6lh; }
.record-edit-bar { margin-block-start: 0.5rem; }
/* UX-review-letter M246: a list of tick boxes looks like tick boxes (a visible box and its check mark, not a hidden
   input), the ticked row tinted; a "More drafts" profile's instruction box shows only once it is ticked, so nine
   profiles fit about one screen; an empty explanation in a dialog takes no room. */
.more-picks { gap: 0.25rem; }
/* An unticked profile is one line: its tick box row is the 40 px target, with no rule or padding between rows. */
.more-picks > .more-pick { padding-block: 0; border-block-start: 0; }
.start-over-lines { display: grid; gap: 0.25rem; margin: 0; padding-inline-start: 1.25rem; color: var(--on-surface-variant); }
.choice-check { box-shadow: inset 0 0 0 1px var(--outline); gap: 0.75rem; }
/* The tick box is drawn (a 2 px outline box, a check mark once ticked); the real box still covers the whole row, as in
   every .choice, so the row is the 40 px target and the keyboard and screen readers use the box. */
.choice-check::before {
  content: ""; flex: none; box-sizing: border-box; width: 1.25rem; height: 1.25rem;
  border: 2px solid var(--outline); border-radius: 0.25rem; background: var(--card);
}
.choice-check:has(input[type="checkbox"]:checked)::before { border-color: var(--primary); background: var(--primary); }
.choice-check:has(input[type="checkbox"]:checked)::after {
  content: ""; position: absolute; inset-inline-start: 1.5625rem; top: calc(50% - 0.4375rem); width: 0.375rem;
  height: 0.625rem; border: solid var(--on-primary); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.choice-check:has(input[type="checkbox"]:checked) { background: var(--secondary-container); color: var(--on-secondary-container); }
.more-pick:not(:has(input[type="checkbox"]:checked)) > .field { display: none; }
/* UX-review-letter M242: the Improve with AI sheet: its five choices as rows (the name over the line saying what it does,
   as tall as a target at least, the chosen one tinted), then only the chosen choice's step (CSS :has, no script); a
   choice that cannot run now is drawn quieter, its reason in place of its line. */
.improve-choices { display: grid; gap: 0.5rem; }
.improve-choice {
  position: relative; display: flex; align-items: flex-start; gap: 0.75rem; min-height: var(--target); padding: 0.75rem 1rem;
  border-radius: var(--r-md); background: var(--surface-container); color: var(--on-surface); cursor: pointer;
}
/* The radio button covers its whole row (the 40 px target), invisible as in every .choice; the row draws its circle. */
.improve-choice input[type="radio"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.improve-choice::before {
  content: ""; flex: none; box-sizing: border-box; width: 1.25rem; height: 1.25rem; margin-block-start: 0.125rem;
  border: 2px solid var(--outline); border-radius: 50%;
}
.improve-choice:has(input:checked)::before {
  border-color: var(--primary); background: radial-gradient(circle, var(--primary) 0 0.3125rem, transparent 0.34rem);
}
.improve-choice:has(input:disabled) input { cursor: default; }
.improve-choice-text { display: grid; gap: 0.125rem; min-width: 0; }
.improve-choice-name { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font: var(--t-title-s); }
.improve-choice:has(input:checked) { background: var(--secondary-container); color: var(--on-secondary-container); }
.improve-choice:has(input:disabled) { color: var(--on-surface-variant); cursor: default; }
.improve-choice:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
/* Once a choice is made, the choices' lines fold away and their rows close up (the chosen step says what it does; a
   cost line stays, and so does a blocked choice's reason: its own class, `.improve-choice-blocked`), so the step of
   nine Writer Profiles still fits 1.2 screens at 1440 x 900 (M246). */
.improve-sheet:has(.improve-choices input:checked) .improve-choice { align-items: center; padding-block: 0.375rem; }
.improve-sheet:has(.improve-choices input:checked) .improve-choice::before { margin-block-start: 0; }
.improve-sheet:has(.improve-choices input:checked) .improve-choice-hint { display: none; }
.improve-step { display: none; }
.improve-step > .form { gap: 0.75rem; }
.improve-sheet:has(#improve-choice-revise:checked) #improve-step-revise,
.improve-sheet:has(#improve-choice-redraft:checked) #improve-step-redraft,
.improve-sheet:has(#improve-choice-more:checked) #improve-step-more,
.improve-sheet:has(#improve-choice-answers:checked) #improve-step-answers,
.improve-sheet:has(#improve-choice-start-over:checked) #improve-step-start-over { display: grid; gap: 0.75rem; }
.dialog .bar-explain:empty {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
/* "Tell the AI what to change" inside the Review page's "Change with AI" fold: the fold is its heading. */
.revise-pane { display: grid; gap: 1rem; min-width: 0; }
/* UX-review-letter G1, G3 (UX fixes spec 2026-10-25 3.6, amends UA77): a sticky bar's line (the blocker line, an info
   line such as "You are reading Problem Spotter's draft", or what a tap on a blocked button says) is as wide as the
   bar; on a phone it stays one line (the words stay whole for a screen reader). Row 1 is the main action, full width;
   row 2 at most two text buttons, side by side. An empty explanation takes no room but stays in the page, so a screen
   reader hears it when a tap fills it (a live region must be there before its words are). */
/* (contain: inline-size: a phone's one-line bar line never widens the page to its words; its ellipsis cuts them.) */
.action-bar > .bar-line { flex: 1 1 100%; min-width: 0; margin: 0; font: var(--t-body-m); contain: inline-size; }
.action-bar > .bar-line:empty {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
@media (max-width: 39.99rem) {
  .action-bar > .bar-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .action-bar > .bar-explain { white-space: normal; }
  .action-bar > .decision-action:has(> .btn-text), .action-bar > .btn-text { flex: 1 1 calc(50% - 0.25rem); }
}
/* U2 browser checks (Task 10). The consequence of a phone-wide action stands under its button, so the button fills
   its row (/jobs/3's Try again). */
@media (max-width: 39.99rem) {
  .decision-action:has(> .btn-filled, > .btn-tonal, > .btn-outlined) > .decision-consequence { flex: 1 1 100%; }
}
/* The decision-first page is one column at every width: it has no side column, so .job-page's two columns from
   72rem would put every other fold beside the one before it (the Technical details' tables then overflowed). */
@media (min-width: 72rem) {
  .job-page.job-page-u2, .job-page.job-page-u3 { grid-template-columns: minmax(0, 1fr); }
}
/* A dialog's reasons stack at every width: five reasons do not fit one line of a dialog (Skip, spec 4.3). */
.dialog .choice-stack .choice-row { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 28rem; }
.dialog .choice-stack .choice { padding-block: 0.375rem; border-radius: var(--r-sm); }
.dialog .choice-stack .choice:first-child { border-start-start-radius: calc(var(--target) / 2); border-start-end-radius: calc(var(--target) / 2); }
.dialog .choice-stack .choice:last-child { border-end-start-radius: calc(var(--target) / 2); border-end-end-radius: calc(var(--target) / 2); }
.dialog .choice-stack .choice:has(input:checked) { border-radius: calc(var(--target) / 2); }
/* Reassign's people: the radio button covers its whole row (as a choice's does): invisible, but it is what the
   keyboard and screen readers use; the row draws the round mark, filled when chosen. A row is one click target high
   (--target, 41 px at every scale; 2.5625rem is under 40 px at the denser scale). */
.people-list-item { position: relative; min-height: var(--target); border-radius: var(--r-sm); }
.people-list-item input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.people-list-item::before {
  content: ""; flex: none; box-sizing: border-box; width: 1.25rem; height: 1.25rem;
  border: 2px solid var(--on-surface-variant); border-radius: 50%;
}
.people-list-item:has(input:checked) { background: var(--secondary-container); }
.people-list-item:has(input:checked)::before { border-color: var(--primary); background: radial-gradient(circle, var(--primary) 0 0.3125rem, transparent 0.34rem); }
.people-list-item:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: -3px; }
/* l7 SHOULD 3: a list where several rows can be picked (the experiment copy form's Scanners) draws a square mark
   with a check, not the round one-of-many mark; a row that cannot be picked now is muted, with no pointer. */
.people-list-item:has(input[type="checkbox"])::before { border-radius: 0.1875rem; }
.people-list-item:has(input[type="checkbox"]:checked)::before { background: var(--primary); }
.people-list-item:has(input[type="checkbox"]:checked)::after {
  content: ""; position: absolute; inset-inline-start: 0.6875rem; top: 50%; width: 0.3125rem; height: 0.625rem;
  border: solid var(--on-primary); border-width: 0 2px 2px 0; transform: translateY(-60%) rotate(45deg);
}
.people-list-item:has(input:disabled), .people-list-item input:disabled { cursor: not-allowed; }
/* SH-E P2 (l7 re-check M2): only the mark and the name are muted; the hint saying why ("Testing X now", "Has this test
   already") keeps its full colour, as it is the row's explanation (4.5:1 in both themes). */
.people-list-item:has(input:disabled)::before, .people-list-item:has(input:disabled) > span:not(.hint) { opacity: 0.6; }
/* U6 (UI rethink spec 9, UA2): the sticky Save's count of unsaved changes, beside its button (app.js counts them;
   hidden while there are none). */
.unsaved-count { align-self: center; color: var(--on-surface-variant); font: var(--t-body-m); }
/* D1 (owner, 2026-10-23), UA4: a figure's change under its value: a status chip that may wrap in a narrow card. */
.kpi-delta { margin: 0.25rem 0 0; }
.kpi-delta .status { white-space: normal; min-height: auto; padding-block: 0.125rem; }

/* U4 (UI rethink spec 4.6, 4.7): the job page from Scheduled on (job_record.html). The follow-up control (the next
   stage and More) stands in the card after its facts, as its actions do; the record's notes are rows. */
.job-page-u4 #decision .move-actions { margin-top: 0.75rem; }
/* W2 Undo core (Eva 1.5): "Undo last change" and its line stand under the follow-up control, in the card. */
.job-page-u4 #decision .undo-last-change { margin-top: 0.5rem; }

/* ---- UX fixes 3.14 shell-words (SW12, M081): on a phone and a tablet a technical value (write_draft,
   gigradar.opportunity.created) stays whole on its line: the table scrolls sideways inside its card, as such tables
   do by design, instead of breaking the value letter by letter. Long free text in <code> (an error message) still
   wraps between its words. From 64rem the rule above stands (no sideways scroll at 1280 and 1440). ---- */
@media (max-width: 63.99rem) { .table td code { overflow-wrap: break-word; } }
/* SW12: a table wider than its card shows a soft edge on the side there is more to swipe to. The two card-coloured
   covers move with the table (local) and hide the edges once its end is reached; nothing shows where it fits. */
.table-scroll {
  background:
    linear-gradient(to right, var(--card) 30%, transparent) left center / 2rem 100% no-repeat local,
    linear-gradient(to left, var(--card) 30%, transparent) right center / 2rem 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, color-mix(in srgb, var(--on-surface) 22%, transparent), transparent) left center / 0.75rem 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, color-mix(in srgb, var(--on-surface) 22%, transparent), transparent) right center / 0.75rem 100% no-repeat scroll;
}

/* ---- UX fixes 3.14 shell-words (SW1, M125): the page's one toast (c::toast_bar). It keeps the toast's place above
   (beside the menu, above a sticky bar or the phone's "New job" button). Its words let taps through to what lies under
   them and only its buttons take a tap, so it never blocks a control. Undo (or Pause) and Close are text buttons at its
   end, 44 px on a phone. A plain toast also hides after 8 seconds under reduced motion, by an opacity step and no
   movement; a toast with an action never fades by itself (app.js hides it when its window ends). ---- */
.toast-bar { gap: 0.25rem 0.5rem; flex-wrap: wrap; pointer-events: none; }
.toast-text { flex: 1 1 12rem; min-width: 0; margin: 0; }
.toast-form { display: contents; }
.toast-bar .toast-action { pointer-events: auto; color: var(--inverse-primary); }
@media (max-width: 39.99rem) { .toast-bar .toast-action { min-height: var(--control-h); } }
@media (prefers-reduced-motion: no-preference) {
  .toast-bar[data-undo] { animation: toast-in var(--d-spring) var(--spring-default); }
}
@media (prefers-reduced-motion: reduce) {
  .toast-bar:not([data-undo]) { animation: toast-out 0s 8s forwards; }
}

/* UX people-accounts M112 (web/STYLE.md "Reveal button"): Show/Hide sits inside the password field's end; the field
   keeps room for it; a 41 px target (--target), 45 px on a phone (--control-h: 2.75rem is only 41 px at the 15 px root). */
.reveal-wrap { position: relative; display: flex; align-items: center; }
.reveal-wrap input { flex: 1 1 auto; min-width: 0; padding-inline-end: 6.5rem; }
.reveal-btn { position: absolute; inset-inline-end: 0.25rem; min-height: var(--target); padding-inline: 0.5rem; }
@media (max-width: 39.99rem) { .reveal-btn { min-height: var(--control-h); } }
.reveal-show, .reveal-hide { display: inline-flex; }
.reveal-show[hidden], .reveal-hide[hidden] { display: none; }
.password-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; }
@media (max-width: 39.99rem) { .password-tools > .btn { flex: 1 1 100%; min-height: var(--control-h); } }

/* UX people-accounts M117: a person filter's chip and its Clear link, wrapping with the name (never cut). */
.person-filter { align-items: center; gap: 0.25rem 0.5rem; margin: 0; }
.person-filter .status { white-space: normal; }
/* UX people-accounts M108, M111: Forgot password and Choose your own password, the sign-in card's one column. */
.forgot .banner, .choose-password .banner { margin-block-end: 0.75rem; }
/* M108: Send help is a 44 px button at every size (--control-h, 45 px). */
.forgot .btn-wide { --h: var(--control-h); }

/* UX people-accounts M113: the time zone picker's filter stands above its list; My Account's device line wraps. */
.zone-filter { margin-block-end: 0.25rem; }
.device-zone { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; }
.device-zone-text { min-width: 0; overflow-wrap: anywhere; }

/* UX people-accounts M114: below 80rem the rail's foot lists My Account and Sign out; from 40rem to 80rem the avatar
   says "Account" beside the initials. */
.rail-account { list-style: none; margin: 0; padding: 0; }
.rail-account form { margin: 0; }
@media (min-width: 80rem) { .rail-account { display: none; } }
.avatar-word { display: none; }
@media (min-width: 40rem) and (max-width: 79.99rem) { .avatar-word { display: inline; } }
.account-slack .row { flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; margin: 0; }
.account-slack p { margin: 0; }

/* UX people-accounts M107: the welcome card, at most 60rem on a desktop, full width below; short on a phone. */
.welcome-card { max-width: 60rem; }
.welcome-lines { margin: 0; padding-inline-start: 1.25rem; display: grid; gap: 0.25rem; }
@media (max-width: 39.99rem) { .welcome-card .btn { min-height: var(--control-h); } .welcome-lines li:nth-child(n+4) { display: none; } }

/* UX people-accounts M096: For you. Each section a card; a tag or a reminder one row (on a phone a card: who and what,
   the job on its own line, when, a 44 px Open); the Menu button's badge (shell.css, W5b M5) says the count. */
.for-you { max-width: 72rem; }
.for-you-job { color: var(--on-surface-variant); }
.for-you-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.for-you-row { display: grid; gap: 0.25rem; padding-block: 0.5rem; border-block-end: 1px solid var(--outline-variant); }
.for-you-row p { margin: 0; }
.for-you-what { overflow-wrap: anywhere; }
@media (max-width: 39.99rem) { .for-you-open { min-height: var(--control-h); justify-self: start; } }
.people-note { display: block; }

/* UX people-accounts M117, M109, D6, M110: the person's page. What they hold, each line a link (44 px rows on a
   phone); the lock card; the Hand over sheet, its sentence and its buttons sticky at its foot; the invite card. */
.holding-lines { margin: 0; padding-inline-start: 1.25rem; display: grid; gap: 0.25rem; }
.holding-lines a { display: inline-flex; align-items: center; min-height: var(--target); overflow-wrap: anywhere; }
@media (max-width: 39.99rem) { .holding-lines a { min-height: var(--control-h); } }
.user-lock .card-title { display: flex; align-items: center; gap: 0.5rem; }
.hand-over-form { display: grid; gap: 0.75rem; }
.hand-over-words { margin: 0; overflow-wrap: anywhere; }
dialog.sheet { max-height: calc(100dvh - 2rem); overflow-y: auto; }
.sheet-actions { position: sticky; bottom: 0; background: var(--surface-container-high); padding-block: 0.5rem 0; }
@media (max-width: 39.99rem) { .sheet-actions > .btn { min-height: var(--control-h); } }
@media (max-width: 39.99rem) { .user-lock .btn { min-height: var(--control-h); } }
.user-invite { padding: 0.75rem 1rem; }

/* UX-mcp PB */
/* UX-mcp MCP-1 (UX spec 3.13; STYLE.md "Permission row", templates/permission.html): one permission of the consent
   page. A whole label at least 48 px tall: a visible native 24 px checkbox (1.6rem at the 15 px root) in the
   primary colour with the focus ring, the name and one line beside it; Read has the shield and its "Always on" chip
   instead of a box. */
.permission-row {
  display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); column-gap: 0.75rem; row-gap: 0.125rem;
  align-items: start; min-height: 3rem; padding-block: 0.5rem; cursor: pointer;
}
.permission-row > input[type="checkbox"] {
  grid-row: span 2; width: 1.6rem; height: 1.6rem; margin: 0.125rem 0 0; accent-color: var(--primary); cursor: pointer;
}
.permission-row > input[type="checkbox"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.permission-name { font: var(--t-title-s); }
.permission-line { grid-column: 2; min-width: 0; color: var(--on-surface-variant); }
.consent-footer { display: flex; flex-wrap: wrap; align-items: center; column-gap: 0.5rem; }
.permission-fixed { grid-template-columns: auto minmax(0, 1fr); cursor: default; align-items: center; }
.permission-fixed > .permission-chip { justify-self: start; }
.permission-fixed > .permission-line { grid-column: 1 / -1; }
.permission-warning { display: block; }
/* UX-mcp MCP-2: the note a held permission shows the moment its box is unticked (no script), in place of the
   real-proposal warning, which no longer applies, so the row keeps its height. */
/* Its live span is always drawn (a screen reader hears the note appear); it pulls back the row gap it adds, which the
   shown note gives back, so a ticked row is as tall as before. */
.permission-row .permission-takes-live { grid-column: 2; margin-top: -0.125rem; }
.permission-row .permission-takes {
  display: none; margin-top: 0.125rem; padding: 0.125rem 0.375rem; border-radius: var(--r-sm);
  background: var(--warn-container); color: var(--on-warn-container);
}
.permission-row:has(> input[data-held]:not(:checked)) .permission-takes { display: block; }
.permission-row:has(> input[data-held]:not(:checked)) .permission-warning { display: none; }
/* end UX-mcp PB */

/* UX-mcp PC */

/* end UX-mcp PC */
/* ---- UX fixes 3.14 shell-words (SW3, M115): after a save the page opens at the section saved (routes::done_at) and
   that section, still folded, starts its line with a green "Saved just now"; every other section keeps its chip
   hidden. The section's heading lands under the app bar (scroll-padding-block); a page that fits does not move. ---- */
.saved-chip { display: none; margin-inline-end: 0.5rem; }
.edit-section:target > summary > .saved-chip, .fsec:has(> .fsec-head > h2:target) .saved-chip { display: inline-flex; }
/* W5b RR C */
/* Move's single-choice people list (RR.4.3): long lists scroll inside the sheet, never the page. */
.rr-move-people { max-height: min(50vh, 24rem); overflow-y: auto; }
/* A request's row (the hook the B8 browser check finds it by); laid out as every subcard. */
.request-row { min-width: 0; }

/* W5b RR D */
/* A closed request's outcome chip (RR.4.1): the chip is the button of a small popover saying who closed it and when. */
.outcome-chip { display: inline-flex; min-width: 0; }
.outcome-chip-button { display: inline-flex; align-items: center; min-height: var(--target); padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; border-radius: var(--r-full); }
.outcome-chip-button:hover .status { box-shadow: inset 0 0 0 1px currentColor; }
.outcome-detail { max-width: min(20rem, calc(100vw - 2rem)); padding: 0.5rem 0.75rem; overflow-wrap: anywhere; }

/* W5b RR F */
/* RR.2: the request card of the person asked. Its actions are the card's last row; from 640 px down they are the
   phone's sticky bar (fixed at the bottom), and the page keeps room for it as it does for .action-bar. */
.request-card { display: flex; flex-direction: column; gap: 0.75rem; }
.request-stage-line { font-weight: 500; }
.request-signal { margin: 0; }
.request-note { white-space: pre-line; }
.request-note-clamp { min-width: 0; }
.request-goes-out { margin: 0; color: var(--on-surface-variant); }
.request-quick { gap: 0.5rem; }
.request-form { gap: 0.5rem; }
.request-form textarea { min-height: 3rem; resize: vertical; overflow-wrap: anywhere; }
.request-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.review-bar-quiet { position: static; box-shadow: none; }
@media (max-width: 39.99rem) {
  .request-bar {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 15; padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
    border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--surface-container-high); box-shadow: var(--e-2);
  }
  .request-bar > .btn { flex: 1 1 calc(50% - 0.25rem); min-width: 0; padding-inline: 0.75rem; }
  .request-bar > .btn-filled, .request-bar > .btn-tonal:first-child { flex-basis: 100%; }
  main:has(.request-bar) { padding-block-end: 9rem; }
  html:has(.request-bar) { scroll-padding-block-end: 9rem; --action-bar-h: 8rem; }
  /* int/w5b-final (smoke:3635, no script @375x800): a Review bar with its blocker line is taller (10.5rem, rule
     above); the request bar's 8rem must not lower it, or the toast sits on the bar. */
  html:has(.request-bar):has(.review-bar > .blocker-line) { --action-bar-h: 10.5rem; scroll-padding-block-end: 11.5rem; }
  main:has(.request-bar):has(.review-bar > .blocker-line) { padding-block-end: 11.5rem; }
  /* The toast and the passage chip stand above the card's fixed bar (app.js measures it into --action-bar-h; a
     quiet review bar is display: none here and is not measured). */
  body:has(.request-bar) .toast:not(.toast-static) { bottom: calc(var(--action-bar-h) + 0.75rem); }
  html:has(.request-bar) .passage-chip { inset-block-end: calc(var(--action-bar-h) + 0.5rem); }
}
/* RR.4.5 (M023): the open requests a dialog closes. */
.rr-open-requests { margin: 0; padding-inline-start: 1.25rem; }
.rr-open-requests > li { overflow-wrap: anywhere; }

/* W5b RR G */
/* RR.5 (M024): For you's request rows on two lines. Line 1 the title and the stage chip (.rr-stage), line 2 who and
   when it is due, the status chip and "Changed since you were asked" (.rr-changed). From 40rem "Asked of you" and
   "You asked" are tables with sort headers (.rr-table); a phone draws the same rows as a compact list (.rr-rows,
   about 90 px a row, at most 120) with a small "Sort: Due soonest" menu (.rr-sort: #rr-sort-menu, #rr-sort-menu-asked).
   W22.1 (owner decision Q2): For you's Done section is gone, and its rules with it. */
.rr-stage, .rr-changed {
  display: inline-flex; align-items: center; min-height: 1.5rem; padding: 0 0.5rem; border-radius: var(--r-full);
  font: var(--t-label-m); white-space: nowrap; vertical-align: middle;
}
.rr-stage { background: var(--secondary-container); color: var(--on-secondary-container); }
.rr-changed { background: var(--warn-container); color: var(--on-warn-container); white-space: normal; }
.rr-line { display: block; margin-block-start: 0.25rem; color: var(--on-surface-variant); }
.rr-rows { display: none; list-style: none; margin: 0; padding: 0; }
.rr-row { display: grid; gap: 0.125rem; padding-block: 0.25rem 0.5rem; border-block-end: 1px solid var(--divider); }
.rr-row p { margin: 0; overflow-wrap: anywhere; }
/* Line 1 is one line (the title cut with an ellipsis, the stage chip kept whole); its link is a 44 px target. */
.rr-row-title { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.rr-row-title a {
  display: block; min-width: 0; min-height: var(--target); line-height: var(--target); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; font-weight: 500;
}
.rr-row-title .rr-stage { flex: none; }
/* a2 S3: the AI change chip (M243) rides line 1 too, kept whole; the title gives way. */
.rr-row-title > :not(a) { flex: none; }
/* W18.2 (LIVE W18 red, COORD 19:14): since W18 the title sits in the .job-name pair (name + Upwork icon), not an <a>,
   so the rule above kept it whole and pushed the AI chip 38 px past a 390 phone (108 at 320). The pair gives way as
   the title did; its name keeps the ellipsis and the 41 px minimum (.job-name > a:first-child), and the icon link
   stays the round 41 px target (.rr-row-title a would make it a clipped block). */
.rr-row-title > .job-name { flex: 0 1 auto; min-width: 0; }
.rr-row-title .job-upwork { display: inline-flex; flex: none; min-height: 0; line-height: normal; overflow: visible; }
.rr-row .rr-line { margin-block-start: 0; }
.rr-row .status { min-height: 1.5rem; }
.rr-sort { display: none; }
@media (max-width: 39.99rem) {
  .table-card:has(> .table-scroll > .rr-table) { display: none; }
  .rr-rows { display: grid; }
  .rr-sort { display: block; margin-block-end: 0.5rem; }
  #rr-sort-menu .menu-item[aria-current="true"], #rr-sort-menu-asked .menu-item[aria-current="true"] { font-weight: 700; }
}

/* W5b RR H */
/* RR.6.3: a multi-select people list draws square marks (a single choice keeps the round one) and the role word. */
.people-list-item--multi::before { border-radius: var(--r-xs); }
.people-list-item--multi:has(input:checked)::before { background: var(--primary); box-shadow: inset 0 0 0 0.1875rem var(--secondary-container); }
.people-role { color: var(--on-surface-variant); }
.people-role::before { content: "\00b7\00a0"; }
/* RR.6.1: the Ask dialog, its due chips and the time field for "Pick a time". */
.ask-dialog { max-height: min(90vh, 48rem); overflow-y: auto; }
.ask-due-chips .choice-row { flex-wrap: wrap; }
.ask-pick { margin-block-start: -0.25rem; }
/* RR.7.3: the passage sheet: the quote above the box. */
.passage-dialog textarea { width: 100%; }
/* RR.7.4: the composer is one growing line and Send; Tag people folds under it. */
.composer { gap: 0.25rem; }
.composer-line { display: flex; align-items: flex-end; gap: 0.5rem; }
.composer-line textarea { flex: 1 1 auto; min-width: 0; min-height: var(--target); resize: none; field-sizing: content; max-height: 12rem; }
/* int/w5b-final (l8, pre-run ux-rr-c:63): the compact composer's "Tag people" summary keeps the full target and a
   gap below the textarea (axe target-size flagged #composer-tags > summary). */
.composer .form-on-demand > summary { display: inline-flex; align-items: center; min-height: var(--target); margin-block-start: 0.25rem; }
/* RR.7.3: the selection chip stands at the selection's end; on a phone fixed above the sticky bar. */
.passage-chip { position: absolute; z-index: 3; }
@media (max-width: 39.99rem) { .passage-chip { position: fixed; inset-inline: 1rem auto; inset-block-end: calc(var(--target) * 2 + 1.5rem); } }
/* RR.7.4: the new comment (or its passage) flashes for 2 seconds. */
.just-posted { background: var(--secondary-container); transition: background 0.6s; }
/* RR.7.5: a shared dialog's one choice named as text (app.js shows it and hides the select). */
.chosen-line { color: var(--on-surface); }
/* RR.7.6 (H2's glance chips that open a pane, components::StatusChip.opens): a click target, as .chip-link is. */
.status-link { display: inline-flex; align-items: center; min-height: var(--target); min-width: var(--target); text-decoration: none; }
.status-link:hover .status { box-shadow: inset 0 0 0 1px currentColor; }
/* RR.6.1, RR.7.3 (B5, B6): on a phone the Ask sheet and the passage chip stand above the sticky bar (its measured
   height, --action-bar-h). */
@media (max-width: 39.99rem) {
  html:has(.action-bar) dialog.dialog.ask-dialog[open] { border-radius: var(--r-xl); }
  html:has(.action-bar) .passage-chip { inset-block-end: calc(var(--action-bar-h) + 0.5rem); }
}
/* RR.7.6, B11: on a phone the Discussion's glance is 2 lines at most: its last part ("Last: ...") keeps one line. */
@media (max-width: 39.99rem) {
  #pane-discussion > summary .glance > .glance-part:last-child:not(:first-child) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
  /* int/w5b-final (smoke:90 / :3692 @360-375): with open review requests "Last: ..." is not the last part and the
     "Open: n review requests" link follows it, so every later part, and the text inside it, keeps to the line. */
  #pane-discussion > summary .glance > .glance-part:not(:first-child) { max-width: 100%; }
  #pane-discussion > summary .glance > .glance-part:not(:first-child) > .glance-text,
  #pane-discussion > summary .glance .status-link .status { display: inline-block; max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
  #pane-discussion > summary .glance .status-link { max-width: 100%; min-width: 0; }
}

/* W5b RR I */

/* W5b RR J */

/* setup-history A9 (UX spec 3.9 SH-A9): a row taken out of a list stands as one line with its Undo until the form is
   saved. */
.rows-removed { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; color: var(--on-surface-variant); }
.rows-removed > span { overflow-wrap: anywhere; }

/* W5b SH-A1 (H1): the Scanners list's count line, its pick column and the bar a selection brings (sticky under the
   table; at most two rows on a phone). */
.scanners-showing { align-items: center; gap: 0.25rem 0.75rem; }
/* H3 e2e: each box sits in a label that is a full click target (.row-check-target, as Follow-ups' rows); the column
   keeps a narrow start padding only, so the table still fits its card at 1280. */
.table th.col-check, .table td.col-check { width: var(--target); padding-inline: 0.5rem 0; }
.pick-all-words { display: none; }
/* Short rows (under 72rem): the header row is hidden, but its "Select all N shown" stands above the cards, with its
   words; each card starts with its box, the Scanner's name beside it. */
@media (max-width: 71.99rem) {
  .table-stack-m:has(th.col-check) thead {
    position: static; width: auto; height: auto; margin: 0; overflow: visible; clip-path: none; white-space: normal;
    visibility: visible; display: block;
  }
  .table-stack-m:has(th.col-check) thead th:not(.col-check) { display: none; }
  .table.table-stack-m th.col-check { display: block; width: auto; height: auto; padding: 0; border: 0; }
  .table-stack-m th.col-check .row-check-target { gap: 0.5rem; justify-content: flex-start; }
  .pick-all-words { display: inline; font: var(--t-body-m); color: var(--on-surface); white-space: normal; }
  .table.table-stack-m td.col-check { order: -2; flex: 0 0 auto; width: auto; padding: 0; }
  .table.table-stack-m tr:has(> .col-check) > .col-main { flex: 1 1 0; align-self: center; }
}
.cell-fold > summary { cursor: pointer; min-block-size: var(--target); display: flex; align-items: center; }
.cell-fold-count { color: var(--on-surface); }
.bulk-bar {
  position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem;
  padding: 0.5rem 0.75rem; background: var(--surface-container-high); border-radius: var(--r-md);
  box-shadow: var(--e-2);
}
.bulk-bar[hidden] { display: none; }
.bulk-bar-count { font: var(--t-label-l); margin-inline-end: auto; }
/* A phone: the count stands on the first row and Change... with Clear selection share the second (at most two rows). */
@media (max-width: 39.99rem) {
  .bulk-bar { row-gap: 0.25rem; }
  .bulk-bar-count { flex: 1 0 100%; }
}

/* W5b SH-A1 (H3): the bulk page. Step 1's Scanners in columns; step 2's kinds each with their own fields, shown for the
   chosen kind alone (a browser without :has shows them all); step 3's one fold a Scanner; "Recent bulk changes" above
   the Scanners table. */
.bulk-picked { columns: 14rem; column-gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.bulk-picked li { break-inside: avoid; padding-block: 0.125rem; overflow-wrap: anywhere; }
.bulk-kinds { display: grid; gap: 0.5rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.bulk-kind { display: grid; gap: 0.5rem; min-width: 0; }
.bulk-kind-radio { display: flex; align-items: center; gap: 0.5rem; min-block-size: var(--target); }
.bulk-kind-fields { display: grid; gap: 0.75rem; margin-inline-start: 2rem; min-width: 0; }
.bulk-position { display: grid; gap: 0; border: 0; padding: 0; margin: 0; min-width: 0; }
@supports selector(:has(*)) {
  .bulk-kind:not(:has(input[name="change"]:checked)) .bulk-kind-fields { display: none; }
}
.bulk-preview { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.bulk-preview li { overflow-wrap: anywhere; }
.bulk-page { align-content: start; }
.bulk-counts { font: var(--t-label-l); margin: 0; }
.bulk-preview .disclosure-body p { margin: 0; padding-inline-start: 1rem; }
.bulk-recent-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.bulk-recent-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; overflow-wrap: anywhere; }

/* ===== W5b needs-me S4 (M5 N10, M6 N5) ===== */
#results { scroll-margin-top: 1rem; }
.table .col-text { overflow-wrap: anywhere; }
.table .col-text a.upwork-link { display: inline-flex; align-items: center; min-height: var(--target); min-width: var(--target); }
@media (max-width: 63.99rem) { .table-stack td, .table-stack tbody th { overflow-wrap: anywhere; } }
@media (max-width: 71.99rem) { .table-stack-m td, .table-stack-m tbody th { overflow-wrap: anywhere; } }
@media (max-width: 39.99rem) { .table-stack-a td, .table-stack-a tbody th { overflow-wrap: anywhere; } }

/* W5b needs-me S4 M6 (N5): All Jobs' filter bar on a phone. Under 40rem one row (the search box and a tonal "Filters (n)"
   button) opens the other filters, Sort, Apply and Clear as a bottom sheet (a <details>, no script); applied filters are
   removable chips; from 40rem the sheet is always open (its button hidden) and the bar is as it was. */
.filter-chips { display: none; }
.filter-sheet > summary { list-style: none; cursor: pointer; }
.filter-sheet > summary::-webkit-details-marker { display: none; }
@media (min-width: 40rem) {
  .filter-fields > .filter-phone { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem 1rem; }
  .filter-phone > .field { flex: 1 1 9rem; max-width: 16rem; }
  .filter-sheet { flex: 1 1 auto; min-width: 0; }
  .filter-sheet::details-content { content-visibility: visible; }
  .filter-sheet > summary { display: none; }
  .filter-sheet-body { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem 1rem; }
  .filter-sheet-body > .field { flex: 1 1 9rem; max-width: 16rem; }
  .filter-sheet-body > .filter-sort { display: none; }
  .filter-sheet-body > .filter-actions { flex-wrap: nowrap; margin-inline-start: auto; }
  #results { scroll-margin-top: 12rem; }
}
@media (max-width: 39.99rem) {
  .filter-fields > .filter-phone { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem; align-items: end; }
  .filter-sheet > summary { display: inline-flex; align-items: center; min-height: var(--target); }
  .filter-sheet[open] > .filter-sheet-body {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem; max-height: 85dvh; overflow-y: auto; padding: 1.25rem 1rem calc(1rem + env(safe-area-inset-bottom));
    border-radius: var(--r-lg-plus) var(--r-lg-plus) 0 0; background: var(--card); box-shadow: 0 -0.5rem 1.5rem rgb(0 0 0 / 0.25);
  }
  .filter-sheet-body > .filter-wide, .filter-sheet-body > .filter-actions { grid-column: 1 / -1; }
  .filter-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
  .filter-chip {
    display: inline-flex; align-items: center; min-height: var(--target); padding: 0 0.875rem; border-radius: var(--r-full);
    background: var(--secondary-container); color: var(--on-secondary-container); text-decoration: none;
  }
  .filter-chip::after { content: "\00d7"; margin-inline-start: 0.5rem; }
  /* The Sort by control is one line: the select (its label read out, not shown) and the two direction buttons. */
  .sort-by { flex-wrap: nowrap; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; }
  .sort-by > .field { flex: 1 1 0; min-width: 0; }
  .sort-by > .field > label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .filter-phone > .field > label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .sort-by-dirs { flex: 0 0 auto; }
  .sort-by-dirs > .btn { flex: none; padding-inline: 0; width: var(--target); }
  .sort-by-dirs .icon-label > span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* Scheduled's "submitting is off" banner: one line, its reason folded after it under "Why". */
.banner-fold { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.75rem; padding: 0.5rem 1rem; border-radius: var(--r-lg); background: var(--info-container); color: var(--on-info-container); font: var(--t-body-m); }
.banner-fold > .banner { padding: 0; background: none; color: inherit; }
.banner-fold > .disclosure { flex: 0 1 auto; margin: 0; background: none; }


/* ---- W5b SH-D2: a refused save's summary of jump links (SH-C2) ---- */
.fix-summary { flex-wrap: wrap; gap: 0.25rem 0.5rem; }
.fix-summary .fix-links a { color: inherit; text-decoration: underline; display: inline-flex; align-items: center; min-block-size: var(--target); }
/* The try card's job rows: each a link a finger can hit. */
.try-card ul.try-jobs li a { display: flex; align-items: center; min-block-size: var(--target); }
/* ---- end W5b SH-D2 ---- */

/* W5b SH-E: a link in a note line (Bring 3 follow-ups up to date) or on the Scanner page's experiment line is a 40 px target like the other links in running text. */
.note-line a, a.link-tap { display: inline-flex; align-items: center; min-height: var(--target); min-width: var(--target); }

/* ---- W8 5a Dashboard (owner 2 Nov, approved mockup); W14 B1 layout + spacing (owner 18:10, m3) ---- */
/* W14 B1: one spacing scale (--space-1..6 = 4..32 px, tokens.css), one pane shell (.dash-pane, alias .dash-card):
   16 px inside on all four sides (24 px on a wide screen), a 32 px head row, 8 px between its parts, the foot pinned
   to the bottom; 24 px between panes (16 px on a phone); equal heights in a row. Dashboard targets are 48 px. */
.dash-page { display: grid; gap: var(--space-5); min-width: 0; container-type: inline-size; container-name: dash; }
.dash-page > .welcome-card { max-width: none; }
.dash.stack { gap: var(--space-5); }
/* The header line: greeting and Updated on the left; the period switch and the filters (B3) on the right, wrapping
   under it when the row is full. */
.dash-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); }
.dash-greeting { margin: 0; }
.dash-controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
/* Every control in the header row (period switch, B3's filter selects, Clear) is a 48 px Dashboard target. */
.dash-controls :is(select, button, a, input) { min-height: var(--target-l); }
.dash-switch ul { display: inline-flex; margin: 0; padding: 0; list-style: none; border-radius: var(--r-md);
  box-shadow: inset 0 0 0 1px var(--outline-variant); overflow: hidden; }
.dash-switch a { display: flex; align-items: center; padding: 0 var(--space-4); font: var(--t-label-l); color: var(--on-surface-variant);
  text-decoration: none; min-height: var(--target-l); }
.dash-switch a[aria-current="true"] { background: var(--inverse-surface); color: var(--inverse-on-surface); }
/* One row of chips: count, name, oldest. Hot = Exceptions or waited 2 h (danger edge, and the word in the note). */
.dash-needs ul { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.dash-chip { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--target-l); padding: 0 var(--space-3);
  border-radius: var(--r-lg-plus); background: var(--surface-container-high); box-shadow: inset 0 0 0 1px var(--outline-variant);
  color: var(--on-surface); text-decoration: none; font: var(--t-body-l); }
.dash-chip b { font: var(--t-title-l); font-variant-numeric: tabular-nums; }
.dash-chip small { font: var(--t-body-m); color: var(--on-surface-variant); }
.dash-chip-hot { background: var(--danger-container); color: var(--on-danger-container); box-shadow: inset 0 0 0 1px var(--danger); }
.dash-chip-hot small { color: var(--on-danger-container); }
/* The one warning banner: as tall as its link, the pane's side padding. */
.dash-banner { padding: 0 var(--space-4); border-radius: var(--r-lg-plus); background: var(--warn-container);
  color: var(--on-warn-container); }
.dash-banner p { margin: 0; min-height: var(--target-l); display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--space-1); }
/* The need line's chip wraps as it does inside a .chip-link (an Operator's line is plain text, not a link), and no part
   of the line keeps its full width on a phone. */
.dash-banner p > * { min-width: 0; }
.dash-banner .status { white-space: normal; }
/* Links inside the banner and the experiments line are Dashboard targets too. */
.dash-banner a, .dash-experiments a { display: inline-flex; align-items: center; min-height: var(--target-l); }
/* THE PANE. Every box on the Dashboard: figures, response time, charts, add-ons, the experiments line. */
.dash-pane, .dash-card { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; margin: 0;
  padding: var(--space-4); border-radius: var(--r-lg-plus); background: var(--surface-container-high); }
/* 24 px inside from a 1600 px wide window (a media query's rem is the browser's 16 px: 100rem = 1600 px). */
@media (min-width: 100rem) { .dash-pane, .dash-card { padding: var(--space-5); } }
/* Its head row: the title (or a figure's label) and its (i), 32 px tall, one baseline for every pane in a row. */
.dash-pane-head, .dash-card-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2);
  min-height: var(--space-6); margin: 0; font: var(--t-label-l); color: var(--on-surface-variant); }
h2.dash-pane-head { font: var(--t-title-s); color: var(--on-surface); }
.dash-pane-head small { font: var(--t-body-m); color: var(--on-surface-variant); }
.dash-pane-body { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.dash-pane-body > * { margin: 0; }
/* The foot (legend, sparkline, "Show the numbers", a note) sits at the bottom, so feet in one row line up. */
.dash-pane-foot { margin-top: auto; min-width: 0; }
.dash-value { margin: 0; font: var(--t-display-s); font-variant-numeric: tabular-nums lining-nums; overflow-wrap: anywhere; }
.dash-value small { font: var(--t-body-m); color: var(--on-surface-variant); }
.dash-pane .kpi-delta { margin: 0; }
/* THE FIGURES (option A): four big in a row, the two small (View rate, Our turnaround) under them, two across. On a
   phone two across, everything in one size. Rows stretch, so cards in one row are equally tall. */
.dash-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); }
.dash-card-small { grid-column: span 2; order: 1; }
.dash-card-small .dash-value { font: var(--t-headline-s); font-variant-numeric: tabular-nums lining-nums; }
@container dash (max-width: 52rem) { .dash-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-card-small { grid-column: auto; } }
/* THE RESPONSE-TIME PANE, full width: its figures beside its trend, both TOP-aligned (the title and the chart's
   caption on one line). */
.dash-lead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--space-5); align-items: start; }
.dash-lead-figures, .dash-lead-trend { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.dash-trio { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin: 0; }
.dash-trio dt { font: var(--t-body-m); color: var(--on-surface-variant); }
.dash-trio dd { margin: 0; font: var(--t-headline-s); font-variant-numeric: tabular-nums; }
.dash-lead-trend .chart-lines { height: calc(144rem / 15); }
.dash-lead-trend figure { margin: 0; }
/* Sparklines: the card's foot, the same height in every card. */
.chart-spark { display: block; width: 100%; height: var(--space-6); margin: 0; }
.spark-line { fill: none; stroke: var(--chart-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-line.chart-dot { stroke-width: 6; }
/* The (i): a 48 px target with a small ring drawn inside; the negative top/bottom margins keep the head row 32 px
   (no side margin: its box never reaches into a neighbour, axe target-size). Its note opens
   UNDER its own button (anchor positioning; a browser without it keeps the centred popover), flipping above or to
   the other side near an edge. */
.dash-info { position: relative; flex: none; display: inline-grid; place-items: center; inline-size: var(--target-l);
  block-size: var(--target-l); margin: calc(var(--space-2) * -1) 0;
  padding: 0; border: 0; border-radius: 50%; background: none; color: var(--on-surface-variant); font: var(--t-label-m); cursor: help; }
.dash-info::before { content: ""; position: absolute; inset: calc(50% - 0.75rem); border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--outline); }
.dash-info-note { max-inline-size: min(22rem, calc(100vw - 2rem)); padding: var(--space-2) var(--space-3); border: 0;
  border-radius: var(--r-md); background: var(--inverse-surface); color: var(--inverse-on-surface);
  font: var(--t-body-m); }
@supports (position-area: bottom) {
  .dash-info-note { inset: auto; margin: var(--space-1) 0 0; position-area: block-end span-inline-start;
    position-try-fallbacks: flip-block, flip-inline; }
}
/* THE CHARTS ROW: stacked at a laptop width (each chart gets the full width), side by side on a wide screen. */
.dash-charts { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
@container dash (min-width: 75rem) { .dash-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dash-chart-head { margin: 0; }
.dash-chart-head small { font: var(--t-body-m); color: var(--on-surface-variant); }
.chart-day-bars { display: block; width: 100%; height: calc(144rem / 15); }
.day-fill-1 { fill: var(--chart-3); background: var(--chart-3); }
.day-fill-2 { fill: var(--chart-1); background: var(--chart-1); }
.day-fill-3 { fill: var(--chart-2); background: var(--chart-2); }
/* A chart's legend sits 8 px under the drawing, never touching it. */
.dash-pane .chart-legend { margin: var(--space-2) 0 0; }
/* W14 B1 x B2 (l1 18:20, fast/w14-panes): the panes grid. .dash-grid holds the figures (.dash-kpis), the response-time
   pane (.dash-pane-wide) and the two charts (.dash-pane-chart, or inside .dash-charts): one column at a laptop width,
   the charts side by side on a wide screen, the figures and wide panes across the whole row. l1's pane names are
   aliases of B1's: .dash-pane-tile = a big figure, .dash-pane-small = .dash-card-small. */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); min-width: 0; }
@container dash (min-width: 75rem) {
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid > .dash-kpis, .dash-grid > .dash-pane-wide, .dash-grid > .dash-lead, .dash-grid > .dash-charts { grid-column: 1 / -1; }
}
.dash-pane-small { grid-column: span 2; order: 1; }
.dash-pane-small .dash-value { font: var(--t-headline-s); font-variant-numeric: tabular-nums lining-nums; }
@container dash (max-width: 52rem) { .dash-pane-small { grid-column: auto; } }
.dash-pane-head .dash-pane-sub, .dash-pane-sub { margin: 0; font: var(--t-body-m); color: var(--on-surface-variant); }
.dash-pane-head:has(.dash-pane-sub) { flex-wrap: wrap; row-gap: 0; }
.dash-pane-head:has(.dash-pane-sub) .dash-pane-sub { flex-basis: 100%; order: 2; }
.dash-pane-note { margin: 0; }
.dash-counts-from { margin: 0; font: var(--t-body-m); color: var(--on-surface-variant); }
/* The response chart's top mark for a day cut at the top, and its words under the chart ("↑ 6 Nov: 3 days"). */
.chart-over { fill: var(--on-surface-variant); font: var(--t-label-m); }
.chart-over-list { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin: 0; padding: 0; list-style: none;
  font: var(--t-body-m); color: var(--on-surface-variant); }
ul.dash-trio { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-1); }
ul.dash-trio li { font: var(--t-body-l); }
.dash .table tr.dash-team > * { font-weight: 600; border-top: 1px solid var(--outline-variant); }
/* W14 B1 (COORD 20:03): a drill link inside a pane (a day's count or a freelancer's name in a chart's table, any
   /jobs?... link in a tile or a tip) is a house target: at least 41 px (--target) both ways, its text where it was
   (inline-flex, start-aligned, no padding, so the row does not move; a table row is already 49 px).
   CUT-4 fix: inside :where(), so it has NO specificity: a pane's own link layout (B5's .dash-funnel-step grid) wins;
   with plain specificity it turned the funnel's links into one unwrapped row, 47 px past a 375 px screen. */
:where(.dash-pane a[href^="/jobs"], .dash-pane :is(td, th) > a, .dash-pane-body a) {
  display: inline-flex; align-items: center; min-block-size: var(--target); min-inline-size: var(--target); }
/* THE ADD-ON PANES (funnel, my to-dos, AI health): one per row at a laptop width, up to three across on a wide screen;
   the grid is not drawn while it holds no pane. */
.dash-addons { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
@container dash (min-width: 75rem) { .dash-addons { grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); } }
.dash-addons [data-pane-slot] { display: contents; }
.dash-addons:not(:has(.dash-pane)) { display: none; }
.dash-experiments { display: block; }
@media (forced-colors: active) { .spark-line, .day-fill-1, .day-fill-2, .day-fill-3 { forced-color-adjust: none; } }
/* The day bars' legend: square swatches, as the bars are (a line swatch reads as a line chart). */
.day-bars .chart-swatch { width: var(--space-3); height: var(--space-3); border-radius: 2px; }
/* The Dashboard's parts: the refreshing column, the quiet line when nothing needs a person, and each chart (a grid
   child that may shrink below its table's width; the table scrolls). */
.dash { min-width: 0; }
.dash-none { margin: 0; color: var(--on-surface-variant); }
.dash-chart { min-width: 0; }
/* A numbers table's row header (a day, or an Upwork Profile's name from data) wraps inside its card, as 5b's steps
   table's does (.ta-steps): .table th is nowrap, so a 60-character profile name would widen the table (tables.spec). */
.dash .table tbody th[scope="row"] { white-space: normal; }
/* PHONE (W8 5a, m2; W14 B1): chips wrap, figures two across, every pane 12 px inside and 16 px apart, the response
   pane and the charts one column; a chip's oldest note wraps under its name before the row scrolls. */
@media (max-width: 39.99rem) {
  .dash-page, .dash.stack, .dash-figures, .dash-charts, .dash-addons { gap: var(--space-4); }
  .dash-pane, .dash-card { padding: var(--space-3); }
  .dash-lead { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .dash-trio { gap: var(--space-1) var(--space-4); }
  .dash-chip { flex-wrap: wrap; max-inline-size: 100%; padding-block: var(--space-1); }
  .chart-day-bars { height: calc(112rem / 15); }
}
/* W14 B6 my to-dos (m4); dash-pane* shells come from B1 */
.dash-addon { min-width: 0; }
/* One row per kind, the whole row one link (row-link at the Dashboard's 48 px target): its name, its count, how many
   not viewed. */
.dash-todos { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.dash-todos-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); min-height: var(--target-l); }
.dash-todos-row > span { flex: 1 1 12rem; min-width: 0; }
.dash-todos-count { font: var(--t-headline-s); font-variant-numeric: tabular-nums lining-nums; }
/* COORD 20:05: B6's foot link has the Dashboard's link target inside B6 (same declarations as .dash-banner a). */
.dash-todos-all { display: inline-flex; align-items: center; min-height: var(--target-l); }
.dash-todos-row small { font: var(--t-body-m); color: var(--on-surface-variant); }

/* W14 B3 (app::interact, app.js "W14 B3"): the one box with a chart point's, tile's or row's exact words, right next to
   it; on touch it is a small panel with one button ("Open these 12 jobs"). m3's spacing tokens replace the rem sizes
   once they land. A marked element shows the page's own focus ring. */
.chart-tip {
  position: absolute;
  z-index: 50;
  max-inline-size: min(20rem, calc(100vw - 1rem));
  padding: 0.5rem 0.75rem;
  border-radius: var(--r-sm);
  background: var(--inverse-surface);
  color: var(--inverse-on-surface);
  font: var(--t-body-m);
  box-shadow: var(--e-2);
  pointer-events: none;
}
.chart-tip[hidden] { display: none; }
.chart-tip p { margin: 0; }
.chart-tip-panel { pointer-events: auto; display: grid; gap: 0.5rem; }
.chart-tip-panel .btn { min-block-size: 3.2rem; justify-content: center; }
[data-tip] { cursor: default; }
[data-drill] { cursor: pointer; }
[data-tip]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* W14 B3: one filter of the bar (its label holds the select; m3's .dash-controls lays the bar out). */
.dash-filter { display: inline-flex; max-inline-size: 100%; min-inline-size: 0; }
/* W14 B3 (b1 C1, w1-followups @390): a long Scanner or profile name never widens the page: the select shrinks to the bar. */
.dash-filter select { max-inline-size: 100%; min-inline-size: 0; text-overflow: ellipsis; }
/* W14 B3 (proposal s4; l8 B4 at 375 px): the filter bar's selects and buttons are touch targets of at least 48 px. */
.dash-filters select,
.dash-filters .btn { min-block-size: 3.2rem; }
/* W14 B7 AI health (m1; after m3's W14 B1 block, --space-* only): five tiles, four of them links, 48 px targets. */
.dash-aih { display: grid; grid-template-columns: repeat(auto-fit, minmax(calc(160rem / 15), 1fr)); gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.dash-aih-tile { display: flex; flex-direction: column; gap: var(--space-1); min-height: var(--target-l); padding: var(--space-3); border-radius: var(--r-md); color: inherit; text-decoration: none; background: var(--surface-container); }
.dash-aih-tile:hover, .dash-aih-tile:focus-visible { background: var(--surface-container-highest); }
.dash-aih-label { font: var(--t-label-l); color: var(--on-surface-variant); }
.dash-aih-value { font: var(--t-title-l); font-variant-numeric: tabular-nums; }
.dash-aih-note { font: var(--t-body-m); color: var(--on-surface-variant); }
.dash-aih-warn, .dash-aih-warn:hover, .dash-aih-warn:focus-visible { background: var(--warn-container); color: var(--on-warn-container); }
.dash-aih-warn .dash-aih-label, .dash-aih-warn .dash-aih-note { color: inherit; }
/* W14 B5 FUNNEL (l5) inside B1's add-on pane (m3 owns the shell and may restyle): one row per step, each a 48 px
   link: label and count on the first line, the bar (percent of Found) under them, then the share and the change. */
.dash-addon, .dash-funnel { min-width: 0; }
.dash-funnel-cohort { margin: 0; }
.dash-funnel-steps { display: flex; flex-direction: column; gap: var(--space-1); margin: 0; padding: 0; list-style: none; }
.dash-funnel-steps > li { display: block; } /* a .chart-row (the e2e house rule: a hidden bar sits in a row with its words), laid out as before: the link is the grid */
.dash-funnel-step { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--space-2);
  row-gap: var(--space-1); min-block-size: 3.2rem; padding: var(--space-1) var(--space-2); border-radius: var(--space-2);
  color: var(--on-surface); text-decoration: none; }
.dash-funnel-step:hover { background: var(--surface-container-high); }
.dash-funnel-label { font: var(--t-body-m); overflow-wrap: anywhere; }
.dash-funnel-count { font: var(--t-title-m); font-variant-numeric: tabular-nums lining-nums; text-align: end; }
.dash-funnel-bar { grid-column: 1 / -1; display: block; inline-size: 100%; block-size: var(--space-2); }
.dash-funnel-bar rect { fill: var(--primary); }
.dash-funnel-share { font: var(--t-body-m); color: var(--on-surface-variant); }
.dash-funnel-delta { justify-self: end; white-space: normal; min-inline-size: 0; } /* B2's long change words wrap, as .kpi-delta .status does: a one-line pill pushed the Dashboard 47 px past 375 */
.dash-funnel-list { display: flex; flex-direction: column; gap: var(--space-1); margin: 0; padding: 0; list-style: none; }
.dash-funnel-list a { display: flex; align-items: center; min-block-size: 3.2rem; overflow-wrap: anywhere; }

/* W14b (owner 4 Nov 20:00): dismissible warnings (c::dismiss_region). The warning keeps its own look; the Dismiss
   button sits at its end, a 48 px target (--target-l), one --space-2 from the words. The Show link is hint-size. */
.dismissible { display: flex; align-items: flex-start; gap: var(--space-2); }
.dismissible > :first-child { flex: 1 1 auto; min-width: 0; }
.dismiss-form { display: inline-flex; margin: 0; }
.dismiss-btn { min-inline-size: var(--target-l); min-block-size: var(--target-l); padding: 0; justify-content: center; }
.dismiss-changed { flex-basis: 100%; margin: 0; }
.dismissed-list { display: grid; gap: var(--space-2); }
.dismissed-list ul { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.dismissed-item { opacity: 0.72; }
.dismissed-link { display: inline-flex; align-items: center; min-block-size: var(--target-l); }

/* The shell: the rail (menu), the app bar, the page head. Breakpoints (rem, so zoom works):
   below 40rem   app bar with Menu button; the rail is a modal popover; New Manual Job is a floating button
   40-80rem      112 px collapsed rail; each section opens a flyout (popover)
   from 80rem    263 px expanded rail with <details> groups
   Media queries in rem measure the browser's own 16 px, not the 15 px root: 40rem is 640 px and 80rem 1280 px.
   A menu item with a count needs its name and the count on one line (owner report 2026-10-16: "Review Queue" and
   "over 100" broke over two lines, the count's own words too). The longest is the current page "Review Queue" in
   bold (icon and word 123 px) beside "over 100" (70.4 px) with the 0.5rem gap between: 201 px, measured in Chromium.
   Every menu leaves at least 206.25 px (13.75rem) for it, 5 px over that: the expanded rail (263 px, less 2 x 0.75rem
   of rail and 1.75rem + 0.5rem of item), a flyout (16.5rem, less 2 x 0.5rem and 1.25rem + 0.5rem) and the phone's
   open menu (18rem: 213.75 px). ./scripts/check.sh --e2e measures all three. */

.app { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100dvh; }
.main-col { min-width: 0; display: flex; flex-direction: column; }
main {
  flex: 1; width: 100%; max-width: calc(90rem + 2 * var(--gutter)); margin-inline: auto;
  padding: 0.25rem var(--gutter) 6rem;
}
@media (min-width: 40rem) { .app { grid-template-columns: var(--rail-w) minmax(0, 1fr); } }
@media (min-width: 80rem) { .app { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); } }

/* ---- Brand (W16, owner 5 Nov): the Atlas icon (its own dark tile, so it reads in both themes) and the words
   "Atlas by NeenOpal" on one row, one link home. The icon has no alt: the words name the link, read once. ---- */
.brand {
  display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 0.5rem;
  min-height: var(--target); padding: 0.25rem 0; color: var(--on-surface); text-decoration: none; font: var(--t-title-s);
}
.brand-icon { width: 1.875rem; height: 1.875rem; flex: none; }
.brand-words { display: inline-flex; align-items: baseline; gap: 0.3em; white-space: nowrap; }
/* "by NeenOpal": the name's size, lighter, in the variant ink (AA on the page and the menu in both themes). */
.brand-by { font: 500 0.9375rem/1.25rem var(--font); color: var(--on-surface-variant); white-space: nowrap; }
/* The app's name ("Atlas", owner request 2026-10-12, renamed 2026-10-23): always on ONE line under the logo.
   14 px bold, the scale's floor (the longer 2026-10-12 name took about 201 px); the expanded rail's head leaves it 229 px (e2e measures it). */
.brand-name { font: 700 0.9375rem/1.25rem var(--font); white-space: nowrap; }

/* ---- The rail. Base = expanded: from 80rem, and inside the modal popover below 40rem ---- */
.rail {
  display: flex; flex-direction: column; gap: 0.25rem; padding: 0.5rem 0.75rem 1rem;
  background: var(--bg); color: var(--on-surface-variant);
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
}
.rail[popover] {
  margin: 0; border: 0; inset: 0 auto 0 0; height: 100dvh; max-height: none; width: min(18rem, 86vw);
  padding: 0.5rem 0.75rem 1rem; background: var(--surface-container); color: var(--on-surface-variant);
  border-radius: 0 var(--r-lg) var(--r-lg) 0; box-shadow: var(--e-3);
}
.rail[popover]::backdrop { background: var(--scrim); }
/* Below 40rem the rail is hidden until the Menu button opens it (`.rail` above would otherwise show it). */
.rail[popover]:not(:popover-open) { display: none; }
@media (min-width: 40rem) {
  /* The same element stands in the page as the rail; the Menu button that opens it as a popover is hidden. */
  /* It stays in view while the page scrolls: sticky at the top. `inset` (which undoes the popover's) is written
     WITH top: 0; a bare `inset: auto` after `top: 0` reset top to auto, so the rail scrolled away (fix 2026-10-26). */
  .rail[popover]:not(:popover-open) {
    display: flex; position: sticky; top: 0; align-self: start; z-index: 30;
    height: 100dvh; width: auto; inset: 0 auto auto 0; border-radius: 0; box-shadow: none; background: var(--bg);
  }
}
.rail-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  min-height: 3.75rem; padding: 0 0 0 0.75rem; margin-bottom: 0.25rem;
}
.rail-close { display: none; }
.rail:popover-open .rail-close { display: inline-flex; }
/* The phone's modal rail (270 px): the head is two rows. The logo and "Close menu" share the first; the name stands
   alone on the second, at the head's full width, so it never wraps beside the button. The link keeps one box (its
   logo and name sit on the head's own rows through a subgrid). */
.rail:popover-open .rail-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 0.5rem;
  align-items: center; padding-block: 0.25rem 0.5rem;
}
.rail:popover-open .rail-head .brand {
  display: grid; grid-column: 1 / -1; grid-row: 1 / span 2; grid-template-columns: subgrid; grid-template-rows: subgrid;
  gap: 0.5rem; justify-items: start; align-items: center; padding: 0;
}
.rail:popover-open .rail-head .brand-icon { grid-column: 1; grid-row: 1; }
.rail:popover-open .rail-head .brand-words { grid-column: 1 / -1; grid-row: 2; }
.rail:popover-open .rail-head .rail-close { grid-column: 2; grid-row: 1; }
/* That one box also holds "Close menu", so the focus ring is drawn on what the link shows, the logo and the name,
   and not around the button as well (the rows are 0.5rem apart so the name's ring stays clear of the button). */
.rail:popover-open .rail-head .brand:focus-visible { outline-style: none; }
.rail:popover-open .rail-head .brand:focus-visible .brand-icon,
.rail:popover-open .rail-head .brand:focus-visible .brand-words { outline: 3px solid var(--focus); outline-offset: 2px; }
.rail:popover-open .rail-head .brand:focus-visible .brand-words { border-radius: var(--r-xs); }
.rail-list { display: flex; flex-direction: column; gap: 2px; }

.rail-item {
  display: flex; align-items: center; gap: 0.75rem; width: 100%; min-height: var(--rail-item-h); padding: 0 1rem;
  border: 0; border-radius: var(--r-xl); background: none; color: var(--on-surface-variant);
  font: var(--t-label-l); text-align: start; text-decoration: none; cursor: pointer; list-style: none;
  position: relative; user-select: none; transition: background-color var(--d-short) var(--ease-effects);
}
.rail-item::-webkit-details-marker { display: none; }
.rail-item:hover { background: color-mix(in srgb, var(--on-surface) var(--state-hover), transparent); }
.rail-item .icon { width: 1.4rem; height: 1.4rem; }
.rail-item:focus-visible, .nav-link:focus-visible, .menu-item:focus-visible { outline-offset: -3px; }

/* The section chevron: drawn in CSS, so it is not an icon without a word. */
summary.rail-item::after {
  content: ""; width: 0.5rem; height: 0.5rem; margin-inline: auto 0.375rem;
  border-inline-end: 2px solid currentColor; border-block-end: 2px solid currentColor;
  rotate: 45deg; transition: rotate var(--d-spring) var(--spring-default);
}
details[open] > summary.rail-item::after { rotate: 225deg; }
details:has([aria-current="page"]) > summary.rail-item { color: var(--on-secondary-container); font-weight: 700; }

.nav-items { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 0.375rem; }
.nav-link {
  display: flex; align-items: center; gap: 0.5rem; min-height: var(--nav-link-h); padding: 0 0.5rem 0 1.75rem;
  border-radius: var(--r-xl); color: var(--on-surface-variant); text-decoration: none; font: var(--t-body-m);
  position: relative; transition: background-color var(--d-short) var(--ease-effects);
}
.nav-link .icon { width: 1.2rem; height: 1.2rem; }
.nav-link:hover { background: color-mix(in srgb, var(--on-surface) var(--state-hover), transparent); }

/* The current page (spec 4.1): a light blue pill, bold text, a bar, and aria-current. Never colour alone. */
.rail-item[aria-current="page"], .nav-link[aria-current="page"] {
  background: var(--secondary-container); color: var(--on-secondary-container); font-weight: 700;
}
.rail-item[aria-current="page"]::before, .nav-link[aria-current="page"]::before, .rail-fly.has-current::before {
  content: ""; position: absolute; inset-inline-start: 0.375rem; top: 50%; translate: 0 -50%;
  width: 0.25rem; height: 1.4rem; border-radius: 2px; background: var(--primary);
}

/* Flyouts: only in the collapsed rail. Popovers, so Esc and a click outside close them, and focus returns. */
.rail-fly { display: none; }
.flyout {
  margin: 0; border: 0; padding: 0.5rem; width: 16.5rem; max-height: calc(100dvh - 1rem); overflow: auto;
  background: var(--surface-container-high); color: var(--on-surface);
  border-radius: var(--r-lg); box-shadow: var(--e-2);
}
.flyout-title { font: var(--t-title-s); color: var(--on-surface-variant); padding: 0.5rem 0.75rem 0.375rem; }
.flyout .nav-items { margin: 0; }
.flyout .nav-link {
  min-height: var(--nav-link-h); padding: 0 0.5rem 0 1.25rem; border-radius: var(--r-md); color: var(--on-surface);
}
/* Each flyout opens beside its own section button (CSS anchor positioning), else near the top of the rail. */
.rail-fly[popovertarget="fly-jobs"] { anchor-name: --fly-jobs; }
.rail-fly[popovertarget="fly-insights"] { anchor-name: --fly-insights; }
.rail-fly[popovertarget="fly-configuration"] { anchor-name: --fly-configuration; }
.rail-fly[popovertarget="fly-administration"] { anchor-name: --fly-administration; }
#fly-jobs { position-anchor: --fly-jobs; }
#fly-insights { position-anchor: --fly-insights; }
#fly-configuration { position-anchor: --fly-configuration; }
#fly-administration { position-anchor: --fly-administration; }
@supports (position-area: right span-bottom) {
  .flyout { position-area: right span-bottom; position-try-fallbacks: flip-block; margin-inline-start: 0.25rem; }
}
@supports not (position-area: right span-bottom) {
  .flyout { inset: auto; top: var(--appbar-h); left: calc(var(--rail-w) - 0.25rem); }
}
@media (prefers-reduced-motion: no-preference) {
  .flyout { transition: opacity var(--d-short) var(--ease-effects), scale var(--d-spring) var(--spring-default),
    display var(--d-short) allow-discrete, overlay var(--d-short) allow-discrete; transform-origin: left top; }
  @starting-style { .flyout:popover-open { opacity: 0; scale: 0.92; } }
}

/* ---- 40-80rem: the 112 px collapsed rail (icon in a 48 x 28 pill, word under it) ---- */
@media (min-width: 40rem) and (max-width: 79.99rem) {
  .rail:not(:popover-open) { width: var(--rail-w); padding: 0.75rem 0 1rem; gap: 0.25rem; overflow-x: hidden; }
  .rail:not(:popover-open) .rail-head, .rail:not(:popover-open) .nav-group { display: none; }
  .rail:not(:popover-open) .rail-fly { display: flex; }
  .rail:not(:popover-open) .rail-list { gap: 0.25rem; }
  .rail:not(:popover-open) .rail-item {
    flex-direction: column; justify-content: center; min-height: 3.75rem; padding: 0.25rem;
    border-radius: var(--r-md); font: var(--t-label-m); text-align: center; background: none;
  }
  .rail:not(:popover-open) .rail-item .icon-label { flex-direction: column; gap: 0.25rem; }
  /* Whole words only: never a hyphen inside a word ("Configura-tion"); two or more words may wrap between words.
     The label token is 15 px here, so the longest word ("Administration", 101 px) fits the rail's 104 px. */
  .rail:not(:popover-open) .rail-item .icon-label > span {
    max-width: calc(var(--rail-w) - 0.5rem); overflow-wrap: normal; word-break: normal; hyphens: none;
  }
  .rail:not(:popover-open) .rail-item .icon {
    width: 3.2rem; height: 1.875rem; padding: 0.25rem 0.9rem; border-radius: var(--r-lg);
    transition: background-color var(--d-short) var(--ease-effects), scale var(--d-spring) var(--spring-default);
  }
  .rail:not(:popover-open) .rail-item:hover .icon { background: color-mix(in srgb, var(--on-surface) var(--state-hover), transparent); }
  .rail:not(:popover-open) .rail-item:active .icon { scale: 0.94; }
  .rail:not(:popover-open) .rail-item[aria-current="page"] .icon,
  .rail:not(:popover-open) .rail-fly.has-current .icon,
  .rail:not(:popover-open) .rail-fly:has(+ .flyout:popover-open) .icon {
    background: var(--secondary-container); color: var(--on-secondary-container);
  }
  .rail:not(:popover-open) .rail-fly.has-current { color: var(--on-secondary-container); font-weight: 700; }
  .rail:not(:popover-open) .rail-item[aria-current="page"]::before,
  .rail:not(:popover-open) .rail-fly.has-current::before { inset-inline-start: 0; top: 0.5rem; translate: none; height: 1.875rem; }
}

/* ---- The app bar: pill search (Expressive search app bar) ---- */
.appbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 0.75rem;
  min-height: var(--appbar-h); padding: 0.5rem var(--gutter); background: var(--bg);
}
.menu-btn { display: none; }
.appbar-brand {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: var(--target); flex: none;
  color: var(--on-surface); text-decoration: none; font: var(--t-title-s);
}
@media (min-width: 80rem) { .appbar-brand { display: none; } }
/* W16: below 64rem (the phone, and the tablet's app bar beside New Manual Job) the icon and "Atlas" only, so the
   search keeps its room; the open menu's head shows the whole "Atlas by NeenOpal". */
@media (max-width: 63.99rem) { .appbar-brand .brand-by { display: none; } }
.search {
  display: flex; align-items: center; gap: 0.25rem; flex: 1; min-width: 0; max-width: 44rem;
  height: 3.2rem; padding: 0 0.25rem 0 1.25rem; border-radius: var(--r-xl);
  background: var(--surface-container-high); color: var(--on-surface-variant);
}
.search input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: none;
  font: var(--t-body-l); color: var(--on-surface);
}
.search input::placeholder { color: var(--on-surface-variant); opacity: 1; }
.search input:focus-visible { outline: none; }
.search:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.search-go { color: var(--on-surface-variant); }
.new-job { margin-inline-start: auto; flex: none; }
/* W17 (owner 16:30): from 40rem to about 800 px the app bar's New Manual Job is its icon alone, a round 41 px target,
   so the search keeps room beside the brand and the avatar. Its word stays in the page for screen readers (the
   link's name), and its title shows it on hover. Wider, unchanged; on a phone it is the floating button. A media
   query's rem is the browser's 16 px, not the page's root size: 49.99rem is 799.8 px. */
@media (min-width: 40rem) and (max-width: 49.99rem) {
  .new-job { width: var(--target); padding: 0; }
  .new-job .icon-label > span {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
}
.avatar-btn {
  display: inline-flex; align-items: center; gap: 0.625rem; min-height: 2.8rem; min-width: 2.8rem; padding: 0.2rem;
  border: 0; border-radius: var(--r-full); background: none; color: var(--on-surface); font: var(--t-label-l);
  cursor: pointer; flex: none; anchor-name: --avatar;
}
.avatar-btn:hover { background: color-mix(in srgb, var(--on-surface) var(--state-hover), transparent); }
.avatar {
  display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; flex: none; border-radius: 50%;
  background: var(--primary-container); color: var(--on-primary-container); font: var(--t-label-m);
}
.avatar-lg { width: 2.8rem; height: 2.8rem; }
@media (min-width: 80rem) { .avatar-btn { padding-inline-end: 1rem; } }
@media (max-width: 79.99rem) {
  .avatar-name {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
  }
}

/* The user menu (popover under the avatar). */
.menu {
  margin: 0; border: 0; padding: 0.5rem; min-width: 14rem; max-width: calc(100vw - 1.5rem);
  background: var(--surface-container-high); color: var(--on-surface);
  border-radius: var(--r-lg); box-shadow: var(--e-2);
}
.user-menu { position: fixed; inset: auto; top: calc(var(--appbar-h) - 0.25rem); inset-inline-end: 0.75rem; }
@supports (position-area: bottom span-left) {
  .user-menu { inset: auto; position-anchor: --avatar; position-area: bottom span-left; margin-top: 0.25rem; }
}
/* Any other menu: it opens under the button that opens it (a popovertarget button is the popover's implicit
   anchor). Without anchor positioning it opens in the middle of the window, never in a corner. */
.menu-anchored { inset: 0; margin: auto; }
/* W8 (a2 SHOULD-3): a long More menu (13 items at Applied) never runs off a short phone: it scrolls inside itself. */
.menu-anchored { max-block-size: calc(100dvh - 1rem); overflow-y: auto; overscroll-behavior: contain; }
@supports (position-area: bottom span-right) {
  .menu-anchored { inset: auto; margin: 0.25rem 0 0; position-area: bottom span-right; position-try-fallbacks: flip-block, flip-inline; }
  /* W8 (a2 SHOULD-3): the side with more room (below or above the button), and no taller than that side: the
     position area is the menu's containing block, so 100% is the room left there. */
  .menu-anchored { position-try-order: most-block-size; max-block-size: calc(100% - 0.5rem); }
}
.menu-who { display: flex; gap: 0.75rem; align-items: center; padding: 0.5rem 0.75rem 0.75rem; }
.menu-who p { display: grid; }
.menu-who strong { font: var(--t-title-m); }
.menu-who-label, .menu-who-meta { font: var(--t-body-m); color: var(--on-surface-variant); }
.menu-items { display: grid; gap: 2px; }
.user-menu .menu-items:last-child { margin-top: 2px; }
.menu form { margin: 0; }
.menu-item {
  display: flex; align-items: center; width: 100%; min-height: var(--target); padding: 0 0.75rem 0 1rem;
  border: 0; border-radius: var(--r-md); background: none; color: var(--on-surface);
  font: var(--t-body-m); text-align: start; text-decoration: none; cursor: pointer; position: relative;
}
.menu-item:hover { background: color-mix(in srgb, var(--on-surface) var(--state-hover), transparent); }
/* The current page or the current choice (the theme): the light blue pill, bold text and a bar. Never colour alone. */
.menu-item[aria-current] { background: var(--secondary-container); color: var(--on-secondary-container); font-weight: 700; }
.menu-item[aria-current]::before {
  content: ""; position: absolute; inset-inline-start: 0.25rem; top: 50%; translate: 0 -50%;
  width: 0.25rem; height: 1.4rem; border-radius: 2px; background: var(--primary);
}
.menu-title { font: var(--t-title-s); color: var(--on-surface-variant); padding: 0.5rem 1rem 0.375rem; }

/* The theme switch (2026-10-12), on every signed-in page. From 64rem: a button in the app bar next to the avatar
   (the current theme's icon and word) that opens its own menu. Below 64rem the app bar has no room for it next to
   the search, so the same three choices sit in the avatar's menu, and the word "Theme" stands at the foot of the
   rail, where it is seen without opening a menu: in the collapsed rail (40-64rem) a "Theme" item that opens the
   theme menu beside it, as a section opens its flyout; in the phone's modal rail the three choices under their
   title. One of these is always there. */
.theme-btn { display: none; flex: none; }
.menu-theme { margin-block: 0.25rem; padding-block: 0.25rem; border-block: 1px solid var(--outline-variant); }
.rail-theme { margin-top: auto; padding-top: 0.5rem; }
.rail-theme-btn { display: none; }
.rail-theme-choices { padding-top: 0.25rem; border-top: 1px solid var(--outline-variant); }
@media (min-width: 40rem) and (max-width: 63.99rem) {
  .rail:not(:popover-open) .rail-theme-btn { display: flex; }
  .rail:not(:popover-open) .rail-theme-choices { display: none; }
  /* The rail's item is the only button that opens the theme menu here: it opens to the right of the item. */
  #theme-menu { position-area: right span-top; margin: 0 0 0 0.25rem; }
}
@media (min-width: 64rem) {
  .theme-btn { display: inline-flex; }
  .menu-theme, .rail-theme { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .menu { transition: opacity var(--d-short) var(--ease-effects), scale var(--d-spring) var(--spring-default),
    display var(--d-short) allow-discrete, overlay var(--d-short) allow-discrete; transform-origin: top right; }
  @starting-style { .menu:popover-open { opacity: 0; scale: 0.92; } }
}

/* "New job" floats bottom right on phones (extended FAB), above the home bar's safe area; in the app bar elsewhere.
   base.html draws it only where Layout.show_fab says: the Dashboard and the Jobs lists. */
.fab { display: none; }

@media (max-width: 39.99rem) {
  .appbar { padding: 0.5rem 0.75rem; gap: 0.25rem; }
  .menu-btn { display: inline-flex; }
  .search { height: 2.8rem; padding-inline-start: 0.75rem; }
  .search-go, .new-job { display: none; }
  .fab {
    display: inline-flex; position: fixed; inset-inline-end: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 25;
    --h: 3.2rem; padding: 0 1.25rem 0 1rem; border-radius: var(--r-lg);
    background: var(--primary-container); color: var(--on-primary-container); font: var(--t-title-s);
    box-shadow: var(--e-3);
  }
  .fab:active { border-radius: var(--r-xl); }
}

/* ---- Page head: breadcrumb, then the title row: the title with a status chip beside it (block page_status) and the
   page's buttons at the end (block page_actions; one filled button per page). On a phone the buttons stand under
   the title and the main one fills the width. A page with no buttons leaves an empty holder, which is not drawn. ---- */
.page-head { display: grid; gap: 0.25rem; padding: 0.5rem 0 1.25rem; }
.page-title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; min-width: 0; }
.page-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; min-width: 0; }
.page-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.page-head-actions:empty { display: none; }
/* A button that sends a form (Start experiment) is drawn as the button alone: the form has no box of its own, so
   the row lays its button out like any other. */
.page-head-actions > form { display: contents; }
@media (max-width: 39.99rem) {
  .page-title-row { flex-direction: column; align-items: stretch; }
  .page-head-actions > .btn-filled, .page-head-actions > form > .btn-filled { flex: 1 1 100%; }
}
.breadcrumb ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none;
  font: var(--t-label-l); color: var(--on-surface-variant);
}
.breadcrumb li { display: flex; align-items: center; min-width: 0; }
.breadcrumb li:not(:last-child)::after { content: "\203A"; padding-inline: 0.25rem; }
.breadcrumb a, .breadcrumb span { display: inline-flex; align-items: center; min-height: var(--target); padding: 0 0.375rem; }
.breadcrumb a { color: var(--on-surface-variant); text-decoration: none; border-radius: var(--r-sm); }
.breadcrumb a:hover { color: var(--on-surface); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--on-surface); }
/* The breadcrumb wraps between its items. A long title in it (a job's) wraps between its words inside the row,
   and a single word longer than the row breaks instead of pushing the page sideways. */
.breadcrumb a, .breadcrumb span { min-width: 0; overflow-wrap: anywhere; }
/* U2 (UA63): on a phone a job page's breadcrumb names the list only; the job's title is the H1 right under it. */
@media (max-width: 39.99rem) {
  main:has(.job-page) .breadcrumb li:has(> [aria-current="page"]) { display: none; }
}

/* A menu item's count badge (S2): at the end of the row, after the word, 0.5rem from it at least (the row's gap),
   in the round end of the item's pill (the row's end padding is 0.5rem). The widths that keep the two on one line
   are at the top of this file. */
.nav-link .badge { margin-inline-start: auto; }

/* ---- UX fixes 3.14 shell-words (SW6, M073): the breadcrumb never repeats the title. Below 64rem the current crumb is
   left out (the H1 right under it says the same; U2's job-page rule, UA63, for every page), the crumb before it ends
   without its separator, and a page whose only crumb is itself (the Dashboard) draws no row. From 64rem the current
   crumb keeps one line and ends with an ellipsis; the H1 holds the whole title: the earlier crumbs keep their width
   (the base rules above let every crumb shrink), so only the current one gives way. The separator belongs to the
   item before it (above), so a wrapped line never starts with it. ---- */
@media (max-width: 63.99rem) {
  .breadcrumb li:last-child { display: none; }
  .breadcrumb li:nth-last-child(2)::after { content: none; }
  .page-head .breadcrumb:has(li:only-child) { display: none; }
}
@media (min-width: 64rem) {
  .breadcrumb ol { flex-wrap: nowrap; }
  .breadcrumb li:not(:last-child) { flex-shrink: 0; }
  .breadcrumb li:last-child { min-width: 0; overflow: hidden; }
  .breadcrumb li:last-child > span {
    display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; overflow-wrap: normal;
    line-height: var(--target);
  }
}

/* ===== W5b needs-me S4 (M5, N4): the count on the icon ===== */
.icon-wrap { display: contents; }
.icon-wrap .badge { order: 1; }
.nav-group[open] > summary .badge { display: none; }
.menu-btn .badge { margin-inline-start: 0.25rem; }
.menu-btn:has(> .badge:not([hidden])) .icon-label > span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (min-width: 40rem) and (max-width: 79.99rem) {
  .rail:not(:popover-open) .icon-wrap { display: inline-grid; position: relative; }
  .rail:not(:popover-open) .icon-wrap .badge {
    /* Anchored at its start, just inside the icon's right edge, so a one-digit badge sits where it always did; a long
       sum ("over 100", once the Jobs badges add up past the Review Queue's 100) slides back left only as far as it
       must to end 4 px inside the 112 px rail (the translate's % is the badge's own width: 2.7rem = the room from its
       start to there). Its middle stays on the icon's right half, off the word (combine red needs-me-s4:115 @820). */
    position: absolute; top: -0.4rem; inset-inline-start: calc(100% - 0.85rem); order: 0; margin: 0; z-index: 1;
    translate: min(0px, calc(2.7rem - 100%)) 0;
    white-space: nowrap;
  }
}

/* ---- W15 page loader (owner, 5 Nov; STYLE.md "Page loader"; partials/page_loader.html, app.js) ----
   The app's icon in the middle of the screen while a click, a send or a swap takes more than 300 ms. W16 (owner,
   5 Nov 14:37): while it shows it is a wall: the layer fades the page and takes every click (app.js makes the rest of
   the page inert, so no typing and no Tab either). After 15 s still loading, a small note offers Reload and Cancel.
   One loop of 2.4 s: the A draws in, the swoosh sweeps up, the star twinkles, all three fade, again. Only where
   motion is welcome; under reduced motion the mark only pulses and the layer appears with no fade. */
/* A manual popover (l7 F1): shown into the top layer, so it covers an open modal dialog too. The UA's popover box
   (border, padding, Canvas fill, fit-content size, margin auto) is undone here. */
.page-loader {
  position: fixed; inset: 0; z-index: 50; width: auto; height: auto; max-width: none; max-height: none;
  margin: 0; border: 0; padding: 0; overflow: auto; color: inherit;
  display: grid; place-items: center; align-content: center; gap: var(--space-4);
  pointer-events: auto; cursor: progress; background: color-mix(in srgb, var(--bg) 55%, transparent);
}
.page-loader[hidden] { display: none; }
.page-loader-still {
  display: grid; justify-items: center; gap: var(--space-2); max-width: min(20rem, calc(100vw - 2rem));
  padding: var(--space-3) var(--space-4); border-radius: var(--r-lg); background: var(--surface-container-high);
  box-shadow: var(--e-3); cursor: auto; text-align: center;
}
.page-loader-still[hidden] { display: none; }
.page-loader-still-say { margin: 0; }
.page-loader-still-do { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); }
.page-loader-mark { display: block; width: 4.5rem; height: 4.5rem; border-radius: 22%; box-shadow: var(--e-3); }
.loader-a, .loader-swoosh, .loader-star { transform-box: fill-box; }
.loader-swoosh { transform-origin: 0% 100%; }
.loader-star { transform-origin: 50% 50%; }
@media (prefers-reduced-motion: no-preference) {
  .page-loader[data-state="on"] { animation: page-loader-fade var(--d-medium) var(--ease-standard); }
  .page-loader[data-state="on"] .page-loader-mark { animation: page-loader-in var(--d-medium) var(--ease-standard); }
  .page-loader[data-state="on"] .loader-a {
    stroke-dasharray: 100; animation: page-loader-draw 2.4s var(--ease-standard) infinite;
  }
  .page-loader[data-state="on"] .loader-swoosh { animation: page-loader-sweep 2.4s var(--ease-effects) infinite; }
  .page-loader[data-state="on"] .loader-star { animation: page-loader-twinkle 2.4s ease-in-out infinite; }
}
@media (prefers-reduced-motion: reduce) {
  /* Wins over base.css's `* { animation: none !important }` (a class beats `*`): a pulse moves nothing. */
  .page-loader[data-state="on"] .page-loader-mark { animation: page-loader-pulse 2s ease-in-out infinite !important; }
}
@keyframes page-loader-fade { from { background-color: transparent; } }
@keyframes page-loader-in { from { opacity: 0; scale: 0.9; } }
@keyframes page-loader-draw {
  0% { stroke-dashoffset: 100; opacity: 1; }
  40%, 86% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes page-loader-sweep {
  0%, 30% { opacity: 0; translate: -12% 14%; scale: 0.8; }
  55%, 86% { opacity: 1; translate: 0 0; scale: 1; }
  100% { opacity: 0; translate: 0 0; scale: 1; }
}
@keyframes page-loader-twinkle {
  0%, 52% { opacity: 0; scale: 0; rotate: -30deg; }
  62% { opacity: 1; scale: 1.25; rotate: 8deg; }
  70% { opacity: 1; scale: 1; rotate: 0deg; }
  76% { opacity: 0.6; scale: 0.82; }
  82%, 86% { opacity: 1; scale: 1; }
  100% { opacity: 0; scale: 1; }
}
@keyframes page-loader-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* Page-specific touches. Keep this short: a pattern used on two pages belongs in components.css. */

/* Sign-in and the plain error pages (bare.html): the brand above one centred card; the app's name on one line,
   centred under the logo. */
.bare-head { display: flex; justify-content: center; padding: 2rem var(--gutter) 0; }
.bare-head .brand { align-items: center; text-align: center; }
.bare-main { max-width: 30rem; margin: 1.5rem auto 3rem; padding: 0 var(--gutter); }
.sign-in { gap: 1.25rem; }
/* MCP-R1 (MCP spec 10.2): the consent page's loopback warning is a sentence; its chip's words wrap (on one line it
   widened the card past a 375 px phone). */
.sign-in .status { white-space: normal; }
/* The consent page (owner 2026-10-26): wider than sign-in (45rem, a card of about 630 px, from a tablet; the full
   width less the gutter on a phone), tighter spacing, and every line with Allow and Cancel on one screen at every
   width, even 390x844. */
.bare:has(.consent) .bare-head { padding-top: 0.75rem; }
.bare-main:has(> .consent) { max-width: 45rem; margin-block: 0.75rem; }
.consent { gap: 0.75rem; }
.consent .form { gap: 0.75rem; }
.consent .choice-group { gap: 0.25rem; }
.consent .choice-group legend { margin-bottom: 0.25rem; }
.consent-who { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.5rem; }
.consent-who > p { flex: 1 1 20rem; }
.consent .form-actions { margin-top: 0.25rem; }
/* Read is ticked and cannot be unticked: the shared disabled background with the ticked words' colour drew "Read"
   nearly invisible, so it takes the surface's own words colour. */
.consent .choice:has(input:checked:disabled) { color: var(--on-surface); }
.error-page { justify-items: center; text-align: center; }
.error-page code { overflow-wrap: anywhere; }
/* The error page's one button: as wide as its words from 40rem, the card's width on a phone. */
.error-action { display: flex; justify-content: center; }
@media (max-width: 39.99rem) {
  .error-action { justify-self: stretch; }
  .error-action > .btn { flex: 1 1 auto; }
}

/* Style Guide: cards stack; rows wrap. */
.card > .row + .row { margin-top: 0.25rem; }

/* The job page (2026-10-12). Two parts: the work (.job-main: the summary line, the stage's block, the description,
   the steps) and the context (.job-side: About this job, Autopilot, Timeline). The work is first in the page, so
   below 72rem the context follows it; from 72rem the context is the right column and stays in view while the work
   scrolls, scrolling by itself when it is taller than the window (it can take focus, so the keyboard reaches it). */
.job-page { display: grid; gap: 1.25rem; align-items: start; min-width: 0; }
.job-main { min-width: 0; }
.job-side { min-width: 0; border-radius: var(--r-lg-plus); }
.job-side:focus-visible { outline-offset: -3px; }
@media (min-width: 72rem) {
  .job-page { grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem); }
  .job-side {
    position: sticky; top: calc(var(--appbar-h) + 0.5rem); max-height: calc(100dvh - var(--appbar-h) - 1rem);
    overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  }
  /* In the narrow column the facts stand two across, as on a phone, and the cards keep the phone's padding. */
  .job-side .card { padding: 1.25rem; }
  .job-side .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The job page's drafts side by side (S2): one column on phones, as many 22rem columns as fit from 64rem. */
/* A short card ends where its content ends (align-items: start), instead of being stretched to its neighbour. */
.draft-grid { display: grid; gap: 1rem; align-items: start; min-width: 0; }
@media (min-width: 64rem) { .draft-grid { grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr)); } }

/* The Pipeline: four tables with one column set. Wherever they are tables (from 72rem) every column after the job
   has ONE width in all four (fixed layout, set on the headers: the widest stage chip, a date with its time and zone,
   a name, the Scanner, one word for the source) and the job takes the rest, so the columns line up down the page
   whatever each phase holds, and a table is never wider than its card (972 px at a 1280 px window). A name too long
   for its column wraps instead of pushing the next one. */
@media (min-width: 72rem) {
  table[id^="phase-"] { table-layout: fixed; }
  table[id^="phase-"] th:nth-child(2) { width: 10.75rem; }
  /* The widest date: two-digit day and hour and a four-letter zone ("12 Oct 2026, 10:02 am AEDT", about 180 px). */
  table[id^="phase-"] th:nth-child(3) { width: 14rem; }
  table[id^="phase-"] th:nth-child(4) { width: 8rem; }
  table[id^="phase-"] th:nth-child(5) { width: 9rem; }
  table[id^="phase-"] th:nth-child(6) { width: 6rem; }
  /* W2 l1 (D3): the Actions column (Skip) took the fixed layout's 1% (11 px) and its button ran 45 px past the card. */
  table[id^="phase-"] th:nth-child(7) { width: 6.5rem; }
  table[id^="phase-"] td:is(:nth-child(4), :nth-child(5), :nth-child(6)) { white-space: normal; overflow-wrap: anywhere; }
}

/* Configuration > Scanners: the last read of GigRadar and Sync Scanners (2026-10-14). On a phone the last read, then
   the button at full width with what it costs under it. From 40rem the last read at the start and the button at the
   end of one row, its hint under it ending where the button ends. */
.sync-status { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.sync-form { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
@media (min-width: 40rem) {
  .sync-bar { align-items: flex-start; flex-wrap: nowrap; }
  .sync-status { flex: 1 1 auto; }
  .sync-form { flex: 0 1 25rem; align-items: flex-end; text-align: end; }
}

/* New Manual Job, step 3 (2026-10-14): a Scanner OR the job's own setup. Only the chosen way's controls show, with
   CSS alone, so it works without script; a hidden control leaves the accessibility tree and still posts, and the
   server ignores the other way's fields. With no way chosen (a form this app did not draw) both show. */
.manual-setup:has(input[name=setup][value=scanner]:checked) .manual-way-own,
.manual-setup:has(input[name=setup][value=own]:checked) .manual-way-scanner { display: none; }

/* C4 (spec 8.6): the revise card's paragraph choice stands only while "One paragraph" is chosen, with CSS alone, so it
   works without script; a hidden select still posts and the server reads it only for one paragraph. */
.revise-form:has(input[name=scope][value=letter]:checked) .revise-paragraph { display: none; }
/* U6 (UI rethink spec 9, research 4.5): a Screening Profile's "How it decides": the scale from 0 to 100% in three
   parts (Skip, a person, Propose), its words in a row under it (one part's words a line on a phone), never colour
   alone. */
.how-it-decides { display: grid; gap: 0.75rem; }
.chart-scale { display: block; inline-size: 100%; block-size: 1rem; border-radius: var(--r-full); overflow: hidden; }
.decide-skip { fill: var(--danger-container); }
.decide-person { fill: var(--warn-container); }
.decide-propose { fill: var(--ok-container); }
.decide-words { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; margin: 0; padding: 0; list-style: none; font: var(--t-body-m); }
@media (max-width: 39.99rem) { .decide-words { flex-direction: column; } }
@media (forced-colors: active) { .chart-scale rect { forced-color-adjust: none; stroke: CanvasText; } }
/* U6 (UI rethink spec 9, UA2): a Notification Rules row: the event, where it posts and its sample message, then its
   switch and who it tags on one line from 64rem; on a phone a row stacks (event, switch, tag). The person to tag
   shows only while "A person" is chosen in the row's select (no script needed); a refused one stays shown. */
.rule-rows { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.rule-row { display: grid; gap: 0.5rem 1.5rem; padding-block: 0.75rem; border-block-end: 1px solid var(--outline-variant); }
.rule-row:last-child { border-block-end: 0; }
.rule-name { margin: 0; font: var(--t-title-s); }
.rule-head > p { margin: 0; }
.rule-sample { overflow-wrap: anywhere; }
/* W5b SN-D T10: the sample line ends with its See it text button, a little apart from the words. */
.rule-see { margin-inline-start: 0.25rem; }
@media (min-width: 64rem) { .rule-row { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; } }
.rule-person { display: none; }
.rule-controls:has(option[value="person"]:checked) .rule-person, .rule-person:has([aria-invalid="true"]) { display: block; }
.notify-read, .settings-read { margin: 0; }
/* U6 (UI rethink spec 10, UA1) and D1: the Dashboard's greeting in the header line with when its figures were read,
   and its first line naming the queues that need a person. */
.dash-greeting { margin: 0; color: var(--on-surface-variant); font: var(--t-body-l); }
.dash-queues { margin: 0; font: var(--t-title-m); }
/* W5b needs-me M1 (spec N1 3358-3363): "Waiting for you" under the first line: the lines flow in a row (wrapping on a
   tablet), one per row on a phone with a 41 px target; the team's line closes it. */
.waiting-strip { display: grid; gap: 0.25rem; min-width: 0; }
.waiting-lines { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin: 0; padding: 0; list-style: none; }
.waiting-line { display: inline-flex; align-items: center; min-height: var(--target); font: var(--t-title-s); }
.waiting-empty, .waiting-team { margin: 0; }
@media (max-width: 40rem) {
  .waiting-lines { display: grid; gap: 0; }
  .waiting-line { display: flex; width: 100%; }
}
/* W5b needs-me S1/S6 (COORD 1 Nov): on a phone (390 x 844) the first tile stays in the first screen, with room for S2's
   Ready to copy line: the header, the welcome card, the queues line and the Dashboard's gaps are tighter (the line of
   warnings follows the tiles in dashboard.html itself, at every width). Nothing is hidden; every strip line keeps its
   41 px target; from 40rem nothing changes. */
@media (max-width: 39.99rem) {
  .page-head:has(.dash-greeting) { padding-block: 0.25rem 0.5rem; }
  .page-head:has(.dash-greeting) .page-title { gap: 0.25rem 0.75rem; }
  .dash-greeting { font: var(--t-body-m); }
  main:has(#waiting-for-you) > .welcome-card { gap: 0.375rem; padding: 0.875rem; }
  main:has(#waiting-for-you) > .welcome-card .card-title { font: var(--t-title-m); }
  main:has(#waiting-for-you) > .welcome-card .welcome-lines { gap: 0; }
  .dash-queues { font: var(--t-title-s); }
  .stack:has(> #waiting-for-you) { gap: 0.5rem; }
}
/* U6 (spec 10): System Health's "Needs you": its heading and chips (or its line, when nothing needs a person) on one
   row under the states, not a card of its own. */
.needs-you { min-width: 0; }
.needs-title { margin: 0; font: var(--t-title-s); }
.needs-line { margin: 0; }
/* W26 (D6): System Health's "The Dashboard shows a notice on the day it is raised" hint, beside the heading. */
.needs-hint { margin: 0; }
/* W5b needs-me S6 (M168): from 40rem the Dashboard's "Needs attention" stands beside its chips, not above them, so the
   longer stops-work chips (what stops, its effect, who was told) keep the figures in a 1440 x 900 first screen. The
   reading order is unchanged. */
@media (min-width: 40rem) {
  .stack:has(> #waiting-for-you) > .needs-attention { grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 0.75rem; }
}
/* W5b needs-me S6 (M9; UX spec N7, N8): a System Health card folded to its glance line (a folded card beside an open
   one keeps its own height; two open ones are equally tall, as the cards were), "See all n" under a list cut to its
   top 5, and the alerts' type filter on one row. */
.pair-grid > .disclosure[id$="-fold"]:not([open]) { align-self: start; }
.disclosure[id$="-fold"] > .disclosure-body > .card { padding: 0; }
.see-all { margin: 0; }
.alerts-type { align-items: center; }
/* W8 5b: Insights > Turnaround, the step chooser of the two group tables on one row. */
.ta-step { align-items: center; }
/* W8 5b T3: the job card's title line (the job, how it reached us, Close). */
.ta-job-head { align-items: baseline; flex-wrap: wrap; }
/* W8 5b T5: the steps table's row headers are long step names ("Applied to recorded in Atlas (for a hand send: ...)"):
   they wrap, so the table stays inside its card at 1280 px. */
.table.ta-steps tbody th[scope="row"] { white-space: normal; }
/* U6 (spec 10): a failed delivery's reason, first in its card. */
.delivery-reason { margin: 0 0 0.75rem; font: var(--t-title-s); overflow-wrap: anywhere; }
/* U6 (spec 10): an Insights page's one verdict line over its chart. */
.verdict-line { margin: 0 0 0.75rem; font: var(--t-title-s); }
/* U6 (UA5): a running experiment's progress: the bar of the arm with the fewest, its words beside it (under it on a
   phone). */
.exp-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: 0; }
.exp-progress progress { inline-size: min(16rem, 100%); block-size: 0.75rem; accent-color: var(--primary); }

/* W2 l2 (F1, spec H1): "Record it as sent on Upwork?" shows its time field only while "Earlier" is chosen, with CSS
   alone, so it works without script; a hidden field still posts and the server reads it only for "Earlier". */
.sent-form:has(input[name=when][value=now]:checked) .sent-earlier { display: none; }
/* W5a hand-send (HS2, spec H1): "I changed the text in Upwork" shows the text box only while it is ticked, with CSS
   alone; the box still posts, and the server keeps its text only with the tick and when it differs. */
.sent-form:has(input[name=text_changed]:not(:checked)) .sent-changed { display: none; }
/* W5a hand-send HS11 fix (m3's gate item: the record form's button ends inside 375 x 844): on a phone "Record a
   proposal I already sent" stands closer (stack and form gaps), the link folded under "Add Upwork link". */
@media (max-width: 39.99rem) {
  .record-page > .stack { gap: 1rem; }
  .record-page .form { gap: 0.75rem; }
}

/* MCP-P (2026-10-24): Connect Claude. The connector's address and the Claude Code command break inside themselves
   rather than widen a phone's page. */
.connect-code { overflow-wrap: anywhere; }

/* MCP-P: Test the connection's lines stand one under another, each with its icon. */
.check-lines { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }

/* MCP-P: a device's recent calls link the record a call was about and the Audit Log inside their lines; each link is
   a full click target (41 px tall and wide), never under 40 px. */
[id^="device-"] .timeline a { display: inline-flex; align-items: center; min-height: var(--target); min-width: var(--target); }

/* MCP-P: Administration > Claude connections. Seven columns share a 972 px card at a 1280 px window without
   scrolling sideways: the buttons stand one under another (.row-actions) and why a status is so wraps at 12rem under
   its chip rather than at a note's usual 18rem. In a card narrower than 72rem the app, what it may do and the two
   dates keep 7rem (a date still stands over its time) and the status 11rem (its widest chip, Needs re-allowing).
   Where the card has room (72rem and wider) the sorted column's heading keeps one line, so its arrow stands right
   after its words; in a narrower card it may take two lines, as every heading here may. */
.table.table-claude-connections .col-text .cell-note { max-width: 12rem; }
@container (min-width: 72rem) { .table.table-claude-connections thead th[aria-sort] { white-space: nowrap; } }
@container (max-width: 72rem) {
  .table.table-claude-connections :is(.col-name, .col-words) { min-width: 7rem; }
  .table.table-claude-connections .col-text { min-width: 11rem; }
  .table.table-claude-connections .col-text .cell-note { max-width: 11rem; }
}

/* W3 P1: the lifecycle strip on the job page. Steps wrap to a second line on a phone (no sideways scroll); an
   optional step the job went past reads "not needed" in words and is muted. */
.lifecycle-steps { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; list-style: none; margin: 0; padding: 0; }
.lifecycle-step { padding: 0.25rem 0.5rem; border-radius: 0.5rem; box-shadow: inset 0 0 0 1px var(--outline); overflow-wrap: anywhere; }
.lifecycle-step[aria-current="step"] { font-weight: 700; box-shadow: inset 0 0 0 2px var(--primary); }
/* Done, not needed and not yet differ in words (read out), a mark and the line, never by opacity or colour alone; the
   muted colour is a token that passes AA on the card in light and dark. */
.lifecycle-step-reached::before { content: "\2713\00a0"; }
.lifecycle-step-ahead, .lifecycle-step-not_needed { color: var(--on-surface-variant); }
.lifecycle-step-ahead::before { content: "\2192\00a0"; }
.lifecycle-step-not_needed { text-decoration: line-through; }
.form-inline { display: inline-block; margin: 0; }
.lifecycle-sub-heading { font: var(--t-body-m); font-weight: 600; margin: 0; }
.lifecycle-extra { font-size: 0.875em; }
.lifecycle-sub-steps { list-style: none; margin: 0; padding: 0; }
.lifecycle-invite { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.lifecycle-invite > p { flex: 1 1 14rem; }
.lifecycle-strip .btn { min-height: var(--target); }
/* W3 P7: a link that stands alone in a hint (the Pipeline's Skipped link, Follow-ups' closed-by-Atlas line) is a 41 px target. */
.hint-link { display: inline-flex; align-items: center; min-height: var(--target); }
/* W3 P4: Follow-ups' bulk bar, the row checkboxes and the answer listing the jobs left. */
.bulk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.bulk-actions legend { padding: 0; margin-bottom: 0.5rem; font: var(--t-label-l); }
.bulk-all { display: inline-flex; align-items: center; gap: 0.5rem; min-height: var(--target); }
/* S3: the row checkbox sits in a label that is a full click target (41 px), never under 40 px. */
.row-check-target { display: inline-flex; align-items: center; justify-content: center; min-inline-size: var(--target); min-block-size: var(--target); vertical-align: middle; }
.row-check { inline-size: 1.25rem; block-size: 1.25rem; margin: 0; }
.bulk-left ul { margin: 0.5rem 0 0; padding-inline-start: 1.25rem; }
/* U6 (spec 11): New user's first-password fields stand only while "Set a first password" is chosen (CSS alone). */
.user-new:has(input[name=sign_in][value=link]:checked) .user-new-password { display: none; }
/* int/w4 (people-accounts PF, COORD 31 Oct): the Users list's two dates (Last sign-in, Created) are .col-words so they may
   stand over their time in a 972 px card; where the card has room (72rem and wider) they keep one line, however long
   the names and addresses beside them (smoke.spec.ts "a date in the Users list @1440"). Only the date itself: a cell of
   longer words still wraps (tables.spec.ts's long values). */
@container (min-width: 72rem) { .table.table-users .col-words time { white-space: nowrap; } }

/* FK-K1: UX fixes FK (spec 2026-10-25 section 3.10). FK.2.5 (M174, M175): the Knowledge pop-up. Only the chosen way's
   fields show, with CSS alone (as New Manual Job's setup), and the public link is for a file or a text; a hidden field
   still posts and the server reads only the chosen way's. With script the AI's step takes the form's place (`data-step`
   on the pop-up). The button bar stays on screen at the foot of the pop-up; on a phone the pop-up is a full-height
   sheet. The blocked Add button is G1's (`.btn[aria-disabled]` in components.css). */
.knowledge-add-form:has(input[name=way][value=text]:checked) :is(.knowledge-way-file, .knowledge-way-url),
.knowledge-add-form:has(input[name=way][value=file]:checked) :is(.knowledge-way-text, .knowledge-way-url),
.knowledge-add-form:has(input[name=way][value=url]:checked) :is(.knowledge-way-text, .knowledge-way-file, .knowledge-way-cited) {
  display: none;
}
dialog.knowledge-add[data-step] .knowledge-add-form { display: none; }
.dialog-bar {
  position: sticky; bottom: -1.5rem; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
  gap: 0.5rem; margin-inline: -1.5rem; padding: 0.75rem 1.5rem calc(0.75rem + env(safe-area-inset-bottom));
  background: var(--surface-container-high);
}
.dialog-bar > .explain-line { flex: 1 1 100%; margin: 0; }
@media (max-width: 39.99rem) {
  dialog.knowledge-add[open] {
    height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; align-content: start; overflow-y: auto;
  }
  .dialog-bar > .btn { flex: 1 1 100%; }
}
.knowledge-facet { min-width: 0; }
.knowledge-confirm { align-content: start; }
.problem-summary { color: var(--danger); font: var(--t-label-l); }
/* FK-K2: FK.2.2 (M170): an item's "Used in" rows: the job's title, then its stage and version; on a phone they stack. */
.used-in-list { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.used-in-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 0.75rem; }
.used-in-row > .row-link { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 39.99rem) { .used-in-row { flex-direction: column; align-items: flex-start; } }
/* FK-K2: FK.2.1 (M169): Edit text's box grows with what it holds (field-sizing; app.js sizes it in a browser without
   it) from a few lines, and on a phone Save text and Cancel stay in a bar at the foot of the screen. The Text
   history's rows. */
.knowledge-edit-text textarea[data-grow] { min-height: 8rem; max-height: 70vh; }
/* a2 review S2 (int/w4 merge: the class had no rule): a refused Save text's kept words, read-only, sized as the box. */
.knowledge-kept-text textarea[data-grow] { min-height: 8rem; max-height: 70vh; }
@media (max-width: 39.99rem) {
  .edit-bar { position: sticky; bottom: 0; z-index: 2; padding-block: 0.75rem calc(0.75rem + env(safe-area-inset-bottom)); background: var(--surface-container-high); }
  .edit-bar > .btn { flex: 1 1 0; }
}
.text-history { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.text-history p { margin: 0; }
/* FK.3.7 (M191): the line under an answer that needs a person because the Upwork Profile lacks a fact. */
.answer-fact { margin: 0.25rem 0 0; }
/* Its "Add it" link is a 41 px target in the line (as .hint-link, both ways: two short words). */
.answer-fact a { display: inline-flex; align-items: center; min-height: var(--target); min-width: var(--target); }
/* FK.3.2 (M186): the chip under an answer ("Written before the Upwork Profile changed (rate)") wraps in the answer's
   column on a phone (401 px at 390 nowrap), as .facts-grid .status. */
.letter-answers .status { white-space: normal; }

/* UX-mcp PB */
/* UX-mcp MCP-1: the consent page's rows stand in one list (no action bar: Allow and Cancel stay in the form). */
.consent-rows { display: grid; gap: 0; margin: 0; padding: 0; border: 0; min-width: 0; }
/* end UX-mcp PB */

/* UX-mcp PC */
/* UX-mcp MCP-4: Connect Claude's phone line, first in its card. */
.claude-phone-first { font: var(--t-body-m); }

/* end UX-mcp PC */
/* W5a hand-send (l5, HS5; plan D5): the copy pack. The letter is cut to 8 lines under "Show all" (6 on a phone). At
   1440 the link row and the bid row stand side by side; at 1024 each Copy is under its value, full width; at 375 every
   button is full width and 44 px high, so the letter's Copy and step 2 end the first screen. */
.copy-pack .clamp:not(:has(input:checked)) > :first-child { max-height: calc(1.625rem * 8); }
.copy-pack-request { align-items: center; }
.copy-pack .row .btn { min-height: var(--target); }
/* W5b needs-me S2 x W5a hand-send: "Hand to someone else" belongs to the copy owner's line above it, so it sits
   close (0.5rem, not the stack's 1.25rem); this keeps the copy pack's bid row on the 1440 x 900 first screen. */
#copy-owner { gap: 0.5rem; }
@media (min-width: 72rem) {
  .copy-pack { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; }
  .copy-pack > * { grid-column: 1 / -1; }
  .copy-pack > #copy-pack-bid,
  .copy-pack > .row:has(> #copy-pack-link, > #copy-pack-title) { grid-column: auto; }
}
@media (min-width: 40rem) and (max-width: 71.99rem) {
  .copy-pack .row { flex-direction: column; align-items: stretch; gap: 0.25rem; }
  .copy-pack .row .btn { width: 100%; justify-content: center; }
}
@media (max-width: 39.99rem) {
  .copy-pack .clamp:not(:has(input:checked)) > :first-child { max-height: calc(1.625rem * 6); }
  .copy-pack .row { flex-direction: column; align-items: stretch; gap: 0.25rem; }
  .copy-pack .row .btn { width: 100%; min-height: 2.75rem; justify-content: center; }
  #copy-pack-sent { min-height: 2.75rem; }
}
/* W5b needs-me S5 (M7): System Health's delivery groups, one block each under the card's facts; Atlas's webhook
   address in "Fix the cause" wraps on a phone; the list's bulk bar is the sticky .action-bar. */
.delivery-group { padding-block-start: 0.75rem; border-block-start: 1px solid var(--outline-variant); min-width: 0; }
.delivery-group-line { margin: 0; font: var(--t-title-s); overflow-wrap: anywhere; }
.delivery-group-facts { margin: 0.25rem 0 0.5rem; padding-inline-start: 1.25rem; }
#atlas-webhook-address { overflow-wrap: anywhere; }
.bulk-bar { align-items: center; }

/* W5b SH-E H16b: an arm with no submitted jobs folds to one line on a phone; wider, its table row says it all. */
.arm-empty { display: none; }
@media (max-width: 39.99rem) {
  .arm-empty { display: block; padding: 0.5rem 0; }
  tr.arm-row-empty { display: none; }
}

/* ===== FK-U (Task 13) Upwork Profile page ===== */
/* FK.3.4: a saved profile's section forms: the refusal's own line above the fields, the notes under the fact fields,
   the ready-made questions of "Other answers" wrapping on a phone, the skipped jobs of a rewrite (D4). */
.section-problem { margin: 0 0 0.75rem; }
.fact-note { margin: 0.25rem 0 0; }
.ready-questions { flex-wrap: wrap; gap: 0.5rem; margin: 0 0 0.75rem; }
.rewrite-skipped ul { margin: 0.25rem 0 0; padding-inline-start: 1.25rem; }
.rewrite-skipped h2 { margin: 0; }
/* U3 (FK.3.1, FK.3.2): the asked and older-facts rows (each stacks on a phone); the rewrite's sheet scrolls as
   one (no nested scroll) (a .dialog is a bottom sheet on a phone). */
.asked-list, .older-list { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.asked-row, .older-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 0.75rem; min-width: 0; }
@media (max-width: 39.99rem) { .asked-row, .older-row { flex-direction: column; align-items: flex-start; } }
.dialog-sheet { max-height: calc(100dvh - 2rem); overflow-y: auto; }
.dialog-scroll { border: 0; padding: 0; margin: 0.5rem 0; display: grid; gap: 0.25rem; }
/* ===== end FK-U (Task 13) Upwork Profile page ===== */

/* ===== W25 T2 Settings > Skip reasons ===== */
/* One row per reason: the name takes the room left, On / Up / Down stand together beside it; on a phone (360 px) the
   name takes its own line and the three controls share the next. The always-on note is the row's last line. */
.skip-reason-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem 0.75rem; min-width: 0; }
.skip-reason-row > .field { flex: 1 1 14rem; min-width: 0; }
.skip-reason-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; flex: none; }
.skip-reason-note { flex: 1 1 100%; margin: 0; }
/* ===== end W25 T2 ===== */
