/*
  Central Warehouse staff screens. One file for every page, served by Ui\Assets under the CSP (default-src 'self', so font-src and
  img-src 'self'): no imports, no external URLs, no data: URIs. The font is self-hosted Poppins (400, 500, 600, 700; woff2 in fonts/,
  the SIL Open Font Licence beside them). The icons are ONE same-origin sprite, icons.svg (a <view> per icon), drawn as a mask in the
  text colour (.ico .ico-<name>): a page holds no svg element and no image. Interactions are CSS first: <details> (help, folds, the
  create drawers, the account menu), :target (the phone menu) and :has(); app.js only adds conveniences.

  The look is design v5 (the owner's brief of 19 Oct 2026, monday.com-like): white cards on a soft lilac page, a magenta accent, solid
  status pills with white text, coloured group headings over board tables in white cards, borders rather than shadows (a shadow only
  on what floats: menus, drawers, toasts). Every page opens with a statement (Ui\View head(): section 5): a small UPPERCASE eyebrow
  (or the record's list as a link and "›") and the heading in sentence case with no full stop and no sentence under it (the approved
  mockups of 29 Oct 2026; docs/decisions.md DC1-DC3). Every colour, size and radius is a token on :root (section 1): the brief's tokens first, then the names the page bodies
  use, defined from them. Light only (owner, 19 Oct 2026).

  Layout: a white sidebar (248 px) from 700 px up; under 700 px a compact top bar and the same menu sliding in from the left. Tables
  sit in white cards and scroll sideways inside them, never the page; they become one card per row when the page column is 640 px or
  narrower. Inputs at 16 px on a phone; tap targets 44 px on a phone or a touch screen.

  Sections: 0 font, 1 tokens, 2 base, 3 strips and toasts, 4 shell (sidebar, phone bar, phone menu), 5 page head (statement, the ONE
  tabs component, toolbar), 6 cards, KPI tiles and boards, 7 status: block, cell and tag, 8 notices, 9 the ONE buttons
  component and its More menu, 10 forms, 11 tables,
  12 folds, help and drawers, 13 progress, 14 home and task board, 15 decision pages, 16 lists: chips, pager, empty states, 17 the
  screens' own parts, 18 print, 19 the set-it-yourself pack, 20 stock, 21 store-wise review and bulk action, 22 by item, counts and
  orders, 23 sign-in, 24 All Products for normal staff (and the shared parts it improved: the tabs' fade, the search box, the chips of
  the filters that are on).
*/

/* ---------- 0. Font: Poppins, latin subset (@fontsource/poppins 5.2.7 = Google Fonts' cut) ---------- */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/poppins-latin-700-normal.woff2") format("woff2"); }

/* ---------- 1. Tokens ---------- */
:root {
  color-scheme: light;

  /* 1a. The brief's tokens (design v5) */
  --page: #f3eef6;            /* the page behind the cards */
  --page-alt: #fbf9fc;        /* quiet fills: table toolbars, inner panels */
  --card: #fffdfe;            /* cards, tables, the sidebar */
  --row-selected: #fdf3fb;    /* a ticked row, a child row */
  --row-open: #fbf6fb;        /* a row under the pointer, an open row */
  --ink: #1a1522;             /* headings, names, figures */
  --ink-body: #4a4454;        /* body text */
  --ink-muted: #6c6577;       /* captions, table heads, hints */
  --ink-faint: #9a92a6;       /* the edge of a field */
  --ink-disabled: #b8b0c4;
  --hairline: #e8e1ee;        /* 1 px borders of cards and tables */
  --divider: #f0eaf3;         /* the line between two rows */
  --accent: #c90e9f;          /* primary buttons, the open page, eyebrows, the focus ring */
  --accent-hover: #8f0a71;
  --accent-soft: #fbe6f6;
  --accent-line: #f3c6e8;     /* the soft (helper) button's edge */
  --brand-gradient: linear-gradient(135deg, #ff14e0, #ff6a8e 55%, #ffb01e); /* the signed-in person's avatar only (and the sign-in panel) */
  --pink: #ff6a8e;            /* the bulk bar's count, "being added" */
  /* Solid status colours: white text on each passes 4.5:1 */
  --st-green: #0f7a5a;        /* done, paid, approved */
  --st-amber: #a65c00;        /* pending, warning */
  --st-red: #c2263d;          /* overdue, failed */
  --st-purple: #6b3fd4;       /* in review, escalated */
  --st-blue: #1f5fbf;         /* new, info */
  --st-grey: #6c6577;         /* draft, not started */
  --st-navy: #174a96;         /* completed, closed, switched off */
  --st-magenta: #c90e9f;      /* your turn */
  /* Soft tags: the tint, then its text */
  --sf-green: #e3f3ec; --sf-green-ink: #0b5e45;
  --sf-amber: #fdf0dc; --sf-amber-ink: #7a4400;
  --sf-red: #fbe4e7; --sf-red-ink: #9c1c30;
  --sf-blue: #e7eefb; --sf-blue-ink: #174a96;
  --sf-grey: #efe9f2; --sf-grey-ink: #4a4454;
  --sf-magenta: #fbe6f6; --sf-magenta-ink: #8f0a71;
  --sf-purple: #efe9fb; --sf-purple-ink: #5a2fb8;
  /* Inventory's colour in the sidebar (Sidebar.dc.html; RD1): its icon and count, its tint */
  --st-teal: #0f7a72; --sf-teal: #e0f3f1;
  --info-panel: #f3f7fd;
  --warn-row: #fdf6ec;        /* a row that needs a look */
  --amber-panel: #fff8ec; --amber-edge: #f3c77c; /* work waiting from another team */
  --signin-panel: #2a0a24;    /* the sign-in page's brand half (owner, 19 Oct 2026) */
  --font: Poppins, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Radius: small, square-ish corners on every page (the owner, 6 Nov 2026: "this all shape more oval shape dont need this"; docs/decisions.md
     KG12): 4 small, buttons, fields and pills, 6 list cards, tables and panels, 8 KPI tiles and drawers. A true circle stays 50%. */
  --r-8: 4px; --r-10: 4px; --r-12: 6px; --r-14: 6px; --r-16: 8px; --r-pill: 4px;
  /* Spacing scale: 4, 6, 8, 10, 12, 14, 16, 18, 20, 24, 32, 40 */
  --sp-4: 4px; --sp-6: 6px; --sp-8: 8px; --sp-10: 10px; --sp-12: 12px; --sp-14: 14px; --sp-16: 16px; --sp-18: 18px; --sp-20: 20px;
  --sp-24: 24px; --sp-32: 32px; --sp-40: 40px;
  --shadow-float: 0 12px 32px rgba(26, 21, 34, .16), 0 2px 6px rgba(26, 21, 34, .08); /* only what floats */
  --shadow-up: 0 -6px 16px rgba(26, 21, 34, .06); /* the bar at the bottom (the mockups' dock) */
  --shadow-menu: 0 8px 24px rgba(26, 21, 34, .10); /* a More menu (TP_Parts) */
  --backdrop: rgba(26, 21, 34, .45);
  --side-w: 264px; --topbar-h: 60px; --tabbar-h: 72px; --row-h: 44px; --gutter: 32px;
  --page-w: 1180px;          /* the work column of the mockups, centred (Home: 1100 px) */
  --zoom: 1;                 /* how large the whole page is drawn (a computer: below) */

  /* 1b. The names the page bodies use, from the brief's tokens */
  --surface: var(--card);
  --sunk: var(--page-alt);
  --hover: var(--row-open);
  --line: var(--hairline);
  --field: var(--ink-muted);  /* a field's edge: 5.6:1 on a card, 4.9:1 on the page (WCAG 1.4.11 asks 3:1) */
  --ui-bg: var(--sf-grey);
  --ink-2: var(--ink-muted);
  --icon: var(--ink-muted);
  --placeholder: var(--ink-muted);
  --primary: var(--accent);
  --primary-hover: var(--accent-hover);
  --primary-sel: var(--accent-soft);
  --primary-tint: var(--accent-soft);
  --on-primary: #ffffff;
  --on-accent: #ffffff;
  --accent-strong: var(--accent-hover);
  --link: var(--accent-hover);
  --positive: var(--st-green);
  --negative: var(--st-red);
  --danger: var(--st-red);
  --done: var(--st-green); --working: var(--st-amber); --stuck: var(--st-red); --waiting: var(--st-grey);
  --info: var(--st-blue); --review: var(--st-purple); --stopped: var(--st-navy); --grey-group: var(--st-grey);
  /* Status tones: ink (text on the tint), bg (the tint), line (an edge), icon (the badge) */
  --needs-ink: var(--sf-amber-ink); --needs-bg: var(--sf-amber); --needs-line: var(--amber-edge); --needs-icon: var(--st-amber);
  --done-ink: var(--sf-green-ink); --done-bg: var(--sf-green); --done-line: #9fd4bf; --done-icon: var(--st-green);
  --wait-ink: var(--sf-grey-ink); --wait-bg: var(--sf-grey); --wait-line: var(--hairline); --wait-icon: var(--st-grey);
  --block-ink: var(--sf-red-ink); --block-bg: var(--sf-red); --block-line: #f1b9c2; --block-icon: var(--st-red);
  --info-ink: var(--st-navy); --info-bg: var(--info-panel); --info-line: #d3def3; --info-icon: var(--st-blue);
  --on-icon: #ffffff;
  /* All Products pass (21 Oct 2026): the white of words and marks on a solid fill, the purple tone's edge, a mask's solid part */
  --on-fill: #ffffff;
  --review-line: #d6c8f5;
  --mask: #000000;          /* a mask uses only the alpha */
  --diff-bg: var(--warn-row); --diff-bar: var(--st-amber);
  /* The test-system strip */
  --test-bg: #2B1C00; --test-ink: #FFE7A3; --test-stripe: #4A3200;
  --radius: var(--r-12); --radius-sm: var(--r-10); --radius-lg: var(--r-14);
  --r-sm: var(--r-8); --r-md: var(--r-12);
  --shadow-xs: none; --shadow: none; --shadow-sm: var(--shadow-float); --shadow-md: var(--shadow-float); --shadow-pop: var(--shadow-float);
  --scrim: var(--backdrop);
  --title-font: var(--font);
}

/* ---------- 2. Base: Poppins 400, 14px body text ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-bottom: 96px; }
body {
  margin: 0; background: var(--page); color: var(--ink-body); font: 400 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-wrap: break-word;
}
h1, h2, h3, h4 { color: var(--ink); font-family: var(--font); }
h1 { font-size: 26px; font-weight: 600; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 17px; font-weight: 600; line-height: 1.4; margin: 28px 0 12px; }
h3 { font-size: 16px; font-weight: 600; line-height: 1.4; margin: 18px 0 8px; }
h4 { font-size: 14px; font-weight: 600; line-height: 1.4; margin: 14px 0 6px; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 20px; }
li + li { margin-top: 4px; }
a { color: var(--link); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); text-decoration-thickness: 2px; }
strong, b { font-weight: 600; color: var(--ink); }
small, .small { font-size: 12px; }
code, .code { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-8); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.muted { color: var(--ink-muted); }
.hint { color: var(--ink-muted); font-size: 13px; font-weight: 400; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.pre, span.pre, td.pre { white-space: pre-line; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
hr { border: 0; border-top: 1px solid var(--hairline); margin: 24px 0; }
.skip {
  position: absolute; left: 12px; top: -200px; z-index: 100;
  background: var(--card); color: var(--accent-hover); padding: 12px 16px; border-radius: var(--r-10); box-shadow: var(--shadow-float);
}
.skip:focus { top: 12px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Icons: the sprite's outline icons in the current colour (18 px), always next to a word or with words for a screen reader. The URL
   carries the sprite's version (tests: UiUnitTest), so a new sprite shows at once and the old one is kept for a year. */
.ico {
  display: inline-block; width: 18px; height: 18px; flex: none; vertical-align: middle; background: currentColor;
  -webkit-mask-position: center; mask-position: center; -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.ico-dashboard { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#dashboard"); mask-image: url("icons.svg?v=5bd6dbdf15661178#dashboard"); }
.ico-products { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#products"); mask-image: url("icons.svg?v=5bd6dbdf15661178#products"); }
.ico-stock { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#stock"); mask-image: url("icons.svg?v=5bd6dbdf15661178#stock"); }
.ico-purchasing { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#purchasing"); mask-image: url("icons.svg?v=5bd6dbdf15661178#purchasing"); }
.ico-reports { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#reports"); mask-image: url("icons.svg?v=5bd6dbdf15661178#reports"); }
.ico-approvals { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#approvals"); mask-image: url("icons.svg?v=5bd6dbdf15661178#approvals"); }
.ico-settings { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#settings"); mask-image: url("icons.svg?v=5bd6dbdf15661178#settings"); }
.ico-search { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#search"); mask-image: url("icons.svg?v=5bd6dbdf15661178#search"); }
.ico-key { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#key"); mask-image: url("icons.svg?v=5bd6dbdf15661178#key"); }
.ico-signout { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#signout"); mask-image: url("icons.svg?v=5bd6dbdf15661178#signout"); }
.ico-plus { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#plus"); mask-image: url("icons.svg?v=5bd6dbdf15661178#plus"); }
.ico-help { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#help"); mask-image: url("icons.svg?v=5bd6dbdf15661178#help"); }
.ico-filter { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#filter"); mask-image: url("icons.svg?v=5bd6dbdf15661178#filter"); }
.ico-sort { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#sort"); mask-image: url("icons.svg?v=5bd6dbdf15661178#sort"); }
.ico-export { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#export"); mask-image: url("icons.svg?v=5bd6dbdf15661178#export"); }
.ico-menu { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#menu"); mask-image: url("icons.svg?v=5bd6dbdf15661178#menu"); }
.ico-more { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#more"); mask-image: url("icons.svg?v=5bd6dbdf15661178#more"); }
.ico-bell { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#bell"); mask-image: url("icons.svg?v=5bd6dbdf15661178#bell"); }
.ico-close { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#close"); mask-image: url("icons.svg?v=5bd6dbdf15661178#close"); }
.ico-chevron-right { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#chevron-right"); mask-image: url("icons.svg?v=5bd6dbdf15661178#chevron-right"); }
.ico-chevron-left { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#chevron-left"); mask-image: url("icons.svg?v=5bd6dbdf15661178#chevron-left"); }
.ico-chevron-down { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#chevron-down"); mask-image: url("icons.svg?v=5bd6dbdf15661178#chevron-down"); }
.ico-check { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#check"); mask-image: url("icons.svg?v=5bd6dbdf15661178#check"); }
.ico-user { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#user"); mask-image: url("icons.svg?v=5bd6dbdf15661178#user"); }
.ico-home { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#home"); mask-image: url("icons.svg?v=5bd6dbdf15661178#home"); }
.ico-goods-in { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#goods-in"); mask-image: url("icons.svg?v=5bd6dbdf15661178#goods-in"); }
.ico-counts { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#counts"); mask-image: url("icons.svg?v=5bd6dbdf15661178#counts"); }
.ico-orders { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#orders"); mask-image: url("icons.svg?v=5bd6dbdf15661178#orders"); }
.ico-sales { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#sales"); mask-image: url("icons.svg?v=5bd6dbdf15661178#sales"); }
.ico-matching { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#matching"); mask-image: url("icons.svg?v=5bd6dbdf15661178#matching"); }
.ico-sec-home { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#sec-home"); mask-image: url("icons.svg?v=5bd6dbdf15661178#sec-home"); }
.ico-sec-approvals { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#sec-approvals"); mask-image: url("icons.svg?v=5bd6dbdf15661178#sec-approvals"); }
.ico-sec-items { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#sec-items"); mask-image: url("icons.svg?v=5bd6dbdf15661178#sec-items"); }
.ico-sec-inventory { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#sec-inventory"); mask-image: url("icons.svg?v=5bd6dbdf15661178#sec-inventory"); }
.ico-sec-purchases { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#sec-purchases"); mask-image: url("icons.svg?v=5bd6dbdf15661178#sec-purchases"); }
.ico-sec-sales { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#sec-sales"); mask-image: url("icons.svg?v=5bd6dbdf15661178#sec-sales"); }
.ico-sec-listings { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#sec-listings"); mask-image: url("icons.svg?v=5bd6dbdf15661178#sec-listings"); }
.ico-sec-reports { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#sec-reports"); mask-image: url("icons.svg?v=5bd6dbdf15661178#sec-reports"); }
/* Profit (0074, docs/decisions.md PR23): the reports' chart, in the section's own colour. */
.ico-sec-profit { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#sec-profit"); mask-image: url("icons.svg?v=5bd6dbdf15661178#sec-profit"); }
.ico-sec-settings { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#sec-settings"); mask-image: url("icons.svg?v=5bd6dbdf15661178#sec-settings"); }
.ico-receive { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#receive"); mask-image: url("icons.svg?v=5bd6dbdf15661178#receive"); }
.ico-count { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#count"); mask-image: url("icons.svg?v=5bd6dbdf15661178#count"); }
.ico-dots { -webkit-mask-image: url("icons.svg?v=5bd6dbdf15661178#dots"); mask-image: url("icons.svg?v=5bd6dbdf15661178#dots"); }

/* ---------- 3. Strips (the test system, every page) and toasts ---------- */
.strip.test-system {
  margin: 0; padding: 4px 16px; text-align: center; font: 600 13px/20px var(--font); letter-spacing: .02em;
  color: var(--test-ink); background: repeating-linear-gradient(135deg, var(--test-bg) 0 14px, var(--test-stripe) 14px 28px);
}
/* A message after a change (the layout's notice): a toast at the bottom right, green for done (.toast.info dark, .toast.error red).
   app.js lets it fade after a while; without the script it stays. (p.notice.toast: above the notice box's own look.) */
p.notice.toast, p.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 90; display: flex; align-items: flex-start; gap: 10px;
  max-width: min(420px, calc(100vw - 32px)); margin: 0; padding: 12px 16px; border: 0; border-radius: var(--r-12); box-shadow: var(--shadow-float);
  background: var(--st-green); color: var(--on-fill); font: 500 14px/20px var(--font); transition: opacity .3s, transform .3s;
}
p.notice.toast::before, p.toast::before {
  content: "\2713"; content: "\2713" / ""; flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; margin: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .22); color: var(--on-fill); font: 700 12px/1 var(--font);
}
p.toast.info { background: var(--ink); }
p.toast.info::before { content: "i"; content: "i" / ""; }
p.toast.error { background: var(--st-red); }
p.toast.error::before { content: "!"; content: "!" / ""; }
p.toast a { color: inherit; font-weight: 600; text-decoration: underline; }
p.toast.is-gone { opacity: 0; transform: translateY(8px); pointer-events: none; }
@media (max-width: 699.98px) { p.notice.toast, p.toast { left: 16px; right: 16px; bottom: 16px; max-width: none; } }

/* ---------- 4. Shell: the approved redesign's sidebar (Sidebar.dc.html, 30 Oct 2026; docs/decisions.md RD1, RD5), the lilac work area; on a
   phone the top bar, the same sidebar as a drawer, and the bottom bar (Phone.dc.html) ---------- */
.appbar { display: none; }
/* The CW tile: the sidebar's (36 px), the phone's top bar's (32 px); the sign-in page's mark (.brand-mark) is its own */
.brand-tile {
  display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: var(--r-10);
  background: var(--accent); color: var(--on-fill); font: 700 14px/1 var(--font);
}
.brand-mark {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-12); flex: none;
  background: var(--accent); color: var(--on-fill); font: 700 14px/1 var(--font); letter-spacing: .02em;
}
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: var(--r-10); flex: none;
  color: var(--ink-muted); text-decoration: none; background: none; border: 0; cursor: pointer;
}
.icon-btn:hover { background: var(--page-alt); color: var(--ink); }
.icon-btn .ico { width: 20px; height: 20px; }

/* Each section's colour (its icon chip, its count, its tint when it is current, its current page's words): Sidebar.dc.html's renderVals */
.sec-home, .sec-listings { --sec: var(--accent); --sec-tint: var(--accent-soft); --sec-ink: var(--accent-hover); }
.sec-approvals { --sec: var(--st-purple); --sec-tint: var(--sf-purple); --sec-ink: var(--st-purple); }
.sec-items { --sec: var(--st-blue); --sec-tint: var(--sf-blue); --sec-ink: var(--st-blue); }
.sec-inventory { --sec: var(--st-teal); --sec-tint: var(--sf-teal); --sec-ink: var(--st-teal); }
.sec-purchases { --sec: var(--st-amber); --sec-tint: var(--sf-amber); --sec-ink: var(--st-amber); }
.sec-sales { --sec: var(--st-green); --sec-tint: var(--sf-green); --sec-ink: var(--st-green); }
.sec-reports { --sec: var(--st-navy); --sec-tint: var(--sf-blue); --sec-ink: var(--st-navy); }
.sec-profit { --sec: var(--st-green); --sec-tint: var(--sf-green); --sec-ink: var(--st-green); }
.sec-settings { --sec: var(--ink-body); --sec-tint: var(--sf-grey); --sec-ink: var(--ink-body); }

/* The sidebar: the CW tile, the name and the stores; the find box; one row per section (42 px, its 28 px icon chip in its tint, white on
   the current one, its count a pill in its colour), a 1 px divider above Items and above Reports; the current section tinted, its pages
   under it (13 px, 34 px, a 2 px line on their left; the current one in the section's colour on its tint); the person at the bottom. The
   same markup is the phone's drawer. The tests read nav[aria-label=Main] > ul.nav > li > a.nav-item. */
.side { background: var(--card); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.side-head { display: none; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: var(--ink); text-decoration: none; }
.side-brand:hover { color: var(--ink); text-decoration: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { min-width: 0; color: var(--ink); font: 600 15px/1.2 var(--font); }
.brand-stores { color: var(--ink-muted); font: 400 11px/1.3 var(--font); }
.side-find {
  display: flex; align-items: center; gap: 8px; height: 40px; margin: 0 0 14px; padding: 0 12px;
  border: 1px solid var(--field); border-radius: var(--r-10); background: var(--card);
}
.side-find:focus-within { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
.side-find .ico { width: 16px; height: 16px; color: var(--ink-muted); }
.side-find input[type="search"] {
  flex: 1 1 auto; width: 100%; min-width: 0; min-height: 0; height: 38px; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none;
  background: transparent; color: var(--ink); font: 400 13px/20px var(--font);
}
.side-find input[type="search"]:focus, .side-find input[type="search"]:focus-visible { outline: none; }
.side-find input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.nav li { margin: 0; }
.nav-gap { height: 1px; margin: 10px 8px; border: 0; background: var(--divider); }
.nav-item {
  display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 10px; border-radius: var(--r-10);
  color: var(--ink-body); text-decoration: none; font: 500 14px/20px var(--font);
}
.nav-item:hover { background: var(--page-alt); color: var(--ink); text-decoration: none; }
.nav-item[aria-current] { background: var(--sec-tint); color: var(--ink); font-weight: 600; }
.nav-chip { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: var(--r-8); background: var(--sec-tint); color: var(--sec); }
.nav-chip .ico { width: 16px; height: 16px; }
.nav-item[aria-current] .nav-chip { background: var(--card); }
.nav-label { flex: 1 1 auto; min-width: 0; }
.nav-item > .count {
  flex: none; padding: 1px 8px; border-radius: var(--r-pill); background: var(--sec); color: var(--on-fill);
  font: 600 11px/16px var(--font); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.nav-sub { list-style: none; display: grid; gap: 2px; margin: 2px 0 8px 22px; padding: 0 0 0 12px; border-left: 2px solid var(--divider); }
.nav-sub li { margin: 0; }
.nav-sub-item {
  display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 10px; border-radius: var(--r-8);
  color: var(--ink-muted); font: 500 13px/18px var(--font); text-decoration: none;
}
a.nav-sub-item[href]:hover { background: var(--page-alt); color: var(--ink); text-decoration: none; }
.nav-sub-item[aria-current] { background: var(--sec-tint); color: var(--sec-ink); font-weight: 600; }
.nav-sub-item > .count {
  flex: none; padding: 1px 8px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-hover);
  font: 600 11px/16px var(--font); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.side-user {
  position: relative; margin-top: auto; padding: 20px 0 0 8px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center;
}
.avatar {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: var(--st-blue); color: var(--on-fill); font: 600 13px/1 var(--font);
}
.side-user .who { margin: 0; min-width: 0; line-height: 1.25; }
.side-user .who strong { display: block; font: 600 13px/18px var(--font); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .who-jobs { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--ink-muted); font: 400 11px/16px var(--font); }
.side-user .role { color: var(--ink-muted); font-weight: 400; }
/* The person's menu ("My account", "Sign out"): a <details>, so it needs no script; it opens upwards */
details.user-menu { border: 0; padding: 0; margin: 0; background: none; }
details.user-menu > summary { list-style: none; min-height: 0; margin: 0; width: 32px; height: 32px; }
details.user-menu > summary::-webkit-details-marker { display: none; }
details.user-menu[open] > summary { margin: 0; background: var(--page-alt); color: var(--ink); }
.user-pop {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 30; padding: 6px; margin: 0;
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-12); box-shadow: var(--shadow-float);
}
.user-pop form.signout { margin: 0; }
.side-link {
  display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; min-height: 40px;
  padding: 8px 10px; margin: 0; border: 0; border-radius: var(--r-8); background: none; color: var(--ink-body);
  font: 500 14px/20px var(--font); text-decoration: none; text-align: left; cursor: pointer;
}
.side-link:hover { background: var(--page-alt); color: var(--ink); text-decoration: none; }
.side-link .ico { color: var(--ink-muted); }
.side-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent-hover); }

/* The work area */
.work { display: block; min-width: 0; padding: 28px var(--gutter) 48px; }
.work:focus { outline: none; }
.scrim { display: none; }
.tabbar { display: none; }
.page { max-width: var(--page-w); margin: 0 auto; position: relative; container-type: inline-size; }
/* A list shows no figure tiles (the owner, 30 Oct 2026: figures only on Home and the reports; RD10): its figures strip is not drawn. A strip
   that holds a safety message (What to buy's "the sales data is old", Low stock's failed run: RD-B7) stays (.rp-keep, the integration). */
.work.is-list .rp-figs:not(.rp-keep) { display: none; }

@media (min-width: 700px) {
  .shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); align-items: start; min-height: calc(100vh / var(--zoom)); }
  .side {
    position: sticky; top: 0; height: calc(100vh / var(--zoom)); overflow-y: auto; padding: 20px 14px 24px;
    border-right: 1px solid var(--hairline); scrollbar-width: thin;
  }
  body:has(.strip.test-system) .side { height: calc(100vh / var(--zoom) - 28px); top: 0; }
}
/* A computer fits more on every page (owner, 2 Nov 2026): the whole page is drawn smaller and the work column is wider. Phones and
   tablets stay as they are. 100vh is the screen's height, so a full-height box divides it by --zoom; app.js does the same for a list. */
@media screen and (min-width: 1024px) and (pointer: fine) {
  :root { --zoom: .85; --page-w: 1520px; }
  html { zoom: var(--zoom); }
}
@media (min-width: 700px) and (max-width: 1023.98px) { :root { --gutter: 24px; } .work { padding-top: 24px; } }

/* A phone (Phone.dc.html): the sticky 60 px top bar (the CW tile, the section's name, Find and Menu, 44 px each); the sidebar slides in
   from the left as the drawer; the 72 px bottom bar (Home, Receive, Count, Approvals, More: its icon over its name, the open one in the
   accent) */
@media (max-width: 699.98px) {
  :root { --gutter: 16px; }
  html { scroll-padding-top: calc(var(--topbar-h) + 8px); }
  .appbar {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 40; min-height: var(--topbar-h);
    padding: 0 16px; background: var(--card); border-bottom: 1px solid var(--hairline);
  }
  .appbar-home { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: -6px; text-decoration: none; }
  .appbar .brand-tile { width: 32px; height: 32px; border-radius: var(--r-10); font-size: 13px; }
  .appbar-title { flex: 1 1 auto; min-width: 0; color: var(--ink); font: 600 16px/22px var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .appbar .icon-btn { width: 44px; height: 44px; color: var(--ink-body); }
  .work { padding: 20px var(--gutter) 40px; }
  .side {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 70; width: min(88vw, 320px);
    overflow-y: auto; box-shadow: var(--shadow-float); padding: 0 16px calc(16px + env(safe-area-inset-bottom));
    transform: translateX(-102%); visibility: hidden;
    transition: transform .25s cubic-bezier(0, 0, .35, 1), visibility 0s linear .25s;
  }
  /* No script: #menu is the :target ("Menu" links to it; "Close the menu" and the scrim link to #main). */
  .side:target { transform: none; visibility: visible; transition: transform .25s cubic-bezier(0, 0, .35, 1); }
  .side:target + .scrim { display: block; position: fixed; inset: 0; z-index: 65; background: var(--backdrop); }
  .side-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: sticky; top: 0; z-index: 1; min-height: 60px; margin: 0 -16px 8px; padding: 8px 12px 8px 16px;
    background: var(--card); border-bottom: 1px solid var(--hairline);
  }
  .side-title { font: 600 17px/24px var(--font); color: var(--ink); }
  .side-find input[type="search"] { font-size: 16px; }
  .nav-item, .side-link { min-height: 48px; font-size: 15px; }
  .nav-sub-item { min-height: 44px; font-size: 14px; }
  .side-user { margin-top: 24px; }

  html { scroll-padding-bottom: calc(var(--tabbar-h) + 32px); }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--card); border-top: 1px solid var(--hairline); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    flex: 1 1 0; min-width: 0; min-height: var(--tabbar-h); padding: 6px 4px; color: var(--ink-body); text-decoration: none;
    font: 500 11px/14px var(--font); text-align: center;
  }
  .tabbar a .ico { width: 22px; height: 22px; }
  .tabbar a > span:not(.tb-badge):not(.ico):not(.visually-hidden) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar a:hover { color: var(--ink); }
  .tabbar a[aria-current="page"] { color: var(--accent); font-weight: 600; }
  .tb-badge {
    position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; padding: 0 5px; border-radius: var(--r-pill);
    background: var(--accent); color: var(--on-fill); font: 600 11px/18px var(--font); text-align: center; box-shadow: 0 0 0 2px var(--card);
  }
  body:has(.tabbar) { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  body:has(.tabbar) p.toast { bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); }
  /* Decision pages and a document's bar: the answer bar takes the bottom of the screen instead of the tab bar */
  body:has(.decide-bar) .tabbar { display: none; }
  body:has(.decide-bar) { padding-bottom: 0; }
}

/* ---------- 5. The page head (the redesign of 30 Oct 2026; docs/decisions.md RD3): a list is its title alone (26 px, 600) with ONE main
   button and More on the right; a record has "‹ list" above its title (13 px, muted), its status pill beside it and one fact line under it
   (14 px, muted), its actions on the right (Item.dc.html, GoodsReceived.dc.html). No sentence under a heading (DC1). Then the group's Show
   and the toolbar ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 20px; }
.page-head:has(.ph-back) { align-items: flex-start; }
.ph-text { flex: 1 1 26rem; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
/* An eyebrow a page names itself (Home's date, an error's code): small, uppercase, the accent */
.ph-eyebrow { margin: 0; font: 600 12px/18px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.ph-eyebrow .ph-tag { letter-spacing: .08em; }
/* A record's way back: "‹ Items", muted, no underline (the "‹" is drawn here, so the link's words are the list's name) */
.ph-back { margin: 0; color: var(--ink-muted); font: 400 13px/18px var(--font); }
.ph-back a { color: var(--ink-muted); text-decoration: none; }
.ph-back a::before { content: "\2039\00a0"; content: "\2039\00a0" / ""; }
.ph-back a:hover { color: var(--accent-hover); text-decoration: underline; }
.ph-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; }
.ph-title h1 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ph-title h1 .chip { margin-left: 6px; vertical-align: 5px; }
.ph-title h1 .muted { font-weight: 500; }
.ph-title > .subtitle { flex: 0 0 100%; margin: 0; color: var(--ink-body); font-weight: 500; } /* a website product's variant, under its name */
/* The one fact line under a record's title */
.ph-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; color: var(--ink-muted); font: 400 14px/20px var(--font); }
.ph-text .lede { margin: 10px 0 0; }
.lede { max-width: 75ch; margin: 0 0 16px; color: var(--ink-body); font: 400 14px/1.6 var(--font); }
.lede strong { color: var(--ink); }
.lede-more { display: block; margin-top: 4px; color: var(--ink-muted); font-size: 13px; line-height: 1.5; }
.ph-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: none; }
@media (max-width: 699.98px) {
  h1 { font-size: 22px; line-height: 1.3; }
  .page-head { margin-bottom: 20px; align-items: stretch; }
  .ph-actions { width: 100%; }
}
/* The Show choice (RD2; Items.dc.html's select): a <details> of links that looks like a 44 px select, the current choice its words; the
   list of the group's pages opens under it (the current one tinted, not a link). The head draws it in .show-row when the page does not
   draw it in its toolbar. */
.show-row { display: flex; flex-wrap: wrap; gap: 10px; margin: -4px 0 20px; }
details.show-menu { position: relative; flex: none; margin: 0; padding: 0; border: 0; background: none; }
.show-select {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; height: 44px; margin: 0; padding: 0 38px 0 12px;
  border: 1px solid var(--field); border-radius: var(--r-10); background: var(--card); color: var(--ink); font: 400 14px/20px var(--font);
  list-style: none; cursor: pointer; white-space: nowrap;
}
.show-select::-webkit-details-marker { display: none; }
.show-select::after {
  content: ""; position: absolute; right: 15px; top: 50%; width: 7px; height: 7px; margin-top: -6px;
  border-right: 2px solid var(--ink-muted); border-bottom: 2px solid var(--ink-muted); transform: rotate(45deg);
}
.show-select:hover { border-color: var(--ink-body); }
details.show-menu[open] > .show-select { border-color: var(--accent); }
.show-list {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: max-content; min-width: 100%; max-width: min(360px, calc(100vw - 32px));
  margin: 0; padding: 6px; list-style: none; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-12);
  box-shadow: var(--shadow-menu);
}
details.show-menu > .show-list, details.show-menu > .show-panel { max-height: min(60vh, 32rem); overflow-y: auto; }
.show-list li { margin: 0; }
.show-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 8px 12px; border-radius: var(--r-8);
  color: var(--ink-body); text-decoration: none; font: 500 14px/20px var(--font);
}
a.show-item:hover { background: var(--page-alt); color: var(--ink); text-decoration: none; }
.show-item[aria-current] { background: var(--accent-soft); color: var(--accent-hover); font-weight: 600; }
.show-select > .count, details.more > summary > .count {
  flex: none; margin-left: 6px; padding: 1px 8px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-hover);
  font: 600 11px/16px var(--font); font-variant-numeric: tabular-nums;
}
.show-item > .count {
  flex: none; padding: 1px 8px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-hover);
  font: 600 11px/16px var(--font); font-variant-numeric: tabular-nums;
}
/* ONE Show that also holds the page's own filter fields (View::showStart, the integration of 30 Oct 2026): the group's pages and, under them
   in the same panel, the page's .tb-state (its GET form's select and its Show button, as before) */
.show-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: max-content; min-width: 100%; max-width: min(360px, calc(100vw - 32px));
  margin: 0; padding: 6px; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-12); box-shadow: var(--shadow-menu);
}
.show-panel > .show-list { position: static; width: auto; min-width: 0; max-width: none; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
details.show-menu > .show-panel > .tb-state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 0; padding: 10px 6px 4px;
  border-top: 1px solid var(--divider); }
details.show-menu > .show-panel > .tb-state + .tb-state { margin-top: 0; border-top: 0; }
details.show-menu > .show-panel > .tb-state > label:not(.choice) { display: grid; gap: 4px; flex: 1 1 100%; margin: 0; color: var(--ink-muted); font: 500 12px/16px var(--font); }
details.show-menu > .show-panel > .tb-state > label > select { color: var(--ink); font: 400 14px/20px var(--font); }
details.show-menu > .show-panel > .tb-state select { flex: 1 1 12rem; min-width: 0; }
.ph-actions details.show-menu > .show-panel, .ph-actions details.show-menu > .show-list { left: auto; right: 0; }
@media (max-width: 699.98px) {
  .show-select { font-size: 16px; }
  .show-item { min-height: 44px; }
}
/* A page drawn without a statement (an old template; Ui\View draws the frame then) keeps the same order and look */
.frame-only { margin: 0 0 8px; }

/* Tabs: ONE component for every tab-like control (the owner, 29 Oct 2026: "tab change follow this design pattern"; the parts board
   TP_Parts and the item page IT_Item; docs/decisions.md DS2). No section tab row any more (the sidebar lists a section's pages, DC28): a
   record's parts (IT_Item, the supplier), a page's own lists (Show, the stores, the states, the periods, the match strengths, the barcodes), a page's parts: each a
   <nav class="tabs"> of <a class="tab">. 14 px semi-bold muted words; the open tab (aria-current) in the dark accent with a 3 px accent
   bar under it; a count is a bubble (.count) that turns accent on the open tab; 44 px to tap. From 700 px up the row wraps as TP_Parts
   draws it (12 px by 14 px, the open tab's bar over the row's 1 px line; docs/decisions.md DC9); on a phone it stays one row that scrolls
   sideways inside itself, never the page, and app.js fades the side that has more (section 24). A second row sits right under the first.
   A tab not built yet is a disabled span with a "Soon" pill. */
.tabs {
  position: relative; display: flex; gap: 4px; margin: 0 0 24px; padding: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scrollbar-width: thin; box-shadow: inset 0 -1px 0 var(--hairline);
}
@media (min-width: 700px) {
  .tabs { flex-wrap: wrap; overflow: visible; box-shadow: none; border-bottom: 1px solid var(--hairline); }
  .tabs > .tab { margin-bottom: -1px; }
}
.page-head + .tabs, .frame-only > .tabs:first-child { margin-top: -8px; }
.tabs + .tabs { margin-top: -16px; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 44px; padding: 12px 14px;
  color: var(--ink-muted); font: 600 14px/20px var(--font); text-decoration: none; white-space: nowrap;
  border-bottom: 3px solid transparent;
}
a.tab:hover { color: var(--ink); text-decoration: none; }
@media (hover: hover) { a.tab:not([aria-current]):hover { border-bottom-color: var(--hairline); } }
.tab[aria-current] { color: var(--accent-hover); border-bottom-color: var(--accent); }
/* The tab of the page shown has no link (docs/decisions.md CV13): the open tab's look, nothing to click */
.tab[aria-current]:not([href]) { cursor: default; }
a.tab[aria-current]:not([href]):hover { color: var(--accent-hover); }
.tab > .count {
  flex: none; display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill);
  background: var(--sf-grey); color: var(--ink-body); font: 700 11px/20px var(--font); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.tab[aria-current] > .count:not(.soon) { background: var(--accent); color: var(--on-fill); }
.tab.soon { color: var(--ink-faint); cursor: default; }
.tab > .count.soon { background: transparent; box-shadow: inset 0 0 0 1px var(--hairline); color: var(--ink-muted); font-weight: 600; }
/* A tab's own mark: a match strength's colour key, a state's dot (the tone class on the tab gives the colour) */
.tab > .key { flex: none; width: 12px; height: 12px; border-radius: 2px; background: var(--t-fill); }
/* A menu item's name and one muted line under it (a More of a page's toolbar) */
.menu-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.menu-sub { color: var(--ink-muted); font: 400 12px/16px var(--font); }
.more-menu .menu-item:has(> .menu-sub) { flex-direction: column; align-items: flex-start; gap: 2px; }
/* Tabs inside a card (the match strengths under their bar, a page's parts): the card's padding is the row's edge */
.card > .tabs { margin: 12px 0 16px; }


/* The page under the head */
.content { padding: 0; }
.main { display: block; min-width: 0; padding: 32px var(--gutter) 48px; }
.main:focus { outline: none; }
.main.bare .page { max-width: 480px; margin: 0 auto; }
/* The toolbar (filters/toolbar row): Search with its magnifier taking the free width and the Show choice beside it, 40 px and 14 px as
   the board mockups draw them (docs/decisions.md DC10); Filter and Sort as small plain buttons (<details> pop-overs, so they work without
   app.js; their Apply is plain: a list's filter is never the page's main action, DS5), Export at the far end. */
.toolbar { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 24px; }
.toolbar .btn .ico, .tb-pop > summary .ico { width: 16px; height: 16px; }
.tb-pop > summary::-webkit-details-marker { display: none; }
.tb-search { position: relative; display: inline-flex; align-items: center; flex: 1 1 280px; min-width: 0; }
.tb-search .ico { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--ink-muted); pointer-events: none; }
.tb-search input[type="search"] {
  width: 100%; min-height: 40px; height: 40px; padding: 8px 12px 8px 36px; font: 400 14px/22px var(--font);
  background: var(--card); border: 1px solid var(--field); border-radius: var(--r-10); transition: border-color .1s;
}
.tb-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.tb-search input:hover { border-color: var(--ink-body); }
.tb-search input:focus-visible, .tb-search input:not(:placeholder-shown) { border-color: var(--accent); }
/* A toolbar's panel (Filter, Sort, a board's Show control) is placed against the toolbar, right-aligned and never wider than it: a search
   that takes the free width puts its button at the right edge, and a panel from the button's left edge ran off the screen (the Codex review
   of f4d1126, DC31) */
.tb-pop { position: static; margin: 0; padding: 0; border: 0; background: none; }
.tb-pop > summary { list-style: none; margin: 0; }
.tb-pop[open] > summary { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hover); margin-bottom: 0; }
.tb-pop > summary .count { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-fill);
  font: 600 11px/18px var(--font); text-align: center; }
.tb-end { margin-left: auto; display: inline-flex; gap: 8px; }
.pop {
  position: absolute; top: calc(100% + 6px); left: auto; right: 0; z-index: 30; width: max-content; min-width: min(220px, 100%);
  max-width: min(400px, 100%); margin: 0; padding: 6px; list-style: none;
  background: var(--card); color: var(--ink-body); border: 1px solid var(--hairline); border-radius: var(--r-12); box-shadow: var(--shadow-float);
}
.pop li { margin: 0; }
.pop-form { display: grid; gap: 12px; padding: 16px; min-width: min(300px, 100%); }
.pop-form label:not(.choice) { color: var(--ink); }
/* A board's ONE Show control when it holds several filters (All Products: the card, the kind, four ticks; DC27): a pop-over of those inputs
   and its Show button, its count the filters on */
.tb-show .pop-form select { width: 100%; min-width: 0; }
.tb-show .pop-form label.tb-check { min-height: 44px; }
.pop-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 639.98px) {
  /* Search takes the free width; a pop-over opens under the whole toolbar, full width */
  .tb-search { flex: 1 1 8rem; }
  .tb-search input[type="search"] { height: 44px; min-height: 44px; font-size: 16px; }
  .pop { left: 0; right: 0; width: auto; max-width: none; min-width: 0; }
  .pop-form { min-width: 0; }
  .tb-end { margin-left: 0; }
}

/* Breadcrumbs (a detail page's way back to its list) and "see also" links */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; margin: 0 0 8px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 32px; font-weight: 500; }
p.crumbs > a:first-child::before { content: "\2190\00a0"; content: "\2190\00a0" / ""; }
.crumbs .actions, .crumbs form { margin: 0; }
.see-also { display: flex; flex-wrap: wrap; gap: 0 16px; margin: 0 0 16px; }
.see-also a { display: inline-flex; align-items: center; min-height: 32px; font-weight: 500; }
.later { margin-top: 32px; }
.prose, :where(.page > p, .card > p, section > p) { max-width: 80ch; }
section.box, section { margin: 0 0 24px; }
.section-title { font: 600 17px/24px var(--font); color: var(--ink); margin: 0 0 12px; }
/* The older "title and its ?" row */
.head-help { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 24px 0 10px; }
.head-help > h1, .head-help > h2, .head-help > h3 { margin: 0; }

/* ---------- 6. Cards, KPI tiles and boards ---------- */
.card, section.box, dl.wide {
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-14); padding: 20px;
}
@media (min-width: 1024px) { .card { padding: 20px 24px; } }
.card > :last-child { margin-bottom: 0; }
.card > h2:first-child, .card > h3:first-child, section.box > h2:first-child { margin-top: 0; }
.card h2 { font-size: 16px; }
.card .title { font-weight: 600; color: var(--ink); margin: 2px 0; overflow-wrap: anywhere; }
/* An older "state line" under a heading (chips and a few words) */
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 12px; font: 500 13px/20px var(--font); color: var(--ink-muted); }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
@container (max-width: 760px) { .cols { grid-template-columns: minmax(0, 1fr); } }
.cols > .card, .cols > section { margin: 0; }
/* Work waiting from another team (the amber request panel) */
section.box.waiting, .card.waiting:not(.task), .company-status.waiting, .elsewhere {
  background: var(--amber-panel); border: 1.5px solid var(--amber-edge); border-radius: var(--r-14);
}
section.box.waiting > h2, .card.waiting:not(.task) > h2, .elsewhere > h2 { color: var(--sf-amber-ink); }

/* KPI tiles: a grid (at least 180 px each, two a row on a phone); each tile a white card (radius 16), its label after a 10 px coloured
   square, the big figure, one muted line, a link to the list it counts. */
.kpis-wrap { container-type: inline-size; margin: 0 0 24px; }
.kpis { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin: 0; padding: 0; list-style: none; }
@media (max-width: 699.98px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.kpi {
  display: flex; flex-direction: column; margin: 0; padding: 18px 20px; min-width: 0;
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-16);
}
.kpi + .kpi { margin-top: 0; }
.kpi-label { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink-muted); font: 500 13px/18px var(--font); }
.kpi-label::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--kpi-dot, var(--accent)); }
.kpi:nth-child(4n+2) { --kpi-dot: var(--st-blue); }
.kpi:nth-child(4n+3) { --kpi-dot: var(--st-green); }
.kpi:nth-child(4n+4) { --kpi-dot: var(--st-amber); }
.kpi.needs, .kpi.done, .kpi.blocked, .kpi.info, .kpi.review, .kpi.waiting, .kpi.off { --kpi-dot: var(--t-fill); }
.kpi-value { margin: 12px 0 6px; color: var(--ink); font: 700 32px/1 var(--font); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-sub { margin: 0; color: var(--ink-muted); font: 400 12px/16px var(--font); }
.kpi-link { display: inline-flex; align-items: center; min-height: 32px; margin-top: auto; padding-top: 8px; font: 500 13px/18px var(--font); align-self: flex-start; }
@media (max-width: 699.98px) { .kpi { padding: 14px 16px; } .kpi-value { font-size: 26px; } }
.chg { font-weight: 600; }
.chg.up { color: var(--st-green); }
.chg.down { color: var(--st-red); }
.sub-h { display: block; font-size: 12px; line-height: 16px; }
/* The older figure tiles (a <dl>) look the same */
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); margin: 0 0 24px; }
.stat { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-16); padding: 18px 20px; margin: 0; display: block; }
.stat dt { display: flex; align-items: center; gap: 8px; color: var(--ink-muted); font: 500 13px/18px var(--font); }
.stat dt::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.stat dd { margin: 10px 0 0; color: var(--ink); font: 700 26px/1.1 var(--font); font-variant-numeric: tabular-nums; }
.stat dd small { display: block; margin-top: 6px; font: 400 12px/16px var(--font); color: var(--ink-muted); }

/* Boards (the redesign's simple lists, 30 Oct 2026; RD8): a board title, then one block per group: its heading (a 10 px dot in the group's
   colour, the name 15 px semi-bold in ink, the count in muted words), then its table in a white card. A group folds (app.js; its heading
   is the button); the chevron shows only on a folded group (docs/decisions.md DC12); without the script every group stays open. */
.board-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 28px 0 12px; }
.board-head:first-child { margin-top: 0; }
.board-head > h2, .board-head > h3, .board-title, .board-sub { margin: 0; font: 600 17px/24px var(--font); color: var(--ink); }
.board-note { margin: 0; color: var(--ink-muted); font: 400 13px/20px var(--font); }
.grp-block { margin: 0 0 24px; }
.t-primary { --t-fill: var(--accent); --t-soft: var(--accent-soft); --t-ink: var(--accent-hover); }
.grp-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 18px 0 8px; font: 400 15px/22px var(--font); color: var(--ink); }
.grp-title::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: var(--r-pill); background: var(--t-fill, var(--st-grey)); }
.grp-toggle {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin: 0 0 0 -6px; padding: 4px 6px;
  border: 0; border-radius: var(--r-8); background: none; color: var(--ink);
  font: 600 15px/22px var(--font); cursor: pointer;
}
.grp-toggle:hover { background: rgba(26, 21, 34, .05); color: var(--ink); }
.grp-toggle[aria-expanded="false"]::before {
  content: ""; width: 8px; height: 8px; margin: 0 6px 0 4px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor;
  transform: rotate(-45deg);
}
html:not(.js) .grp-toggle { cursor: default; }
html:not(.js) .grp-toggle:hover { background: none; }
.grp-count { color: var(--ink-muted); font: 400 15px/22px var(--font); }
.grp-name { font: 600 15px/22px var(--font); color: var(--ink); }
/* Groups inside one table (a heading row per tbody) */
table.board tbody.grp > tr.grp-head > th {
  height: auto; padding: 20px 16px 8px; border: 0; background: var(--card); text-align: left; position: static; font-weight: 400;
}
table.board tbody.grp:first-of-type > tr.grp-head > th { padding-top: 10px; }
table.board tbody.grp > tr.grp-head:hover > * { background: var(--card); }
table.board tbody.grp > tr.grp-head .grp-title { margin: 0; }
tbody.grp.is-collapsed > tr:not(.grp-head) { display: none; }
@container (max-width: 640px) {
  table.stack.board tbody.grp > tr.grp-head { display: block; padding: 0; border: 0; background: none; box-shadow: none; margin-top: 8px; }
  table.stack.board tbody.grp > tr.grp-head > th { padding: 0; }
}
table.board .grp-add > td { height: 44px; color: var(--ink-muted); text-align: left; }
/* "+ Add …": the quiet text row of the board mockups (muted words, no edge; DC12) */
.add-item {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 0; border: 0;
  color: var(--ink-muted); text-decoration: none; font: 400 14px/20px var(--font);
}
.add-item:hover { color: var(--accent-hover); text-decoration: underline; }
table.board .grp-foot > * { font-weight: 600; color: var(--ink); background: var(--page-alt); }
table.board tbody tr.grp-foot:hover > *, table.board tbody tr.grp-add:hover > * { background: var(--page-alt); }
table.board th.c-item { min-width: 14rem; }
table.board .o-sub { display: block; color: var(--ink-muted); font: 400 12px/16px var(--font); }

/* ---------- 7. Status: three parts, one set of colours (the parts board TP_Parts; docs/decisions.md DS3). The tone class carries the
   colour, the same everywhere: grey `waiting` (a draft, not started), blue `info` (sent, new), purple `review` (waiting for someone, being
   checked), amber `needs` (needs a look), green `done`, red `blocked` (late, refused), navy `off` (closed, switched off). Ui\Html::chip
   and Words::TONE are the one status-to-colour mapping. The parts:
     .chip       the status pill (the redesign, RD8): the tone's tint and its darker words, 12 px semi-bold, small corners (KG12); beside a
                 record's title a little wider (Item.dc.html)
     td.doc-st   a board's status cell: it carries the tone for the .chip it holds (section pi-design)
     .tag        a small fact: the tone's tint and its words, small corners (KG12); with no tone, grey ---------- */
/* Tones. --t-fill = the solid colour (pills, group headings, KPI squares); --t-soft = its tint; --t-ink = text on the tint. */
.needs   { --t-fill: var(--st-amber);  --t-soft: var(--sf-amber);  --t-ink: var(--sf-amber-ink);  --t-bg: var(--needs-bg); --t-line: var(--needs-line); --t-icon: var(--needs-icon); }
.done    { --t-fill: var(--st-green);  --t-soft: var(--sf-green);  --t-ink: var(--sf-green-ink);  --t-bg: var(--done-bg);  --t-line: var(--done-line);  --t-icon: var(--done-icon); }
.waiting { --t-fill: var(--st-grey);   --t-soft: var(--sf-grey);   --t-ink: var(--sf-grey-ink);   --t-bg: var(--wait-bg);  --t-line: var(--wait-line);  --t-icon: var(--wait-icon); }
.blocked { --t-fill: var(--st-red);    --t-soft: var(--sf-red);    --t-ink: var(--sf-red-ink);    --t-bg: var(--block-bg); --t-line: var(--block-line); --t-icon: var(--block-icon); }
.info    { --t-fill: var(--st-blue);   --t-soft: var(--sf-blue);   --t-ink: var(--sf-blue-ink);   --t-bg: var(--info-bg);  --t-line: var(--info-line);  --t-icon: var(--info-icon); }
.off     { --t-fill: var(--st-navy);   --t-soft: var(--sf-grey);   --t-ink: var(--sf-grey-ink);   --t-bg: var(--wait-bg);  --t-line: var(--wait-line);  --t-icon: var(--st-navy); }
.review  { --t-fill: var(--st-purple); --t-soft: var(--sf-purple); --t-ink: var(--sf-purple-ink); --t-bg: var(--sf-purple); --t-line: var(--review-line); --t-icon: var(--st-purple); }

.chip {
  display: inline-flex; align-items: center; justify-content: center; flex: none; vertical-align: middle;
  padding: 3px 10px; border-radius: var(--r-pill); white-space: nowrap; border: 0;
  background: var(--t-soft, var(--sf-grey)); color: var(--t-ink, var(--sf-grey-ink)); font: 600 12px/18px var(--font); text-align: center;
}
/* The pill beside a record's title, in its fact line */
.chip.lg, .ph-title h1 .chip, .ph-meta .chip { padding: 4px 12px; font-size: 12px; }
td .chip + .chip, p .chip + .chip { margin-left: 4px; }

/* The soft tag: the tint and its words, 12 px semi-bold, small corners (KG12). Grey unless the tag itself names a tone (a tone class on a row
   around it is never inherited: the custom properties would pass down). */
.tag {
  display: inline-flex; align-items: center; gap: 6px; vertical-align: middle;
  padding: 2px 9px; border-radius: var(--r-pill); margin: 0 4px 2px 0;
  color: var(--sf-grey-ink); background: var(--sf-grey); border: 0; font: 600 12px/18px var(--font); white-space: normal;
}
.tag:is(.needs, .done, .waiting, .blocked, .info, .off, .review) { background: var(--t-soft); color: var(--t-ink); }
.tag .muted { color: inherit; opacity: .85; }

/* ---------- 8. Notices: info (a blue-white panel, navy words), warning (amber), problem (red), done (green), each with its badge.
   The older .notice / .note / .error look the same. ---------- */
.alert, .notice, .note, .error {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: start;
  padding: 12px 16px; margin: 0 0 16px; border-radius: var(--r-12); border: 1px solid var(--t-line, var(--info-line));
  background: var(--t-bg, var(--info-panel)); color: var(--t-ink, var(--st-navy)); max-width: none;
}
.alert { --t-bg: var(--info-panel); --t-ink: var(--st-navy); --t-line: var(--info-line); --t-icon: var(--st-blue); }
.alert.needs   { --t-bg: var(--sf-amber); --t-ink: var(--sf-amber-ink); --t-line: var(--amber-edge); --t-icon: var(--st-amber); }
.alert.done    { --t-bg: var(--sf-green); --t-ink: var(--sf-green-ink); --t-line: var(--done-line); --t-icon: var(--st-green); }
.alert.blocked { --t-bg: var(--sf-red); --t-ink: var(--sf-red-ink); --t-line: var(--block-line); --t-icon: var(--st-red); }
.alert.waiting, .alert.off { --t-bg: var(--sf-grey); --t-ink: var(--sf-grey-ink); --t-line: var(--hairline); --t-icon: var(--st-grey); }
.alert.review  { --t-bg: var(--sf-purple); --t-ink: var(--sf-purple-ink); --t-line: var(--review-line); --t-icon: var(--st-purple); }
.notice { --t-bg: var(--sf-green); --t-ink: var(--sf-green-ink); --t-line: var(--done-line); --t-icon: var(--st-green); }
.note   { --t-bg: var(--sf-amber); --t-ink: var(--sf-amber-ink); --t-line: var(--amber-edge); --t-icon: var(--st-amber); }
.note.done { --t-bg: var(--sf-green); --t-ink: var(--sf-green-ink); --t-line: var(--done-line); --t-icon: var(--st-green); }
.error  { --t-bg: var(--sf-red); --t-ink: var(--sf-red-ink); --t-line: var(--block-line); --t-icon: var(--st-red); }
.alert::before, .notice::before, .note::before, .error::before {
  content: "i"; content: "i" / ""; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  margin-top: -1px; grid-row: 1 / span 6; background: var(--t-icon); color: var(--on-fill); font: 700 12px/1 var(--font);
}
.alert.done::before, .notice::before, .note.done::before { content: "\2713"; content: "\2713" / ""; }
.alert.needs::before, .alert.blocked::before, .note::before, .error::before { content: "!"; content: "!" / ""; }
.note.done::before { content: "\2713"; content: "\2713" / ""; }
.alert.waiting::before, .alert.off::before { content: ""; background: transparent; border: 2px solid var(--t-icon); width: 20px; height: 20px; }
.alert.review::before { content: "?"; content: "?" / ""; }
.alert > *, .notice > *, .note > *, .error > * { grid-column: 2; margin: 0; }
.alert > * + * { margin-top: 6px; }
.alert-title { font-weight: 600; color: inherit; }
.alert ul { padding-left: 18px; }
.alert .btn { justify-self: start; margin-top: 8px; }
.alert strong, .notice strong, .note strong, .error strong { color: inherit; }
/* Links on a tinted box are the box's words, underlined */
.notice a, .note a, .error a, .alert a { color: inherit; font-weight: 600; text-decoration: underline; }
.field-error { margin: 0 0 4px; color: var(--st-red); font: 600 12px/18px var(--font); }
.field-error::before { content: "! "; content: "! " / ""; font-weight: 700; }
/* A field someone else changed while this form was open (the supplier form after a stale save) */
.field-theirs { margin: 0 0 4px; padding: 4px 10px; border-left: 3px solid var(--st-amber); border-radius: 0 var(--r-8) var(--r-8) 0;
  background: var(--sf-amber); color: var(--sf-amber-ink); font: 600 13px/20px var(--font); overflow-wrap: anywhere; }
.alert.admin-off { margin-bottom: 20px; }

/* ---------- 9. Buttons: ONE component (the owner, 29 Oct 2026: "button all design follow this"; the parts board TP_Parts; docs/decisions.md
   DS1, DS4-DS6). Every button is a .btn (a <button>, a link or a summary): plain white with a hairline, 600 14 px words, 10 px corners.
   A variant says what kind it is, and there are only these:
     .primary  the main action, magenta: ONE per page, or one per form where a page holds several (tests: UiTemplatesTest, the browser)
     .soft     a helper attached to a field ("Fill the lines"): the pink tint
     .ghost    quiet: Leave, Change, Skip, Clear, Export (no edge, muted words)
     .ok       the answer "yes / all fine": the green tint
     .risky    red words on white: only inside More or a confirm fold (Cancel, Reverse, Remove, Refuse)
   Sizes: .sm 34 px, normal 40 px, .lg 48 px (a big action, a two-line answer); on a phone every normal or large button is 48 px and a
   small one 44 px, and 44 px on a touch screen. Disabled: faded, the reason in plain words next to it (.btn-why). More: a details.more
   whose summary is a .btn ("More" and a drawn arrow) and whose .more-menu lists the rest, risky ones last; it needs no script, and on a
   phone it opens in the flow under its button. ---------- */
.btn, button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 16px; border-radius: var(--r-10);
  border: 1px solid var(--hairline); background: var(--card); color: var(--ink);
  font: 600 14px/20px var(--font); text-align: center; text-decoration: none; cursor: pointer; vertical-align: middle;
  -webkit-appearance: none; appearance: none; transition: background-color .1s, border-color .1s;
}
.btn:hover, button:hover { background: var(--page-alt); border-color: var(--ink-faint); color: var(--ink); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-fill); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-fill); }
.btn.soft { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-hover); }
.btn.soft:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-muted); padding-left: 12px; padding-right: 12px; }
.btn.ghost:hover { background: var(--page-alt); border-color: transparent; color: var(--ink); }
.btn.ok { background: var(--sf-green); border-color: var(--done-line); color: var(--sf-green-ink); }
.btn.ok:hover { background: var(--sf-green); border-color: var(--st-green); color: var(--sf-green-ink); }
.btn.risky { background: var(--card); border-color: var(--block-line); color: var(--sf-red-ink); }
.btn.risky:hover { background: var(--sf-red); border-color: var(--st-red); color: var(--sf-red-ink); }
.btn .ico { color: currentColor; }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: 13px; line-height: 20px; }
.btn.lg { min-height: 48px; padding: 10px 20px; font-size: 15px; border-radius: var(--r-12); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn[disabled]:hover, .btn[aria-disabled="true"]:hover { background: var(--card); border-color: var(--hairline); }
.btn.primary[disabled]:hover, .btn.primary[aria-disabled="true"]:hover { background: var(--accent); border-color: var(--accent); }
.btn-why { color: var(--ink-muted); font: 400 13px/20px var(--font); }
/* A two-line answer (its title, then what it does): the words from the left, across its row */
.btn:has(> .btn-title) { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; text-align: left; width: 100%; }
.btn .btn-title { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.btn .sub { font-size: 12px; line-height: 18px; font-weight: 400; }
.btn:not(.primary) .sub { color: var(--ink-muted); }
.btn-row, .actions, td.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
p.actions, div.actions { margin: 16px 0; }
.actions > a:not(.btn) { display: inline-flex; align-items: center; min-height: 40px; font-weight: 500; }
/* The password's "Show" (app.js adds it after the field's label) */
.reveal { margin-top: -2px; justify-self: start; }
@media (max-width: 699.98px), (pointer: coarse) { .btn, .btn.sm { min-height: 44px; } }
@media (max-width: 699.98px) { .btn:not(.sm) { min-height: 48px; } }

/* More: the rest of a page's or a record's actions (the create button's other "New …", a record's other steps). A <details>, so it needs
   no script; Esc or a click elsewhere closes it (app.js). Its items are rows: a link (.menu-item), a form's button, a fold's summary (a
   step that asks a reason opens in the menu). */
details.more { position: relative; display: inline-block; margin: 0; padding: 0; border: 0; background: none; }
details.more > summary { list-style: none; margin: 0; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: ""; width: 7px; height: 7px; margin: -4px 0 0 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
details.more[open] > summary { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hover); }
/* The menu as TP_Parts draws it (DC14): no inset, 10 by 14 px rows with a divider between them, square rows inside the 12 px corners, the
   menu's soft shadow */
.more-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: grid; gap: 0; width: max-content; min-width: 220px;
  max-width: min(32rem, calc(100vw - 32px)); padding: 0; overflow: hidden; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-12);
  box-shadow: var(--shadow-menu);
}
.more-menu > form, .more-menu > a, .more-menu > details { width: 100%; margin: 0; }
.more-menu > * + * { border-top: 1px solid var(--divider); }
.more-menu > .btn, .more-menu > form > .btn, .more-menu > details > summary.btn, .menu-item {
  display: flex; width: 100%; justify-content: flex-start; min-height: 40px; padding: 10px 14px; border: 0; border-radius: 0;
  background: none; color: var(--ink); font: 500 14px/20px var(--font); text-align: left; text-decoration: none; white-space: normal;
}
.more-menu > .btn:hover, .more-menu > form > .btn:hover, .more-menu > details > summary.btn:hover, .menu-item:hover { background: var(--page-alt); color: var(--ink); text-decoration: none; }
.more-menu > .btn.risky, .more-menu > form > .btn.risky, .more-menu > details > summary.btn.risky { color: var(--sf-red-ink); }
.more-menu > details { padding: 0; border-left: 0; border-right: 0; border-bottom: 0; border-radius: 0; background: none; }
.more-menu > details > summary { list-style: none; }
.more-menu > details > summary::-webkit-details-marker { display: none; }
.more-menu > details[open] > summary.btn { background: var(--accent-soft); color: var(--accent-hover); }
.more-menu .doc-act-panel { margin: 6px 8px; max-width: none; }
@media (max-width: 699.98px), (pointer: coarse) { .more-menu > .btn, .more-menu > form > .btn, .more-menu > details > summary.btn, .menu-item { min-height: 44px; } }
/* On a phone the menu is in the flow under its button, the open menu taking its row (the Codex review of 9ce3515, M3; PV26): nothing is
   placed against the page, with or without the script. */
@media (max-width: 639.98px) { details.more { position: static; } .more-menu { position: static; width: auto; min-width: 0; max-width: none; margin: 6px 0 0; box-shadow: none; } details.more[open] { flex: 1 1 100%; } }
/* ...and no wider than the screen (4 Nov 2026): the open menu takes the row's width, and a filter's select or field inside it shrinks to
   the menu instead of pushing it past the edge. */
@media (max-width: 639.98px) { details.more[open] { width: 100%; } .more-menu { max-width: 100%; } .more-menu :is(select, input, textarea) { max-width: 100%; min-width: 0; } }

/* ---------- 10. Forms: the label above each field, a muted 12 px hint, 40 px fields with a 1 px edge and 4 px corners (--r-10; the owner,
   6 Nov 2026: "dont make all field like oval shape, i need this make standard", docs/decisions.md KG12) (44 px on a phone or a touch
   screen), the accent focus ring; a date-and-time field is the same field (docs/decisions.md DC11) ---------- */
label { display: grid; gap: 6px; color: var(--ink); font: 500 13px/20px var(--font); }
label .hint, label .muted { font-weight: 400; font-size: 12px; line-height: 18px; }
label:has(> input[type="checkbox"]), label:has(> input[type="radio"]) { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: 14px; }
input, select, textarea, button { font-family: inherit; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"], input[type="tel"],
input[type="date"], input[type="datetime-local"], input[type="file"], select, textarea {
  width: 100%; min-width: 0; min-height: 40px; padding: 8px 12px;
  font: 400 14px/22px var(--font); color: var(--ink);
  background: var(--card); border: 1px solid var(--field); border-radius: var(--r-10); transition: border-color .1s ease-in;
}
textarea { min-height: 96px; }
input[type="file"] { padding: 8px; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-body); }
input::placeholder, textarea::placeholder { color: var(--ink-muted); opacity: 1; }
select {
  -webkit-appearance: none; appearance: none; padding-right: 38px; text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-muted) 50%), linear-gradient(135deg, var(--ink-muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; margin: 0; flex: none; accent-color: var(--accent); }
input.short, input.units { width: 7.5rem; }
[aria-invalid="true"] { border-color: var(--st-red) !important; box-shadow: 0 0 0 1px var(--st-red); }
fieldset { border: 1px solid var(--hairline); border-radius: var(--r-14); padding: 16px 20px 20px; margin: 0 0 16px; background: var(--card); min-width: 0; }
legend { font: 600 16px/24px var(--font); padding: 0 6px; color: var(--ink); }
/* A form in numbered section cards ("1 Details", "2 Choose people"): each fieldset's legend after a coloured number square */
form.record:has(> fieldset + fieldset) { counter-reset: form-step; }
form.record:has(> fieldset + fieldset) > fieldset > legend::before {
  counter-increment: form-step; content: counter(form-step); display: inline-grid; place-items: center; width: 24px; height: 24px;
  margin-right: 10px; border-radius: var(--r-8); background: var(--accent); color: var(--on-fill); font: 700 12px/1 var(--font); vertical-align: 1px;
}
@media (max-width: 699.98px), (pointer: coarse) {
  input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"], input[type="tel"],
  input[type="date"], input[type="datetime-local"], select { min-height: 44px; }
}
@media (max-width: 699.98px) {
  input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"], input[type="tel"],
  input[type="date"], input[type="datetime-local"], select, textarea { font-size: 16px; } /* no zoom on an iPhone */
  input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; }
}

/* A whole-row choice: the row is the tap target; chosen = a 1.5 px accent edge on the accent's tint */
label.choice, .check {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 14px;
  border: 1px solid var(--hairline); border-radius: var(--r-10); background: var(--card);
  color: var(--ink-body); font: 400 14px/20px var(--font); cursor: pointer;
}
label.choice:hover, .check:hover { border-color: var(--ink-faint); }
label.choice:has(input:checked), .check:has(input:checked) { border: 1.5px solid var(--accent); background: var(--accent-soft); color: var(--ink); }
.check { font-weight: 600; color: var(--ink); }
.check small { display: block; font-weight: 400; color: var(--ink-muted); font-size: 12px; }

/* Search and filters above a list: one compact row (36 px fields and buttons, the labels above) */
.filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: end; margin: 0 0 20px; }
.filters label { flex: 0 1 12rem; min-width: 0; color: var(--ink-muted); font-size: 12px; }
.filters label:has(input[type="search"]), .filters label:has(input[name="q"]) { flex: 1 1 16rem; }
.filters label.choice { flex: 0 1 auto; color: var(--ink); font-size: 13px; }
.filters input[type="text"], .filters input[type="search"], .filters input[type="number"], .filters input[type="date"], .filters select {
  min-height: 36px; height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: 13px; line-height: 22px; }
.filters button, .filters .btn { flex: none; min-height: 36px; padding: 6px 14px; font-size: 13px; }
@media (max-width: 699.98px), (pointer: coarse) {
  .filters label { flex: 1 1 10rem; }
  .filters input[type="text"], .filters input[type="search"], .filters input[type="number"], .filters input[type="date"], .filters select,
  .filters button, .filters .btn { height: 44px; min-height: 44px; }
}
form.inline { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; max-width: 100%; }
form.inline label { display: inline-flex; align-items: center; gap: 8px; }
form.inline input[type="text"], form.inline input[type="number"], form.inline select { width: auto; min-width: 6rem; flex: 1 1 8rem; }
/* A form's fields in a responsive grid (at least 200 px each); div.record: a group of another form's fields laid out the same (the supplier
   invoice's "How its goods come in", the editor form's: docs/decisions.md KG37) */
form.record, div.record, form.decide { display: grid; gap: 14px; max-width: 820px; }
form.record fieldset, div.record fieldset, form.decide fieldset { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); align-items: start; }
form.record fieldset > :not(label):not(.field), div.record fieldset > :not(label):not(.field), form.decide fieldset > :not(label):not(.field),
form.record fieldset > label:has(textarea), form.record fieldset > label.choice, div.record fieldset > label.choice, form.decide fieldset > label.choice,
form.record fieldset > label:has(> input[type="checkbox"]), form.decide fieldset > label:has(> input[type="radio"]) { grid-column: 1 / -1; }
form.decide { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-14); padding: 20px 24px; }
form.upload { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.narrow { max-width: 440px; margin: 32px auto; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-16); padding: 28px; }
.narrow form { display: grid; gap: 14px; margin-bottom: 16px; }
.narrow button[type="submit"] { width: 100%; }
.error-page .rid { font-size: 13px; }
@media (max-width: 520px) { .narrow { margin: 0 auto; padding: 20px 16px; } }

/* ---------- 11. Tables: inside a white card (1 px hairline, radius 14, sideways scroll inside the card), a muted 12 px head, 14 px rows
   with soft dividers, the first column a bold name with a muted 12 px line, numbers on the right ---------- */
table {
  width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 0 24px;
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-14);
  font: 400 14px/20px var(--font); font-variant-numeric: tabular-nums; color: var(--ink-body);
}
caption { text-align: left; padding: 0 0 10px; font: 600 16px/24px var(--font); color: var(--ink); }
th, td {
  height: var(--row-h); padding: 10px 16px; text-align: left; vertical-align: middle; color: var(--ink-body);
  border-bottom: 1px solid var(--divider);
}
tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--card); }
thead th, thead td {
  height: 40px; padding-top: 10px; padding-bottom: 10px; color: var(--ink-muted); font: 500 12px/16px var(--font);
  vertical-align: bottom; border-bottom: 1px solid var(--hairline); background: var(--card); white-space: nowrap;
}
thead tr:first-child > :first-child { border-top-left-radius: var(--r-14); z-index: 2; }
thead tr:first-child > :last-child { border-top-right-radius: var(--r-14); }
tbody > tr:last-child > * { border-bottom: 0; }
tbody > tr:last-child > :first-child { border-bottom-left-radius: var(--r-14); }
tbody > tr:last-child > :last-child { border-bottom-right-radius: var(--r-14); }
tbody th { font-weight: 400; }
tbody th.c-head, tbody th[scope="row"], tbody td.c-head { font-weight: 600; color: var(--ink); }
tbody tr:hover > * { background: var(--row-open); }
th.num, td.num { text-align: right; }
/* Child rows (a parent's lines): tinted, the name indented */
tr.sub > * { background: var(--row-selected); color: var(--ink-muted); }
tr.sub > :first-child { padding-left: 34px; }
tr.inactive > *, tr.revoked > *, tr.excluded > * { color: var(--ink-muted); }
td.meter { width: 96px; }
.row-link { font-weight: 600; display: inline-block; padding: 8px 0; margin: -8px 0; }
/* A row's name is the board's item: ink, underlined on hover */
tbody th a, tbody td.c-head a, .o-name, .row-link { color: var(--ink); text-decoration: none; }
tbody th a:hover, tbody td.c-head a:hover, .o-name:hover, .row-link:hover { color: var(--accent-hover); text-decoration: underline; }
/* The status column: the pill in the cell */
td.c-status { white-space: nowrap; }

/* Rows that differ or need a look: the warning tint; a ticked row: the selected tint */
tr.differs > *, tbody tr.differs:hover > * { background: var(--warn-row); }
tr.differs .state { font-weight: 600; color: var(--ink); }
td.state { width: 7rem; color: var(--ink-muted); }
tr.picked > *, tbody tr.picked > * { background: var(--row-selected); }
tbody tr.picked:hover > * { background: var(--row-selected); }
table:not(.board) tr.blocked > * { background: var(--sf-red); }
tr.urgent > :first-child { box-shadow: inset 3px 0 0 var(--st-red); }

/* A table in a card: .table-wrap and .scroll are the card (the edge, the radius, the sideways scroll), the table inside has none */
.table-wrap, .scroll {
  max-width: 100%; margin: 0 0 24px; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-14);
  overflow-x: auto; scrollbar-width: thin;
}
.table-wrap > table, .scroll > table { margin: 0; border: 0; border-radius: 0; }
.table-wrap > table thead tr:first-child > *, .scroll > table thead tr:first-child > *,
.table-wrap > table tbody > tr:last-child > *, .scroll > table tbody > tr:last-child > * { border-radius: 0; }

/* The list pattern: <table class="stack"> (or "rtable") with data-label on each cell. One card per row when the page is 640 px or
   narrower (radius 12): the name and the status pill on the first line, the other cells as label and value. */
@container (max-width: 640px) {
  .table-wrap:has(> table.stack), .table-wrap:has(> table.rtable) { background: none; border: 0; border-radius: 0; overflow: visible; }
  table.stack, table.rtable { border: 0; background: none; border-radius: 0; }
  table.stack thead, table.rtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table.stack tbody, table.rtable tbody { display: grid; gap: 10px; }
  table.stack tr, table.rtable tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px;
    background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-12); padding: 14px 16px;
  }
  table.stack th, table.stack td, table.rtable th, table.rtable td {
    display: block; padding: 4px 0; border: 0; border-radius: 0; grid-column: 1 / -1; text-align: left; height: auto; position: static; background: none; }
  table.stack tbody tr:hover > *, table.rtable tbody tr:hover > * { background: none; }
  table.stack td[data-label], table.rtable td[data-label] { display: grid; grid-template-columns: minmax(6.5rem, 38%) minmax(0, 1fr); gap: 12px; }
  table.stack td[data-label]::before, table.rtable td[data-label]::before { content: attr(data-label); color: var(--ink-muted); font: 400 12px/20px var(--font); white-space: normal; }
  table.stack td[data-label=""]::before, table.rtable td[data-label=""]::before { content: none; }
  table.stack td[data-label] > *, table.rtable td[data-label] > * { grid-column: 2; }
  table.stack td[data-label=""] > *, table.rtable td[data-label=""] > * { grid-column: 1 / -1; }
  table.stack td[data-label]:empty, table.rtable td[data-label]:empty { display: none; }
  table.stack .c-head, table.rtable .c-head { grid-column: 1; padding: 0 0 6px; font-size: 15px; line-height: 22px; }
  table.stack .c-status, table.rtable .c-status { grid-column: 2; grid-row: 1; padding: 0 0 6px; justify-self: end; height: auto; min-width: 0; }
  table.stack .c-status .chip { min-width: 0; }
  /* The status pill on a phone (4 Nov 2026): it carries no label beside the title, and it keeps its column (min-content) instead of
     being pushed past the card; a short one stays on one line, a long one ("To decide: the rules found differences") wraps at about a
     third of the card, so the title keeps the rest. A pill among the label and value lines wraps too. */
  table.stack td.c-status, table.rtable td.c-status { min-width: min-content; white-space: normal; text-align: right; }
  table.stack td.c-status[data-label], table.rtable td.c-status[data-label] { display: block; }
  table.stack td.c-status[data-label]::before, table.rtable td.c-status[data-label]::before { content: none; }
  table.stack .c-status .chip, table.rtable .c-status .chip { display: inline-block; width: max-content; max-width: 38cqw; white-space: normal; border-radius: var(--r-pill); }
  table.stack td[data-label]:not(.c-status) .chip, table.rtable td[data-label]:not(.c-status) .chip { white-space: normal; max-width: 100%; }
  table.stack .c-wide, table.rtable .c-wide { border-top: 1px solid var(--divider); margin-top: 6px; padding-top: 10px; }
  table.stack .c-next, table.rtable .c-next { border-top: 1px solid var(--divider); margin-top: 8px; padding-top: 12px; }
  table.stack .c-next .btn, table.stack .c-next button { width: 100%; }
  table.stack tr.differs, table.rtable tr.differs { background: var(--warn-row); }
  table.stack tr.differs > *, table.rtable tr.differs > * { background: none; }
  table.stack tr.picked, table.rtable tr.picked { background: var(--row-selected); border: 1.5px solid var(--accent); }
  table.stack td.actions, table.rtable td.actions { display: flex; }
  table.stack td.num, table.rtable td.num { text-align: left; }
  table.stack tr.urgent > :first-child { box-shadow: none; }
  table.stack tr.urgent { border-left: 3px solid var(--st-red); }

  /* Any other table keeps its columns and scrolls sideways inside itself */
  table:not(.stack):not(.rtable) { display: block; overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
  .scroll > table:not(.stack):not(.rtable), .table-wrap > table:not(.stack):not(.rtable) { display: table; overflow: visible; }
}

dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; margin: 8px 0 0; }
dt { color: var(--ink-muted); font-weight: 400; }
dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
dl.wide { margin-bottom: 24px; }
@container (max-width: 560px) {
  dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  dl dt:not(:first-child) { margin-top: 10px; }
}

/* ---------- 12. Folds, the "?" help, and the create drawers ---------- */
details { border: 1px solid var(--hairline); border-radius: var(--r-12); padding: 0 16px; margin: 0 0 12px; background: var(--card); }
details > summary { display: flex; align-items: center; gap: 8px; min-height: 48px; cursor: pointer; font-weight: 600; color: var(--ink); }
details[open] > summary { margin-bottom: 8px; }
details > :last-child:not(summary) { margin-bottom: 16px; }
.fold > summary { list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before {
  content: ""; width: 8px; height: 8px; flex: none; margin: 0 6px 0 4px;
  border-right: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); transition: transform .12s;
}
.fold[open] > summary::before { transform: rotate(45deg); margin-top: -4px; }
.tech { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; font-size: 13px; }
/* On a phone the technical details stack, each label over its value (4 Nov 2026): side by side the value column had no room left, and
   a long code (an address, a key) breaks rather than running off the screen. */
@media (max-width: 639.98px) { .tech { grid-template-columns: minmax(0, 1fr); row-gap: 2px; } .tech > dd { margin: 0 0 8px; } :is(dt, dd, code) { overflow-wrap: anywhere; } }

/* The help is a details too, but looks like a small round "?" button */
details.help { border: 0; padding: 0; margin: 0; background: none; border-radius: 0; }
details.help[open] > summary { margin-bottom: 0; }
details.help > :last-child:not(summary) { margin-bottom: 0; }
.help { display: inline-block; vertical-align: middle; }
.help > summary {
  display: inline-grid; place-items: center; width: 44px; height: 44px; min-height: 44px; margin: -10px -8px;
  list-style: none; cursor: pointer; font-weight: 700;
}
.help > summary::-webkit-details-marker { display: none; }
.help > summary::before {
  content: "?"; content: "?" / "";
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--accent); color: var(--accent); background: var(--card); font: 600 13px/1 var(--font);
}
.help[open] > summary::before { background: var(--accent); color: var(--on-fill); }
.help-body {
  position: absolute; left: 0; right: 0; z-index: 40; max-width: 42rem; margin-top: 10px;
  padding: 14px 16px; background: var(--card); color: var(--ink-body);
  border: 1px solid var(--hairline); border-radius: var(--r-12);
  box-shadow: var(--shadow-float); font: 400 14px/1.55 var(--font); text-align: left; white-space: normal;
}
.help-body p { margin: 0; max-width: none; }
.alert .help { justify-self: start; margin-top: 2px; }

/* The create drawers (a list page's "New …" form, details.drawer#new): with app.js, the open fold slides in from the right (560-760
   px, radius 16), its title (the summary) a sticky header with a close mark, its form's buttons a sticky footer; the page behind is
   dimmed. Esc, the dimmed page and the header close it; focus stays inside and goes back to the button that opened it (app.js).
   Without the script, or on a phone, it is an ordinary fold. */
@media (min-width: 700px) {
  html.js details.drawer[open]:not(.is-inline) {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 81; width: clamp(560px, 46vw, 760px); max-width: 100vw; margin: 0; padding: 0;
    overflow-y: auto; overscroll-behavior: contain; border: 0; border-radius: var(--r-16) 0 0 var(--r-16); box-shadow: var(--shadow-float);
    animation: drawer-in .2s cubic-bezier(0, 0, .35, 1);
  }
  html.js details.drawer[open]:not(.is-inline) > summary {
    position: sticky; top: 0; z-index: 2; justify-content: space-between; min-height: 64px; margin: 0; padding: 12px 16px 12px 24px;
    background: var(--card); border-bottom: 1px solid var(--hairline); font: 600 17px/24px var(--font);
  }
  html.js details.drawer[open]:not(.is-inline) > summary::before { display: none; }
  html.js details.drawer[open]:not(.is-inline) > summary::after {
    content: ""; flex: none; width: 20px; height: 20px; padding: 10px; border-radius: var(--r-10); background: var(--ink-muted);
    -webkit-mask: url("icons.svg?v=5bd6dbdf15661178#close") center / 20px 20px no-repeat; mask: url("icons.svg?v=5bd6dbdf15661178#close") center / 20px 20px no-repeat;
  }
  html.js details.drawer[open]:not(.is-inline) > :not(summary) { margin-left: 24px; margin-right: 24px; }
  html.js details.drawer[open]:not(.is-inline) > summary + * { margin-top: 20px; }
  html.js details.drawer[open]:not(.is-inline) > :last-child:not(summary) { margin-bottom: 24px; }
  html.js details.drawer[open]:not(.is-inline) :is(form.record, form.inline, form.decide) { max-width: none; }
  html.js details.drawer[open]:not(.is-inline) form > .actions:last-child {
    position: sticky; bottom: 0; z-index: 2; margin: 8px -24px -24px; padding: 14px 24px; justify-content: flex-end;
    background: var(--card); border-top: 1px solid var(--hairline);
  }
  html.js body:has(details.drawer[open]:not(.is-inline)) { overflow: hidden; }
  html.js body:has(details.drawer[open]:not(.is-inline))::after { content: ""; position: fixed; inset: 0; z-index: 80; background: var(--backdrop); }
}
@keyframes drawer-in { from { transform: translateX(32px); opacity: .4; } to { transform: none; opacity: 1; } }

/* ---------- 13. Progress: 8 px, small corners (KG12), a hairline track; the figure beside it ("18 / 25") ---------- */
progress, meter {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 8px;
  border: 0; border-radius: var(--r-pill); background: var(--hairline); overflow: hidden; color: var(--accent);
}
progress::-webkit-progress-bar { background: var(--hairline); border-radius: var(--r-pill); }
progress::-webkit-progress-value { background: var(--accent); border-radius: var(--r-pill); }
progress::-moz-progress-bar { background: var(--accent); border-radius: var(--r-pill); }
meter::-webkit-meter-bar { background: var(--hairline); border: 0; border-radius: var(--r-pill); height: 8px; }
meter::-webkit-meter-optimum-value { background: var(--st-green); border-radius: var(--r-pill); }
meter::-webkit-meter-suboptimum-value { background: var(--st-amber); border-radius: var(--r-pill); }
meter::-webkit-meter-even-less-good-value { background: var(--st-red); border-radius: var(--r-pill); }
meter::-moz-meter-bar { background: var(--st-green); border-radius: var(--r-pill); }
td.meter meter { width: 80px; }
.progress-line { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 8px; }
.prog { display: flex; align-items: center; gap: 10px; }
.prog progress { flex: 1 1 auto; min-width: 64px; }

/* The spot check's 20 blocks: Yes = solid green, wrong = red with a white bar, skipped = striped amber, this one = tall accent, to do
   = empty. Never colour alone: the shapes differ, and the legend and each block's title say it in words. */
.segments {
  list-style: none; margin: 8px 0; padding: 0;
  display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 3px; align-items: center;
}
.segments li { height: 12px; margin: 0; border-radius: 4px; background: var(--hairline); border: 1px solid var(--hairline); }
.segments li.yes { background: var(--st-green); border-color: var(--st-green); }
.segments li.skip { border-color: var(--st-amber); background: repeating-linear-gradient(135deg, var(--st-amber) 0 3px, var(--sf-amber) 3px 6px); }
.segments li.no { background: linear-gradient(var(--on-fill), var(--on-fill)) center / 60% 3px no-repeat, var(--st-red); border-color: var(--st-red); }
.segments li.now { height: 20px; background: var(--accent); border-color: var(--accent); }
.segments-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--ink-muted); }
.segments-legend li { margin: 0; }
.key { display: inline-block; width: 14px; height: 10px; margin-right: 6px; border-radius: 3px; border: 1px solid var(--hairline); background: var(--hairline); }
.key.yes { background: var(--st-green); border-color: var(--st-green); }
.key.skip { border-color: var(--st-amber); background: repeating-linear-gradient(135deg, var(--st-amber) 0 3px, var(--sf-amber) 3px 6px); }
.key.no { background: linear-gradient(var(--on-fill), var(--on-fill)) center / 60% 2px no-repeat, var(--st-red); border-color: var(--st-red); }
.key.now { background: var(--accent); border-color: var(--accent); }

/* ---------- 14. Home (the approved HM_Home and HM_Phone, 29 Oct 2026; docs/decisions.md HV1): the date and the greeting with one Find
   box beside them; "Waiting for you", a card of rows (a 52 px square with the number in the task's colour, its name, one muted line, one
   button); the notes after them, quieter; a card of up to four small figures. On a phone the Find box takes its row and a whole row opens
   its task (its button's link covers the row). ---------- */
.hm-jobs, .hm-figs { padding: 0; overflow: hidden; margin: 0 0 22px; }
.hm-h { margin: 0; padding: 16px 18px 4px; font: 700 16px/24px var(--font); color: var(--ink); }
.card > h2.hm-h:first-child { margin: 0; }
.hm-sub { margin: 0; padding: 14px 18px 2px; border-top: 1px solid var(--divider); font: 700 11px/16px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.hm-jobs > .empty { margin: 8px 18px 18px; padding: 24px; }
.hm-list { list-style: none; margin: 0; padding: 0; }
.hm-row { display: flex; align-items: center; gap: 16px; margin: 0; padding: 14px 18px; border-top: 1px solid var(--divider); }
.hm-list > .hm-row:first-child { border-top: 0; }
.hm-n {
  flex: none; display: grid; place-items: center; min-width: 52px; height: 52px; padding: 0 8px; border-radius: var(--r-12);
  background: var(--t-fill, var(--st-grey)); color: var(--on-fill); font: 700 20px/1 var(--font); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.hm-notes .hm-n { background: var(--t-soft, var(--sf-grey)); color: var(--t-ink, var(--ink-body)); }
.hm-text { flex: 1 1 auto; min-width: 0; }
.hm-t { margin: 0; font: 600 14px/20px var(--font); color: var(--ink); overflow-wrap: anywhere; }
.hm-d { margin: 2px 0 0; max-width: 75ch; color: var(--ink-muted); font: 400 13px/18px var(--font); }
.hm-lines { margin: 4px 0 0; padding-left: 16px; color: var(--ink-muted); font: 400 12px/18px var(--font); }
.hm-lines li { margin: 2px 0; overflow-wrap: anywhere; }
.hm-row > .btn { flex: none; white-space: nowrap; }
.hm-figs { display: flex; flex-wrap: wrap; }
.hm-fig {
  flex: 1 1 180px; display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 16px 20px; border-right: 1px solid var(--hairline);
  color: inherit; text-decoration: none;
}
.hm-fig:last-child { border-right: 0; }
.hm-fig:hover { background: var(--page-alt); color: inherit; text-decoration: none; }
.hm-fig-t { color: var(--ink-muted); font: 400 13px/18px var(--font); }
.hm-fig-n { color: var(--ink); font: 700 24px/32px var(--font); font-variant-numeric: tabular-nums; }
@media (max-width: 699.98px) {
  .hm-row { position: relative; gap: 14px; padding: 14px 16px; }
  .hm-n { min-width: 46px; height: 46px; font-size: 18px; }
  /* HM_Phone (DC19): the whole row is the link, no button drawn; its words stay for a screen reader, its focus ring is the row's */
  .hm-row > .btn { position: static; width: 0; height: 0; min-height: 0; padding: 0; margin: 0; border: 0; overflow: hidden; font-size: 0; flex: none; }
  .hm-row > .btn::after { content: ""; position: absolute; inset: 0; }
  .hm-row:has(> .btn:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
  .hm-figs { display: none; } /* HM_Phone has no figures */
  .hm-fig { padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--divider); }
  .hm-fig-n { font-size: 22px; line-height: 28px; }
}
.share-val { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.share-val meter { width: 80px; }
/* Matching › Mapping › To review: how much of what each store sells is matched (HV5) */
.coverage-box { margin: 8px 0 24px; }
.coverage-box > .board-title { margin: 0 0 4px; }
table.coverage th .hint { display: block; margin-top: 2px; max-width: 46ch; font-weight: 400; }
.setup-code code { letter-spacing: .08em; }
/* A board's foot and "+ Add" rows when the board is cards (a narrow page) */
@container (max-width: 640px) {
  table.stack.board tr.grp-foot { background: var(--page-alt); }
  table.stack.board tr.grp-foot > * { background: none; }
  table.stack.board tr.grp-add { display: block; padding: 0 16px; }
  table.stack.board tr.grp-add .add-item { display: flex; width: 100%; min-height: 44px; }
  table.stack.board th.c-item { min-width: 0; }
}

/* ---------- 15. Decision pages: the answers say what they do; the safe one is marked ---------- */
.decide-bar {
  position: sticky; bottom: 0; z-index: 20;
  margin: 24px calc(-1 * var(--gutter)) 0; padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom));
  background: var(--card); border-top: 1px solid var(--hairline); border-radius: var(--r-16) var(--r-16) 0 0; box-shadow: var(--shadow-up);
}
.decide-buttons { display: grid; gap: 10px; }
@container (min-width: 640px) { .decide-buttons.three { grid-template-columns: 2fr 1fr 1fr; } .decide-buttons.two { grid-template-columns: 1fr 1fr; } }
.answers { display: grid; gap: 12px; margin: 0 0 24px; }
.answer-list { display: grid; gap: 10px; margin: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.answer { display: grid; gap: 6px; align-content: start; padding: 14px 16px; background: var(--card);
  border: 1px solid var(--hairline); border-top: 4px solid var(--t-icon, var(--hairline)); border-radius: var(--r-12); }
.answer dt { font-weight: 600; color: var(--t-ink, var(--ink)); }
.answer dd { margin: 0; }
.answer.safe { border-color: var(--accent); border-width: 1.5px; border-top-width: 4px; }
.safe-tag {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: var(--r-pill); vertical-align: 1px;
  background: var(--accent); color: var(--on-fill); font: 600 11px/16px var(--font);
}
.confirm-step { border: 1.5px solid var(--block-line); border-left: 4px solid var(--st-red); }

/* ---------- 16. Lists: the pager, empty states (the quick filters with counts are tabs: section 5) ---------- */
/* The pager under a list ("1–10 of 112", previous and next) */
.pager { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 16px 0 24px; color: var(--ink-muted); font-size: 13px; }
.pager a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--hairline);
  border-radius: var(--r-10); text-decoration: none; font: 500 13px/20px var(--font); color: var(--ink); background: var(--card);
}
.pager a:hover { border-color: var(--ink-faint); color: var(--ink); }
.pager a[aria-current] { border: 1.5px solid var(--accent); background: var(--accent-soft); color: var(--accent-hover); }
@media (max-width: 699.98px), (pointer: coarse) { .pager a { min-height: 44px; } }
p.pager a { margin-right: 0; }
/* An empty list: one helpful sentence, muted and centred, and the next step */
.empty {
  border: 1px dashed var(--ink-disabled); background: var(--card); border-radius: var(--r-14); padding: 32px 24px; margin: 0 0 24px;
  text-align: center;
}
.empty-title { font: 600 15px/22px var(--font); color: var(--ink); margin-bottom: 4px; }
.empty p { color: var(--ink-muted); max-width: 60ch; margin-left: auto; margin-right: auto; }
.empty p:last-child { margin-bottom: 0; }
.empty .btn { margin-top: 4px; }

/* B's list cards: the name first, one full-width action on a phone */
.o-name { display: block; font-weight: 600; font-size: 14px; padding: 10px 0; margin: -10px 0; }
.o-no, .o-sub { display: block; color: var(--ink-muted); font-weight: 400; font-size: 12px; line-height: 16px; }
.o-line { display: block; margin-top: 4px; font-size: 13px; max-width: 34ch; }
@container (max-width: 640px) {
  table.list .c-order, table.list .c-total, table.list .c-next { grid-column: 1 / -1; }
  .o-line { max-width: none; }
}

/* A history: a 12 px coloured dot per entry on a 2 px line, a bold title and a muted 12 px date line */
ol.history, ol.versions, ol.checks-history { list-style: none; margin: 0 0 24px; padding: 0 0 0 22px; position: relative; }
ol.history::before, ol.versions::before, ol.checks-history::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--hairline); }
ol.history > li, ol.versions > li, ol.checks-history > li { position: relative; margin: 0; padding: 4px 0 14px; overflow-wrap: anywhere; }
ol.history > li::before, ol.versions > li::before, ol.checks-history > li::before {
  content: ""; position: absolute; left: -22px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--page);
}
ol.history > li p, ol.versions > li p, ol.checks-history > li p { margin: 2px 0; }
ol.history .muted, ol.versions .muted, ol.checks-history .muted { font-size: 12px; }
/* "What happens next": numbered 28 px circles, a bold title, a muted line */
ol.steps { list-style: none; counter-reset: step; margin: 0 0 20px; padding: 0; display: grid; gap: 12px; }
ol.steps > li { counter-increment: step; position: relative; margin: 0; padding: 2px 0 0 42px; min-height: 28px; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: var(--on-fill); font: 600 13px/1 var(--font);
}

/* ---------- 17. The screens' own parts (restyled in place: their markup and the tests that pin it are unchanged) ---------- */
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li + li { margin-top: .25rem; }
.minicard .sep { color: var(--ink-2); }
form.quick { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; margin: 1rem 0; }
table.candidates th[scope="row"] { width: 3.5rem; }
.compare th[scope="row"] { width: 11rem; }
@container (max-width: 640px) { .compare th[scope="row"] { width: auto; } }

/* People and roles */
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; margin-bottom: 12px; }
fieldset.role-group { margin: 0; }
label.role-choice { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: start; min-height: 44px; padding: 6px 0; font-weight: 400; }
label.role-choice input { margin-top: 2px; }
label.role-choice .role-name { font-weight: 600; }
label.role-choice .role-desc { grid-column: 2; color: var(--ink-2); font-size: 14px; }
label.role-choice .role-code { color: var(--ink-2); font-weight: 400; font-size: 12px; font-family: var(--mono); }
.alert.person-clash { margin-bottom: 16px; }

/* Settings and lists, records, To check */
ul.rules-list { margin: 0 0 1.5rem; }
ul.rules-list li { padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); max-width: 75ch; }
ul.rules-list li + li { margin-top: 8px; }
ol.checks-history > li p { margin: .15rem 0; }
.decide-box .answers { margin-bottom: 12px; }
.decide-box form.inline { margin: 6px 12px 6px 0; }
@container (max-width: 640px) {
  .decide-box form.inline, .decide-box form.inline label { display: flex; flex-wrap: wrap; width: 100%; }
  .decide-box form.inline button { width: 100%; }
}
form.roles { max-width: 1000px; }

/* Purchasing: the activation box, the settings list, the PO editor */
table.settings th[scope="row"] small { display: block; font-weight: 400; overflow-wrap: anywhere; }
/* Pack C follow-up (PC19): a setting not used while the switch it depends on is off */
table.settings tr.unused > th, table.settings tr.unused > td { color: var(--ink-2); }
table.settings tr.unused .unused-note { display: block; font-weight: 600; }
/* One column that never grows past the page: a wide lines table scrolls in its own .table-wrap (the 6.3 browser test: the delivery
   editor ran 300 px past a 1440 px screen, its grid track sized to the table). */
form.po-editor { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
form.po-editor fieldset { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
form.po-editor fieldset label { flex: 1 1 14rem; }
form.po-editor fieldset.scan input[type="search"] { min-width: min(22rem, 100%); }
form.po-editor fieldset.po-header textarea { min-width: min(20rem, 100%); }
table.po-lines input, table.po-lines select { min-height: 44px; padding: 6px 8px; }
table.po-lines select { width: 8rem; } /* "S – Standard rate 20%": the open list shows it whole; the table stays narrow */
table.po-lines th, table.po-lines td { padding: 10px 8px; }
/* What a line without an item is for (a charge on an invoice, a claim on a return): readable, never a 30 px box. */
table.lines input.line-what { width: 100%; min-width: 14rem; }
@media (max-width: 640px) { table.lines input.line-what { min-width: 0; } }
table input.short, table input.units { width: 6rem; }
table.po-lines label.choice { display: flex; min-height: 0; padding: 4px 0; border: 0; font-size: 14px; }
/* An inline task panel (choose one of several): a white card with a 1.5 px pink edge */
section.choices { border: 1.5px solid var(--pink); border-radius: var(--r-14); padding: 16px 20px; background: var(--card); }
section.choices li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 4px 0; }
ul.warnings { list-style: none; padding: 12px 16px; margin: 12px 0; background: var(--needs-bg); color: var(--needs-ink);
  border: 1px solid var(--needs-line); border-left: 4px solid var(--needs-icon); border-radius: var(--radius-sm); }
span.warnings { color: var(--needs-ink); font-weight: 600; }
section.totals dl { max-width: 26rem; }

/* What to buy and the sales data */
table.reorder input.packs { width: 6rem; }
table.reorder tr.urgent > th:first-of-type, table.reorder tr.urgent > td:first-child { border-left-color: var(--block-icon); }
details.why { border: 0; padding: 0; margin: 4px 0 0; background: none; font-weight: 400; }
details.why > summary { min-height: 44px; font-weight: 600; }
details.why p { margin: 6px 0 0; max-width: 60rem; font-size: 14px; color: var(--ink); }
table.days, table.months { width: auto; }
table.months th, table.months td { padding: 6px 8px; }

/* Buying in plain words (plan §6.19-6.30): "What you can do" with one small form per action, the how-to fold, cards on a phone */
.order-actions { display: grid; gap: 12px; }
.order-actions > h2 { margin: 0; }
.order-actions form.quick { margin: 0; }
details.action { margin: 0; }
details.action > summary { font-weight: 600; }
details.action[open] { padding-bottom: 12px; }
details.action form.record { max-width: 640px; }
ul.rules-short { margin: 4px 0 0; padding-left: 1.1rem; }
details.how { margin: 0 0 1rem; }
details.how ol { margin: 0 0 .5rem; }
section.new-order form.inline { margin-top: 4px; }
section.sales-data .see-also { margin: 8px 0 0; }
section.totals .actions { margin: 12px 0 4px; }
section.totals .actions .btn.lg { width: auto; flex: 1 1 16rem; }
details.why.maths { margin-top: 6px; }
table.stack tr.urgent { --t-icon: var(--block-icon); }
table.list.reorder .o-line { max-width: none; }
table.list.reorder .chip { margin: 4px 4px 0 0; }
@container (max-width: 640px) {
  table.po-lines input.short, table.po-lines input[type="text"], table.po-lines select { width: 100%; }
  section.totals .actions .btn.lg, .order-actions .btn.lg { width: 100%; }
  form.po-editor fieldset label { flex-basis: 100%; }
}

/* The spot check */
.progress { font-size: 16px; margin: .25rem 0 .5rem; }
.state-confirmed { color: var(--done-ink); font-weight: 600; }
.state-open { color: var(--ink-2); }

/* Company details */
.company-status form.confirm { display: grid; gap: 10px; margin: 12px 0; }
.company-status form.confirm p { margin: 0; }
form.record.company input, form.record.company textarea { width: 100%; }
dl.company dd.pre { white-space: pre-line; }
ol.versions { margin: 0; padding-left: 1.5rem; }
ol.versions > li { margin: 0 0 1rem; overflow-wrap: anywhere; }
ol.versions > li p { margin: .15rem 0; }
ul.changes li { margin: .3rem 0 .5rem; }
ul.changes .field { display: block; font-weight: 600; }
ul.changes .was, ul.changes .now { display: block; padding-left: .8rem; }
ul.changes .was { color: var(--ink-2); }
.rejected-orders ul { margin: .3rem 0 0; }
article.review { margin: 12px 0; }
article.review form.inline { margin: 6px 12px 6px 0; }
@container (max-width: 640px) {
  article.review form.inline { display: flex; }
}

/* Matching pages: the lists, one website product, the second OK, the spot check (plan §6.14-6.18) */
.next-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.subtitle { font-size: 16px; margin: -.25rem 0 .25rem; }
p.eyebrow .chip { margin-left: 2px; }
.spot-box { margin: 0 0 16px; }
.spot-box .segments { margin: 8px 0 6px; }
.spot-box .spot-check { margin-top: 10px; }
.held-back { margin-bottom: 16px; }
.why-lines ul.watch li { margin: 0 0 4px; }
.why-lines .help { margin-left: 2px; }
.decide-box { margin: 0 0 1.5rem; }
.decide-box > h2 { margin-top: 0; }
.decide-box form.quick { margin: 0 0 12px; }
fieldset.invalid { border: 2px solid var(--block-icon); }
.field { display: grid; gap: 6px; }
.field .head-help { margin: 0; }
.field .hint { margin: 0; }
details.new-product, details.pick { margin: 4px 0 0; }
details.pick form.filters { margin-top: 4px; }
ol.history > li { padding: 6px 0; border-bottom: 1px solid var(--line); margin: 0; }
.pending-actions { display: grid; gap: 8px; }
.pending-actions p { margin: 0; }
details.tech-details { margin: 0 0 1.5rem; }
/* The spot check's answers: Yes, "Not a match" (a second step before anything is saved, compare.md §2.1), Not sure */
.decide-buttons.spot-answers { grid-template-columns: minmax(0, 1fr); align-items: start; }
@container (min-width: 640px) { .decide-buttons.spot-answers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.decide-buttons.spot-answers form.quick { margin: 0; display: block; }
.decide-buttons.spot-answers form.quick button { width: 100%; height: 100%; }
details.confirm-step { padding: 0; border: 0; background: none; margin: 0; }
details.confirm-step > summary { list-style: none; width: 100%; margin: 0; }
details.confirm-step > summary::-webkit-details-marker { display: none; }
details.confirm-step[open] { grid-column: 1 / -1; padding: 12px; border: 2px solid var(--block-line); border-left: 4px solid var(--block-icon);
  border-radius: var(--radius-sm); background: var(--surface); }
details.confirm-step[open] > summary { margin-bottom: 12px; }
details.confirm-step form.decide { box-shadow: none; border: 0; padding: 0; }

/* Duplicates: the pages of a group side by side, the comparison, the decision */
.dup-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; margin: 8px 0 16px; }
.dup-card { margin: 0; }
.dup-card h2 { font-size: 16px; margin: 4px 0; overflow-wrap: anywhere; }
.dup-card.keeper { border: 2px solid var(--accent); }
.dup-state { margin: 0 0 6px; }
table.dup-compare th[scope="row"] { width: 11rem; }
table.dup-compare td { min-width: 7rem; overflow-wrap: anywhere; }
table.dup-compare thead th .muted { display: block; font-weight: 400; font-size: 13px; overflow-wrap: anywhere; }
tr.partial > th[scope="row"] .state { font-weight: 400; }
.word.odd, mark.odd { background: var(--diff-bg); color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px;
  text-underline-offset: .18em; padding: 0 2px; border-radius: 3px; }
form.dup-decide { max-width: 760px; }
fieldset.dup-choice { display: flex; flex-wrap: wrap; gap: 8px 12px; }
fieldset.dup-choice legend { overflow-wrap: anywhere; }
form.dup-undo { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 8px 0; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
section.dup-rules { padding: 14px 16px; border-radius: var(--radius-sm); margin: 12px 0 16px; border: 1px solid var(--line); background: var(--surface); }
section.dup-rules.doubt { background: var(--block-bg); color: var(--ink); border-color: var(--block-line); border-left: 4px solid var(--block-icon); }
section.dup-rules h2 { margin: 0 0 6px; font-size: 16px; }
section.dup-rules.doubt h2 { color: var(--block-ink); }
ul.dup-reasons ul { margin: .2rem 0 .4rem 1.2rem; padding: 0; }
ul.dup-reasons li.strong { font-weight: 600; }
ul.dup-reasons .detail { overflow-wrap: anywhere; }
label.dup-confirm { display: flex; align-items: center; gap: 12px; margin: 12px 0; padding: 10px 14px; min-height: 48px;
  background: var(--needs-bg); color: var(--ink); border: 1px solid var(--needs-line); border-radius: var(--radius-sm); font-weight: 600; }
details.dup-attrs { margin: 6px 0; }
form.dup-decide .actions button { flex: 1 1 16rem; }
@container (max-width: 640px) { form.dup-decide .actions button { width: 100%; } }

/* The product card and barcodes (IM3): a blocked card in red, a warned one in amber */
section.item-card { margin: 12px 0 16px; }
section.item-card.blocked { border: 2px solid var(--block-icon); }
section.item-card.warned { border: 2px solid var(--needs-icon); }
.card-state { margin: 4px 0 10px; }
.rules { padding: 10px 14px; border-radius: var(--radius-sm); margin: 6px 0 10px; border-left: 4px solid transparent; }
.rules p { margin: 0 0 4px; }
.rules.block { background: var(--block-bg); color: var(--ink); border-color: var(--block-icon); }
.rules.warn { background: var(--needs-bg); color: var(--ink); border-color: var(--needs-icon); }
dl.item-card-fields { grid-template-columns: max-content minmax(0, 1fr); }
form.confirm-card { display: grid; gap: 10px; margin: 12px 0; max-width: 640px; }
table.proposals td ul.plain li { margin: 0 0 .15rem; overflow-wrap: anywhere; }
details.card-history { margin-top: 12px; }
form.add-barcode { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin: 12px 0 0; }
form.add-barcode p { flex-basis: 100%; margin: 0; }
form.add-barcode input[type="text"] { flex: 1 1 12rem; width: auto; }
ul.summary-line { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0 0 12px; padding: 0; list-style: none; }
article.barcode-review { margin: 12px 0; }
article.barcode-review h2 { margin-top: 0; overflow-wrap: anywhere; }
form.barcode-decide { max-width: 640px; margin-top: 10px; }
form.item-card-form input[type="text"], form.item-card-form select { max-width: 32rem; }
ul.import-errors li { margin: .15rem 0; overflow-wrap: anywhere; }
details.remove-barcode form { display: grid; gap: 8px; margin-top: 8px; max-width: 22rem; }
details.remove-barcode p { margin: 0; }
@container (max-width: 640px) {
  dl.item-card-fields { grid-template-columns: minmax(0, 1fr); }
  form.add-barcode button, form.confirm-card button, form.barcode-decide button { width: 100%; }
  details.remove-barcode button { width: 100%; }
  table.barcodes form.inline { flex-wrap: wrap; }
}

/* Deliveries (IM6, docs/decisions.md I141) in plain words and design A (U85-U90). The deliveries list and the bench list are B's list
   cards; a delivery's page has its facts, the reviewer's box, "where the items went" as stat tiles, and its lines as cards on a phone
   (the order editor's pattern); the incident register is one card per incident. The goods-in bench is TABLET FIRST (a tablet in the
   hand at the bench): one card per line, the number fields two or three across on a tablet and one under the other on a phone, every
   field, tick and button 48-52 px tall, the save bar kept in reach. Design A's tokens only. */
form.receive-new { max-width: 760px; }
section.new-delivery .hint a, .see-also a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
ul.problems { margin: .4rem 0; padding-left: 1.2rem; }
ul.error.problems { padding: 12px 16px 12px 36px; }
section.checklist dl { max-width: 40rem; }
section.checklist .notice { margin-top: 0; }
section.checklist .head-help > h3 { margin: 0; font-size: 16px; }
section.checklist form.quick .btn.lg { width: auto; flex: 1 1 18rem; }
section.where-units .stats { margin-bottom: 0; }
section.about-receipt dl { max-width: 52rem; }
table.grn-lines td { vertical-align: top; }
table.grn-lines select { max-width: 16rem; }
table.grn-lines .field-error { display: block; margin-top: .2rem; }
table.grn-lines .o-sub .chip, table.grn-lines td .chip { margin: 0 4px 4px 0; }
details.skipped { margin: .6rem 0; }
ul.files li, ul.incident-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin: 0; padding: 4px 0; overflow-wrap: anywhere; }
ul.files li a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
ul.files .o-sub, ul.incident-list .o-sub { flex-basis: 100%; }
ol.incident-list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 16px; }
ol.incident-list > li { margin: 0; }
article.incident { margin: 0; display: grid; gap: 8px; border-left: 4px solid var(--t-icon, var(--line)); }
article.incident > * { margin: 0; }
article.incident h2 { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
article.incident a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; overflow-wrap: anywhere; }
/* A link inside a side-by-side party name stays in its line: the 44px box pushed it below the name beside it. */
article.incident .doc-party-name a { display: inline; min-height: 0; }
form.close-incident fieldset { margin: 4px 0 0; }
.note.duty-rule > .help { justify-self: start; }

/* The goods-in bench */
form.bench { display: grid; gap: 16px; }
form.bench fieldset { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 12px 16px; align-items: end; margin: 0; }
form.bench fieldset > legend { font-size: 16px; }
form.bench fieldset > .help, form.bench .wide, form.bench fieldset .actions, form.bench fieldset > .hint, form.bench fieldset > label.choice,
form.bench fieldset.bench-header > label { grid-column: 1 / -1; }
form.bench input[type="number"] { font-size: 18px; font-variant-numeric: tabular-nums; min-height: 52px; }
form.bench select, form.bench input[type="text"], form.bench input[type="search"] { min-height: 52px; }
form.bench label .hint { display: block; }
form.bench .actions { margin: 0; }
form.bench .actions button { min-height: 52px; }
form.bench div.unstamped-only { display: contents; }
form.bench div.unstamped-only[hidden] { display: none; }
article.bench-line { display: grid; gap: 12px; border-left: 4px solid var(--done-icon); }
article.bench-line.unchecked { border-left-color: var(--needs-icon); }
article.bench-line > * { margin: 0; }
article.bench-line.found { outline: 3px solid var(--accent); outline-offset: 2px; }
.bench-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 6px 12px; }
.bench-head h2 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.bench-head h2 .o-sub { display: inline; margin-left: 4px; }
.bench-chips { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
article.bench-line p.expect { font-size: 16px; overflow-wrap: anywhere; }
article.bench-line p.expect strong { font-size: 18px; }
article.bench-line label.counted { min-height: 52px; font-size: 16px; font-weight: 600; }
article.bench-line label.counted input { width: 28px; height: 28px; }

/* The save bar (the editor, the bench) stays in reach on a long page. */
.actions.sticky { position: sticky; bottom: 0; z-index: 2; margin: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: var(--shadow-up); border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
/* A field that gets focus (Tab, or the scanner's Enter on the bench) is never left under the save bar (WCAG 2.2 2.4.11): the scroll
   padding covers the bar, and at 672 px and narrower (a page of 640 px) its stacked buttons. */
html:has(.actions.sticky) { scroll-padding-bottom: 112px; }
@media (max-width: 699.98px) {
  body:has(.tabbar) .actions.sticky { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: 10px; }
  html:has(.actions.sticky) { scroll-padding-bottom: calc(var(--tabbar-h) + 112px); }
}
@media (max-width: 672px) { html:has(.actions.sticky) { scroll-padding-bottom: calc(var(--tabbar-h) + 200px); } }

/* The selling mode on the websites (a product page, IM10) */
table.selling-sites .o-sub { margin-top: 2px; }
table.selling-sites .site-own { display: block; margin-top: 2px; }
form.selling-mode-form { margin-top: 12px; }
form.selling-mode-form .btn.lg { width: auto; }

@container (max-width: 640px) {
  .actions.sticky .btn, form.receive-new .btn, form.close-incident .btn, form.selling-mode-form .btn.lg, section.checklist form.quick .btn.lg { width: 100%; }
  table.grn-lines select, table.grn-lines input.short, table.grn-lines input[type="text"] { width: 100%; max-width: none; }
  form.grn-editor fieldset.scan input[type="search"] { min-width: 0; width: 100%; }
}


/* ---------- 18. Print ---------- */
@media print {
  .side, .appbar, .tabbar, .skip, .strip.test-system, .decide-bar, .tabs, .ph-actions, .page-actions, .flow, .toast, .bulkbar { display: none !important; }
  .shell { display: block; }
  .work { padding: 0; }
  body { background: #fff; color: #000; }
  .card, table, .table-wrap { box-shadow: none; }
  .chip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}


/* ---------- 19. The set-it-yourself pack: rules, warehouses, websites, checks, the audit log, who can do what, the sign-up QR code ---------- */
article.card.rule, article.card.site, article.card.request { margin: 0 0 16px; }
article.card.rule h3, article.card.site h2, article.card.request h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 0; }
article.card.rule > p { max-width: 75ch; }
article.card.rule details.fold, article.card.site details.fold { margin-top: 12px; }
section.rules { margin-bottom: 2rem; }
.jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 16px; margin: 0 0 1.5rem; }
.jobs > section.card { margin: 0; }
.jobs > section.card.mine { border: 2px solid var(--accent); }
.jobs h3 { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; margin-top: 0; }
pre.json { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 13px; margin: 0; max-width: 60ch; }
ul.commands li { margin-bottom: 10px; }
ul.commands code { display: inline-block; padding: 4px 6px; background: var(--sunk); border-radius: 4px; }
ul.problems { padding-left: 1.1rem; }
ul.problems code { font-size: 13px; }
.setup-key code { font-size: 18px; letter-spacing: .06em; }
ol.steps li { margin-bottom: 6px; }
/* The QR code: one element per module, black on white in every theme (a code app reads dark on light), with its quiet zone. */
.qr { display: inline-flex; flex-direction: column; background: #fff; padding: 0; margin: 8px 0 12px; line-height: 0;
  border: 1px solid var(--line); forced-color-adjust: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.qr-row { display: flex; }
.qr-row i { display: block; width: 5px; height: 5px; background: #fff; }
.qr-row i.d { background: #000; }
@media (min-width: 420px) { .qr-row i { width: 6px; height: 6px; } }
.enrol h1 { margin-bottom: .25rem; }

/* ---------- 20. Stock: the warehouse totals and the lines (first version) ---------- */
table.stock-totals tr.picked > * { background: var(--primary-tint); }
table.stock-lines .o-name { font-size: 1rem; }

/* The strength bar of the matching lists (design v4's "battery") and its legend (tabs: each list's colour key, name and count): each part's
   width is a class, w-1 … w-100 (no style="") */
section.card.strength { margin: 0 0 16px; }
section.card.strength > .hint { margin: 0 0 8px; }
.battery { display: flex; height: 12px; border-radius: var(--r-pill); overflow: hidden; background: var(--hairline); }
.battery > span { flex: 0 0 auto; height: 100%; background: var(--t-fill); box-shadow: inset -2px 0 0 var(--card); }
.w-1 { width: 1%; }
.w-2 { width: 2%; }
.w-3 { width: 3%; }
.w-4 { width: 4%; }
.w-5 { width: 5%; }
.w-6 { width: 6%; }
.w-7 { width: 7%; }
.w-8 { width: 8%; }
.w-9 { width: 9%; }
.w-10 { width: 10%; }
.w-11 { width: 11%; }
.w-12 { width: 12%; }
.w-13 { width: 13%; }
.w-14 { width: 14%; }
.w-15 { width: 15%; }
.w-16 { width: 16%; }
.w-17 { width: 17%; }
.w-18 { width: 18%; }
.w-19 { width: 19%; }
.w-20 { width: 20%; }
.w-21 { width: 21%; }
.w-22 { width: 22%; }
.w-23 { width: 23%; }
.w-24 { width: 24%; }
.w-25 { width: 25%; }
.w-26 { width: 26%; }
.w-27 { width: 27%; }
.w-28 { width: 28%; }
.w-29 { width: 29%; }
.w-30 { width: 30%; }
.w-31 { width: 31%; }
.w-32 { width: 32%; }
.w-33 { width: 33%; }
.w-34 { width: 34%; }
.w-35 { width: 35%; }
.w-36 { width: 36%; }
.w-37 { width: 37%; }
.w-38 { width: 38%; }
.w-39 { width: 39%; }
.w-40 { width: 40%; }
.w-41 { width: 41%; }
.w-42 { width: 42%; }
.w-43 { width: 43%; }
.w-44 { width: 44%; }
.w-45 { width: 45%; }
.w-46 { width: 46%; }
.w-47 { width: 47%; }
.w-48 { width: 48%; }
.w-49 { width: 49%; }
.w-50 { width: 50%; }
.w-51 { width: 51%; }
.w-52 { width: 52%; }
.w-53 { width: 53%; }
.w-54 { width: 54%; }
.w-55 { width: 55%; }
.w-56 { width: 56%; }
.w-57 { width: 57%; }
.w-58 { width: 58%; }
.w-59 { width: 59%; }
.w-60 { width: 60%; }
.w-61 { width: 61%; }
.w-62 { width: 62%; }
.w-63 { width: 63%; }
.w-64 { width: 64%; }
.w-65 { width: 65%; }
.w-66 { width: 66%; }
.w-67 { width: 67%; }
.w-68 { width: 68%; }
.w-69 { width: 69%; }
.w-70 { width: 70%; }
.w-71 { width: 71%; }
.w-72 { width: 72%; }
.w-73 { width: 73%; }
.w-74 { width: 74%; }
.w-75 { width: 75%; }
.w-76 { width: 76%; }
.w-77 { width: 77%; }
.w-78 { width: 78%; }
.w-79 { width: 79%; }
.w-80 { width: 80%; }
.w-81 { width: 81%; }
.w-82 { width: 82%; }
.w-83 { width: 83%; }
.w-84 { width: 84%; }
.w-85 { width: 85%; }
.w-86 { width: 86%; }
.w-87 { width: 87%; }
.w-88 { width: 88%; }
.w-89 { width: 89%; }
.w-90 { width: 90%; }
.w-91 { width: 91%; }
.w-92 { width: 92%; }
.w-93 { width: 93%; }
.w-94 { width: 94%; }
.w-95 { width: 95%; }
.w-96 { width: 96%; }
.w-97 { width: 97%; }
.w-98 { width: 98%; }
.w-99 { width: 99%; }
.w-100 { width: 100%; }

/* The approval rules (Settings): each section is a group, each rule a row of the board with its group's strip */
.grp-name { font: 600 17px/24px var(--font); color: var(--t-fill, var(--grey-group)); }
section.rules article.card.rule { border-radius: 0; margin: 0; box-shadow: inset 4px 0 0 var(--t-fill, var(--hairline)); }
section.rules article.card.rule + article.card.rule { border-top: 0; }
section.rules article.card.rule:first-of-type { border-top-left-radius: var(--r-14); border-top-right-radius: var(--r-14); }
section.rules article.card.rule:last-of-type { border-bottom-left-radius: var(--r-14); border-bottom-right-radius: var(--r-14); margin-bottom: 16px; }
section.rules article.card.rule h3 { font: 600 15px/22px var(--font); }

/* ---------- 21. Store-wise review and bulk action on the matching screens (docs/decisions.md U106-U112) ---------- */
/* The tick column: 44 px, the box in the middle; the name column stays sticky right after it */
table.picks th.c-pick, table.picks td.c-pick { width: 44px; min-width: 44px; padding: 0; text-align: center; }
/* (:where keeps it below the hover and ticked-row tints, which colour every cell of a row) */
:where(table.picks) tr > :where(.c-pick) + * { position: sticky; left: 44px; z-index: 1; text-align: left; background: var(--surface); }
label.pick { display: inline-grid; place-items: center; width: 44px; min-height: var(--row-h); margin: 0; cursor: pointer; }
label.pick input[type="checkbox"] { margin: 0; }
.pick-all { font: 400 14px/20px var(--font); }
@container (max-width: 640px) {
  table.stack.picks td.c-pick { display: block; grid-column: 2; grid-row: 1; justify-self: end; width: auto; min-width: 0; padding: 0; }
  /* A card that also has a status label: the box gets a third column after it */
  table.stack.picks tr:has(> .c-status) { grid-template-columns: minmax(0, 1fr) auto auto; }
  table.stack.picks tr:has(> .c-status) > td.c-pick { grid-column: 3; }
  :where(table.picks) tr > :where(.c-pick) + * { position: static; }
}
/* The bulk action bar (when rows are ticked): a dark rounded bar, "3 selected" with a muted hint, the buttons of section 9 (plain, the
   main one magenta, DS4), and x. Without app.js a plain row of buttons under the list; with it, shown only while rows are ticked and kept
   at the bottom of the screen. */
.bulkbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 16px 0 24px; padding: 10px 12px 10px 16px;
  background: var(--ink); color: var(--on-fill); border: 0; border-radius: var(--r-14);
}
.bulkbar[hidden] { display: none; }
.bulkbar.floating {
  position: sticky; bottom: 16px; z-index: 25; width: fit-content; max-width: 100%; margin: 16px auto 24px; box-shadow: var(--shadow-float);
}
.bulkbar-count { display: flex; align-items: center; gap: 10px; margin: 0; font: 500 14px/20px var(--font); color: rgba(255, 255, 255, .72); }
.bulkbar-n {
  display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: var(--r-10);
  background: var(--pink); color: var(--ink); font: 700 15px/1 var(--font); font-variant-numeric: tabular-nums;
}
.bulkbar-n:empty { display: none; }
.bulkbar.floating .bulkbar-count > [data-bulk-count] { color: var(--on-fill); font-weight: 600; }
.bulkbar.over .bulkbar-count, .bulkbar.over .bulkbar-count > [data-bulk-count] { color: var(--pink); font-weight: 600; }
.bulkbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bulkbar-close {
  display: inline-grid; place-items: center; min-width: 36px; min-height: 36px; padding: 0; border: 0; border-radius: var(--r-10);
  background: none; color: rgba(255, 255, 255, .72); font: 400 22px/1 var(--font);
}
.bulkbar-close[hidden] { display: none; }
.bulkbar-close:hover { color: var(--on-fill); background: rgba(255, 255, 255, .12); border: 0; }
.bulkbar-choice { display: inline-flex; align-items: center; gap: 8px; margin: 0; font: 500 13px/20px var(--font); color: rgba(255, 255, 255, .8); }
.bulkbar-choice select { width: auto; max-width: 16rem; min-height: 36px; height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: 13px; }
@media (max-width: 699.98px) { body:has(.tabbar) .bulkbar.floating { bottom: calc(var(--tabbar-h) + 8px + env(safe-area-inset-bottom)); } }
@media (max-width: 699.98px), (pointer: coarse) {
  .bulkbar-close { min-width: 44px; min-height: 44px; }
  .bulkbar-choice select { min-height: 44px; height: 44px; }
}
@media (max-width: 639.98px) {
  /* The count and x on one line, the actions under them, full width */
  .bulkbar.floating { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 0; width: 100%; }
  .bulkbar.floating .bulkbar-count { grid-column: 1; grid-row: 1; }
  .bulkbar.floating .bulkbar-close { grid-column: 2; grid-row: 1; }
  .bulkbar.floating .bulkbar-actions { grid-column: 1 / -1; grid-row: 2; }
  .bulkbar-actions .btn { flex: 1 1 auto; }
}
/* Store Products: the state tabs' dots and a match strength as a small label */
.dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--t-fill, var(--grey-group)); }
/* The "By store" overview: the strength's help under its name; the share columns centred with their meter */
table.by-store-table th .hint { display: block; margin-top: 2px; max-width: 46ch; font-weight: 400; }
table.by-store-table td.share { white-space: nowrap; }
table.by-store-table td.share .muted.small { display: block; }
.grp-block.by-store .grp-count a { font-weight: 400; }
/* The bulk result and its second step */
.bulk-confirm { max-width: 760px; }
/* A row no bulk action takes (held back, or a match of a spot check; docs/decisions.md U139-U141): the line under its name says so
   and what to do, and its tick cell is empty. On the match-strength lists: what the list shows ("Show"), and the notice above a page
   that holds such rows. */
.o-sub.no-bulk, table.board .o-sub.no-bulk { margin-top: 4px; max-width: 52ch; color: var(--ink); font: 400 12px/16px var(--font); white-space: normal; }
.o-sub.no-bulk::before { content: "!"; content: "!" / ""; display: inline-block; margin-right: 4px; color: var(--working); font-weight: 700; }
.o-sub.no-bulk a { font-weight: 600; text-decoration: underline; }
.alert.no-box { margin-bottom: 16px; }

/* ---------- 22. By Item: one column per store, and its picker (docs/decisions.md U113-U122) ---------- */
/* A store's cell: the state label, then the website product and its lines, left-aligned from the top (a board centres its cells) */
table.by-product th.c-store { min-width: 12rem; }
table.by-product td.c-store { text-align: left; vertical-align: top; min-width: 12rem; max-width: 22rem; padding: 8px; }
table.by-product td.c-store .o-line { max-width: none; overflow-wrap: anywhere; }
table.by-product td.c-store .o-sub { margin-top: 2px; }
table.by-product .cell-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
table.by-product .here-note { color: var(--ink); }
/* The row a person came back to after a decision keeps its tint while they read it (the list scrolls to it: #p-<number>) */
table.by-product tr[id] { scroll-margin-top: 96px; }
@container (max-width: 640px) {
  /* As a card: the store's name on the left, what it has on the right; the label keeps its own width */
  table.stack.by-product td.c-store { max-width: none; padding: 4px 0; row-gap: 2px; }
  table.stack.by-product td.c-store > .chip { justify-self: start; }
  table.stack.by-product tr.picked, table.stack.by-product tr.here { background: var(--row-selected); border: 1.5px solid var(--accent); }
}
/* By Item's rows, ticks and bulk action (docs/decisions.md U123-U130) */
/* The row a person came back to after a decision keeps its tint (`here`); `picked` is a ticked row, as on the lists (section 21) */
table.by-product tbody tr.here > * { background: var(--row-selected); }
/* How many items a page shows: "Rows 50 100 200" at the end of the board's head */
.rows-choice { display: flex; align-items: center; gap: 4px; margin-left: auto; color: var(--ink-2); font: 400 14px/20px var(--font); }
.rows-choice a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 32px; padding: 0 8px;
  border: 1px solid var(--field); border-radius: var(--radius-sm); color: var(--ink); text-decoration: none;
}
.rows-choice a:hover { background: var(--sunk); }
.rows-choice a[aria-current="true"] { background: var(--primary-sel); border-color: var(--primary); font-weight: 600; }
@media (max-width: 699.98px), (pointer: coarse) { .rows-choice a { min-width: 44px; min-height: 44px; } }
/* The tick of a tall row sits at its top, beside the item's name */
table.by-product td.c-pick { vertical-align: top; }
/* The line under the bar that says what its actions do (the store choice before its buttons: section 21) */
.bulk-note { max-width: 100ch; }
/* By Item's quick match (the owner's request of 20 Oct 2026): "Match…" is a fold in the cell; open, it holds the search box and the
   store's variants (the fragment app.js draws): one small card per variant, its details as label and value, its "Match to …" form.
   It opens in the cell (the list's box scrolls sideways when it grows), so nothing floats over the list or is cut off by its box. */
table.by-product details.quick-pick { border: 0; border-radius: 0; padding: 0; margin: 2px 0 0; background: none; }
table.by-product details.quick-pick > summary { display: inline-flex; min-height: 36px; margin: 0; list-style: none; }
table.by-product details.quick-pick > summary::-webkit-details-marker { display: none; }
table.by-product details.quick-pick[open] { min-width: min(26rem, 100%); }
table.by-product details.quick-pick > :last-child:not(summary) { margin-bottom: 0; }
.quick-pick .qp-search { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.quick-pick .qp-search input[type="search"] { flex: 1 1 10rem; min-width: 0; min-height: 36px; font-size: 16px; }
.quick-pick .qp-page, .quick-pick .qp-more { margin: 6px 0 0; }
.quick-pick .qp-h { margin: 10px 0 4px; color: var(--ink); font-weight: 600; }
.quick-pick .qp-note { margin: 4px 0; }
.quick-pick .qp-error { margin: 6px 0; color: var(--st-red); font-weight: 600; }
.quick-pick .qp-list { display: grid; gap: 8px; margin: 6px 0; padding: 0; list-style: none; }
.quick-pick .qp-row { padding: 10px 12px; border: 1px solid var(--hairline); border-radius: var(--r-12); background: var(--card); }
.quick-pick .qp-row .qp-name { margin: 0; overflow-wrap: anywhere; }
.quick-pick .qp-row .qp-name .o-name { font-weight: 600; }
.quick-pick .qp-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 6px 0 0; }
.quick-pick dl.qp-facts { grid-template-columns: max-content minmax(0, 1fr); margin: 6px 0 0; gap: 2px 12px; font-size: 13px; }
.quick-pick dl.qp-facts dt { margin-top: 0; }
.quick-pick .qp-why { margin: 6px 0 0; color: var(--ink-2); }
.quick-pick .qp-open { margin: 8px 0 0; }
.quick-pick form.qp-match { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 10px; margin: 8px 0 0; }
.quick-pick .qp-units { display: inline-flex; flex-direction: column; gap: 2px; color: var(--ink-2); font-size: 12px; }
.quick-pick .qp-units input { width: 6rem; min-height: 36px; font-size: 16px; }
@media (max-width: 699.98px), (pointer: coarse) {
  table.by-product details.quick-pick > summary, .quick-pick .qp-search input[type="search"], .quick-pick .qp-units input, .quick-pick .btn { min-height: 44px; }
}
@container (max-width: 640px) {
  /* As a card: an open fold takes the card's whole width, under the store's name */
  table.stack.by-product td.c-store:has(> details.quick-pick[open]) { grid-template-columns: minmax(0, 1fr); }
  table.stack.by-product td.c-store:has(> details.quick-pick[open]) > * { grid-column: 1 / -1; }
}
/* The lists' Check & match fold (docs/decisions.md CM1): a fold under a row's name (To review, Store Products) that opens in place to the
   variant checked against its suggestion (listing_check.php): one row per fact in three columns (what, website, warehouse), which still
   fit a 375 px card, then the strength, any warnings and the two answers, full width on a phone. */
details.check-fold { border: 0; border-radius: 0; padding: 0; margin: 6px 0 0; background: none; font-size: 14px; font-weight: 400; white-space: normal; }
details.check-fold > summary { display: inline-flex; min-height: 36px; margin: 0; list-style: none; }
details.check-fold > summary::-webkit-details-marker { display: none; }
details.check-fold[open] { min-width: min(30rem, 100%); }
details.check-fold[open] > summary { margin-bottom: 8px; }
details.check-fold > :last-child:not(summary) { margin-bottom: 0; }
.check-fold .lc-page { margin: 6px 0 0; }
.check-fold .lc-wait { margin: 6px 0; }
.check-fold .lc-error { margin: 6px 0; color: var(--st-red); font-weight: 600; }
.lc { padding: 10px 12px; border: 1px solid var(--hairline); border-radius: var(--r-12); background: var(--card); color: var(--ink); line-height: 20px; }
.lc .lc-rows { display: grid; gap: 0; margin: 0 0 8px; }
.lc .lc-row { display: grid; grid-template-columns: minmax(5.5rem, 0.8fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2px 10px; padding: 6px 0; border-top: 1px solid var(--divider); }
.lc .lc-row > * { min-width: 0; overflow-wrap: anywhere; }
.lc .lc-head { border-top: 0; padding-top: 0; color: var(--ink-muted); font-size: 12px; font-weight: 600; }
.lc .lc-k { color: var(--ink-2); font-size: 13px; }
.lc .lc-k .chip { display: inline-flex; margin-top: 2px; }
.lc .chip { min-width: 0; }
.lc .lc-sub { display: block; color: var(--ink-2); }
.lc .lc-row.differs { background: var(--warn-row); }
.lc dl.lc-why { grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; margin: 0 0 8px; font-size: 13px; }
.lc dl.lc-why dt { margin-top: 0; }
.lc .lc-clean { margin: 0 0 8px; color: var(--ink-2); }
.lc .lc-answers { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.lc .lc-answers form { margin: 0; }
.lc .lc-not { margin: 0 0 8px; }
.lc .lc-not p { margin: 0 0 4px; font-weight: 600; }
.lc .lc-not ul { margin: 0; }
.lc .lc-open { margin: 8px 0 0; }
@media (max-width: 699.98px), (pointer: coarse) {
  details.check-fold > summary, .lc .btn { min-height: 44px; }
}
@container (max-width: 640px) {
  /* As a card: the fold and its answers take the card's whole width (the name cell spans the row while the fold is open, its status
     chip goes under it), and each fact's name is on its own line above the two values */
  table.stack details.check-fold[open] { min-width: 0; }
  table.stack tr:has(details.check-fold[open]) > .c-head { grid-column: 1 / -1; }
  table.stack tr:has(details.check-fold[open]) > .c-status { grid-row: auto; }
  .lc .lc-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .lc .lc-row > .lc-k { grid-column: 1 / -1; }
  .lc .lc-head > :first-child { display: none; }
  .lc .lc-answers form, .lc .lc-answers .btn, .lc .lc-open .btn { width: 100%; }
}
/* The preview: one line per variant, what will happen (and why) in its last cell; the one button stays in sight (.actions.sticky) */
table.by-item-preview td.c-wide { text-align: left; }
table.by-item-preview td.c-wide .why { display: block; margin-top: 4px; color: var(--ink-2); }
form.by-item-apply .preview-facts { margin: 0 0 16px; }
/* Store Products' "Create new warehouse products for these": the preview (docs/decisions.md NF7) */
table.store-new-preview td .why { display: block; margin-top: 4px; color: var(--ink-2); }
table.store-new-preview dl.new-card { grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; margin: 0; font-size: 13px; }
table.store-new-preview dl.new-card dt { margin-top: 0; color: var(--ink-2); }
table.store-new-preview dl.new-card dd { margin: 0; overflow-wrap: anywhere; }
table.store-new-preview dl.new-card.muted dd { color: var(--ink-2); }
table.store-new-preview td.c-wide { text-align: left; }


/* Stock > Counts, one way in and one way out (the approved design CT_Board, CT_Sheet, CT_Final and CT_Phone of 29 Oct 2026; docs/decisions.md
   CV1-CV12). The board, its solid status cell, the strip and the bar at the bottom are the shared ones (pi-design, pi-one-page, section 9's
   More); here only what counting adds. A final sheet keeps its table (a line put back, its check). */
/* The bars at the bottom: each label beside its field; More opens upwards (the bar is at the bottom of the screen), a tall step scrolls in it */
.count-bar .count-field { display: inline-flex; align-items: center; gap: 8px; margin: 0; font: 500 13px/20px var(--font); color: var(--ink-muted); }
.count-bar .count-field select { width: auto; max-width: 18rem; }
.count-bar .count-note input { width: 12rem; }
.count-bar > .count-ticked { margin-right: auto; color: var(--ink); font-weight: 600; }
.count-bar > details.more { margin-right: auto; }
.doc-bar details.more > .more-menu { top: auto; bottom: calc(100% + 6px); left: 0; right: auto; max-height: min(70vh, 40rem); overflow-y: auto; }
.count-plan { margin: 0 0 16px; }
/* The sheet's head: "N of M counted" with its bar; the big scan box */
.count-progress { display: grid; gap: 6px; min-width: 12rem; text-align: right; }
.count-progress p { margin: 0; color: var(--ink); font: 700 18px/1.3 var(--font); }
.count-progress progress { width: 100%; }
.count-scan { margin: 0 0 20px; padding: 16px 20px; }
.count-scan form { display: grid; gap: 6px; margin: 0; }
.count-scan-row { display: flex; gap: 8px; align-items: stretch; }
.count-scan input[type="search"] { flex: 1 1 auto; min-width: 0; min-height: 48px; font-size: 16px; }
/* The scan box is the product box (docs/decisions.md CP): the line under it (Looking…, none, a failure; the script's), and the choices a page
   without the script lists for words, each with its button (44 px, a phone's thumb) */
.count-scan .ct-says { margin: 0; }
.count-scan .ct-says:empty { display: none; }
.count-choices { margin: 8px 0 0; padding: 0; }
.count-choices > li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--hairline); }
.count-choices > li > .o-name { font-weight: 600; }
.count-choices > li > form { margin: 0 0 0 auto; }
.count-choices .btn { min-height: 44px; }
/* The lines: the big number box, "Saved hh:mm" (green, with its tick) or "Not yet", a box typed in and not saved yet (red), the line to
   count now (the accent's tint) */
table.count-sheet input.count-box { width: 7.5rem; max-width: 100%; min-height: 46px; text-align: right; font-size: 18px; font-weight: 600; }
table.count-sheet input.unsaved { border: 2px solid var(--block-icon); }
.save-state { color: var(--ink-muted); font-size: 13px; }
.save-state.saved { color: var(--sf-green-ink); font-weight: 600; }
.save-state.saved::before { content: "\2713\00a0"; content: "\2713\00a0" / ""; }
.save-state.unsaved { color: var(--block-icon); font-weight: 600; }
.save-state.unsaved::before { content: none; }
table.count-sheet tr.now > * { background: var(--accent-soft); }
button.save-next { display: none; }
/* Before it is final: the strip's figures in their colour; a line's two answers side by side */
.count-steps .doc-step-big:is(.done, .needs) { color: var(--t-ink); }
.count-steps p.muted { margin: 0; font-size: 12px; }
table.count-before td.c-next { white-space: nowrap; text-align: right; }
table.count-before td.c-next form.inline { display: inline-flex; margin: 0 0 0 6px; }
/* A phone: the sheet's line to count now is one big card, first, with its 64 px box and "Save and next item"; the others are small cards
   (the name and its Saved mark, then the box); the bars' fields take a row each */
@container (max-width: 640px) {
  table.stack.count-sheet tr.now { order: -1; border: 2px solid var(--accent); background: var(--card); padding: 18px 16px; }
  table.stack.count-sheet tr.now > * { background: none; }
  table.stack.count-sheet tr.now .c-head { font-size: 17px; }
  table.stack.count-sheet td.count-saved { grid-column: 2; grid-row: 1; justify-self: end; padding: 0 0 6px; }
  table.stack.count-sheet tr.now td.count-q { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  table.stack.count-sheet tr.now td.count-q::before { color: var(--ink); font: 500 13px/20px var(--font); }
  table.stack.count-sheet tr.now td.count-q > * { grid-column: 1; }
  table.stack.count-sheet tr.now input.count-box { width: 100%; min-height: 64px; font-size: 28px; font-weight: 700; text-align: center; }
  table.stack.count-sheet tr.now button.save-next { display: flex; width: 100%; min-height: 52px; }
  table.count-before td.c-next { text-align: left; white-space: normal; }
  table.count-before td.c-next form.inline { display: block; margin: 0 0 8px; }
}
@media (max-width: 639.98px) {
  .count-bar > .count-ticked, .count-bar .count-field { flex: 1 1 100%; }
  .count-bar .count-field select, .count-bar .count-note input { flex: 1 1 auto; width: auto; max-width: none; }
  .count-progress { text-align: left; min-width: 0; }
}

form.count-answer { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: flex-end; }


/* ---------- 23. Sign-in: two halves (stacked on a phone). Left, the brand panel: deep plum with two soft glows, faint large brand shapes,
   a dot grid, the logo on a white tile, an eyebrow, the headline statement, one line, four short bars in the brand's tints and
   "Powered by". Right, the 420 px form: logo, "Sign in.", a helper line, the fields, the full-width button, "or", the way to set up
   a sign-in, and who to ask. ---------- */
.main.bare:has(.signin) { padding: 0; }
.main.bare:has(.signin) > .page { max-width: none; margin: 0; container-type: normal; }
.main.bare:has(.signin) > .page > .notice { position: fixed; right: 24px; bottom: 24px; z-index: 90; max-width: 420px; }
.signin { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100vh / var(--zoom)); background: var(--card); }
body:has(.strip.test-system) .signin { min-height: calc(100vh / var(--zoom) - 28px); }
.signin-brand {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 0;
  padding: 56px clamp(32px, 6vw, 88px); color: var(--on-fill);
  background:
    radial-gradient(520px 420px at 12% 8%, rgba(255, 20, 224, .34), transparent 70%),
    radial-gradient(560px 480px at 92% 96%, rgba(255, 176, 30, .22), transparent 70%),
    var(--signin-panel);
}
/* The dot grid (top right) and the faint large brand shapes (16% opacity): drawn, no images */
.signin-brand::before {
  content: ""; position: absolute; top: 40px; right: 40px; width: 220px; height: 160px; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, .22) 1.2px, transparent 1.8px) 0 0 / 18px 18px;
}
.signin-brand::after {
  content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: var(--r-16); pointer-events: none;
  background: var(--brand-gradient); opacity: .16; transform: rotate(18deg);
}
.sb-shape { position: absolute; pointer-events: none; opacity: .16; }
.sb-shape.one { left: -90px; top: 38%; width: 240px; height: 240px; border-radius: 50%; border: 36px solid #ff6a8e; }
.sb-shape.two { right: 22%; top: -70px; width: 150px; height: 150px; border-radius: var(--r-16); background: #ff14e0; transform: rotate(-14deg); }
.sb-body { position: relative; z-index: 1; max-width: 520px; }
.sb-logo {
  display: grid; place-items: center; width: 64px; height: 64px; margin: 0 0 28px; border-radius: var(--r-16); background: var(--on-fill);
}
.sb-logo .brand-mark { width: 44px; height: 44px; font-size: 15px; }
.sb-eyebrow { margin: 0 0 14px; font: 600 12px/16px var(--font); letter-spacing: 3px; text-transform: uppercase; color: var(--pink); }
.sb-headline { margin: 0 0 16px; font: 700 44px/1.1 var(--font); letter-spacing: -.02em; color: var(--on-fill); }
.sb-line { margin: 0 0 28px; max-width: 44ch; font: 400 15px/1.6 var(--font); color: rgba(255, 255, 255, .78); }
.sb-bars { display: flex; gap: 8px; margin: 0 0 40px; padding: 0; list-style: none; }
.sb-bars li { width: 36px; height: 8px; margin: 0; border-radius: var(--r-pill); background: #ff14e0; }
.sb-bars li:nth-child(2) { background: #ff6a8e; }
.sb-bars li:nth-child(3) { background: #ffb01e; }
.sb-bars li:nth-child(4) { background: var(--accent); width: 20px; }
.sb-powered { margin: 0; font: 400 12px/16px var(--font); color: rgba(255, 255, 255, .62); }
.signin-form { display: grid; place-items: center; padding: 48px 24px; background: var(--card); }
.sf-inner { width: 100%; max-width: 420px; }
.sf-logo { display: flex; align-items: center; gap: 10px; margin: 0 0 32px; color: var(--ink); font: 600 15px/1.2 var(--font); }
.sf-inner h1 { margin: 0 0 8px; }
.sf-inner > .lede { margin: 0 0 24px; }
.sf-inner form { display: grid; gap: 16px; margin: 0; }
.sf-inner form button[type="submit"] { width: 100%; margin-top: 4px; }
.sf-or { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--ink-muted); font: 500 12px/16px var(--font); }
.sf-or::before, .sf-or::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--hairline); }
.sf-inner > a.btn { width: 100%; margin: 0 0 16px; }
.sf-inner > p.hint { margin: 0 0 8px; text-align: center; }
@media (max-width: 899.98px) {
  .signin { grid-template-columns: minmax(0, 1fr); }
  .signin-brand { padding: 32px 24px 28px; }
  .sb-logo { width: 52px; height: 52px; margin-bottom: 18px; }
  .sb-logo .brand-mark { width: 36px; height: 36px; font-size: 13px; }
  .sb-headline { font-size: 28px; }
  .sb-line { font-size: 14px; }
  .sb-line { margin-bottom: 18px; }
  .sb-bars { margin-bottom: 18px; }
  .signin-brand::before, .sb-shape.two { display: none; }
  .signin-form { padding: 32px 20px 48px; place-items: start center; }
  .sf-logo { display: none; }
}

/* ---------- 24. All Products (/ui/items/cards) for normal staff (the owner's request of 21 Oct 2026), and the shared parts that pass
   improved. One block, so a branch working on the same file rebases over it easily. Shared: the tabs' "more" fade (app.js marks the
   side), a 44 px search box on a phone or a touch screen, the search box's "Clear the search", the chips of the filters that are on.
   The list's own: a search box that fits its words, the summary as one quiet line, room for the product's name (one link with its
   CW number), the quiet "No card yet" with its "Fill in the product card", and the three store columns (IL3). ---------- */

/* Tabs that do not fit scroll inside their strip: app.js marks the side with more (more-left, more-right) and that edge fades */
.tabs.more-right {
  -webkit-mask-image: linear-gradient(to right, var(--mask) calc(100% - 48px), transparent);
  mask-image: linear-gradient(to right, var(--mask) calc(100% - 48px), transparent);
}
.tabs.more-left {
  -webkit-mask-image: linear-gradient(to left, var(--mask) calc(100% - 48px), transparent);
  mask-image: linear-gradient(to left, var(--mask) calc(100% - 48px), transparent);
}
.tabs.more-left.more-right {
  -webkit-mask-image: linear-gradient(to right, transparent, var(--mask) 48px, var(--mask) calc(100% - 48px), transparent);
  mask-image: linear-gradient(to right, transparent, var(--mask) 48px, var(--mask) calc(100% - 48px), transparent);
}

/* The toolbar's search: a one-tap "Clear the search" (a link: the list again without the words, the filters kept) at its right end */
.tb-search.has-clear input[type="search"] { padding-right: 40px; }
.tb-search .tb-clear {
  position: absolute; right: 2px; top: 50%; display: inline-grid; place-items: center; width: 32px; height: 32px; margin-top: -16px;
  border-radius: var(--r-8); color: var(--ink-muted); text-decoration: none;
}
.tb-search .tb-clear:hover { background: var(--page-alt); color: var(--ink); }
.tb-search .tb-clear .ico { position: static; width: 16px; height: 16px; margin: 0; color: inherit; }
@media (max-width: 699.98px), (pointer: coarse) {
  .tb-search input[type="search"] { height: 44px; min-height: 44px; } /* as tall as the buttons beside it; a 44 px tap target */
  .tb-search .tb-clear { right: 0; width: 44px; height: 44px; margin-top: -22px; }
  .tb-search.has-clear input[type="search"] { padding-right: 46px; }
}

/* The filters that are on, under the toolbar: "Showing only:", one chip each (a tap takes it off), and the way back to everything */
.filters-on { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: -8px 0 20px; }
.filters-on .filter-chips-label { margin: 0; color: var(--ink-muted); font: 500 13px/20px var(--font); }
/* A long chip ("Product card: Changed since it was confirmed") wraps inside the page's width instead of pushing it sideways */
.filters-on .filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; min-width: 0; }
.filters-on .filter-chips li { margin: 0; max-width: 100%; }
.filters-on .filter-chips a {
  display: inline-flex; align-items: center; min-height: 34px; gap: 6px; max-width: 100%; padding: 5.5px 10px 5.5px 13.5px; border-radius: var(--r-pill);
  border: 1.5px solid var(--accent); background: var(--accent-soft); color: var(--accent-hover); font: 600 13px/20px var(--font); text-decoration: none;
  white-space: normal; text-align: left;
}
.filters-on .filter-chips a:hover { background: var(--card); color: var(--accent-hover); }
.filters-on .filter-chips .ico { flex: none; width: 14px; height: 14px; }
@media (max-width: 699.98px), (pointer: coarse) { .filters-on .filter-chips a { min-height: 44px; } }

/* The list's toolbar: the search box wide enough for what it says can be typed; it gives way on a narrow screen */
.cards-tools .tb-search { flex: 1 1 15rem; max-width: 22rem; min-width: 0; }
.cards-tools .tb-search input[type="search"], .cards-tools .tb-search input[type="search"]:focus-visible,
.cards-tools .tb-search input[type="search"]:not(:placeholder-shown) { width: 100%; }
@media (max-width: 639.98px) { .cards-tools .tb-search { flex: 1 1 100%; max-width: none; } } /* a phone: its own row, its words readable */
/* The numbers on top: one quiet line (it wraps on a phone) */
ul.summary-line { gap: 2px 20px; color: var(--ink-muted); font: 400 13px/20px var(--font); }
ul.summary-line li { margin: 0; }

/* The list: the product's name gets the room (one or two lines), its CW number and name are one link, the stock held beside it (the
   list's order), then the card: its state and its six details together */
table.item-cards thead th.c-product, table.item-cards tbody th.c-head { min-width: 18rem; }
table.item-cards th.c-head a { display: block; }
table.item-cards .ic-code { color: var(--ink); font-weight: 600; white-space: nowrap; }
table.item-cards .ic-name { color: var(--ink-body); font-weight: 500; }
table.item-cards th.c-head a:hover .ic-code, table.item-cards th.c-head a:hover .ic-name { color: inherit; }
/* No card yet: a quiet tag (the solid pills are for states with a meaning: confirmed, warning, blocked) and the link to fill it in */
table.item-cards td.c-nocard { white-space: nowrap; }
table.item-cards td.c-nocard .tag { margin: 0 10px 0 0; }
table.item-cards .c-fill { font: 500 13px/20px var(--font); }
@media (max-width: 699.98px), (pointer: coarse) { table.item-cards .c-fill { display: inline-flex; align-items: center; min-height: 44px; } }
/* As a card on a phone: the name across the card, then the stock held and the details */
@container (max-width: 640px) {
  table.item-cards thead th.c-product, table.item-cards tbody th.c-head { min-width: 0; }
  table.item-cards th.c-head { grid-column: 1 / -1; order: -2; }
  table.item-cards td.c-nocard .tag { margin: 0; }
}
/* Items' store columns (the owner, 17 Nov 2026: "3 small extra column with alt, vpg, vbig ... just icons"; docs/decisions.md IL3): Alt, VPG,
   VBig, each as narrow as its head, its icon centred: a tick in a green disc where the item is connected to that website, an empty grey ring
   where it is not (a true circle: 50 %). The words are the icon's label and its title, so the cell sits above the link that covers the row
   (a.row-link::after) and pointing at the icon shows them; elsewhere in the row a click still opens the item. On a phone the three are one
   line under the name, each with its short name (the cell's data-label), then On hand. */
table.item-cards th.c-link, table.item-cards td.c-link { width: 1%; text-align: center; white-space: nowrap; }
table.doc-list td.c-link { position: relative; z-index: 2; }
.link-ico { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; vertical-align: middle; }
.link-ico.on { background: var(--done-bg); color: var(--st-green); }
.link-ico.on .ico { width: 14px; height: 14px; }
.link-ico.off { border: 1.5px solid var(--ink-faint); }
@container (max-width: 640px) {
  table.stack.item-cards tr { grid-template-columns: max-content max-content max-content minmax(0, 1fr); column-gap: 20px; }
  table.stack.item-cards td.c-link { grid-column: auto; grid-row: 2; display: flex; align-items: center; gap: 6px; width: auto; }
}

/* ==== search-match-ux (branch search-match-ux, docs/decisions.md SX5-SX7) ==========================================================
   The product searches of the matching pages: a box wide enough for its placeholder (what to type), the line under it while a search
   is on ("12 found for "…"" and Clear the search), and the progress line of a match-strength list and of a variant's page opened from
   one. One block at the end of the file, so the parallel branches rebase around it. */
.tb-search input[data-page-search] { width: 300px; }
.tb-search input[data-page-search]:focus-visible, .tb-search input[data-page-search]:not(:placeholder-shown) { width: 340px; }
.search-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; margin: -4px 0 12px; color: var(--ink-body); font: 400 13px/20px var(--font); }
.search-note .search-found { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.search-note .search-clear { display: inline-flex; align-items: center; min-height: 32px; font-weight: 500; }
.progress-line { margin: 0; color: var(--ink-muted); font: 500 13px/20px var(--font); }
.board-head .progress-line { flex-basis: 100%; }
.crumbs + .progress-line { margin: -4px 0 8px; }
.search-capped { margin: 8px 0 0; }
@media (max-width: 639.98px) {
  .tb-search input[data-page-search], .tb-search input[data-page-search]:focus-visible, .tb-search input[data-page-search]:not(:placeholder-shown) { width: 100%; }
  .search-note .search-clear { min-height: 44px; }
}
/* ==== end search-match-ux ========================================================================================================= */

/* ==== simple-matching (branch simple-matching, docs/decisions.md SM1-SM11) ========================================================
   Products › Simple matching: a plain table (the warehouse product, then one column per store); a store's cell is the products matched
   there (name, ID and its status on the store, a small label for one waiting for a second OK) and one box with Apply (a plain
   dropdown: the box and its own list, which app.js draws), or "+" for one more. 44 px to tap, 16 px in the box (no zoom on a phone).
   One block at the end of the file. */
table.simple-match th.c-head { min-width: 12rem; text-align: left; vertical-align: top; }
table.simple-match .sm-code { display: block; color: var(--ink-muted); font: 500 12px/18px var(--font); }
table.simple-match .sm-name { font-weight: 600; overflow-wrap: anywhere; }
table.simple-match td.c-store { text-align: left; vertical-align: top; min-width: 14rem; max-width: 24rem; padding: 8px; }
table.simple-match .sm-matched { display: grid; gap: 4px; margin: 0 0 6px; padding: 0; list-style: none; }
table.simple-match .sm-match { overflow-wrap: anywhere; }
table.simple-match span.sm-id, table.simple-match span.sm-site, table.simple-match span.sm-note { color: var(--ink-muted); font-size: 13px; white-space: nowrap; }
table.simple-match span.sm-wait { margin-left: 2px; white-space: nowrap; }
table.simple-match tr[id] { scroll-margin-top: 96px; }
table.simple-match tbody tr.here > * { background: var(--row-selected); }
table.simple-match .sm-said { margin: 6px 0; padding: 8px 12px; font-size: 13px; }
.sm-add { margin: 0; }
.sm-add .sm-box { display: flex; align-items: center; gap: 6px; }
.sm-add input[data-sm-pick] { flex: 1 1 10rem; min-width: 0; min-height: 44px; font-size: 16px; }
.sm-add .btn { flex: none; min-height: 44px; }
/* The line under the box (what app.js says: looking, nothing found, choose first) wraps like any sentence */
.sm-add .sm-msg { margin: 4px 0 0; font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
.sm-add .sm-confirm { margin: 0 0 6px; padding: 8px 12px; font-size: 13px; }
table.simple-match details.sm-more { margin: 2px 0 0; padding: 0; border: 0; border-radius: 0; background: none; }
table.simple-match details.sm-more > summary {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: 0; list-style: none; font-size: 20px;
}
table.simple-match details.sm-more > summary::-webkit-details-marker { display: none; }
table.simple-match details.sm-more[open] > summary { margin-bottom: 6px; }
/* The box's own list (SM11; a browser's <datalist> popup is one line as wide as the box, and cut long names). app.js moves it to the
   page's top level and places it under the box (above it when there is more room there): no table, card or scrolling box cuts it,
   under the phone's top bar, above its tab bar. Wider than the box where the screen allows (app.js sets the width, the edge and the
   height it has room for); its own scroll. Each choice is two lines that wrap: the full name, then its ID, status and strength. */
.sm-list {
  position: fixed; z-index: 35; top: 0; left: 0; width: min(36rem, calc(100vw - 32px)); max-height: 24rem; margin: 0; padding: 4px;
  overflow-y: auto; overscroll-behavior: contain; list-style: none; text-align: left;
  background: var(--card); color: var(--ink-body); border: 1px solid var(--hairline); border-radius: var(--r-10); box-shadow: var(--shadow-float);
}
.sm-list > li { display: grid; gap: 2px; min-height: 44px; margin: 0; padding: 8px 12px; border-radius: var(--r-8); cursor: pointer; }
.sm-list > li:hover { background: var(--row-open); }
.sm-list > li.is-active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.sm-list .sm-opt-name { color: var(--ink); font: 500 14px/20px var(--font); overflow-wrap: anywhere; }
.sm-list .sm-opt-meta { color: var(--ink-muted); font: 400 13px/18px var(--font); overflow-wrap: anywhere; }
@container (max-width: 640px) {
  /* As a card: the product across the card, each store's name above what it has (the box needs the card's width) */
  table.stack.simple-match th.c-head { grid-column: 1 / -1; }
  table.stack.simple-match td.c-store { grid-template-columns: minmax(0, 1fr); gap: 4px; max-width: none; padding: 8px 0; border-top: 1px solid var(--divider); }
  table.stack.simple-match td.c-store > * { grid-column: 1; }
  table.stack.simple-match tr.here { background: var(--row-selected); border: 1.5px solid var(--accent); }
}
/* Simple matching as Product matching's tab (docs/decisions.md RD-S2; the SimpleMatch artboard of 31 Oct 2026): the search fills its row
   with Search beside it; "Match" (an empty cell: a dashed pill, as By item's "+ Store") and "+" (a cell with a product) are 34 px
   pills in 13 px words (44 px to tap on a phone); a matched product's name is plain ink, its ID and status on the line under it. */
form.sm-find .tb-search input[data-page-search] { width: 100%; }
table.simple-match details.sm-more > summary { min-width: 34px; min-height: 34px; padding: 0 14px; border-radius: var(--r-pill); font: 600 13px/18px var(--font); }
table.simple-match td.c-store:not(:has(.sm-matched)) details.sm-more > summary { border: 1px dashed #c8bcd3; background: transparent; color: var(--ink-muted); font-weight: 500; }
table.simple-match td.c-store:not(:has(.sm-matched)) details.sm-more > summary:hover { border-color: var(--accent); color: var(--accent-hover); }
table.simple-match a.sm-title { display: block; color: var(--ink); text-decoration: none; font: 500 13px/18px var(--font); }
table.simple-match a.sm-title:hover { color: var(--accent-hover); text-decoration: underline; }
@media (max-width: 600px) { table.simple-match details.sm-more > summary { min-width: 44px; min-height: 44px; } }
/* ==== end simple-matching ========================================================================================================= */
/* ==== po-one-page (branch po-one-page, docs/decisions.md PX1-PX10) ==============================================================
   The purchase order on one page, in the board look already here (v4: .board, .grp-add, .card, .btn): the supplier's box and the product
   box with the site's one dropdown (.sm-list, SM11), whose last line is "+ Add new …" (an action, in the accent colour) or the line naming
   whom to ask (not a choice); the board of products with a remove on each row and "+ Add product" (the scan box) as its last row; the two
   small "+ Add new" forms; one summary card. The form's first button (Add: what Enter presses) is in the form but not on the screen.
   Layout only: no new colours or type. 44 px to tap, 16 px in a box. */
form.po-editor > button.po-default, form.count-lines > button.po-default, .kg-head-bar > button.po-default { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
form.po-editor .po-box-field { display: grid; gap: 4px; flex: 1 1 18rem; min-width: 0; }
form.po-editor .po-box-field select, form.po-editor .po-box-field input[type="search"], form.po-editor input.po-box { width: 100%; min-height: 44px; font-size: 16px; }
.sm-list > li.sm-add { color: var(--accent-hover); font-weight: 600; }
.sm-list > li.sm-ask { color: var(--ink-muted); cursor: default; }
.sm-list > li.sm-ask:hover { background: none; }
table.po-lines .po-add-row > td { padding: 8px; }
table.po-lines .po-add-line { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
table.po-lines .po-add-line .po-packs { flex: 0 0 auto; }
table.po-lines .po-x { min-width: 44px; min-height: 44px; padding: 0 10px; font-size: 20px; line-height: 1; }
form.po-editor fieldset.po-header { align-items: flex-start; } /* an open "+ Add new supplier" never pushes the other fields down (Chrome check of 0917562) */
form.po-editor details.po-add { flex: 1 1 100%; margin: 8px 0 0; }
/* With the script a closed "+ Add new" form takes no room (its header is hidden: the dropdown's last line opens it); without it, its header shows */
html.js form.po-editor details.po-add:not([open]) { display: none; }
form.po-editor details.po-add > summary { display: flex; align-items: center; min-height: 44px; color: var(--accent-hover); font-weight: 600; cursor: pointer; }
form.po-editor details.po-add label { display: block; max-width: 28rem; margin: 8px 0; }
form.po-editor details.po-add input:not([type="checkbox"]) { width: 100%; min-height: 44px; font-size: 16px; }
form.po-editor details.po-add label.choice { display: flex; gap: 8px; align-items: center; }
form.po-editor details.po-add input.short { max-width: 10rem; }
form.po-editor details.po-add .same-items li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 4px 0; }
form.po-editor .po-ask, form.po-editor .po-fixed { flex: 1 1 100%; margin: 0; }
section.po-summary dl input { max-width: 8rem; min-height: 40px; }
/* "Cancel draft" (PX11): a small plain button under Save and Confirm; its one step (a reason, a note, the button) opens below it */
section.po-summary details.po-cancel { margin: 4px 0 0; border: 0; padding: 0; background: none; }
section.po-summary details.po-cancel > summary { display: inline-flex; list-style: none; cursor: pointer; }
section.po-summary details.po-cancel > summary::-webkit-details-marker { display: none; }
section.po-summary details.po-cancel label { display: block; max-width: 20rem; margin: 8px 0; }
section.po-summary details.po-cancel select, section.po-summary details.po-cancel input { width: 100%; min-height: 44px; font-size: 16px; }
/* ==== end po-one-page ============================================================================================================== */
/* ==== pi-one-page (branch pi-one-page, docs/decisions.md PV) ======================================================================
   The supplier invoice on one page, and the shared pieces of a document's page that the purchase order, the supplier invoice and (later)
   the sales invoice use, in Zoho Inventory's layout and spacing with CW's own colours, type and words: the header fields in a grid (two
   columns, one on a phone), the lines table with its headings, the totals on the right under the lines, the bar at the bottom that stays
   on the screen while the form is (Save, Confirm), the clean list whose row opens the document, and the saved document: its actions in
   one bar at the top, the supplier's block beside the dates, the lines, the totals. The invoice's supplier box, item box and "+ Add new"
   forms are the order page's (.po-box-field, .po-add, .sm-list). Layout only: no new colours or type. */
/* The header grid */
.doc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; align-items: start; margin: 0; padding: 20px 24px; }
@media (max-width: 639.98px) { .doc-grid { grid-template-columns: minmax(0, 1fr); } }
form.po-editor fieldset.doc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; align-items: start; }
@media (max-width: 639.98px) { form.po-editor fieldset.doc-grid { grid-template-columns: minmax(0, 1fr); padding: 16px; } }
.doc-grid > label, .doc-grid > .po-box-field, .doc-grid > .doc-field { margin: 0; min-width: 0; }
.doc-grid .doc-wide, form.po-editor fieldset.doc-grid details.po-add, form.po-editor fieldset.doc-grid .po-ask, form.po-editor fieldset.doc-grid .po-fixed { grid-column: 1 / -1; }
.doc-field { display: grid; gap: 6px; }
.doc-field > .doc-pair { display: flex; gap: 8px; align-items: stretch; }
.doc-field > .doc-pair > select { flex: 1 1 auto; min-width: 0; }
.doc-field > .doc-pair > button { flex: none; }
/* The lines: a board in a card with its headings; numbers on the right; the last row adds a line */
table.doc-lines th.num, table.doc-lines td.num { white-space: nowrap; }
table.doc-lines td.num input { max-width: 8rem; margin-left: auto; text-align: right; }
table.doc-lines .o-sub { display: block; color: var(--ink-muted); font-size: 12px; line-height: 18px; font-weight: 400; }
details.pi-charge { margin: 0; }
details.pi-charge > summary { display: flex; align-items: center; min-height: 44px; color: var(--accent-hover); font-weight: 600; cursor: pointer; }
details.pi-charge .doc-charge { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; padding: 0 0 12px; }
details.pi-charge .doc-charge label { flex: 1 1 10rem; }
/* Under the lines: the notes and the file on the left, the totals on the right */
.doc-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(20rem, 28rem); gap: 20px 32px; align-items: start; }
@media (max-width: 639.98px) { .doc-foot { grid-template-columns: minmax(0, 1fr); } }
.doc-notes { display: grid; gap: 12px; min-width: 0; }
.doc-notes .doc-pair { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.doc-notes .doc-pair > label { flex: 1 1 12rem; min-width: 0; }
.doc-notes ul.files { margin: 0; padding-left: 18px; }
.doc-totals { margin-left: auto; width: 100%; max-width: 28rem; padding: 20px 24px; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-14); }
/* On a saved document's paper the totals are the paper's own rows, not a card of their own (PO_View, PI_View; DC15) */
.doc-view .doc-totals { padding: 0; border: 0; border-radius: 0; background: none; }
.doc-totals dl { grid-template-columns: minmax(12rem, 1fr) auto; gap: 10px 16px; align-items: center; margin: 0; } /* the words have room (PV29) */
.doc-totals dt { color: var(--ink-body); }
.doc-totals dd { text-align: right; font-variant-numeric: tabular-nums; }
.doc-totals dd input { width: 8.5rem; text-align: right; }
.doc-totals .grand { padding-top: 10px; border-top: 1px solid var(--hairline); color: var(--ink); font-weight: 700; font-size: 16px; }
@container (max-width: 560px) { .doc-totals dl { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; } .doc-totals dl dt:not(:first-child) { margin-top: 0; } }
/* The bar at the bottom: on the screen while its form is, the main action last (on the right); on a phone it takes the tab bar's place */
.doc-bar {
  position: sticky; bottom: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px;
  margin: 24px calc(-1 * var(--gutter)) 0; padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom));
  background: var(--card); border-top: 1px solid var(--hairline); box-shadow: var(--shadow-up);
}
.doc-bar > a.btn { margin-right: auto; }
section.po-summary.doc-summary { display: contents; }
section.po-summary .doc-totals .actions { margin: 0; }
@media (max-width: 699.98px) {
  body:has(.doc-bar) .tabbar { display: none; }
  body:has(.doc-bar) { padding-bottom: 0; }
  .doc-bar > button { flex: 1 1 0; min-width: 0; } /* the approved design: the bar's two buttons equal on a phone */
  .doc-bar > a.btn { flex: 1 1 100%; order: 3; margin-right: 0; }
  .doc-bar { margin-top: 24px; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); }
}
.doc-later { margin: 0; }
.doc-later > summary { display: flex; align-items: center; min-height: 44px; color: var(--accent-hover); font-weight: 600; cursor: pointer; }
.doc-later .doc-charge { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; padding: 0 0 12px; }
/* The clean list: one row a document; the row opens it */
table.doc-list tbody tr { position: relative; }
table.doc-list tr > :first-child { position: static; }
table.doc-list a.row-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
table.doc-list td.c-status { width: 1%; }
@container (max-width: 640px) { table.stack.doc-list .c-head { grid-row: 1; } } /* a card: the number and the status first, then the date */
.toolbar .tb-state { display: inline-flex; align-items: center; gap: 8px; }
.toolbar .tb-state > label:not(.choice) { color: var(--ink-muted); font: 400 13px/20px var(--font); }
.toolbar .tb-state label.tb-check { min-height: 40px; padding: 8px 12px; font-size: 14px; }
.toolbar .tb-state select { width: auto; min-width: 170px; min-height: 40px; height: 40px; padding-top: 8px; padding-bottom: 8px; font-size: 14px; }
@media (max-width: 699.98px), (pointer: coarse) { .toolbar .tb-state select, .tb-search input[type="search"] { min-height: 44px; height: 44px; } }
@media (max-width: 639.98px) { .toolbar .tb-state { flex: 1 1 100%; } .toolbar .tb-state select { flex: 1 1 auto; height: 44px; min-height: 44px; } }
/* The saved document: its actions in one bar at the top (a step that needs a reason opens under the bar), then the document itself */
.doc-actions { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end; gap: 8px; margin: -8px 0 20px; }
.doc-actions > form { margin: 0; }
.doc-actions > details.doc-act { margin: 0; padding: 0; border: 0; background: none; }
.doc-actions > details.doc-act > summary { list-style: none; }
.doc-actions > details.doc-act > summary::-webkit-details-marker { display: none; }
.doc-actions > details.doc-act[open] { flex: 1 1 100%; order: 99; }
.doc-actions > details.doc-act[open] > summary { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-hover); }
.doc-act-panel { margin: 10px 0 0; padding: 16px 20px; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-14); max-width: 40rem; }
.doc-act-panel form.record { max-width: none; }
.doc-view { margin: 0 0 24px; padding: 24px; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-14); }
.doc-view .table-wrap { border-radius: var(--r-12); }
.doc-meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 32px; margin: 0 0 20px; }
@media (max-width: 639.98px) { .doc-meta { grid-template-columns: minmax(0, 1fr); } .doc-view { padding: 16px; } }
.doc-party { margin: 0; }
.doc-label { margin: 0 0 6px; font: 600 12px/16px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.doc-party p { margin: 0; }
.doc-party .doc-party-name { font: 600 16px/24px var(--font); color: var(--ink); }
.doc-facts { margin: 0; }
/* ==== end pi-one-page =============================================================================================================== */
/* ==== pi-design (the owner's "yes" to the design canvas, 29 Oct 2026: "monday.com design style and color follow"; docs/decisions.md
   PV18-PV20) ======================================================================================================================
   The canvas's layout as plain shared classes with CW's tokens (the --st-* status colours through the tone classes' --t-fill, the magenta
   accent): a list is a board (each group a coloured heading with its count, then a white card with the group's colour on a 6 px left edge;
   the status cell filled with its colour, white words, centred); a saved document's status is a solid block with 8 px corners beside its
   title, its next step in the accent and the rest under More; the order's progress strip; the invoice's differences panel with the cells
   that differ tinted; a soft button, the dashed drop area; on a phone the lines are cards with Qty, Price and Amount side by side and the
   bar's two buttons equal. The sales invoice reuses them later (docs/dev.md). */
/* The board (the redesign's simple list, RD8: Items.dc.html and the other list artboards): the group's heading with its dot (section 6), a
   white card with 12 px corners and no coloured edge; the head row 12 px muted, the rows 14 px with 14 px padding; the status a pill in
   its cell, not a filled cell */
.doc-group { margin: 0 0 24px; }
.doc-group > .grp-title { color: var(--ink); margin: 0 0 8px; }
.doc-board { border-radius: var(--r-12); }
.doc-board > table thead th { font-weight: 500; }
@container (min-width: 641px) {
  .doc-board > table th, .doc-board > table td { padding: 10px 16px; }
  .doc-board > table tbody > tr > * { height: 48px; padding-top: 14px; padding-bottom: 14px; }
}
/* A board's status cell holds the pill (.chip, which takes the cell's tone); a cell's words not yet in a pill are the tone's ink */
td.doc-st { color: var(--t-ink, var(--sf-grey-ink)); font: 600 13px/18px var(--font); white-space: nowrap; }
td.doc-st .o-sub { display: block; margin-top: 4px; color: var(--ink-muted); font-weight: 400; white-space: normal; }
/* A board's name cell and total in ink, semi-bold (the mockups' .strong); who made a row: their initials in the soft purple circle that is the
   phone top bar's too (cwdesign/Main.dc.html's By; DC16) */
table.doc-list td.strong { color: var(--ink); font-weight: 600; }
table.doc-list th.c-by, table.doc-list td.c-by { text-align: center; width: 1%; white-space: nowrap; }
.initials {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: var(--sf-purple); color: var(--sf-purple-ink); font: 700 12px/1 var(--font);
}
.doc-meter { display: flex; align-items: center; gap: 8px; }
.doc-meter progress { width: 110px; flex: none; }
.doc-meter progress::-webkit-progress-value { background: var(--st-green); }
.doc-meter progress::-moz-progress-bar { background: var(--st-green); }
td.late { color: var(--st-red); font-weight: 600; }
@container (max-width: 640px) {
  .doc-meter progress { width: 80px; }
}
/* The saved document: the status block (section 7), the action bar with More (section 9), the progress strip, the differences panel,
   the balance */
.doc-head .ph-title h1 .chip { vertical-align: 6px; }
.doc-progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 20px; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-14); }
.doc-step { display: grid; gap: 6px; align-content: start; padding: 16px 20px; border-left: 1px solid var(--divider); min-width: 0; }
.doc-step:first-child { border-left: 0; }
.doc-step p { margin: 0; }
.doc-step-label { color: var(--ink-muted); font-size: 13px; }
.doc-step-big { color: var(--ink); font: 700 20px/1.25 var(--font); font-variant-numeric: tabular-nums; }
.doc-step progress::-webkit-progress-value { background: var(--st-blue); }
.doc-step progress::-moz-progress-bar { background: var(--st-blue); }
.doc-step progress.done::-webkit-progress-value { background: var(--st-green); }
.doc-step progress.done::-moz-progress-bar { background: var(--st-green); }
.doc-step progress.review::-webkit-progress-value { background: var(--st-purple); }
.doc-step progress.review::-moz-progress-bar { background: var(--st-purple); }
@media (max-width: 639.98px) { .doc-progress { grid-template-columns: repeat(2, minmax(0, 1fr)); } .doc-step:nth-child(3) { border-left: 0; } .doc-step:nth-child(n + 3) { border-top: 1px solid var(--divider); } }
.doc-diff { margin: 0 0 20px; background: var(--card); border: 1px solid var(--hairline); border-left: 6px solid var(--st-amber); border-radius: var(--r-14); overflow: hidden; }
.doc-diff-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 16px 20px; }
.doc-diff-head h2 { margin: 0; color: var(--sf-amber-ink); font: 600 16px/24px var(--font); }
.doc-diff-head p { margin: 0; }
.doc-diff > .note { margin: 0 20px 12px; }
.doc-diff .table-wrap { margin: 0; border: 0; border-top: 1px solid var(--hairline); border-radius: 0; }
.doc-diff td.diff { background: var(--sf-amber); color: var(--sf-amber-ink); font-weight: 600; }
.doc-diff tbody tr:hover > td.diff { background: var(--sf-amber); }
.doc-meta.with-big { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(10rem, auto); }
.doc-big { text-align: right; }
.doc-big p { margin: 0; }
.doc-big-value { color: var(--ink); font: 700 26px/1.2 var(--font); font-variant-numeric: tabular-nums; }
@media (max-width: 639.98px) { .doc-meta.with-big { grid-template-columns: minmax(0, 1fr); } .doc-big { text-align: left; } }
/* The new pages: the dashed drop area (the soft button is section 9's); on a phone the lines are cards with Qty, Price and Amount side by side */
.doc-drop { padding: 16px; border: 2px dashed var(--hairline); border-radius: var(--r-12); background: var(--page-alt); }
.doc-drop input[type="file"] { background: var(--card); }
.doc-grid .hint { color: var(--ink-muted); font-weight: 400; font-size: 12px; }
@container (max-width: 640px) {
  table.stack.doc-lines tr { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 10px; }
  table.stack.doc-lines tr > th.c-head { grid-column: 1 / 3; }
  table.stack.doc-lines tr > td.c-status { grid-column: 3; grid-row: 1; justify-self: end; }
  table.stack.doc-lines td.num[data-label] { grid-column: auto; grid-template-columns: minmax(0, 1fr); gap: 2px; text-align: right; }
  table.stack.doc-lines td.num[data-label] > * { grid-column: 1; }
  table.stack.doc-lines td.num input { width: 100%; max-width: none; }
  table.stack.doc-lines tr.grp-add > td { grid-column: 1 / -1; }
}
/* The coordinator's Chrome check of 8f6fbb7 (PV27, PV29): a saved document's action bar is in the head, at its right beside the title
   (on a phone under it, from the left); the new invoice's head is the design's grid (the supplier beside its number, a draft's fixed
   supplier too); the "+ Add line" row has Qty and Price in their columns and Add at its end, one under another on a phone. */
.doc-head .page-head { align-items: flex-start; }
.doc-head .ph-actions { flex: 0 1 auto; max-width: 100%; }
.ph-actions > .doc-actions { margin: 0; justify-content: flex-end; }
@media (max-width: 639.98px) { .ph-actions { flex: 1 1 100%; } .ph-actions > .doc-actions { justify-content: flex-start; } }
form.pi-editor fieldset.doc-grid .pi-fixed { grid-column: auto; }
table.pi-lines tr.po-add-row > td { padding: 8px; vertical-align: top; }
table.pi-lines tr.po-add-row td.num input { width: 100%; max-width: 8rem; min-height: 44px; }
table.pi-lines tr.po-add-row td.po-add-go { text-align: right; }
@container (max-width: 640px) {
  table.stack.doc-lines tr.grp-add > td.num[data-label] { grid-column: 1 / -1; text-align: left; }
  table.pi-lines tr.po-add-row td.num input { max-width: none; }
  table.pi-lines tr.po-add-row td.po-add-go { text-align: left; }
}
/* ==== end pi-design ================================================================================================================ */

/* Lines to place as a board (Approvals › From the stores, docs/decisions.md LQ2-LQ3; the owner's OK of 29 Oct 2026). The board is the shared
   one of pi-design above (.doc-group with its .grp-title, .doc-board's 6 px coloured edge, td.doc-st's solid status cell); here only what
   the rows add: their boxes, the status cell kept solid on hover, the item chosen as a green chip, the row's menu a small fold. */
table.lq-lines th, table.lq-lines td { vertical-align: top; }
table.lq-lines td.doc-st { vertical-align: middle; }
table.lq-lines td.lq-item { min-width: 16rem; }
table.lq-lines td.lq-item input[type="text"], table.lq-lines td input[name="note"] { width: 100%; min-width: 10rem; }
table.lq-lines .lq-answer { display: inline; margin: 0; }
.lq-picked {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; margin: 0; padding: 0 4px 0 10px;
  border-radius: var(--r-10); background: var(--sf-green); color: var(--sf-green-ink); font: 600 13px/18px var(--font);
}
.lq-picked .btn.sm { min-height: 28px; }
details.lq-menu { display: inline-block; margin: 0 0 0 6px; vertical-align: top; }
details.lq-menu > summary {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-10); cursor: pointer; list-style: none;
  color: var(--ink-muted); font: 700 18px/1 var(--font);
}
details.lq-menu > summary::-webkit-details-marker { display: none; }
details.lq-menu > summary::before { content: "\22EF"; content: "\22EF" / ""; }
details.lq-menu > summary:hover { background: var(--page-alt); color: var(--ink); }
details.lq-menu[open] { display: block; margin: 8px 0 0; }
details.lq-menu form.record { margin-top: 8px; max-width: 22rem; }

/* ==== gi-one-page (Goods in on ONE page: the owner's approved design of 29 Oct 2026, GI_List / Main / GI_Phone; docs/decisions.md GV) ====
   The board is the shared one of pi-design (.doc-group, .doc-board's coloured edge, td.doc-st, .doc-meter); the delivery's head, strip and
   bar are .doc-head, .doc-progress and .doc-bar. Here only what Goods in adds: the purple "being checked" bar, the details in three columns
   (two on a tablet, one on a phone), the big scan box, the lines' solid check and duty-stamp cells (the duty answer a select inside its
   cell), the row's buttons, the problem panel on its own row (closed until asked: with the script .open, without it :target), the prices
   fold, the photo tiles and the note; on a phone each line is a card with its check's colour on a 6 px left edge, 48 px "All fine" and
   "Problem", the problem fields two a row. CW tokens only. */
.doc-meter progress.review::-webkit-progress-value { background: var(--st-purple); }
.doc-meter progress.review::-moz-progress-bar { background: var(--st-purple); }
.gi-progress .gi-warn { color: var(--sf-amber-ink); }
.gi-progress .doc-step-big .muted { font: 400 13px/20px var(--font); }
/* The details */
.gi-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 24px; align-items: start; margin: 0; padding: 20px 24px; }
@media (max-width: 899.98px) { .gi-details { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639.98px) { .gi-details { grid-template-columns: minmax(0, 1fr); padding: 16px; } }
.gi-details > label, .gi-details > .doc-field { margin: 0; min-width: 0; }
.gi-details .gi-label { color: var(--ink); font: 500 13px/20px var(--font); }
.gi-details .gi-fixed { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 44px; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.gi-details label.choice { font-weight: 400; }
.gi-details details.gi-more-details { grid-column: 1 / -1; margin: 0; padding: 0; border: 0; border-top: 1px solid var(--divider); border-radius: 0; background: none; }
.gi-details details.gi-more-details > summary { min-height: 44px; color: var(--accent-hover); }
.gi-more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 12px 24px; padding: 0 0 8px; }
.gi-more-grid .gi-wide { grid-column: 1 / -1; margin: 0; }
/* The scan box over the lines */
.gi-lines-card { padding: 0; overflow: hidden; }
.gi-scan { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; padding: 16px 20px; background: var(--page-alt); border-bottom: 1px solid var(--hairline); }
.gi-scan .gi-scan-box { flex: 1 1 20rem; min-width: 0; }
.gi-scan input[type="search"] { width: 100%; min-height: 48px; font-size: 16px; }
.gi-scan .gi-scan-packs, .gi-scan .gi-scan-price { flex: 0 1 8rem; }
.gi-scan input[type="number"], .gi-scan input[type="text"] { min-height: 48px; text-align: right; }
.gi-scan .btn { min-height: 48px; }
.gi-scan .gi-said { flex: 1 1 100%; margin: 0; }
.gi-scan .gi-said:empty { display: none; }
.gi-lines-card > .choices, .gi-lines-card > .gi-page, .gi-lines-card > .hint { margin: 16px 20px; }
.gi-lines-card > .table-wrap { margin: 16px; }
/* The lines */
table.gi-lines th, table.gi-lines td { vertical-align: middle; }
table.gi-lines td.doc-st { padding: 6px 8px; }
table.gi-lines td.num input.short { width: 5.5rem; }
table.gi-lines .gi-upp { display: grid; gap: 2px; margin: 4px 0 0; color: var(--ink-muted); font: 400 12px/16px var(--font); justify-items: end; }
table.gi-lines .gi-findings { color: var(--sf-amber-ink); }
table.gi-lines .gi-acts { white-space: nowrap; text-align: right; }
table.gi-lines tr.gi-row.found > * { background: var(--accent-soft); }
table.gi-lines tr.gi-row:has(+ tr.gi-panel.open) > *, table.gi-lines tr.gi-row:has(+ tr.gi-panel:target) > :not(.doc-st) { background: var(--warn-row); }
/* The problem panel: its own row under its line, closed until asked */
tr.gi-panel { display: none; }
tr.gi-panel:target, tr.gi-panel.open { display: table-row; }
tr.gi-panel > td { height: auto; padding: 4px 16px 18px; background: var(--warn-row); font-weight: 400; }
tbody tr.gi-panel:hover > * { background: var(--warn-row); }
.gi-mini { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.gi-mini input { text-align: right; }
.gi-panel-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 12px 0 0; }
.gi-panel-row > label, .gi-panel-row > .gi-what { flex: 1 1 14rem; margin: 0; }
.gi-panel-row .gi-what { display: flex; gap: 6px; align-items: flex-end; }
.gi-panel-row .gi-what > label { flex: 1 1 auto; }
.gi-panel-row .gi-proof { flex: 2 1 20rem; }
.gi-panel-row .gi-note { flex: 2 1 18rem; margin: 0; }
.gi-panel-row > label.gi-photo { flex: 1 1 14rem; }
.gi-panel-row > label.gi-ok { flex: none; min-height: 44px; }
.gi-panel [hidden] { display: none; }
.gi-overok { margin: 10px 0 0; }
/* Prices and selling (the buying desk), the photos and papers, the note, before it can be booked in */
details.gi-prices { margin: 0 16px 16px; }
details.gi-prices > .muted { margin: 0 0 12px; }
details.gi-prices .table-wrap { margin: 0 0 12px; }
.gi-foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 20px; align-items: start; }
.gi-foot > .card { display: grid; gap: 12px; margin: 0; }
.gi-foot h2 { margin: 0; font: 600 16px/24px var(--font); color: var(--ink); }
.gi-foot h2 label { font: inherit; }
.gi-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.gi-thumb {
  display: grid; align-content: center; gap: 2px; width: 104px; min-height: 72px; padding: 8px; border: 1px solid var(--hairline); border-radius: var(--r-10);
  background: var(--page-alt); color: var(--ink-muted); font: 400 11px/14px var(--font); text-align: center; text-decoration: none; overflow-wrap: anywhere;
}
.gi-thumb .gi-thumb-what { color: var(--ink); font-weight: 600; }
.gi-add { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.gi-add > label { flex: 1 1 12rem; min-width: 0; }
.gi-note-card textarea { width: 100%; min-height: 72px; }
details.gi-ready { margin: 0; }
.doc-bar-note { color: var(--ink-muted); font: 400 13px/20px var(--font); }
@media (max-width: 699.98px) { .doc-bar > .doc-bar-note { flex: 1 1 100%; order: -1; text-align: center; } }
/* A phone: the delivery's bar two rows at most (the coordinator's phone check of 349dc13, GV24): what is left in small words over the
   buttons; "Leave without saving" is in the page head there (.gi-leave beside the crumb), not on a row of its own. */
.crumbs .gi-leave { display: none; }
@media (max-width: 699.98px) { .gi-form .doc-bar > a[data-leave] { display: none; } .crumbs .gi-leave { display: inline-flex; } }
@media (max-width: 699.98px) { .gi-form .doc-bar { row-gap: 4px; padding-top: 8px; } .gi-form .doc-bar > .doc-bar-note { font: 400 12px/16px var(--font); } }
/* A phone: each line a card with its check's colour on the left edge, the check beside the name, big buttons, the panel under it */
@container (max-width: 640px) {
  table.stack.gi-lines tr.gi-row { grid-template-columns: minmax(0, 1fr) auto; border-left: 6px solid var(--t-fill, var(--st-grey)); }
  table.stack.doc-lines.gi-lines tr.gi-row > th.c-head { grid-column: 1; }
  /* The check: its pill at the top right (the cell holds the pill since the redesign, RD8; no fill of its own) */
  table.stack.doc-lines.gi-lines tr.gi-row > td.gi-check { display: inline-flex; align-items: center; justify-content: center; grid-column: 2; grid-row: 1; justify-self: end;
    align-self: start; width: auto; min-width: 0; min-height: 0; padding: 0; white-space: nowrap; }
  table.stack.gi-lines tr.gi-row > td.gi-check::before { content: none; }
  table.stack.doc-lines.gi-lines tr.gi-row > td.num[data-label] { grid-column: 1 / -1; grid-template-columns: minmax(6.5rem, 38%) minmax(0, 1fr); text-align: left; }
  table.stack.doc-lines.gi-lines tr.gi-row > td.num[data-label] > * { grid-column: 2; }
  table.stack.gi-lines td.num input.short { width: 100%; min-height: 48px; font-size: 16px; }
  /* The duty stamp (RD-B5: in the line's answers): its name and its value visible, the answer's colour on the field's left edge (GV23) */
  table.stack.gi-lines .gi-acts > .gi-duty { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(6.5rem, 38%) minmax(0, 1fr); gap: 12px; align-items: center;
    margin: 4px 0; padding: 0; border-radius: 0; background: none; color: var(--ink-body); font: 400 15px/22px var(--font); text-align: left; }
  table.stack.gi-lines .gi-acts > .gi-duty .gi-duty-name { color: var(--ink-muted); }
  table.stack.gi-lines .gi-acts > .gi-duty select { min-height: 48px; padding: 8px 12px; border: 1px solid var(--hairline); border-left: 6px solid var(--t-fill, var(--st-grey));
    border-radius: var(--r-8); background-color: var(--card); color: var(--ink); font: 500 16px/22px var(--font); }
  table.stack.gi-lines .gi-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; grid-column: 1 / -1; }
  table.stack.gi-lines .gi-acts .btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 0 12px;
    font: 600 15px/20px var(--font); }
  table.stack.gi-lines .gi-acts .btn:only-child, table.stack.gi-lines .gi-acts > .gi-why + .btn:last-child { grid-column: 1 / -1; }
  table.stack.gi-lines tr.gi-panel { display: none; }
  table.stack.gi-lines tr.gi-panel:target, table.stack.gi-lines tr.gi-panel.open { display: grid; }
  table.stack.gi-lines tr.gi-panel { margin-top: -10px; border-top: 0; border-radius: 0 0 var(--r-12) var(--r-12); border-left: 6px solid var(--st-amber); background: var(--warn-row); }
  table.stack.gi-lines .gi-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  table.stack.gi-lines .gi-mini input, table.stack.gi-lines .gi-panel-row input, table.stack.gi-lines .gi-panel-row select { min-height: 48px; font-size: 16px; }
  table.stack.gi-lines .gi-panel-row > label.gi-photo { flex: 1 1 100%; }
}
/* What the script has to say in the page instead of a browser dialog (GV11): a red line under a field, in a form, or in a line's row. */
.inline-alert { display: block; margin: 6px 0 0; color: var(--sf-red-ink); font: 600 13px/18px var(--font); }
.inline-alert:empty { display: none; }
table.gi-lines .gi-why { display: block; margin: 0 0 6px; color: var(--sf-red-ink); font: 600 13px/18px var(--font); white-space: normal; text-align: left; }
table.gi-lines .gi-why:empty { display: none; }
@container (max-width: 640px) { table.stack.gi-lines .gi-acts .gi-why { grid-column: 1 / -1; margin: 0; } }
/* ==== end gi-one-page ================================================================================================================ */
/* ==== Approvals › Waiting for you (docs/decisions.md AV1-AV14; the approved mockups AP_Inbox and AP_Phone of 29 Oct 2026) ===========
   One page: the list of every record the person may answer (a card; each kind a group: its dot and name in the kind's colour, its count,
   the link to its own page; each row a link, the open one on the selected tint with the accent's 4 px edge) and, beside it, the open
   record (a card with the kind's colour on a 6 px top edge: its head and status block, the facts as big figures, its lines, then one
   decision: the fields, the main answer, More, and the next record). On a phone the open record comes first and the list after it ("Next
   up"); the facts take three a row, the main answer two thirds of its row. CW's tokens only; the tone classes give the colours. */
.ap-inbox { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.ap-list { flex: 1 1 320px; max-width: 400px; min-width: 0; padding: 0 0 8px; overflow: hidden; }
.ap-group + .ap-group { border-top: 1px solid var(--divider); }
.ap-gh { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; padding: 12px 16px 6px; color: var(--t-fill, var(--st-grey)); font: 700 13px/20px var(--font); }
.ap-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--t-fill, var(--st-grey)); }
.ap-gcount { color: var(--ink-muted); font-weight: 600; }
.ap-gcount::before { content: "· "; content: "· " / ""; }
.ap-all { display: inline-flex; align-items: center; min-height: 32px; margin-left: auto; font: 500 12px/18px var(--font); }
.ap-rows { margin: 0; padding: 0; list-style: none; }
.ap-rows > li { margin: 0; }
.ap-row { display: grid; gap: 2px; min-height: 44px; padding: 10px 16px; border-left: 4px solid transparent; color: var(--ink-body); text-decoration: none; }
.ap-row:hover { background: var(--row-open); color: var(--ink-body); text-decoration: none; }
.ap-row.sel { background: var(--row-selected); border-left-color: var(--accent); }
.ap-t { color: var(--ink); font: 600 13px/18px var(--font); overflow-wrap: anywhere; }
.ap-m { color: var(--ink-muted); font: 400 12px/16px var(--font); overflow-wrap: anywhere; }
.ap-more { margin: 6px 16px 0; color: var(--ink-muted); font: 400 12px/16px var(--font); }
.ap-record { flex: 999 1 460px; min-width: 0; }
.ap-card { display: grid; gap: 16px; border-top: 6px solid var(--t-fill, var(--st-grey)); }
@media (min-width: 1024px) { .ap-card { padding: 24px 28px; } }
.ap-rhead { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ap-rtitle { flex: 1 1 16rem; min-width: 0; }
.ap-kind, .ap-sub { margin: 0; color: var(--ink-muted); font: 400 13px/20px var(--font); }
.ap-card h2 { margin: 2px 0 0; color: var(--ink); font: 700 20px/1.3 var(--font); overflow-wrap: anywhere; }
.ap-card h2 a { color: inherit; }
.ap-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); gap: 12px; margin: 0; }
.ap-fact { min-width: 0; margin: 0; padding: 12px 14px; background: var(--page-alt); border: 1px solid var(--divider); border-radius: var(--r-12); }
.ap-fact dt { color: var(--ink-muted); font: 400 12px/16px var(--font); }
.ap-fact dd { margin: 2px 0 0; color: var(--ink); font: 700 18px/1.3 var(--font); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ap-fact dd.up { color: var(--sf-green-ink); }
.ap-fact dd.down { color: var(--sf-red-ink); }
.ap-line, .ap-links, .ap-notes { margin: 0; }
.ap-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.ap-links a { display: inline-flex; align-items: center; min-height: 32px; font-weight: 500; }
.ap-answer { display: grid; gap: 12px; margin: 0; }
.ap-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(6rem, 8rem); gap: 12px; align-items: start; }
.ap-item { display: grid; gap: 6px; min-width: 0; }
.ap-item > label { color: var(--ink); font: 500 13px/20px var(--font); }
.ap-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ap-next { flex: 1 1 auto; margin: 0; color: var(--ink-muted); font: 400 13px/20px var(--font); text-align: right; }
@media (max-width: 699.98px) {
  .ap-list { flex-basis: 100%; max-width: none; }
  .ap-record { flex-basis: 100%; order: -1; }
  .ap-card { padding: 18px 16px; gap: 14px; }
  .ap-facts { grid-template-columns: repeat(auto-fill, minmax(min(100%, 6.5rem), 1fr)); gap: 8px; }
  .ap-fact { padding: 10px 12px; }
  .ap-fact dd { font-size: 20px; }
  .ap-fields { grid-template-columns: minmax(0, 1fr); }
  .ap-answer input[type="text"], .ap-answer input[type="number"], .ap-answer select { font-size: 16px; }
  .ap-actions > .btn.primary { flex: 2 1 0; min-width: 0; }
  .ap-actions > details.more { flex: 1 1 0; min-width: 0; }
  .ap-actions > details.more > summary { width: 100%; }
  .ap-actions > details.more[open] { flex: 1 1 100%; }
  .ap-next { flex: 1 1 100%; text-align: left; }
}
/* ==== item-stock-first (branch item-stock-first, docs/decisions.md IV1-IV12; the approved design IT_Item and IT_Phone of 29 Oct 2026) ======
   The item page on the shared pieces: the head is .doc-head (the status label and the fact line in .ph-meta, the actions at the head's right
   in .doc-actions with More), the stock card is .doc-progress. Since the redesign of 30 Oct 2026 (RD-A4) one page in sections: no tab row;
   its sections and side cards are in the rd2a block at the end. Here only what the item page adds. */
/* The item's and the matching page's heading are the smaller one of IT_Item and TP_Match (24 px; DC2) */
.item-head .ph-title h1, .match-head .ph-title h1 { font-size: 24px; line-height: 1.3; }
@media (max-width: 699.98px) { .item-head .ph-title h1, .match-head .ph-title h1 { font-size: 22px; } }
.item-head .ph-meta .item-id { color: var(--ink-muted); font: 500 13px/20px var(--font); overflow-wrap: anywhere; }
.item-bar > form { display: inline-flex; margin: 0; }
/* The stock card (the redesign's artboard Item, RD-A4): four figures in one row, two a row on a phone; the line under a figure */
.item-strip > .doc-step { border-left: 1px solid var(--divider); border-top: 0; }
.item-strip > .doc-step:first-of-type { border-left: 0; }
.item-strip .doc-step-big { font-size: 26px; line-height: 1.2; }
.item-strip .doc-step-big.free { color: var(--sf-green-ink); }
.item-strip .step-sub { color: var(--ink-muted); font: 400 13px/18px var(--font); overflow-wrap: anywhere; }
.item-strip .step-sub:empty { display: none; }
@media (min-width: 640px) { .item-strip { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); } }
@media (max-width: 639.98px) {
  .item-strip > .doc-step:nth-of-type(odd) { border-left: 0; }
  .item-strip > .doc-step:nth-of-type(n + 3) { border-top: 1px solid var(--divider); }
  .item-strip > .doc-step:last-of-type:nth-of-type(odd) { grid-column: 1 / -1; }
  .item-strip .doc-step-big { font-size: 22px; }
}
.item-wh { margin: 0 0 24px; }
/* A phone (IT_Phone): the actions are a bar at the bottom of the screen in the tab bar's place, their buttons side by side; More opens upwards */
@media (max-width: 699.98px) {
  .item-head .ph-actions > .item-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px;
    margin: 0; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--hairline);
    box-shadow: var(--shadow-up);
  }
  .item-bar > form, .item-bar > form > .btn, .item-bar > a.btn, .item-bar > details.more, .item-bar > details.more > summary { width: 100%; min-width: 0; }
  .item-bar .btn { padding-left: 8px; padding-right: 8px; white-space: normal; }
  .item-bar > details.more { position: static; }
  .item-bar > details.more > .more-menu {
    position: absolute; top: auto; bottom: calc(100% + 6px); left: var(--gutter); right: var(--gutter); width: auto; min-width: 0; max-width: none; margin: 0;
    max-height: 60vh; overflow-y: auto; box-shadow: var(--shadow-float);
  }
  body:has(.item-bar) .tabbar { display: none; }
  body:has(.item-bar) { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  html:has(.item-bar) { scroll-padding-bottom: 96px; }
}
/* ==== end item-stock-first ================================================================================================================ */
/* ==== w8: stock moves and hand-overs on the approved patterns (wave w8, docs/decisions.md W8; the canvas's TP_Report, PO_View, PI_New) =====
   The stock records, the hand-overs and their customers, repack and reservations are boards, a draft is the one-page form, a saved record the
   record page, and the overview, movements, balances and balance owed are reports, all on the shared pieces above (.doc-group, .doc-board,
   td.doc-st, .doc-head, .doc-actions, .doc-progress, .doc-view, .doc-foot, .doc-totals, .doc-bar, .doc-grid). Here only what they add. */
/* The figures strip of a report or a record (.doc-progress.rp-figs): any number of figures in one row, two a row on a phone; a line under one */
@media (min-width: 640px) { .rp-figs { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); } }
.rp-figs > .doc-step { border-left: 1px solid var(--divider); border-top: 0; }
.rp-figs > .doc-step:first-of-type { border-left: 0; }
.rp-figs .step-sub { margin: 0; color: var(--ink-muted); font: 400 13px/18px var(--font); overflow-wrap: anywhere; }
@media (max-width: 639.98px) {
  .rp-figs > .doc-step:nth-of-type(odd) { border-left: 0; }
  .rp-figs > .doc-step:nth-of-type(n + 3) { border-top: 1px solid var(--divider); }
  .rp-figs > .doc-step:last-of-type:nth-of-type(odd) { grid-column: 1 / -1; }
}
/* The Show row holds more than one choice on a report (the warehouse, the kind, the figure): it wraps rather than push the page sideways */
.toolbar .tb-state { flex-wrap: wrap; }
/* A board row's own small forms stay above the link that opens the row (a.row-link covers the row) */
table.doc-list td.c-next { position: relative; z-index: 2; }
/* A record page's related records (a customer's prices and latest hand-overs, each account's or customer's part of a report): a board under
   its title, the title's link at its right */
.doc-related { margin: 0 0 24px; scroll-margin-top: 16px; }
.doc-related > .board-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.doc-related > .board-head > a, .doc-related > .board-head > .btn { margin-left: auto; }
.doc-related > .board-head a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.doc-related > details.fold { margin: 0 0 12px; }
/* The fields of a create or details form in two columns (one on a phone), also inside a form.record (whose fieldsets otherwise fill) */
form.record fieldset.doc-grid, form.doc-details fieldset.doc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
@media (max-width: 639.98px) { form.record fieldset.doc-grid, form.doc-details fieldset.doc-grid { grid-template-columns: minmax(0, 1fr); padding: 16px; } }
.doc-grid > .field { margin: 0; min-width: 0; }
.doc-grid > fieldset.doc-wide { margin: 0; padding: 12px 16px; }
.doc-grid > .actions { margin: 0; }
form.doc-details { margin: 0 0 20px; }
.doc-act-panel fieldset.doc-grid { padding: 0; border: 0; background: none; }
/* The draft's products: the add box over the board (the lines form as wide as the page), the files after it */
.doc-lines-box { margin: 0 0 20px; }
.doc-lines-box > form.record.stock-lines { max-width: none; }
.doc-lines-box > form.stock-add { margin: 0 0 12px; }
.doc-lines-box .doc-foot { margin: 16px 0 0; }
.doc-files { margin: 0 0 24px; }
.doc-notes form.doc-drop, .doc-files form.doc-drop { max-width: none; }
/* The stock records' and hand-overs' one form (OV): its bar at the bottom is the document bar (Leave first, the note, Save, the main action) */
.actions.sticky.doc-bar {
  z-index: 20; justify-content: flex-end; gap: 8px 12px; margin: 24px calc(-1 * var(--gutter)) 0; border-radius: 0;
  padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--hairline);
}
@media (max-width: 699.98px) { body:has(.tabbar) .actions.sticky.doc-bar { bottom: 0; padding-bottom: calc(12px + env(safe-area-inset-bottom)); } }
@container (max-width: 640px) { .actions.sticky.doc-bar .btn { width: auto; } }
/* ==== end w8 ================================================================================================================================ */
/* ==== w10: the Sales pages on the approved patterns (wave w10, docs/decisions.md W10; the canvas's Main / GI_List, PO_View, TP_Report) =======
   Store orders, Dispatch and Returns are boards, an order is the record page and Sales by Store a report, all on the shared pieces above
   (.doc-group, .doc-board, td.doc-st, .doc-head, .doc-actions, .rp-figs, .doc-view, .doc-related). Here only what they add. */
/* A Show row may hold the days typed (Store orders' From / To, Sales by Store's): each box with its short word, as tall as the row's selects;
   on a phone each takes a share of the row, 44 px high */
.toolbar .tb-state label.tb-day { display: inline-flex; align-items: center; gap: 6px; font: 500 13px/20px var(--font); }
.toolbar .tb-state label.tb-day input[type="date"] { width: auto; min-height: 36px; height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: 13px; }
@media (max-width: 639.98px) {
  .toolbar .tb-state label.tb-day { flex: 1 1 10rem; min-width: 0; }
  .toolbar .tb-state label.tb-day input[type="date"] { flex: 1 1 auto; min-width: 0; height: 44px; min-height: 44px; }
}
/* A card that holds a line instead of a table (an order's unit with no stock change in its history) */
.doc-board > p { margin: 0; padding: 14px 16px; }
/* A phone: a status cell is no filled block any more (RD8): its pill sits in the card's top right like any status, its word for its column
   (Lines to place's "Status") muted like every other label */
/* An order's sold units on a phone (W10.12): the status takes its own width, up to half the card, and wraps inside it; the item has the rest.
   The lines' three equal columns put it in the last third on one line, so a long status lay over a long item name */
@container (max-width: 640px) {
  table.stack.doc-lines.sales-units tr { grid-template-columns: minmax(0, 1fr) fit-content(50%); }
  table.stack.doc-lines.sales-units tr > th.c-head { grid-column: 1; }
  table.stack.doc-lines.sales-units tr > td.c-status { grid-column: 2; white-space: normal; }
}
/* ==== end w10 =============================================================================================================================== */
/* ==== w11: the Products pages on the approved patterns (wave w11, docs/decisions.md W11; the canvas's GI_List, PI_New, PO_View, AP_Inbox) ======
   All Products, the items made by hand, Families, Pack items and Pack links are boards, Add Item the one-page form, a family the record page and
   Barcodes the inbox, all on the shared pieces above (.doc-group, .doc-board, td.doc-st, .doc-head, .doc-actions, .rp-figs, .doc-view, .doc-grid,
   .doc-bar, .ap-*). Here only what they add; no new class. */
/* A one-page form's fold (Add Item's legal and buying details): the fold is the card, its fields' grid sits inside it without a second box */
form.doc-details > details.fold { margin: 0 0 16px; }
form.doc-details > details.fold > fieldset.doc-grid { margin: 0; padding: 0 0 4px; border: 0; background: none; }
/* The inbox's decision (Barcodes): its answers sit in the record's card without a box of their own */
.ap-answer > fieldset { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; background: none; }
.ap-answer > fieldset > legend { padding: 0 0 4px; font: 600 13px/20px var(--font); }
/* ==== end w11 =============================================================================================================================== */
/* ==== w13: reports, settings and system on the approved patterns (wave w13, docs/decisions.md W13; the canvas's TP_Report, TP_Settings) =====
   The five reports and the audit log are TP_Report (the head's Download, the figures strip, the toolbar, one board with its blue edge) on the
   shared pieces above (.doc-head, .doc-actions, .rp-figs, .toolbar, .doc-board, its total row tr.grp-foot); Settings' pages are TP_Settings: the sidebar
   holds the section's pages (DC28), each page a column of cards, a card a heading over rows, a row what it is at the left and its value or
   its own small form at the right, each saved on its own. Here only what they add. */
/* A share of the whole on a report's board (TP_Report's bar): 8 px, rounded, the board's blue on the divider's grey; its percent beside it */
meter.rp-share { width: 120px; max-width: 40vw; height: 8px; vertical-align: middle; border: 0; border-radius: var(--r-pill); background: var(--divider); }
meter.rp-share::-webkit-meter-bar { height: 8px; border: 0; border-radius: var(--r-pill); background: var(--divider); }
meter.rp-share::-webkit-meter-optimum-value, meter.rp-share::-webkit-meter-suboptimum-value,
meter.rp-share::-webkit-meter-even-less-good-value { border-radius: var(--r-pill); background: var(--st-blue); }
meter.rp-share::-moz-meter-bar { border-radius: var(--r-pill); background: var(--st-blue); }
table.doc-list .c-share { white-space: nowrap; }
/* Settings (TP_Settings): the column of cards, 16 px apart */
.set-list { display: flex; flex-direction: column; gap: 16px; margin: 0 0 24px; }
.set-card { margin: 0; overflow: hidden; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-14); scroll-margin-top: 16px; }
.set-card > h2, .set-card > .set-head { margin: 0; padding: 14px 20px 6px; color: var(--ink); font: 700 16px/24px var(--font); }
.set-card > .set-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.set-card > .set-head > h2 { margin: 0; font: inherit; color: inherit; }
.set-card > .set-head > .set-head-end { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
/* A row: what it is at the left (its name, a 13 px line of what it does, who changed it last), its value or its small form at the right */
.set-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin: 0; padding: 14px 20px; border-top: 1px solid var(--divider); max-width: none; }
.set-card > h2 + .set-row, .set-card > .set-head + .set-row, .set-card > .set-row:first-child { border-top: 0; }
.set-k { flex: 1 1 280px; min-width: 0; }
.set-kt { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
a.set-kt { display: inline-block; text-decoration: none; }
a.set-kt:hover { color: var(--accent-hover); text-decoration: underline; }
.set-kd, .set-kh { margin: 2px 0 0; color: var(--ink-muted); font: 400 13px/18px var(--font); overflow-wrap: anywhere; }
.set-kd .tag + .tag { margin-left: 4px; }
.set-v { flex: 0 1 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.set-v .set-val { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.set-v input.set-in { width: 90px; text-align: right; font-variant-numeric: tabular-nums; }
.set-v input.set-in.wide { width: 220px; text-align: left; }
.set-v input[type="date"], .set-v select { width: auto; }
.set-v input.set-why { width: 160px; }
.set-row.unused .set-kt, .set-row.unused .set-val { color: var(--ink-muted); }
.set-row.unused .unused-note { display: block; color: var(--ink-body); font-weight: 600; }
/* A row whose change has several fields: its Change sits at the row's right like a Save; open, its fold takes the card's width under the
   row (an approval rule, a reason's uses, a warehouse's place) */
.set-row > details.set-fold { flex: 0 1 auto; margin: 0 0 0 auto; }
/* Closed, only Change shows: the button is the one frame, the card look of every details would draw a second round it */
.set-row > details.set-fold:not([open]) { padding: 0; border: 0; background: none; }
.set-row > details.set-fold[open] { flex: 1 1 100%; margin: 0; }
.set-row > details.set-fold > summary { display: inline-flex; list-style: none; }
.set-row > details.set-fold > summary::-webkit-details-marker { display: none; }
.set-row > details.set-fold > form.record, .set-row > details.set-fold > .set-fold-body { margin: 12px 0 0; max-width: 820px; }
.set-row > details.set-fold > form.record + form.record { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--divider); }
/* A record's facts as rows (a reason, a warehouse, a person's page on the shell): the label at the left, the value at the right */
.set-row.set-fact { padding-top: 10px; padding-bottom: 10px; }
.set-row.set-fact > .set-k { flex-basis: 200px; }
.set-row.set-fact > .set-v { flex: 1 1 280px; justify-content: flex-start; font-weight: 400; }
/* A card holding a board (the history, the places): the board sits inside the card without a second box */
.set-card > .table-wrap { margin: 0; border: 0; border-radius: 0; }
.set-card > .set-body { padding: 4px 20px 16px; }
.set-card > p { margin: 0; padding: 0 20px 14px; }
.set-card > p.set-intro { padding-top: 0; }
.set-foot { margin: 0; color: var(--ink-muted); font: 400 13px/18px var(--font); }
@container (max-width: 640px) {
  .set-row { padding: 12px 16px; }
  .set-card > h2, .set-card > .set-head { padding: 12px 16px 4px; }
  .set-v { flex: 1 1 100%; justify-content: flex-start; }
  .set-v input.set-why { flex: 1 1 10rem; width: auto; }
  .set-v input.set-in.wide { flex: 1 1 12rem; width: auto; }
}
/* ==== end w13 =============================================================================================================================== */
/* ==== w12: the Matching pages on the approved patterns (wave w12, docs/decisions.md W12; the canvas's TP_Match, GI_List, AP_Inbox, TP_Parts) ======
   A store product's decision page is TP_Match: the question in the head with the bar at its right; the store product's card (blue 6 px top edge)
   beside the item's (green), each its photo block, its name and its short line, the facts in two columns (what agrees on the green tint, what
   differs on the amber one); then the units and the note in one card; then the bar at the bottom: Skip and More on the left, Not the same and
   Same item on the right (on a phone the two answers share a row). Its More opens upwards and holds the rest of the page as folds. The lists
   are the shared boards and inboxes; here only what the decision page adds. */
.mt-progress { display: block; width: 220px; max-width: 100%; height: 8px; border-radius: var(--r-pill); background: var(--hairline); overflow: hidden; }
.mt-fill { display: block; height: 100%; background: var(--accent); }
.ph-actions > ol.mt-blocks { width: 260px; max-width: 100%; margin: 0; }
.mt-form { display: flex; flex-direction: column; gap: 20px; }
.mt-cards { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.mt-card { flex: 1 1 380px; min-width: 0; display: grid; gap: 14px; align-content: start; margin: 0; border-top: 6px solid var(--t-fill); }
@media (min-width: 1024px) { .mt-card { padding: 20px 22px; } }
.card > h2.mt-h, .mt-h { margin: 0; color: var(--ink-muted); font: 700 13px/20px var(--font); letter-spacing: .06em; text-transform: uppercase; }
.mt-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.mt-others > summary { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink-muted); font: 400 13px/20px var(--font); cursor: pointer; }
.mt-others[open] { flex: 1 1 100%; }
.mt-others[open] > summary { color: var(--accent-hover); }
.mt-who { display: flex; gap: 14px; align-items: flex-start; }
.mt-photo { flex: none; display: grid; place-items: center; width: 96px; height: 96px; border-radius: var(--r-12); background: var(--page); color: var(--ink-muted);
  font: 400 11px/14px var(--font); text-align: center; }
.mt-id { min-width: 0; }
.mt-name { margin: 0; color: var(--ink); font: 700 17px/1.35 var(--font); overflow-wrap: anywhere; }
.mt-name a { color: inherit; }
.mt-sub { margin: 2px 0 0; color: var(--ink-muted); font: 400 13px/20px var(--font); }
.mt-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.mt-facts dt { margin: 0; color: var(--ink-muted); }
.mt-facts dd { margin: 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.mt-mark { padding: 0 6px; border-radius: var(--r-8); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.mt-mark.same { background: var(--sf-green); }
.mt-mark.diff { background: var(--sf-amber); color: var(--sf-amber-ink); font-weight: 700; }
.mt-find { margin: 0; }
.mt-answer { display: grid; gap: 10px; margin: 0; }
.mt-answer:has(> .mt-units) { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-start; padding: 16px 22px; }
.mt-answer > p { margin: 0; }
.mt-note { flex: 1 1 280px; }
.mt-units-row { display: flex; align-items: center; gap: 8px; }
.mt-units-row > input.units { width: 80px; text-align: right; }
form.mt-form > button.po-default { display: none; }
/* The bar: Skip and More on the left, the answers on the right; its menus open upwards, wide enough for the new item's fields. They are
   placed against the bar, not their button (W12.18: at 800 px with the sidebar More's menu began after Skip and ran off the screen): More's
   from the bar's left gutter, Not the same's from its right, never wider than the bar inside its gutters. */
.mt-bar > a.btn.ghost { margin-right: 0; }
.mt-bar > details.more:first-of-type { margin-right: auto; }
.mt-bar > form { margin: 0; }
.mt-bar > details.more { position: static; }
.mt-bar details.more > .more-menu { left: var(--gutter); right: auto; width: min(36rem, calc(100% - 2 * var(--gutter))); max-width: calc(100% - 2 * var(--gutter)); }
.mt-bar > details.mt-step > .more-menu { left: auto; right: var(--gutter); }
/* (on a phone the menus are in the flow under their button, as every menu there: the width of the row) */
@media (max-width: 639.98px) { .mt-bar details.more > .more-menu { width: auto; max-width: none; } }
.mt-bar > details.mt-step > summary::after { content: none; }
.mt-bar .more-menu .doc-act-panel fieldset.doc-grid { margin: 0; padding: 0; border: 0; background: none; }
.mt-bar .more-menu .doc-act-panel > :last-child, .mt-bar .more-menu .doc-act-panel dl > :last-child { margin-bottom: 0; }
@media (max-width: 699.98px) {
  .mt-who { gap: 12px; }
  .mt-photo { width: 64px; height: 64px; }
  .mt-answer:has(> .mt-units) { padding: 16px; }
  .mt-units, .mt-note { flex: 1 1 100%; }
  .mt-bar > a.btn.ghost { flex: 1 1 0; order: 0; }
  .mt-bar > details.more:first-of-type { flex: 1 1 0; min-width: 0; margin-right: 0; }
  .mt-bar > details.more > summary { width: 100%; }
  .mt-bar > details.more[open] { flex: 1 1 100%; }
  .mt-bar > details.mt-step, .mt-bar > form { flex: 1 1 0; min-width: 0; }
  .mt-bar > form > .btn { width: 100%; }
  .mt-bar > .btn-why { flex: 1 1 100%; order: -1; text-align: center; }
}
/* ==== end w12 =============================================================================================================================== */
/* ==== rd2b: the Purchases and Sales pages on the approved redesign of 30 Oct 2026 (docs/decisions.md RD-B) ================================
   The lists are on the shared list style (group dot, table card, status pill). Here only what the purchase order's page (PurchaseOrder.dc.html)
   and the delivery's page (GoodsReceived.dc.html) add: the order's progress steps, its paper's three blocks, the lines' received figure and
   what is still to come, the Related and History cards. */
.po-steps { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.po-step { display: flex; gap: 12px; align-items: center; min-width: 0; padding: 14px 16px; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-14); }
.po-step.done { background: var(--sf-green); border-color: var(--done-line); }
.po-step.now { background: var(--sf-amber); border-color: var(--amber-edge); }
.po-step-mark { flex: none; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: var(--r-pill); background: var(--sf-grey); color: var(--ink-body); font: 700 13px/1 var(--font); }
.po-step.done .po-step-mark { background: var(--st-green); color: #ffffff; }
.po-step.now .po-step-mark { background: var(--st-amber); color: #ffffff; }
.po-step-text { min-width: 0; }
.po-step-name { display: block; color: var(--ink); font: 600 14px/20px var(--font); }
.po-step-sub { color: var(--ink-muted); font-size: 12px; line-height: 16px; }
.po-step.done .po-step-sub { color: var(--sf-green-ink); }
.po-step.now .po-step-sub { color: var(--sf-amber-ink); }
@media (max-width: 639.98px) { .po-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.doc-view.po-paper { display: grid; gap: 22px; padding: 28px 32px; border-radius: var(--r-16); }
.po-paper-head { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.po-paper-head .doc-party p { font-size: 13px; }
.po-paper-head .doc-party .doc-party-name { font: 600 15px/22px var(--font); }
.po-paper-head .doc-party .doc-party-name a { color: var(--ink); }
.po-dates { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; align-content: start; font-size: 13px; }
.po-dates dt { color: var(--ink-muted); }
.po-dates dd { margin: 0; color: var(--ink); font-weight: 600; }
@media (max-width: 899.98px) { .po-paper-head { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639.98px) { .doc-view.po-paper { padding: 16px; } .po-paper-head { grid-template-columns: minmax(0, 1fr); } }
.po-paper .table-wrap { border: 1px solid var(--divider); }
.po-paper table.po-lines thead th { background: var(--page-alt); color: var(--ink-muted); font: 600 12px/16px var(--font); }
.po-paper table.po-lines .o-name { color: var(--ink); font-weight: 600; }
.po-got { font-weight: 600; }
.po-got.done { color: var(--sf-green-ink); }
.po-got.part { color: var(--sf-amber-ink); }
.po-paper .doc-foot .doc-notes p { margin: 0; }
.po-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 0 0 24px; }
@media (max-width: 899.98px) { .po-cards { grid-template-columns: minmax(0, 1fr); } }
.po-cards > .card { margin: 0; padding: 18px 20px; border-radius: var(--r-16); min-width: 0; }
.po-cards h2 { margin: 0 0 12px; font: 700 16px/24px var(--font); color: var(--ink); }
.po-cards .head-help { margin: 0 0 12px; }
.po-cards .head-help h2 { margin: 0; }
.po-rel-list, .po-events, .po-cards .checks-history { margin: 0; padding: 0; list-style: none; }
.po-rel-list > li > a, .po-rel-list > li > .po-rel-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; min-height: 44px; padding: 10px 0; border-top: 1px solid var(--divider); color: var(--ink); text-decoration: none; }
.po-rel-list > li > a:hover .po-rel-text { color: var(--accent-hover); }
.po-rel-text { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.po-rel-text .o-sub { display: block; font-weight: 400; }
.po-events > li { padding: 8px 0; border-top: 1px solid var(--divider); font-size: 13px; }
.po-events strong { color: var(--ink); }
.po-cards .checks-history > li { padding: 8px 0; border-top: 1px solid var(--divider); font-size: 13px; }
.po-cards .checks-history p { margin: 0; }
.po-cards h3.doc-label { margin: 16px 0 4px; }
/* The delivery's page (GoodsReceived.dc.html, RD-B5): the line's answers after its check pill: the duty stamp a select in a small pill of its
   answer's colour (app.js colours it), then "All fine" and "Problem"; "Leave without saving" above the head on a phone only (the crumb). */
table.gi-lines td.gi-acts { white-space: normal; }
table.gi-lines .gi-duty { display: inline-flex; align-items: center; gap: 6px; margin: 2px 8px 2px 0; padding: 2px 4px 2px 10px; border-radius: var(--r-pill);
  background: var(--t-soft, var(--sf-grey)); color: var(--t-ink, var(--sf-grey-ink)); font: 600 12px/16px var(--font); white-space: nowrap; vertical-align: middle; }
table.gi-lines .gi-duty select { min-height: 32px; padding: 2px 6px; border: 1px solid var(--hairline); border-radius: var(--r-8); background-color: var(--card); color: var(--ink);
  font: 500 13px/18px var(--font); }
table.gi-lines td.gi-items .o-sub { display: block; }
@media (min-width: 700px) { p.crumbs.gi-crumbs { display: none; } }
/* Sales orders' More (RD-B3): the old Show row's period links, state, way in and days (the row's Show button sends them). */
.sales-more > label { display: grid; gap: 4px; margin: 0; padding: 6px 12px; }
/* ==== end rd2b ============================================================================================================================== */
/* ==== rd2c: redesign step 2, part C (branch redesign-rd2c; the approved canvas of 30 Oct 2026: Listings, ByItem, Reports, Approvals, Settings,
   Main; docs/decisions.md RD-C1-RD-C14). Page-scoped: only the six pages of part C use these classes. ======================================= */
/* Check a match (Listings): the question and "<store> · N left to check" under it; ONE comparison card: a 150 px label column, the store
   product's column (its blue dot), our item's column (its green dot), a 44 px column for the mark; a row per fact, a green tick when the two
   sides are the same, an amber ! when they differ (that row on the amber's lightest tint); then the find box and the units side by side. */
.match-head .ph-meta { margin: 4px 0 0; color: var(--ink-muted); font-size: 14px; }
.mt-form { max-width: 900px; width: 100%; margin: 0 auto; }
section.card.mt-compare { padding: 0; overflow: hidden; border-radius: var(--r-16); }
.mt-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr) 44px; border-top: 1px solid #f7f3f9; background: var(--card); }
.mt-row.mt-heads { border-top: 0; border-bottom: 1px solid var(--divider); }
.mt-row.mt-fact.diff { background: #fffaf1; }
.mt-side { padding: 18px 16px; min-width: 0; }
.mt-side.mt-item, .mt-v.mt-item { border-left: 1px solid var(--divider); }
.mt-side .mt-h { display: flex; align-items: center; gap: 6px; margin: 0; font: 600 12px/18px var(--font); letter-spacing: .02em; text-transform: uppercase; }
.mt-side.mt-store .mt-h { color: var(--sf-blue-ink); }
.mt-side.mt-item .mt-h { color: var(--sf-green-ink); }
.mt-dot { flex: none; width: 8px; height: 8px; border-radius: var(--r-pill); }
.mt-store .mt-dot { background: var(--st-blue); }
.mt-item .mt-dot { background: var(--st-green); }
.mt-side .mt-name { margin: 6px 0 0; color: var(--ink); font: 600 15px/1.4 var(--font); overflow-wrap: anywhere; }
.mt-side .mt-name a { color: var(--ink); }
.mt-side .mt-sub { margin: 2px 0 0; color: var(--ink-muted); font: 400 12px/18px var(--font); }
.mt-side .mt-facts { margin-top: 8px; font-size: 13px; }
.mt-k { padding: 12px 16px; color: var(--ink-muted); font-size: 13px; }
.mt-v { padding: 12px 16px; color: var(--ink); font-size: 14px; overflow-wrap: anywhere; min-width: 0; }
.mt-m { display: flex; align-items: center; justify-content: center; }
.mt-row .mt-mark { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border-radius: var(--r-pill);
  color: var(--on-fill); font: 700 12px/1 var(--font); }
.mt-row .mt-mark.same { background: var(--st-green); }
.mt-row .mt-mark.diff { background: var(--st-amber); color: var(--on-fill); font-size: 13px; }
/* "Not this one? Find another item" and "1 sale on the store is N of our item": one row, the search taking the room */
.mt-pick { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.mt-pick > .mt-find { flex: 1 1 300px; margin: 0; }
.mt-pick > .mt-units { flex: 0 1 auto; margin: 0; }
.mt-pick label { display: block; margin-bottom: 6px; color: var(--ink); font: 600 13px/18px var(--font); }
.mt-pick input[type="search"] { width: 100%; height: 44px; }
.mt-pick .mt-units-row > input.units { width: 64px; height: 44px; text-align: center; }
.mt-form > .mt-none, .mt-form > .mt-found, .mt-form > .mt-others { margin: 0; }
/* The bar (the artboard's): Skip at the left, then More, Not the same and Same item at the right */
.mt-bar > a.btn.ghost { margin-right: auto; }
.mt-bar > details.more:first-of-type { margin-right: 0; }
.mt-bar .more-menu > .mt-note { margin: 0; padding: 10px 14px; }
@media (max-width: 699.98px) {
  .mt-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px; }
  .mt-row > .mt-k { grid-column: 1 / -1; padding: 10px 12px 0; }
  .mt-row.mt-heads > .mt-k { display: none; }
  .mt-side { padding: 14px 12px; }
  .mt-v { padding: 4px 12px 10px; }
  .mt-pick > .mt-units { flex: 1 1 100%; }
}
/* Product matching (ByItem): the title's line; the two tabs (the shared tab look; the New tab's count always the accent's bubble); the search
   on its own row and the filter row under it (the selects 40 px, Clear filters a link); ONE white card (16 px corners), a row per item: its
   name and line at the left, a chip per store at the right (34 px: green with a tick where matched, a dashed "+ Store" to open the match, amber
   while a second OK is awaited); the New tab's rows: the name and its line, the likely match as a small pill, Match. */
.bi-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bi-tabs { margin: 0; }
.bi-tabs > .tab > .count { background: var(--accent); color: var(--on-fill); }
/* The search, the match status and its Show button on one row, as the other lists' toolbars; they wrap on a phone (the fix round, RD-F10) */
form.bi-find { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
form.bi-find > input[type="search"] { flex: 1 1 280px; min-width: 0; height: 44px; border: 1px solid #d9d0e1; border-radius: var(--r-10); padding: 0 14px; font: inherit; font-size: 14px; background: var(--card); }
form.bi-find > .bi-filters { flex: none; max-width: 100%; }
.bi-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bi-filters select { height: 44px; max-width: 100%; border: 1px solid #d9d0e1; border-radius: var(--r-10); padding: 0 10px; font: inherit; font-size: 14px; background: var(--card); color: var(--ink); }
.bi-clear { margin-left: 4px; font-size: 13px; font-weight: 600; text-decoration: none; }
section.card.bi-list { padding: 0; overflow: hidden; border-radius: var(--r-16); }
.bi-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 16px 20px; border-top: 1px solid var(--page); }
.bi-row:first-child, .bi-pickall + .bi-row { border-top: 0; }
.bi-row.here { background: var(--row-selected); }
.bi-row.picked { background: var(--row-selected); }
.bi-pickall { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-bottom: 1px solid var(--page); font-size: 13px; }
.bi-pick { flex: none; }
.bi-item { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; }
.bi-item > .o-name { display: block; color: var(--ink); font: 500 15px/1.4 var(--font); text-decoration: none; overflow-wrap: anywhere; }
.bi-item > a.o-name:hover { text-decoration: underline; }
.bi-item > .o-sub { color: var(--ink-muted); font-size: 12px; }
.bi-stores { display: flex; flex-wrap: wrap; gap: 8px; }
.bi-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: var(--r-pill); font: 600 13px/18px var(--font);
  text-decoration: none; white-space: nowrap; cursor: pointer; }
.bi-chip.on { background: var(--sf-green); color: var(--sf-green-ink); }
.bi-chip.on > .ico { width: 14px; height: 14px; }
.bi-chip.on.hold { background: var(--sf-amber); color: var(--sf-amber-ink); }
.bi-chip.wait { background: var(--sf-amber); color: var(--sf-amber-ink); }
.bi-chip.open { border: 1px dashed #c8bcd3; color: var(--ink-muted); font-weight: 500; background: transparent; }
.bi-chip.open:hover { border-color: var(--accent); color: var(--accent-hover); }
.bi-chip.off { cursor: default; }
.bi-chip.off:hover { border-color: #c8bcd3; color: var(--ink-muted); }
a.bi-chip:hover { text-decoration: none; }
details.bi-quick { position: relative; display: inline-block; }
details.bi-quick > summary { list-style: none; }
details.bi-quick > summary::-webkit-details-marker { display: none; }
details.bi-quick[open] { flex: 1 1 100%; display: block; }
details.bi-quick[open] > summary { border-style: solid; border-color: var(--accent); color: var(--accent-hover); }
details.bi-quick[open] > .qp-search { display: flex; gap: 8px; margin-top: 10px; }
.bi-row > a.btn { min-height: 38px; }
@media (max-width: 699.98px) {
  .bi-row { padding: 14px 16px; }
  .bi-chip { min-height: 44px; }
  .bi-hint { white-space: normal; }
}
/* The standard report layout (Reports): "‹ All reports" over the title, Export at the right; the options in one white card (12 px corners), each
   label above its field (40 px), Run report the magenta button; the report itself a white card: its centred head (the company 13 px muted, the
   report's name 17 px, its line 13 px muted), a plain table (a 12 px muted head on the quiet fill, 14 px rows, a group's heading row on the
   quiet fill, its rows indented, its total row semi-bold, the report's Total under a 2 px ink rule); "All reports" in three columns. */
.rp-head .ph-title h1 { font-size: 24px; }
form.card.rp-options { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin: 0; padding: 14px 16px; border-radius: var(--r-12); }
.rp-opt { display: flex; flex-direction: column; min-width: 0; }
.rp-opt > label { display: block; margin-bottom: 4px; color: var(--ink-muted); font-size: 12px; }
.rp-opt input, .rp-opt select { height: 40px; border: 1px solid #d9d0e1; border-radius: var(--r-10); padding: 0 12px; font: inherit; font-size: 14px; background: var(--card); }
.rp-opt.rp-find { flex: 1 1 220px; }
.rp-opt.rp-find > input { width: 100%; }
.rp-check { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-size: 14px; }
form.rp-options > .btn.primary { height: 40px; }
.rp-clear { align-self: center; font-size: 13px; font-weight: 600; text-decoration: none; }
article.card.rp-paper { padding: 0; overflow: hidden; border-radius: var(--r-12); }
.rp-paper-head { padding: 22px 16px 16px; border-bottom: 1px solid var(--divider); text-align: center; }
.rp-paper-head > p { margin: 0; }
.rp-co { color: var(--ink-muted); font-size: 13px; }
.rp-name { margin-top: 4px !important; color: var(--ink); font: 600 17px/1.4 var(--font); }
.rp-line { margin-top: 2px !important; color: var(--ink-muted); font-size: 13px; }
table.rp-table { width: 100%; border-collapse: collapse; font-size: 14px; border: 0; border-radius: 0; }
table.rp-table + table.rp-table, .rp-paper > .table-wrap + .table-wrap { border-top: 1px solid var(--hairline); }
.rp-paper > .table-wrap { border: 0; border-radius: 0; box-shadow: none; }
table.rp-table thead tr { background: var(--page-alt); }
table.rp-table th, table.rp-table td { padding: 10px 16px; text-align: left; vertical-align: top; border: 0; background: none; }
table.rp-table thead th { color: var(--ink-muted); font-size: 12px; font-weight: 600; }
table.rp-table tbody th { color: var(--ink); font-weight: 400; }
table.rp-table tbody tr { border-top: 1px solid var(--divider); }
table.rp-table .num { text-align: right; font-variant-numeric: tabular-nums; }
table.rp-table .o-sub { display: block; color: var(--ink-muted); font-size: 12px; }
table.rp-table tr.rp-group { border-top: 1px solid var(--hairline); background: var(--page-alt); }
table.rp-table tr.rp-group > th { color: var(--ink); font-size: 13px; font-weight: 600; }
table.rp-table .rp-gnote { font-weight: 400; }
table.rp-table .rp-in { padding-left: 28px; }
table.rp-table tr.rp-gtotal { border-top: 1px solid var(--hairline); }
table.rp-table tr.rp-gtotal > * { color: var(--ink); font-weight: 600; }
table.rp-table tr.rp-total { border-top: 2px solid var(--ink); }
table.rp-table tr.rp-total > * { padding-top: 12px; padding-bottom: 12px; color: var(--ink); font-weight: 700; }
table.rp-table tr.off > * { color: var(--ink-muted); }
section.card.rp-all { padding: 16px 20px; border-radius: var(--r-12); }
section.card.rp-all > h2 { margin: 0 0 10px; color: var(--ink); font: 600 15px/1.4 var(--font); }
.rp-all-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; font-size: 14px; }
.rp-all-label { margin: 0 0 6px; color: var(--ink-muted); font: 600 12px/18px var(--font); letter-spacing: .06em; text-transform: uppercase; }
.rp-all-link { display: block; padding: 3px 0; text-decoration: none; }
.rp-all-link[aria-current] { color: var(--ink); font-weight: 600; }
@media (max-width: 699.98px) {
  .rp-all-groups { grid-template-columns: minmax(0, 1fr); }
  .rp-opt { flex: 1 1 100%; }
  .rp-opt input, .rp-opt select { height: 44px; width: 100%; }
  form.rp-options > .btn.primary { height: 44px; flex: 1 1 100%; }
}
/* Approvals (the inbox): the Show at the heading's right (its label, the select, its button, 40 px); the list card and the record card with
   16 px corners; a group's heading 14 px bold in its colour with its dot; a row 12 by 18 px, the open one on the purple tint with the kind's
   4 px bar; the record's figures as four tiles (the first in the kind's tint, a rise on the green tint); the note's label above it; "Next: …"
   at the left of the answers. Scoped to the inbox page (.rd-inbox): the other inboxes keep their look. */
form.ap-show { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
form.ap-show select { height: 40px; }
form.ap-show .btn { min-height: 40px; }
.rd-inbox .ap-list { max-width: 380px; border-radius: var(--r-16); padding: 0; }
.rd-inbox .ap-gh { padding: 14px 18px 10px; font-size: 14px; }
.rd-inbox .ap-row { padding: 12px 18px; border-left: 0; border-top: 1px solid var(--divider); }
.rd-inbox .ap-row.sel { background: #f7f3fd; box-shadow: inset 4px 0 0 var(--t-fill, var(--accent)); }
.rd-inbox .ap-group .ap-row.sel { box-shadow: inset 4px 0 0 var(--t-fill, var(--accent)); }
.rd-inbox .ap-t { font-size: 14px; }
.rd-inbox .ap-card { border-radius: var(--r-16); gap: 18px; }
.rd-inbox .ap-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rd-inbox .ap-fact { border-radius: var(--r-12); }
.rd-inbox .ap-fact:first-child { background: var(--t-soft, var(--sf-purple)); border-color: transparent; }
.rd-inbox .ap-fact:first-child dt { color: var(--t-ink, var(--sf-purple-ink)); }
.rd-inbox .ap-fact:has(> dd.up) { background: var(--sf-green); border-color: transparent; }
.rd-inbox .ap-fact:has(> dd.up) dt, .rd-inbox .ap-fact > dd.up { color: var(--sf-green-ink); }
.rd-inbox .ap-fact dd { font-size: 22px; }
.rd-inbox .ap-answer label { display: grid; gap: 6px; color: var(--ink); font: 600 13px/18px var(--font); }
.rd-inbox .ap-answer input[type="text"] { width: 100%; height: 44px; }
.rd-inbox .ap-actions { padding-top: 4px; border-top: 1px solid var(--divider); }
.rd-inbox .ap-actions > * { margin-top: 12px; }
.rd-inbox .ap-next { flex: 1 1 12rem; text-align: left; }
@media (max-width: 699.98px) {
  .rd-inbox .ap-list { max-width: none; }
  .rd-inbox .ap-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  form.ap-show select { height: 44px; }
}
/* Settings (one settings shell): the section list at the left (a white card, 230 px, 16 px corners; each section 10 by 12 px, the one shown on the
   grey tint, semi-bold), the page's cards at the right; each card's heading on the quiet fill in its topic's colour (teal, amber, blue, purple,
   magenta, green in turn); a row's value box 80 px, its unit, its Why 150 px and Save, 40 px. On a phone the list is a row over the page. */
.set-shell { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.set-nav { flex: 0 1 230px; display: flex; flex-direction: column; gap: 2px; padding: 10px; background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--r-16); }
.set-nav-item { display: block; padding: 10px 12px; border-radius: var(--r-10); color: var(--ink-body); font: 500 14px/20px var(--font); text-decoration: none; }
a.set-nav-item[href]:hover { background: var(--row-open); color: var(--ink); text-decoration: none; }
.set-nav-item[aria-current] { background: var(--sf-grey); color: var(--ink); font-weight: 600; }
.set-main { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.set-main > * { margin-top: 0; margin-bottom: 0; }
.set-main .set-list { gap: 16px; }
.set-main .set-card { border-radius: var(--r-16); }
.set-main .set-card > h2:first-child { margin: 0; padding: 14px 20px; background: var(--page-alt); font: 700 15px/1.4 var(--font); color: #0f7a72; }
.set-main .set-card:nth-of-type(6n+2) > h2:first-child { color: var(--st-amber); }
.set-main .set-card:nth-of-type(6n+3) > h2:first-child { color: var(--st-blue); }
.set-main .set-card:nth-of-type(6n+4) > h2:first-child { color: var(--st-purple); }
.set-main .set-card:nth-of-type(6n+5) > h2:first-child { color: var(--accent); }
.set-main .set-card:nth-of-type(6n) > h2:first-child { color: var(--st-green); }
.set-main .set-v input.set-in:not(.wide) { width: 80px; height: 40px; text-align: right; }
.set-main .set-v input.set-why { width: 150px; height: 40px; }
@media (max-width: 699.98px) {
  .set-nav { flex: 1 1 100%; flex-direction: row; overflow-x: auto; overscroll-behavior-x: contain; }
  .set-nav-item { flex: none; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
  .set-main { flex-basis: 100%; }
}
/* Home (Main): 1100 px wide; Receive a delivery and + New purchase order beside the greeting; four tinted figure tiles (16 px corners, the icon on
   a 34 px square in the tile's colour, the label 13 px, the figure 26 px bold, the line 12 px in the tile's darker colour); under them "Waiting
   for you" over two thirds (its count, Open Approvals at the right; each row a link: the number on a 44 px square in the task's colour, the
   name and its line, the action in the dark accent with "›") and the Stores and Today cards in the last third. A phone (Phone artboard): the
   greeting and "Waiting for you" only. */
body:has(.hm-grid) .page { max-width: calc(1100px / var(--zoom)); }
.hm-actions { display: flex; flex-wrap: wrap; gap: 10px; }
section.hm-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 24px; padding: 0; overflow: visible; background: none; border: 0; }
.hm-tile { display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 16px; border-radius: var(--r-16); border: 1px solid; text-decoration: none; color: var(--ink-body); }
.hm-tile:hover { text-decoration: none; filter: brightness(.98); }
.hm-tile-ico { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-bottom: 4px; border-radius: var(--r-10); color: var(--on-fill); }
.hm-tile .hm-fig-t { color: var(--ink-body); font: 500 13px/18px var(--font); }
.hm-tile .hm-fig-n { color: var(--ink); font: 700 26px/1.1 var(--font); }
.hm-tile-sub { font-size: 12px; }
.hm-tile.hm-blue { background: var(--sf-blue); border-color: #cdd9f3; }
.hm-tile.hm-blue .hm-tile-ico { background: var(--st-blue); }
.hm-tile.hm-blue .hm-tile-sub { color: var(--sf-blue-ink); }
.hm-tile.hm-purple { background: var(--sf-purple); border-color: #dcd0f5; }
.hm-tile.hm-purple .hm-tile-ico { background: var(--st-purple); }
.hm-tile.hm-purple .hm-tile-sub { color: var(--sf-purple-ink); }
.hm-tile.hm-magenta { background: var(--accent-soft); border-color: var(--accent-line); }
.hm-tile.hm-magenta .hm-tile-ico { background: var(--accent); }
.hm-tile.hm-magenta .hm-tile-sub { color: var(--accent-hover); }
.hm-tile.hm-grey { background: var(--sf-grey); border-color: var(--hairline); }
.hm-tile.hm-grey .hm-tile-ico { background: var(--st-grey); }
.hm-tile.hm-grey .hm-tile-sub { color: var(--ink-body); }
.hm-tile.hm-teal { background: var(--sf-teal); border-color: #bfe4df; }
.hm-tile.hm-teal .hm-tile-ico { background: var(--st-teal); }
.hm-tile.hm-teal .hm-tile-sub { color: #0b5e56; }
.hm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.hm-grid > .hm-jobs { grid-column: span 2; margin: 0; border-radius: var(--r-16); }
.hm-grid > .hm-jobs:only-child { grid-column: 1 / -1; }
.hm-jobs-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 18px 20px 10px; }
.hm-jobs-head > .hm-h { padding: 0; }
.hm-count { color: var(--ink-muted); font-weight: 500; }
.hm-open { font-size: 13px; font-weight: 600; text-decoration: none; }
.hm-jobs .hm-row { position: relative; padding: 14px 20px; }
.hm-jobs .hm-list > .hm-row:first-child { border-top: 1px solid var(--divider); }
.hm-jobs .hm-n { min-width: 44px; height: 44px; font-size: 15px; }
.hm-go { flex: none; color: var(--accent-hover); font: 600 13px/18px var(--font); text-decoration: none; white-space: nowrap; }
.hm-go::after { content: ""; position: absolute; inset: 0; }
.hm-row:hover { background: var(--row-open); }
.hm-row:has(> .hm-go:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.hm-side { display: flex; flex-direction: column; gap: 20px; }
.hm-side > .card { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 18px 20px; border-radius: var(--r-16); }
.hm-side .hm-h { padding: 0; }
.hm-side .hm-h a { color: var(--ink); text-decoration: none; }
.hm-store { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hm-store-name { display: flex; flex-direction: column; min-width: 0; }
.hm-store-t { color: var(--ink); font: 600 14px/20px var(--font); }
.hm-store-l { color: var(--ink-muted); font-size: 12px; }
.hm-today { gap: 12px !important; }
.hm-today-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink-body); font-size: 14px; text-decoration: none; }
.hm-today-row:hover { text-decoration: none; color: var(--ink); }
.hm-today-n { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 1023.98px) {
  section.hm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-grid { grid-template-columns: minmax(0, 1fr); }
  .hm-grid > .hm-jobs { grid-column: auto; }
}
@media (max-width: 699.98px) {
  section.hm-tiles, .hm-side { display: none; }
  .hm-jobs .hm-row { padding: 14px 16px; }
}
/* Home's "Waiting for you" as the owner's checklist in tabs (31 Oct 2026, Main.dc.html; docs/decisions.md RD-H1-RD-H8). The tab row inside the
   card (the shared .tabs, smaller: 13 px, the tab shown semi-bold in the dark accent over its 3 px accent bar, each tab's count a pill, magenta on
   the tab shown); one row per job, the whole row ONE link (44 px at least): an 18 px box with 6 px corners (a look; red for an urgent job), the
   name (14 px semi-bold, "Urgent" as a small red pill after it), ONE 12 px muted line cut with an ellipsis, the count as a pill, the action words in
   the dark accent with "›"; 8 rows, then "Show N more" (a <details>: no script; it goes once opened, as the artboard's button). A phone (600 px
   and less): the box with the name and line on the first line, the count and the action under them; the tab row scrolls inside the card. */
.hm-jobs > .tabs.hm-tabs { gap: 2px; margin: 0; padding: 0 12px; }
@media (min-width: 700px) { .hm-jobs > .tabs.hm-tabs { border-bottom-color: var(--divider); } }
.hm-tabs > .tab { gap: 6px; padding: 10px; color: var(--ink-body); font: 500 13px/20px var(--font); }
.hm-tabs > .tab[aria-current] { color: var(--accent-hover); font-weight: 600; }
.hm-tabs > .tab > .count { min-width: 20px; height: auto; padding: 1px 7px; background: var(--page); color: var(--ink-body); font: 600 11px/16px var(--font); }
.hm-check { list-style: none; margin: 0; padding: 0; }
.hm-check > li { margin: 0; border-top: 1px solid var(--divider); }
.hm-tabs + .hm-check > li:first-child { border-top: 0; }
.hm-job { display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 11px 20px; color: var(--ink-body); text-decoration: none; }
.hm-job:hover { background: var(--row-open); color: var(--ink-body); text-decoration: none; }
.hm-job:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 0; }
.hm-box { flex: none; box-sizing: border-box; width: 18px; height: 18px; border: 2px solid #c8bcd3; border-radius: var(--r-8); background: #ffffff; }
.hm-box.urgent { border-color: var(--st-red); }
.hm-job-text { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.hm-job-t { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; color: var(--ink); font: 600 14px/20px var(--font); overflow-wrap: anywhere; }
.hm-urgent { flex: none; padding: 2px 8px; border-radius: var(--r-pill); background: var(--sf-red); color: var(--sf-red-ink); font: 700 11px/14px var(--font); }
.hm-job-l { overflow: hidden; color: var(--ink-muted); font: 400 12px/18px var(--font); white-space: nowrap; text-overflow: ellipsis; }
.hm-job-n { flex: none; padding: 3px 10px; border-radius: var(--r-pill); background: var(--page); color: var(--ink); font: 600 12px/18px var(--font); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hm-job-go { flex: none; min-width: 110px; color: var(--accent-hover); font: 600 13px/18px var(--font); text-align: right; white-space: nowrap; }
details.hm-fold > summary { display: block; min-height: 44px; padding: 12px 20px; border-top: 1px solid var(--divider); background: var(--page-alt); color: var(--accent-hover);
  font: 600 13px/20px var(--font); list-style: none; cursor: pointer; }
details.hm-fold > summary::-webkit-details-marker { display: none; }
details.hm-fold > summary:hover { color: var(--accent); }
/* The fold is part of the list, not a boxed fold (the generic details look is reset); once open, its summary leaves the look but stays
   in the keyboard order and shows again when focused from the keyboard (the Codex review of hm2: display:none lost the focus). */
details.hm-fold { border: 0; border-radius: 0; padding: 0; margin: 0; background: transparent; }
details.hm-fold > :last-child:not(summary) { margin-bottom: 0; }
details.hm-fold[open] > summary { margin-bottom: 0; }
details.hm-fold[open] > summary:not(:focus-visible) { position: absolute; width: 1px; height: 1px; min-height: 0; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 600px) {
  .hm-jobs > .tabs.hm-tabs { padding: 0 4px; }
  .hm-job { flex-wrap: wrap; gap: 6px 14px; padding: 11px 16px; }
  .hm-job > .hm-box { align-self: flex-start; margin-top: 1px; }
  .hm-job-text { flex: 1 1 calc(100% - 32px); }
  .hm-job-n { margin-left: 32px; }
  .hm-job-go { min-width: 0; margin-left: auto; }
  details.hm-fold > summary { padding: 12px 16px; }
}
/* ==== end rd2c ============================================================================================================================== */

/* ==== rd2a: Items and Inventory on the approved redesign of 30 Oct 2026 (artboards Items, Item, Inventory, Counts; docs/decisions.md RD-A1+) ====
   Its Show and the header's More are rd1's since the integration (RD-I8): here only what the Items and Inventory pages add. */
/* A list's Show beside its search (rd1's show-menu, $showMine): the search 44 px too. The header's More holds the list's own items
   (list_more.php: its filter form in a fold of the menu, Clear, the download) */
.toolbar:has(> details.show-menu) .tb-search input[type="search"] { height: 44px; min-height: 44px; }
.toolbar:has(> details.show-menu) { gap: 10px; margin-bottom: 20px; }
.ph-actions > details.more:has(form.list-filters) > .more-menu { min-width: 260px; }
.doc-act-panel form.list-filters { display: grid; gap: 10px; margin: 0; }
.doc-act-panel form.list-filters select { width: 100%; }
.doc-act-panel form.list-filters .tb-check { min-height: 44px; }
.doc-act-panel form.list-filters p.actions { margin: 4px 0 0; justify-content: flex-end; }
@media (max-width: 639.98px) { .toolbar > details.show-menu { flex: 1 1 100%; } .toolbar > details.show-menu > summary.show-select { width: 100%; } }
/* Adjustments and Transfers (artboard Inventory: Adjustments): the units in their colour, + green and − red; the reason on an adjustment's lines muted */
table.stock-records td.chg { font-weight: 600; color: var(--ink); }
table.stock-records td.chg.up { color: var(--sf-green-ink); }
table.stock-records td.chg.down { color: var(--sf-red-ink); }
/* Stock counts (artboard Inventory: Stock counts): the bar is "N ticked", then More (the other ways to count, the shelf, a note; it opens upwards
   from the right, beside the main button) and "Count the ticked items"; the hidden first button makes Enter count the ticked items */
form.count-open > button.po-default, form.ap-answer > button.po-default { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.count-bar > details.count-more { margin: 0; }
.count-bar > details.count-more > .more-menu { left: auto; right: 0; min-width: 280px; }
/* On a phone these two menus are no wider than the screen either (the Codex review of 1ab1ed9, LOW): their minimums give way below 640 px. */
@media (max-width: 639.98px) { .ph-actions > details.more:has(form.list-filters) > .more-menu, .count-bar > details.count-more > .more-menu { min-width: 0; } }
.count-more .count-fields { display: grid; gap: 10px; padding: 12px 14px; }
.count-bar .count-more .count-field { display: grid; gap: 4px; }
.count-bar .count-more .count-field select, .count-bar .count-more .count-note input { width: 100%; max-width: none; }
/* The item page (artboard Item, RD-A4): the status label beside the name; the stock card; Details and the history in the main column, the
   side cards (Store listings, Barcodes, Suppliers) beside it; a card's head is its title with its link at the right (13 px, the accent);
   Details' groups are a small uppercase title over a three-column grid of facts; the folds of what the tabs of before held under the history */
.item-head .ph-title > .tag { margin: 0; padding: 4px 12px; font-size: 12px; }
.item-head .ph-meta .item-id { font: 400 14px/20px var(--font); }
.item-strip { margin: 0 0 20px; }
.item-strip .doc-step-label { font-size: 12px; }
.item-strip .doc-step-big { font-size: 24px; font-weight: 700; }
.item-strip .doc-step-big a { color: inherit; text-decoration: none; }
.item-strip .doc-step-big a:hover { color: var(--accent-hover); text-decoration: underline; }
.item-cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.item-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.item-side { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.item-cols section.card { position: relative; margin: 0; padding: 0; border-radius: var(--r-14); overflow: hidden; }
.item-cols .card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 20px; border-bottom: 1px solid var(--divider); }
.item-side .card-head { padding: 14px 18px; }
.item-cols .card-head > h2 { margin: 0; font: 600 15px/22px var(--font); color: var(--ink); }
.item-cols .card-link { display: inline-flex; align-items: center; min-height: 32px; color: var(--accent-hover); font: 600 13px/20px var(--font); text-decoration: none; cursor: pointer; }
.item-cols .card-link:hover { color: var(--accent); text-decoration: underline; }
.item-details .facts-group { padding: 14px 20px; border-top: 1px solid #f7f3f9; }
.item-details .card-head + .facts-group { border-top: 0; }
.item-details .facts-title { margin: 0 0 8px; color: var(--ink-muted); font: 600 12px/18px var(--font); letter-spacing: .06em; }
dl.item-facts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
dl.item-facts-grid dt { color: var(--ink-muted); font: 400 12px/18px var(--font); }
dl.item-facts-grid dd { margin: 2px 0 0; color: var(--ink); font: 500 14px/20px var(--font); overflow-wrap: anywhere; }
.item-details .facts-more { padding: 0 20px; }
.item-details .facts-more > :first-child { margin-top: 4px; }
.item-details .facts-more > :last-child { margin-bottom: 16px; }
.item-moves > .scroll { margin: 0; border: 0; border-radius: 0; }
table.item-history { width: 100%; border-collapse: collapse; font-size: 14px; }
table.item-history tr + tr > td { border-top: 1px solid #f7f3f9; }
table.item-history td { padding: 12px 20px; vertical-align: top; border: 0; background: none; height: auto; }
table.item-history td.h-when { color: var(--ink-muted); white-space: nowrap; }
table.item-history .m-what { color: var(--ink); font-weight: 500; }
table.item-history td.h-what a { font-size: 13px; text-decoration: none; }
table.item-history td.chg { text-align: right; font-weight: 600; white-space: nowrap; color: var(--ink); }
table.item-history td.chg.up { color: var(--sf-green-ink); }
table.item-history td.chg.down { color: var(--sf-red-ink); }
.item-main > details.it-fold { margin: 0; }
.item-main > details.it-fold > summary > h2.fold-h { margin: 0; font: inherit; color: inherit; }
.item-side .side-row { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 12px 18px; border-top: 1px solid #f7f3f9; }
.item-side .card-head + .side-row, .item-side .card-head + details + .side-row, .item-side ul.side-list > .side-row:first-child { border-top: 0; }
.item-side ul.side-list { margin: 0; padding: 0; list-style: none; }
.item-side .side-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0; color: var(--ink); font: 500 14px/20px var(--font); }
.item-side .side-sub { margin: 0; color: var(--ink-muted); font: 400 13px/18px var(--font); overflow-wrap: anywhere; }
.item-side .side-row > .card-link { align-self: flex-start; }
.item-side .tag { margin: 0; }
.item-side details { border: 0; border-radius: 0; padding: 0; margin: 0; background: none; }
.item-side details > summary { min-height: 32px; font-weight: 600; }
.item-side details.card-add > summary { position: absolute; top: 9px; right: 18px; }
.item-side details.card-add[open] { padding: 12px 18px; border-bottom: 1px solid var(--divider); }
.item-side details.card-add form.add-barcode { margin: 0; }
.item-side details.bc-change > summary { color: var(--accent-hover); font-size: 13px; }
.item-side details.bc-change form.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 4px 0 8px; }
.item-side details.bc-change input.units { width: 6rem; }
.item-side p.note { margin: 12px 18px; }
@media (max-width: 639.98px) { dl.item-facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } table.item-history td { padding: 12px 16px; } }
@media (max-width: 699.98px), (pointer: coarse) { .item-cols .card-link, .item-side details > summary { min-height: 44px; } }
/* The Name part of Details (docs/decisions.md IR1): the name under its small title, "Change the name" (a fold, no script) and its form: the
   box as wide as the column, its hint, Save the name; on a phone the button is as wide as the screen */
.item-details .facts-name .item-name-now { margin: 0; color: var(--ink); font: 500 14px/20px var(--font); overflow-wrap: anywhere; }
.item-details details.name-change { margin: 4px 0 0; padding: 0; border: 0; border-radius: 0; background: none; }
.item-details details.name-change > summary { min-height: 32px; margin: 0; }
.item-details details.name-change[open] > summary { margin-bottom: 4px; }
.item-details form.item-name-form { gap: 8px; max-width: 40rem; }
.item-details form.item-name-form p { margin: 0; }
@container (max-width: 640px) { form.item-name-form button { width: 100%; } }
/* ==== end rd2a ============================================================================================================================== */
/* ==== ca: "Confirm all ready" for ERPNext corrections (docs/decisions.md CA1-CA12; ConfirmAll.dc.html, ConfirmAllCheck.dc.html,
   ConfirmAllDone.dc.html of 31 Oct 2026) ===================================================================================================
   Approvals with ERPNext corrections shown: the green "Confirm all ready (N)" after the Show (the green tint and ink, its check, 40 px); a Needs
   a look row's line in the amber ink; the board's "The list is split in two" at the right of the list (a white card, 16 px corners, 22 by 24
   px) until a row is opened. The check page and the done page: one 760 px column; the three lines in a white card (a 10 px dot in its tone,
   the words, the figure at the right), the three plain sentences (13 px), the note's label over its 44 px box, Back and "Confirm N" at the
   right (44 px); the green status line with its check; the "Left for you" card (an amber dot, the count; each row the item, why in the amber
   ink, "Open ›" at the right); the line where the press is saved. On a phone (600 px and less): 16 px in, 44 px targets, nothing wider than
   the screen (a long name wraps). */
.ap-confirm-all { min-height: 40px; }
.ap-confirm-all .ico { width: 16px; height: 16px; }
.rd-inbox .ap-m.ap-why { color: var(--sf-amber-ink); font-weight: 500; }
.ap-split { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 22px 24px; border-radius: var(--r-16); }
.ap-split > h2 { margin: 0; color: var(--ink); font: 600 16px/1.4 var(--font); }
.ap-split > p, .ap-split > ul { margin: 0; color: var(--ink-body); font: 400 14px/1.6 var(--font); }
.ap-split > ul { display: flex; flex-direction: column; gap: 4px; padding-left: 20px; }
.ap-split .ap-split-ready { color: var(--sf-green-ink); }
.ap-split .ap-split-look { color: var(--sf-amber-ink); }
.ap-split > p.ap-split-note { color: var(--ink-muted); font-size: 13px; }
.ca-page { display: flex; flex-direction: column; gap: 20px; max-width: 760px; min-width: 0; }
.ca-page > * { margin-top: 0; margin-bottom: 0; }
section.card.ca-lines, section.card.ca-left { margin: 0; padding: 0; overflow: hidden; border-radius: var(--r-16); }
.ca-line { display: flex; align-items: center; gap: 14px; padding: 14px 20px; }
.ca-line + .ca-line { border-top: 1px solid var(--divider); }
.ca-dot { flex: none; width: 10px; height: 10px; border-radius: var(--r-pill); background: var(--t-fill, var(--st-grey)); }
.ca-text { flex: 1 1 auto; min-width: 0; color: var(--ink); font: 400 14px/20px var(--font); overflow-wrap: anywhere; }
.ca-fig { flex: none; color: var(--ink); font: 600 14px/20px var(--font); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ca-says { display: flex; flex-direction: column; gap: 6px; }
.ca-says > p { margin: 0; color: var(--ink-body); font: 400 13px/20px var(--font); }
form.ca-form { display: flex; flex-direction: column; gap: 6px; margin: 0; }
form.ca-form > label { color: var(--ink); font: 600 13px/18px var(--font); }
form.ca-form > input[type="text"] { width: 100%; height: 44px; box-sizing: border-box; }
.ca-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
form.ca-form > .ca-actions { margin: 14px 0 0; }
.ca-actions > .btn { min-height: 44px; }
.ca-none { color: var(--ink-body); font: 400 14px/20px var(--font); }
p.ca-status { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--r-12); background: var(--sf-green); color: var(--sf-green-ink);
  font: 600 14px/20px var(--font); }
.ca-left > h2 { display: flex; align-items: center; gap: 8px; margin: 0; padding: 14px 20px 8px; color: var(--ink); font: 600 14px/20px var(--font); }
.ca-count { color: var(--ink-muted); font-weight: 500; }
.ca-count::before { content: "· "; content: "· " / ""; }
.ca-rows { margin: 0; padding: 0; list-style: none; }
.ca-rows > li { display: flex; align-items: center; gap: 14px; margin: 0; padding: 12px 20px; border-top: 1px solid var(--divider); }
.ca-what { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.ca-t { color: var(--ink); font: 600 14px/20px var(--font); overflow-wrap: anywhere; }
.ca-why { color: var(--sf-amber-ink); font: 400 12px/16px var(--font); overflow-wrap: anywhere; }
a.ca-open { flex: none; display: inline-flex; align-items: center; min-height: 32px; font: 600 13px/18px var(--font); text-decoration: none; white-space: nowrap; }
.ca-saved { color: var(--ink-muted); font: 400 13px/20px var(--font); }
.ca-stopped { color: var(--sf-amber-ink); font: 500 13px/20px var(--font); }
@media (max-width: 600px) {
  .ap-confirm-all { min-height: 44px; flex: 1 1 100%; }
  .ap-split { padding: 18px 16px; }
  .ca-line, .ca-rows > li { padding-left: 16px; padding-right: 16px; }
  .ca-line { align-items: flex-start; }
  .ca-left > h2 { padding-left: 16px; padding-right: 16px; }
  a.ca-open { min-height: 44px; }
  .ca-actions > .btn { flex: 1 1 auto; }
}
/* ==== end ca ================================================================================================================================ */
/* ==== nc: the nightly Confirm all on Settings > Rules and numbers (docs/decisions.md NC8; NightlyConfirm.dc.html of 1 Nov 2026) =========
   The "Last night" line above the search: a white card (16 px corners, 16 by 20 px), a 10 px dot (green while the switch is on, grey off),
   the line in ink with its lead in bold, the done page's link at the right (13 px, semi-bold), the next run on a line of its own (13 px,
   muted). On a phone the link is a 44 px target and the words wrap. */
section.card.nc-last { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 0 0 16px; padding: 16px 20px; border-radius: var(--r-16); }
.nc-dot { flex: none; width: 10px; height: 10px; border-radius: var(--r-pill); background: var(--t-fill, var(--st-grey)); }
.nc-text { flex: 1 1 320px; min-width: 0; color: var(--ink); font: 400 14px/20px var(--font); overflow-wrap: anywhere; }
a.nc-open { flex: none; display: inline-flex; align-items: center; min-height: 32px; font: 600 13px/18px var(--font); text-decoration: none; }
.nc-next { flex-basis: 100%; color: var(--ink-muted); font: 400 13px/20px var(--font); }
@media (max-width: 600px) {
  section.card.nc-last { padding: 14px 16px; }
  a.nc-open { min-height: 44px; }
}
/* ==== end nc ================================================================================================================================ */

/* The quick adjustment screen (docs/decisions.md AG1-AG8; the owner's drawing of 2 Nov 2026): the details in one row, one table of lines, Tab and the arrow keys
   move through it. A cell shows no frame until the pointer or the focus is on it. On a phone a line stacks: product, then units and after, then why. */
.aj-form { display: grid; gap: 12px; }
.aj-form .card { margin: 0; }
.aj-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; padding: 12px 14px; }
.aj-top label { display: grid; gap: 3px; margin: 0; color: var(--ink-muted); font: 600 12px/16px var(--font); }
.aj-top .aj-note { grid-column: span 2; }
.aj-lines { padding: 0; overflow: visible; }
.aj-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.aj-table th { padding: 8px 10px; background: var(--page-alt); border-bottom: 1px solid var(--hairline); color: var(--ink-muted); font: 600 12px/16px var(--font); text-align: left; }
.aj-table th:first-child { border-top-left-radius: var(--r-12); }
.aj-table th:last-child { border-top-right-radius: var(--r-12); }
.aj-table th.num, .aj-table td.num { text-align: right; }
/* The same look as the other grids (docs/decisions.md AJ3; KG1): rows one line high, 32 px boxes, the No. column right-aligned. */
.aj-table td { padding: 4px 8px; border-bottom: 1px solid var(--divider); font-variant-numeric: tabular-nums; vertical-align: middle; }
.aj-c-no { width: 3rem; color: var(--ink-muted); text-align: right; white-space: nowrap; }
.aj-c-units { width: 104px; }
.aj-c-why { width: 190px; }
.aj-c-fig { width: 100px; }
.aj-c-x { width: 44px; }
.aj-pick { display: flex; align-items: center; gap: 8px; min-width: 0; }
.aj-code { flex: none; color: var(--ink-muted); font-size: 12px; }
.aj-form input.aj-cell, .aj-form select.aj-cell { width: 100%; min-width: 0; height: 32px; min-height: 32px; margin: 0; padding: 0 8px; border: 1px solid transparent; border-radius: var(--r-8); background-color: transparent; color: var(--ink); font: 500 14px/20px var(--font); }
.aj-form input.aj-cell::placeholder { color: var(--ink-muted); font-weight: 400; }
.aj-form select.aj-cell { color: var(--ink-muted); font-weight: 400; }
.aj-form input.aj-cell:hover:not(:disabled), .aj-form select.aj-cell:hover { border-color: var(--hairline); }
.aj-form input.aj-cell:focus, .aj-form select.aj-cell:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 0; background-color: var(--card); }
.aj-form input.aj-cell.num { text-align: right; font-weight: 600; }
.aj-form input.aj-cell:disabled { background: none; border-color: transparent; }
.aj-row.is-up input[data-cell="u"] { color: var(--sf-green-ink); }
.aj-row.is-down input[data-cell="u"], .aj-row.is-below input[data-cell="a"] { color: var(--sf-red-ink); }
.aj-form select.aj-cell.is-own { color: var(--ink); }
.aj-c-x .btn { display: grid; place-items: center; width: 32px; min-width: 0; height: 32px; min-height: 0; padding: 0; border: 0; background: none; color: var(--ink-muted); }
.aj-c-x .btn:hover { background: var(--sf-red); color: var(--sf-red-ink); }
.aj-row:last-child .aj-c-x .btn { visibility: hidden; }
.aj-alarm { margin: 8px 12px 0; }
.aj-lines > .kg-status, .aj-lines > .kg-keys { margin: 8px 12px 0; } /* the Undo line and the hint line under the lines (AJ2, AJ3) */
.aj-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 12px; background: var(--page-alt); border-radius: 0 0 var(--r-12) var(--r-12); position: sticky; bottom: 0; z-index: 2; }
.aj-sum { color: var(--ink); font-weight: 600; }
.aj-up { color: var(--sf-green-ink); }
.aj-down { color: var(--sf-red-ink); }
.aj-waits { flex: 1 1 16rem; font-size: 12px; line-height: 16px; }
.aj-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
@media (max-width: 699.98px), (pointer: coarse) {
  .aj-table thead { display: none; }
  .aj-table, .aj-table tbody { display: block; }
  .aj-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 96px 40px; gap: 4px; padding: 8px; border-bottom: 1px solid var(--divider); }
  .aj-row td { width: auto; padding: 0; border: 0; }
  .aj-row .aj-c-no { display: none; }
  .aj-row .aj-product { grid-column: 1 / -1; }
  .aj-row .aj-c-why { grid-row: 2; grid-column: 1; }
  .aj-form input.aj-cell, .aj-form select.aj-cell { height: 44px; min-height: 44px; font-size: 16px; }
  .aj-top .aj-note { grid-column: auto; }
  .aj-c-x .btn { width: 40px; height: 44px; }
}
@media (max-width: 699.98px) {
  body:has(.tabbar) .aj-foot { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
}
/* ==== Reorder › Suggestions "Buy for" (docs/decisions.md BF8): the choice beside the search, then a box for a typed number of days, as tall
   as the toolbar's selects; on a phone the row takes the width, the choice and the box share it, 44 px high ================================== */
.toolbar .tb-state.tb-buyfor select { min-width: 12rem; }
.toolbar .tb-state input.tb-days { width: 9rem; min-height: 40px; height: 40px; padding-top: 8px; padding-bottom: 8px; font-size: 14px; }
@media (max-width: 699.98px), (pointer: coarse) { .toolbar .tb-state input.tb-days { min-height: 44px; height: 44px; } }
@media (max-width: 639.98px) { .toolbar .tb-state.tb-buyfor select, .toolbar .tb-state input.tb-days { flex: 1 1 8rem; min-width: 0; } }
/* ==== A family's "Add items" picker (the owner, 5 Nov 2026; docs/decisions.md FP8): the search, the items it found as a list in its own
   scrolling box (each row its tick and two lines, the whole row the tap target, 44 px at least), the tools (Tick all shown, Untick all, the
   count), the ticked items each with Untick, and the one button; the pasted list a fold under it. Shared pieces only (.btn, .tag, label,
   the search field); nothing wider than its panel: long names wrap, and on a phone the button takes the row ========================== */
form.fp { display: grid; gap: 8px; max-width: none; margin: 0; }
form.fp > * { min-width: 0; }
form.fp > label { margin: 0; }
.fp-says { min-height: 18px; margin: 0; font: 400 13px/18px var(--font); }
.fp-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fp-count { margin-left: auto; color: var(--ink); font: 600 13px/18px var(--font); }
.fp-warn { margin: 0; color: var(--sf-red-ink); font: 600 13px/18px var(--font); }
.fp-results { max-height: min(26rem, 55vh); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--hairline); border-radius: var(--r-12); background: var(--card); }
.fp-results:empty { display: none; }
ul.fp-list li + li { margin-top: 0; border-top: 1px solid var(--divider); }
label.fp-pick { display: flex; align-items: flex-start; gap: 10px; min-width: 0; min-height: 44px; margin: 0; padding: 10px 12px; cursor: pointer; }
label.fp-pick:hover, label.fp-pick:has(input:checked) { background: var(--row-selected); }
label.fp-pick input[type="checkbox"] { margin-top: 1px; }
.fp-row.is-off label.fp-pick { cursor: default; background: none; }
.fp-text { display: grid; gap: 2px; min-width: 0; }
.fp-name { color: var(--ink); font: 500 14px/20px var(--font); overflow-wrap: anywhere; }
.fp-row.is-off .fp-name { color: var(--ink-muted); }
.fp-meta { color: var(--ink-muted); font: 400 13px/18px var(--font); overflow-wrap: anywhere; }
.fp-tags .tag { margin: 2px 4px 0 0; }
p.fp-h { margin: 8px 0 0; }
ul.fp-ticked { max-height: 16rem; overflow-x: hidden; overflow-y: auto; }
ul.fp-ticked:empty { display: none; }
ul.fp-ticked li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; margin: 0; padding: 4px 0; border-bottom: 1px solid var(--divider); }
.fp-t-name { flex: 1 1 12rem; min-width: 0; color: var(--ink); font: 500 14px/20px var(--font); overflow-wrap: anywhere; }
.fp-t-code { color: var(--ink-muted); font: 400 13px/18px var(--font); }
p.fp-none { margin: 0; font-size: 13px; }
form.fp p.actions { margin: 4px 0 0; }
details.fp-paste { margin: 16px 0 0; }
details.fp-paste > summary { display: flex; align-items: center; min-height: 44px; color: var(--accent-hover); font-weight: 600; cursor: pointer; }
details.fp-paste > form.record { margin: 4px 0 0; }
@media (max-width: 699.98px) {
  .doc-act-panel.fp-panel { padding: 12px; }
  .fp-count { flex: 1 1 100%; margin-left: 0; }
  form.fp p.actions .btn { width: 100%; justify-content: center; }
}

/* Settings › APIs (0063; docs/decisions.md AK9): the ERPNext card. The facts as every settings card; the form full width under its title
   (no wider than a long address), the check's answer as a note inside the card, Remove's fold with its tick. On a phone the buttons are
   full width and nothing is wider than the screen (the address and the key's end wrap). */
.api-card .api-url, .api-card .api-key-end { overflow-wrap: anywhere; }
.set-row.api-change > .set-k { flex-basis: 100%; }
.set-row.api-change form.api-form { margin: 10px 0 0; max-width: 36rem; gap: 8px; }
.set-row.api-change form.api-form input + label { margin-top: 6px; }
.set-card > p.note.api-check { margin: 8px 20px 14px; padding: 12px 16px; }
@media (max-width: 699.98px) {
  .set-card > p.note.api-check { margin: 8px 16px 12px; }
  .set-row.api-change form.api-form p.actions .btn, .set-row.api-test form.inline, .set-row.api-test form.inline .btn,
  .set-row.api-remove details.set-fold[open] form.record p.actions .btn { width: 100%; justify-content: center; }
}

/* ==== kg: the lines of a document as a standard grid (branch doc-key-grid, docs/decisions.md KG1-KG11) ============================
   The owner, 6 Nov 2026: "purchase invoice and sales invoice, purchase order view style need to standard feel, need also key shortcut".
   The order's and the supplier invoice's page (table.kg-grid; later the sales invoice's) and the saved documents' lines (table.kg-view):
   a No. column; on a computer the rows one line high (the CW code small beside the name, the boxes 32 px high, the sub line beside them);
   the empty line last, its box the product box (with the script its packs, price and Add go: the line is filled in place); the line a
   refusal is about in red; the line removed and its Undo; the hints of the keys on a computer only (the keys need the script). On a phone
   the cards as before, without the number column (44 px to tap). CW's tokens only, light and dark from them. */
table.kg-grid th.c-no, table.kg-grid td.c-no, table.kg-view th.c-no, table.kg-view td.c-no { width: 3rem; color: var(--ink-muted); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.kg-grid .kg-code, table.kg-view .kg-code { color: var(--ink-muted); font-size: 12px; font-weight: 400; white-space: nowrap; }
table.kg-grid span.kg-name { color: var(--ink); font-weight: 600; }
table.kg-grid td[data-kg-amount] { font-weight: 600; font-variant-numeric: tabular-nums; }
table.kg-grid tr.kg-bad > th, table.kg-grid tr.kg-bad > td { background: var(--sf-red); }
table.kg-grid tr.kg-bad input[data-kg-cell] { border-color: var(--st-red); }
table.kg-grid .kg-error { color: var(--sf-red-ink); font-weight: 600; }
html.js table.kg-grid:not(.kg-offline) tr.po-add-row > td.kg-nojs { display: none; }
.kg-vat-rows, .kg-vat-row { display: contents; }
.kg-undo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; color: var(--ink); font-size: 14px; }
.kg-keys { margin: 8px 0 0; color: var(--ink-muted); font-size: 12px; line-height: 22px; }
.kg-keys kbd { display: inline-block; min-width: 22px; padding: 0 6px; border: 1px solid var(--hairline); border-bottom-width: 2px; border-radius: var(--r-8); background: var(--card); color: var(--ink); font: 600 11px/18px var(--font); text-align: center; }
html:not(.js) .kg-keys { display: none; }
@container (min-width: 641px) {
  table.kg-grid th, table.kg-grid td { padding: 4px 8px; vertical-align: middle; }
  table.kg-grid input[data-kg-cell] { height: 32px; min-height: 32px; padding: 2px 8px; font-size: 14px; }
  table.kg-grid .o-sub, table.kg-view .o-sub { display: inline; margin-left: 6px; }
  table.kg-grid .po-x { min-width: 32px; min-height: 32px; padding: 0 8px; font-size: 18px; }
  table.kg-grid tr.po-add-row > td { padding: 4px 8px; vertical-align: middle; }
  form.po-editor table.kg-grid .po-box-field input[type="search"] { height: 34px; min-height: 34px; font-size: 14px; }
}
@container (max-width: 640px) {
  table.stack.doc-lines td.c-no { display: none; }
}
@media (max-width: 700px) {
  .kg-keys { display: none; }
}
/* The order's and the supplier invoice's page in ERPNext's layout (the owner, 6 Nov 2026: "keep style erpnext, layout all details";
   docs/decisions.md KG26): the actions in the head (a dark main button, plain grey ones, "..." for the rest) in place of the bar at the
   bottom; a plain white form in sections split by thin full-width lines, each with a small bold title; the fields in three columns with
   their label above in small grey words and a light grey box (no edge until it has the cursor, 4 px corners); the lines' grid with a grey
   head row, thin cell lines and 44 px rows, the tick column, the small grey buttons under it; the totals as grey boxes; the taxes as a
   small table; the grand total on the right; the rare details folded ("More info"). Tokens only (light and dark from them). */
.doc-bar.kg-head-bar { position: static; z-index: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin: 0;
  padding: 0; border: 0; background: none; box-shadow: none; }
.kg-head-bar .btn { min-height: 34px; padding: 6px 14px; font-size: 13px; line-height: 20px; background: var(--ui-bg); border-color: transparent; color: var(--ink); }
.kg-head-bar .btn.ghost { background: none; color: var(--ink-muted); }
.kg-head-bar .btn.primary { background: var(--ink); border-color: var(--ink); color: var(--card); }
.kg-head-bar .btn.primary:hover { background: var(--ink-body); border-color: var(--ink-body); color: var(--card); }
.kg-head-bar details.more > summary.btn { min-width: 34px; padding: 6px 10px; }
.kg-head-bar .more-menu { right: 0; left: auto; }
form.kg-doc { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-12); padding: 0 24px; }
form.kg-doc .kg-sec { margin: 0; padding: 18px 0; border-top: 1px solid var(--hairline); }
form.kg-doc .kg-sec:first-of-type { border-top: 0; }
form.kg-doc .kg-sec-title { margin: 0 0 12px; color: var(--ink); font: 600 14px/20px var(--font); }
form.kg-doc .board-head { margin: 0; padding: 0; }
form.kg-doc fieldset:is(.doc-grid, .kg-posting) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 24px; margin: 0; padding: 0; border: 0; background: none;
  align-items: start; }
form.kg-doc fieldset:is(.doc-grid, .kg-posting) > .doc-wide { grid-column: 1 / -1; }
form.kg-doc fieldset:is(.doc-grid, .kg-posting) label, form.kg-doc .kg-field > .kg-label, form.kg-doc .kg-read dt { color: var(--ink-muted); font: 400 13px/18px var(--font); }
form.kg-doc input[type="text"], form.kg-doc input[type="email"], form.kg-doc input[type="tel"], form.kg-doc input[type="search"], form.kg-doc input[type="number"],
form.kg-doc input[type="date"], form.kg-doc input[type="time"], form.kg-doc input[type="datetime-local"], form.kg-doc select, form.kg-doc textarea {
  min-height: 34px; padding: 6px 10px; border: 1px solid transparent; border-radius: var(--r-10); background-color: var(--ui-bg); color: var(--ink); font-size: 14px; line-height: 20px; }
form.kg-doc input:hover, form.kg-doc select:hover, form.kg-doc textarea:hover { border-color: var(--hairline); }
form.kg-doc input:focus, form.kg-doc select:focus, form.kg-doc textarea:focus { border-color: var(--accent); background-color: var(--card); }
form.kg-doc .kg-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 24px; margin: 0 0 14px; }
form.kg-doc .kg-field { display: grid; gap: 6px; min-width: 0; }
form.kg-doc .kg-value, form.kg-doc .kg-read dd { display: block; min-height: 34px; margin: 0; padding: 7px 10px; border-radius: var(--r-10); background: var(--ui-bg);
  color: var(--ink); font: 400 14px/20px var(--font); font-variant-numeric: tabular-nums; }
form.kg-doc .kg-read .kg-field { margin: 0; }
form.kg-doc details.kg-more > summary { list-style: none; cursor: pointer; margin: 0; }
form.kg-doc details.kg-more > summary::-webkit-details-marker { display: none; }
form.kg-doc details.kg-more > summary::after { content: "\203A"; content: "\203A" / ""; display: inline-block; margin-left: 8px; color: var(--ink-muted); transition: transform .15s; }
form.kg-doc details.kg-more[open] > summary::after { transform: rotate(90deg); }
form.kg-doc details.kg-more[open] > summary { margin-bottom: 12px; }
form.kg-doc .po-summary.kg-sec, form.kg-doc .doc-foot.kg-sec { display: block; }
form.kg-doc .kg-totals { margin: 0; max-width: none; padding: 0; border: 0; background: none; box-shadow: none; }
form.kg-doc .kg-grand { display: grid; gap: 6px; width: min(100%, 22rem); margin: 14px 0 0 auto; }
form.kg-doc .kg-grand .kg-value { font-weight: 700; font-size: 16px; }
table.kg-taxes { width: 100%; border-collapse: collapse; font-size: 13px; }
table.kg-taxes th, table.kg-taxes td { padding: 8px 10px; border: 1px solid var(--hairline); text-align: left; font-weight: 400; }
table.kg-taxes thead th { background: var(--page-alt); color: var(--ink-muted); }
table.kg-taxes tbody th { color: var(--ink); font-weight: 600; }
table.kg-taxes .num { text-align: right; font-variant-numeric: tabular-nums; }
table.kg-taxes .c-no { width: 3rem; color: var(--ink-muted); text-align: right; }
.kg-taxes-wrap { margin: 0 0 8px; border: 0; border-radius: var(--r-12); }
/* The lines' grid as ERPNext's: the grey head row, thin cell lines, 44 px rows, the tick column, the boxes filled grey. */
table.kg-grid { border-collapse: collapse; }
table.kg-grid > thead th { background: var(--page-alt); color: var(--ink-muted); font: 400 13px/18px var(--font); border: 1px solid var(--hairline); }
table.kg-grid > tbody > tr > th, table.kg-grid > tbody > tr > td { border: 1px solid var(--hairline); }
table.kg-grid input.kg-tick { width: 15px; height: 15px; margin: 0 6px 0 0; vertical-align: -2px; }
table.kg-grid input.kg-item { width: 100%; min-width: 10rem; }
table.kg-grid .kg-item-cell { display: flex; align-items: center; gap: 8px; }
table.kg-grid a.kg-code { color: var(--ink-muted); text-decoration: underline; text-decoration-color: var(--hairline); }
table.kg-grid tr.kg-flash > * { animation: kg-flash 1.2s ease-out 1; }
table.kg-grid tr.kg-fade { opacity: 0; transition: opacity .18s ease-out; }
@keyframes kg-flash { from { background-color: var(--sf-amber); } to { background-color: transparent; } }
@media (prefers-reduced-motion: reduce) { table.kg-grid tr.kg-flash > * { animation: none; } table.kg-grid tr.kg-fade { transition: none; } }
@media (hover: hover) and (min-width: 701px) {
  table.kg-grid tr .po-x { opacity: .35; }
  table.kg-grid tr:hover .po-x, table.kg-grid tr:focus-within .po-x, table.kg-grid .po-x:focus-visible { opacity: 1; }
}
.kg-tools { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 10px 0 0; }
.kg-tools-left, .kg-tools-right { display: flex; flex-wrap: wrap; gap: 8px; }
.kg-tools .btn.sm { background: var(--ui-bg); border-color: transparent; color: var(--ink); }
.kg-tools .btn.sm.risky { background: var(--sf-red); color: var(--sf-red-ink); }
.kg-several { margin: 10px 0 0; padding: 12px 14px; }
.kg-several-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 8px; }
.kg-several-list { max-height: 18rem; overflow-y: auto; margin: 8px 0; }
.kg-several-list label.choice { min-height: 36px; padding: 6px 10px; }
/* The checks before a save (KG25): the box in red (a warning amber) with its words under it; the list of what needs a look at the top. */
.kg-msg { display: block; margin: 2px 0 0; color: var(--sf-red-ink); font: 400 12px/16px var(--font); text-align: left; }
.kg-msg.warn { color: var(--needs-ink); }
input.kg-warned { border-color: var(--needs-icon) !important; }
.kg-look { margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--st-red); border-left-width: 4px; border-radius: var(--r-10); background: var(--sf-red); color: var(--sf-red-ink); }
.kg-look p { margin: 0 0 4px; font-weight: 600; }
.kg-look ul { margin: 0; padding-left: 18px; }
.kg-look a { color: var(--sf-red-ink); }
.kg-ni-says { display: grid; gap: 6px; margin: 0 0 8px; }
html.js [data-kg-nojs] { display: none; }
/* The panel "Keyboard shortcuts" (KG13-KG20): over the page, Esc shuts it; a list's row marked by Up / Down. */
.kb-panel { position: fixed; inset: 0; z-index: 60; display: grid; place-items: start center; padding: 8vh 16px 16px; background: var(--backdrop); overflow-y: auto; }
.kb-panel[hidden] { display: none; }
.kb-box { width: min(100%, 40rem); padding: 20px 24px; border-radius: var(--r-14); background: var(--card); box-shadow: var(--shadow-float); }
.kb-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 8px; }
.kb-head h2 { margin: 0; font: 600 18px/24px var(--font); }
.kb-group h3 { margin: 14px 0 6px; color: var(--ink-muted); font: 600 12px/16px var(--font); text-transform: uppercase; letter-spacing: .04em; }
.kb-group dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 0; } /* one row a key (S2: not the site's two-column dl) */
.kb-row { display: grid; grid-template-columns: minmax(10rem, 40%) 1fr; gap: 12px; align-items: center; }
.kb-row dt { margin: 0; }
.kb-row dd { margin: 0; color: var(--ink-body); }
.kb-row kbd { display: inline-block; min-width: 22px; margin: 0 2px 2px 0; padding: 0 6px; border: 1px solid var(--hairline); border-bottom-width: 2px;
  border-radius: var(--r-8); background: var(--card); color: var(--ink); font: 600 11px/18px var(--font); text-align: center; }
tr.kb-on > * { background: var(--accent-soft); }
tr.kb-on > :first-child { box-shadow: inset 3px 0 0 var(--accent); }
/* The saved order and invoice read like ERPNext's form read only: the facts as grey boxes with their words above. */
.doc-view .doc-facts dd { margin: 0 0 8px; padding: 6px 10px; border-radius: var(--r-10); background: var(--ui-bg); color: var(--ink); }
table.kg-view > thead th { background: var(--page-alt); color: var(--ink-muted); }
table.kg-view > tbody > tr > th, table.kg-view > tbody > tr > td { border-bottom: 1px solid var(--hairline); }
@container (max-width: 640px) {
  form.kg-doc { padding: 0 14px; }
  form.kg-doc fieldset:is(.doc-grid, .kg-posting), form.kg-doc .kg-fields { grid-template-columns: minmax(0, 1fr); }
  .kb-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  table.kg-grid input.kg-tick { display: none; }
}
@media (max-width: 700px) {
  .doc-bar.kg-head-bar { justify-content: flex-start; }
}
/* One strict grid for the head and the details (the owner, 6 Nov 2026: "for the head side also need proper alignment"; docs/decisions.md
   KG28), the editor's and the saved order's and invoice's alike, on the spacing scale 4 / 8 / 16 / 24: the list's link alone on the first
   row; the title with its status pill on the second, the actions on its right, centred on it (34 px buttons, 8 px apart); then the fields
   in three equal columns (two on a tablet, one on a phone), one gap, each label above its box and the box the column's width; the pairs
   side by side (the dates of the paper, the posting date and time), a row starting at the first column; the notes and "From ERPNext"
   across; the section titles on the grid's left edge; the totals' words and figures at its right edge. */
.page-head:has(.kg-head-bar), .doc-head:has(~ .doc-view table.kg-view) > .page-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; row-gap: 4px; align-items: center; margin: 0 0 24px; }
.page-head:has(.kg-head-bar) > .ph-text, .doc-head:has(~ .doc-view table.kg-view) > .page-head > .ph-text { display: contents; }
.page-head:has(.kg-head-bar) .ph-back, .doc-head:has(~ .doc-view table.kg-view) > .page-head .ph-back { grid-column: 1 / -1; grid-row: 1; }
.page-head:has(.kg-head-bar) .ph-title, .doc-head:has(~ .doc-view table.kg-view) > .page-head .ph-title { grid-column: 1; grid-row: 2; min-height: 36px; align-items: center; }
.page-head:has(.kg-head-bar) .ph-title h1 .chip, .doc-head:has(~ .doc-view table.kg-view) > .page-head .ph-title h1 .chip { margin-left: 8px; vertical-align: middle; }
.page-head:has(.kg-head-bar) > .ph-actions, .doc-head:has(~ .doc-view table.kg-view) > .page-head > .ph-actions { grid-column: 2; grid-row: 2; align-self: center; gap: 8px; }
.page-head:has(.kg-head-bar) .ph-meta, .page-head:has(.kg-head-bar) .lede, .page-head:has(.kg-head-bar) .ph-more,
.doc-head:has(~ .doc-view table.kg-view) > .page-head .ph-meta, .doc-head:has(~ .doc-view table.kg-view) > .page-head .lede { grid-column: 1 / -1; }
form.kg-doc { padding: 0 24px; }
form.kg-doc .kg-sec { padding: 16px 0 24px; }
form.kg-doc .kg-sec-title { margin: 0 0 16px; }
form.kg-doc fieldset:is(.doc-grid, .kg-posting), form.kg-doc .kg-fields { gap: 16px 24px; margin: 0 0 16px; }
form.kg-doc fieldset:is(.doc-grid, .kg-posting):last-child, form.kg-doc .kg-fields:last-child { margin-bottom: 0; }
form.kg-doc fieldset:is(.doc-grid, .kg-posting) > label, form.kg-doc fieldset:is(.doc-grid, .kg-posting) > .doc-field, form.kg-doc fieldset:is(.doc-grid, .kg-posting) > .po-box-field, form.kg-doc .kg-fields > label {
  display: flex; flex-direction: column; justify-content: flex-start; gap: 4px; min-width: 0; margin: 0; align-self: start; }
form.kg-doc fieldset:is(.doc-grid, .kg-posting) > label > input, form.kg-doc fieldset:is(.doc-grid, .kg-posting) > label > select, form.kg-doc fieldset:is(.doc-grid, .kg-posting) .po-box-field input.po-box,
form.kg-doc fieldset:is(.doc-grid, .kg-posting) .doc-pair > select, form.kg-doc .kg-fields > label > input { width: 100%; max-width: none; }
form.kg-doc fieldset:is(.doc-grid, .kg-posting) .doc-pair { display: flex; gap: 8px; }
form.kg-doc fieldset:is(.doc-grid, .kg-posting) .doc-pair > select { flex: 1 1 auto; min-width: 0; }
form.kg-doc fieldset:is(.doc-grid, .kg-posting) > label:has(> input[name="invoice_date"]) { grid-column-start: 1; } /* the paper's dates start a row */
form.kg-doc fieldset:is(.doc-grid, .kg-posting) > .kg-wide, form.kg-doc fieldset:is(.doc-grid, .kg-posting) > p, form.kg-doc fieldset:is(.doc-grid, .kg-posting) > fieldset { grid-column: 1 / -1; }
form.kg-doc fieldset.kg-posting { margin-top: 16px; }
form.kg-doc .kg-totals .kg-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
form.kg-doc .kg-grand { width: calc((100% - 48px) / 3); }
form.kg-doc .kg-grand .kg-label, form.kg-doc .kg-grand .kg-value { text-align: right; }
form.kg-doc :is(.kg-totals, .kg-sums) output.kg-value { text-align: right; }
@container (min-width: 961px) {
  form.kg-doc fieldset:is(.doc-grid, .kg-posting) > .kg-from { grid-column: auto; }
}
@container (min-width: 641px) and (max-width: 960px) {
  form.kg-doc fieldset:is(.doc-grid, .kg-posting), form.kg-doc .kg-fields, form.kg-doc .kg-totals .kg-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  form.kg-doc .kg-grand { width: calc((100% - 24px) / 2); }
}
@container (max-width: 640px) {
  .page-head:has(.kg-head-bar), .doc-head:has(~ .doc-view table.kg-view) > .page-head { grid-template-columns: minmax(0, 1fr); }
  .page-head:has(.kg-head-bar) > .ph-actions, .doc-head:has(~ .doc-view table.kg-view) > .page-head > .ph-actions { grid-column: 1; grid-row: 3; width: 100%; }
  form.kg-doc { padding: 0 16px; }
  form.kg-doc .kg-totals .kg-fields { grid-template-columns: minmax(0, 1fr); }
  form.kg-doc .kg-grand { width: 100%; }
}
/* The saved order's and invoice's facts on the same grid, as read-only boxes (the party blocks first, each fact's words above its grey box). */
.doc-view .po-paper-head, main:has(table.kg-view) .doc-view > .doc-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; grid-auto-flow: row dense;
  margin: 0 0 24px; padding: 0; border: 0; }
.doc-view .po-paper-head > .doc-party, main:has(table.kg-view) .doc-view > .doc-meta > .doc-party { grid-row: span 2; margin: 0 0 16px; }
.doc-view .po-paper-head > .doc-party > .doc-label, main:has(table.kg-view) .doc-view > .doc-meta > .doc-party > .doc-label { margin: 0 0 4px; }
.doc-view .po-paper-head > .doc-party > :not(.doc-label), main:has(table.kg-view) .doc-view > .doc-meta > .doc-party > :not(.doc-label) { margin: 0; padding: 0 8px; background: var(--ui-bg); }
.doc-view .po-paper-head > .doc-party > .doc-party-name, main:has(table.kg-view) .doc-view > .doc-meta > .doc-party > .doc-party-name { padding-top: 8px; border-radius: var(--r-10) var(--r-10) 0 0; }
.doc-view .po-paper-head > .doc-party > :last-child, main:has(table.kg-view) .doc-view > .doc-meta > .doc-party > :last-child { padding-bottom: 8px; border-radius: 0 0 var(--r-10) var(--r-10); }
.doc-view .po-paper-head > .doc-party > .doc-party-name:last-child, main:has(table.kg-view) .doc-view > .doc-meta > .doc-party > .doc-party-name:last-child { border-radius: var(--r-10); }
.doc-view .po-paper-head > dl.doc-facts, main:has(table.kg-view) .doc-view > .doc-meta > dl.doc-facts { display: contents; }
.doc-view .po-paper-head > dl.doc-facts > dt, main:has(table.kg-view) .doc-view > .doc-meta > dl.doc-facts > dt { margin: 0 0 4px; color: var(--ink-muted); font: 400 13px/18px var(--font); }
.doc-view .po-paper-head > dl.doc-facts > dd, main:has(table.kg-view) .doc-view > .doc-meta > dl.doc-facts > dd { margin: 0 0 16px; padding: 8px; border-radius: var(--r-10); background: var(--ui-bg); color: var(--ink);
  min-height: 36px; overflow-wrap: anywhere; }
main:has(table.kg-view) .doc-view > .doc-meta > .doc-big { grid-column: 1 / -1; margin: 0 0 16px; }
@container (min-width: 961px) {
  .doc-view .po-paper-head > dl.doc-facts > :is(dt, dd):nth-of-type(3n+1) { grid-column: 3; }
  .doc-view .po-paper-head > dl.doc-facts > :is(dt, dd):nth-of-type(3n+2) { grid-column: 1; }
  .doc-view .po-paper-head > dl.doc-facts > :is(dt, dd):nth-of-type(3n+3) { grid-column: 2; }
  main:has(table.kg-view) .doc-view > .doc-meta > dl.doc-facts > :is(dt, dd):nth-of-type(3n+1) { grid-column: 2; }
  main:has(table.kg-view) .doc-view > .doc-meta > dl.doc-facts > :is(dt, dd):nth-of-type(3n+2) { grid-column: 3; }
  main:has(table.kg-view) .doc-view > .doc-meta > dl.doc-facts > :is(dt, dd):nth-of-type(3n+3) { grid-column: 1; }
}
@container (min-width: 641px) and (max-width: 960px) {
  .doc-view .po-paper-head, main:has(table.kg-view) .doc-view > .doc-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-view .po-paper-head > dl.doc-facts > :is(dt, dd):nth-of-type(odd), main:has(table.kg-view) .doc-view > .doc-meta > dl.doc-facts > :is(dt, dd):nth-of-type(even) { grid-column: 1; }
  .doc-view .po-paper-head > dl.doc-facts > :is(dt, dd):nth-of-type(even), main:has(table.kg-view) .doc-view > .doc-meta > dl.doc-facts > :is(dt, dd):nth-of-type(odd) { grid-column: 2; }
}
@container (max-width: 640px) {
  .doc-view .po-paper-head, main:has(table.kg-view) .doc-view > .doc-meta { grid-template-columns: minmax(0, 1fr); }
  .doc-view .po-paper-head > .doc-party, main:has(table.kg-view) .doc-view > .doc-meta > .doc-party { grid-row: auto; }
}
/* The question when the supplier changes with lines on the page (KG30): in the page, under the supplier's box. */
.kg-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; padding: 8px 16px; border: 1px solid var(--hairline);
  border-left: 4px solid var(--needs-icon); border-radius: var(--r-10); background: var(--card); }
.kg-confirm p { flex: 1 1 100%; margin: 0; color: var(--ink); font: 400 13px/18px var(--font); }
.kg-unpriced { margin: 0 0 8px; }
/* The demo the owner approved on 6 Nov ("THIS IS NICE"; docs/decisions.md KG31): its sizes. The head: a 20 px title, 32 px buttons; the
   details as ONE grid of three columns (the fieldsets give their fields to it), the posting date and time a pair in one cell and the line
   under the grid saying when the stock goes to the websites; the lines' boxes clear until they have the cursor; a new line's soft yellow;
   the problems at the top of the form; what needs the script hidden without it. */
.page-head:has(.kg-head-bar) .ph-title h1, .doc-head:has(~ .doc-view table.kg-view) > .page-head .ph-title h1 { font: 600 20px/1.3 var(--font); }
.kg-head-bar .btn { min-height: 32px; height: 32px; padding: 0 12px; font: 500 13px/32px var(--font); }
html:not(.js) [data-kg-jsonly] { display: none; }
form.kg-doc section.kg-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 24px; align-items: start; }
form.kg-doc section.kg-details > .kg-sec-title, form.kg-doc section.kg-details > p, form.kg-doc section.kg-details > .kg-sched-line { grid-column: 1 / -1; margin: 0; }
form.kg-doc section.kg-details > fieldset:is(.doc-grid, .kg-posting) { display: contents; }
form.kg-doc section.kg-details > fieldset:is(.doc-grid, .kg-posting) > :is(p, fieldset, .kg-sched-line) { grid-column: 1 / -1; margin: 0; }
form.kg-doc .kg-pair-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
form.kg-doc .kg-pair-field > .kg-label { color: var(--ink-muted); font: 400 12px/18px var(--font); }
form.kg-doc .kg-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
form.kg-doc .kg-pair > input { width: 100%; }
.kg-sched-line { color: var(--accent); font: 500 12px/18px var(--font); }
form.kg-doc fieldset:is(.doc-grid, .kg-posting) label, form.kg-doc .kg-field > .kg-label, form.kg-doc .kg-read dt { font-size: 12px; }
form.kg-doc :is(input, select):not([type="checkbox"]):not([type="radio"]) { font-size: 13px; }
table.kg-grid input[data-kg-cell] { background-color: transparent; }
table.kg-grid input[data-kg-cell]:focus { background-color: var(--card); }
table.kg-grid > thead th { font: 500 12px/18px var(--font); }
form.kg-doc > .kg-look { margin: 16px 0 0; }
.kg-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 11px; }
.kb-note { margin: 0 0 8px; color: var(--ink-muted); font-size: 12px; }
@container (min-width: 641px) and (max-width: 960px) {
  form.kg-doc section.kg-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 640px) {
  form.kg-doc section.kg-details { grid-template-columns: minmax(0, 1fr); }
}
/* The fix round after the staging look and the Codex review (docs/decisions.md KG32). S1: a label in a box's own column (the supplier's,
   "From") keeps its height; the editor's old rule let it grow in the column (the box ~190 px under its words). S5: a line one row high on a
   computer, the CW code small beside the item box. */
form.kg-doc :is(.po-box-field, .doc-field) > label { flex: 0 0 auto; }
form.kg-doc fieldset:is(.doc-grid, .kg-posting) label { flex: 0 0 auto; }
@container (min-width: 641px) {
  table.kg-grid th.c-item { white-space: nowrap; }
  table.kg-grid th.c-item > input.kg-item { display: inline-block; width: calc(100% - 6.5rem); min-width: 8rem; vertical-align: middle; }
  table.kg-grid th.c-item > .kg-code { display: inline-block; max-width: 6rem; margin-left: 6px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
  table.kg-grid th.c-item > .o-sub { white-space: normal; }
}
/* Each line's item's current stock (KG34): a narrow read-only figure after the item, what is coming small under it; on a phone a card's row
   under the item's name. */
table.kg-grid td.kg-stock, table.kg-view td.kg-stock { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.kg-grid th.c-stock, table.kg-view th.c-stock { width: 5.5rem; }
table.kg-grid td.kg-stock .kg-coming, table.kg-view td.kg-stock .kg-coming { display: block; color: var(--ink-muted); font-size: 11px; line-height: 14px; }
/* "Make it final now?" (KG36): the supplier question's look (.kg-confirm), at the top of the editor's form, right under the head's main
   button; its two answers 44 px high on a phone. */
form.kg-doc > .kg-final-ask { margin: 16px 0 0; }
@media (max-width: 699.98px), (pointer: coarse) { .kg-final-ask .btn { min-height: 44px; } }
/* ==== end kg ====================================================================================================================== */
/* ==== gw: a delivery's lines as the standard grid (branch gi-key-grid, docs/decisions.md GW1-GW10) ====================================
   Goods received like the purchase order and the supplier invoice (KG): KG's table (table.kg-grid: the No. column, rows one line high on
   a computer with the CW code small beside the name, 32 px boxes, numbers right) on the delivery's board, and on the prices fold's table;
   the problem panel's boxes stay white on its amber; a line's problems and a refusal's words under the name; the table waits hidden until
   its first line (a keyer's empty delivery: the scan box adds it in place). The phone's cards as before (GV23-GV25), without the No.
   column (KG's rule for table.stack.doc-lines). */
[data-gi-none] { display: none; }
table.gi-lines tr.gi-panel input[data-kg-cell] { background-color: var(--card); }
.gi-lines-card > .kg-status { margin: 0 16px; }
.gi-lines-card > .kg-keys { margin: 0 16px 12px; }
@container (min-width: 641px) {
  table.gi-lines th.c-item .field-error, table.gi-lines th.c-item .kg-error { display: block; margin-left: 0; white-space: normal; }
}
/* ==== end gw ====================================================================================================================== */
/* ==== lp: one look for a purchase order (live drafts step 2, branch look-paper; docs/decisions.md LP1-LP8) ==============================
   The owner, 18 Nov 2026, of the read-only order page: "I liked how it looks on Shareef's window, the design". A draft and a new order are
   that paper (.doc-view.po-paper) inside the one editor form (form.po-editor.kg-doc.kg-paper): the form's own card steps back, the lines'
   grid takes the paper's table look (a grey head row, a line between rows, no cell edges) and every figure a person types is a real box
   (input.kg-flat) that reads like the paper's words until the mouse is on it (the grey box) or the cursor is in it (the white box, the
   accent edge and a 2 px ring that always shows). The facts keep the paper's grey boxes. A touch screen (no hover) shows every box grey;
   a phone has 16 px boxes (no zoom on focus). Everything here is scoped to .kg-paper (and the bar's .po-edit-bar): the supplier invoice
   (form.kg-doc, the same grid engine) is drawn as before. CW's tokens only, light and dark from them; no movement of its own. */
form.kg-paper { margin: 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
form.kg-paper > .kg-look { margin: 0 0 12px; }
form.kg-paper .po-paper-lines { min-width: 0; }
/* The boxes: the words of the paper at rest. */
form.kg-paper select.kg-flat, form.kg-paper input.kg-item, form.kg-paper .po-paper-head input.po-box, form.kg-paper input.kg-flat {
  border-color: transparent; background-color: transparent; color: var(--ink); box-shadow: none; }
form.kg-paper input.kg-flat::placeholder, form.kg-paper input.po-box::placeholder { color: var(--ink-muted); opacity: 1; }
form.kg-paper input.kg-flat:hover, form.kg-paper select.kg-flat:hover, form.kg-paper input.kg-item:hover, form.kg-paper .po-paper-head input.po-box:hover {
  border-color: var(--field); background-color: var(--ui-bg); }
form.kg-paper input.kg-flat:focus, form.kg-paper select.kg-flat:focus, form.kg-paper input.kg-item:focus, form.kg-paper .po-paper-head input.po-box:focus {
  border-color: var(--accent); background-color: var(--card); outline: 2px solid var(--accent); outline-offset: 1px; }
form.kg-paper input.kg-flat[type="number"] { -moz-appearance: textfield; appearance: textfield; }
form.kg-paper input.kg-flat[type="number"]::-webkit-inner-spin-button, form.kg-paper input.kg-flat[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
form.kg-paper input.kg-flat[aria-invalid="true"], form.kg-paper tr.kg-bad input.kg-flat { border-color: var(--st-red); }
/* The order's head, read only and on a draft (the alignment pass, LP9; the owner, 18 Nov 2026: "just make sure all aligned"): the blocks of
   a row share their top line and their height (a block is a column whose last part grows; a block's label is as high as a fact's words), so
   Supplier, Deliver to and Order date line up; a label in the head or the foot reads as the paper's words (not a form's 500 13 px label). */
.doc-view .po-paper-head > .doc-party { display: flex; flex-direction: column; }
/* Each part of a block as tall as its content (never a flex-basis of its own: the one-page form's .po-box-field had 18rem, which made the
   boxes 270 px tall), only the last part takes what the row has left (the coordinator's second look on staging). */
.doc-view .po-paper-head > .doc-party > * { flex: 0 0 auto; }
.doc-view .po-paper-head > .doc-party > :last-child { flex: 1 1 auto; }
.doc-view .po-paper-head > .doc-party > .doc-label { line-height: 18px; }
/* The first row is the labels' (18 px words + 4 px), never more: a block taller than the Order date's box (a supplier box, an address of
   two lines) makes the second row taller, never the labels' row, so the three boxes keep one top line. One column (a phone): no rows to share. */
@container (min-width: 641px) { .doc-view .po-paper-head { grid-template-rows: 22px auto; } }
form.kg-paper .po-paper-head .doc-label > label, form.kg-paper .po-paper-head dt > label, form.kg-paper .doc-foot .doc-label > label, form.kg-paper .doc-foot dt > label {
  display: inline; margin: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; }
/* The supplier box reads as the supplier's name, its words where the name's are (the box reaches into the block's padding). */
form.kg-paper .po-paper-head > .doc-party > .po-box-field { display: grid; gap: 4px; min-width: 0; padding: 8px 8px 0; border-radius: var(--r-10) var(--r-10) 0 0; }
form.kg-paper .po-paper-head input.po-box, form.kg-paper .po-paper-head select.kg-flat { width: calc(100% + 16px); min-height: 32px; margin: -4px -8px 0; padding: 4px 7px;
  color: var(--ink); font: 600 15px/22px var(--font); text-overflow: ellipsis; }
form.kg-paper .po-paper-head .po-party-lines p { margin: 0; font-size: 13px; }
/* The facts keep the paper's grey boxes: the box is the input, as high as a fact's (36 px), its words where a fact's are. */
form.kg-paper .po-paper-head > dl.doc-facts > dd.kg-in { display: flex; padding: 0; background: none; }
form.kg-paper .doc-facts dd.kg-in input.kg-flat { flex: 1 1 auto; width: 100%; min-width: 0; min-height: 36px; padding: 7px; background-color: var(--ui-bg); color: var(--ink);
  font: 600 13px/20px var(--font); text-overflow: ellipsis; }
form.kg-paper .doc-facts dd.kg-in input.kg-flat:focus { background-color: var(--card); }
/* The lines: the paper's table (as table.kg-view) for the grid's boxes. */
form.kg-paper table.kg-grid > thead th { border: 0; border-bottom: 1px solid var(--hairline); }
form.kg-paper table.kg-grid > tbody > tr > th, form.kg-paper table.kg-grid > tbody > tr > td { border: 0; border-bottom: 1px solid var(--hairline); }
form.kg-paper table.kg-grid td.num input.kg-flat { width: 6.5rem; max-width: 100%; text-align: right; font-variant-numeric: tabular-nums; }
form.kg-paper table.kg-grid input.kg-item { font-weight: 600; text-overflow: ellipsis; }
/* The paper's words are 14 px: so are its boxes (form.kg-doc's 13 px rule is more specific than a box's own class). */
form.kg-paper table.kg-grid input.kg-flat, form.kg-paper table.kg-grid input.kg-item { font-size: 14px; }
form.kg-paper table.kg-grid td.num .o-sub { display: block; margin: 2px 0 0; white-space: normal; overflow-wrap: anywhere; } /* a long figure wraps in a phone's card (round 2) */
/* The item's ONE sub-line under its name: "CW-014280 · their code · box of 10 · VAT S" (a part never broken inside; the dots between the
   parts there are, so an empty part leaves none). */
form.kg-paper table.kg-grid .kg-sub > :not(:empty) ~ :not(:empty)::before { content: " \00B7  "; content: " \00B7  " / ""; }
form.kg-paper table.kg-grid .kg-sub > * { white-space: nowrap; }
form.kg-paper table.kg-grid .kg-sub > .kg-code { display: inline; max-width: none; margin: 0; overflow: visible; }
/* The confirmed (read-only) order draws the same sub-line, under the name (the coordinator's third look: it read "CW-007523  each · VAT S"). */
.po-paper table.kg-view .kg-sub { display: block; margin: 2px 0 0; }
.po-paper table.kg-view .kg-sub > :not(:empty) ~ :not(:empty)::before { content: " \00B7  "; content: " \00B7  " / ""; }
.po-paper table.kg-view .kg-sub > * { white-space: nowrap; }
form.kg-paper table.kg-grid label.kg-upp { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; color: var(--ink-muted); font: 400 12px/18px var(--font); white-space: nowrap; }
form.kg-paper table.kg-grid label.kg-upp input.kg-flat { flex: 0 0 auto; width: 5rem; height: 28px; min-height: 28px; padding: 2px 7px; text-align: right; }
form.kg-paper table.kg-grid th.c-x { width: 2.75rem; }
form.kg-paper table.kg-grid tr.po-add-row .po-box-field input[type="search"] { width: 100%; }
/* The foot: the note in place, the totals as the paper's, the delivery a box in its row. */
form.kg-paper .doc-notes p.kg-in input.kg-flat { width: 100%; padding: 4px 7px; text-overflow: ellipsis; }
form.kg-paper .doc-totals dd.kg-in input.kg-flat { width: 8.5rem; min-height: 32px; padding: 4px 7px; text-align: right; font-variant-numeric: tabular-nums; }
/* On a computer a box's words stand where the paper's words stand: the name and the "+ Add product" box under the Item heading, the figures
   under their headings' right edge, the note under its label, the delivery under the totals' figures (the box reaches 8 px into the cell's
   padding: 1 px edge + 7 px inside). The item's name on its own line, its sub-line under it, its items per pack under that (LP9). */
@container (min-width: 641px) {
  form.kg-paper table.kg-grid th.c-item { white-space: normal; }
  form.kg-paper table.kg-grid th.c-item > input.kg-item { display: block; width: calc(100% + 8px); max-width: none; min-width: 0; margin: 0 0 0 -8px; padding: 2px 7px; }
  form.kg-paper table.kg-grid th.c-item > .kg-name { display: block; }
  form.kg-paper table.kg-grid th.c-item > .kg-sub, form.kg-paper table.kg-grid th.c-item > .kg-error { display: block; margin: 2px 0 0; white-space: normal; }
  form.kg-paper table.kg-grid td.num input.kg-flat { margin-right: -8px; padding: 2px 7px; }
  form.kg-paper table.kg-grid tr.po-add-row .po-box-field input[type="search"] { width: calc(100% + 8px); margin-left: -8px; padding-left: 7px; }
}
@media (min-width: 701px) {
  form.kg-paper .doc-notes p.kg-in input.kg-flat { width: calc(100% + 8px); margin-left: -8px; }
  form.kg-paper .doc-totals dd.kg-in input.kg-flat { margin-right: -8px; }
}
/* The tick and the x of a line: there for the mouse and the keys, quiet until the line is pointed at or holds the cursor. */
@media (hover: hover) and (min-width: 701px) {
  form.kg-paper table.kg-grid tr .po-x, form.kg-paper table.kg-grid td.c-no input.kg-tick:not(:checked) { opacity: 0; }
  form.kg-paper table.kg-grid tr:hover .po-x, form.kg-paper table.kg-grid tr:focus-within .po-x, form.kg-paper table.kg-grid .po-x:focus-visible,
  form.kg-paper table.kg-grid tr:hover td.c-no input.kg-tick, form.kg-paper table.kg-grid tr:focus-within td.c-no input.kg-tick { opacity: 1; }
}
/* A touch screen has no hover: its boxes show. */
@media (hover: none) {
  form.kg-paper select.kg-flat, form.kg-paper input.kg-item, form.kg-paper .po-paper-head input.po-box, form.kg-paper input.kg-flat { background-color: var(--ui-bg); }
}
@media (max-width: 700px) {
  /* As specific as the rules they follow (form.kg-doc's 13 px and 34 px; the Codex review, round 1): 16 px text and 44 px boxes on a phone. */
  form.kg-paper table.kg-grid input.kg-flat, form.kg-paper table.kg-grid input.kg-item, form.kg-paper .po-paper-head input.po-box, form.kg-paper .po-paper-head select.kg-flat,
  form.kg-paper .doc-facts dd.kg-in input.kg-flat, form.kg-paper .doc-totals dd.kg-in input.kg-flat, form.kg-paper .doc-notes p.kg-in input.kg-flat,
  form.kg-paper .kg-several input[type="search"] { min-height: 44px; font-size: 16px; }
  form.kg-paper table.kg-grid td.num input.kg-flat, form.kg-paper .doc-totals dd.kg-in input.kg-flat { width: 100%; }
}
/* The bar of the paper's head (po_bar with the editor's Save and Confirm): its unseen Add (Enter is Add) takes no room. */
.po-edit-bar > button.po-default { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
/* The coordinator's walkthrough (LP11): an empty box of the lines shows a faint edge at rest (its placeholder says "0.00" or "0"), so staff
   see where to type; the "I have sent it…" form, open by itself on a confirmed order, is a card under the head (never beside the title). */
form.kg-paper table.kg-grid td.num input.kg-flat:placeholder-shown, form.kg-paper table.kg-grid label.kg-upp input.kg-flat:placeholder-shown { border-color: var(--hairline); }
.po-send { margin: 0 0 20px; }
.po-send > .doc-act-panel { margin: 0; }
/* ==== end lp ====================================================================================================================== */
/* ==== live: who is here on a draft order (live drafts step 3b, branch live-presence-screen; docs/decisions.md LV18-LV25) ==============
   Each person's colour is a class, who-c1 to who-c8 (the number decided by the server, LV7; the CSP allows no inline style): white words on
   each pass WCAG AA (4.5:1). The colour is never the only sign: an outline always has its name tag. app.js's block "live" puts the classes on
   the chips under the title, on a line's row (a 3 px edge), on the box a person is in (an outline) and on the name tag at that box. */
.who-c1 { --who: #1f5fbf; }
.who-c2 { --who: #0f7a5a; }
.who-c3 { --who: #a65c00; }
.who-c4 { --who: #6b3fd4; }
.who-c5 { --who: #c2263d; }
.who-c6 { --who: #0b6e8f; }
.who-c7 { --who: #8f0a71; }
.who-c8 { --who: #5c6b00; }
/* Under the title: the page's sentence with each person a chip (a dot and the name); away: faded; a note and its button under it. */
.live-here { margin: -6px 0 14px; }
.live-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font: 400 13px/22px var(--font); color: var(--ink-body); }
.live-chip { display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px; border: 1px solid var(--hairline); border-radius: var(--r-pill); background: var(--card); color: var(--ink); font-weight: 500; }
.live-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--who); }
.live-chip.live-away { opacity: .55; }
.live-init, .live-more { display: none; }
.live-more { align-items: center; padding: 1px 8px; border: 1px solid var(--hairline); border-radius: var(--r-pill); background: var(--card); color: var(--ink-muted); font: 500 13px/22px var(--font); }
.live-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 0; font: 400 13px/22px var(--font); color: var(--ink-body); }
.live-note .btn { min-height: 32px; }
/* On the lines and in the head: the line's edge, the box's outline and the name tag at its top right. */
tr.live-row > :first-child { box-shadow: inset 3px 0 0 var(--who); }
.live-at { position: relative; outline: 2px solid var(--who); outline-offset: -2px; }
.live-tag { position: absolute; top: -9px; right: 4px; z-index: 3; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; padding: 0 5px; border-radius: var(--r-8); background: var(--who); color: #fff; font: 600 11px/16px var(--font); white-space: nowrap; pointer-events: none; }
/* A phone (rule 14): a line is a card; its edge is the card's left edge and the tag sits at the card's top right. Many people: their
   initials, the 4th on folded into "+N". */
@container (max-width: 640px) {
  table.stack tr.live-row { position: relative; box-shadow: inset 3px 0 0 var(--who); }
  table.stack tr.live-row > :first-child { box-shadow: none; }
}
@media (max-width: 640px) {
  .live-many .live-name { display: none; }
  .live-many .live-init { display: inline; }
  .live-many .live-chip:nth-of-type(n+4) { display: none; }
  .live-more { display: inline-flex; }
  .live-note .btn { min-height: 44px; }
}
/* Each box saved by itself (live.mode on, live drafts step 4; docs/decisions.md LS12): the bar's status in Save's place; a line someone else
   changed flashes once in their colour (no flash with reduced motion); my line kept while someone changed it says so under its name; a clash's
   choice under its line (or head box), in the needs-a-look colours, 44 px buttons on a phone; a box refused keeps its words under it. */
.live-status { display: inline-flex; align-items: center; min-height: 36px; padding: 0 4px; color: var(--ink-muted); font: 500 13px/20px var(--font); }
.live-status.live-unsaved { color: var(--block-ink); }
table.kg-grid tr.live-new > * { animation: live-new 1.6s ease-out 1; }
@keyframes live-new { from { box-shadow: inset 0 0 0 999px color-mix(in srgb, var(--who, #a65c00) 18%, transparent); } to { box-shadow: none; } }
table.kg-grid tr.live-new > :first-child { box-shadow: inset 3px 0 0 var(--who, transparent); }
.live-mark { display: block; color: var(--needs-ink); font-weight: 500; }
tr.live-clash > * { background: var(--needs-bg); }
tr.live-choice-row > td { padding: 8px 12px 12px; background: var(--needs-bg); border-top: 0; }
.live-choice { display: flex; flex-direction: column; gap: 6px; color: var(--needs-ink); font: 400 13px/20px var(--font); }
.live-choice p { margin: 0; }
.live-choice-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.live-choice-box { margin: 6px 0 0; padding: 8px 12px; border: 1px solid var(--needs-line); border-radius: var(--r-8); background: var(--needs-bg); }
.live-refused { display: block; }
details.live-fold { margin: 2px 0 0; }
details.live-fold > summary { color: var(--ink-muted); cursor: pointer; font-size: 12px; }
details.live-fold ul { margin: 4px 0 0; padding-left: 14px; font-size: 12px; color: var(--ink-body); }
@media (prefers-reduced-motion: reduce) { table.kg-grid tr.live-new > * { animation: none; } }
@media (max-width: 640px) {
  .live-choice .btn { min-height: 44px; }
}
/* ==== end live ==================================================================================================================== */
/* ==== Expenses and regular costs (CW-1150; docs/decisions.md EX13, EX14, EX64; the drawings Main and AddExpense of 24 Nov 2026) ========== */
/* Add an expense, an expense's Change, Add a regular cost and a regular cost's Change (EX64; the owner, 25 Nov 2026: "so misaligned,
   everything"). ONE card, drawn by the form's ::before behind the grid areas main .. acts: the shop as buttons in a row (one under the other
   when the card is under 476 px), the fields two cells a row (one under 400 px), each cell's label, box and hint on the row's three lines
   (subgrid), so the boxes of a row line up whatever hints they carry; the credit tick before the amounts; the total box; the dollar hint in
   the info tint; the note; the "same one" tick (when asked) and Save at the card's foot. The invoice file in its own 360 px panel beside the
   card when the page is at least 960 px wide (the drawing), inside the card under a line when narrower. Rows have no gap of their own (an
   empty area costs nothing): each part brings its space. Every rule is scoped to these forms: form.record's own grid (200 px cells, numbered
   fieldsets, a whole line for each choice) stays as it is on every other page. */
form.record:is(.expense-form, .regular-form) {
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "side" "ask" "acts"; gap: 0 24px; align-items: start;
  max-width: 1200px; margin: 0 0 16px;
}
form.record.regular-form { grid-template-areas: "main" "ask" "acts"; max-width: 820px; }
form.record:is(.expense-form, .regular-form)::before {
  content: ""; grid-row: main-start / acts-end; grid-column: main-start / main-end; align-self: stretch;
  border: 1px solid var(--hairline); border-radius: var(--r-14); background: var(--card);
}
form.record:is(.expense-form, .regular-form) > .ex-main {
  grid-area: main; container: ex-main / inline-size; display: grid; gap: 20px; align-content: start; min-width: 0; padding: 24px 24px 0;
}
form.record:is(.expense-form, .regular-form) > label.same-ok { grid-area: ask; margin: 20px 24px 0; }
form.record:is(.expense-form, .regular-form) > p.actions { grid-area: acts; margin: 0; padding: 20px 24px 24px; }
form.record.expense-form > .ex-side { grid-area: side; min-width: 0; margin: 20px 24px 0; padding: 16px 0 0; border-top: 1px solid var(--divider); }
@container (min-width: 960px) {
  form.record.expense-form { grid-template-columns: minmax(0, 1fr) 360px; grid-template-areas: "main side" "ask side" "acts side"; }
  form.record.expense-form > .ex-side { margin: 0; padding: 20px; border: 1px solid var(--hairline); border-radius: var(--r-14); background: var(--card); }
}
@media (max-width: 699.98px) {
  form.record:is(.expense-form, .regular-form) > .ex-main { padding: 16px 16px 0; }
  form.record:is(.expense-form, .regular-form) > label.same-ok { margin: 16px 16px 0; }
  form.record:is(.expense-form, .regular-form) > p.actions { padding: 16px; }
  form.record:is(.expense-form, .regular-form) > p.actions .btn { flex: 1 1 100%; }
  form.record.expense-form > .ex-side { margin: 16px 16px 0; }
}
/* An error, or the "same one" list, above the form is as wide as the form: on the add pages above it, on an expense's or a regular cost's
   page inside the fold of the form it refused (Codex r1 L1). */
.page > :is(p.error, div.same-list):has(~ form.record.expense-form) { max-width: 1200px; }
.page > :is(p.error, div.same-list):has(~ form.record.regular-form) { max-width: 820px; }
details.expense-change > :is(p.error, div.same-list) { max-width: 1200px; }
details.regular-change > :is(p.error, div.same-list) { max-width: 820px; }
details:is(.expense-delete, .regular-amount, .regular-delete) > :is(p.error, div.same-list) { max-width: 820px; }
/* The shop, and a regular cost's VAT: a radio group without a card of its own, its question above it, the choices in a row of equal buttons
   (at most 15rem each, one height when a name wraps: Codex final L2) when the card is at least 476 px wide; a refused choice's buttons
   edged in red. */
form.record:is(.expense-form, .regular-form) fieldset:is(.shop-pick, .vat-pick) {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: stretch; min-width: 0; margin: 0; padding: 0; border: 0;
  border-radius: 0; background: none;
}
form.record:is(.expense-form, .regular-form) fieldset:is(.shop-pick, .vat-pick) > legend { width: 100%; padding: 0 0 8px; color: var(--ink); font: 600 14px/20px var(--font); }
form.record:is(.expense-form, .regular-form) fieldset:is(.shop-pick, .vat-pick) > legend .hint { display: block; margin-top: 2px; font-size: 12px; line-height: 18px; }
form.record:is(.expense-form, .regular-form) fieldset:is(.shop-pick, .vat-pick) > label.choice { grid-column: auto; }
form.record:is(.expense-form, .regular-form) fieldset.shop-pick > label.shop-choice { justify-content: center; gap: 10px; min-height: 48px; padding: 10px 12px; font: 600 15px/20px var(--font); }
form.record:is(.expense-form, .regular-form) label.choice:has(> input[aria-invalid="true"]) { border-color: var(--st-red); box-shadow: 0 0 0 1px var(--st-red); }
@container ex-main (min-width: 476px) {
  form.record:is(.expense-form, .regular-form) fieldset:is(.shop-pick, .vat-pick) { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 15rem); }
}
/* The fields: rows of two cells (div.ex-row > div.field: the label, the box, the hint under the box); the supplier's slot under its box holds
   its hint and "Add it as a new supplier"; a tick is as wide as its words. */
form.record:is(.expense-form, .regular-form) .ex-fields { display: grid; gap: 16px; min-width: 0; }
form.record:is(.expense-form, .regular-form) .ex-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
form.record:is(.expense-form, .regular-form) .ex-fields .field { display: grid; gap: 6px; align-content: start; min-width: 0; }
form.record:is(.expense-form, .regular-form) :is(.field, .ex-under, .ex-credit) > .hint { margin: 0; font-size: 12px; line-height: 18px; }
form.record:is(.expense-form, .regular-form) :is(.ex-under, .ex-credit) { display: grid; gap: 8px; justify-items: start; align-content: start; min-width: 0; }
form.record:is(.expense-form, .regular-form) label.choice.ex-tick { max-width: 100%; }
/* Two cells a row only where subgrid lines their label / box / hint up (Codex r1 L2: without it a wrapped label would set the boxes of a
   row at different heights): elsewhere one cell a row. */
@container ex-main (min-width: 400px) {
  @supports (grid-template-rows: subgrid) {
    form.record:is(.expense-form, .regular-form) .ex-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 6px; }
    form.record:is(.expense-form, .regular-form) .ex-row > .field { grid-row: span 3; grid-template-rows: subgrid; }
    form.record:is(.expense-form, .regular-form) .ex-row:not(:has(.hint)) > .field { grid-row: span 2; }
    form.record.expense-form .ex-row.ex-money > .field:first-child { grid-column: 1 / -1; margin-bottom: 10px; }
  }
}
/* The money row (EX65): Total with VAT | Amount without VAT | VAT, three cells from a 600 px card; between 400 and 600 px the total across
   and the two under it; a row with no hint in either cell takes no empty third line (Fable's Low b on f044e2f). */
@container ex-main (min-width: 600px) {
  @supports (grid-template-rows: subgrid) {
    form.record.expense-form .ex-row.ex-money { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    form.record.expense-form .ex-row.ex-money > .field:first-child { grid-column: auto; margin-bottom: 0; }
  }
}
/* The line that says when the two boxes and the total with VAT disagree (the script fills it; empty, it takes no room). */
form.record.expense-form p.ex-adds-up { margin: 0; color: var(--sf-amber-ink); font: 500 13px/18px var(--font); }
form.record.expense-form p.ex-adds-up:empty { display: none; }
/* The total box (as the drawing: a quiet panel, the words left and the sum right), the dollar hint in the info tint. */
form.record.expense-form p.expense-total {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; padding: 12px 14px;
  border: 1px solid var(--divider); border-radius: var(--r-8); background: var(--page-alt); color: var(--ink-body);
}
form.record.expense-form p.expense-total output { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
form.record.expense-form p.expense-dollar { margin: 0; }
/* The invoice file: its title, the box as a dashed place to drop the PDF or photo on (a browser takes a file dropped on the box itself; its
   edge in the accent, at least 3:1 like every field's edge) with the drawing's "Drop the PDF or photo here" over it (the words let a drop and
   a click through to the box; the box stays first for the keyboard, named by its label and hint), 300 px high on a wide page as the drawing
   (Codex r1 L3); the words and the box's button start at the same left edge (a browser keeps a file box's contents at its start). The box
   spans both rows of div.ex-drop, so the whole dashed place is the box; its button sits in the first row and the words, IN FLOW, in the
   second, under it: their real height at any text size and width sets the place's height, so they never run into "Choose file" (Codex final
   L3 and its re-check; words above the button would need room reserved by guess, since a file box's button always sits at its top). Its hint
   under it, "Save without a file" when asked, then "kept with the expense". */
form.record.expense-form fieldset.expense-file {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; min-width: 0; margin: 0; padding: 0; border: 0;
  border-radius: 0; background: none;
}
form.record.expense-form fieldset.expense-file > legend { width: 100%; padding: 0 0 6px; color: var(--ink); font: 600 14px/20px var(--font); }
form.record.expense-form fieldset.expense-file > p { margin: 0; }
form.record.expense-form fieldset.expense-file > p.muted { font-size: 12px; line-height: 18px; }
form.record.expense-form .ex-drop { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 78px auto; min-width: 0; }
form.record.expense-form .ex-drop > input[type="file"] {
  grid-row: 1 / 3; grid-column: 1; align-self: stretch; min-height: 0; padding: 22px 16px 0; border: 2px dashed var(--accent);
  border-radius: var(--r-10); background: var(--page-alt); color: var(--ink-body); text-align: left; cursor: pointer;
}
form.record.expense-form .ex-drop > input[type="file"]:hover { border-color: var(--accent-hover); background: var(--accent-soft); }
form.record.expense-form .ex-drop > .ex-drop-words {
  grid-row: 2; grid-column: 1; align-self: start; min-width: 0; margin: 0 18px; padding: 0 0 22px; color: var(--ink-muted);
  font: 400 14px/1.4 var(--font); overflow-wrap: anywhere; pointer-events: none;
}
form.record.expense-form .ex-drop > input[type="file"]::file-selector-button {
  margin: 0 12px 0 0; padding: 8px 16px; border: 1px solid var(--hairline); border-radius: var(--r-10); background: var(--card); color: var(--ink);
  font: 600 14px/20px var(--font); cursor: pointer;
}
@container (min-width: 960px) {
  form.record.expense-form .ex-drop { grid-template-rows: 172px auto; }
  form.record.expense-form .ex-drop > input[type="file"] { min-height: 300px; padding-top: 116px; }
}
/* The Expenses list's figures. */
section.expense-figs .doc-step-big { font-variant-numeric: tabular-nums; }
/* ==== end expenses ================================================================================================================= */
