/* Hartsen — one stylesheet: the token layer, the patterns, the states, the chrome. Phone-first: Denver has no PC. */
/* ── The token layer: Direction 12, the chosen visual direction (CHAD-STATED Oct 25 18:15). Cream light canvas,
   navy dark canvas; every color, type size, space and radius below is a variable, and every rule after this block
   reads them. [BATCH_D D1] ── */
:root {
  /* Type: Helvetica-metric faces the viewer already has — the direction's bundled Nimbus Sans is AGPL-3 with an
     exception for PostScript/PDF only, so it isn't served from the app (the record, Batch D: the licensing call). */
  --font: Helvetica, Arial, "Nimbus Sans", "Nimbus Sans L", "Liberation Sans", sans-serif;
  /* Every text size is root-relative (rem): Direction 12's pixels on the browser's 16-px root (11 · 13 · 14 · 18 · 28),
     growing with the phone's or browser's text setting and the person's Larger text. Nothing pins the root in px.
     [CHAD-STATED — Oct 29 22:44 (question 15): "do we allow a font size change?"; DERIVED — the record's finding:
     every size was fixed pixels, so the phone's setting did nothing; BATCH_G G-D, the rem pass] */
  --type-xs: 0.6875rem; --type-sm: 0.8125rem; --type-base: 0.875rem; --type-lg: 1.125rem; --type-heading: 1.75rem;
  --line-height: 1.45;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px;
  --space-8: 32px; --space-10: 40px;
  --radius-panel: 3px; --radius-status: 2px; --radius-action: 999px; --radius-input: 3px;
  --control-size: 40px; --touch-size: 48px; --field-size: 56px;
  /* The light canvas. */
  --canvas: #f6f4ee; --surface: #fffefa; --surface-alt: #edf1f2; --ink: #23394c; --muted: #61727d; --line: #dcded8;
  --accent: #29495f; --on-accent: #ffffff; --tint: #e8eef0; --side: #fbfaf6;
  --chrome-bg: #1c3448; --chrome-ink: #fffefa; --chrome-muted: #cfdae0; --trim: #ae8c48;
  --success: #27734f; --warning: #86591d; --danger: #a73535; --info: #305e8a; --focus-ring: #356f99;
  /* The three soft spots, a shade or two deeper — the table head's words (4.38:1 → 5.7:1 on its grey) and a form
     box's outline (1.34:1 → 1.9:1): an experiment for Chad's read at the click; nothing else in the palette moves.
     [CHAD-STATED — Oct 29 22:44 (question 15): "a shade or two deeper would be a nice experiment"; BATCH_F2 F2-5;
     BATCH_D's record: "A deeper --muted-strong and a --field-line token are one line each"] */
  --muted-strong: #4f606b; --field-line: #b9bcb3;
  /* The ground a sign's picture stands on: art is drawn for white, so it is white on every canvas — never the
     canvas's own surface. [the finishing run, lane f0: the order's small picture] */
  --paper: #ffffff;
  /* The action colors: one color always means edit, one always means delete — D3's roles carried to every action
     (primary: go, add, save; secondary: quiet; edit; delete = danger), each readable on its own tint. [CHAD-STATED —
     Oct 28 V15 "one color always means edit, one always means delete… we deal with five-year-olds"] */
  --action-edit: #245d8f; --action-edit-tint: #e7eff6; --action-delete: var(--danger);
  --action-save-dirty: var(--success);
  color-scheme: light;
}
/* The dark canvas: chosen (data-theme="dark", the person's own setting), or the device's when they left it on System
   (no data-theme). */
:root[data-theme="dark"] {
  --canvas: #141e26; --surface: #1b2b37; --surface-alt: #243644; --ink: #eef3f5; --muted: #a8bac5; --line: #3b4e5c;
  --accent: #b5d0df; --on-accent: #213c4c; --tint: #304b5c; --side: #182833;
  --chrome-bg: #142b3d; --chrome-ink: #f0f5f6; --chrome-muted: #cfdae0; --trim: #cfb77e;
  --success: #91d4ad; --warning: #e1b970; --danger: #f0a39d; --info: #9bbce2; --focus-ring: #b4d5ee;
  --muted-strong: #bfced8; --field-line: #536979;     /* 6.2:1 → 7.7:1; 1.68:1 → 2.5:1 [BATCH_F2 F2-5] */
  --action-edit: #a9cdee; --action-edit-tint: #1f3a52; --action-delete: var(--danger);
  --action-save-dirty: var(--success);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #141e26; --surface: #1b2b37; --surface-alt: #243644; --ink: #eef3f5; --muted: #a8bac5; --line: #3b4e5c;
    --accent: #b5d0df; --on-accent: #213c4c; --tint: #304b5c; --side: #182833;
    --chrome-bg: #142b3d; --chrome-ink: #f0f5f6; --chrome-muted: #cfdae0; --trim: #cfb77e;
    --success: #91d4ad; --warning: #e1b970; --danger: #f0a39d; --info: #9bbce2; --focus-ring: #b4d5ee;
    --muted-strong: #bfced8; --field-line: #536979;
    --action-edit: #a9cdee; --action-edit-tint: #1f3a52; --action-delete: var(--danger);
    --action-save-dirty: var(--success);
    color-scheme: dark;
  }
}
/* High contrast — the person's own, on whichever canvas they read (data-contrast="more"): every grey and border
   deeper, one more value set on these tokens. Every word reads at 7:1 or more on every ground it sits on (the page,
   the panel, the table head, a chip's tint), every border and field outline at 3:1 or more; the dark canvas goes
   darker under whiter words. The brand's accent follows the same rule at 7:1 (hartsen.accent). [CHAD-STATED — Oct 29
   22:41–22:44 (question 15): "a 'High contrast' appearance beside Dark and Light, deepening every grey and border";
   "an option if its lightweight in code"; BATCH_G G-D; DERIVED — WCAG's enhanced 7:1 for words, 3:1 for outlines] */
:root[data-contrast="more"] {
  --surface-alt: #e9eef0; --tint: #e3ebee; --ink: #0d1d29; --muted: #36454f; --muted-strong: #2b3943;
  --line: #7f877e; --field-line: #596158; --accent: #1b3649;
  --success: #195236; --warning: #5e3d0f; --danger: #842222; --info: #1f466c; --focus-ring: #1d4e78;
}
:root[data-contrast="more"][data-theme="dark"] {
  --canvas: #0a1117; --surface: #111c25; --surface-alt: #1a2933; --tint: #253d4c; --side: #0e171f;
  --ink: #ffffff; --muted: #d5e0e6; --muted-strong: #e4ecf0; --line: #71889a; --field-line: #8ba1b1;
  --accent: #d3e6f0; --on-accent: #10202b;
  --success: #acebc6; --warning: #f3d396; --danger: #ffc0ba; --info: #bcd6f3; --focus-ring: #d6eaf8;
}
@media (prefers-color-scheme: dark) {
  :root[data-contrast="more"]:not([data-theme="light"]) {
    --canvas: #0a1117; --surface: #111c25; --surface-alt: #1a2933; --tint: #253d4c; --side: #0e171f;
    --ink: #ffffff; --muted: #d5e0e6; --muted-strong: #e4ecf0; --line: #71889a; --field-line: #8ba1b1;
    --accent: #d3e6f0; --on-accent: #10202b;
    --success: #acebc6; --warning: #f3d396; --danger: #ffc0ba; --info: #bcd6f3; --focus-ring: #d6eaf8;
  }
}
/* Larger text — the person's own: one notch on the root size, so every size written in rem grows with it, as it grows
   with the phone's or browser's own text setting. [CHAD-STATED — Oct 29 22:44: "we do have some older clients - do we
   allow a font size change?"; BATCH_G G-D "the switch: one notch on the base size"; DERIVED — the root size is the one
   line the rem pass makes every text size read] */
html[data-text="larger"] { font-size: 112.5%; }
/* The names the stylesheet used before the token layer, kept as aliases so nothing that still says them breaks. */
:root {
  --bg: var(--canvas); --panel: var(--surface); --accent-ink: var(--on-accent);
  --warn: var(--warning); --bad: var(--danger); --good: var(--success);
  --warn-bg: color-mix(in srgb, var(--warning) 11%, var(--surface));
  --bad-bg: color-mix(in srgb, var(--danger) 11%, var(--surface));
  --good-bg: color-mix(in srgb, var(--success) 11%, var(--surface));
}
/* ── The pattern pass (BATCH_D D3): the repeating shapes, styled once, every template inheriting — the direction's
   page heading, panel, table/queue row, buttons, status chips, fields with inline validation, key-values. The class
   names are the ones the templates already carry (card, pill, button, secondary, facts, errorlist…); Direction 12's own
   names (panel, status, btn, key-values, tabs, empty) are aliases, ready for the screens that come next. Content
   changes nothing: no words, fields or steps move. ── */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--canvas); }
body { margin: 0; background: var(--canvas); color: var(--ink); font: var(--type-base)/var(--line-height) var(--font);
  -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 1px; }
a { color: var(--accent); text-underline-offset: 3px; }
a, button { touch-action: manipulation; }
img { max-width: 100%; }
code { font: 0.75rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-alt);
  border: 1px solid var(--line); border-radius: 2px; padding: 0 4px; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-5) 0; }

/* 01 · Page heading: the title, then one muted line saying what the screen is for. */
h1 { font-size: var(--type-heading); line-height: 1.18; letter-spacing: -.6px; font-weight: 600; margin: 0 0 var(--space-5); }
h1 + p.muted, h1 + p.small, h1 + p.muted.small { margin-top: calc(-1 * var(--space-3)); margin-bottom: var(--space-5); }
h2 { font-size: var(--type-lg); line-height: 1.3; font-weight: 600; margin: var(--space-8) 0 var(--space-3); }
h3 { font-size: 0.9375rem; line-height: 1.35; font-weight: 600; margin: var(--space-5) 0 var(--space-2); }
#content > h1:first-child, #content > p.return-to + h1, #content > .notice + h1 { margin-top: 0; }
#content > .actions:first-child h1, .actions > h1 { margin: 0; }
/* A heading row (the title with its buttons beside it) keeps the heading's own space below it. */
.actions:has(> h1) { margin-bottom: var(--space-5); }
p { margin: 0 0 var(--space-3); }
p.return-to { margin: 0 0 var(--space-4); font-size: 0.75rem; }
.eyebrow { font-size: 0.625rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.3px; color: var(--muted);
  margin: 0 0 9px; }
.muted, .help { color: var(--muted); }
.small { font-size: 0.75rem; }

/* 02 · Panel / card: related things together; a restrained border gives the data structure without noise. */
.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel);
  padding: var(--space-5); margin: 0 0 18px; min-width: 0; }
.card > :first-child, .panel > :first-child { margin-top: 0; }
.card > :last-child, .panel > :last-child { margin-bottom: 0; }
.card > h2, .card > h3 { margin-top: var(--space-5); }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
a.card { color: inherit; }
a.card:hover { border-color: var(--accent); }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-panel); padding: 15px; margin: 0 0 18px; }
fieldset.card { padding: var(--space-5); }
legend { font-weight: 600; font-size: 0.8125rem; padding: 0 5px; }
details > summary { cursor: pointer; font-weight: 600; }
details.card > summary { margin: -2px 0; }
details.card[open] > summary { margin-bottom: var(--space-3); }
/* A placed order's Review tools, a disclosure drawn as a button, says whether it's open, as a summary's marker would.
   [BATCH_F2 F2-3 ruling 6 — the re-click's read] */
details.review-tools > summary { list-style: none; }
details.review-tools > summary::-webkit-details-marker { display: none; }
details.review-tools > summary::after { content: "▾"; font-size: .85em; }
details.review-tools[open] > summary::after { content: "▴"; }

/* 03 · Table / queue row: stable columns, the header row quiet and small, the row a target. */
.table-wrap { max-width: 100%; overflow-x: auto; position: relative; }   /* holds a hidden header's span inside */
table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; text-align: left; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.625rem; letter-spacing: .5px; text-transform: uppercase; font-weight: 600; color: var(--muted-strong); }
tr:first-child > th { background: var(--surface-alt); white-space: nowrap; }
/* A heading cell further down (a total, a statement's label) reads at the table's own size. */
tr:not(:first-child) > th { font-size: 0.8125rem; letter-spacing: 0; text-transform: none; color: var(--ink); }
tr:last-child > td, tr:last-child > th { border-bottom: 0; }
tr:hover > td { background: color-mix(in srgb, var(--tint) 45%, transparent); }
td.num, th.num, .numeric { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td .button, td button { min-height: 32px; padding: 6px 11px; font-size: 0.6875rem; }
.card.table-wrap { padding: 0; overflow-x: auto; }
.card.table-wrap > :not(table) { margin: var(--space-3) var(--space-4); }
.card.table-wrap > table:first-child tr:first-child > th:first-child { border-top-left-radius: var(--radius-panel); }
/* An empty table says so in its one row, plainly, centered. */
td.muted[colspan] { text-align: center; padding: 26px 18px; }

/* 04 · Action controls: the primary the strongest; secondary quiet; danger only where it destroys. */
button, .button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px;
  padding: 9px 17px; border: 1px solid var(--accent); border-radius: var(--radius-action); background: var(--accent);
  color: var(--on-accent); font-size: 0.8125rem; font-weight: 600; line-height: 1.3; text-decoration: none;
  text-align: center; cursor: pointer; vertical-align: middle; }
button.secondary, .button.secondary, .btn.secondary { background: var(--surface); color: var(--ink);
  border-color: var(--line); }
button.danger, .button.danger, .btn.danger { background: var(--danger); border-color: var(--danger);
  color: var(--surface); }
button:hover:not(:disabled), .button:hover, .btn:hover { filter: brightness(.96); }
button.secondary:hover:not(:disabled), .button.secondary:hover { border-color: var(--accent); filter: none; }
button:disabled { opacity: .52; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: var(--space-3); }
.actions > form { margin: 0; }
.actions:first-child, .card.actions, .row > .actions { margin-top: 0; }
/* A page's own form that ends on its Save: the section after it starts clear of the button. */
#content > form:not([class]) > .actions:last-child,
#content > form:not([class]) > div:not([class]):last-child > .actions:last-child { margin-bottom: var(--space-6); }

/* 05 · Informational status: words, never buttons; color supports the words. */
.pill, .status { display: inline-flex; align-items: center; gap: 5px; border-radius: var(--radius-status); border: 0;
  background: var(--tint); color: var(--accent); font-size: 0.6875rem; font-weight: 600; line-height: 1.4; padding: 3px 7px;
  white-space: nowrap; vertical-align: middle; letter-spacing: .1px; }
a.pill { text-decoration: none; }
a.pill:hover { text-decoration: underline; }
h1 .pill, h2 .pill { font-size: 0.6875rem; position: relative; top: -2px; margin-left: 4px; }
.status.success { background: color-mix(in srgb, var(--success) 11%, var(--surface)); color: var(--success); }
.status.warning { background: color-mix(in srgb, var(--warning) 11%, var(--surface)); color: var(--warning); }
.status.danger { background: color-mix(in srgb, var(--danger) 11%, var(--surface)); color: var(--danger); }
.status.neutral { background: var(--surface-alt); color: var(--muted); }

/* 06 · Field and inline validation: a label, the box, its help; a refused box says why right under it. */
form p, form div.field, .field { margin: 0 0 var(--space-4); min-width: 0; }
label { display: block; font-weight: 600; font-size: 0.8125rem; margin-bottom: 6px; }
label.inline { display: inline; font-weight: 400; font-size: inherit; margin: 0; }
label.inline.small { font-size: 0.75rem; }
/* A tick or a radio with its words moves to the next line as one; a sentence wraps inside its card, never past it. */
label.inline:has(> input[type=radio], > input[type=checkbox]) { display: inline-block; max-width: 100%;
  white-space: normal; vertical-align: top; margin-right: 14px; }
label.inline > input[type=radio], label.inline > input[type=checkbox] { margin-left: 2px; }
label.inline + label:not(.inline) { margin-top: var(--space-4); }
/* A choice's own label (a radio or a tick inside it) reads as the choice, not as a field's name. */
label:not(.inline):has(> input[type=radio], > input[type=checkbox]) { display: flex; align-items: center; gap: 2px;
  font-weight: 400; font-size: 0.875rem; margin: 0 0 6px; }
/* Django's whole-form render: each field its own block, spaced like a .field. */
form > div:not([class]):not([id]) { margin: 0 0 var(--space-4); }
/* Words straight after a bare box in a card start clear of it. */
.card > :is(select, textarea, input:not([type=hidden])) + p { margin-top: var(--space-3); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time],
input[type=search], input[type=url], input[type=tel], input:not([type]), select, textarea {
  width: 100%; min-width: 0; min-height: 41px; padding: 9px 11px; border: 1px solid var(--field-line);
  border-radius: var(--radius-input); background: var(--surface); color: var(--ink); font-size: 0.875rem; }
textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
select { padding-right: 28px; }
/* A list's rows carry the canvas's own pair, never the inherited ink over a surface the platform paints: on the dark
   canvas an option or a group's name left transparent took the light ink onto the popup's light surface — Windows
   Chrome's — and read as empty rows (V53). Every select, grouped or not, both canvases. [CHAD-STATED — Oct 29
   23:05–23:17, V53 (the blank "Usual material" rows); BATCH_F2 F2-8 "a select nobody can read is a refusal with no
   words"] */
select option, select optgroup { background-color: var(--surface); color: var(--ink); }
select option:disabled { color: var(--muted); }
input[type=file] { font-size: 0.75rem; max-width: 100%; }
/* A file name is read whole, never cut short: it wraps anywhere, hyphens or not; under a chooser the whole names are
   written out (static/file_names.js) and the chooser's own cut-short copy is hidden. [CHAD-STATED — Oct 28 V24] */
.file-name, .file-chosen { overflow-wrap: anywhere; word-break: break-word; white-space: normal; }
.file-chosen { display: block; margin-top: 4px; color: var(--muted-strong); }
input[type=file].names-below { color: transparent; }
input[type=file]::file-selector-button { font: inherit; font-size: 0.75rem; font-weight: 600; padding: 7px 14px;
  margin-right: 10px; border: 1px solid var(--line); border-radius: var(--radius-action); background: var(--surface);
  color: var(--ink); cursor: pointer; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; margin: 0 6px 0 0; vertical-align: -3px;
  accent-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[readonly] { color: var(--muted); background: var(--surface-alt); }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.helptext, .field .help { display: block; font-size: 0.75rem; line-height: 1.5; color: var(--muted); margin-top: 4px; }
/* A field's own error (Django gives it the field's id): small, in the danger color, beside its box. */
ul.errorlist { list-style: none; margin: 6px 0 10px; padding: 0; color: var(--danger); font-size: 0.75rem; line-height: 1.5; }
ul.errorlist li + li { margin-top: 3px; }
/* A form's own refusal — the list at its top, or a "why" list — reads as a refusal block. */
ul.errorlist:not([id]) { padding: 12px 16px; border: 1px solid var(--line); border-left: 3px solid var(--danger);
  background: var(--surface); color: var(--ink); font-size: 0.8125rem; border-radius: var(--radius-panel); margin: 0 0 var(--space-4); }
ul.errorlist:not([id]) li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 8px 2px 0;
  border-radius: 50%; background: var(--danger); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 16px; }
.row > div, .row > .field { min-width: 0; }
/* A settings screen's boxes, each at least 14rem where there's room — four across on a desktop, one on a phone — never a
   14rem box squeezed into a 150px column (they overlapped at 1280 and pushed a phone sideways at 390: Sign rules, Address
   lookup, Process numbers, Clocks). [DERIVED — BATCH_F2 F2-7, the smoke; Direction 12 "no sideways page scroll"] */
.row.row-wide { grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); }
/* K4, the Hardware pool (V60): the description column bounded at 20rem and wrapping; the terms one labelled row left to
   right — each label above its box on one line, the boxes a steady width — wrapping only where the screen can't hold
   the row, and on a phone the table stacks (table.stacks, below) with one box per line, as .row-wide does. [CHAD-STATED
   — Oct 30 20:14 V60; BATCH_K K4; PROPOSAL — the numbers: the 20rem column, the 7.5rem boxes] */
table.pool-types th.pool-type, table.pool-types td.pool-type { width: 20rem; max-width: 20rem; }
.terms-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3) var(--space-4); }
.terms-row > .field { flex: 0 0 7.5rem; margin: 0; }
.terms-row > .field > label { white-space: nowrap; font-size: 0.75rem; }
@media (max-width: 43.75rem) {
  table.pool-types th.pool-type, table.pool-types td.pool-type { width: auto; max-width: none; }
  .terms-row > .field { flex: 1 1 100%; }
}

/* 07 · Review summary and 12 · key-values: the facts in two quiet columns. */
dl.facts, .key-values { display: grid; grid-template-columns: minmax(110px, max-content) minmax(0, 1fr);
  gap: 10px 18px; margin: 0; font-size: 0.8125rem; }
dl.facts dt, .key-values dt { color: var(--muted); }
dl.facts dd, .key-values dd { margin: 0; overflow-wrap: anywhere; }
ol.stack { margin: var(--space-1) 0; padding-left: 1.25rem; }
figure { margin: 0 0 var(--space-4); }
figcaption { margin-top: var(--space-2); }

/* 10 · Tabs, for the screens that adopt them. */
.tabs { display: flex; align-items: center; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line);
  margin-bottom: var(--space-5); }
.tab { flex: none; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted);
  padding: 12px 15px; min-height: 43px; font-size: 0.8125rem; text-decoration: none; border-radius: 0; font-weight: 400; }
.tab[aria-selected="true"], .tab.active, .tab[aria-current] { color: var(--accent); font-weight: 600;
  border-bottom-color: var(--accent); }
a.tab:hover { color: var(--ink); border-bottom-color: var(--line); }
/* The company setup's steps: the tabs under the heading, Next › at the step's foot, clear of its forms. [BATCH_G G-D,
   V46] */
.setup-tabs { margin-top: var(--space-4); }
.actions.setup-next { margin-top: 1.5rem; padding-top: var(--space-4); border-top: 1px solid var(--line); }

/* 11 · Timeline, for the screens that adopt it. */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 0 0 19px 20px; border-left: 1px solid var(--line); position: relative; font-size: 0.8125rem; }
.timeline li::before { content: ""; position: absolute; left: -4px; top: 5px; width: 7px; height: 7px;
  background: var(--trim); border-radius: 50%; }

/* 08 · Focused dialog and 12 · stat tiles, for the screens that adopt them (none uses a dialog today: every
   confirmation is a page or a panel, as the campaign built them). */
dialog { width: min(650px, calc(100vw - 28px)); max-height: 88vh; overflow: auto; padding: 0; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 25px 90px #0005; }
dialog::backdrop { background: #07172270; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px;
  margin-bottom: var(--space-6); }
.metric { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-panel); padding: 16px 18px; }
.metric > span { display: block; color: var(--muted); font-size: 0.6875rem; }
.metric strong { display: block; font-size: 1.6875rem; line-height: 1.25; margin: 6px 0; font-weight: 400; letter-spacing: -.7px;
  font-variant-numeric: tabular-nums; }

/* A segmented choice (the map's states, a day strip): the current one pressed. */
.actions > .here, .actions > span.here { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 12px;
  border-radius: var(--radius-action); background: var(--tint); color: var(--accent); }

/* The select-then-act pattern (CHAD-STATED Oct 26 17:40: row checkboxes, select-all, an action bar that appears
   with a selection — the WordPress-plugins shape). Its look, defined once; screens adopt it with their own batches:
   a table.select-many with a checkbox cell (td.select / th.select for select-all) and a .bulk-bar in the same form,
   which shows itself the moment anything is ticked. [BATCH_D D3] */
table.select-many th.select, table.select-many td.select { width: 40px; padding-right: 0; }
table.select-many tr:has(> td.select input:checked) > td { background: var(--tint); }
.bulk-bar { display: none; position: sticky; bottom: var(--space-3); z-index: 15; align-items: center; flex-wrap: wrap;
  gap: 10px 14px; margin: var(--space-3) 0; padding: 12px 16px; background: var(--chrome-bg); color: var(--chrome-ink);
  border-radius: var(--radius-panel); box-shadow: 0 10px 30px #0003; }
form:has(.select-many td.select input:checked) .bulk-bar, .bulk-bar.open { display: flex; }
.bulk-bar .bulk-count { font-weight: 600; margin-right: auto; }
.bulk-bar select { width: auto; min-height: 36px; }
.bulk-bar button.secondary { background: transparent; color: var(--chrome-ink); border-color: #ffffff66; }

/* Maps and pictures: the same quiet frame. A map keeps its own layers to itself (isolation): Leaflet's panes (z-index
   400) and controls (1000) stack inside the map, so they scroll under the order page's sticky tabs (.record-tabs, z 2)
   instead of painting over them. [DERIVED — the review: the Placement tab's map over the tab row] */
.map { height: 360px; border-radius: var(--radius-panel); border: 1px solid var(--line); margin-bottom: var(--space-3);
  isolation: isolate; }
/* Placement on a photo of the spot */
.photo-canvas { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-panel);
  cursor: crosshair; touch-action: manipulation; }
.photo-line { position: relative; display: block; }
.photo-line img { width: 100%; display: block; border-radius: var(--radius-panel); }

@media (max-width: 700px) {
  h1 { font-size: 1.5625rem; }
  .card, .panel { padding: 17px; }
  button, .button, .btn { min-height: 46px; }
  input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time],
  input[type=search], input[type=url], input[type=tel], input:not([type]), select, textarea { font-size: 1rem; min-height: 46px; }
  th, td { padding-left: 12px; padding-right: 12px; }
  .table-wrap > table, .card.table-wrap > table { min-width: 550px; }
  /* A two-column money summary (an invoice's Amount) fits a phone as it is: its figures stay in view. [BATCH_E1] */
  .table-wrap > table.fits, .card.table-wrap > table.fits { min-width: 0; }
}
/* ── The states, dressed (BATCH_D D4): the candidate's six treatments on what the campaign already built. The words
   are the campaign's; this gives them the design. ── */
/* A notice: one bordered block, its left rule saying what kind. Bare — ordinary progress, never a warning (A10). */
.notice { padding: 14px 18px; border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: var(--surface); color: var(--ink); border-radius: var(--radius-panel); margin: 0 0 var(--space-4);
  font-size: 0.8125rem; line-height: 1.6; }
.notice > :last-child { margin-bottom: 0; }
.notice a { font-weight: 600; }
.notice.small { padding: 9px 13px; font-size: 0.75rem; }
span.notice { display: inline-block; padding: 3px 9px; margin: 0; }
.notice.ok { border-left-color: var(--success); }
.notice.warn { border-left-color: var(--warning); }
.notice.error { border-left-color: var(--danger); }
/* messages.info — the "already your Site; using it" kind: informational, its own color. [Batch A's leftover] */
.notice.info { border-left-color: var(--info); }
/* A · Refusal with its fix: the reason in plain words, the fix a link that brings you back (F30). */
.notice.error a, .notice.warn a { text-decoration-thickness: 1.5px; }
/* C · Page-level success (A5): the page says what changed and what happens next, and the words stay. */
section.notice { padding: 20px 22px; margin-bottom: var(--space-5); font-size: 0.875rem; }
section.notice > strong:first-child { display: block; font-size: 1.1875rem; line-height: 1.3; letter-spacing: -.2px;
  margin-bottom: 6px; color: var(--ink); }
section.notice > p { color: var(--muted); margin: 6px 0 0; }
section.notice .actions { margin-top: var(--space-4); }
section.notice form { margin-top: var(--space-3); }
/* D · The interrupt (F63): an uncertain pin — or any box that must be acknowledged before going on — is impossible
   to miss: the whole block in the warning color, its reason as a heading, its tick large. */
.notice[role="alert"], .notice.warn:has(> label.inline input[type=checkbox]) {
  border: 1px solid var(--warning); border-left-width: 4px; padding: 16px 18px;
  background: color-mix(in srgb, var(--warning) 8%, var(--surface)); }
.notice[role="alert"] > strong:first-child { display: block; font-size: 0.9375rem; line-height: 1.4; margin-bottom: 8px; }
.notice[role="alert"] input[type=checkbox], .notice.warn > label.inline input[type=checkbox] { width: 21px; height: 21px; }
/* E · The consequences confirm: what will happen is said beside the button that does it. */
.confirm { padding: 16px 18px; border: 1px solid var(--line); border-left: 3px solid var(--warning);
  background: var(--surface-alt); border-radius: var(--radius-panel); margin: var(--space-3) 0 var(--space-4); }
.confirm > p.muted, .confirm > .muted { color: var(--ink); }
.confirm .actions { margin-top: var(--space-3); }
/* B · Empty, with the next step: the empty thing said kindly, the next action right under it. */
.empty, div.card.muted { padding: 28px 22px; text-align: center; background: var(--surface); color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--radius-panel); }
.empty .actions, div.card.muted .actions { justify-content: center; }
p.empty, div.empty { margin: 0 0 var(--space-4); }
.card > .empty:last-child, .card > p.empty:last-child { margin-bottom: 0; }
/* F · Calm progress: production started, the crew is out, waiting on the client — a bare notice (the accent's calm
   rule above) or plain muted words; never the warning color. */
/* The line icons of Direction 12's chrome, as masks painted in the text's own color. "inbox" is the architect's, in
   the same hand. [BATCH_D D2] */
[data-icon="home"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10 12 3l9 7v11H3Z'/%3E%3Cpath d='M9 21v-8h6v8'/%3E%3C/svg%3E"); }
[data-icon="orders"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='M8 8h8M8 12h8M8 16h5'/%3E%3C/svg%3E"); }
[data-icon="designs"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='1'/%3E%3Cpath d='m3 15 5-5 5 5 3-3 5 5'/%3E%3Ccircle cx='16' cy='8' r='1'/%3E%3C/svg%3E"); }
[data-icon="sites"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12S4 16 4 10a8 8 0 0 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E"); }
[data-icon="production"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21V9l6 3V7l6 3V3h6v18Z'/%3E%3Cpath d='M7 17h1m4 0h1m4 0h1'/%3E%3C/svg%3E"); }
[data-icon="routing"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='5' r='2'/%3E%3Ccircle cx='18' cy='19' r='2'/%3E%3Cpath d='M8 5h7a4 4 0 0 1 0 8H9a3 3 0 0 0 0 6h7'/%3E%3C/svg%3E"); }
[data-icon="field"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 16h18v5H3ZM5 16V8h14v8M8 8V4h8v4M9 4v4m6-4v4'/%3E%3C/svg%3E"); }
[data-icon="clients"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='7' r='3'/%3E%3Cpath d='M2 21v-3a7 7 0 0 1 14 0v3M16 4a3 3 0 0 1 0 6m3 11v-3a7 7 0 0 0-2-5'/%3E%3C/svg%3E"); }
[data-icon="inventory"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 7 9-4 9 4v13H3Z'/%3E%3Cpath d='M3 7h18M8 12h8v8'/%3E%3C/svg%3E"); }
[data-icon="invoices"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h14v18l-3-2-4 2-4-2-3 2Z'/%3E%3Cpath d='M9 8h6m-6 4h6m-6 4h3'/%3E%3C/svg%3E"); }
[data-icon="reports"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 3v18h17M8 17v-5m5 5V7m5 10v-8'/%3E%3C/svg%3E"); }
[data-icon="settings"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M10 2h4l1 4 4-1 2 4-3 3 3 3-2 4-4-1-1 4h-4l-1-4-4 1-2-4 3-3-3-3 2-4 4 1Z'/%3E%3C/svg%3E"); }
[data-icon="search"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m16 16 5 5'/%3E%3C/svg%3E"); }
[data-icon="plus"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v16M4 12h16'/%3E%3C/svg%3E"); }
[data-icon="menu"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E"); }
[data-icon="approvals"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h14v18H5Z'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E"); }
[data-icon="store"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8h18l-2-5H5ZM5 8v13h14V8M9 21v-8h6v8'/%3E%3C/svg%3E"); }
[data-icon="inbox"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 13h5l1 3h6l1-3h5'/%3E%3Cpath d='M5 5h14l2 8v6H3v-6Z'/%3E%3C/svg%3E"); }
:root { --icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m16 16 5 5'/%3E%3C/svg%3E"); }
/* ── The base chrome (BATCH_D D2): Direction 12's navy top bar with the prominent global search and the New order
   action; staff get the grouped sidebar ("Your work", "Business", Settings at the foot), a client's portal the
   brand-led bar and its tab row. Every nav entry keeps its own markup (a link, or the dead marker on its own page —
   A10(f)) inside a wrapper that carries the look and the icon. ── */
.skip-link { position: absolute; left: var(--space-4); top: -80px; z-index: 100; background: var(--surface);
  color: var(--ink); padding: var(--space-3); }
.skip-link:focus { top: var(--space-2); }

.app-header { display: flex; align-items: center; gap: var(--space-5); min-height: 70px; padding: 10px 25px 10px 23px;
  background: var(--chrome-bg); color: var(--chrome-ink); position: relative; z-index: 20; }
.app-header a { color: inherit; }
.app-brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; flex-shrink: 0;
  min-width: 0; }
/* The mark wears the brand's first color over a bar in its second, where that reads (hartsen.accent.bar). [BATCH_G G-D] */
.brand-mark { width: 31px; height: 35px; flex: none; border: 1px solid var(--mark, var(--trim));
  color: var(--mark, var(--trim)); display: grid; place-items: center; font-size: 1.4375rem; line-height: 1; }
.brand-copy strong { display: block; font-size: 1.0625rem; font-weight: 400; letter-spacing: 2.2px; line-height: 1.1;
  text-transform: uppercase; }
.brand-copy small { display: block; margin-top: 5px; font-size: 0.5625rem; letter-spacing: 1.5px; color: var(--chrome-muted);
  text-transform: uppercase; }

/* The search: a wide box in the bar, labelled in words — never only a magnifying glass. [CHAD-STATED — Oct 24 17:45] */
form.global-search { display: flex; align-items: center; gap: var(--space-2); flex: 1; max-width: 580px; min-width: 200px;
  height: 42px; margin: 0 0 0 auto; padding: 0 4px 0 11px; background: var(--surface); color: var(--muted);
  border: 1px solid var(--line); border-radius: var(--radius-status); }
form.global-search:focus-within { outline: 2px solid var(--chrome-ink); outline-offset: 2px; }
form.global-search label { display: flex; align-items: center; gap: 7px; margin: 0; font-size: var(--type-xs);
  font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
form.global-search label::before { content: ""; width: 17px; height: 17px; background: currentColor;
  -webkit-mask: var(--icon-search) center / contain no-repeat; mask: var(--icon-search) center / contain no-repeat; }
form.global-search input[type=text] { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none;
  background: none; color: var(--ink); font-size: var(--type-sm); }
form.global-search kbd { font: 0.625rem var(--font); padding: 2px 5px; border: 1px solid var(--line); border-radius: 3px;
  color: var(--muted); white-space: nowrap; }
form.global-search button { min-height: 32px; padding: 4px 12px; font-size: var(--type-xs); }

/* The New order action in the bar: the cream pill on navy. */
.header-action { flex-shrink: 0; }
.app-brand + .header-action, .app-brand + .header-link, .app-brand + details.account { margin-left: auto; }
.header-action > a, .header-action > span, .header-action button { display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 9px 15px; border: 0; border-radius: var(--radius-action); background: #f4eddc;
  color: #233b4e; font-size: 0.75rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.header-action > a::before, .header-action > span::before, .header-action button::before { content: ""; width: 15px;
  height: 15px; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat; }
.header-action > span { opacity: .8; }
.header-action form { margin: 0; }
.header-link { flex-shrink: 0; }
.header-link > a, .header-link > span { color: var(--chrome-ink); font-size: 0.75rem; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px; }
.header-link { display: inline-flex; align-items: center; gap: 6px; }
/* The unread count: the trim lifted toward the bar's ink, so the navy number reads on it (4.5:1+) on both canvases;
   on a brand's second-color bar, the pill hartsen.accent.bar() gives (--pill-bg / --pill-ink), readable by its rule. */
.header-link .pill { background: var(--pill-bg, color-mix(in srgb, var(--trim) 55%, var(--chrome-ink)));
  color: var(--pill-ink, var(--chrome-bg));
  min-width: 18px; justify-content: center; border-radius: var(--radius-action); padding: 1px 6px; }

/* The person menu: who's signed in; their appearance; sign out. A <details>: no script. */
details.account { position: relative; flex-shrink: 0; }
details.account > summary { display: flex; align-items: center; gap: 9px; list-style: none; cursor: pointer;
  padding: 4px; border-radius: var(--radius-action); }
details.account > summary::-webkit-details-marker { display: none; }
details.account > summary:focus-visible { outline: 3px solid var(--chrome-ink); outline-offset: 2px; }
.app-header > .app-brand:focus-visible, .app-header .header-action :focus-visible, .app-header .header-link a:focus-visible,
.app-header .menu-toggle:focus-visible, .skip-link:focus-visible { outline-color: var(--chrome-ink); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #ffffff1c;
  color: var(--chrome-ink); font-size: 0.6875rem; font-weight: 600; flex: none; }
.account-copy strong, .account-copy small { display: block; font-size: 0.6875rem; line-height: 1.3; max-width: 160px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy small { font-size: 0.5625rem; color: var(--chrome-muted); margin-top: 2px; }
.account-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px; padding: var(--space-3);
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-panel);
  box-shadow: 0 16px 40px #0003; display: grid; gap: var(--space-2); z-index: 40; }
.account-menu .nav-item { min-height: 36px; }
.account-who { display: none; padding: 2px 8px 6px; }
.account-who strong, .account-who span { display: block; }
.account-menu hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-1) 0; width: 100%; }
.account-menu form { margin: 0; }
.account-menu .sign-out button { width: 100%; }

/* The appearance switcher, in the person menu. */
form.appearance { display: grid; gap: 4px; margin: 0; }
/* The three canvases, one pill; High contrast and Larger text under it, a row each. [BATCH_G G-D] */
form.appearance .appearance-canvas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px;
  border: 1px solid var(--line); border-radius: var(--radius-action); }
form.appearance .appearance-label { grid-column: 1 / -1; font-size: 0.625rem; font-weight: 600; letter-spacing: .8px;
  text-transform: uppercase; color: var(--muted); padding: 2px 8px 4px; }
form.appearance button { min-height: 32px; padding: 4px 8px; font-size: var(--type-xs); font-weight: 600;
  background: transparent; color: var(--muted); border: 0; border-radius: var(--radius-action); }
form.appearance button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
/* High contrast and Larger text: a row each under the canvases, the switch's state at its end. [BATCH_G G-D] */
form.appearance .appearance-switch { justify-content: space-between; padding-inline: 0.875rem;
  border: 1px solid var(--line); }
form.appearance .appearance-switch > span { font-weight: 400; }

/* Nav entries, everywhere: the wrapper carries the look; the link (or the dead marker) inside is the A10(f) markup. */
.nav-item { display: flex; align-items: stretch; }
.nav-item > a, .nav-item > span { display: flex; align-items: center; gap: 10px; flex: 1; min-height: 37px;
  padding: 8px 12px; color: var(--muted); text-decoration: none; font-size: 0.8125rem; border-left: 2px solid transparent; }
.nav-item[data-icon] > a::before, .nav-item[data-icon] > span:not(.pill)::before,
.header-link[data-icon] > a::before, .header-link[data-icon] > span:not(.pill)::before { content: ""; flex: none; width: 18px;
  height: 18px; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat; }
.nav-item > a:hover { background: var(--tint); color: var(--ink); }
.nav-item > .here { border-left-color: var(--trim); color: var(--ink); font-weight: 600; }
.nav-item.nav-sub > a, .nav-item.nav-sub > span { min-height: 30px; padding: 5px 12px 5px 40px; font-size: 0.75rem; }
.nav-item.nav-label > span { cursor: default; }

/* The staff sidebar. */
.side-nav { background: var(--side); border-right: 1px solid var(--line); padding: 22px 13px 16px;
  display: flex; flex-direction: column; gap: 19px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-heading { font-size: 0.625rem; font-weight: 600; letter-spacing: 1.1px; text-transform: uppercase; color: var(--muted);
  margin: 0 13px 6px; }
.nav-bottom { margin-top: auto; display: grid; gap: 4px; }
.nav-company { padding: 13px 12px 0; margin-top: 12px; border-top: 1px solid var(--line); font-size: 0.6875rem;
  color: var(--muted); }
.nav-company strong { display: block; color: var(--ink); font-size: 0.75rem; margin-bottom: 3px; }
.nav-close, .menu-toggle { display: none; }

/* The staff page: the bar across the top, the sidebar down the left, the page beside it. */
body.with-nav { display: grid; grid-template-columns: 208px minmax(0, 1fr); grid-template-rows: auto 1fr;
  min-height: 100vh; }
body.with-nav > .app-header { grid-column: 1 / -1; grid-row: 1; }
body.with-nav > .side-nav { grid-column: 1; grid-row: 2; }
body.with-nav > main { grid-column: 2; grid-row: 2; }

/* The portal: the brand's bar, then its tabs. */
.portal-nav { display: flex; align-items: stretch; gap: 22px; padding: 0 30px; min-height: 46px;
  background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.portal-nav .nav-item > a, .portal-nav .nav-item > span { min-height: 46px;
  padding: 0 2px; gap: 7px; border-left: 0; border-bottom: 2px solid transparent; font-size: 0.8125rem; white-space: nowrap;
  color: var(--muted); background: none; border-radius: 0; font-weight: 400; }
.portal-nav .nav-item > a:hover { background: none; color: var(--accent); }
.portal-nav .nav-item > .here { color: var(--accent);
  border-bottom-color: var(--accent); font-weight: 600; }
.portal-nav .nav-end { margin-left: auto; }

/* The production floor and the field: bigger targets — gloves, sunlight. [UX_SCREENS: four audiences] */
body.area-field, body.area-production { font-size: 1rem; }
body.area-field main button, body.area-field main .button, body.area-field main select,
body.area-field main input:not([type=checkbox]):not([type=radio]),
body.area-production main button, body.area-production main .button, body.area-production main select,
body.area-production main input:not([type=checkbox]):not([type=radio]) { min-height: var(--field-size); }
/* Every word they read or press at 16px — the notes, the labels, the links, the controls each set a smaller size
   of their own above, so the body's 16px alone doesn't reach them — and the buttons wide enough to hit. */
body.area-field main :is(label, .small, small, a, button, .button, input, select, textarea),
body.area-production main :is(label, .small, small, a, button, .button, input, select, textarea) { font-size: 1rem; }
body.area-field main :is(button, .button), body.area-production main :is(button, .button) { padding-inline: 24px; }

main { min-width: 0; }
body.with-nav > main { padding: 26px; }
body:not(.with-nav) > main { max-width: 1180px; margin: 0 auto; padding: 28px 30px 36px; }

@media (max-width: 1150px) {
  .account-copy { display: none; }
  .account-who { display: block; }
  .app-header { gap: var(--space-3); }
  body.with-nav { grid-template-columns: 186px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .app-header { flex-wrap: wrap; row-gap: 10px; }
  .app-brand { flex: 1; min-width: 0; }
  .brand-copy { min-width: 0; overflow: hidden; }
  .brand-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  form.global-search { order: 10; flex-basis: 100%; max-width: none; margin: 0; }
}
@media (max-width: 850px) {
  .app-header { padding: 12px 17px; }
  form.global-search kbd { display: none; }
  .header-action > a, .header-action > span, .header-action button { padding: 9px 11px; }
}
/* Phone: the bar stacks — brand, then the search across, the sidebar behind Menu (a link to it: no script). */
@media (max-width: 700px) {
  .app-header { flex-wrap: wrap; gap: 10px 12px; padding: 12px 16px; }
  .app-brand { flex: 1; min-width: 0; }
  .brand-copy { min-width: 0; overflow: hidden; }
  /* The New order action keeps its words for screen readers and shows its + on a phone. */
  .header-action > a, .header-action > span, .header-action button { font-size: 0; gap: 0; padding: 10px 12px; }
  .header-action > a::before, .header-action > span::before, .header-action button::before { width: 18px; height: 18px; }
  .header-link > a, .header-link > span { font-size: 0; gap: 4px; }
  .header-link .pill { font-size: 0.6875rem; }
  .brand-copy strong { font-size: 0.9375rem; letter-spacing: 1.6px; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; }
  form.global-search { order: 10; flex-basis: 100%; max-width: none; margin: 0; height: 46px; }
  form.global-search input[type=text] { font-size: 1rem; }
  .header-action .label-long { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 12px;
    border: 1px solid #ffffff66; border-radius: var(--radius-input); color: var(--chrome-ink); text-decoration: none;
    font-size: 0.75rem; font-weight: 600; }
  body.with-nav { display: block; }
  body.with-nav > main, body:not(.with-nav) > main { padding: 22px 16px 28px; }
  .side-nav { display: none; }
  .side-nav:target { display: flex; border-right: 0; border-bottom: 1px solid var(--line); padding-top: 12px; }
  .side-nav:target .nav-close { display: flex; justify-content: flex-end; }
  .nav-close a { padding: 10px 14px; font-weight: 600; text-decoration: none; }
  /* The portal's tabs are the bottom bar on a phone (.bottom-bar, at the end of this file — BATCH_Q Q1): the tab row
     isn't drawn, and the Menu row that opened it (Oct 29 22:39) is gone. The staff side keeps its Menu. */
  .portal-nav { display: none; }
  .account-menu { position: fixed; left: 12px; right: 12px; top: auto; }
}
/* The Store: a grid of tiles — the picture on white (art is drawn for white), the name, the size, the price — a
   product's page with its picture beside what it says and its options, and the cart's small pictures. Phone first: one
   column of tiles at 390, as many as fit after. [CHAD-STATED — Oct 30 09:11 "like a WooCommerce product page… or an
   Amazon style store"; BATCH_G G-D] */
.store-head { justify-content: space-between; }
.store-head + p.muted { margin-bottom: 1.25rem; }
.store-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(13.5rem, 100%), 1fr)); }
.store-tile > a { display: flex; flex-direction: column; gap: 0.25rem; height: 100%; padding: 0.75rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); color: var(--ink);
  text-decoration: none; }
.store-tile > a:hover { border-color: var(--accent); }
.store-picture { display: grid; place-items: center; aspect-ratio: 4 / 3; margin-bottom: 0.5rem; background: #fff;
  border-radius: var(--radius-panel); overflow: hidden; }
.store-picture img { width: 100%; height: 100%; object-fit: contain; }
.store-name { font-weight: 600; font-size: 0.9375rem; line-height: 1.3; }
.store-price { font-size: 1.125rem; font-weight: 600; color: var(--ink); margin-top: auto; padding-top: 0.25rem; }
p.store-price { margin: 0 0 1rem; }
.store-product { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
.store-product-picture { display: grid; gap: 0.75rem; }
.store-product-picture img { width: 100%; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-panel); }
.store-product-picture figure.store-live { max-width: 60%; }
.store-product-buy h1 { margin-bottom: 0.5rem; }
.store-product-buy h1 + p { margin-top: 0; }
.store-description { margin: 0 0 1rem; }
.store-thumb { width: 4.5rem; }
.store-thumb img { display: block; width: 4rem; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-status); }
img.store-thumb-staff { display: block; max-width: 12rem; margin-bottom: 0.5rem; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-panel); }
@media (max-width: 700px) {
  .store-grid { grid-template-columns: repeat(auto-fill, minmax(min(9.5rem, 100%), 1fr)); gap: 0.75rem; }
  .store-tile > a { padding: 0.5rem; }
  .store-product { grid-template-columns: minmax(0, 1fr); }
  .store-product-picture figure.store-live { max-width: none; }
}

/* ── Batch G, G-B — the client record and people. ── */
/* The action colors (V15), on the buttons: an edit always the edit blue on its tint; a delete always the danger red; a
   Save whose box changed turns green (V8, the client record's credit rows only). */
button.edit, .button.edit { background: var(--action-edit-tint); color: var(--action-edit);
  border-color: var(--action-edit); }
button.edit:hover, .button.edit:hover { filter: none; border-width: 1px; text-decoration: underline; }
button.delete, .button.delete { background: var(--action-delete); border-color: var(--action-delete);
  color: var(--surface); }
button.dirty, .button.dirty { background: var(--action-save-dirty); border-color: var(--action-save-dirty);
  color: var(--surface); }
button.small, .button.small { min-height: 32px; padding: 5px 13px; font-size: 0.75rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; }
td.row-action { text-align: right; white-space: nowrap; width: 1%; }
/* V3: the record's tabs stay in view at the top of what they switch. */
.record-tabs { position: sticky; top: 0; z-index: 2; background: var(--canvas); }
.tab-panel > :first-child > h2:first-child, .tab-panel > div:first-child > h2:first-child { margin-top: 0; }
/* K2: a panel that opens on its own heading starts at the tabs; a section a link lands on clears the tabs held at the
   top. The order page's head — the status card beside the as-built, side by side where each has 24rem, one above the
   other on a phone; several signs' pictures side by side where each has 14rem; no picture, no empty column. [DERIVED —
   BATCH_K K2 "the as-built and the status card above the tabs on every tab"; PROPOSAL — the numbers: 24rem, 14rem] */
.tab-panel > h2:first-child { margin-top: 0; }
/* The order's history: a line wraps anywhere, so a print file's unbroken name never pushes the page sideways at 390.
   [DERIVED — "nothing pushes a page sideways at 390"; the page sweep on the Batch K merge] */
.history-lines { overflow-wrap: anywhere; }
.tab-panel [id] { scroll-margin-top: 3.5rem; }
.order-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(24rem, 100%), 1fr)); gap: var(--space-4);
  align-items: start; margin-bottom: var(--space-4); }
.order-head > .card { margin: 0; min-width: 0; }
.order-head-art { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  gap: var(--space-4); align-items: start; min-width: 0; }
.order-head-art:not(:has(figure, #confirm-as-shown)) { display: none; }
.order-head-art > figure { margin-top: 0 !important; }      /* level with the status card beside it */
/* V12: the add-person success, Chad's sentence large, the name bold within it. */
section.notice > strong.said { font-weight: 400; }
section.notice > strong.said b { font-weight: 700; }
ul.said-list { margin: 6px 0 0; padding-left: 1.2rem; color: var(--ink); }
code.once { font-size: 1.05em; padding: 2px 8px; letter-spacing: .5px; user-select: all; }
/* V9: the person's Active switch, a pill: green while on. */
label.switch-pill { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 5px 12px 5px 8px;
  border: 1px solid var(--field-line); border-radius: var(--radius-action); font-weight: 600; cursor: pointer; }
label.switch-pill:has(input:checked) { background: color-mix(in srgb, var(--success) 12%, var(--surface));
  border-color: var(--success); color: var(--success); }
/* V10: roles and permissions — a box with every option visible, one tick or many. */
fieldset.choice-box > label, fieldset.choice-box .choices > label { font-size: 0.875rem; }
fieldset.choice-box .choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
  gap: 4px 16px; margin-top: var(--space-2); }
fieldset.choice-box > .muted.small { display: block; margin: 0 0 var(--space-2); }
fieldset.choice-box > .field.roster { margin: var(--space-3) 0 0; }
img.headshot { display: block; width: 72px; height: 72px; object-fit: cover; border-radius: 50%; margin-bottom: 8px;
  border: 1px solid var(--line); }
/* V4: the client's logo and colors on its Branding tab. */
img.logo-preview { display: block; max-height: 4rem; max-width: 12rem; margin-bottom: 8px; }
.color-box { display: flex; align-items: center; gap: 8px; }
.swatch { flex: none; width: 28px; height: 28px; border-radius: var(--radius-input); border: 1px solid var(--line); }
/* V8: a credit row's picture. */
table.credit-rows td.thumb { width: 64px; }
table.credit-rows td.thumb img { display: block; width: 56px; height: 56px; object-fit: cover;
  border-radius: var(--radius-panel); border: 1px solid var(--line); }
.thumb-none { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px;
  border: 1px dashed var(--line); border-radius: var(--radius-panel); font-size: 0.625rem; text-align: center; }
form.credit-price input { width: 6rem; }
/* V4: the client's logo in a corner of their portal home, "to welcome them home". */
.portal-welcome-logo { float: right; max-height: 3.5rem; max-width: 10rem; margin: 0 0 var(--space-3) var(--space-4); }
/* At phone width the tables Batch G added — the People rows, the Credits rows, the Store's cart — stack each row: its
   first cell and its action on one line, every other cell on its own line under it, named by its column — so the
   Edit, the price box, Update, Purchase credits, How many and the price are in view with no sideways scrolling. */
@media (max-width: 43.75rem) {
  .table-wrap > table.stacks, .card.table-wrap > table.stacks { min-width: 0; }
  table.stacks, table.stacks > tbody { display: block; }
  table.stacks tr:first-child:has(> th) { display: none; }
  table.stacks tr { display: flex; flex-wrap: wrap; align-items: center; column-gap: 0.75rem;
    padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--line); }
  table.stacks tr:last-child { border-bottom: 0; }
  table.stacks tr > td, table.stacks tr > th { display: block; flex: 1 1 100%; order: 2; padding: 0.125rem 0;
    border-bottom: 0; text-align: left; white-space: normal; }
  table.stacks tr > :first-child { flex: 1 1 0; order: 0; min-width: 0; }
  table.stacks tr > td.row-action { flex: 0 0 auto; order: 1; width: auto; text-align: right; }
  table.stacks td[data-label]::before { content: attr(data-label); margin-right: 0.375rem; color: var(--muted-strong);
    font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.03rem; text-transform: uppercase; }
  table.stacks td:empty { display: none; }
}

/* ── Batch G, the grant sweep — a setting the person can't save reads as text: its boxes greyed, never typed into. ── */
fieldset.read-only { border: 0; padding: 0; margin: 0; }

/* Send for approval's "Send it to": the client's people, or someone else by email as a guest. [BATCH_E E6] */
.send-to { border: 0; padding: 0; margin: 0 0 .5rem; min-width: 0; flex-basis: 100%; }
.send-to legend { padding: 0; }
.send-to label.inline { margin-right: 1rem; }

/* E lane B — Receive Payment: a column's header is its sort button, read as a header (no button chrome). */
th > button.sort { background: none; border: 0; padding: 0; min-height: 0; font: inherit; font-weight: 600;
  color: inherit; cursor: pointer; }
th > button.sort:hover { color: var(--accent); filter: none; }
/* … and on a phone, where the stacked table hides its heads, the same buttons in the list pattern's "Sort:" row, read
   as its links. [Batch L, fixer lfz; DERIVED — templates/lists/found.html's sort-links] */
.sort-links > button.sort { background: none; border: 0; padding: 0; min-height: 0; font: inherit;
  color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sort-links > button.sort[aria-current] { font-weight: 600; }

/* Batch H, lane 3 — the templates library at five thousand: a gallery "like looking in a folder full of images", names
   read whole (never ellipsized), a flag pill (its filters and sort are the list pattern's now — Batch K, K1, below). Nothing pushes the page sideways at 390.
   [CHAD-STATED — Oct 28 V24, V25; BATCH_H H5, H6] */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); }
.gallery-card { display: flex; flex-direction: column; gap: 0.25rem; margin: 0; min-width: 0; }
.gallery-art { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: #fff;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.gallery-art img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gallery-name, .template-name { font-weight: 600; overflow-wrap: anywhere; word-break: break-word; }
.pill.warn { background: color-mix(in srgb, var(--warning) 22%, transparent); }
.name-preview { font-family: var(--font-mono, ui-monospace, monospace); font-size: 0.9375rem; overflow-wrap: anywhere; }
.broker-boxes { max-height: 16rem; overflow-y: auto; }
/* Batch J, lane jb — Settings' one Attention list: a line each, a migration note's Dismiss beside its link; the setup
   list's Done lines folded under it. [BATCH_J J6] */
ul.attention > li + li { margin-top: var(--space-2); }
ul.attention > li { overflow-wrap: anywhere; }
ul.attention form { display: inline; margin-left: var(--space-2); }
details.setup-done { margin-top: var(--space-3); }
/* Batch J, fixer jfa — a pay-first order's Pay: its lines fit the card at 390 px, the description wrapping. [the smoke's
   (5)] */
table.pay-lines td:first-child { overflow-wrap: anywhere; }
table.pay-lines th, table.pay-lines td { padding: 0.5rem 0.625rem; }
/* Batch K, K1 — the list pattern (hartsen/lists.py, templates/lists/, static/lists.js), every list screen's: the search
   box and the filters in one wrapping bar, Reset beside them (Apply only without the script); on a phone the search box
   stays in view and the filters fold behind one "Filter" button; the heads sort, and where a stacked table hides them
   the sort is a row of links (Batch H's own fix, kept); the pager's pages wrap. Nothing pushes the page sideways at 390.
   [CHAD-STATED — Oct 30 20:14, V57, V61, V63; BATCH_K K1] */
.list-bar .list-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.5rem 0.75rem; }
.list-bar .list-search { flex: 1 1 14rem; max-width: 24rem; margin: 0; }
.list-bar .list-fold { flex: 999 1 20rem; min-width: 0; }
.list-bar .list-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(10rem, 100%), 1fr));
  gap: 0.5rem 0.75rem; }
.list-bar .field { margin: 0; min-width: 0; }
.list-bar select, .list-bar input[type=search] { width: 100%; max-width: 100%; }
.list-bar .list-ticks { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin-top: 0.5rem; }
.list-bar .list-actions { margin-top: 0.75rem; }
.list-fold > summary { list-style: none; }
.list-fold > summary::-webkit-details-marker { display: none; }
.list-fold > summary .pill { min-width: 1.25rem; justify-content: center; }
@media (min-width: 43.8125rem) { .list-fold > summary { display: none; } }      /* wide: the filters always shown */
@media (max-width: 43.75rem) {
  .list-bar .list-search { flex-basis: 100%; max-width: none; }
  .list-fold[open] > summary { margin-bottom: 0.5rem; }
}
.list-found { justify-content: space-between; }
.list-results[aria-busy="true"] { opacity: 0.6; transition: opacity 0.15s; }
.sort-head { color: inherit; text-decoration: none; white-space: nowrap; }
.sort-head:hover { text-decoration: underline; }
.sort-links a[aria-current] { font-weight: 600; }
@media (min-width: 43.8125rem) { .sort-links.phone-only { display: none; } }   /* the table's heads sort it there */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; margin-top: var(--space-3); }
.pager .here { font-weight: 700; }
/* Batch L, K1: the pager and the person's own Rows per page share one row, wrapping on a phone. [PROPOSAL] */
.list-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem;
  margin-top: var(--space-3); }
.list-foot .pager { margin-top: 0; }
.list-size { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; margin: 0 0 0 auto; }
.list-size select { width: auto; max-width: 100%; }

/* The Settings area: inside Settings the sidebar is Settings' own list (the way back, the sections, the screen you're
   on marked by weight and a bar, never colour alone), each page says "Settings › {section}", and the hub is tiles.
   [Nov 1 16:45; shops.settings_area] */
.settings-nav { gap: 2px; }
.settings-nav .settings-back { margin-bottom: 6px; }
.settings-nav .settings-home > a, .settings-nav .settings-home > span { font-weight: 600; color: var(--ink); }
.settings-section > summary { list-style: none; cursor: pointer; padding: 8px 12px; font-size: 0.8125rem;
  color: var(--muted); border-left: 2px solid transparent; display: flex; align-items: center; justify-content: space-between; }
.settings-section > summary::-webkit-details-marker { display: none; }
.settings-section > summary::after { content: "▸"; font-size: 0.7rem; }
.settings-section[open] > summary { color: var(--ink); font-weight: 600; }
.settings-section[open] > summary::after { content: "▾"; }
.settings-section > summary:hover { background: var(--tint); color: var(--ink); }
.settings-entry > a, .settings-entry > span { min-height: 30px; padding: 5px 12px 5px 24px; font-size: 0.78rem; }
.settings-crumb { margin: 0 0 4px; color: var(--muted); }
.settings-crumb a { color: var(--muted); }
.settings-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 18px; }
.settings-tile { margin: 0; }
.settings-tile h2 { margin: 0 0 8px; font-size: 1rem; }
.settings-tile ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.settings-tile li a { font-size: 0.875rem; }
/* A settings row reads as one line where the screen is wide: its boxes side by side, its note and its confirm beneath,
   the card's padding tight — the row editor's long screens shorter by half. [V54 "too much data all over the place";
   Nov 2; PROPOSAL — the sizes] */
@media (min-width: 900px) {
  .settings-row { padding: 12px 16px; margin-bottom: 8px; }
  .settings-row .row { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 6px 12px; }
  .settings-row .field { margin: 0; }
  .settings-row > p.small { margin: 6px 0 0; }
  .settings-row .actions { margin-top: 6px; gap: 12px; }
  .settings-row .actions .notice { padding: 3px 10px; margin: 0; }
}

/* Batch M — ma: the list component re-dressed — the filters in the table. One frame (a .card) holds the slim line, the
   found line, the table and the pager; the table runs edge to edge inside it; directly under the heads, inside the
   <thead>, the filter row — each column's boxes in its own cell, filling it, read as part of the heading; the slim
   line (the boxes with no column of their own, Reset) one row above it. On a phone the stacked table hides its heads:
   the filter row stands as a list of labelled boxes, folded with the slim line's behind "Filter". Nothing pushes the
   page sideways at 390; 2560 holds one table. [CHAD-STATED — Nov 2 18:52, item 9 "See how the filter boxes seem to
   belong to the table — this is what I want"; docs/UX_RULES.md 1, 8; DERIVED — BATCH_M M1; PROPOSAL — the sizes] */
.card.list-frame { padding: 0.75rem 1rem; }
.list-frame > .list-bar { margin: 0; }
.list-frame .table-wrap { max-width: none; margin: 0.5rem -1rem 0; }
.list-frame .table-wrap:last-child { margin-bottom: -0.75rem; }
.list-frame .list-results > .list-found, .list-frame .list-results > .notice:first-child { margin-top: 0.5rem; }
.list-frame .list-foot { margin-top: 0.75rem; }
/* Every box in the table: the slim line is only Reset — it shares the found line's row, never a row of its own. */
.list-frame > .list-bar[data-list-shape=""] { float: right; margin-left: 1rem; }
.list-frame > .list-bar[data-list-shape=""] + .list-results > .list-found { margin-top: 0; min-height: 2.25rem; }
.list-frame .table-wrap, .list-frame .list-foot { clear: both; }
.list-frame .empty { padding: 1rem; }
.list-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.list-line .list-search { flex: 0 1 20rem; min-width: 0; margin: 0; }
.list-line .list-search input { width: 100%; }
.list-line .list-fold { flex: 1 1 auto; min-width: 0; }
.list-line .list-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.list-line .list-fields .field { margin: 0; min-width: 0; }
.list-line .list-fields select { width: auto; max-width: 16rem; }
.list-line .list-actions { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0 auto; }
.list-line .list-search input, .list-line select, .list-line .list-actions .button { min-height: 2.25rem; }
.list-line .list-actions .button { padding: 0.375rem 0.875rem; }
@media (min-width: 43.8125rem) {               /* a wide table's cells a little tighter, so ten columns fit at 1280 */
  .list-frame .table-wrap > table > * > tr > :is(th, td) { padding-left: 0.625rem; padding-right: 0.625rem; }
  .list-frame .table-wrap > table > * > tr > :is(th, td):first-child { padding-left: 1rem; }
  .list-frame .table-wrap > table > * > tr > :is(th, td):last-child { padding-right: 1rem; }
  .list-frame .table-wrap > table > thead > tr.list-filters > td { padding: 0.25rem 0.3125rem 0.625rem; }
}
thead > tr:first-child:has(+ .list-filters) > th { border-bottom: 0; }
tr.list-filters > td { background: var(--surface-alt); padding-top: 0.25rem; padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--line); vertical-align: top; }
tr.list-filters:hover > td { background: var(--surface-alt); }
.list-filters .list-box + .list-box, .list-filters .list-box + .list-tick { margin-top: 0.375rem; }
.list-filters select, .list-filters input[type=search] { width: 100%; min-width: 7.5rem; max-width: 100%;
  min-height: 2.125rem; padding: 0.3125rem 0.375rem; font-size: 0.75rem; font-weight: 400; }
.list-filters select { padding-right: 0.25rem; }        /* the arrow draws its own room */
/* A pick is as wide as the words it shows ("Panels and riders", or the client chosen), never cut short to look like
   another choice; where the browser can't size it so, it keeps a width its usual words fit. */
@supports (field-sizing: content) {
  .list-filters select { field-sizing: content; width: auto; min-width: 100%; max-width: 16rem; }
}
.list-filters .list-tick { display: inline-flex; align-items: center; gap: 0.375rem; white-space: normal; }
.list-box-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; }
@media (max-width: 43.75rem) {
  .card.list-frame { padding: 0.75rem; }
  .list-frame .table-wrap { margin-left: -0.75rem; margin-right: -0.75rem; }
  .list-line .list-search { flex: 1 1 100%; }
  .list-line .list-fields { flex-direction: column; align-items: stretch; }
  .list-line .list-fields select { width: 100%; max-width: none; }
  .list-line .list-search input, .list-line select, .list-filters select, .list-filters input[type=search] {
    min-height: 46px; font-size: 1rem; }
  .list-filters select { field-sizing: fixed; width: 100%; max-width: none; }
  table.stacks > thead { display: block; }
  table.stacks tr.list-filters { display: flex; flex-direction: column; align-items: stretch; gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    background: var(--surface-alt); }
  table.stacks tr.list-filters > td { display: block; flex: none; order: 0; padding: 0; border: 0; }
  .list-filters .list-box-label { position: static; width: auto; height: auto; overflow: visible; clip: auto;
    display: block; margin-bottom: 0.25rem; font-size: 0.75rem; font-weight: 600; color: var(--muted-strong); }
  .list-frame:has(> .list-bar [data-list-fold]:not([open])) .list-filters { display: none; }
}
/* Batch M — mg: Settings → Connections. A row per outside service; its light a mark (✓ ✕ ○ ?) in its colour beside its
   words — never a colour alone; its switch and Check now quiet buttons in their cells. [V55; BATCH_M M2; UX_RULES 7, 9;
   PROPOSAL — the sizes] */
table.connections th[scope="row"] { font-weight: 600; white-space: nowrap; }
table.connections td, table.connections th { vertical-align: middle; }
.connection-status { display: inline-flex; align-items: baseline; gap: 0.5rem; }
.connection-light { min-width: 1.375rem; justify-content: center; font-size: 0.8125rem; }
.connection-words { overflow-wrap: anywhere; }
form.connection-switch { display: inline; margin-left: 0.375rem; }
table.connections td.row-action { text-align: right; white-space: nowrap; }
table.connections .notice { margin: 0.375rem 0 0; }
/* Batch M — mb: the row editor as spreadsheet rows, Add top right, the ⋯ menu, the side panel (UX_RULES 2–4). A
   settings table is a real table: labels once in its heading row, each record one row of boxes in cells, tight; a row
   is its own tbody, so what's said about it sits on a line under it; the add row hidden until Add (or a link landing
   on it); on a phone each row stacks as a card with its labels (the codebase's stacks pattern), nothing pushing the
   page sideways at 390; wide tables scroll inside their own frame. The ⋯ is one quiet control at the row's right; its
   marks ("Retires on Save · Undo") show while their tick is ticked — words and a struck-through row, never colour
   alone. [CHAD-STATED — Nov 2 19:09; UX_RULES 2–4, 8, 9; PROPOSAL — the sizes] */
.rows-section { margin: 0 0 var(--space-6); }
.rows-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem;
  margin: var(--space-5) 0 var(--space-2); }
.rows-head h2 { margin: 0; }
.rows-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-left: auto; }
.rows-actions label.button { gap: 6px; margin: 0; font-weight: 600; }
.rows-actions label.button input[type=checkbox] { margin: 0; }
.rows-intro { margin: 0 0 var(--space-2); }
.rows-wrap { border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface);
  margin-bottom: var(--space-3); }
table.rows-table th, table.rows-table td { padding: 6px 8px; }
table.rows-table th { white-space: normal; min-width: 4rem; }
table.rows-table td { vertical-align: middle; }
table.rows-table > tbody:not(:last-child) > tr:last-child > td { border-bottom: 1px solid var(--line); }
table.rows-table td :is(input:not([type=checkbox]):not([type=hidden]), select) { min-height: 2.125rem;
  padding: 5px 8px; min-width: 7.5rem; }
table.rows-table td input[type=number] { min-width: 5.5rem; }
table.rows-table td.tick, table.rows-table th.tick { text-align: center; }
table.rows-table td.tick input[type=checkbox] { margin: 0; }
table.rows-table td .errorlist { margin: 4px 0 0; }
table.rows-table tr.row-said > td { padding-top: 0; }
table.rows-table tr.row-said .notice { margin: 4px 0; padding: 6px 12px; }
table.rows-table tr:hover > td { background: none; }
table.rows-table td.rows-note { max-width: 18rem; overflow-wrap: anywhere; }
table.rows-table td.rows-confirmed { white-space: nowrap; }
table.rows-table td.rows-confirmed label { display: block; margin-top: 2px; }
table.rows-table td.row-action { white-space: nowrap; width: 1%; text-align: right; }
/* A wide table scrolls inside its frame; its first box reads a name whole, and its ⋯ stays in view at the right. */
table.rows-table td:first-child :is(input:not([type=checkbox]), select) { min-width: 11rem; }
table.rows-table th.row-action, table.rows-table td.row-action { position: sticky; right: 0; z-index: 1;
  background: var(--surface); box-shadow: -1px 0 0 var(--line); }
table.rows-table thead th.row-action { background: var(--surface-alt); }
table.rows-table td.row-action:has(details[open]) { z-index: 3; }      /* its open ⋯ over the rows below */
table.rows-table td.row-action > * + * { margin-left: 0.375rem; }
tbody.record.retired > tr:first-child > td:not(.row-action) { color: var(--muted); }
tbody.add-row > tr:first-child > td { background: var(--tint); }
table.zones-table td.zone-days label.inline { margin-right: 6px; white-space: nowrap; }
/* A link landing on an add row (#{key}-new) shows it without the script. */
table.rows-table > tbody.add-row:target { display: table-row-group; }
/* A long field: its first words and Edit in the cell; the box itself in the side panel (or unfolded, no script). */
details.panel-fold { display: inline-block; max-width: 16rem; vertical-align: middle; }
details.panel-fold > summary { list-style: none; display: flex; align-items: center; gap: 0.5rem; font-weight: 400; }
details.panel-fold > summary::-webkit-details-marker { display: none; }
.panel-preview { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.75rem; }
details.panel-fold[open] { display: block; max-width: none; min-width: 16rem; white-space: normal; text-align: left; }
details.panel-fold[open] > .panel-body { margin-top: 0.5rem; }
dialog.side-panel { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(34rem, 100vw); border-radius: 0;
  border-width: 0 0 0 1px; display: none; flex-direction: column; text-align: left; white-space: normal; }
dialog.side-panel[open] { display: flex; }
.side-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.875rem 1.25rem; border-bottom: 1px solid var(--line); }
.side-panel-head h2 { margin: 0; font-size: 1rem; }
.side-panel-body { flex: 1 1 auto; overflow: auto; padding: 1rem 1.25rem; }
.side-panel-body textarea { min-height: 40vh; }
.side-panel-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--line); }
/* The ⋯ menu. */
.row-menu-wrap { display: inline-flex; align-items: center; gap: 0.5rem; vertical-align: middle; }
details.row-menu { display: inline-block; position: relative; text-align: left; }
details.row-menu > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border: 1px solid var(--line); border-radius: var(--radius-action);
  background: var(--surface); color: var(--ink); font-size: 1rem; font-weight: 700; line-height: 1; }
details.row-menu > summary::-webkit-details-marker { display: none; }
details.row-menu > summary:hover, details.row-menu[open] > summary { border-color: var(--accent); }
.row-menu-panel { width: 18rem; max-width: calc(100vw - 2rem); margin-top: 4px; padding: 0.375rem;
  white-space: normal; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel);
  box-shadow: 0 10px 30px #0003; font-size: 0.8125rem; }
/* With the script it floats over the table, placed beside its ⋯ (static/rows.js); without, it opens in place. */
.js-rows .row-menu-panel { position: fixed; z-index: 40; margin: 0; }
.row-menu-item > summary { list-style: none; padding: 6px 10px; border-radius: var(--radius-panel); }
.row-menu-item > summary::-webkit-details-marker { display: none; }
.row-menu-item > summary:hover, .row-menu-item[open] > summary { background: var(--tint); }
.row-menu-item[open] { padding-bottom: 0.5rem; }
.row-menu-ask, .row-menu-note { margin: 0.375rem 0.625rem; font-size: 0.8125rem; overflow-wrap: anywhere; }
.row-menu-note { color: var(--muted-strong); }
.row-menu-item > form, .row-menu-item > .row-menu-yes { margin: 0.25rem 0.625rem 0; }
label.row-menu-yes { display: inline-flex; font-weight: 600; cursor: pointer; }
.row-menu-tick:focus-visible + .row-menu-yes { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.row-menu-tick:checked + .row-menu-yes::before { content: "✓"; }
/* The row's mark while one of its menu's ticks is ticked: "Retires on Save · Undo", the row struck through. */
.row-mark { display: none; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.row-menu-wrap:has(.row-menu-item:nth-of-type(1) .row-menu-tick:checked) > .row-mark:nth-of-type(1),
.row-menu-wrap:has(.row-menu-item:nth-of-type(2) .row-menu-tick:checked) > .row-mark:nth-of-type(2),
.row-menu-wrap:has(.row-menu-item:nth-of-type(3) .row-menu-tick:checked) > .row-mark:nth-of-type(3) { display: inline; }
label.row-undo { display: inline; margin: 0; font-size: inherit; color: var(--accent); text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer; }
/* Struck through only for a tick that takes the row out of use (Retire, Remove) — never Bring back. [the run's review,
   N2] */
tbody.record:has(.row-menu-strikes:checked) > tr:first-child > td:not(.row-action) { text-decoration: line-through;
  opacity: 0.6; }
/* Bins: a typed code or description of any length wraps inside its cell, never past the screen ("a 300-character
   typed line wraps at 390"). */
table.bins-list .bin-code, table.bins-list .bin-label { overflow-wrap: anywhere; word-break: break-word; }
table.bins-list td.bin-label { min-width: 10rem; }
@media (max-width: 43.75rem) {
  .table-wrap > table.rows-table { min-width: 0; }
  table.rows-table, table.rows-table > tbody { display: block; }
  table.rows-table > thead { display: none; }
  table.rows-table > tbody[hidden]:not(:target) { display: none; }
  table.rows-table > tbody.add-row:target { display: block; }
  table.rows-table > tbody { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line); }
  table.rows-table > tbody:last-child { border-bottom: 0; }
  table.rows-table tr { display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: 0.75rem; }
  table.rows-table tr > td { display: block; flex: 1 1 100%; order: 2; padding: 0.25rem 0; border-bottom: 0 !important;
    white-space: normal; text-align: left; }
  table.rows-table tr > td:first-child { flex: 1 1 0; order: 0; min-width: 0; }
  table.rows-table tr > td.row-action { flex: 0 0 auto; order: 1; width: auto; text-align: right; position: static;
    box-shadow: none; background: none; }
  table.rows-table td:first-child :is(input:not([type=checkbox]), select) { min-width: 0; }
  table.rows-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px;
    color: var(--muted-strong); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.03rem;
    text-transform: uppercase; }
  table.rows-table td.tick { text-align: left; }
  table.rows-table td :is(input:not([type=checkbox]), select) { min-width: 0; }
  table.rows-table td:empty { display: none; }
  details.panel-fold { max-width: 100%; }
}
/* A bin on a phone: its print tick and its code on the first line, its actions at the right. */
@media (max-width: 43.75rem) {
  table.bins-list tr > td.tick { flex: 0 0 auto; order: 0; }
  table.bins-list tr > td.tick::before { display: none; }
  table.bins-list tr > td:nth-child(2) { flex: 1 1 0; order: 0; min-width: 0; }
  table.bins-list td.bin-label { min-width: 0; }
  table.bins-list > tbody > tr + tr { margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--line); }
}
/* Batch M — mc: the page header and the save bar (UX_RULES 3, 6, 12). */
/* The page header: the title (and its one intro line) left, the page's actions right — the primary last and strongest,
   the secondary ones quiet before it; on a phone the actions drop under the title and share the width.
   [CHAD-STATED — Nov 2 19:09 "a nice button on the top right like 'New Order' is on the dashboard"; UX_RULES 3, 12;
   PROPOSAL — the sizes] */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: var(--space-3) var(--space-5); margin: 0 0 var(--space-5); }
.page-title { flex: 1 1 16rem; min-width: 0; }
.page-title > h1 { margin: 0; overflow-wrap: anywhere; }
.page-title > .page-intro { margin: var(--space-1) 0 0; color: var(--muted); max-width: 60rem; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2) 10px;
  margin-left: auto; padding-top: 2px; }
.page-actions > form { margin: 0; display: flex; }
.page-actions > .button, .page-actions > form > button { white-space: nowrap; }
@media (max-width: 700px) {
  .page-head { flex-direction: column; align-items: stretch; gap: var(--space-3); }
  .page-title { flex: none; }                                  /* in a column, a basis would be a height */
  .page-actions { justify-content: stretch; margin-left: 0; padding-top: 0; }
  .page-actions > .button, .page-actions > form, .page-actions > form > button { flex: 1 1 auto; }
  .page-actions > .button, .page-actions > form > button { white-space: normal; }
}
/* The save bar: the screen's top, over the bar, the moment a form holds a change — its words, Discard, Save (green, as
   a changed Save is — V8); a dot beside the words so the state reads in shape as well as words (UX_RULES 9). The
   record's tabs stay in view under it. Hidden in print. [UX_RULES 6; PROPOSAL — the shapes] */
.save-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 60; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--space-2) var(--space-4); min-height: 70px; padding: 10px 25px;
  background: var(--chrome-bg); color: var(--chrome-ink); box-shadow: 0 4px 18px #0004; }
.save-bar-words { margin: 0; display: flex; align-items: center; gap: 10px; font-size: var(--type-base); font-weight: 600;
  min-width: 0; }
.save-bar-words::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%;
  background: var(--trim); box-shadow: 0 0 0 3px #ffffff33; }
.save-bar-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.save-bar button.secondary { background: transparent; color: var(--chrome-ink); border-color: #ffffff88; }
.save-bar button:not(.secondary) { background: var(--action-save-dirty); border-color: var(--action-save-dirty);
  color: var(--surface); }
body.save-bar-shown .record-tabs { top: var(--save-bar-height, 70px); }
html:has(body.save-bar-shown) { scroll-padding-top: var(--save-bar-height, 70px); }
.leave-ask { width: min(440px, calc(100vw - 28px)); }
.leave-ask > form { padding: var(--space-5) var(--space-6); }
.leave-ask h2 { margin: 0 0 var(--space-2); }
.leave-ask .actions { justify-content: flex-end; margin-top: var(--space-4); }
@media (max-width: 700px) {
  .save-bar { min-height: 0; padding: 10px 16px; }
  .save-bar-actions { flex: 1 1 auto; }
  .save-bar-actions > button { flex: 1 1 auto; }
  .leave-ask .actions > button { flex: 1 1 auto; }
}
@media print { .save-bar { display: none !important; } }
/* Batch M — me: the sign-in window, centered in the page — across and down — at /login/ and at a signed-out visit to
   the address itself. [CHAD-STATED — Nov 2 18:52 item 1 "a simple login window centered in the page"; BATCH_M M2] */
.sign-in { display: flex; align-items: center; justify-content: center; min-height: 75vh; }
.sign-in-card { width: 100%; max-width: 26.25rem; margin: 0; }
/* Batch M — md: installers' weeks and time off; who's off on the day board; the field's phone things. */
/* A phone thing shows only where the pointer is a finger — "Find the sign I'm standing at", "I'm standing at this
   sign"; on a desktop the screen's one line says what it is instead. A browser that can't tell its pointer shows both.
   [CHAD-STATED — Nov 2 18:52 item 6; UX_RULES 11] */
@media (pointer: fine), (pointer: none) { .touch-only { display: none !important; } }   /* not .phone-only: that class is the narrow-screen Sort line's (lists/found.html) — the review, S3 */
@media (pointer: coarse) { .desktop-only { display: none !important; } }
/* The installer's page: their week a table, a row a day; their time off a table, Add's row at its top, past entries
   under a "Past" row; Remove behind the row's ⋯ (the shared ⋯ menu's CSS, lane mb). */
table.installer-week input[type=time], table.time-off input[type=date] { width: auto; min-width: 0; }
table.installer-week td, table.time-off td { vertical-align: middle; padding-block: 6px; }
@media (max-width: 43.75rem) {           /* a phone: each day one line, its two times side by side under it */
  table.installer-week.stacks tr > td:first-child { flex-basis: 60%; }
  table.installer-week.stacks tr > td.time { flex: 1 1 40%; min-width: 0; }
  table.installer-week.stacks td.time input { width: 100%; }
}
table.time-off tr.add-row td { background: var(--tint); }
table.time-off tr.group-row th { font-size: 0.8125rem; color: var(--muted); text-align: left; padding-top: 12px; }
table.time-off .built-with { margin: 4px 0 0; }
table.time-off td.row-action { width: 1%; white-space: nowrap; }
table.time-off .row-menu-panel form { margin: 0.375rem 0.625rem; }   /* the shared ⋯ menu's look (mb) — md's own copy removed at the merge */
/* The day board: who's off, by name, in words and weight. */
ul.crew-off { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
/* Crews: the shop's install week beside its Edit. */
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.section-head h2 { margin-bottom: 0; }
.shop-week-card { max-width: 34rem; }
/* Batch M — mf: each piece's picture on its left (Production, Hardware) opening large in a lightbox; Scan the pile;
   Hardware's types table and its tabs. A thumbnail is small and steady, its picture contained on white so a sign
   reads whole; a piece with no picture says why in its cell; on a phone the picture sits beside the piece's name.
   [CHAD-STATED — Nov 2 18:52 item 3, 19:09; UX_RULES 2, 5, 8, 9, 10; PROPOSAL — the sizes] */
th.thumb, td.thumb { width: 4rem; }
td.thumb .thumb-link { display: inline-block; line-height: 0; border-radius: var(--radius-panel); }
td.thumb img { display: block; width: 3.5rem; height: 3.5rem; object-fit: contain; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-panel); }
td.thumb .thumb-none { width: 3.5rem; height: 3.5rem; padding: 2px; font-size: 0.625rem; line-height: 1.2; }
.thumb-link:hover img, .thumb-link:focus-visible img { border-color: var(--accent); }
table.production-queue td { vertical-align: middle; }
table.production-queue td.file-name { overflow-wrap: anywhere; }
table.production-queue td.row-action form { margin: 0; }
dialog.lightbox { width: min(56rem, 96vw); max-height: 94vh; padding: 0; border: 1px solid var(--line);
  border-radius: var(--radius-panel); }
dialog.lightbox::backdrop { background: #0009; }
.lightbox-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line); }
.lightbox-head h2 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.lightbox-body { padding: 1rem; background: var(--surface-alt); }
.lightbox-body img { display: block; margin: 0 auto; max-width: 100%; max-height: 72vh; background: #fff; }
.lightbox-foot { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; padding: 0.625rem 1rem;
  border-top: 1px solid var(--line); }
/* Scan the pile: the count above the lines; an undone line struck through and saying so, a refused one in its own
   words — never colour alone. (Its box is the scan box's: lane rscan's block at the end.) */
.pile-count { margin: 0 0 var(--space-3); }
.pile-count strong { font-size: 1.5rem; }
table.pile-lines td.asset-id { font-weight: 600; white-space: nowrap; overflow-wrap: anywhere; }
table.pile-lines td .status { margin-right: 0.25rem; }
tr.pile-undone > td:not(.row-action) { text-decoration: line-through; color: var(--muted); }
/* Hardware: the type's column bounded and wrapping, each term's head on one line, the term boxes a steady width; the
   tabs under the header; the counter's forms no wider than they read. */
table.pool-types th.pool-type, table.pool-types td.pool-type { width: 16rem; max-width: 16rem; min-width: 11rem; }
table.pool-types thead th { white-space: nowrap; }
table.pool-types td :is(input:not([type=checkbox]):not([type=hidden])) { min-width: 5.5rem; width: 6.5rem; }
table.pool-types td.pool-type input { width: 100%; }
.hardware-tabs { margin-bottom: var(--space-4); }
.counter-form { max-width: 44rem; }
.status-line .status { margin-right: 0.25rem; }
@media (max-width: 43.75rem) {
  table.stacks tr > td.thumb, table.rows-table tr > td.thumb { flex: 0 0 auto; order: 0; }
  table.stacks tr > td.thumb + td, table.rows-table tr > td.thumb + td { flex: 1 1 0; order: 0; min-width: 0; }
  table.pool-types th.pool-type, table.pool-types td.pool-type { width: auto; max-width: none; min-width: 0; }
  table.pool-types td :is(input:not([type=checkbox]):not([type=hidden])) { width: 100%; }
}
/* Batch M — mfx: a thumbnail the server couldn't draw says why in its cell (static/lightbox.js) — the words wrap,
   the cell grows to hold them, never past the screen. [the review of lane mf, 12] */
td.thumb .thumb-none.thumb-why { width: auto; min-width: 3.5rem; max-width: 12rem; height: auto; min-height: 3.5rem;
  overflow-wrap: anywhere; }

/* Batch N — nc: a frozen client's pay link (templates/pay_link.html) — its Pay form in the header wraps on a phone,
   the amount box under its label, never pushing the page sideways. */
.page-actions > form.pay-link-form { flex-wrap: wrap; align-items: center; gap: var(--space-2) 10px; }
.pay-link-form input[name="amount"] { max-width: 9rem; }

/* Batch N — na: N0's leftovers on the screens. */
/* The save bar on a phone sits in the page's flow under the bar (and the portal's Menu line), never over them, and
   holds the screen's top only once the page scrolls past it — so Menu is never under it and always opens; leaving with
   changes still asks. At this width Menu is drawn (above); wider, the bar keeps its place over the top. [UX_RULES 6,
   12; the smoke's M1 finding on Batch M; DERIVED — the width Menu shows at] */
@media (max-width: 700px) {
  .save-bar { position: sticky; }
}
/* A notice quoting a long unbroken line — a typed bin code, a pasted address — wraps anywhere, never pushing the page
   sideways (and with it the save bar's Discard and Save off the screen). [BATCH_N N0; the platform rule "nothing pushes
   a page sideways at 390 px"; DERIVED] */
.notice { overflow-wrap: anywhere; }
/* A thumbnail the server answers without a picture says so without the script too: a broken <img> draws its ::after
   (a loaded one never does), over the broken-picture mark — the words static/lightbox.js starts with; the script, when
   it runs, swaps in the server's own why. [BATCH_N N0; UX_RULES 10; non-negotiable 4; PROPOSAL — the words] */
td.thumb .thumb-link img { position: relative; }
td.thumb .thumb-link img::after { content: "No picture \2014  it couldn't be loaded"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; padding: 2px; text-align: center;
  font-size: 0.625rem; line-height: 1.2; color: var(--muted); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-panel); overflow: hidden; }
/* The pay-first portal header's "Pay $X to order" keeps its amount in words on a phone, where New order shows only
   its +: a sum is never a lone icon. [BATCH_N N0, N3; PROPOSAL — the shape] */
@media (max-width: 700px) {
  .header-action.pay-to-order > a, .header-action.pay-to-order > span { font-size: 0.8125rem; gap: 6px; }
}

/* Batch N — nf: the portal's screens on the page header (UX_RULES 3, 12). A section with its own Add — a setup step —
   wears the same head as the page, its h2 where the page's h1 sits; an add form opened from it sits under it, above
   the list. The client's logo keeps its corner beside the greeting's header. [DERIVED — BATCH_N N1; PROPOSAL — the
   spacing] */
body.portal .page-title > h2 { margin: 0; overflow-wrap: anywhere; }
body.portal .page-head + form.card { margin-top: 0; }

/* Batch N — nd: Returned's scan box — a scan's width, never the page's at 2560 (UX_RULES 8); the whole width on a phone. */
form.scan-in { max-width: 36rem; }

/* Batch N — ne: the staff screens under the rules (the audit). */
/* (A screen's intro tip: no longer an element's title — see Batch N — nux, below.) */
/* Fonts' aliases and Methods' photos: tables no wider than they read. */
table.font-aliases, table.style-photos { width: auto; min-width: min(100%, 32rem); }

/* Batch N — nux: the "?" tip beside a screen's one intro line (shops/templatetags/intro.py) — a <details>, so a finger,
   a keyboard and a page without its script all open it, as a hovered title never let them; open, the rest reads under
   the line, wrapping at any width (nothing sideways at 390). A round "?" — a shape and a mark, never colour alone.
   [UX_RULES 7 "anything more is a '?' tip beside the thing it explains", 9; the review of the screen lanes, S1 (a);
   PROPOSAL — the shape] */
.intro-tip { margin: var(--space-1) 0 0; color: var(--muted); max-width: 60rem; }
.intro-tip > .page-intro { display: inline; margin: 0; }
details.tip { display: inline; }
details.tip > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem; margin-left: 0.35rem; border: 1px solid currentColor; border-radius: 50%;
  font-size: 0.8125rem; font-weight: 600; line-height: 1; vertical-align: middle; color: var(--muted); }
details.tip > summary::-webkit-details-marker { display: none; }
details.tip > summary:hover, details.tip[open] > summary { color: var(--ink); }
details.tip > .tip-body { display: block; margin: var(--space-2) 0 0; padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); color: var(--ink);
  overflow-wrap: anywhere; }

/* Batch O — oa: a thumbnail that can't load says so without the script, in every browser — WebKit (Safari) draws no
   ::after on a broken <img>, so the no-script words aren't CSS on the image (Batch N, na's rule above stays for the
   moment before the script runs). Without the script (the scripting media feature; a browser without it keeps the
   <img> as before) the picture is the <noscript>'s <object>: the browser draws the picture it answers, or — for an
   answer that isn't one, the server's 409 with its why — the object's own fallback words, by the HTML standard's
   object rules (every engine; checked in Chromium with the script off). [the architect's review of N, Nov 3 — the N
   record's na; UX_RULES 10; non-negotiable 4; PROPOSAL — the markup] */
td.thumb .thumb-link .thumb-noscript { display: none; }
@media (scripting: none) {
  td.thumb .thumb-link { text-decoration: none; }
  td.thumb .thumb-link img { display: none; }
  td.thumb .thumb-link .thumb-noscript { display: flex; align-items: center; justify-content: center;
    box-sizing: border-box; width: 3.5rem; height: 3.5rem; padding: 2px; object-fit: contain; overflow: hidden;
    text-align: center; font-size: 0.625rem; line-height: 1.2; color: var(--muted); background: #fff;
    border: 1px solid var(--line); border-radius: var(--radius-panel); }
}

/* Batch O — the sweep's width finding (the architect): a screen's intro line and a person's sign-in line wrap a long
   unbroken word — a 56-character email pushed three portal pages sideways at 390. [UX_RULES 8; the screens' 390 rule] */
.page-title > .page-intro, .intro-tip > .page-intro, .intro-tip, #sign-in .card p { overflow-wrap: anywhere; }

/* ── Batch Q — lane q11: "Tell us what happened" (notices.feedback; templates/tell_us/; static/tell_us.js). One block,
   every rule of the lane that the frame needs on every screen: the entry in the menus, the quiet line under a
   refusal, the form — in its page and laid over any screen — and the dialog that holds it. The Feedback table's and
   the Inbox's own layout is static/feedback.css. Tokens only. [BATCH_Q Q11; the q11 fix round; PROPOSAL — the sizes] ── */
/* The staff bar's foot carries the entry where the bar is the phone's Menu — the field app's, and every staff screen's
   at phone width; at a desk it sits in the person's menu, once. A finger's target there, and in the person's menu on
   a phone. */
@media (min-width: 701px) { .side-nav .nav-in-menu { display: none; } }
.side-nav .nav-in-menu > a, .side-nav .nav-in-menu > span { min-height: var(--touch-size); }
body.area-field .side-nav .nav-in-menu > a, body.area-field .side-nav .nav-in-menu > span { min-height: var(--field-size);
  font-size: 1rem; }
@media (max-width: 700px) {
  .account-menu .nav-item > a, .account-menu .nav-item > span { min-height: var(--touch-size); }
}
/* The quiet line under a refusal (static/tell_us.js puts it just after it — its next sibling, never inside it): one
   small line in the muted ink, a link and no more — it never makes a refusal louder, and adds a line and no more to
   what is under it. Under a box (a notice, a form's error box, a card) it sits just below the box and keeps the
   box's own space below itself; under a field's error list, just below its last line. On a finger's screen its
   target is taller than its words, without moving what is around it. [the fix round, ruling 7; its verifier's V4] */
.tell-us-quiet { display: block; margin: 0 0 var(--space-3); font-size: 0.75rem; font-weight: 400; line-height: 1.5;
  color: var(--muted); text-align: left; }
:is(.notice, .card) + .tell-us-quiet { margin-bottom: var(--space-4); }
ul.errorlist + .tell-us-quiet { margin-bottom: 10px; }
/* … after a row of fields (a refusal in a half-width column): up into the space a field leaves below itself, that
   space kept below the line — so the form moves down by about the line and no more. (Its gap above anywhere else is
   measured by the script: what it follows keeps margins of its own.) */
.tell-us-quiet.tell-us-quiet-row { margin: calc(var(--space-1) - var(--space-4)) 0 var(--space-4); }
.tell-us-quiet > a, .notice .tell-us-quiet > a { color: inherit; font-weight: 400; }
body main .tell-us-quiet > a[href] { font-size: inherit; }          /* one size, the line's — the floor's 1rem too */
body.area-field .tell-us-quiet, body.area-production .tell-us-quiet { font-size: var(--type-sm); }  /* a refusal's own */
@media (pointer: coarse) { .tell-us-quiet > a { display: inline-block; padding-block: 13px; margin-block: -11px; } }
/* … and beside Discard and Save while a form holds a change, where the bar covers the person's menu at a desk. */
.save-bar .save-bar-tell { align-self: center; margin-right: var(--space-2); color: var(--chrome-ink);
  font-size: 0.75rem; }
@media (max-width: 700px) { .save-bar .save-bar-tell { display: none; } }
/* The form: what's written on the left, what it will include beside it where there's room, under it where there
   isn't — the page's card at a desk, the dialog, a phone. */
.tell-us-card { max-width: 60rem; }
form.tell-us { margin: 0; }
.tell-us-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-4) var(--space-6); }
.tell-us-write { flex: 3 1 20rem; min-width: 0; }
.tell-us-aside { flex: 2 1 15rem; min-width: 0; }
.tell-us-write .field:last-child { margin-bottom: 0; }
.tell-us textarea { min-height: 5.5rem; }
.tell-us label .muted { font-weight: 400; }
/* What it will include: one line that opens to all of it; the screen's words whole, in a box that scrolls. */
details.tell-us-includes { padding: var(--space-3) var(--space-4); background: var(--surface-alt);
  border: 1px solid var(--line); border-radius: var(--radius-panel); font-size: var(--type-sm); line-height: 1.5; }
details.tell-us-includes > summary { list-style: none; font-weight: 400; }
details.tell-us-includes > summary::-webkit-details-marker { display: none; }
.tell-us-see { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
details.tell-us-includes[open] > summary > .tell-us-see { display: none; }
details.tell-us-includes > ul { margin: var(--space-2) 0 0; padding-left: 1.1rem; display: grid; gap: var(--space-1); }
.tell-us-address { font: 0.75rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted-strong);
  overflow-wrap: anywhere; }
.tell-us-said { display: block; max-height: 9rem; overflow-y: auto; margin-top: 2px; padding-left: var(--space-2);
  border-left: 2px solid var(--line); overflow-wrap: anywhere; }
.tell-us-said-line { display: block; }
.tell-us-said-line + .tell-us-said-line { margin-top: var(--space-1); }
.tell-us-reach { margin: var(--space-3) 0 0; font-size: var(--type-sm); color: var(--muted-strong); overflow-wrap: anywhere; }
ul.errorlist.tell-us-why { margin: var(--space-4) 0 0; }
.tell-us-actions { margin-top: var(--space-4); }
.tell-us-actions > button[type=submit] { min-width: 8rem; }
form.tell-us[data-sending] { cursor: progress; }
/* Laid over a screen: a dialog — the title and Close held at its top, the form scrolling under them; the whole
   screen on a phone, where the header also holds Send, in reach with the keyboard up. Its backdrop and frame are the
   stylesheet's own dialog's (08). */
dialog.tell-us-dialog { width: min(48rem, calc(100vw - 28px)); max-height: min(92vh, 56rem); }
.tell-us-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-5); background: var(--surface); border-bottom: 1px solid var(--line); }
.tell-us-head h2 { flex: 1 1 auto; min-width: 0; margin: 0; font-size: var(--type-lg); }
.tell-us-head > button { flex: none; }
.tell-us-head-send { display: none; }
.tell-us-body { padding: var(--space-4) var(--space-5) var(--space-5); }
.tell-us-intro { margin: 0 0 var(--space-4); color: var(--muted); }
/* Sent: a tick in a disc and the shop's words — a shape and a sentence, never a colour alone — then what can happen
   next, on a small card over the screen the person was on, which shows again behind it: they are back where they
   were. */
dialog.tell-us-dialog[data-sent] { width: min(30rem, calc(100vw - 28px)); height: fit-content; margin: auto;
  border: 1px solid var(--line); border-radius: 4px; }
.tell-us-dialog[data-sent] .tell-us-head { display: none; }
.tell-us-sent { padding: var(--space-2) 0 0; }
.tell-us-sent > p { display: flex; align-items: center; gap: var(--space-3); margin: 0 0 var(--space-4);
  font-size: var(--type-lg); line-height: 1.35; }
.tell-us-sent > p.tell-us-also { display: block; margin-left: calc(2rem + var(--space-3)); font-size: var(--type-sm);
  color: var(--muted-strong); }
.tell-us-sent > .actions { margin-top: var(--space-5); }
.tell-us-tick { flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--success); color: var(--surface); font-size: 1rem; font-weight: 700; }
@media (max-width: 700px) {
  dialog.tell-us-dialog { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: none; margin: 0;
    border: 0; border-radius: 0; }
  .tell-us-head { padding: var(--space-2) var(--space-3); gap: var(--space-2); }
  .tell-us-head > [data-tell-us-close] { order: -1; }
  .tell-us-head h2 { font-size: 1rem; line-height: 1.25; text-align: center; }
  .tell-us-head > button { min-height: var(--touch-size); }
  .tell-us-head-send { display: inline-flex; min-width: 4.5rem; }
  .tell-us-dialog .tell-us-actions { display: none; }               /* Send is in the header there */
  .tell-us-body { padding: var(--space-4); }
  .tell-us-sent button, .tell-us-actions > .button, .tell-us-actions > button { min-height: var(--touch-size); }
  .tell-us input[type=file] { min-height: var(--touch-size); font-size: var(--type-sm); }
  .tell-us input[type=file]::file-selector-button { min-height: var(--touch-size); padding: 0 var(--space-4);
    font-size: var(--type-sm); }
  /* … the line itself a finger's row: the box's padding moves into it. */
  details.tell-us-includes { padding: 0; }
  details.tell-us-includes > summary { min-height: var(--touch-size); padding: 0.875rem var(--space-4); }
  details.tell-us-includes > ul { margin: 0; padding: 0 var(--space-4) var(--space-3) calc(var(--space-4) + 1.1rem); }
}
/* Opened from the field app: gloves, sunlight — its targets the field's size, its words the field's. */
body.area-field .tell-us-dialog :is(label, .small, small, a, button, input, textarea, li, p, summary) { font-size: 1rem; }
body.area-field .tell-us-dialog :is(button, input[type=file]) { min-height: var(--field-size); }
body.area-field .tell-us-dialog input[type=file]::file-selector-button { min-height: var(--field-size); font-size: 1rem; }

/* ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
   The finishing run — lane f0: the client's shared parts and the portal's frame on a phone. One contiguous block.
   [CHAD-STATED — Nov 14: "make everything as good as it gets while ensuring our focus is on user experience";
   BATCH_Q Q1 (the frame's first and last bullets), Q2 and Q3 (the parts); Direction 12's portal-home and its bottom
   bar; the architect's drawing docs/design/portal-order.html + portal-order.css, moved in and made to hold any kind
   of order; PROPOSAL — the sizes, and every shape the drawings don't show]
   The parts: templates/parts/ — tracker.html (.tracker, .tracker-compact), stands.html (.stands), order_picture.html
   (.order-pic), order_card.html (.order-cards, .order-card), tiles.html (.stat-tiles), waiting.html (.waiting-rows),
   bottom_bar.html (.bottom-bar). Every colour is a token; a state is a shape and a word, never colour alone.
   ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════ */

:root { --icon-comment: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11H9l-5 4z'/%3E%3C/svg%3E"); }
/* ── The tracker, full: a row of steps — a done step a filled circle with a tick, the one the order is on a ring with
   a dot and the word Now, one ahead an empty circle, where a cancelled order stopped a crossed circle. The line into a
   step is drawn solid once the step before it is done. Any number of steps (--steps); never a sideways scroll: a
   label wraps inside its column, and past five steps (the staff's, with Invoiced · Paid) a phone reads them top to
   bottom. ── */
.tracker { list-style: none; margin: var(--space-5) 0 0; padding: 0; display: grid;
  grid-template-columns: repeat(var(--steps, 4), minmax(0, 1fr)); }
.tracker > li { position: relative; min-width: 0; padding: 36px 3px 0; text-align: center; font-size: var(--type-xs);
  line-height: 1.35; color: var(--muted); }
.tracker > li::before { content: ""; position: absolute; top: 13px; right: 50%; width: 100%; height: 2px;
  background: var(--line); }
.tracker > li:first-child::before { display: none; }
.tracker > li.done + li::before { background: var(--accent); }
.tracker .mark { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 28px; height: 28px;
  border-radius: 50%; border: 2px solid var(--field-line); background: var(--surface); color: var(--muted-strong);
  display: grid; place-items: center; z-index: 1; }
.tracker .mark::after { content: ""; }
.tracker li.done .mark { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tracker li.done .mark::after, .tracker li.stopped .mark::after { width: 15px; height: 15px; background: currentColor;
  -webkit-mask: var(--mark-shape) center / contain no-repeat; mask: var(--mark-shape) center / contain no-repeat; }
.tracker li.done { --mark-shape: var(--icon-tick); }
.tracker li.stopped { --mark-shape: var(--icon-cross); }
.tracker li.now .mark { border: 3px solid var(--accent); }
.tracker li.now .mark::after { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.tracker li.stopped .mark { border-color: var(--muted-strong); }
.tracker strong { display: block; font-size: var(--type-sm); font-weight: 400; color: var(--muted-strong);
  overflow-wrap: break-word; text-wrap: balance; }
.tracker li.done strong { color: var(--ink); }
.tracker li.now strong, .tracker li.stopped strong { color: var(--ink); font-weight: 700; }
.tracker small { display: block; margin-top: 1px; font-size: var(--type-xs); overflow-wrap: break-word;
  text-wrap: balance; }
.tracker .now-word, .tracker .late-word { display: inline-block; margin-top: 3px; padding: 1px 7px;
  border: 1px solid var(--muted-strong); border-radius: var(--radius-status); color: var(--ink); font-weight: 600;
  letter-spacing: .4px; text-transform: uppercase; font-size: var(--type-xs); }
/* Now in ink, Late alone in the alarm's colour and a size up: under a red brand an accent-ruled Now read as a second
   alarm beside Late. [the design review's S6 and S9 — lane f0's fix round] */
.tracker .late-word { border-color: var(--danger); color: var(--danger); font-size: var(--type-sm);
  background: color-mix(in srgb, var(--danger) 11%, var(--surface)); }
/* After a stop — a cancelled or not-approved order, an expired quote — the steps that won't happen now are faded and
   dashed, their words plain: never read as steps still to come. [the design review's S7 — lane f0's fix round] */
.tracker > li.stopped ~ li { opacity: .5; }
.tracker > li.stopped ~ li .mark { border-style: dashed; }
.tracker > li.stopped ~ li strong { font-weight: 400; }
.tracker > li.stopped ~ li::before { background: repeating-linear-gradient(90deg, var(--field-line) 0 4px,
  transparent 4px 8px); }
:root { --icon-tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  --icon-cross: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E"); }
@media (max-width: 700px) {
  .tracker.tracker-many { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .tracker.tracker-many > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px;
    align-items: baseline; padding: 4px 0 14px 40px; text-align: left; min-height: 40px; }
  .tracker.tracker-many > li::before { top: -12px; right: auto; left: 13px; width: 2px; height: 100%; }
  .tracker.tracker-many .mark { left: 0; transform: none; }
  .tracker.tracker-many small { margin-top: 0; }
}

/* ── The tracker, compact: one line — its marks, then the step the order is on in words (a table's row); or its marks
   alone (.tracker-bare) where a chip beside it says the words (the order card). The same shapes, small. ── */
.tracker-compact { display: inline-flex; align-items: center; max-width: 100%; vertical-align: middle;
  white-space: nowrap; line-height: 1.2; }
.tracker-compact > i { position: relative; flex: none; width: 14px; height: 14px; margin-right: 12px;
  border: 2px solid var(--field-line); border-radius: 50%; background: var(--surface); color: var(--muted-strong); }
.tracker-compact > i:last-of-type { margin-right: 0; }
.tracker-compact > i::after { content: ""; position: absolute; top: 50%; left: calc(100% + 2px); width: 12px;
  height: 2px; margin-top: -1px; background: var(--line); }
.tracker-compact > i:last-of-type::after { display: none; }
.tracker-compact > i.done::after { background: var(--accent); }
.tracker-compact > i::before { content: ""; position: absolute; inset: 0; margin: auto; }
.tracker-compact > i.done { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tracker-compact > i.done::before, .tracker-compact > i.stopped::before { width: 8px; height: 8px;
  background: currentColor; -webkit-mask: var(--mark-shape) center / contain no-repeat;
  mask: var(--mark-shape) center / contain no-repeat; }
.tracker-compact > i.done { --mark-shape: var(--icon-tick); }
.tracker-compact > i.stopped { --mark-shape: var(--icon-cross); border-color: var(--muted-strong); }
.tracker-compact > i.now { border-color: var(--accent); }
.tracker-compact > i.stopped ~ i { border-style: dashed; opacity: .5; }
.tracker-compact > i.stopped::after, .tracker-compact > i.stopped ~ i::after {
  background: repeating-linear-gradient(90deg, var(--field-line) 0 3px, transparent 3px 6px); }
.tracker-compact > i.now::before { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.tracker-words { min-width: 0; margin-left: 9px; overflow: hidden; text-overflow: ellipsis; font-size: var(--type-sm);
  font-weight: 600; color: var(--ink); }
/* Down a table's column the words start in one place, whatever the order's number of steps: five marks' room kept.
   [the design review's P6 — lane f0's fix round] */
.tracker-compact:not(.tracker-bare) > .tracker-words { margin-left: calc(9px + max(0, 5 - var(--marks, 5)) * 26px); }

/* ── Where it stands: the first card of an order's page — one sentence, what's next, the button when the move is the
   reader's, the tracker. Its left rule is the order's tone, as the chip's — on its way the calm --info, never the
   brand's colour (under a red brand that read as an alarm where nothing was wrong); a word says the rest. ── */
.stands { padding: var(--space-5); border-left: 3px solid var(--info); }
.stands .now-line { margin: 0; font-size: var(--type-lg); font-weight: 600; line-height: 1.3; }
.stands .next-line { margin: 6px 0 0; color: var(--muted-strong); }
.stands .actions { margin-top: var(--space-4); }
.stands-you { border-left-color: var(--warning); }
.stands-done { border-left-color: var(--success); }
.stands-stopped { border-left-color: var(--muted); }
.stands .stands-note { margin: var(--space-4) 0 0; padding-top: var(--space-3); border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.75rem; }
.stands .stands-note strong { font-weight: 600; color: var(--muted-strong); }
/* At a desk the card uses the desk: what stands and what's next on the left, the tracker beside them — one glance,
   and half the height, so the sign and the map under it stay on the first screen. */
@media (min-width: 900px) {
  .stands { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--space-8);
    align-items: start; }
  .stands > .tracker { margin-top: 0; }
  .stands > .stands-note { grid-column: 1 / -1; }
}

/* ── The order's picture, small: the engine's drawing on its own white, kept square so a column of them lines up; an
   order with nothing to picture is a quiet dashed box that says what it is. ── */
.order-pic { flex: none; display: grid; place-items: center; width: 4.5rem; height: 4.5rem; overflow: hidden;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-panel); }
.order-pic > img { display: block; width: 100%; height: 100%; object-fit: contain; font-size: var(--type-xs);
  line-height: 1.2; color: var(--muted); }
.order-pic-none { background: var(--surface-alt); border-style: dashed; }
.order-pic-none > span { padding: 3px; font-size: var(--type-xs); line-height: 1.2; text-align: center;
  color: var(--muted-strong); overflow-wrap: break-word; hyphens: auto; }
.order-pic-large { width: 6.5rem; height: 6.5rem; }
/* In a table's row: the shared table's own picture size where it names one (--list-thumb, the table lane's), so a
   row with an order's picture is as tall as any row with a picture; else 3.5rem. */
td.thumb > .order-pic { width: var(--list-thumb, 3.5rem); height: var(--list-thumb, 3.5rem); }
/* In a box of 48px or less (a table's row, a "Waiting on you" row) the words can't be read at any size that fits:
   the box shows the orders icon, and its words stay for a screen reader and as its tooltip. [the design review's S9 —
   lane f0's fix round] */
td.thumb > .order-pic-none > span, .waiting-row > .order-pic-none > span { position: absolute; width: 1px;
  height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
td.thumb > .order-pic-none::before, .waiting-row > .order-pic-none::before { content: ""; width: 45%; height: 45%;
  background: var(--muted); -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat; }

/* ── The order card: the picture, the number small, the Site large, the chip and the day, the tracker's marks — and
   one next-step line, its own link. Two across where there's room, one on a phone. ── */
.order-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr)); gap: 14px;
  margin: 0 0 18px; }
.order-card { display: flex; flex-direction: column; min-width: 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-panel); }
.order-card:hover, .order-card:focus-within { border-color: var(--accent); }
.order-card-main { flex: 1; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px;
  padding: 16px 18px 14px; color: var(--ink); text-decoration: none; }
/* A strip (a Store rider, 16 to 1) runs the card's width under the words — never a hairline in a square box. A row
   keeps its square. [the design review's S10 — lane f0's fix round] */
.order-card-main > .order-pic-wide { order: 2; flex: 1 1 100%; width: auto; height: auto; padding: 8px; }
.order-card-main > .order-pic-wide > img { height: auto; max-height: 4.5rem; }
.order-card-words { flex: 1; min-width: 0; display: grid; gap: 5px; justify-items: start; }
.order-id { font-size: var(--type-xs); letter-spacing: .4px; color: var(--muted); }
.order-site { font-size: 1rem; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
.order-status { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; font-size: 0.75rem;
  color: var(--muted-strong); }
.order-status .status { white-space: normal; }
/* On its way, nothing needed: a calm tone of its own. The chip's plain look is the brand's tint, which under a brand
   whose colour is red reads as an alarm — and sits beside Late. [PROPOSAL — lane f0; the --info token was there] */
.status.info { background: color-mix(in srgb, var(--info) 11%, var(--surface)); color: var(--info); }
.order-card .tracker-compact { margin-top: 3px; }
/* The review page's comments, counted on the card: a link of its own, under the words. [CHAD-STATED — Oct 24 F81] */
.order-card-comments { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  margin: -4px 18px 10px calc(18px + 4.5rem + 14px); font-size: 0.75rem; font-weight: 600; color: var(--accent); }
.order-card-comments::before { content: ""; width: 14px; height: 14px; background: currentColor;
  -webkit-mask: var(--icon-comment) center / contain no-repeat; mask: var(--icon-comment) center / contain no-repeat; }
.order-card-next { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: var(--touch-size); padding: 10px 18px; border-top: 1px solid var(--line); color: var(--ink);
  font-size: 0.75rem; line-height: 1.45; text-decoration: none; }
.order-card-next::after { content: "\2192"; flex: none; color: var(--accent); font-size: 0.875rem; }
.order-card-act { font-weight: 600; color: var(--accent); font-size: var(--type-sm); }
a.order-card-next:hover { background: color-mix(in srgb, var(--tint) 45%, transparent); }
@media (max-width: 700px) {
  .order-card-main { padding: 14px 14px 12px; gap: 12px; }
  .order-card-next { padding: 10px 14px; }
  .order-card-comments { min-height: var(--touch-size); margin: -10px 14px 0 calc(14px + 4.5rem + 12px); }
}

/* ── The three-numbers row: stat tiles, each a link to what it counts — three across at any width, as the design. ── */
.stat-tiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px;
  margin: 0 0 var(--space-6); }
.stat-tile { display: block; min-width: 0; padding: 16px 18px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-panel); text-decoration: none; }
a.stat-tile:hover { border-color: var(--accent); }
.stat-label { display: block; font-size: var(--type-xs); color: var(--muted-strong); }
.stat-value { display: block; margin: 6px 0; font-size: 1.6875rem; line-height: 1.25; font-weight: 400;
  letter-spacing: -.7px; font-variant-numeric: tabular-nums; }
.stat-note { display: block; font-size: var(--type-xs); line-height: 1.5; color: var(--muted); }
@media (max-width: 700px) {
  .stat-tiles { gap: 8px; }
  .stat-tile { padding: 12px 9px; }
  .stat-label { font-size: var(--type-xs); min-height: 1.8rem; }
  .stat-value { font-size: 1.5625rem; }
  .stat-note { font-size: var(--type-xs); }
}

/* ── "Waiting on you": one short row a thing — what it is, a line of where, one button — the whole row its link. On a
   phone the button drops under the words, at their indent and its own width — never a full-width slab a row, so five
   rows read as five rows (the whole row is the target). [the Approvals lane's finding 3 — lane f0's fix round] ── */
.waiting-rows { margin: 0 0 18px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-panel); }
.waiting-row { display: flex; align-items: center; gap: 14px; padding: 13px 18px; color: var(--ink);
  text-decoration: none; border-top: 1px solid var(--line); }
.waiting-row:first-child { border-top: 0; }
.waiting-row:hover { background: color-mix(in srgb, var(--tint) 45%, transparent); }
.waiting-row > .order-pic { width: 3rem; height: 3rem; }
.waiting-icon { flex: none; display: grid; place-items: center; width: 3rem; height: 3rem; color: var(--accent);
  border: 1px solid var(--line); border-radius: var(--radius-panel); }
.waiting-icon::before { content: ""; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.waiting-words { flex: 1; min-width: 0; }
.waiting-words > strong { display: block; font-size: var(--type-sm); font-weight: 600; overflow-wrap: anywhere; }
.waiting-words > small { display: block; margin-top: 3px; font-size: 0.75rem; color: var(--muted);
  overflow-wrap: anywhere; }
.waiting-button { flex: none; min-height: 36px; padding: 7px 15px; font-size: 0.75rem; }
@media (max-width: 700px) {
  .waiting-row { flex-wrap: wrap; align-items: flex-start; padding: 13px 14px; gap: 8px 12px; }
  .waiting-words { flex: 1 1 calc(100% - 3rem - 12px); }
  .waiting-button { flex: none; margin-left: calc(3rem + 12px); min-height: var(--control-size); }
}

/* ── The portal's frame on a phone: the bottom bar — Home · Orders · New order · Approvals · More — on every portal
   page, where a thumb is; More holds the rest of the menu, so the Menu row above the page is gone. The entry you're in
   is marked by weight and a bar over it, never colour alone. The page keeps clear of the bar (and of a phone's own
   home indicator: safe-area insets), a selection's action bar rides above it, and nothing is ever under it.
   [Direction 12 (CHAD-STATED Oct 25 18:15); BATCH_Q Q1 (Chad's yes, Nov 14 21:28) — on a phone this replaces the
   Menu button of Oct 29 22:39 ("Hamburger?"), which the staff side keeps] ── */
[data-icon="more"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Ccircle cx='5' cy='12' r='1.8'/%3E%3Ccircle cx='12' cy='12' r='1.8'/%3E%3Ccircle cx='19' cy='12' r='1.8'/%3E%3C/svg%3E"); }
.bottom-bar { display: none; }
@media (max-width: 700px) {
  .bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr); align-items: stretch; gap: 2px; background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 6px max(6px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom))
      max(6px, env(safe-area-inset-left)); }
  .bar-item { position: relative; display: flex; min-width: 0; margin: 0; }
  .bar-item > form { display: flex; flex: 1; min-width: 0; margin: 0; }
  .bar-item > a, .bar-item > span:not(.pill), .bar-item > summary, .bar-item button { position: relative; flex: 1;
    min-width: 0;
    display: grid; justify-items: center; align-content: center; gap: 3px;
    min-height: calc(var(--touch-size) + 6px); padding: 3px 2px; border: 0; border-radius: var(--radius-action);
    background: none; color: var(--muted-strong); font-size: var(--type-xs); font-weight: 400; line-height: 1.2;
    text-align: center; text-decoration: none; list-style: none; cursor: pointer; }
  .bar-item > summary::-webkit-details-marker { display: none; }
  .bar-item > a::before, .bar-item > span:not(.pill)::before, .bar-item > summary::before,
  .bar-item button::before {
    content: ""; width: 22px; height: 22px; background: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
  .bar-item .here:not(.pill), .bar-more[open] > summary, .bar-more-here > summary { color: var(--ink);
    font-weight: 700; }
  .bar-item .here::after, .bar-more[open] > summary::after, .bar-more-here > summary::after { content: "";
    position: absolute; top: -7px; left: 22%;
    right: 22%; height: 3px; background: var(--trim); border-radius: 0 0 2px 2px; }
  .bar-item > .pill { position: absolute; top: 2px; left: calc(50% + 6px); z-index: 1; padding: 0 5px;
    min-width: 16px; justify-content: center; border-radius: var(--radius-action); pointer-events: none; }
  .bar-new button { background: var(--accent); color: var(--on-accent); font-weight: 600; }
  /* Inside the builder New order is where you are, marked as the others are — never the filled button. */
  .bar-new-here button { background: none; color: var(--ink); font-weight: 700; }
  /* More: a <details> — no script — its sheet over the bar, the page dimmed behind it and the bar itself left as it
     is (another entry is still one tap away); More again closes it, and with the script so does a tap on the dimmed
     page or Escape (static/chrome.js). */
  .bar-more { position: static; }
  .bar-more[open]::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 100vh;
    z-index: 0; background: color-mix(in srgb, var(--chrome-bg) 55%, transparent); }
  .bar-sheet { position: absolute; left: 0; right: 0; bottom: 100%; z-index: 1; display: grid; gap: 2px;
    max-height: calc(100vh - 150px); overflow-y: auto; padding: 10px 10px 12px; background: var(--surface);
    border-top: 1px solid var(--line); border-radius: 12px 12px 0 0;
    box-shadow: 0 -12px 30px color-mix(in srgb, var(--ink) 18%, transparent); }
  .bar-sheet .nav-item > a, .bar-sheet .nav-item > span { min-height: var(--touch-size); padding: 0 12px;
    font-size: 0.9375rem; color: var(--ink); }
  .bar-sheet .nav-item > .here { border-left-color: var(--trim); font-weight: 700; }
  /* An entry with no icon of its own starts where the others' words start. */
  .bar-sheet .nav-item:not([data-icon]) > a, .bar-sheet .nav-item:not([data-icon]) > span { padding-left: 40px; }
  /* Nothing the page needs is ever under the bar. */
  body.has-bar > main { padding-bottom: calc(94px + env(safe-area-inset-bottom)); }
  html:has(body.has-bar) { scroll-padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  body.has-bar .bulk-bar { bottom: calc(72px + env(safe-area-inset-bottom) + var(--space-3)); }
  /* The bar starts an order and holds the rest of the menu, so the header keeps to the brand, the Inbox and the
     person: its own New order (the +) and the menu entries More now carries step aside. Pay-to-order stays — a sum
     is said where it was. */
  body.has-bar .header-action:not(.pay-to-order) { display: none; }
  body.has-bar .account-menu > .nav-item, body.has-bar .account-menu > hr { display: none; }
  /* The brand's whole name: two lines before it is ever cut short. */
  body.portal .brand-copy strong { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; line-height: 1.25; }
  /* Every target in the portal's header is a thumb's: the brand, the Inbox (its count is part of it), the person's
     menu, and Search — the box's own right end, as tall as the box. On every portal page (body.portal) — the design's
     own page too, which has no bar — and never the staff's, whose header keeps its own, where these cut the shop's
     name short. [the design review's S11 — lane f0's fix round; the round's verification, N2 — fix round 2] */
  body.portal .app-header .app-brand { min-height: var(--touch-size); }
  body.portal .app-header .header-link { position: relative; }
  body.portal .app-header .header-link > a, body.portal .app-header .header-link > span:not(.pill) {
    min-width: var(--touch-size); min-height: var(--touch-size); justify-content: center; }
  body.portal .app-header .header-link > a::before,
  body.portal .app-header .header-link > span:not(.pill)::before { width: 22px; height: 22px; }
  body.portal .app-header .header-link .pill { position: absolute; top: 4px; left: calc(50% + 4px);
    pointer-events: none; }
  body.portal .app-header details.account > summary { padding: 8px; }
  /* The person's menu on a phone: Appearance's choices a thumb's size too; the header clear of a phone's own top edge
     once the portal runs as an app. [the design review's P11, P17 — lane f0's fix round] */
  body.portal form.appearance button { min-height: var(--touch-size); }
  /* … and the tabs the person's menu holds where a page has no bar (the design's own page): a thumb's each — the
     menu scrolling within the screen, never running off its foot (Sign out out of reach). */
  body.portal .account-menu > .nav-item { min-height: var(--touch-size); }
  body.portal .account-menu { max-height: calc(100vh - 72px); max-height: calc(100dvh - 72px); overflow-y: auto;
    overscroll-behavior: contain; }
  body.portal .app-header { padding-top: calc(12px + env(safe-area-inset-top)); }
  body.portal .app-header form.global-search { height: var(--touch-size); padding-right: 0; }
  body.portal .app-header form.global-search button { align-self: stretch; min-height: 0; padding: 0 14px;
    border: 0; border-left: 1px solid var(--line); border-radius: 0; }
}
@media print { .bottom-bar { display: none !important; } }
/* A phone's own edges (viewport-fit=cover, so the bottom bar can sit over the home indicator): the page keeps inside
   them on its sides, as it did. */
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }

/* ── The portal's frame at a desk: the page as wide as Direction 12 draws it (1280), and the tabs on the page's own
   edge at any width — never a narrow column under a row of tabs that starts somewhere else. ── */
body.portal-tabs > main { max-width: 1280px; }
@media (min-width: 701px) {
  .portal-nav { padding-inline: max(30px, calc((100% - 1280px) / 2 + 30px)); }
}

/* ── A thing drawn one way on a phone and another at a desk (an order a card there, a table's row here): each is
   in the page once for its width. The phone is the stylesheet's own: 700px. ── */
@media (min-width: 701px) { .at-phone { display: none !important; } }
@media (max-width: 700px) { .at-desk { display: none !important; } }

/* ── The save bar never covers a control: it holds the screen's top, and the box whose change brought it up is moved
   into view under it (static/unsaved.js "uncover"); a section a link lands on stops under it too (scroll-padding,
   Batch M). It never shows in the order builder — a wizard keeps its own draft (static/builder.js; docs/UX_RULES.md 6,
   for forms with a Save button). On a phone it stays clear of the bottom bar: one holds the top, the other the foot.
   [BATCH_Q Q1] ── */
/* ── The finishing run — lane t0: what every table shows (UX rule 1's second half), built once for every list on the
   component (hartsen/lists.py "What a table shows"; templates/lists/; shops/templatetags/lists.py; static/lists.js).
   A list's table is known by its <thead class="list-heads"> (lists/heads.html), so every list has this with no word
   in its own template:
   · figures of one width; money, counts and numbers on the right under a heading on the right (a column's kind);
   · at a desk one line a row, tight and even: secondary words that can't fit are cut with an ellipsis — their whole
     text over the row on hover, tap or the row's focus, the row never moving — while a name the office decides by
     (a client's, a Site's, a design's — kind "name" — and the row's identity) is never cut: it is given its width
     first and takes a second line before it would read like another; a picture is a fixed small box;
   · the page scrolls, and the heading row and its filter row stay at the top of the window as the rows pass under
     them — so Back returns to the row the person opened (the browser keeps the page's place; the script marks the
     row); only a table that still can't fit sideways scrolls sideways in its frame, its tick, picture and identity
     held at the left and its headings still following the page;
   · on a phone a row is a card: its identity first and large, its picture beside it, its status and its one figure on
     that line, a few labelled values under it; the sort is one button on the found line, and what narrows the list is
     said in a line of its own while Filter is shut.
   Without the script nothing is cut and the page scrolls as it did. [CHAD-STATED — Nov 14 21:28 "Some of our table
   views were awful, and since this is essentially a database application - displaying of the data is paramount.";
   Oct 28 V24 "wrap it, never ellipsize it" (of names); Nov 2 18:52 item 9 (wpDataTables); docs/UX_RULES.md 1, 8, 9,
   10; DERIVED — docs/BATCH_Q.md Q10; the fix round's rulings 1, 2, 10, 11, 12 (Code, Nov 15, on the reviews);
   PROPOSAL — every size and shape here, lane t0's] ── */
:root { --list-head: 2.25rem; --list-thumb: 2.5rem; }
thead.list-heads ~ tbody, .list-found, .list-foot { font-variant-numeric: tabular-nums; }
/* A cell of nothing is a quiet dash; a status is its chip; a day never breaks. */
thead.list-heads ~ tbody > tr > td.date { white-space: nowrap; }
/* A thumbnail keeps its box: the page's own "a picture never wider than its place" let a crowded table squeeze a
   piece's picture to a hairline (Inventory at 1280, found on the lane's first look). */
td.thumb img { max-width: none; }
thead.list-heads ~ tbody > tr > td.thumb { line-height: 0; }
/* The found line: how many and each total on the left (or the screen's own views there, the count beside the
   download), "Download these rows" at its right. */
.list-found { justify-content: flex-start; gap: 0.375rem 1rem; }
.list-found > :first-child { margin-right: auto; }
.list-total { white-space: nowrap; }
.list-total strong { color: var(--ink); font-weight: 600; }
.list-download { white-space: nowrap; font-weight: 600; }
.list-download[aria-busy] { opacity: 0.6; pointer-events: none; }
/* The row's own color, so a cell held in place while the table scrolls sideways is never seen through. */
thead.list-heads ~ tbody > tr { --list-row: var(--surface); }
thead.list-heads ~ tbody > tr:hover { --list-row: color-mix(in srgb, var(--tint) 45%, var(--surface)); }
table.select-many > thead.list-heads ~ tbody > tr:has(> td.select input:checked) { --list-row: var(--tint); }
table:not(.rows-table) > thead.list-heads ~ tbody > tr:hover > td { background: var(--list-row); }
/* The row the person opened, found again on Back (the script marks it), and a row a link lands on (#invoice-…): its
   tint and a bar at its left — a shape, never a color alone. [the fix round's ruling 1 ("Back returns to the row the
   person opened"); the design review's P7; docs/UX_RULES.md 9] */
thead.list-heads ~ tbody > tr:is([data-list-opened], :target) { --list-row: color-mix(in srgb, var(--tint) 70%, var(--surface)); }
table:not(.rows-table) > thead.list-heads ~ tbody > tr:is([data-list-opened], :target) > td { background: var(--list-row); }
thead.list-heads ~ tbody > tr:is([data-list-opened], :target) > td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
/* A state that asks for someone to act (an Overdue invoice) wears an outline as well as its word and tone: a second
   shape to scan a column for. [the design review's P1; docs/UX_RULES.md 9] */
thead.list-heads ~ tbody .status.danger { box-shadow: inset 0 0 0 1px currentColor; }
.list-sort > summary { list-style: none; }
.list-sort > summary::-webkit-details-marker { display: none; }
/* A list's "nothing here" words start under Reset, never beside it (the Production queue's empty box ran under the
   button — found on the lane's look). */
.list-frame .list-results > .empty { clear: both; }
/* A cut cell's whole text, laid over its row (static/lists.js draws it on hover, a tap or the row's focus): the row
   keeps its height, so nothing moves under the pointer; it takes no pointer itself — a click goes to what is under
   it. [the fix round's ruling 1 (the design review's S12); PROPOSAL — the shape] */
.list-whole { position: absolute; z-index: 2; box-sizing: border-box; width: max-content; white-space: normal;
  overflow-wrap: break-word;
  background: var(--surface); color: var(--ink); border: 1px solid var(--field-line); border-radius: var(--radius-panel);
  box-shadow: 0 6px 18px #0003; pointer-events: none; }
.list-whole > :is(div, p):is(.small, .muted) { display: block; margin: 0.125rem 0 0; }

@media (min-width: 43.8125rem) {
  .list-on, .list-sort.phone-only, .list-sort > summary { display: none; }
  /* Each cell paints its own line, so a heading held in place keeps the line under it. */
  table:has(> thead.list-heads) { border-collapse: separate; border-spacing: 0; }
  /* The page scrolls; the heading row and the filter row under it stay at the top of the window while the rows pass
     under them — under the save bar and a record's tabs when those hold the top (--list-stuck, the script's). */
  thead.list-heads > tr:first-child > th { position: sticky; top: var(--list-stuck, 0px); z-index: 3;
    height: var(--list-head); padding-top: 0.25rem; padding-bottom: 0.25rem; vertical-align: middle;
    white-space: normal; line-height: 1.3; }
  thead.list-heads > tr:first-child > th > .sort-head { white-space: normal; }
  /* The filter row sits right under the heading row, however tall a long heading's two lines made it (the script
     says the row's height as --list-head-now). */
  thead.list-heads > tr.list-filters > td { position: sticky;
    top: calc(var(--list-stuck, 0px) + var(--list-head-now, var(--list-head)) - 1px); z-index: 3; }
  /* No hairline between two cells held in place: each covers the seam at its right in its own color. */
  thead.list-heads > tr > :is(th, td) { box-shadow: 1px 0 0 var(--surface-alt); }
  th[aria-sort="ascending"], th[aria-sort="descending"] { color: var(--ink); }
  /* A pick or a search under a heading asks its column for room for its own words when nothing is picked (its
     "Any status", its "Panels and riders" — --box-words, the template's, in characters) and fills whatever more the
     column's cells make it (min-width: 100%); never its longest option: a long pick never widens the column. Its
     chosen words are its tooltip (the script's). [the fix round's ruling 11 (the design review's S7); round 2 ("the
     filter's pick takes no more than its column"); round 3 ("a filter box keeps its words readable")] */
  thead.list-heads > tr.list-filters :is(select, input[type=search]) { field-sizing: fixed;
    width: calc(var(--box-words, 2.5rem) + 2rem); min-width: 100%; max-width: none; }
  /* Rows tight and even; everything on the row's middle line. (The floor's queue and the field's screens keep
     their own size: big targets and a picture read across a station — UX_SCREENS' four audiences.) */
  thead.list-heads ~ tbody > tr > td { vertical-align: middle; }
  thead.list-heads ~ tbody > tr > :is(td.thumb, td.select) { width: 1%; }
  body:not(.area-production, .area-field) thead.list-heads ~ tbody > tr > td { padding-top: 0.4375rem;
    padding-bottom: 0.4375rem; }
  /* One size of words down a table: a column a screen wrote small reads at the table's own size. */
  body:not(.area-production, .area-field) .list-results table:not(.rows-table) > thead.list-heads ~ tbody > tr > td.small {
    font-size: inherit; }
  body:not(.area-production, .area-field) thead.list-heads ~ tbody > tr > td.thumb { padding-top: 0.25rem;
    padding-bottom: 0.25rem; }
  body:not(.area-production, .area-field) thead.list-heads ~ tbody > tr > td.thumb :is(img, .thumb-noscript),
  body:not(.area-production, .area-field) thead.list-heads ~ tbody > tr > td.thumb .thumb-none:not(.thumb-why) {
    width: var(--list-thumb); height: var(--list-thumb); }
  body:not(.area-production, .area-field) thead.list-heads ~ tbody > tr > td.thumb .thumb-none:not(.thumb-why) {
    font-size: 0.5625rem; line-height: 1.15; overflow: hidden; }
  /* The table's frame holds nothing back once the script has looked (data-list-box): the page scrolls, so the
     window is what the headings hold to, and the place on Back is the browser's own to keep. */
  .table-wrap[data-list-box]:not([data-wide]) { overflow: visible; }
  /* A row a link lands on (#invoice-…) comes to rest under the headings held over it, never behind them. */
  thead.list-heads ~ tbody > tr { scroll-margin-top: calc(var(--list-stuck, 0px) + var(--list-held, 5rem) + 0.75rem); }
  /* A table too wide for its frame even when its words have given way: it scrolls sideways in its frame — reached by
     the keyboard, its scrollbar thin — the tick, the picture and the cell the rows are known by held at the left
     (data-freeze, from the <thead>'s data-id-col; --held-N their offsets, the script's), a line at their edge. A
     frame that scrolls sideways is the box a held heading holds to, so there the script carries the headings down
     with the page instead (a transform on the <thead>). */
  .table-wrap[data-wide] { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; --list-stuck: 0px; }
  .table-wrap[data-wide]:focus-visible { outline-offset: -3px; }
  .table-wrap[data-wide] > table > thead.list-heads { position: relative; z-index: 4; }
  .table-wrap[data-wide][data-freeze="1"] :is(thead.list-heads, thead.list-heads ~ tbody) > tr > :nth-child(-n+1):not([colspan]),
  .table-wrap[data-wide][data-freeze="2"] :is(thead.list-heads, thead.list-heads ~ tbody) > tr > :nth-child(-n+2):not([colspan]),
  .table-wrap[data-wide][data-freeze="3"] :is(thead.list-heads, thead.list-heads ~ tbody) > tr > :nth-child(-n+3):not([colspan]),
  .table-wrap[data-wide][data-freeze="4"] :is(thead.list-heads, thead.list-heads ~ tbody) > tr > :nth-child(-n+4):not([colspan]) {
    position: sticky; }
  /* Each held cell at the left where the ones before it end — only the held ones: a heading is sticky for the top
     too, so one given a left would hold sideways over another column (round 2: "its headings stand over the wrong
     columns" once scrolled). A held heading or filter cell paints over the ones scrolling under it. */
  .table-wrap[data-wide][data-freeze] :is(thead.list-heads, thead.list-heads ~ tbody) > tr > :nth-child(1):not([colspan]) {
    left: var(--held-1, 0px); }
  .table-wrap[data-wide]:is([data-freeze="2"], [data-freeze="3"], [data-freeze="4"]) :is(thead.list-heads, thead.list-heads ~ tbody) > tr > :nth-child(2) {
    left: var(--held-2, 0px); }
  .table-wrap[data-wide]:is([data-freeze="3"], [data-freeze="4"]) :is(thead.list-heads, thead.list-heads ~ tbody) > tr > :nth-child(3) {
    left: var(--held-3, 0px); }
  .table-wrap[data-wide][data-freeze="4"] :is(thead.list-heads, thead.list-heads ~ tbody) > tr > :nth-child(4) {
    left: var(--held-4, 0px); }
  .table-wrap[data-wide] thead.list-heads ~ tbody > tr > td { background: var(--list-row); }
  .table-wrap[data-wide][data-freeze="1"] :is(thead.list-heads, thead.list-heads ~ tbody) > tr > :nth-child(-n+1),
  .table-wrap[data-wide][data-freeze="2"] :is(thead.list-heads, thead.list-heads ~ tbody) > tr > :nth-child(-n+2),
  .table-wrap[data-wide][data-freeze="3"] :is(thead.list-heads, thead.list-heads ~ tbody) > tr > :nth-child(-n+3),
  .table-wrap[data-wide][data-freeze="4"] :is(thead.list-heads, thead.list-heads ~ tbody) > tr > :nth-child(-n+4) {
    z-index: 5; }
  .table-wrap[data-wide][data-freeze] thead.list-heads ~ tbody > tr > td { z-index: auto; }
  .table-wrap[data-wide][data-freeze="1"] thead.list-heads ~ tbody > tr > td:nth-child(-n+1),
  .table-wrap[data-wide][data-freeze="2"] thead.list-heads ~ tbody > tr > td:nth-child(-n+2),
  .table-wrap[data-wide][data-freeze="3"] thead.list-heads ~ tbody > tr > td:nth-child(-n+3),
  .table-wrap[data-wide][data-freeze="4"] thead.list-heads ~ tbody > tr > td:nth-child(-n+4) { z-index: 1; }
  /* A wide table's sideways scrollbar where the person is: a strip held at the window's foot while the table is in
     view, scrolling it (the script draws it under the table and keeps the two together; the table's own bar is then
     hidden — the keys, a trackpad and Shift+wheel still scroll it). [round 2: "the sideways scroll must be reachable
     where the person is" — a scrollbar in view; PROPOSAL — lane t0's] */
  .list-sideways { position: sticky; bottom: 0; z-index: 4; overflow-x: scroll; overflow-y: hidden;
    background: var(--surface); border-top: 1px solid var(--line); scrollbar-color: var(--muted) var(--surface-alt); }
  .list-sideways > div { height: 1px; }
  .list-sideways:focus { outline: none; }
  .table-wrap[data-wide]:has(+ .list-sideways) { scrollbar-width: none; }
  .table-wrap[data-wide][data-freeze="1"] :is(thead.list-heads, thead.list-heads ~ tbody) > tr > :nth-child(1):not([colspan]),
  .table-wrap[data-wide][data-freeze="2"] :is(thead.list-heads, thead.list-heads ~ tbody) > tr > :nth-child(2):not([colspan]),
  .table-wrap[data-wide][data-freeze="3"] :is(thead.list-heads, thead.list-heads ~ tbody) > tr > :nth-child(3):not([colspan]),
  .table-wrap[data-wide][data-freeze="4"] :is(thead.list-heads, thead.list-heads ~ tbody) > tr > :nth-child(4):not([colspan]) {
    box-shadow: 1px 0 0 var(--line); }
  .table-wrap[data-wide] thead.list-heads ~ tbody > tr:is([data-list-opened], :target) > td:first-child {
    box-shadow: inset 4px 0 0 var(--accent), 1px 0 0 var(--line); }
}
/* A mouse's row holds a smaller button; a finger's keeps the size it had. */
@media (min-width: 43.8125rem) and (pointer: fine) {
  body:not(.area-production, .area-field) thead.list-heads ~ tbody > tr > td :is(.button, button):not(.row-menu-yes) {
    min-height: 1.75rem; padding-top: 0.1875rem; padding-bottom: 0.1875rem; }
  body:not(.area-production, .area-field) thead.list-heads ~ tbody > tr > td details.row-menu > summary { width: 1.75rem;
    height: 1.75rem; }
}
/* One line a row — in a list's results (.list-results: the block that carries the found line, and with it the
   script). A cell holding a box, a button or a menu is never cut. Secondary words — a flag, a note, a status's long
   tail — are cut with an ellipsis where they can't fit, their whole text over the row (the script's .list-whole). A
   name is never cut: a column of kind "name" (a client's, a Site's, a design's — "list-name"), the row's identity (the
   <thead>'s data-id-col), a design's or a file's name, a cell marked .wrap — it wraps at the width it is given, a
   second line before an ellipsis would make two clients read alike [CHAD-STATED — Oct 28 V24 "wrap it, never ellipsize
   it"; the fix round's ruling 2]. The floor's queue keeps its lines as they were. For a browser running scripts only:
   the script shares the frame's width among the columns (static/lists.js — each as wide as its longest value while
   the table fits; when it can't, the secondary words give way first, each down to --list-least and then on to
   --list-floor; then the names wrap, each down to --list-least and the identity to --list-id; only a table that
   can't fit even so scrolls sideways) and says each column's width as --cut-N on the table; until it has, a cell of
   secondary words is cut at --list-cut, by the screen's width and how many columns share it. */
:root { --list-least: 9rem; --list-id: 16rem; --list-floor: 6rem; }
thead.list-heads ~ tbody { --list-cut: clamp(10rem, 30vw, 32rem); }
thead.list-heads:has(> tr > th:nth-child(5)) ~ tbody { --list-cut: clamp(9rem, 24vw, 28rem); }
thead.list-heads:has(> tr > th:nth-child(7)) ~ tbody { --list-cut: clamp(8rem, 18vw, 22rem); }
thead.list-heads:has(> tr > th:nth-child(9)) ~ tbody { --list-cut: clamp(7rem, 14vw, 18rem); }
thead.list-heads ~ tbody > tr > td:nth-child(1) { --cut: var(--cut-1); --wrap: var(--wrap-1, nowrap); }
thead.list-heads ~ tbody > tr > td:nth-child(2) { --cut: var(--cut-2); --wrap: var(--wrap-2, nowrap); }
thead.list-heads ~ tbody > tr > td:nth-child(3) { --cut: var(--cut-3); --wrap: var(--wrap-3, nowrap); }
thead.list-heads ~ tbody > tr > td:nth-child(4) { --cut: var(--cut-4); --wrap: var(--wrap-4, nowrap); }
thead.list-heads ~ tbody > tr > td:nth-child(5) { --cut: var(--cut-5); --wrap: var(--wrap-5, nowrap); }
thead.list-heads ~ tbody > tr > td:nth-child(6) { --cut: var(--cut-6); --wrap: var(--wrap-6, nowrap); }
thead.list-heads ~ tbody > tr > td:nth-child(7) { --cut: var(--cut-7); --wrap: var(--wrap-7, nowrap); }
thead.list-heads ~ tbody > tr > td:nth-child(8) { --cut: var(--cut-8); --wrap: var(--wrap-8, nowrap); }
thead.list-heads ~ tbody > tr > td:nth-child(9) { --cut: var(--cut-9); --wrap: var(--wrap-9, nowrap); }
thead.list-heads ~ tbody > tr > td:nth-child(10) { --cut: var(--cut-10); --wrap: var(--wrap-10, nowrap); }
thead.list-heads ~ tbody > tr > td:nth-child(11) { --cut: var(--cut-11); --wrap: var(--wrap-11, nowrap); }
thead.list-heads ~ tbody > tr > td:nth-child(12) { --cut: var(--cut-12); --wrap: var(--wrap-12, nowrap); }
thead.list-heads ~ tbody > tr > td:nth-child(13) { --cut: var(--cut-13); --wrap: var(--wrap-13, nowrap); }
thead.list-heads ~ tbody > tr > td:nth-child(14) { --cut: var(--cut-14); --wrap: var(--wrap-14, nowrap); }
@media (min-width: 43.8125rem) and (scripting: enabled) {
  /* Secondary words: one line, cut where the column ends. */
  body:not(.area-production, .area-field) .list-results table:not(.rows-table) > thead.list-heads ~ tbody > tr > td:not(.wrap, .file-name):not(:has(.template-name, .file-name)) {
    white-space: var(--wrap, nowrap); overflow-wrap: break-word; }
  body:not(.area-production, .area-field) .list-results table:not(.rows-table) > thead.list-heads ~ tbody > tr > td:not(.thumb, .select, .row-action, .wrap, .file-name, .num, [colspan]):not(:has(input, select, textarea, button, details, .template-name, .file-name)) {
    max-width: var(--cut, var(--list-cut)); overflow: hidden; text-overflow: ellipsis; }
  /* A name — never cut: its whole line while the table has room for it, wrapping at the width the script gives it
     (--wrap-N: normal) when it hasn't. */
  body:not(.area-production, .area-field) .list-results table:not(.rows-table) > thead.list-heads ~ tbody > tr > td:is(.list-name, .wrap, .file-name, :has(.template-name, .file-name)),
  body:not(.area-production, .area-field) .list-results table:not(.rows-table) > thead.list-heads[data-id-col="1"] ~ tbody > tr > td:nth-child(1),
  body:not(.area-production, .area-field) .list-results table:not(.rows-table) > thead.list-heads[data-id-col="2"] ~ tbody > tr > td:nth-child(2),
  body:not(.area-production, .area-field) .list-results table:not(.rows-table) > thead.list-heads[data-id-col="3"] ~ tbody > tr > td:nth-child(3),
  body:not(.area-production, .area-field) .list-results table:not(.rows-table) > thead.list-heads[data-id-col="4"] ~ tbody > tr > td:nth-child(4) {
    white-space: var(--wrap, nowrap); overflow-wrap: break-word; overflow: visible; text-overflow: clip;
    max-width: var(--cut, none); min-width: var(--cut, 0px); }
  /* While the script measures: each column at its longest value — the table as wide as everything on one line
     asks, whatever its frame — then each at its least (a heading on as many lines as it has words, secondary words at
     --list-least, a name at its longest word — the script keeps it at --list-least or more). A box under a heading
     counts at its least width, never at its chosen words'. */
  table.list-measure.list-measure-whole { width: max-content !important; }
  table.list-measure.list-measure-least { width: 0 !important; }
  table.list-measure > thead.list-heads ~ tbody > tr > td { min-width: 0 !important; }
  body:not(.area-production, .area-field) .list-results table.list-measure-whole:not(.rows-table) > thead.list-heads ~ tbody > tr > td {
    max-width: none !important; white-space: nowrap !important; }
  body:not(.area-production, .area-field) .list-results table.list-measure-least:not(.rows-table) > thead.list-heads ~ tbody > tr > td:not(.thumb, .select, .row-action, .wrap, .file-name, .list-name, .num, .date, .state, [colspan]):not(:has(input, select, textarea, button, details, .template-name, .file-name)) {
    max-width: var(--list-floor) !important; }
  /* A status keeps its chip and a day its date: a note after either may give, never under --list-least (the script
     keeps the chip and the day themselves whole — static/lists.js share()). A status is left out of the floor above, which
     out-ranked this rule and measured every chip at --list-floor. [lane q10's found, fixed in the part — lane sp] */
  body:not(.area-production, .area-field) .list-results table.list-measure-least:not(.rows-table) > thead.list-heads ~ tbody > tr > td:is(.state, .date):not(:has(input, select, textarea, button, details)) {
    max-width: var(--list-least) !important; }
  table.list-measure > thead.list-heads > tr.list-filters .list-tick { width: min-content; }
  /* A status's chip is never followed by a stray "…" while it fits: its cell clips, and a chip its column can't hold
     cuts its own words, its whole on hover, tap or focus as any cut cell's. [the design review's P11] */
  body:not(.area-production, .area-field) .list-results table:not(.rows-table) > thead.list-heads ~ tbody > tr > td.state {
    text-overflow: clip; }
  thead.list-heads ~ tbody > tr > td.state > .status:only-child { display: inline-block; max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
  /* A quiet line a cell stacked under its words reads on the same line. */
  body:not(.area-production, .area-field) .list-results table:not(.rows-table) > thead.list-heads ~ tbody > tr > td:not(.wrap, .row-action) > :is(div, p):is(.small, .muted):not(.notice) {
    display: inline; margin: 0 0 0 0.5rem; }
  thead.list-heads ~ tbody > tr > td a:focus-visible { outline-offset: 1px; }
}
@media (max-width: 43.75rem) {
  /* A list whose every box sits under its columns: on a phone Filter and Reset take their own line over the found
     line — as on every other list — never squeezed beside it now that the line holds the download too. */
  .list-frame > .list-bar[data-list-shape=""] { float: none; margin-left: 0; }
  .list-frame > .list-bar[data-list-shape=""] + .list-results > .list-found { margin-top: 0.5rem; min-height: 0; }
  /* A finger's size for everything a finger presses in the frame: Filter, Reset, a screen's own views beside the
     found line, a page's number, the sort. [the fix round's ruling 10 (the design review's S8)] */
  .list-frame :is(.list-line .list-actions .button, .list-fold > summary, .list-found .button) {
    min-height: var(--touch-size); }
  .list-frame .list-results > .empty a { display: inline-flex; align-items: center; min-height: var(--touch-size); }
  .list-frame :is(.list-filters, .list-line) .list-tick,
  .list-frame label.inline:has(> input[type=checkbox]) { display: inline-flex; align-items: center;
    min-height: var(--touch-size); }
  .list-frame :is(.list-filters, .list-line) .list-tick input[type=checkbox],
  .list-frame label.inline > input[type=checkbox] { width: 1.25rem; height: 1.25rem; }
  .list-foot .pager :is(a, .here) { display: inline-flex; align-items: center; justify-content: center;
    min-width: var(--touch-size); min-height: var(--touch-size); }
  /* The download is a desk's: a phone has no use for a spreadsheet's file. [the design review's P12; PROPOSAL] */
  .list-download { display: none; }
  /* The found line on a phone: how many and the sort in force ("· sorted by Client"), and beside it one button,
     Sort ▾, its choices a panel under it. [the fix round's ruling 10 (the design review's S9: "put the sort button on
     the found line's row")] */
  .list-found { align-items: center; }
  .list-found > :not([data-list-found], .list-sort, .list-download) { flex: 1 1 100%; margin-right: 0; }
  .list-found > [data-list-found] { flex: 1 1 0; min-width: 0; margin-right: 0; }
  .list-found > .list-sort { position: relative; flex: none; margin: 0; }
  .list-found > .list-sort .list-sort-now { display: none; }
  .list-found > .list-sort > summary::after { content: "\25BE"; margin-left: 0.375rem; }
  .list-sort > summary { min-height: var(--touch-size); font-size: 0.8125rem; }
  .list-found > .list-sort > .sort-links { position: absolute; right: 0; top: calc(100% + 0.25rem); z-index: 20;
    min-width: 13rem; background: var(--surface); box-shadow: 0 8px 20px #0003; }
  .list-sort > .sort-links { display: grid; margin: 0.375rem 0 0; font-size: 0; border: 1px solid var(--line);
    border-radius: var(--radius-panel); }
  .list-sort > .sort-links > a { display: flex; align-items: center; min-height: var(--touch-size); padding: 0 0.875rem;
    font-size: 0.875rem; text-decoration: none; color: var(--ink); }
  .list-sort > .sort-links > a + .sort-sep + a, .list-sort > .sort-links > a + a { border-top: 1px solid var(--line); }
  .list-sort > .sort-links > a[aria-current] { font-weight: 600; background: var(--tint); }
  .list-sort > .sort-links > .sort-sep { display: none; }
  .list-sort:not(.phone-only) { margin: 0.5rem 0 0; }
  /* What narrows the list, each a finger-sized link that lifts it — while Filter is shut; open, the boxes say it.
     [the fix round's ruling 10 (the design review's S9)] */
  .list-on { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; margin: 0.5rem 0 0; }
  .list-frame:has(> .list-bar [data-list-fold][open]) .list-on { display: none; }
  .list-on-chip { display: inline-flex; align-items: center; gap: 0.375rem; min-height: var(--touch-size); padding: 0.25rem 0.75rem;
    border: 1px solid var(--field-line); border-radius: var(--radius-action); background: var(--surface);
    color: var(--ink); text-decoration: none; font-weight: 600; }
  .list-on-chip > .muted { font-weight: 400; }
  /* A row as a card, short enough to scan thirty: its identity first and large — its tick and its picture before it,
     its status's chip, its one figure (a column's card="figure") and its one action after it, on its line — then the
     few values the card keeps (card=False leaves one to the record), a label over each, two to a line. Every target
     a finger's size. [the fix round's ruling 10 (the design review's S8, S10; lane q15's review, S9)] */
  table.stacks > thead.list-heads ~ tbody > tr { align-items: center; column-gap: 0.75rem; row-gap: 0.25rem;
    padding: 0.375rem 0.75rem 0.625rem; }
  /* Cards never run sideways (their words wrap), so their frame never scrolls — a finger's room around a card's last
     link would otherwise give it a scrollbar of its own. */
  .table-wrap:has(> table.stacks > thead.list-heads) { overflow: visible; }
  table.stacks > thead.list-heads ~ tbody > tr > td { padding: 0; }
  table.stacks > thead.list-heads ~ tbody > tr > td:not([data-label], .select, .thumb, .row-action, [colspan]) {
    flex: 1 1 50%; order: 0; min-width: 0; align-self: center; font-size: 1rem; font-weight: 600; line-height: 1.3;
    overflow-wrap: break-word; }
  /* The identity's own link — the way into the record — a finger's height around its words. */
  table.stacks > thead.list-heads ~ tbody > tr > td:not([data-label], .select, .thumb, .row-action, [colspan]) > a:first-child {
    display: inline-flex; align-items: center; min-height: var(--touch-size); }
  /* Every other link in a card takes a finger: room above and below its words that moves nothing (a link in a
     line of words keeps its line). */
  table.stacks > thead.list-heads ~ tbody > tr > td a:not(.button, .pill, .thumb-link) {
    padding-block: calc((var(--touch-size) - 1em) / 2); }
  table.stacks > thead.list-heads ~ tbody > tr > td:not([data-label], .select, .thumb, .row-action, [colspan]) > a:first-child {
    padding-block: 0; }
  table.stacks > thead.list-heads ~ tbody > tr > td.state[data-label] { flex: 0 0 auto; order: 1; align-self: center; }
  /* The name's line ends after its chip, its figure and its action: the labelled values start a line of their own,
     so the name can give room to its figure rather than push it down. */
  table.stacks > thead.list-heads ~ tbody > tr::after { content: ""; order: 1; flex: 0 0 100%; height: 0; }
  table.stacks > thead.list-heads ~ tbody > tr:has(> td.card-figure) > td:not([data-label], .select, .thumb, .row-action, [colspan]) {
    flex: 1 1 0; }
  /* A ticked card is tinted whole, not cell by cell. */
  table.stacks.select-many > thead.list-heads ~ tbody > tr:has(> td.select input:checked) { background: var(--tint); }
  table.stacks.select-many > thead.list-heads ~ tbody > tr:has(> td.select input:checked) > td { background: none; }
  table.stacks > thead.list-heads ~ tbody > tr > td.state[data-label]::before { content: none; }
  table.stacks > thead.list-heads ~ tbody > tr > td.card-figure:is([data-label], :not([data-label])) { flex: 0 0 auto;
    order: 1; align-self: center; min-width: 0; margin-left: auto; font-size: 0.9375rem; font-weight: 600;
    color: var(--ink); text-align: right; }
  table.stacks > thead.list-heads ~ tbody > tr > td.card-figure[data-label]::before { content: none; }
  table.stacks > thead.list-heads ~ tbody > tr > td.card-off:is([data-label], :not([data-label])) { display: none; }
  table.stacks > thead.list-heads ~ tbody > tr > td.select { flex: 0 0 auto; order: 0; align-self: center; }
  /* A row's tick: a finger's square around it, the tick itself larger. */
  table.stacks > thead.list-heads ~ tbody > tr > td.select { display: flex; align-items: center; justify-content: center;
    min-width: var(--touch-size); min-height: var(--touch-size); margin-left: -0.5rem; }
  table.stacks > thead.list-heads ~ tbody > tr > td.select input[type=checkbox] { width: 1.5rem; height: 1.5rem;
    margin: 0; }
  table.stacks > thead.list-heads ~ tbody > tr > td.thumb { flex: 0 0 auto; order: 0; padding: 0.25rem 0; }
  table.stacks > thead.list-heads ~ tbody > tr > td.thumb :is(img, .thumb-noscript, .thumb-none:not(.thumb-why)) {
    width: 4rem; height: 4rem; }
  table.stacks > thead.list-heads ~ tbody > tr > td.row-action { order: 1; align-self: center; }
  table.stacks > thead.list-heads ~ tbody > tr > td.row-action :is(.button, button, a) { min-height: var(--touch-size);
    min-width: var(--touch-size); }
  table.stacks > thead.list-heads ~ tbody > tr > td.row-action details.row-menu > summary { min-width: var(--touch-size);
    min-height: var(--touch-size); }
  table.stacks > thead.list-heads ~ tbody > tr > td[data-label] { flex: 1 1 calc(50% - 0.375rem); order: 2; min-width: 0;
    font-size: 0.8125rem; line-height: 1.4; overflow-wrap: anywhere; }
  table.stacks > thead.list-heads ~ tbody > tr > td[data-label]::before { display: block; margin: 0 0 1px; }
  table.stacks > thead.list-heads ~ tbody > tr > td[colspan] { flex: 1 1 100%; }
}
@media print {
  thead.list-heads > tr > :is(th, td) { position: static !important; }
  thead.list-heads { transform: none !important; }
  thead.list-heads ~ tbody > tr > td { white-space: normal !important; max-width: none !important; overflow: visible !important; }
  .table-wrap[data-list-box] { overflow: visible !important; }
  .list-download, .list-bar, .list-foot .list-size, .list-whole { display: none !important; }
}
/* A row's flag — a line of words marked by the warning's own rule, a shape beside the words (never a color alone);
   on a phone's card a cell of running words (.long) takes the whole line. [lane t0; docs/UX_RULES.md 9] */
.row-flag { padding-left: 0.5rem; border-left: 3px solid var(--warning); }
@media (max-width: 43.75rem) {
  table.stacks > thead.list-heads ~ tbody > tr > td.long[data-label] { flex-basis: 100%; }
}
/* Lane q14 (Going live, the fix round) — the way back stays in view. A screen opened to fix something carries the
   way back to the task ("← Back to Going live") once, at its top; opened at a section far down a long screen (a
   vendor's costs, a client's build styles) it was thousands of pixels above, and nothing in view said where a Save
   would go. On the staff side it now holds the top of the screen as the page scrolls — under the unsaved-changes bar
   when that shows, above a record's tabs — and on a phone it is a full touch target. [CHAD-STATED — Oct 24 F27, F30
   "the fix returns you to the task"; the design review of q14, S14 and S11; Code's ruling 9, Nov 15; PROPOSAL — the
   design reviewer's, the builder's shapes] */
body.staff #content > p.return-to { position: sticky; top: 0; z-index: 4; margin: 0 0 var(--space-3);
  padding: 6px 0; background: var(--canvas); box-shadow: 0 1px 0 var(--line); }
body.staff.save-bar-shown #content > p.return-to { top: var(--save-bar-height, 70px); }
body.staff #content:has(> p.return-to) .record-tabs { top: 1.875rem; }
body.staff.save-bar-shown #content:has(> p.return-to) .record-tabs {
  top: calc(var(--save-bar-height, 70px) + 1.875rem); }
html:has(body.staff #content > p.return-to) { scroll-padding-top: 2.5rem; }
html:has(body.staff.save-bar-shown #content > p.return-to) {
  scroll-padding-top: calc(var(--save-bar-height, 70px) + 2.5rem); }
@media (max-width: 43.75rem) {
  body.staff #content > p.return-to { padding: 0; }
  body.staff #content > p.return-to > a { display: inline-flex; align-items: center; min-height: var(--touch-size); }
  body.staff #content:has(> p.return-to) .record-tabs { top: var(--touch-size); }
  body.staff.save-bar-shown #content:has(> p.return-to) .record-tabs {
    top: calc(var(--save-bar-height, 70px) + var(--touch-size)); }
  html:has(body.staff #content > p.return-to) { scroll-padding-top: calc(var(--touch-size) + var(--space-2)); }
}

/* ── The finishing run — lane h1: the client's Home, Orders and Approvals. One contiguous block. The screens' own
   layout is static/portal_home.css; here only what every portal page shows. ── */
/* The count on Approvals — at a desk beside the tab, on the phone at its icon's shoulder (where lane f0's bar places
   it): a small filled badge, a number in a shape, in the tone of what waits on you — never the tab row's own plain
   words. [BATCH_Q Q1 "the count on Approvals is what waits on this person"; PROPOSAL — lane h1's P13] */
.portal-nav .nav-item > .pill, .bottom-bar .bar-item > .pill { display: inline-flex; align-self: center; min-height: 0;
  min-width: 1.25rem; justify-content: center; padding: 1px 6px; border: 0; border-radius: var(--radius-action);
  background: var(--warning); color: var(--surface); font-size: 0.6875rem; font-weight: 700; line-height: 1.35; }
.portal-nav .nav-item:has(> .pill) { display: flex; align-items: center; gap: 2px; }
/* ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
   The finishing run — lane q6: New order's door (templates/builder/_door.html; orders.door). One contiguous block.
   At a desk the header's New order goes straight to the builder and a quiet ▾ beside it opens the other ways; on a
   phone the bottom bar's New order opens them as one sheet, a row each with one line of words. Every colour is a token;
   a way is a word and an icon, never colour alone. [BATCH_Q Q1 "New order is one door"; CHAD-STATED — Nov 14 22:20;
   PROPOSAL — lane q6: the shapes]
   ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════ */
[data-icon="camera"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8h4l2-3h6l2 3h4v12H3Z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E"); }
[data-icon="wrench"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 6.5a4 4 0 0 0 5 5L21 13l-8 8-3-3 8-8-1.5-1.5a4 4 0 0 0-5-5L13 1l-2 2Z'/%3E%3Cpath d='m3 21 5-5'/%3E%3C/svg%3E"); }
[data-icon="note"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h10l4 4v14H5Z'/%3E%3Cpath d='M15 3v4h4M8 12h8M8 16h6'/%3E%3C/svg%3E"); }

/* The desk: [+ New order] and, beside it, a quiet ▾ — the other ways, one click away. On a phone the bar's New order
   is the door, so the header's steps aside with it (f0's rule for the + alone). */
.door-split { display: inline-flex; align-items: center; gap: 6px; position: relative; flex-shrink: 0; }
.app-brand + .door-split { margin-left: auto; }
@media (max-width: 700px) { body.has-bar .door-split { display: none; } }
.door-more { position: relative; }
.door-more > summary { display: grid; place-items: center; width: 40px; height: 40px; list-style: none; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--chrome-ink) 45%, transparent); border-radius: var(--radius-action);
  color: var(--chrome-ink); }
.door-more > summary::-webkit-details-marker { display: none; }
.door-more > summary:hover, .door-more[open] > summary {
  background: color-mix(in srgb, var(--chrome-ink) 14%, transparent); }
.door-more > summary:focus-visible { outline: 3px solid var(--chrome-ink); outline-offset: 2px; }
.door-caret { width: 9px; height: 9px; margin-top: -4px; border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.door-more[open] .door-caret { margin-top: 4px; transform: rotate(-135deg); }
/* The ▾ says what it is in a word where the header has room; its name is always its label. [the design review's P2] */
.door-more-word { display: none; font-size: var(--type-sm); font-weight: 600; }
@media (min-width: 1100px) {
  .door-more > summary { width: auto; grid-auto-flow: column; gap: 8px; padding: 0 12px 0 14px; }
  .door-more-word { display: inline; }
}
.door-hint { margin: 0 6px 6px; font-size: var(--type-sm); color: var(--muted); }
.door-again-box:empty { display: none; }
.door-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 40; width: 380px; max-height: 75vh;
  overflow-y: auto; display: grid; gap: 2px; padding: var(--space-3); background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-panel);
  box-shadow: 0 16px 40px color-mix(in srgb, var(--ink) 22%, transparent); }
.door-menu form { margin: 0; }
.door-label { margin: 2px 6px 4px; font-size: var(--type-xs); font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: var(--muted); }
.door-again { display: grid; gap: 2px; margin-bottom: var(--space-2); padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--line); }
.door-again-item { display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%;
  min-height: var(--touch-size); padding: 6px 10px; border: 0; border-radius: var(--radius-panel);
  background: transparent; color: var(--ink); text-align: left; font-size: inherit; font-weight: 400; }
.door-again-item:hover { background: var(--tint); filter: none; }
.door-again-art { display: grid; place-items: center; flex: none; width: 64px; height: 44px; overflow: hidden;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-status); }
.door-again-art img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.door-again-words strong, .door-row-words strong { display: block; font-size: var(--type-base); font-weight: 600; }
.door-again-words small { display: block; font-size: var(--type-xs); color: var(--muted); }
/* A way in: its icon, its name, one line of what it is. The whole row is the button or the link. */
.door-row { display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%;
  min-height: calc(var(--touch-size) + 8px); margin: 0; padding: 8px 10px; border: 0; border-radius: var(--radius-panel);
  background: transparent; color: var(--ink); text-align: left; text-decoration: none; font-size: inherit;
  font-weight: 400; line-height: 1.35; cursor: pointer; }
.door-row:hover { background: var(--tint); filter: none; }
.door-row::before { content: ""; flex: none; width: 22px; height: 22px; background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.door-row-words { display: grid; gap: 1px; min-width: 0; }
.door-row-words > span { font-size: var(--type-sm); color: var(--muted); line-height: 1.35; }

/* The phone: the sheet the bar's New order opens, from the screen's foot, the page dimmed behind it. */
dialog.door-sheet { position: fixed; inset: auto 0 0 0; width: 100%; max-width: none; max-height: calc(100vh - 60px);
  margin: 0; overflow-y: auto; padding: 6px max(12px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
  background: var(--surface); color: var(--ink); border: 0; border-top: 1px solid var(--line);
  border-radius: 14px 14px 0 0; box-shadow: 0 -12px 30px color-mix(in srgb, var(--ink) 18%, transparent); }
dialog.door-sheet form { margin: 0; }
.door-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 2px 6px 10px; }
.door-sheet-title { margin: 0; font-size: var(--type-lg); font-weight: 700; }
.door-close { min-width: var(--touch-size); min-height: var(--touch-size); padding: 0; border: 0; background: transparent;
  color: var(--muted); font-size: 1.75rem; line-height: 1; font-weight: 400; }
dialog.door-sheet .door-row { border-top: 1px solid var(--line); border-radius: 0; min-height: 64px; }
dialog.door-sheet .door-sheet-head + .door-row, dialog.door-sheet .door-sheet-head + form > .door-row { border-top: 0; }
dialog.door-sheet .door-row[data-door="here"] { color: var(--ink); font-weight: 600; }
dialog.door-sheet .door-row[data-door="here"]::before { width: 26px; height: 26px; }
@media print { dialog.door-sheet { display: none !important; } }

/* ── The finishing run — lane q10's fix round: ticks that last — the select-then-act pattern's bar, built once for
   every list that ticks rows (hartsen/ticks.py; templates/ticks/; static/ticks.js). The ticks survive a search, a sort,
   a filter, a page turn and a refused request; the bar shows while anything is ticked, says how many and how many
   aren't in view, shows them and clears them, says a refusal beside the buttons that asked, and carries the screen's
   own fields and buttons. One contiguous block. [CHAD-STATED — Oct 26 17:40 the select-then-act pattern; Oct 24 F11,
   F12; DERIVED — Code's ruling 1 of lane q10's fix round; the run's design review of lane q10, S1, S2, S9; PROPOSAL —
   every shape here, lane q10's] ── */
/* The ticks' form is laid out as its parent's, so the bar inside it stays at the screen's foot while the list is in
   view (a sticky box keeps to its parent's box). */
.ticks-form { display: contents; }
/* The form's first button, the one a browser's Enter presses: drawn (so it is the one pressed) but out of sight and
   out of the keyboard's way; it only shows the page again with the ticks kept. */
.ticks-default { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; border: 0;
  clip-path: inset(50%); white-space: nowrap; }
.ticks-bar { gap: var(--space-2) var(--space-4); }
.ticks-bar > .ticks-said { display: grid; flex: 1 1 100%; gap: var(--space-2); }
.ticks-bar > .ticks-said:empty { display: none; }
.ticks-bar > .ticks-said .notice { margin: 0; }
.ticks-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-4); margin: 0 auto 0 0; }
.ticks-bar .ticks-count { margin-right: 0; }
.ticks-link { display: inline-flex; align-items: center; min-height: var(--control-size); color: var(--chrome-ink);
  font-size: var(--type-sm); font-weight: 600; }
.ticks-link:focus-visible, .ticks-bar summary:focus-visible { outline: 2px solid var(--chrome-ink); outline-offset: 2px; }
/* Clear is a button of the form (it works without the script), dressed as the link beside Show them. */
.bulk-bar .ticks-line > button.ticks-link { min-height: var(--control-size); padding: 0; border: 0; background: none;
  color: var(--chrome-ink); font-size: var(--type-sm); font-weight: 600; text-decoration: underline; }
.bulk-bar .ticks-line > button.ticks-link[hidden] { display: none; }
/* Without the script the bar shows while a box in view is ticked. */
[data-ticks-section]:has(input[data-tick]:checked) .ticks-bar { display: flex; }
/* A row's tick takes a finger: its whole cell is its label. */
.ticks-box { display: inline-flex; align-items: center; justify-content: center; min-width: var(--space-8);
  min-height: var(--space-8); margin: 0; cursor: pointer; }
.ticks-box > input { margin: 0; }
/* The bar's main button has a shape on the bar's dark ground: the light fill, beside the outlined others — on every
   canvas, high contrast too (the accent's fill read 1.35:1 on the bar, 1.02:1 in high contrast — Inventory's one
   button the same). [the run's design review of lane q10, S9] */
.bulk-bar :is(button, .button):not(.secondary, .danger, [disabled]) { background: var(--chrome-ink);
  border-color: var(--chrome-ink); color: var(--chrome-bg); }
.bulk-bar :is(button, .button).secondary { background: transparent; color: var(--chrome-ink);
  border-color: color-mix(in srgb, var(--chrome-ink) 60%, transparent); }
/* A field in the bar: its words beside its box, on the bar's ground. */
.ticks-field { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); margin: 0;
  color: var(--chrome-ink); font-size: var(--type-sm); font-weight: 400; }
.ticks-field select { width: auto; min-width: 0; max-width: 22rem; min-height: var(--control-size); }
.ticks-field[hidden] { display: none; }
.ticks-acts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-left: auto; }
/* The main request first in the form — so nothing else is the one a form's Enter would reach — and last on the bar. */
.ticks-acts > .secondary { order: -1; }
.ticks-bar a:not(.button) { color: var(--chrome-ink); }
/* A request that asks more before it's made opens from its button, in the bar: its fields, then the buttons that make
   it. [Code's ruling 5 of lane q10's fix round: "not an always-open form under the table"] */
.ticks-ask { margin: 0; }
.ticks-ask[open] { flex: 1 1 100%; }
.ticks-ask > summary { list-style: none; }
.ticks-ask > summary::-webkit-details-marker { display: none; }
.bulk-bar .ticks-ask[open] > summary.button { background: transparent; color: var(--chrome-ink);
  border-color: color-mix(in srgb, var(--chrome-ink) 60%, transparent); }
.ticks-ask-panel { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4);
  margin-top: var(--space-2); padding-top: var(--space-2);
  border-top: 1px solid color-mix(in srgb, var(--chrome-ink) 30%, transparent); }
.ticks-ask-panel > .ticks-acts { margin-left: auto; }
@media (max-width: 43.75rem) {
  .ticks-bar { gap: var(--space-2); padding: var(--space-2) var(--space-3); }
  .ticks-line { flex: 1 1 100%; }
  .ticks-link { min-height: var(--touch-size); }
  .ticks-acts { flex: 1 1 100%; justify-content: flex-end; }
  .ticks-acts > :is(button, .button, details > summary) { min-height: var(--touch-size); }
  .ticks-field { flex: 1 1 100%; font-size: var(--type-xs); }
  .ticks-field select { flex: 1 1 100%; width: 100%; max-width: 100%; }
  .ticks-box { min-width: var(--touch-size); min-height: var(--touch-size); margin: calc(-1 * var(--space-3)) 0
    calc(-1 * var(--space-3)) calc(-1 * var(--space-3)); }
}

/* ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
   The finishing run — lane q12: the office's first screens made safe. One contiguous block.
   [BATCH_Q Q12 (Chad's yes, Nov 14 21:28); docs/UX_RULES.md 3, 4, 9; PROPOSAL — the shapes and sizes]
   The parts: a page's rare actions (shops/templatetags/page_menu.py — .page-act, .page-menu, .page-panel); the staff's
   where-it-stands card (templates/staff/_order_stands.html — .staff-stands); the queue line (.queue-line); a form that
   opens from its button (.form-fold); a confirm step (.confirm-step). The Dashboard's ranked Attention is its own
   page's: static/dashboard.css.
   ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════ */

/* ── A page's rare actions: the header's ⋯ and its quiet header actions — a <details> each, its button opening a panel
   that says first what the action does and to what, then its boxes, then the one button that acts. At a desk the panel
   floats under its button, lined up with the header's right edge; on a phone it opens in place, the screen's width. ── */
.page-act, .page-menu { position: relative; display: inline-flex; }
.page-act > summary, .page-menu > summary, .page-menu-item > summary { list-style: none; cursor: pointer; }
.page-act > summary::-webkit-details-marker, .page-menu > summary::-webkit-details-marker,
.page-menu-item > summary::-webkit-details-marker { display: none; }
.page-act > summary, .page-menu > summary { white-space: nowrap; }
.page-act[open] > summary, .page-menu[open] > summary { border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent); }
.page-menu-open > span[aria-hidden] { font-size: 1.125rem; line-height: 1; letter-spacing: 1px; }
.page-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(27rem, calc(100vw - 2rem));
  padding: var(--space-4); text-align: left; white-space: normal; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-panel); box-shadow: 0 10px 30px color-mix(in srgb, var(--chrome-bg) 28%, transparent);
  font-size: var(--type-sm); }
.page-menu-panel { padding: 0.375rem; }
.page-menu-item > summary { display: flex; align-items: center; gap: 8px; min-height: var(--control-size);
  padding: 8px 12px; border-radius: var(--radius-panel); font-weight: 600; }
.page-menu-item > summary:hover, .page-menu-item[open] > summary { background: var(--tint); }
.page-menu-item > summary:focus-visible, .page-act > summary:focus-visible, .page-menu > summary:focus-visible {
  outline: 3px solid var(--focus-ring); outline-offset: 2px; }
/* An action that takes something out of use reads so in words first; its colour only supports them. */
.page-menu-danger > summary { color: var(--danger); }
.page-menu-item + .page-menu-item { border-top: 1px solid var(--line); }
.page-menu-body { padding: var(--space-2) 12px var(--space-3); }
.page-panel form { margin: 0; }
.page-panel .field, .page-panel form p { margin-bottom: var(--space-3); }
.page-panel .page-ask { margin: 0 0 var(--space-3); line-height: 1.5; }
.page-panel .page-ask strong { display: block; margin-bottom: 2px; font-size: var(--type-base); }
.page-panel .actions { margin-top: var(--space-3); }
.page-panel .muted { color: var(--muted-strong); }
.page-panel textarea { min-height: 4.5rem; }
/* No action left for this reader, no header actions box. */
.page-actions:not(:has(*)) { display: none; }
/* The way out sits before the button that acts; the words a dangerous one opens on take the keyboard quietly (a ring
   only when it came by the keyboard). [Code's ruling 1, the q12 fix round] */
.page-panel .actions { display: flex; flex-wrap: wrap; gap: var(--space-2) 10px; }
.page-ask[tabindex]:focus { outline: none; }
.page-ask[tabindex]:focus-visible, .notice[tabindex]:focus-visible { outline: 2px solid var(--focus-ring);
  outline-offset: 6px; border-radius: var(--radius-action); }                   /* clear of the words [V6] */
/* The page's main action is first in the markup — the keyboard reaches it first — and drawn last and strongest at a
   desk. [the review's S11] */
@media (min-width: 701px) {
  .page-actions > details { order: -1; }
}
@media (max-width: 700px) {
  /* The main action takes the first line, then each rare action a line of its own: opening one never moves another
     under the finger. [the review's P2] */
  .page-actions > a.button, .page-actions > form, .page-actions > details { flex: 1 1 100%; }
  .page-act > summary, .page-menu > summary { width: 100%; min-height: var(--touch-size); }
  .page-menu-item > summary { min-height: var(--touch-size); }
  .page-act, .page-menu { display: block; }
  .page-panel { position: static; width: auto; margin-top: var(--space-2); box-shadow: none; }
  .page-panel .actions > button { flex: 1 1 auto; min-height: var(--touch-size); }
}

/* ── Where the order stands, for the office: Current · Next · Due, each a label and its value, the tracker beside them
   (f0's .stands frame: two columns at a desk, the tracker under them on a phone). ── */
.staff-stands .staff-now { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline;
  gap: 7px var(--space-4); margin: 0; }
.staff-now dt { font-size: var(--type-xs); font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--muted-strong); white-space: nowrap; }
.staff-now dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-size: var(--type-base); line-height: 1.4; }
.staff-now .staff-now-line { font-weight: 600; }
.staff-now a { font-weight: 600; }
/* Late, in words, in a shape: the tracker's own mark. */
.staff-now .late-word, .att-late-word { display: inline-block; margin-left: 4px; padding: 1px 7px; vertical-align: 1px;
  border: 1px solid var(--danger); border-radius: var(--radius-status); color: var(--danger); font-size: var(--type-xs);
  font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  background: color-mix(in srgb, var(--danger) 11%, var(--surface)); }
/* At a desk the three facts share one line, each its label over its value, and the tracker takes the card's whole width
   under them — six steps (Invoiced · Paid on the end) read on one line each, never a column of wrapped words. */
.staff-stands > .tracker { margin-top: var(--space-5); }
@media (min-width: 900px) {
  .stands.staff-stands { display: block; }
  .staff-stands .staff-now { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto; grid-auto-flow: column; gap: 4px var(--space-6); }
  .staff-stands > .tracker { margin-top: var(--space-5); }
}

/* ── The list an order was opened from: under its header, the list, how many are left, Skip to the next. ── */
.queue-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-4); margin: 0 0 var(--space-4);
  padding: 2px 14px; font-size: var(--type-sm); color: var(--muted-strong); background: var(--surface-alt);
  border-radius: var(--radius-panel); }
.queue-line > span { padding: 8px 0; }
.queue-line a { font-weight: 600; }
.queue-line .queue-next { margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--control-size); }
@media (max-width: 700px) {
  .queue-line .queue-next, .queue-line .queue-list { display: inline-flex; align-items: center;
    min-height: var(--touch-size); }
}

/* ── A form that opens from its button: a rare change, out of the open until it's asked for (UX_RULES 3) — open again
   when it was refused or has something to say. ── */
details.form-fold { margin: 0 0 var(--space-4); }
details.form-fold > summary { list-style: none; cursor: pointer; }
details.form-fold > summary::-webkit-details-marker { display: none; }
details.form-fold[open] > summary { margin-bottom: var(--space-3); border-color: var(--accent); }
details.form-fold > form.card { margin-bottom: 0; }

/* ── A confirm step: a rare action on a line (a quote's line, a child invoice, a build style) — its button opens the
   question beside it, and only the red button there acts. No red button in the open (UX_RULES 4). ── */
details.confirm-step { display: inline-block; vertical-align: middle; }
details.confirm-step > summary { list-style: none; cursor: pointer; }
details.confirm-step > summary::-webkit-details-marker { display: none; }
details.confirm-step[open] > summary { border-color: var(--accent); }
.confirm-step-body { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px;
  padding: 8px 10px; border: 1px solid var(--line); border-left: 3px solid var(--warning);
  border-radius: var(--radius-panel); background: var(--surface-alt); font-size: var(--type-sm); }
@media (max-width: 700px) {
  details.confirm-step > summary, .confirm-step-body button { min-height: var(--touch-size); }
}

/* ══════════════════════════════════════════════════════════════════════════════════════════════════════════════════
   The finishing run — lane sp: the office's shared parts — the record page's frame, the money lines, the decision list.
   One contiguous block. Every colour, size and space is a token from the top of this file; the dark canvas, High
   contrast and Larger text read through them. [docs/BATCH_S.md S1, S2, S3; PROPOSAL — every shape here, lane sp]
   ══════════════════════════════════════════════════════════════════════════════════════════════════════════════════ */

/* ── S1 · The record page's frame (templates/parts/record.html): what it is small and the thing large, a line of chips
   under it, the page's actions right; then where it stands; then at a desk the main column and the rail (⅔ · ⅓) — on
   one column the rail's cards first (they're first in the markup). ── */
.record-head { margin-bottom: var(--space-4); }
.record-kind { margin: 0 0 2px; font-size: var(--type-xs); font-weight: 600; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--muted); }
.record-title > h1 { margin: 0; overflow-wrap: anywhere; }
.record-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-4);
  margin: var(--space-2) 0 0; padding: 0; list-style: none; font-size: var(--type-sm); color: var(--muted-strong); }
.record-chips:not(:has(li)) { display: none; }
.record-chips > li { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 1.5rem; }
/* A record's main action is first in the markup (the keyboard reaches it first) and drawn last and strongest at a desk,
   after its quiet links — q12's part draws the ⋯ first. [q12's contract 1] */
@media (min-width: 701px) {
  .record-head .page-actions > :first-child:is(a.button, form):not(.secondary) { order: 1; }
}
.record-said:not(:has(*)) { display: none; }
.record-said > .notice { margin: 0 0 var(--space-3); }
/* Where it stands: one sentence, what's next, the facts it stands on. Its edge says the tone in a shape as well as a
   colour — a thicker bar when it's late, a quiet one when it's closed — and its words always say it. */
.record-stands { padding: var(--space-4) var(--space-5); border-left: 3px solid var(--info); }
.record-now { margin: 0; font-size: var(--type-lg); font-weight: 600; line-height: 1.3; }
.record-next { margin: 6px 0 0; color: var(--muted-strong); }
.record-facts { margin: var(--space-2) 0 0; color: var(--muted); }
.record-stands-you { border-left-color: var(--warning); }
.record-stands-done { border-left-color: var(--success); }
.record-stands-stopped { border-left-color: var(--muted); border-left-style: dashed; }
.record-stands-late { border-left: 6px solid var(--danger); }
.record-body { display: flex; flex-direction: column; }
.record-rail:not(:has(*)) { display: none; }
@media (min-width: 68.75rem) {
  .record-body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(17rem, 1fr); grid-template-areas: "main rail";
    gap: 0 var(--space-5); align-items: start; }
  .record-body > .record-main { grid-area: main; min-width: 0; }
  .record-body > .record-rail { grid-area: rail; min-width: 0; }
  .record-body:not(:has(> .record-rail *)) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main"; }
}
.record-card-title { margin: 0 0 var(--space-3); font-size: var(--type-base); }
.record-picture { display: block; margin: 0 0 var(--space-3); line-height: 0; }
.record-picture > .order-pic { width: 100%; height: auto; aspect-ratio: 3 / 2; max-height: 10rem; }
@media (min-width: 68.75rem) {
  .record-picture > .order-pic { max-height: 16rem; }
}
/* A tablet's one column: the rail's cards two across, so the record's own content isn't a screen away. */
@media (min-width: 43.8125rem) and (max-width: 68.6875rem) {
  .record-rail:has(> :nth-child(2)) { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    column-gap: var(--space-4); align-items: start; }
}
.record-card-name { margin: 0 0 2px; font-weight: 600; }
.record-card-figure { margin: 0 0 var(--space-1); font-size: var(--type-lg); font-weight: 600;
  font-variant-numeric: tabular-nums; }
.record-section > h2 { margin-top: 0; }
.record-rows { margin: 0; padding: 0; list-style: none; }
.record-rows > li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3);
  padding: var(--space-2) 0; border-bottom: 1px solid var(--line); font-size: var(--type-sm); }
.record-rows > li:last-child { border-bottom: 0; }
.record-rows .num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pay-link-row > input[readonly] { flex: 1 1 18rem; min-width: 0; }

/* The timeline (templates/parts/timeline.html) — pattern 11 (the base .timeline: a dot and a line down the side): what
   happened, then who · when, newest first; a notice's dot an open ring and its kind said in a word; All · History ·
   Notices as three choices, the rest hidden by the stylesheet (no script); a limited timeline shows its newest few
   until Show all. */
.timeline-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-2) var(--space-4); margin: 0 0 var(--space-3); }
.timeline-head > h2 { margin: 0; }
.timeline-filter { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-action);
  overflow: hidden; }
.timeline-filter > input { position: absolute; opacity: 0; pointer-events: none; }
.timeline-filter > label { margin: 0; padding: 6px 12px; font-size: var(--type-sm); font-weight: 600; cursor: pointer;
  color: var(--muted-strong); }
.timeline-filter > input:checked + label { background: var(--accent); color: var(--on-accent); }
.timeline-filter > input:focus-visible + label { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.record-timeline[data-limited]:not(:has(.tl-expand:checked)) .timeline-filter { display: none; }
.record-timeline .timeline > li:last-child { padding-bottom: 0; }
.record-timeline .timeline > li.tl-notice::before { background: var(--surface); border: 2px solid var(--info);
  box-sizing: border-box; left: -5px; width: 9px; height: 9px; }
.tl-what { margin: 0; font-size: var(--type-base); overflow-wrap: anywhere; }
.tl-kind { font-size: var(--type-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--info); }
.tl-meta { margin: 2px 0 0; font-size: var(--type-xs); color: var(--muted); }
.record-timeline .tl-more { display: none; }
.record-timeline:has(.tl-expand:checked) .tl-more { display: list-item; }
.record-timeline:has(.tl-show-history:checked) .timeline > li:not(.tl-history),
.record-timeline:has(.tl-show-notices:checked) .timeline > li:not(.tl-notice) { display: none; }
.tl-all { margin: var(--space-3) 0 0; }
.tl-expand { position: absolute; opacity: 0; pointer-events: none; }
.tl-expand:focus-visible + label { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.tl-expand + label { display: inline-flex; margin: 0; }
.tl-expand:checked + label .tl-expand-more, .tl-expand:not(:checked) + label .tl-expand-less { display: none; }

/* ── S3 · The money lines (templates/parts/money_lines.html): the lines at their own figures' width, the client's words
   wrapping, never cut; under them the subtotal, the tax, the total, what was received and the balance, each label at
   the right of its figure's column, the balance the strongest. ── */
.money-lines { padding: var(--space-4) var(--space-5); }
.money-lines-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: var(--space-1) var(--space-4); margin: 0 0 var(--space-2); }
.money-lines-head > h2 { margin: 0; }
.money-lines .list-found { margin: 0 0 var(--space-2); }
.money-lines-table td.lines-words { white-space: normal; }
.money-lines-table > tfoot > tr > th, .money-lines-table > tfoot > tr > td { padding-top: 7px; padding-bottom: 7px;
  border-bottom: 0; background: none; font-size: var(--type-sm); letter-spacing: 0; text-transform: none;
  color: var(--ink); white-space: normal; }
.money-lines-table > tfoot > tr > th { text-align: right; font-weight: 400; }
.money-lines-table > tfoot > tr.lines-sub > * { border-top: 1px solid var(--line); }
.money-lines-table > tfoot > tr:is(.lines-total, .lines-balance) > * { font-weight: 700; }
.money-lines-table > tfoot > tr.lines-total > * { border-top: 1px solid var(--line); }
.money-lines-table > tfoot > tr.lines-balance > td { font-size: var(--type-lg); }
.money-lines-table > tfoot .lines-tax-later { font-weight: 400; }
.money-lines-said { margin: var(--space-2) 0 0; }
td.money-lines-none { text-align: left; padding: var(--space-3) 14px; }
/* A quote's edit mode: a new line's boxes in one row at a desk — Item, the client's words (the widest), Qty, the price
   of one, its total as typed, Add line — the total following the typing (static/money_lines.js). */
.money-lines-add { margin: var(--space-4) 0 0; padding: var(--space-3) 0 0; border-top: 1px solid var(--line); }
.money-lines-add-title { margin: 0 0 var(--space-2); font-size: var(--type-base); }
.money-lines-add-row { display: grid; grid-template-columns: minmax(9rem, 1.2fr) minmax(12rem, 2.4fr) 5rem 7.5rem 7rem auto;
  gap: var(--space-2) var(--space-3); align-items: end; }
.money-lines-add-row > .field { margin: 0; }
.money-lines-add-row input, .money-lines-add-row select { width: 100%; }
.money-lines-add-total { text-align: right; }
.money-lines-add-total > .label { display: block; margin-bottom: 6px; font-size: var(--type-sm); font-weight: 600; }
.money-lines-add-total > output { display: block; min-height: var(--control-size); line-height: var(--control-size);
  font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 68.6875rem) {
  .money-lines-add-row { grid-template-columns: 1fr 1fr; }
  .money-lines-add-row > .money-lines-add-words { grid-column: 1 / -1; }
}
@media (max-width: 43.75rem) {
  .money-lines { padding: var(--space-3) var(--space-3) var(--space-4); }
  .money-lines-table > tfoot { display: block; border-top: 1px solid var(--line); }
  .money-lines-table > tfoot > tr:first-child:has(> th) { display: flex; }      /* not a heading row: the subtotal */
  .money-lines-table > tfoot > tr { display: flex; justify-content: space-between; align-items: baseline;
    gap: var(--space-3); padding: 0.375rem 0.75rem; border: 0; }
  .money-lines-table > tfoot > tr > th, .money-lines-table > tfoot > tr > td { display: block; flex: 0 1 auto;
    order: 0; padding: 0; border: 0; }
  .money-lines-table > tfoot > tr > th { text-align: left; }
  .money-lines-table > tfoot > tr > td:empty { display: none; }
  .money-lines-table > tfoot > tr.lines-sub > *, .money-lines-table > tfoot > tr.lines-total > * { border-top: 0; }
  .money-lines-add-row { grid-template-columns: 1fr; }
  .money-lines-add-row > .field :is(input, select), .money-lines-add-go > button { min-height: var(--touch-size); }
}

/* The economics card (templates/parts/economics.html): the figures as label over value, two or three across. */
.econ > h2 { margin: 0 0 var(--space-3); font-size: var(--type-base); }
.econ-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: var(--space-3);
  margin: 0; }
.econ-figures > div { min-width: 0; }
.econ-figures dt { font-size: var(--type-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--muted); }
.econ-figures dd { margin: 2px 0 0; font-size: var(--type-lg); font-weight: 600; font-variant-numeric: tabular-nums; }
.econ-figures .econ-owed dd { color: var(--ink); }
.econ-cost { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.econ-invoice, .econ-said { margin: var(--space-3) 0 0; }

/* ── S2 · The decision list (templates/parts/decide_keys.html, static/decide.js): a list with the chosen row's panel
   beside it at a desk — the panel held in view while the list scrolls past it (sticky), the chosen row marked by a bar
   and a tint (and aria-selected, read aloud), never colour alone; the stylesheet tells the script the panel stands
   beside the list (--decide-beside: 1) — where it doesn't, a row's choosing link opens the record instead. A screen
   places its own grid (dashboard.css); these are the part's marks. ── */
.decide { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.decide-panel { min-width: 0; }
@media (min-width: 68.8125rem) {
  .decide { grid-template-columns: minmax(0, 1fr) minmax(16rem, 18.5rem); --decide-beside: 1; }
  .decide > .decide-panel { position: sticky; top: var(--space-4); max-height: calc(100vh - 2 * var(--space-4));
    overflow-y: auto; overscroll-behavior: contain; }
}
@media (max-width: 68.75rem) {
  .decide > .decide-panel { display: none; }
}
.decide [data-decide-row] { scroll-margin-top: var(--space-6); scroll-margin-bottom: var(--space-6); }
.decide [data-decide-row][aria-selected="true"] > td { background: var(--tint); }
.decide [data-decide-row][aria-selected="true"] > td:first-child { box-shadow: inset 4px 0 var(--accent); }
.decide-panel[aria-busy="true"] { opacity: 0.72; transition: opacity 120ms ease 120ms; }
.decide-panel .notice { margin: 0 0 var(--space-3); }
.decide-panel .notice:focus { outline: none; }
.decide-panel .notice:focus-visible, .decide-panel .notice[tabindex]:focus-visible { outline: 2px solid var(--focus-ring);
  outline-offset: 3px; border-radius: var(--radius-panel); }
.decide-press { margin: 0; }
.decide-press > button { width: 100%; }
/* The keys: a quiet button beside the list's heading (the script shows it), and a focused dialog saying them. */
kbd { display: inline-block; min-width: 1.5em; padding: 1px 5px; border: 1px solid var(--field-line);
  border-bottom-width: 2px; border-radius: var(--radius-input); background: var(--surface); color: var(--ink);
  font: 600 var(--type-xs)/1.4 var(--font); text-align: center; }
.decide-keys-open { min-height: 32px; padding: 4px 10px; gap: 6px; font-size: var(--type-xs); }
.decide-keys-body { padding: var(--space-5); }
.decide-keys-body > h2 { margin: 0 0 var(--space-3); }
.decide-keys-list { display: grid; gap: var(--space-2); margin: 0 0 var(--space-3); }
.decide-keys-list > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); align-items: baseline;
  gap: var(--space-3); }
.decide-keys-list dt { display: flex; gap: var(--space-1); }
.decide-keys-list dd { margin: 0; }
/* Below a desk the decision list has no panel beside it: no keys, no chosen row's mark (a row opens its record). */
@media (max-width: 68.75rem) {
  .decide-keys-open { display: none !important; }
  .decide [data-decide-row][aria-selected="true"] > td { background: none; box-shadow: none; }
}

/* ── The staff header on a phone: the shop's whole name, in up to three short lines inside the header's own height —
   never cut to "THE HART…" (lane f0's found; BATCH_S S1 "this part's only change" to the frame). The staff tag steps
   aside there: the menu says whose side this is. [PROPOSAL — lane sp] ── */
@media (max-width: 700px) {
  body.staff .app-header .app-brand { gap: 8px; }
  body.staff .brand-copy strong { white-space: normal; overflow-wrap: break-word; font-size: 0.75rem;
    letter-spacing: 0.4px; line-height: 1.17; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
    line-clamp: 3; overflow: hidden; text-overflow: clip; }
  body.staff .brand-copy small { display: none; }
}
/* ── The finishing run — lane sx (BATCH_S S14): the row editor's new parts, for every screen built on it — what names a
   row when no box does, first and held at the left as the row scrolls sideways (a client's margins); a computed note
   as its figure on one line, its working one click away in the row's side panel ("$2.17/SF"); read-only facts; a long
   record's side panel opened by Edit; a long table's find box, ticks and pages inside its frame (UX_RULES 1); the shop's
   own numbers as a record of labelled boxes, never a row wider than the desk. [UX_RULES 1, 2, 8; PROPOSAL — lane sx:
   every size and shape here] ── */
table.rows-table th.rows-name { position: sticky; left: 0; z-index: 1; min-width: 12rem; max-width: 22rem;
  background: var(--surface); box-shadow: 1px 0 0 var(--line); text-align: left; font-weight: 600; white-space: normal;
  overflow-wrap: anywhere; vertical-align: middle; }
table.rows-table thead th.rows-name { background: var(--surface-alt); z-index: 2; }
table.rows-table tbody th.rows-name { font-size: var(--type-base); text-transform: none; letter-spacing: 0;
  color: var(--ink); min-width: 14rem; }
table.rows-table td.rows-figure { max-width: none; white-space: nowrap; overflow-wrap: normal;
  font-variant-numeric: tabular-nums; }
table.rows-table td.rows-fact { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* A box as wide as its value needs: a number or a sum of money (48.00, 0.900, 62.58) a number's width; a first-column
   pick a name's; the cells a shade tighter — so a row's columns fit the desk at 1280, and at 1024 what gives way is
   the lesser boxes, never what a person decides by (below). [the fix round, Code's ruling 4 (the design review's S2);
   t0's rule: names never cut, days and figures never give way] */
table.rows-table th, table.rows-table td { padding-inline: 6px; }
table.rows-table tbody td input[type=number]:not([type=hidden]),
table.rows-table tbody td input[inputmode=decimal]:not([type=hidden]) { width: 4.75rem; min-width: 4.5rem; }
table.rows-table tbody td:first-child select { min-width: 9rem; }
/* What a person decides by holds its place while the boxes scroll: the row's name at the left; its figure and its Last
   confirmed at the right, beside the ⋯ — the boxes between them scroll sideways when the desk is narrower than the
   row (static/rows.js measures the held columns' widths; without it the row scrolls whole, as before). */
table.rows-table.rows-frozen :is(th, td).rows-confirmed { position: sticky; right: var(--rows-action-w, 0px); z-index: 1;
  background: var(--surface); box-shadow: -1px 0 0 var(--line); }
table.rows-table.rows-frozen :is(th, td).rows-figure { position: sticky;
  right: calc(var(--rows-action-w, 0px) + var(--rows-confirmed-w, 0px)); z-index: 1; background: var(--surface);
  box-shadow: -1px 0 0 var(--line); }
table.rows-table.rows-frozen thead :is(th.rows-confirmed, th.rows-figure) { background: var(--surface-alt); }
table.rows-table.rows-frozen tbody.add-row td:is(.rows-confirmed, .rows-figure) { background: var(--tint); }
table.rows-table td.rows-confirmed { white-space: normal; min-width: 7.5rem; }
table.rows-table td.rows-confirmed .pill { white-space: nowrap; }
details.rows-working > summary { cursor: pointer; }
details.rows-working { max-width: none; }
details.rows-working .panel-preview { overflow: visible; text-overflow: clip; min-width: max-content; }
.rows-figure-value { font-size: var(--type-sm); color: var(--ink); text-decoration: underline dotted var(--muted);
  text-underline-offset: 4px; }
details.rows-working > summary:hover .rows-figure-value { color: var(--accent); text-decoration-color: currentColor; }
.rows-working-words { margin: 0; font-size: var(--type-base); line-height: 1.55; }
details.row-panel { max-width: none; }
/* A side panel opened from a row's action cell keeps to the screen's right (that cell spaces its buttons apart). */
table.rows-table td.row-action > dialog.side-panel { margin: 0 0 0 auto; }
.row-panel-body .field { margin: 0 0 var(--space-3); }
.row-panel-body .field label { display: block; margin-bottom: 4px; font-weight: 600; }
.row-panel-body .field label.inline { display: inline-flex; gap: 6px; align-items: center; }
.row-panel-body input:not([type=checkbox]), .row-panel-body select, .row-panel-body textarea { width: 100%; }
.side-panel-body .row-panel-body textarea, .row-panel-body textarea { min-height: 6rem; }
/* A colour as a swatch beside its #RRGGBB in words — never a colour alone (UX_RULES 9). The colour is runtime data,
   handed in as --swatch. */
.swatch { display: inline-block; width: 1rem; height: 1rem; border-radius: 3px; background: var(--swatch);
  border: 1px solid var(--field-line); vertical-align: -3px; }
.swatch-words { margin: 0 0.75rem 0 0.3rem; font-variant-numeric: tabular-nums; }
/* The find line: the box, the ticks, how many it found, Reset — one slim line in the table's frame. */
.rows-find { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4);
  padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--line); background: var(--surface); }
.rows-find input[type=search] { flex: 0 1 18rem; min-width: 10rem; min-height: var(--control-size); }
.rows-find-tick { margin: 0; }
.rows-found { font-variant-numeric: tabular-nums; }
.rows-find-end { display: inline-flex; gap: var(--space-2); margin-left: auto; }
.js-rows .rows-find-go { display: none; }
.rows-find-said { margin: var(--space-2) var(--space-3); }
.rows-pager { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-3); border-top: 1px solid var(--line); }
.rows-page { display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; min-height: 2rem;
  padding: 0 6px; border-radius: var(--radius-panel); font-variant-numeric: tabular-nums; }
span.rows-page[aria-current] { font-weight: 700; border: 1px solid var(--ink); }
/* A box the reader can't change reads as its value, never as a field waiting for typing. [the design review of lane sx,
   P9] */
table.rows-table td :is(input, select, textarea):disabled { background: var(--surface-alt); border-color: transparent;
  color: var(--ink); -webkit-text-fill-color: var(--ink); opacity: 1; }
/* Zones' days four and three to a line, never seven stacked. [the design review of lane sx, P6] */
table.zones-table td.zone-days { min-width: 12.5rem; max-width: 15rem; }
table.zones-table td.zone-days label.inline { display: inline-flex; align-items: center; gap: 3px; margin: 0 6px 2px 0; }
/* … and a zone's ZIP list shown short, its Edit always in view at a desk — the whole list opens in its panel. [Code,
   landing sx] */
table.zones-table .panel-preview { max-width: 8rem; }
/* Settings' Attention as a table: what · since · where it's fixed (templates/staff/settings_hub.html). */
table.attention-table { width: 100%; }
table.attention-table th, table.attention-table td { padding: 8px 12px; vertical-align: top; }
table.attention-table td.attention-what { min-width: 18rem; }
table.attention-table td.attention-since { white-space: nowrap; color: var(--muted-strong);
  font-variant-numeric: tabular-nums; }
table.attention-table td form { margin: 0; }
/* The shop's own numbers, a record: each box with its label, as many across as the width holds. */
.rows-record { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: var(--space-3) var(--space-4);
  padding: var(--space-4); margin-bottom: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-panel);
  background: var(--surface); align-items: end; }
.rows-record-box { margin: 0; }
.rows-record-box label { display: block; margin-bottom: 4px; font-size: var(--type-sm); font-weight: 600; }
.rows-record-box input:not([type=checkbox]), .rows-record-box select { width: 100%; }
.rows-record-said { grid-column: 1 / -1; }
@media (max-width: 43.75rem) {
  /* A line with no day says no "Since" on a phone's card. [the design review of lane sx, P2] */
  table.attention-table td.attention-no-day { display: none; }
  /* A finger's size: a row's Edit, the side panel's Close and Done, a figure that opens its working. [P3] */
  details.row-panel > summary .button, .side-panel-head .button, .side-panel-head button, .side-panel-foot button {
    min-height: var(--touch-size); }
  details.rows-working > summary { display: inline-flex; align-items: center; min-height: var(--touch-size); }
  .rows-record { gap: var(--space-2) var(--space-3); }
  table.rows-table tr > th.rows-name { display: block; flex: 1 1 60%; order: 0; min-width: 0; max-width: none;
    position: static; padding: 0.25rem 0; box-shadow: none; background: none; font-size: 1rem; }
  table.rows-table td.rows-figure, table.rows-table td.rows-fact { white-space: normal; }
  table.rows-table.rows-frozen :is(th, td):is(.rows-confirmed, .rows-figure) { position: static; box-shadow: none;
    background: none; }
  /* A row's number boxes two to a line on a phone: a client's four margins read as a short card, not a column. */
  table.rows-table tr > td:has(> input[type=number]) { flex: 1 1 calc(50% - 0.75rem); min-width: 8rem; }
  /* … and a card's first box keeps its own line beside the row's actions, so a pair of numbers never squeezes it —
     only a first cell that is a box (a picture or a tick keeps its own rule: Hardware, Bins). [the design review of
     lane sx, S3] */
  table.rows-table tr > td:first-child:has(> select, > input:not([type=checkbox]):not([type=hidden])) { flex: 1 1 60%; }
  table.rows-table tbody td :is(input[type=number], input[inputmode=decimal]):not([type=hidden]) { width: 100%; }
  .rows-find { padding: var(--space-2); }
  .rows-find input[type=search] { flex: 1 1 100%; min-height: var(--touch-size); font-size: 1rem; }
  .rows-find-end { margin-left: 0; }
  .rows-page { min-width: var(--touch-size); min-height: var(--touch-size); }
  .rows-pager .button { min-height: var(--touch-size); }
  .rows-record { grid-template-columns: minmax(0, 1fr); padding: var(--space-3); }
}
/* ── The finishing run, lane rparts: the crew's parts (BATCH_R R2–R4) — the photo step and the crew's sends
   (parts/photo_step.html, static/crew_send.js), the sign drawn large (parts/crew_sign.html), the big stop row
   (parts/stop_row.html), the one-button bar (parts/action_bar.html), and the field area in daylight. For an installer:
   gloves, sunlight, one hand — every control at least --field-size and kept 8 px apart, the next thing the biggest, a
   state always a word and a mark, nothing they need in the muted tone. [BATCH_R R2, R4; UX_RULES 9, 10] ── */

/* The field area in daylight: what's muted elsewhere is a shade deeper here — the muted tone is the first to wash out
   in the sun — and two controls side by side keep 8 px apart. [BATCH_R R4 "nothing needed in the muted tone"] */
body.area-field main .muted { color: var(--muted-strong); }
body.area-field main .actions { gap: var(--space-2) var(--space-3); }
body.area-field main .notice { font-size: 1rem; }

/* What the crew's script says beside a send: going, not sent for want of a signal, not kept, sent. A word on a bar of
   its own, never colour alone. */
.crew-said { margin: var(--space-3) 0 0; padding: 10px 14px; border: 1px solid var(--line);
  border-left: 4px solid var(--info); border-radius: var(--radius-panel); background: var(--surface);
  color: var(--ink); font-weight: 600; line-height: 1.4; }
.crew-said[data-tone="unsent"] { border-left-color: var(--warning); }
.crew-said[data-tone="refused"] { border-left-color: var(--danger); }
.crew-said[data-tone="taken"] { border-left-color: var(--success); }
button[aria-busy="true"] { cursor: progress; }

/* The photo step: the head says which set and how many of how many; the button opens the camera, the biggest thing
   while the set needs photos, quiet once the shop's count is in; the photos under it, the one just taken among them
   with its word. [R2] */
.photo-steps { display: grid; gap: var(--space-4); margin: var(--space-4) 0; }
.photo-step { padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-panel);
  background: var(--surface); }
.photo-step-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3);
  margin: 0 0 var(--space-3); font-size: 1.125rem; line-height: 1.3; }
.photo-step-count { white-space: nowrap; font-size: 1rem; font-weight: 700; }
.photo-step-done .photo-step-count { color: var(--success); }
.photo-step-form { display: grid; gap: var(--space-2); margin: 0; }
/* Without the crew's script the box shows the photo chosen and Send sends it; with it, the box is the camera's, out of
   sight but still reached from the keyboard, and each photo sends itself. [Code's ruling 6 in the fix round] */
.photo-step-plain { display: grid; gap: var(--space-2); }
html.crew-js .photo-step-plain { display: contents; }
html.crew-js .photo-step-file { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  clip-path: inset(50%); white-space: nowrap; }
html.crew-js .photo-step-send { display: none; }
.photo-step-take { width: 100%; font-size: 1.0625rem; }
body.area-field main .photo-step-take, body.area-field main .action-bar-go { min-height: calc(var(--field-size) + 8px); }
.photo-step-form:has(.photo-step-file:focus-visible) .photo-step-take { outline: 3px solid var(--focus-ring);
  outline-offset: 3px; }
/* One filled button on the screen — the bar's: the step's camera button and its Send again are quiet beside a bar (it
   opens the same camera, and sends the same photos again); without a bar the step's own button is the filled one.
   [Code's ruling 7 in the fix round; the design review's S3] */
body:not(:has([data-action-bar])) .photo-step:not(.photo-step-done) .photo-step-take:not(.photo-step-take-quiet),
body:not(:has([data-action-bar])) .photo-step-again { border-color: var(--accent); background: var(--accent);
  color: var(--on-accent); }
.photo-step-icon { flex: none; width: 1.375rem; height: 1.375rem; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 3 7.2 5H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-3.2L15 3H9Zm3 5a5 5 0 1 1 0 10 5 5 0 0 1 0-10Zm0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 3 7.2 5H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-3.2L15 3H9Zm3 5a5 5 0 1 1 0 10 5 5 0 0 1 0-10Zm0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.photo-step-again { width: 100%; }
.photo-step-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: var(--space-2);
  margin: var(--space-3) 0 0; padding: 0; list-style: none; }
.photo-step-shots:empty { display: none; }
.photo-step-shots li { position: relative; margin: 0; }
.photo-step-shots img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover;
  border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface-alt); }
.photo-step-pending img { border: 2px dashed var(--info); }
.photo-step-pending[data-state="unsent"] img { border-color: var(--warning); }
.photo-step-pending[data-state="refused"] img { border-color: var(--danger); opacity: .6; }
.photo-step-pending[data-state="taken"] img { border-style: solid; border-color: var(--success); }
.photo-step-undrawn img { visibility: hidden; }
.photo-step-undrawn { border: 2px dashed var(--line); border-radius: var(--radius-panel); background: var(--surface-alt); }
.photo-step-word { position: absolute; inset: auto 4px 4px; padding: 2px 4px; border-radius: var(--radius-status);
  background: var(--surface); color: var(--ink); font-size: 0.9375rem; font-weight: 700; line-height: 1.3;
  text-align: center; }

/* The sign drawn large: the engine's drawing on its own paper (art is drawn for white, on every canvas), as wide as
   the column and never taller than a phone's half screen; how it stands said under it, on the page's own ground. [R3] */
.crew-sign { margin: 0 0 var(--space-3); }
.crew-sign img { display: block; width: 100%; height: auto; max-height: 18rem; aspect-ratio: var(--ar, auto);
  object-fit: contain; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-panel);
  background: var(--paper); }
.crew-sign figcaption { padding-top: 6px; color: var(--ink); font-size: 0.9375rem; line-height: 1.4; }
.crew-sign-none { display: grid; place-items: center; min-height: 6rem; padding: var(--space-3); border: 1px dashed var(--line);
  border-radius: var(--radius-panel); background: var(--surface-alt); color: var(--muted-strong); text-align: center; }

/* The big stop row: the whole row is the target. The sign on the left; the number and Site large with the state beside
   them as a word and a mark; the window; the job's kind as a word and a shape, and whose. The stop the crew is at is
   marked with a bar down its left edge and a tint, as the design marks it. A second job at the same stop is joined
   under the first. [R4] */
.stop-rows { display: grid; gap: var(--space-2); margin: var(--space-4) 0; padding: 0; list-style: none; }
.stop-rows > li { margin: 0; }
.stop-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--space-3);
  min-height: calc(var(--field-size) + 24px); padding: var(--space-3); border: 1px solid var(--line);
  border-left: 4px solid var(--line); border-radius: var(--radius-panel); background: var(--surface);
  color: var(--ink); text-decoration: none; }
a.stop-row:hover { border-color: var(--accent); }
.stop-row-pic:empty { display: none; }
.stop-row:has(> .stop-row-pic:empty), .stop-row-compact { grid-template-columns: minmax(0, 1fr); }
.stop-row-pic .order-pic { width: 4rem; height: 4rem; }
.stop-row-main { display: grid; gap: 3px; min-width: 0; }
.stop-row-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-2); }
.stop-row-site { flex: 1 1 auto; min-width: 0; font-size: 1.125rem; font-weight: 700; line-height: 1.25;
  overflow-wrap: anywhere; }
.stop-row-number { display: inline-grid; place-items: center; min-width: 1.75rem; height: 1.75rem; margin-right: 2px;
  padding: 0 4px; border: 1.5px solid currentColor; border-radius: 999px; font-size: 0.9375rem; vertical-align: 1px; }
.stop-row-when { font-size: 1rem; font-weight: 600; }
.stop-row-kinds { display: flex; flex-wrap: wrap; gap: 2px var(--space-3); font-size: 0.9375rem; }
.stop-row-kind { white-space: nowrap; }
.stop-row-note { margin-top: 4px; padding-left: 8px; border-left: 3px solid var(--warning); font-weight: 600;
  line-height: 1.35; }
.stop-row-state { flex: none; padding: 4px 9px; border: 1px solid var(--line); border-radius: var(--radius-status);
  background: var(--surface); font-size: 0.9375rem; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.stop-row-now { border-left-color: var(--trim); background: var(--tint); }
.stop-row-now .stop-row-state { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.stop-row-next { border-left-color: var(--accent); }
.stop-row-next .stop-row-state { border-color: var(--accent); color: var(--accent); }
.stop-row-done { background: var(--surface-alt); }
.stop-row-done .stop-row-state { color: var(--success); }
.stop-row-sent_back { border-left-color: var(--warning); }
.stop-row-sent_back .stop-row-state { border-color: var(--warning); color: var(--warning); }
.stop-row-cancelled { background: var(--surface-alt); }
.stop-row-cancelled .stop-row-state { border-style: dashed; color: var(--muted-strong); }
.stop-row-still_open { border-left-color: var(--info); }
.stop-row-still_open .stop-row-state { border-color: var(--info); color: var(--info); }
.stop-row-where { font-size: 0.9375rem; line-height: 1.35; }
.stop-row-access { flex-basis: 100%; font-weight: 700; overflow-wrap: anywhere; }
.stop-row-run { border-style: dashed; }
/* A second job at the same stop steps in under it, joined by an elbow drawn in the gap — the rows keep their 8 px
   apart, so a gloved tap never lands between two cards. */
.stop-row-also { position: relative; min-height: var(--field-size); margin-left: var(--space-6); }
.stop-row-also::before { content: ""; position: absolute; left: calc(-1 * var(--space-6) + 6px);
  top: calc(-1 * var(--space-2) - 1px); width: calc(var(--space-6) - 10px); height: calc(50% + var(--space-2));
  border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); border-bottom-left-radius: 8px; }
.stop-row-also-head { font-size: 1rem; }
.stop-row-compact { min-height: var(--field-size); padding-block: var(--space-2); }
.stop-row-compact .stop-row-site { font-size: 1rem; font-weight: 600; }

/* The one-button bar: the next thing, in the thumb's reach. It holds to the foot of the screen while the page scrolls
   under it, and comes to rest after the last control — so it never covers one — reaching the column's edges; a box
   that takes the focus is scrolled clear of it. [R4; DERIVED — as body.has-bar .bulk-bar keeps clear of the portal's
   bar] */
.action-bar { position: sticky; bottom: 0; z-index: 20; display: grid; gap: var(--space-2);
  margin: var(--space-5) -26px 0; padding: var(--space-3) 26px calc(var(--space-3) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--surface);
  box-shadow: 0 -8px 18px color-mix(in srgb, var(--ink) 10%, transparent); }
body:not(.with-nav) > main .action-bar { margin-inline: -30px; padding-inline: 30px; }
.action-bar-go { width: 100%; max-width: 34rem; min-height: calc(var(--field-size) + 8px); justify-self: center;
  font-size: 1.125rem; }
.action-bar-form { display: grid; margin: 0; }
.action-bar-form > .action-bar-go { justify-self: center; }
.action-bar-note { margin: 0; color: var(--ink); font-weight: 600; text-align: center; }
/* While anything waits to be sent again, the bar says why above its Send again — in view, never under the bar. [Code's
   ruling 7; the design review's S2] */
.action-bar-note[data-tone="unsent"] { padding: 6px 10px; border-left: 4px solid var(--warning); text-align: left;
  line-height: 1.35; }
.action-bar-note[data-tone="refused"] { padding: 6px 10px; border-left: 4px solid var(--danger); text-align: left;
  line-height: 1.35; }
html:has(.action-bar) { scroll-padding-bottom: calc(var(--field-size) + 56px); }
/* The resting bar meets the screen's foot: the page's own foot room is the bar's. [the design review's P3] */
body.with-nav > main:has(.action-bar), body:not(.with-nav) > main:has(.action-bar) { padding-bottom: 0; }
/* At a desk the parts keep a phone's column of reading — the step's button and a row's state near their words.
   [the design review's P8] */
@media (min-width: 701px) { .stop-rows, .photo-steps { max-width: 44rem; } }
@media (max-width: 700px) {
  .action-bar, body:not(.with-nav) > main .action-bar { margin-inline: -16px; padding-inline: 16px; }
  .stop-row { gap: var(--space-2) var(--space-3); padding: var(--space-3) 10px var(--space-3) var(--space-3); }
  .stop-row-pic .order-pic { width: 3.5rem; height: 3.5rem; }
  .stop-row-also .order-pic { width: 2.75rem; height: 2.75rem; }
}
@media print { .action-bar { position: static; box-shadow: none; } }
/* ── The finishing run — lane sf: the staff search box's type-ahead (docs/BATCH_S.md S17; static/search_ahead.js;
   templates/_search_ahead.html) — under the box, the first matches of each kind: an order with its picture and its
   chip, then the other kinds, each row its record's link; last, every result. The chosen row is tinted and marked at
   its left (a shape, never colour alone); every row a finger's height on a phone; the list scrolls within itself, so the
   page never moves under it. And search's results, each kind a table (hartsen.search_tables): their tables are the
   shared part's; only the group's head line is search's. [Direction 12's staff-home .search-results; UX_RULES 9, 10;
   PROPOSAL — every size here, lane sf's] ── */
form.global-search { position: relative; }
.search-ahead { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60; min-width: 18rem;
  max-height: min(70vh, 34rem); overflow: auto; overscroll-behavior: contain; padding: var(--space-1) 0;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-panel);
  box-shadow: 0 16px 40px color-mix(in srgb, var(--ink) 22%, transparent); text-transform: none; letter-spacing: normal; }
.search-ahead[hidden] { display: none; }
.ahead-group + .ahead-group { border-top: 1px solid var(--line); }
.ahead-kind { margin: 0; padding: var(--space-2) var(--space-3) var(--space-1); font-size: var(--type-xs);
  font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--muted-strong); }
.ahead-more { font-weight: 400; text-transform: none; letter-spacing: normal; }
.ahead-row { display: flex; align-items: center; gap: var(--space-3); min-height: var(--control-size);
  padding: var(--space-1) var(--space-3); color: var(--ink); text-decoration: none; font-size: var(--type-sm);
  border-left: 3px solid transparent; }
.ahead-row:hover, .ahead-row[aria-selected="true"] { background: var(--tint); border-left-color: var(--accent); }
.ahead-row[aria-selected="true"] .ahead-title strong { text-decoration: underline; text-underline-offset: 3px; }
.ahead-pic { flex: none; line-height: 0; }
.ahead-pic .order-pic { width: 2.5rem; height: 2.5rem; }
.ahead-pic .order-pic-none > span { font-size: 0.5625rem; }
.ahead-words { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.ahead-title { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--space-2); }
.ahead-title .status { font-size: var(--type-xs); }
.ahead-words small { color: var(--muted-strong); font-size: var(--type-xs); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.ahead-none { margin: 0; padding: var(--space-3); color: var(--muted-strong); font-size: var(--type-sm); }
.ahead-all { border-top: 1px solid var(--line); font-weight: 600; position: sticky; bottom: calc(-1 * var(--space-1));
  background: var(--surface); }                    /* every result always in view at the list's foot [review P8] */
.ahead-all:hover, .ahead-all[aria-selected="true"] { background: var(--tint); }
/* A placeholder's words don't fit a 40-px box (f0's part, at its smallest): here the line beside it says what the order
   is, so the box keeps its dashed shape alone. [the design review of lane sf, P10] */
.ahead-pic .order-pic-none > span { display: none; }
.ahead-all kbd { margin-left: auto; font: 0.625rem var(--font); padding: 2px 5px; border: 1px solid var(--line);
  border-radius: 3px; color: var(--muted); white-space: nowrap; }
@media (max-width: 43.75rem) {
  .search-ahead { min-width: 0; max-height: 60vh; }
  .ahead-row { min-height: var(--touch-size); }
  .ahead-all kbd { display: none; }
}
/* Search's results: each kind's head line — its name, how many — over its table; the table is the shared part's. */
.search-group { margin: 0 0 var(--space-5); }
.search-group > h2 { display: flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-2); }
.search-group .search-cut { margin: var(--space-2) 0 0; font-size: var(--type-sm); }
/* An order's invoice words step aside on a narrow desk, as the Orders tables' Work does (static/orders_tables.css): the
   number, the names, the chip, the day and the amount stay whole. [lane q10's rule; PROPOSAL — lane sf, the width] */
@media (min-width: 43.8125rem) and (max-width: 74.9375rem) {
  table.search-orders .col-invoice { display: none; }
}
/* Search's orders say who ordered each (a caller's name finds their orders): the Orders tables hide Orderer under
   1,600 px; here it stays from 1,200 px, giving way before the Site below it, and on a phone's card it's a line,
   "Ordered by …". The invoice — its state in a chip, then its number — is held whole, and on a phone it's a line of
   the card. [the design review of lane sf, S2, S3; lane t0's rule: identifiers and chips never cut] */
.search-invoice { white-space: nowrap; }
/* Three names a row (client, Site, orderer) beside a chip, a day, an invoice and a figure: here a name takes its second
   line sooner (the table part's --list-least), so the row fits a 1,280 desk whole instead of sliding sideways. */
table.orders-list.search-orders { --list-least: 6.5rem; }
@media (min-width: 75rem) {
  table.orders-list.search-orders .col-orderer { display: table-cell; }
}
@media (min-width: 43.8125rem) and (max-width: 74.9375rem) {
  table.orders-list.search-orders .col-orderer { display: none; }
}
@media (max-width: 43.75rem) {
  table.stacks.orders-list.search-orders > tbody > tr > td.col-orderer { display: block; grid-area: work;
    color: var(--muted); font-size: var(--type-xs); }
  table.stacks.orders-list.search-orders > tbody > tr > td.col-orderer::before { content: "Ordered by "; }
  table.stacks.orders-list.search-orders > tbody > tr > td.col-invoice { grid-area: fact; justify-self: start;
    text-align: left; }
}

/* ══════════════════════════════════════════════════════════════════════════════════════════════════════════════════
   The finishing run — lane sp: the office's shared parts — the record page's frame, the money lines, the decision list.
   One contiguous block. Every colour, size and space is a token from the top of this file; the dark canvas, High
   contrast and Larger text read through them. [docs/BATCH_S.md S1, S2, S3; PROPOSAL — every shape here, lane sp]
   ══════════════════════════════════════════════════════════════════════════════════════════════════════════════════ */

/* ── S1 · The record page's frame (templates/parts/record.html): what it is small and the thing large, a line of chips
   under it, the page's actions right; then where it stands; then at a desk the main column and the rail (⅔ · ⅓) — on
   one column the rail's cards first (they're first in the markup). ── */
.record > .page-head { margin-bottom: var(--space-4); }
/* The actions come first in the markup (the keyboard reaches the main action before the chips' links); the title is
   drawn first. [the fix round's ruling 6 — the header's class stays exactly "page-head"; the design review's P4] */
.record > .page-head > .page-title { order: -1; }
.record-kind { margin: 0 0 2px; font-size: var(--type-xs); font-weight: 600; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--muted); }
.record-title > h1 { margin: 0; overflow-wrap: anywhere; }
.record-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-4);
  margin: var(--space-2) 0 0; padding: 0; list-style: none; font-size: var(--type-sm); color: var(--muted-strong); }
.record-chips:not(:has(li)) { display: none; }
.record-chips > li { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 1.5rem; }
/* A record's main action is first in the markup (the keyboard reaches it first) and drawn last and strongest at a desk,
   after its quiet links — q12's part draws the ⋯ first. [q12's contract 1] */
@media (min-width: 701px) {
  .record > .page-head .page-actions > :first-child:is(a.button, form):not(.secondary) { order: 1; }
}
.record-said:not(:has(*)) { display: none; }
.record-said > .notice { margin: 0 0 var(--space-3); }
/* Where it stands: one sentence, what's next, the facts it stands on. Its edge says the tone in a shape as well as a
   colour — a thicker bar when it's late, a quiet one when it's closed — and its words always say it. */
.record-stands { padding: var(--space-4) var(--space-5); border-left: 3px solid var(--info); }
.record-now { margin: 0; font-size: var(--type-lg); font-weight: 600; line-height: 1.3; }
.record-next { margin: 6px 0 0; color: var(--muted-strong); }
.record-facts { margin: var(--space-2) 0 0; color: var(--muted); }
.record-stands-you { border-left-color: var(--warning); }
.record-stands-done { border-left-color: var(--success); }
.record-stands-stopped { border-left-color: var(--muted); border-left-style: dashed; }
.record-stands-late { border-left: 6px solid var(--danger); }
.record-body { display: flex; flex-direction: column; }
.record-rail:not(:has(*)) { display: none; }
@media (min-width: 68.75rem) {
  .record-body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(17rem, 1fr); grid-template-areas: "main rail";
    gap: 0 var(--space-5); align-items: start; }
  .record-body > .record-main { grid-area: main; min-width: 0; }
  .record-body > .record-rail { grid-area: rail; min-width: 0; }
  .record-body:not(:has(> .record-rail *)) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main"; }
}
.record-card-title { margin: 0 0 var(--space-3); font-size: var(--type-base); }
.record-picture { display: block; margin: 0 0 var(--space-3); line-height: 0; }
/* The sign drawn whole: a box of definite height, the picture letterboxed in it — every rider in view, never
   cropped. [the fix round's ruling 4 — design B3] */
.record-picture > .order-pic { display: flex; align-items: center; justify-content: center; width: 100%; height: 10rem; }
.record-picture > .order-pic > img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
@media (min-width: 68.75rem) {
  .record-picture > .order-pic { height: 14rem; }
}
/* A tablet's one column: the rail's cards two across, so the record's own content isn't a screen away. */
@media (min-width: 43.8125rem) and (max-width: 68.6875rem) {
  .record-rail:has(> :nth-child(2)) { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    column-gap: var(--space-4); align-items: start; }
}
.record-card-name { margin: 0 0 2px; font-weight: 600; }
.record-card-figure { margin: 0 0 var(--space-1); font-size: var(--type-lg); font-weight: 600;
  font-variant-numeric: tabular-nums; }
.record-section > h2 { margin-top: 0; }
.record-rows { margin: 0; padding: 0; list-style: none; }
.record-rows > li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3);
  padding: var(--space-2) 0; border-bottom: 1px solid var(--line); font-size: var(--type-sm); }
.record-rows > li:last-child { border-bottom: 0; }
.record-rows .num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pay-link-row > input[readonly] { flex: 1 1 18rem; min-width: 0; }

/* The timeline (templates/parts/timeline.html) — pattern 11 (the base .timeline: a dot and a line down the side): what
   happened, then who · when, newest first; a notice's dot an open ring and its kind said in a word; All · History ·
   Notices as three choices, the rest hidden by the stylesheet (no script); a limited timeline shows its newest few
   until Show all. */
.timeline-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-2) var(--space-4); margin: 0 0 var(--space-3); }
.timeline-head > h2 { margin: 0; }
.timeline-filter { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-action);
  overflow: hidden; }
.timeline-filter > input { position: absolute; opacity: 0; pointer-events: none; }
.timeline-filter > label { margin: 0; padding: 6px 12px; font-size: var(--type-sm); font-weight: 600; cursor: pointer;
  color: var(--muted-strong); }
.timeline-filter > input:checked + label { background: var(--accent); color: var(--on-accent); }
.timeline-filter > input:focus-visible + label { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.record-timeline[data-limited]:not(:has(.tl-expand:checked)) .timeline-filter { display: none; }
.record-timeline .timeline > li:last-child { padding-bottom: 0; }
.record-timeline .timeline > li.tl-notice::before { background: var(--surface); border: 2px solid var(--info);
  box-sizing: border-box; left: -5px; width: 9px; height: 9px; }
.tl-what { margin: 0; font-size: var(--type-base); overflow-wrap: anywhere; }
.tl-kind { font-size: var(--type-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--info); }
.tl-meta { margin: 2px 0 0; font-size: var(--type-xs); color: var(--muted); }
.record-timeline .tl-more { display: none; }
.record-timeline:has(.tl-expand:checked) .tl-more { display: list-item; }
/* A choice filters only what is shown whole: a limited timeline, folded back to its newest few, shows them all. */
.record-timeline:not([data-limited]):has(.tl-show-history:checked) .timeline > li:not(.tl-history),
.record-timeline:not([data-limited]):has(.tl-show-notices:checked) .timeline > li:not(.tl-notice),
.record-timeline[data-limited]:has(.tl-expand:checked):has(.tl-show-history:checked) .timeline > li:not(.tl-history),
.record-timeline[data-limited]:has(.tl-expand:checked):has(.tl-show-notices:checked) .timeline > li:not(.tl-notice) {
  display: none; }
.tl-all { margin: var(--space-3) 0 0; }
.tl-expand { position: absolute; opacity: 0; pointer-events: none; }
.tl-expand:focus-visible + label { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.tl-expand + label { display: inline-flex; margin: 0; }
.tl-expand:checked + label .tl-expand-more, .tl-expand:not(:checked) + label .tl-expand-less { display: none; }

/* ── S3 · The money lines (templates/parts/money_lines.html): a table sized by its own card, not t0's sliding frame — the
   client's words and the Item wrap, the figures stay whole and in view at every width. Where the card is too narrow
   for the columns (a ⅔ column at a narrow desk, Larger text, a phone, the costed form's two more columns), each line
   becomes a card of its own: the client's words, then its Item, then how many at what price with its total on the
   right, cost and margin labelled. The foot's labels stand right of the figure column (a table) or left of the figure
   (cards); the balance the strongest. [BATCH_S S3; the fix round's ruling 2 — design B1: "figures never give way";
   design S9; PROPOSAL — lane sp] ── */
.money-lines { padding: var(--space-4) var(--space-5); container: money-lines / inline-size; }
.money-lines-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: var(--space-1) var(--space-4); margin: 0 0 var(--space-2); }
.money-lines-head > h2 { margin: 0; }
.money-lines .list-found { margin: 0 0 var(--space-2); }
.money-lines .table-wrap { overflow: visible; }
.money-lines .table-wrap > .money-lines-table { min-width: 0; }   /* sized by its card, never the phone rule's 550px [the design review of lane sorder, V2] */
.money-lines-table { width: 100%; table-layout: auto; }
.money-lines-table th, .money-lines-table td { white-space: normal; overflow-wrap: break-word; }
.money-lines-table :is(th, td).num { white-space: nowrap; }
.money-lines-table td.lines-words { min-width: 8rem; }
.money-lines-table td.lines-item { min-width: 5.5rem; }
.money-lines-table > tfoot > tr > th, .money-lines-table > tfoot > tr > td { padding-top: 7px; padding-bottom: 7px;
  border-bottom: 0; background: none; font-size: var(--type-sm); letter-spacing: 0; text-transform: none;
  color: var(--ink); white-space: normal; }
.money-lines-table > tfoot > tr > td { white-space: nowrap; }
.money-lines-table > tfoot > tr > th { text-align: right; font-weight: 400; }
.money-lines-table > tfoot > tr.lines-sub > * { border-top: 1px solid var(--line); }
.money-lines-table > tfoot > tr:is(.lines-total, .lines-balance) > * { font-weight: 700; }
.money-lines-table > tfoot > tr.lines-total > * { border-top: 1px solid var(--line); }
.money-lines-table > tfoot > tr.lines-balance > td { font-size: var(--type-lg); }
.money-lines-table > tfoot .lines-tax-later, .money-lines-table > tfoot .lines-tax-base { font-weight: 400; }
.money-lines-table > tfoot .lines-foot-label { display: none; }
.money-lines-said { margin: var(--space-2) 0 0; }
.money-lines-differ { margin: var(--space-2) 0 0; }
td.money-lines-none { text-align: left; padding: var(--space-3) 14px; }
/* Each line a card where the card can't hold the table: under 36rem of card (50rem for the costed form, its two more
   columns). Named as a table is, read the same. */
@container money-lines (max-width: 36rem) {
  .money-lines:not(.money-lines-costed) .money-lines-table { display: block; }
  .money-lines:not(.money-lines-costed) .money-lines-table > thead { display: none; }
  .money-lines:not(.money-lines-costed) .money-lines-table > :is(tbody, tfoot) { display: block; }
  .money-lines:not(.money-lines-costed) .money-lines-table > tbody > tr { display: grid;
    grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--space-3); padding: var(--space-2) 0;
    border-bottom: 1px solid var(--line); }
  .money-lines:not(.money-lines-costed) .money-lines-table > tbody > tr > td { display: block; padding: 0; border: 0;
    min-width: 0; text-align: left; }
  .money-lines:not(.money-lines-costed) .money-lines-table td.lines-words { grid-column: 1; grid-row: 1;
    font-weight: 600; }
  .money-lines:not(.money-lines-costed) .money-lines-table td.lines-total { grid-column: 2; grid-row: 1;
    text-align: right; font-weight: 700; }
  .money-lines:not(.money-lines-costed) .money-lines-table td.lines-item { grid-column: 1 / -1; color: var(--muted);
    font-size: var(--type-xs); }
  .money-lines:not(.money-lines-costed) .money-lines-table td:is(.lines-qty, .lines-unit, .lines-remove) {
    font-size: var(--type-xs); color: var(--muted-strong); }
  .money-lines:not(.money-lines-costed) .money-lines-table td.lines-qty { grid-column: 1; }
  .money-lines:not(.money-lines-costed) .money-lines-table td.lines-unit { grid-column: 2; grid-row: auto;
    text-align: right; }
  .money-lines:not(.money-lines-costed) .money-lines-table td.lines-remove { grid-column: 1 / -1; }
  .money-lines:not(.money-lines-costed) .money-lines-table td:is(.lines-qty, .lines-unit)::before {
    content: attr(data-label) " "; font-weight: 600; }
  .money-lines:not(.money-lines-costed) .money-lines-table td.money-lines-none { grid-column: 1 / -1; }
  .money-lines:not(.money-lines-costed) .money-lines-table > tfoot > tr { display: flex; justify-content: space-between;
    align-items: baseline; gap: var(--space-3); padding: 0.375rem 0; border: 0; }
  .money-lines:not(.money-lines-costed) .money-lines-table > tfoot > tr > :is(th, td) { display: block; padding: 0;
    border: 0; text-align: left; }
  .money-lines:not(.money-lines-costed) .money-lines-table > tfoot > tr > td:empty { display: none; }
}
@container money-lines (max-width: 50rem) {
  .money-lines-costed .money-lines-table { display: block; }
  .money-lines-costed .money-lines-table > thead { display: none; }
  .money-lines-costed .money-lines-table > :is(tbody, tfoot) { display: block; }
  .money-lines-costed .money-lines-table > tbody > tr { display: grid; grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--line); }
  .money-lines-costed .money-lines-table > tbody > tr > td { display: block; padding: 0; border: 0; min-width: 0;
    text-align: left; }
  .money-lines-costed .money-lines-table td.lines-words { grid-column: 1; grid-row: 1; font-weight: 600; }
  .money-lines-costed .money-lines-table td.lines-total { grid-column: 2; grid-row: 1; text-align: right;
    font-weight: 700; }
  .money-lines-costed .money-lines-table td:not(.lines-words, .lines-total) { grid-column: 1 / -1;
    font-size: var(--type-xs); color: var(--muted-strong); }
  .money-lines-costed .money-lines-table td:is(.lines-qty, .lines-unit, .lines-cost, .lines-margin)::before {
    content: attr(data-label) " "; font-weight: 600; }
  .money-lines-costed .money-lines-table > tfoot > tr { display: flex; flex-wrap: wrap; justify-content: space-between;
    align-items: baseline; gap: 2px var(--space-3); padding: 0.375rem 0; border: 0; }
  .money-lines-costed .money-lines-table > tfoot > tr > :is(th, td) { display: block; padding: 0; border: 0;
    text-align: left; }
  .money-lines-costed .money-lines-table > tfoot > tr > td:empty { display: none; }
  .money-lines-costed .money-lines-table > tfoot .lines-foot-label { display: inline; font-weight: 600; }
}
/* A quote's edit mode: a new line's boxes in one row where its card is wide enough — Item, the client's words (the
   widest), Qty, the price of one, its total as typed, Add line — the total following the typing (static/money_lines.js);
   two to a row, then one, as the card narrows (its own width, never the window's). [design S8] */
.money-lines-add { margin: var(--space-4) 0 0; padding: var(--space-3) 0 0; border-top: 1px solid var(--line); }
.money-lines-add-title { margin: 0 0 var(--space-2); font-size: var(--type-base); }
.money-lines-add-row { display: grid; grid-template-columns: minmax(9rem, 1.2fr) minmax(12rem, 2.4fr) 5rem 7.5rem 7rem auto;
  gap: var(--space-2) var(--space-3); align-items: end; }
.money-lines-add-row > .field { margin: 0; }
.money-lines-add-row input, .money-lines-add-row select { width: 100%; }
.money-lines-add-total { text-align: right; }
.money-lines-add-total > .label { display: block; margin-bottom: 6px; font-size: var(--type-sm); font-weight: 600; }
.money-lines-add-total > output { display: block; min-height: var(--control-size); line-height: var(--control-size);
  font-weight: 700; font-variant-numeric: tabular-nums; }
@container money-lines (max-width: 52rem) {
  .money-lines-add-row { grid-template-columns: 1fr 1fr; }
  .money-lines-add-row > .money-lines-add-words { grid-column: 1 / -1; }
}
@container money-lines (max-width: 30rem) {
  .money-lines-add-row { grid-template-columns: 1fr; }
  .money-lines-add-row > .field :is(input, select), .money-lines-add-go > button { min-height: var(--touch-size); }
}
@media (max-width: 43.75rem) {
  .money-lines { padding: var(--space-3) var(--space-3) var(--space-4); }
}

/* The economics card (templates/parts/economics.html): the figures as label over value, two or three across. */
.econ > h2 { margin: 0 0 var(--space-3); font-size: var(--type-base); }
.econ-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: var(--space-3);
  margin: 0; }
.econ-figures > div { min-width: 0; }
.econ-figures dt { font-size: var(--type-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--muted); }
.econ-figures dd { margin: 2px 0 0; font-size: var(--type-lg); font-weight: 600; font-variant-numeric: tabular-nums; }
.econ-figures .econ-owed dd { color: var(--ink); }
.econ-cost { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.econ-invoice, .econ-said { margin: var(--space-3) 0 0; }

/* ── S2 · The decision list (templates/parts/decide_keys.html, static/decide.js): a list with the chosen row's panel
   beside it at a desk — the panel held in view while the list scrolls past it (sticky), the chosen row marked by a bar
   and a tint (and aria-selected, read aloud), never colour alone; the stylesheet tells the script the panel stands
   beside the list (--decide-beside: 1) — where it doesn't, a row's choosing link opens the record instead. A screen
   places its own grid (dashboard.css); these are the part's marks. ── */
.decide { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.decide-panel { min-width: 0; }
@media (min-width: 68.8125rem) {
  .decide { grid-template-columns: minmax(0, 1fr) minmax(16rem, 18.5rem); --decide-beside: 1; }
  .decide > .decide-panel { position: sticky; top: var(--space-4); max-height: calc(100vh - 2 * var(--space-4));
    overflow-y: auto; overscroll-behavior: contain; }
}
@media (max-width: 68.75rem) {
  .decide > .decide-panel { display: none; }
}
[data-decide] [data-decide-row] { scroll-margin-top: var(--space-6); scroll-margin-bottom: var(--space-6); }
[data-decide] [data-decide-row][aria-selected="true"] > td { background: var(--tint); }
[data-decide] [data-decide-row][aria-selected="true"] > td:first-child { box-shadow: inset 4px 0 var(--accent); }
.decide-panel[aria-busy="true"] { opacity: 0.72; transition: opacity 120ms ease 120ms; }
.decide-panel .notice { margin: 0 0 var(--space-3); }
.decide-panel .notice:focus { outline: none; }
.decide-panel .notice:focus-visible, .decide-panel .notice[tabindex]:focus-visible { outline: 2px solid var(--focus-ring);
  outline-offset: 3px; border-radius: var(--radius-panel); }
.decide-press { margin: 0; }
.decide-press > button { width: 100%; }
/* The keys: a quiet button beside the list's heading (the script shows it), and a focused dialog saying them. */
.decide-keys kbd, .decide-keys-open kbd { display: inline-block; min-width: 1.5em; padding: 1px 5px; border: 1px solid var(--field-line);
  border-bottom-width: 2px; border-radius: var(--radius-input); background: var(--surface); color: var(--ink);
  font: 600 var(--type-xs)/1.4 var(--font); text-align: center; }
.decide-keys-open { min-height: 32px; padding: 4px 10px; gap: 6px; font-size: var(--type-xs); }
.decide-keys-body { padding: var(--space-5); }
.decide-keys-body > h2 { margin: 0 0 var(--space-3); font-size: var(--type-lg); font-weight: 600; }
.decide-keys-list { display: grid; gap: var(--space-2); margin: 0 0 var(--space-3); }
.decide-keys-list > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); align-items: baseline;
  gap: var(--space-3); }
.decide-keys-list dt { display: flex; gap: var(--space-1); }
.decide-keys-list dd { margin: 0; }
/* Below a desk the decision list has no panel beside it: no keys, no chosen row's mark (a row opens its record) — the
   reset as strong as the mark, its first cell's bar too (lane sq's found). */
@media (max-width: 68.75rem) {
  .decide-keys-open { display: none !important; }
  [data-decide] [data-decide-row][aria-selected="true"] > td,
  [data-decide] [data-decide-row][aria-selected="true"] > td:first-child { background: none; box-shadow: none; }
}
[data-decide][data-decide-narrow] [data-decide-row][aria-selected="true"] > td,
[data-decide][data-decide-narrow] [data-decide-row][aria-selected="true"] > td:first-child { background: none;
  box-shadow: none; }

/* ── The staff header on a phone: the shop's whole name, in up to three short lines inside the header's own height —
   never cut to "THE HART…" (lane f0's found; BATCH_S S1 "this part's only change" to the frame). The staff tag steps
   aside there: the menu says whose side this is. [PROPOSAL — lane sp] ── */
@media (max-width: 700px) {
  body.staff .app-header .app-brand { gap: 8px; }
  body.staff .brand-copy strong { white-space: normal; overflow-wrap: break-word; font-size: 0.75rem;
    letter-spacing: 0.4px; line-height: 1.17; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
    line-clamp: 3; overflow: hidden; text-overflow: clip; }
  body.staff .brand-copy small { display: none; }
}

/* The fix round (lane sp): a record's missing things, each with its fix (parts/record_stands.html items=); on one
   column, the main column first where the page asks (an invoice: its lines before its order's card); the decision
   list's part giving way where its list can't keep its names and figures beside the panel; small links at a finger's
   size on a phone. [the fix round's rulings 3, 10; Code's addition for lanes sc and st; the design review's P7, P10] */
.record-fixes { margin: var(--space-3) 0 0; padding-left: 1.25rem; }
.record-fixes > li { margin: 0 0 var(--space-1); }
.record-fixes > li > a { font-weight: 600; white-space: nowrap; }
@media (max-width: 68.6875rem) {
  .record.record-main-first .record-body > .record-main { order: -1; }
}
.decide[data-decide-narrow] { grid-template-columns: minmax(0, 1fr); }
.decide[data-decide-narrow] > .decide-panel { display: none; }
[data-decide][data-decide-narrow] [data-decide-keys] { display: none !important; }
@media (max-width: 43.75rem) {
  .record-card-name > a, .record-rail .record-card a, .record-fixes > li > a { display: inline-flex; align-items: center;
    min-height: var(--touch-size); }
  .tl-expand + label { min-height: var(--touch-size); }
}

/* ── Lane rboard (the finishing run, BATCH_R R9): the routes' line colours — each crew's line on the day board's map,
   its stops' marks and its swatch in the list. Six, told apart by colour-blind eyes as far as colours go (the
   Okabe–Ito set, deepened to carry the surface's words on them), on the light canvas, the dark (lightened to carry the
   dark surface's words) and in high contrast; never alone — each crew's line has its own dashes and its name beside
   it (UX_RULES 9). [PROPOSAL — the palette, lane rboard] ── */
:root {
  --route-1: #0b5d94; --route-2: #a35400; --route-3: #00775a; --route-4: #9c3a74; --route-5: #5a4a9e;
  --route-6: #6a5a2e;
}
:root[data-theme="dark"] {
  --route-1: #7cc0ec; --route-2: #f0b46a; --route-3: #6fd3b0; --route-4: #e7a3cb; --route-5: #b9adf0;
  --route-6: #d8c58c;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --route-1: #7cc0ec; --route-2: #f0b46a; --route-3: #6fd3b0; --route-4: #e7a3cb; --route-5: #b9adf0;
    --route-6: #d8c58c;
  }
}
:root[data-contrast="more"] {
  --route-1: #073f66; --route-2: #6e3800; --route-3: #00513d; --route-4: #6d2450; --route-5: #3b2f73;
  --route-6: #46391a;
}
:root[data-contrast="more"][data-theme="dark"] {
  --route-1: #b0daf6; --route-2: #f7d2a2; --route-3: #a5e9d0; --route-4: #f3cbe2; --route-5: #d8d0f8;
  --route-6: #ece0b8;
}
@media (prefers-color-scheme: dark) {
  :root[data-contrast="more"]:not([data-theme="light"]) {
    --route-1: #b0daf6; --route-2: #f7d2a2; --route-3: #a5e9d0; --route-4: #f3cbe2; --route-5: #d8d0f8;
    --route-6: #ece0b8;
  }
}

/* ── The finishing run — lane rscan: the scan box (templates/parts/scan.html, static/scan.js) — one part wherever a
   code is read: the box, the camera's button, the answer at the box, the camera's own screen; and Scan the pile's
   lines. One contiguous block. [BATCH_R R1; Direction 12 production's scan panel (.op-scan-panel: the trim's 3px top
   rule, a 22 px box 54 px tall, the send beside it, "F2 returns to the scanner" under it); design-states A and C;
   UX_RULES 9, 10, 11; PROPOSAL — every shape here, lane rscan's] ── */
/* The page's scan box is the design's scan panel; at a desk the answer stands beside the box, on a phone under it. */
.scan-main { container-type: inline-size; background: var(--surface); border: 1px solid var(--line);
  border-top: 3px solid var(--trim); border-radius: var(--radius-panel); padding: var(--space-5); margin: 0 0 18px; }
.scan-main > .scan-form { display: grid; gap: var(--space-4); margin: 0; }
.scan-main.scan-bare { padding: 0; border: 0; background: none; }
/* At a desk the box and its answer stand side by side from the first moment — the answer's column kept, so the box
   never shrinks under the operator's eye when the first answer comes. [the design review's P2] */
@container (min-width: 44rem) {
  .scan-main > .scan-form { grid-template-columns: minmax(19rem, 26rem) minmax(0, 1fr); align-items: start;
    gap: var(--space-6); }
  .scan-answer:empty + .scan-empty { display: flex; }
}
.scan-empty { display: none; align-items: center; justify-content: center; min-height: 6rem; margin: 0;
  border: 1px dashed var(--line); border-radius: var(--radius-panel); color: var(--muted-strong); }
.scan-out:has(.scan-unsent) .scan-empty { display: none; }
.scan-ask { min-width: 0; }
.scan-main .scan-ask > label { font-size: var(--type-base); margin-bottom: var(--space-2); }
.scan-row { display: flex; gap: var(--space-3); align-items: stretch; min-width: 0; }
.scan-row > input[data-scan-box] { flex: 1 1 auto; min-width: 0; }
.scan-main .scan-row > input[data-scan-box] { min-height: 3.5rem; padding: 8px 14px; font-size: 1.375rem;
  letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.scan-main .scan-row > button[data-scan-submit] { min-height: 3.5rem; padding-inline: var(--space-6);
  font-size: var(--type-base); white-space: nowrap; }
.scan-keys { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-4);
  margin: var(--space-2) 0 0; color: var(--muted-strong); font-size: var(--type-sm); }
/* What Enter does is a keyboard's line: under a finger the keyboard's own key says it. */
@media (pointer: coarse) { .scan-keys > span { display: none; } }
/* F2 and the Sound switch are the script's: never said where nothing does them. A finger has no F2. */
.scan-f2, .scan-sound { display: none; }
html.scan-js .scan-f2 { display: inline; }
/* The Sound and buzz switch: quiet beside the box's own send, drawn as a switch — its track and knob a shape, its
   state also in its words ("Sound and buzz: on"), never colour alone; a target a floor's finger hits.
   [the design review's P6] */
html.scan-js .scan-sound { display: inline-flex; gap: var(--space-2); margin-left: 0; min-height: var(--control-size);
  padding: 6px 12px; border-color: transparent; background: transparent; color: var(--ink); font-weight: 600; }
html.scan-js .scan-sound:hover { border-color: var(--line); }
.scan-sound::before { content: ""; flex: none; width: 2.25rem; height: 1.25rem; border-radius: 999px;
  border: 2px solid var(--muted-strong); background: radial-gradient(circle at 0.55rem 50%, var(--muted-strong) 0.38rem,
  transparent 0.42rem); }
.scan-sound[aria-checked="true"]::before { border-color: var(--success); background: color-mix(in srgb, var(--success)
  16%, transparent) radial-gradient(circle at calc(100% - 0.55rem) 50%, var(--success) 0.38rem, transparent 0.42rem); }
body:is(.area-production, .area-field) .scan-sound { min-height: var(--field-size); }
@media (pointer: coarse) { html.scan-js .scan-f2 { display: none; } }
/* The camera's button: only where the script found a camera to open on a finger's device (UX_RULES 11). On a phone
   it is the biggest thing; the box's own send steps back beside it. */
.scan-cam { display: none; }
html.scan-can-camera .scan-cam { display: inline-flex; }
.scan-cam-icon { width: 1.5rem; height: 1.5rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linejoin: round; }
.scan-cam-big { width: 100%; min-height: 4.5rem; margin: 0 0 var(--space-4); gap: var(--space-3);
  font-size: var(--type-lg); }
/* The floor's and the field's own button rule (56 px, 16 px words) mustn't shrink it: on a phone it is the biggest
   thing, and stays bigger than the box with Larger text. [the fix round's ruling 4; the design review's S3] */
body:is(.area-production, .area-field) main .scan-cam-big { min-height: 4.5rem; font-size: var(--type-lg); }
.scan-cam-big .scan-cam-icon { width: 1.75rem; height: 1.75rem; }
html.scan-can-camera .scan-main .scan-row > button[data-scan-submit] { background: var(--surface); color: var(--ink);
  border-color: var(--field-line); }
.scan-cam-small { flex: none; min-height: var(--touch-size); padding: 6px 12px; gap: 6px; }
.scan-cam-why { margin: calc(-1 * var(--space-2)) 0 var(--space-3); color: var(--danger); font-weight: 600;
  font-size: var(--type-sm); }
body:is(.area-production, .area-field) .scan-cam-why { font-size: 1rem; }
/* Under a finger with the camera the hint row is empty but for Sound — which sits on the camera's own screen, where
   it's heard — so the row goes. [the design review's P9] */
@media (pointer: coarse) { html.scan-can-camera .scan-main .scan-keys { display: none; } }
.scan-row + .scan-cam-why { margin: var(--space-2) 0 0; }
/* A box inside the screen's own form (the bin box): spaced as a field; in a bar, beside the bar's words. */
.scan-inside { margin: 0 0 var(--space-4); min-width: 0; }
.bulk-bar .scan-inside { margin: 0; }
.bulk-bar .scan-inside label { color: var(--chrome-ink); }
/* The answer at the box: the mark and the headline large, what the thing is under it, its picture beside the words
   (design-states C) — the state a word, a mark and the rule's colour, never the colour alone. */
.scan-out { min-width: 0; }
.scan-answer > .notice { margin: 0 0 var(--space-3); }
.scan-answer > :last-child { margin-bottom: 0; }
.scan-said { display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-4) var(--space-5);
  border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius-panel);
  background: var(--surface); color: var(--ink); }
.scan-said.is-done { border-left-color: var(--success); }
.scan-said.is-nothing { border-left-color: var(--warning); }
.scan-said.is-refused { border-left-color: var(--danger); }
.scan-said-pic { flex: 0 0 auto; display: block; width: 8rem; line-height: 0; border-radius: var(--radius-panel); }
.scan-said-pic img { display: block; width: 100%; height: auto; max-height: 7.5rem; object-fit: contain;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-panel); }
/* A strip (a rider, far wider than tall) is a band over the words, as wide as the answer: its words legible. */
.scan-said.is-wide { flex-wrap: wrap; row-gap: var(--space-3); }
.scan-said.is-wide > .scan-said-pic { flex: 1 1 100%; width: auto; }
.scan-said.is-wide > .scan-said-pic img { width: auto; max-width: 100%; max-height: 6rem; }
.scan-said-pic img[style*="--ratio"] { aspect-ratio: var(--ratio); }
.scan-said.is-wide > .scan-said-pic img[style*="--ratio"] { width: min(100%, calc(6rem * var(--ratio))); }
body:is(.area-production, .area-field) .scan-said-pic[href] { display: flex; align-items: center;
  min-height: var(--field-size); }
.scan-said-pic:hover img, .scan-said-pic:focus-visible img { border-color: var(--accent); }
.scan-said-pic img[data-failed] { display: none; }
.scan-said-words { flex: 1 1 12rem; min-width: 0; }
.scan-said-words > p { margin: 0 0 var(--space-1); overflow-wrap: anywhere; }
.scan-said-words > p:last-child { margin-bottom: 0; }
.scan-said-head { font-size: var(--type-lg); font-weight: 600; line-height: 1.3; }
.scan-said-mark { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem;
  margin-right: var(--space-1); border: 2px solid currentColor; border-radius: 50%; font-size: 1rem; line-height: 1;
  vertical-align: 0.1em; }
.is-done > * > .scan-said-head > .scan-said-mark { color: var(--success); }
.is-nothing > * > .scan-said-head > .scan-said-mark { color: var(--warning); border-radius: var(--radius-status); }
.is-refused > * > .scan-said-head > .scan-said-mark { color: var(--danger); }
.scan-said-detail { font-size: var(--type-base); }
.scan-said-more { color: var(--muted-strong); font-size: var(--type-base); }
.scan-said-fix a { font-weight: 600; }
/* A refusal's next step, said strongly; its buttons (Type it again — the script's own — and its fix) beside it. */
.scan-said-next { font-weight: 600; }
.scan-said-acts { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2) !important; }
.scan-retype { display: none; }
html.scan-js .scan-retype { display: inline-flex; }
body:is(.area-production, .area-field) .scan-said-acts > :is(button, .button) { min-height: var(--field-size); }
/* "sending…" the moment a scan goes: the last answer never stands for this one. */
.scan-said.is-sending { border-left-color: var(--line); color: var(--muted-strong); }
.is-sending > * > .scan-said-mark { border-style: dashed; color: var(--muted-strong); }
/* Scans a failed send left, kept at the box with Send again — never shown as done. */
.scan-unsent { margin: 0 0 var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--line);
  border-left: 4px solid var(--danger); border-radius: var(--radius-panel); background: var(--surface); }
.scan-unsent > p { margin: 0 0 var(--space-2); overflow-wrap: anywhere; }
.scan-unsent-head { font-weight: 600; }
.scan-unsent-codes { color: var(--muted-strong); font-variant-numeric: tabular-nums; }
.scan-unsent > button { min-height: var(--touch-size); }
@media (max-width: 43.75rem) {
  .scan-main { padding: var(--space-4); }
  .scan-main .scan-row > input[data-scan-box] { font-size: 1.25rem; }
  .scan-said { padding: var(--space-3) var(--space-4); gap: var(--space-3); }
  .scan-said-pic { width: 6rem; }
}
/* The camera, full screen: the picture edge to edge, the frame to hold the QR in, what it's looking for at the top
   with Close, and at the foot what it read and its answer, the light switch and "Type it instead" — every control a
   gloved thumb's size, on the chrome's own dark ground in every appearance. */
dialog.scan-camera { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0;
  padding: 0; border: 0; overflow: hidden; background: var(--chrome-bg); color: var(--chrome-ink); }
dialog.scan-camera::backdrop { background: var(--chrome-bg); }
.scan-camera-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-camera-frame { position: absolute; left: 50%; top: 44%; width: min(72vw, 48vh, 22rem); aspect-ratio: 1;
  transform: translate(-50%, -50%); border: 3px solid var(--chrome-ink); border-radius: 14px;
  box-shadow: 0 0 0 100vmax color-mix(in srgb, var(--chrome-bg) 50%, transparent); pointer-events: none; }
/* The top line: what it's looking for, the screen's own count under it, and Sound and buzz at its right. The ways
   out are at the foot, in a gloved thumb's reach. [the design review's S9, P9, P10] */
.scan-camera-top { position: absolute; top: 0; left: 0; right: 0; display: grid; grid-template-columns: 1fr auto;
  align-items: center; gap: 0 var(--space-3);
  padding: calc(env(safe-area-inset-top) + var(--space-3)) var(--space-4) var(--space-3);
  background: color-mix(in srgb, var(--chrome-bg) 82%, transparent); }
.scan-camera-prompt { grid-column: 1; margin: 0; font-size: var(--type-lg); font-weight: 600; line-height: 1.3; }
.scan-camera-status { grid-column: 1; margin: 0; font-size: 1rem; }
.scan-camera-status:empty { display: none; }
dialog.scan-camera .scan-camera-top > .scan-sound { grid-column: 2; grid-row: 1 / span 2; margin: 0;
  padding-inline: var(--space-2); color: var(--chrome-ink); }
.scan-camera-top > .scan-sound::before { border-color: var(--chrome-ink); background: radial-gradient(circle at 0.55rem
  50%, var(--chrome-ink) 0.38rem, transparent 0.42rem); }
.scan-camera-top > .scan-sound[aria-checked="true"]::before { background: color-mix(in srgb, var(--chrome-ink) 25%,
  transparent) radial-gradient(circle at calc(100% - 0.55rem) 50%, var(--chrome-ink) 0.38rem, transparent 0.42rem); }
dialog.scan-camera button { min-height: var(--field-size); min-width: var(--field-size); font-size: 1rem;
  padding-inline: var(--space-5); }
.scan-camera-close, .scan-camera-light { background: transparent; color: var(--chrome-ink);
  border-color: var(--chrome-ink); }
.scan-camera-light[aria-pressed="true"] { background: var(--trim); border-color: var(--trim); color: var(--chrome-bg); }
.scan-camera-type { background: var(--chrome-ink); border-color: var(--chrome-ink); color: var(--chrome-bg); }
/* While it keeps reading (a pile), Done is the way out, the filled one; Type it instead steps back beside it. */
dialog.scan-camera.is-many .scan-camera-close { background: var(--chrome-ink); border-color: var(--chrome-ink);
  color: var(--chrome-bg); }
dialog.scan-camera.is-many .scan-camera-type { background: transparent; color: var(--chrome-ink);
  border-color: var(--chrome-ink); }
.scan-camera-foot { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: var(--space-3);
  padding: var(--space-6) var(--space-4) calc(env(safe-area-inset-bottom) + var(--space-4));
  background: linear-gradient(transparent, color-mix(in srgb, var(--chrome-bg) 88%, transparent) 28%); }
.scan-camera-said:empty { display: none; }
.scan-camera-said > .notice { margin: 0 0 var(--space-2); }
.scan-camera-note, .scan-camera-read { margin: 0; font-size: 1rem; font-weight: 600; }
/* No signal while the camera is open: said here, where the person is looking, not under it on the page. */
.scan-camera-unsent { margin: 0; padding: var(--space-3) var(--space-4); border: 1px solid var(--line);
  border-left: 4px solid var(--danger); border-radius: var(--radius-panel); background: var(--surface); color: var(--ink);
  font-size: 1rem; font-weight: 600; }
.scan-camera-acts { display: flex; gap: var(--space-2); }
.scan-camera-acts > button { flex: 1 1 0; }
.scan-camera-acts > button[hidden] { display: none; }
/* Scan the pile's head: the count, and New pile at its right. Its lines: the Asset ID read across the room; a refused
   scan's reason under its verdict. */
.pile-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-2) var(--space-4); margin: 0 0 var(--space-3); }
.pile-head > .pile-count { margin: 0; }
.pile-acts { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pile-acts > form { margin: 0; }
table.pile-lines td.asset-id { font-variant-numeric: tabular-nums; font-size: var(--type-base); }
table.pile-lines .pile-why { margin-top: var(--space-1); color: var(--muted-strong); overflow-wrap: anywhere; }
/* A refused line's reason is what the person needs: in ink, never muted. [the design review's S6] */
table.pile-lines tr.pile-refused:not(.pile-already) .pile-why { color: var(--ink); }
/* A strip's picture (a rider) is a band, wide enough to read, at its own height; it opens large as ever.
   [the design review's S5] */
table.pile-lines th.thumb, table.pile-lines td.thumb.thumb-wide { width: 10.5rem; }
table.pile-lines td.thumb.thumb-wide img { width: 9.5rem; height: auto; max-height: 3.5rem; }
/* The verdict reads on one line; the description's columns give way first; Undo sits beside the last line's verdict
   (a column of its own pushed it off a 1024 desk's table). [the design review's P8; the design verifier of lane rscan]
   */
table.pile-lines .pile-verdict { white-space: nowrap; }
table.pile-lines td.pile-made-cell > form { display: inline-block; margin: 0 0 0 var(--space-3); vertical-align: middle; }
@media (max-width: 75rem) {
  table.pile-lines th.thumb, table.pile-lines td.thumb.thumb-wide { width: 7.5rem; }
  table.pile-lines td.thumb.thumb-wide img { width: 6.5rem; }
}
/* On a phone's card the Asset ID is whole, never cut — an identifier (t0's rule). */
@media (max-width: 43.75rem) {
  table.pile-lines td.asset-id { flex: 1 0 auto; min-width: max-content; overflow: visible; text-overflow: clip; }
  table.pile-lines td.pile-made-cell > form { margin: var(--space-2) 0 0; }
}

/* ── The finishing run — lane rcounter: Returned and the counter (BATCH_R R13, R14). One contiguous block. The scan
   box's answer gains its one figure, read across the room — a piece's size on Returned, a unit's days out against its
   included days at the counter — under the headline, large, in ink (hartsen.scan.Answer.figure; lane rscan's part).
   [BATCH_R R13 "its size large", R14 "days out against its included days"; PROPOSAL — lane rcounter] ── */
.scan-said-words > .scan-said-figure { margin: var(--space-1) 0 var(--space-2); font-size: 1.75rem; font-weight: 700;
  line-height: 1.15; letter-spacing: 0.2px; font-variant-numeric: tabular-nums; color: var(--ink);
  overflow-wrap: normal; word-break: normal; text-wrap: balance; }
@media (max-width: 43.75rem) { .scan-said-words > .scan-said-figure { font-size: 1.5rem; } }
/* A figure breaks only between its words — a number never breaks, at any text size. [the design review of lane rcounter,
   S4] */
/* The thing in hand, waiting for its next scan: its own mark (→) in the accent's ink, never the done mark — the ✓
   comes when the bin commits the pair. [the design review of lane rcounter, S3; Code's ruling 8] */
.scan-said.is-next { border-left-color: var(--accent); }
.is-next > * > .scan-said-head > .scan-said-mark { color: var(--accent); border-style: dashed; }
/* One likely answer, a tap away, under the box ("Into DEN-WALL") — a button a gloved finger hits; an empty press's
   words under the box, in ink. [Code's ruling 7] */
.scan-offers { margin: var(--space-2) 0 0; }
.scan-offer { min-height: var(--touch-size); font-weight: 600; }
body:is(.area-production, .area-field) .scan-offer { min-height: var(--field-size); }
.scan-asked { margin: var(--space-2) 0 0; font-weight: 600; color: var(--ink); }
/* ── Batch T — lane t6c: the placement's two views, shown (BATCH_T T6 "Shown wherever one placement is shown whole":
   the Review, the go-ahead, an order's page, the crew's stop). The satellite view first, then the street view: side by
   side where the column is wide enough for both, stacked on a phone; under each, who answered it and how; a view left
   out read in its place. A StreetView still is Google's own picture at its own size — the full width of a phone, never
   stretched past it — with the line over it. [the architect's reference docs/design/placement-two-views.html, state 8
   (.pv-views); PROPOSAL — lane t6c: the rest] ── */
.pv-views { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr));
  gap: var(--space-4); align-items: start; margin-top: var(--space-3); }
.pv-view { min-width: 0; }
.pv-view-title { margin: 0 0 var(--space-2); font-size: var(--type-sm); font-weight: 600; }
.pv-view .map { height: 17.5rem; margin-bottom: 0; }
.pv-views-one .pv-view .map { height: 22.5rem; }
.pv-frame img { border: 1px solid var(--line); }
.pv-credit { margin: var(--space-2) 0 0; overflow-wrap: anywhere; }
.pv-still { width: 100%; overflow: hidden; background: var(--surface-alt); border-radius: var(--radius-panel); }
.pv-still > img { width: 100%; height: 100%; object-fit: cover; }
.pv-still-none { display: none; margin: 0; }
.pv-gone .pv-still { border: 1px dashed var(--field-line); min-height: 8rem; }
.pv-gone .pv-still > img, .pv-gone .pv-still > svg { display: none; }
.pv-gone .pv-still-none { display: flex; position: absolute; inset: 0; align-items: center; justify-content: center;
  padding: var(--space-4); text-align: center; color: var(--muted-strong); }
.pv-still-changed { display: none; margin: var(--space-2) 0 0; }
.pv-reshot .pv-still-changed { display: block; }
.pv-reshot .pv-still > svg { display: none; }
.pv-left { margin: 0; }
.pv-left p { margin: var(--space-1) 0 0; }
.pv-needed { margin: 0; padding: var(--space-4); text-align: center; color: var(--muted-strong);
  border: 1px dashed var(--field-line); border-radius: var(--radius-panel); }
.pv-on-photo { margin: var(--space-3) 0 0; }
.pv-on-photo img { display: block; width: 100%; border-radius: var(--radius-panel); }
/* The crew's stop: the view's name read at arm's length, the map's own + and − a gloved finger hits. [UX_RULES 11] */
.area-field .pv-view-title { font-size: var(--type-base); }
.area-field .pv-map .leaflet-control-zoom a { width: var(--touch-size); height: var(--touch-size);
  line-height: var(--touch-size); }
.placement-decision .pv-views { margin-bottom: var(--space-4); }

/* ── Batch T — lane t6: a StreetView capture is shown on screens only (BATCH_T T6, Nov 24; DERIVED — Google's
   policies: "Street View imagery may not be used for print purposes"). Printed, Google's still — and the step's live
   StreetView — gives way to one line saying to open the order on a screen; a picture of the customer's own prints as a
   photo does. ── */
.pv-print-only { display: none; }
/* Until Google's still has come, its frame stays quiet — the still's own size and the frame's colour, never a broken
   image or a sign standing on nothing. [the design review's verification, N2] */
.pv-waiting .pv-still > img, .pv-waiting .pv-still > svg { visibility: hidden; }
/* Sign · Line sits under the still, so the street view lines up with the map beside it. [verification, N3] */
.pv-still-box > .pv-turn { margin: var(--space-2) 0 0; }
@media print {
  .pv-still-box .pv-still, .pv-still-box .pv-still-changed, .pv-still-box .pv-still-none, [data-pv-streetview] {
    display: none !important; }
  .pv-print-only { display: block; margin: var(--space-2) 0; font-style: italic; }
}
/* ── Batch T — lane t6d: the sign standing on a StreetView capture, flat (BATCH_T T6 "The sign drawn onto a StreetView
   capture — flat, as on a photo"; the reference docs/design/placement-two-views.html, state 3b). The server's clear
   sheet (orders.composite.sheet) lies over Google's still at the still's own size; "Sign · Line" — two radios with no
   form, turned by this stylesheet alone — shows the sign standing there or the bare line. A state is a word and a
   shape: the chosen one bold, with its bar. Printed, both go with the still. [PROPOSAL — lane t6d: the rest] ── */
/* A toggle of how the picture is shown, never a page's tab row: one outlined pair, the chosen half filled, bold and
   barred underneath. */
.pv-turn { display: inline-flex; margin: 0 0 var(--space-2); border: 1px solid var(--field-line);
  border-radius: var(--radius-action); overflow: hidden; background: var(--surface); }
.pv-turn-opt { position: relative; display: flex; align-items: center; justify-content: center; min-width: 6rem;
  min-height: var(--touch-size); padding: 0 var(--space-4); color: var(--muted-strong); font-size: var(--type-sm);
  cursor: pointer; }
.pv-turn-opt + .pv-turn-opt { border-left: 1px solid var(--field-line); }
.pv-turn-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.pv-turn-opt:has(input:checked) { background: var(--tint); color: var(--ink); font-weight: 600;
  box-shadow: inset 0 -3px 0 var(--accent); }
.pv-turn-opt:has(input:focus-visible) { outline: 3px solid var(--focus-ring); outline-offset: -3px; }
.pv-still > .pv-sheet { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
  border-color: transparent; }
.pv-still-box:has(.pv-turn input[value="sign"]:checked) .pv-still > svg { display: none; }
.pv-still-box:has(.pv-turn input[value="line"]:checked) :is(.pv-sheet, .pv-sheet-said) { display: none; }
.pv-sheet-said { margin: var(--space-2) 0 0; }
:is(.pv-reshot, .pv-gone) :is(.pv-sheet, .pv-turn, .pv-sheet-said) { display: none; }
@media print { .pv-turn, .pv-sheet-said { display: none !important; } }
.pv-turn[hidden] { display: none; }
/* ── Batch T — lane t6cx (the fix round): with one view pictured and the other left out, the two stack at the page's
   width — the notice never in half the desk over empty space — each picture no wider than a still is (its own size at
   a desk). [the design review's P7; PROPOSAL — lane t6cx] ── */
.pv-views.pv-views-one { grid-template-columns: minmax(0, 1fr); }
.pv-views-one :is(.photo-line.pv-frame:not(.pv-still), .pv-on-photo, .pv-left) { max-width: 40rem; }
/* The Site's pin on the crew's stop: the Site, said as the Site — never the sign's spot. [the design review's B2] */
.field-pin-said { margin: var(--space-3) 0 var(--space-1); }
/* The go-ahead's card is wide at a desk for the two views side by side; the sign as it will stand keeps the size it had
   in the narrow card. [the design review's P10; lane t6cx] */
.placement-decision > figure[id^="as-built-"] { max-width: 32rem; }

/* ── Batch T — lane t5: small things from the architect's look (BATCH_T T5). One contiguous block. ── */
/* Placing a sign: while an end is still to be placed the canvas carries "is-placing" (static/placement.js,
   hartsenPlacing) and the pointer over it is a crosshair — the map's own hand again once every end is down, a grab over
   each end; the photo's plain arrow. (Google's map takes its cursor from the script.) [CHAD-STATED — Nov 24 09:41:
   "the icon doesn't change to let them know they are in that mode… Maybe crosshairs"; BATCH_T T5] */
.photo-canvas { cursor: default; }
.photo-canvas.is-placing { cursor: crosshair; }
.leaflet-container.is-placing, .is-placing .leaflet-container { cursor: crosshair; }
.leaflet-marker-icon.hartsen-point, .leaflet-marker-icon.obm-l-handle { cursor: grab; }
/* Reload, in the frame of an installed app only (templates/_reload.html): no browser bar, and on an iPhone no pull to
   reload. Elsewhere it isn't drawn. [BATCH_T T5 "An installed phone app has a way to reload (iOS shows none)"] */
[data-icon="reload"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12a8 8 0 1 1-2.3-5.7L20 8'/%3E%3Cpath d='M20 3v5h-5'/%3E%3C/svg%3E"); }
.app-reload { display: none; }
.app-brand + .app-reload + details.account { margin-left: auto; }
.app-reload > a { min-width: var(--touch-size); min-height: var(--touch-size); justify-content: center; }
@media (display-mode: standalone) {
  .app-reload { display: inline-flex; }
  .app-brand + .app-reload + details.account { margin-left: 0; }
}
:root.is-installed .app-reload { display: inline-flex; }
:root.is-installed .app-brand + .app-reload + details.account { margin-left: 0; }
/* The Inbox's "N still need you" (templates/portal/inbox.html): a status in words, and a thumb's target — its reach
   wider than its chip. [BATCH_T T5; docs/UX_RULES.md 9] */
.inbox-needs-count { position: relative; }
.inbox-needs-count::after { content: ""; position: absolute; inset: -13px -8px; }
/* Which end is next, directly above the placement canvas while an end is still to be placed (static/placement.js,
   hartsenPlacing draws it): the mode in words, at body size, read at a glance — the crosshair's own mark beside it, so
   it's a shape and words, never the pointer alone. On a phone it is the cue. [BATCH_T T5; Code's look at lane t5 —
   "the cue is the mode"; docs/UX_RULES.md 9] */
.placing-cue { --crosshair: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='6.5'/%3E%3Cpath d='M12 2v5M12 17v5M2 12h5M17 12h5'/%3E%3C/svg%3E");
  display: flex; align-items: flex-start; gap: var(--space-2); margin: var(--space-3) 0 var(--space-2);
  font-size: var(--type-base); font-weight: 700; line-height: 1.4; color: var(--ink); }
.placing-cue[hidden] { display: none; }
.placing-cue::before { content: ""; flex: none; width: 18px; height: 1.4em; background: currentColor;
  -webkit-mask: var(--crosshair) center / contain no-repeat; mask: var(--crosshair) center / contain no-repeat; }

/* Batch T, lane t3 — a crew's "can't do it as drawn", where the office sees it: the day board's stop marked (words and a
   shape, never colour alone) and the top of the order's page. [BATCH_T T4; UX_RULES 9] */
.crew-reported { margin: var(--space-1) 0 0; padding: var(--space-1) var(--space-2); border-left: 3px solid var(--warning);
  background: var(--surface); font-size: var(--type-sm); line-height: 1.35; overflow-wrap: anywhere; }
.crew-reported-mark { color: var(--warning); font-weight: 700; }
.crew-reported-who { color: var(--muted-strong); white-space: nowrap; }
.crew-report-words { font-size: var(--type-lg); margin: var(--space-1) 0; overflow-wrap: anywhere; }
.crew-report-photo { display: block; max-width: min(100%, 320px); height: auto; border: 1px solid var(--line);
  border-radius: var(--radius-panel); }
.crew-finishes { margin: 0 0 var(--space-3); padding: var(--space-2) var(--space-3); border-left: 3px solid var(--info);
  background: var(--surface); font-size: var(--type-sm); }
