/* ============================================================================
   ETEI design layer — the approved visual system (docs/DESIGN.md, CLAUDE.md §3).

   Tokens, base, component layer, matrix, drag states and phone frame: from the design reference
   (docs/etei-prototype.html), checked against the prototype's own source (LRQA DESIGN
   PROTOTYPING/src/index.css, tailwind.config.js, design/tokens.ts) and corrected where the two
   differ, the source winning. The shell section is measured from the prototype's Shell.tsx,
   Launchpad.tsx and Toasts.tsx. Colours only through rgb(var(--c-token)).
   ============================================================================ */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ── Tokens (Appendix A of DESIGN_GUIDELINES.md) ─────────────────────────── */
:root {
  color-scheme: light;
  /* Brand colours from the ETEI logo (review of 2026-10-09: "too much white"): its navy, and the
     teal gradient of the stroke in the E, from #2DC6A7 through #1AAB9C to #0B7C8C. */
  --c-brand: 11 124 140; --c-brand2: 8 100 114; --c-brandInk: 11 32 57; --c-brandTint: 223 244 240; --c-brandLine: 150 216 203; --c-mineCol: 236 249 246;
  --c-accent: 45 198 167; --c-accent2: 26 171 156; --c-navy: 11 32 57; --c-navy2: 18 50 82;
  --brand-grad: linear-gradient(135deg, rgb(45 198 167) 0%, rgb(26 171 156) 45%, rgb(11 124 140) 100%);
  --navy-grad: linear-gradient(160deg, rgb(11 32 57) 0%, rgb(16 45 76) 60%, rgb(12 64 84) 100%);
  --c-ink: 20 32 47; --c-ink2: 58 72 89; --c-ink3: 98 113 130;
  --c-paper: 255 255 255; --c-field: 239 245 248; --c-sunk: 231 239 243; --c-portal: 231 239 243;
  --c-rule: 200 213 222; --c-rule2: 225 233 239; --c-hover: 237 246 246; --c-navHover: 225 233 239; --c-used: 160 174 186; --c-gray: 132 146 160;
  --c-hold: 215 0 21; --c-holdBg: 255 235 236; --c-holdLine: 255 199 203;
  --c-due: 178 80 0; --c-dueBg: 255 243 229; --c-dueLine: 255 217 174;
  --c-ok: 0 125 50; --c-okBg: 230 246 235; --c-okLine: 183 228 196;
  --c-info: 78 69 214; --c-infoBg: 239 238 253; --c-infoLine: 210 206 248;
  --c-onDarkDue: 255 179 64;
  /* Forms v1.2 (project lead's review, 18 October 2026): fields and grids that can be seen. */
  --c-fieldLine: 128 147 162; --c-pickTint: 232 246 243; --c-gridLine: 208 219 227; --c-headFill: 228 240 242;
  --c-bandInk: 255 255 255; --c-bandInk2: 205 222 230; --c-bandLine: 255 255 255;
  --c-sealOk: 120 230 160; --c-sealDue: 252 208 92; --c-sealHold: 255 150 150; --c-sealMute: 190 205 214;  /* the status stamp on the navy band (feedback 59) */
  --c-focus: 11 32 57;  /* the keyboard focus ring (feedback 95): navy on light surfaces */
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, "Cascadia Mono", Consolas, monospace;
  --sh-card: 0 0 0 .5px rgb(0 0 0 / .07), 0 1px 3px rgb(0 0 0 / .05);
  --sh-pop: 0 0 0 .5px rgb(0 0 0 / .12), 0 12px 40px rgb(0 0 0 / .16);
  --sh-thumb: 0 0 0 .5px rgb(0 0 0 / .06), 0 1px 3px rgb(0 0 0 / .14);
  --ease: cubic-bezier(.2,.9,.25,1);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --c-brand: 45 198 167; --c-brand2: 82 214 186; --c-brandInk: 245 245 247; --c-brandTint: 14 52 56; --c-brandLine: 24 96 98; --c-mineCol: 13 38 44;
  --c-accent: 45 198 167; --c-accent2: 26 171 156; --c-navy: 6 18 33; --c-navy2: 12 32 54;
  --brand-grad: linear-gradient(135deg, rgb(45 198 167) 0%, rgb(26 171 156) 45%, rgb(11 124 140) 100%);
  --navy-grad: linear-gradient(160deg, rgb(6 18 33) 0%, rgb(10 30 52) 60%, rgb(8 44 58) 100%);
  --c-ink: 245 245 247; --c-ink2: 209 209 214; --c-ink3: 152 152 157;
  --c-paper: 28 28 30; --c-field: 44 44 46; --c-sunk: 17 17 19; --c-portal: 17 17 19;
  --c-rule: 72 72 74; --c-rule2: 46 46 48; --c-hover: 42 42 44; --c-navHover: 46 46 48; --c-used: 99 99 102;
  --c-hold: 255 105 97; --c-holdBg: 59 28 30; --c-holdLine: 107 42 46;
  --c-due: 255 179 64; --c-dueBg: 58 42 20; --c-dueLine: 106 74 28;
  --c-ok: 48 209 88; --c-okBg: 21 48 31; --c-okLine: 36 82 50;
  --c-info: 154 153 255; --c-infoBg: 35 33 63; --c-infoLine: 61 58 115;
  --c-fieldLine: 118 122 128; --c-pickTint: 20 46 50; --c-gridLine: 62 62 66; --c-headFill: 34 44 48;
  --c-bandInk: 245 245 247; --c-bandInk2: 175 196 204; --c-bandLine: 255 255 255;
  --c-sealOk: 120 230 160; --c-sealDue: 252 208 92; --c-sealHold: 255 150 150; --c-sealMute: 190 205 214;  /* the status stamp on the navy band (feedback 59) */
  --c-focus: 45 198 167;
}

/* ── Base ────────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: rgb(var(--c-sunk)); color: rgb(var(--c-ink)); font-family: var(--sans); font-size: 13px; line-height: 16px; letter-spacing: -.003em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3 { color: rgb(var(--c-brandInk)); font-family: var(--display); margin: 0; }
a { color: rgb(var(--c-brand)); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; letter-spacing: inherit; color: inherit; }
::selection { background: rgb(var(--c-brand) / .22); }
:focus-visible { outline: 2px solid rgb(var(--c-focus)); outline-offset: 2px; }
svg.i { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── Component layer (Appendix B) ───────────────────────────────────────── */
.id { font-family: var(--mono); font-size: 12px; font-weight: 500; white-space: nowrap; letter-spacing: normal; }
.sub { display: block; font-size: 11px; line-height: 14px; color: rgb(var(--c-ink3)); margin-top: 2px; font-weight: 400; font-family: var(--sans); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; padding: 0 14px; border-radius: 999px; border: 0; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; user-select: none; color: rgb(var(--c-ink)); background: rgb(var(--c-ink) / .06); transition: background-color .15s, transform .15s, box-shadow .15s; }
.btn svg.i { font-size: 14px; }
.btn:hover:not(:disabled) { background: rgb(var(--c-ink) / .10); }
.btn:active:not(:disabled) { background: rgb(var(--c-ink) / .14); transform: scale(.97); }
.btn:disabled { cursor: not-allowed; opacity: .4; }
.btn-pri { background: rgb(var(--c-brand)); color: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
.btn-pri:hover:not(:disabled), .btn-pri:active:not(:disabled) { background: rgb(var(--c-brand2)); }
.btn-sm { height: 22px; padding: 0 10px; font-size: 12px; }
.btn-sm svg.i { font-size: 13px; }
.btn-tint { background: rgb(var(--c-brand) / .12); color: rgb(var(--c-brand)); }
.btn-tint:hover:not(:disabled) { background: rgb(var(--c-brand) / .18); }
.btn-ghost { background: transparent; }
.btn-danger { color: rgb(var(--c-hold)); background: rgb(var(--c-hold) / .10); }
.btn-danger:hover:not(:disabled) { background: rgb(var(--c-hold) / .16); }

.panel { background: rgb(var(--c-paper)); border-radius: 12px; box-shadow: var(--sh-card); margin-bottom: 16px; overflow: hidden; }
.panel-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; font-size: 13px; font-weight: 600; color: rgb(var(--c-ink)); }
.panel-h a, .panel-h .lnk { font-size: 12px; font-weight: 400; color: rgb(var(--c-brand)); }
.filters { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid rgb(var(--c-rule2)); }
.pill { height: 26px; padding: 0 12px; border-radius: 999px; border: 0; font-size: 12px; color: rgb(var(--c-ink2)); background: rgb(var(--c-ink) / .05); cursor: pointer; white-space: nowrap; }
.pill:hover { background: rgb(var(--c-ink) / .09); }
.pill-on, .pill-on:hover { background: rgb(var(--c-ink)); color: rgb(var(--c-paper)); font-weight: 500; }
.ct { font-size: 12px; color: rgb(var(--c-ink3)); font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: rgb(var(--c-ink) / .06); gap: 2px; }
.seg > button { height: 24px; padding: 0 12px; border-radius: 7px; border: 0; background: transparent; font-size: 12px; color: rgb(var(--c-ink2)); white-space: nowrap; cursor: pointer; transition: all .15s; display: inline-flex; align-items: center; gap: 6px; }
.seg > button:hover { color: rgb(var(--c-ink)); }
.seg > button.on { background: rgb(var(--c-paper)); color: rgb(var(--c-ink)); font-weight: 500; box-shadow: var(--sh-thumb); }
.tabs { display: inline-flex; padding: 2px; border-radius: 9px; background: rgb(var(--c-ink) / .06); gap: 2px; }
.tab { height: 26px; padding: 0 14px; border-radius: 7px; border: 0; background: transparent; font-size: 12.5px; color: rgb(var(--c-ink2)); cursor: pointer; }
.tab-on { background: rgb(var(--c-paper)); color: rgb(var(--c-ink)); font-weight: 500; box-shadow: var(--sh-thumb); }

table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-size: 11px; font-weight: 600; color: rgb(var(--c-ink3)); padding: 8px 12px; border-bottom: 1px solid rgb(var(--c-rule2)); white-space: nowrap; background: rgb(var(--c-paper)); }
table.t th:first-child, table.t td:first-child { padding-left: 16px; }
table.t th:last-child, table.t td:last-child { padding-right: 16px; }
table.t td { padding: 0 12px; height: 40px; border-bottom: 1px solid rgb(var(--c-rule2)); vertical-align: middle; }
table.t td.tall { padding-top: 8px; padding-bottom: 8px; height: auto; }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t tbody tr.hov:hover td { background: rgb(var(--c-hover)); cursor: pointer; }
tr.r-hold td { background: rgb(var(--c-holdBg) / .5); }
tr.r-due td { background: rgb(var(--c-dueBg) / .6); }
tr.grp td { background: rgb(var(--c-field)); font-size: 11px; font-weight: 600; color: rgb(var(--c-ink2)); height: 26px; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 20px; font-size: 11px; font-weight: 600; padding: 0 8px; border-radius: 999px; white-space: nowrap; }
.chip-hold::before, .chip-due::before, .chip-ok::before, .chip-info::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-hold { background: rgb(var(--c-holdBg)); color: rgb(var(--c-hold)); }
.chip-due { background: rgb(var(--c-dueBg)); color: rgb(var(--c-due)); }
.chip-ok { background: rgb(var(--c-okBg)); color: rgb(var(--c-ok)); }
.chip-info { background: rgb(var(--c-infoBg)); color: rgb(var(--c-info)); }
.chip-mute { background: rgb(var(--c-ink) / .06); color: rgb(var(--c-ink2)); font-weight: 500; }
.chip-brand { background: rgb(var(--c-brandTint)); color: rgb(var(--c-brand)); }
.dl { font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dl b { font-weight: 600; } .dl s { text-decoration: none; font-size: 11px; color: rgb(var(--c-ink3)); margin-left: 4px; }
.dl-hold b { color: rgb(var(--c-hold)); } .dl-due b { color: rgb(var(--c-due)); } .dl-ok b { color: rgb(var(--c-ink2)); }

.tblock { display: grid; background: rgb(var(--c-paper)); border-radius: 12px; box-shadow: var(--sh-card); margin-bottom: 16px; overflow: hidden; }
.tblock > div { padding: 10px 16px; border-right: 1px solid rgb(var(--c-rule2)); min-width: 0; }
.tblock > div:last-child { border-right: 0; }
.tblock dt { font-size: 11px; color: rgb(var(--c-ink3)); margin-bottom: 4px; }
.tblock dd { font-family: var(--mono); font-size: 12.5px; font-weight: 500; margin: 0; color: rgb(var(--c-ink)); white-space: nowrap; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.tile { background: rgb(var(--c-paper)); border-radius: 12px; box-shadow: var(--sh-card); padding: 14px 16px; }
.tile dt { font-size: 12px; color: rgb(var(--c-ink3)); margin-bottom: 8px; font-weight: 500; }
.tile .n { font-family: var(--display); font-size: 28px; font-weight: 600; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile .s { font-size: 12px; color: rgb(var(--c-ink3)); margin-top: 8px; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid rgb(var(--c-rule2)); }
.row:last-child { border-bottom: 0; }
.row .tx { flex: 1; min-width: 0; }
.row .tx strong { display: block; font-weight: 500; font-size: 13px; }
.row .tx span { font-size: 11px; line-height: 14px; color: rgb(var(--c-ink3)); }
.lbl { display: block; font-size: 12px; color: rgb(var(--c-ink2)); margin-bottom: 4px; font-weight: 500; }
/* One font for every value typed or chosen (tester feedback 7, DESIGN.md §10.7): .inp sets its own family and weight, so an
   identifier field ("inp id") or a pasted mono style does not change it. Monospace stays only in the Pick code column. */
.inp { width: 100%; height: 28px; border-radius: 7px; border: 0; padding: 0 10px; font-family: var(--sans); font-size: 13px; font-weight: 400; letter-spacing: -.003em; background: rgb(var(--c-paper)); color: rgb(var(--c-ink)); box-shadow: inset 0 0 0 1px rgb(var(--c-rule)); transition: box-shadow .15s; }
textarea.inp { height: auto; padding: 6px 10px; }
.inp[readonly] { background: rgb(var(--c-field)); color: rgb(var(--c-ink2)); box-shadow: none; }
.hint { font-size: 11px; line-height: 14px; color: rgb(var(--c-ink3)); margin-top: 4px; }
/* Point 20: a certificate copy read on the server. The note under the copy, and the mark beside a field filled from it. */
.readnote { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; font-size: 12px; line-height: 16px; color: rgb(var(--c-ink2)); }
.readnote .i { width: 14px; height: 14px; color: rgb(var(--c-brand)); }
.readnote-hint { flex-basis: 100%; color: rgb(var(--c-ink3)); }
.readnote-dot { width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--c-brand)); animation: readpulse 1.2s ease-in-out infinite; }
@keyframes readpulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .readnote-dot { animation: none; } }
.readnote-warn { margin-top: 8px; }
.readmark { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; font-size: 10px; line-height: 16px; font-weight: 600; text-transform: none; letter-spacing: 0;
  background: rgb(var(--c-brandTint)); color: rgb(var(--c-brand)); vertical-align: 1px; }
.readmark-check { background: rgb(var(--c-dueBg)); color: rgb(var(--c-due)); }
.readtext { margin: 0; padding: 12px 16px; max-height: 360px; overflow: auto; font-family: var(--mono); font-size: 12px; line-height: 17px; white-space: pre-wrap; overflow-wrap: anywhere; color: rgb(var(--c-ink2)); background: rgb(var(--c-ink) / .03); }
.look-thumb { width: 56px; height: 72px; object-fit: cover; border-radius: 4px; display: block; }
.panel-flag { box-shadow: 0 0 0 2px rgb(var(--c-brand) / .5); }
details.adv > summary { cursor: pointer; list-style: none; }
details.adv > summary::-webkit-details-marker { display: none; }
details.adv > summary::before { content: '▸'; margin-right: 8px; color: rgb(var(--c-ink3)); }
details.adv[open] > summary::before { content: '▾'; }
/* Teaching a template from a sample (the lead's addendum to point 20): the page with its words as boxes, the fields beside it. */
.teach { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 16px; align-items: start; }
.teach-page { overflow: hidden; }
.teach-sheets { border-radius: 4px; }
.teach-sheets:focus-visible { outline: 2px solid rgb(var(--c-focus)); outline-offset: -2px; }
.teach-sheet { position: relative; user-select: none; margin: 12px 16px; border: 1px solid rgb(var(--c-ink) / .1); }
.teach-cursor { margin: 0 16px 8px; }
.tw-cursor { outline: 2px solid rgb(var(--c-brand)); outline-offset: 1px; }
.teach-sheet img { display: block; width: 100%; height: auto; }
.tw { position: absolute; padding: 0; margin: 0; border: 1px solid transparent; border-radius: 2px; background: transparent; cursor: pointer; }
.tw:hover { border-color: rgb(var(--c-brand) / .6); background: rgb(var(--c-brand) / .08); }
.tw-on { border-color: rgb(var(--c-brand)); background: rgb(var(--c-brand) / .25); }
.tw-taken { border-color: rgb(var(--c-ok) / .7); background: rgb(var(--c-ok) / .15); }
.tw-phrase { border-color: rgb(var(--c-due)); background: rgb(var(--c-due) / .2); }
.teach-text, .teach-adv { margin: 0 16px 12px; font-size: 12px; }
.teach-text summary, .teach-adv summary { cursor: pointer; color: rgb(var(--c-ink2)); padding: 6px 0; }
.teach-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.teach-side .panel { margin: 0; }
.tf { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; padding: 8px 16px; border: 0; border-top: 1px solid rgb(var(--c-ink) / .06); background: transparent; cursor: pointer; font: inherit; color: inherit; }
.tf:hover { background: rgb(var(--c-ink) / .03); }
.tf-on { background: rgb(var(--c-brandTint)); box-shadow: inset 3px 0 0 rgb(var(--c-brand)); }
.tf-name { font-size: 12px; font-weight: 600; color: rgb(var(--c-ink2)); }
.tf-value { font-size: 13px; overflow-wrap: anywhere; }
.teach-phrases { display: flex; flex-direction: column; gap: 6px; padding: 10px 16px; }
@media (max-width: 1100px) { .teach { grid-template-columns: minmax(0, 1fr); } }
.note { background: rgb(var(--c-paper) / .6); border-radius: 12px; padding: 12px 16px; font-size: 12px; line-height: 17px; color: rgb(var(--c-ink2)); margin-bottom: 16px; box-shadow: inset 0 0 0 .5px rgb(var(--c-rule)); }
.note b { color: rgb(var(--c-ink)); font-weight: 600; }
/* What is used of an order: invoiced, then committed, against its value, with the warning level marked (prototype BalanceBar). */
.bbar { position: relative; height: 8px; width: 100%; min-width: 80px; background: rgb(var(--c-field)); border: 1px solid rgb(var(--c-rule2)); border-radius: 2px; overflow: hidden; }
.bbar > .u, .bbar > .c { position: absolute; top: 0; bottom: 0; }
.bbar > .u { left: 0; background: rgb(var(--c-used)); }
.bbar > .c { background: rgb(var(--c-brandLine)); }
.bbar > .w { position: absolute; top: -2px; bottom: -2px; width: 1px; background: rgb(var(--c-ink)); }
.swatch { display: inline-block; width: 12px; height: 8px; margin-right: 4px; vertical-align: middle; }
.legend { display: flex; gap: 6px 20px; flex-wrap: wrap; padding: 10px 16px; font-size: 11px; color: rgb(var(--c-ink3)); border-top: 1px solid rgb(var(--c-rule2)); align-items: center; }
.refusal, .warnbox, .okbox { border-radius: 12px; padding: 12px 16px; font-size: 13px; color: rgb(var(--c-ink)); line-height: 18px; }
.refusal { background: rgb(var(--c-holdBg)); } .warnbox { background: rgb(var(--c-dueBg)); } .okbox { background: rgb(var(--c-okBg)); }
.refusal-h, .warnbox-h, .okbox-h { font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.refusal-h svg.i, .warnbox-h svg.i, .okbox-h svg.i { font-size: 15px; }
.refusal-h { color: rgb(var(--c-hold)); } .warnbox-h { color: rgb(var(--c-due)); } .okbox-h { color: rgb(var(--c-ok)); }
.refusal ul { margin: 0; padding-left: 20px; list-style: disc; font-size: 12px; line-height: 15px; }
.refusal ul li + li { margin-top: 2px; }
.refusal ul li::marker { color: rgb(var(--c-hold)); }
.box-body { font-size: 12px; line-height: 15px; color: rgb(var(--c-ink2)); }
.glass { background: rgb(var(--c-paper) / .72); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); box-shadow: inset 0 0 0 .5px rgb(255 255 255 / .45), 0 0 0 .5px rgb(0 0 0 / .08), 0 8px 30px rgb(0 0 0 / .08); }
:root[data-theme="dark"] .glass { box-shadow: inset 0 0 0 .5px rgb(255 255 255 / .10), 0 0 0 .5px rgb(0 0 0 / .5), 0 8px 30px rgb(0 0 0 / .4); }
.glass-bar { background: rgb(var(--c-sunk) / .72); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.mi { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 6px 10px; border-radius: 8px; border: 0; background: transparent; font-size: 12.5px; color: rgb(var(--c-ink)); cursor: pointer; }
.mi.dis { color: rgb(var(--c-ink3)); }
.avatar { border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 600; background: linear-gradient(#A1A1A6, #7C7C80); flex: none; }
.badge { min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: rgb(var(--c-hold)); color: #fff; font-size: 10px; font-weight: 600; display: inline-grid; place-items: center; }

/* ITP matrix */
.mx-wrap { overflow: auto; max-height: calc(100vh - 330px); min-height: 360px; border-top: 1px solid rgb(var(--c-rule2)); }
table.mx { border-collapse: separate; border-spacing: 0; font-size: 13px; width: 100%; }
table.mx th, table.mx td { border-bottom: 1px solid rgb(var(--c-rule2)); border-right: 1px solid rgb(var(--c-rule2)); padding: 7px 9px; vertical-align: top; background: rgb(var(--c-paper)); }
table.mx thead th { position: sticky; top: 0; z-index: 3; background: rgb(var(--c-paper) / .85); backdrop-filter: blur(16px); font-size: 11px; font-weight: 600; color: rgb(var(--c-ink3)); text-align: left; border-bottom: 1px solid rgb(var(--c-rule)); }
table.mx thead th.p { text-align: center; width: 96px; min-width: 96px; line-height: 1.25; cursor: pointer; vertical-align: bottom; color: rgb(var(--c-ink2)); }
table.mx thead th.p:hover { background: rgb(var(--c-field)); }
table.mx thead th.p.mine { background: rgb(var(--c-brandTint)); color: rgb(var(--c-brand)); box-shadow: inset 0 -2px 0 rgb(var(--c-brand)); }
table.mx thead th.p .ours { display: block; margin-top: 4px; font-size: 9.5px; letter-spacing: .08em; font-weight: 700; }
table.mx tbody tr:not(.grp):hover td:not(.gate):not(.unres):not(.mine) { background: rgb(var(--c-hover)); }
table.mx td.mine { background: rgb(var(--c-mineCol)); }
table.mx .sk1 { position: sticky; left: 0; z-index: 2; width: 56px; min-width: 56px; }
table.mx .sk2 { position: sticky; left: 56px; z-index: 2; width: 280px; min-width: 280px; box-shadow: 1px 0 0 rgb(var(--c-rule)); }
table.mx thead .sk1, table.mx thead .sk2 { z-index: 4; }
table.mx tr.grp td { background: rgb(var(--c-field)); font-weight: 600; font-size: 12px; color: rgb(var(--c-ink)); }
.mx .act { font-weight: 500; line-height: 1.35; }
.mx .meta { font-size: 11px; color: rgb(var(--c-ink3)); line-height: 1.45; margin-top: 3px; }
.mx td.cell { text-align: center; vertical-align: middle; font-family: var(--mono); font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.mx td.cell.na { color: rgb(var(--c-ink3)); font-weight: 400; font-size: 11.5px; }
.mx td.cell.gate { background: rgb(var(--c-holdBg)); color: rgb(var(--c-hold)); box-shadow: inset 0 -3px 0 rgb(var(--c-hold)); }
.mx td.cell .ex { display: block; font-size: 10px; font-weight: 400; color: rgb(var(--c-ink3)); margin-top: 1px; }
.mx td.cell.gate .ex { color: rgb(var(--c-hold)); opacity: .85; }
.mx td.cell.unres { background: rgb(var(--c-dueBg)); color: rgb(var(--c-due)); outline: 1.5px dashed rgb(var(--c-due)); outline-offset: -5px; }
.mx td.cell .tick { display: block; font-family: var(--sans); font-size: 10px; font-weight: 500; color: rgb(var(--c-ok)); margin-top: 1px; }
.mx td.cell.sel { box-shadow: inset 0 0 0 2px rgb(var(--c-ink3) / .55); background: rgb(var(--c-ink) / .06); }
.sw { width: 18px; height: 16px; border-radius: 4px; display: inline-grid; place-items: center; font-size: 9px; font-weight: 700; font-family: var(--mono); vertical-align: -3px; margin-right: 5px; box-shadow: inset 0 0 0 1px rgb(var(--c-rule)); }
.sw.gate { background: rgb(var(--c-holdBg)); color: rgb(var(--c-hold)); box-shadow: inset 0 -2px 0 rgb(var(--c-hold)); }
.sw.unres { background: rgb(var(--c-dueBg)); color: rgb(var(--c-due)); box-shadow: inset 0 0 0 1px rgb(var(--c-dueLine)); }
.sw.mine { background: rgb(var(--c-brandTint)); box-shadow: inset 0 0 0 1px rgb(var(--c-brandLine)); }

/* Drag states */
.lifted { transform: scale(1.03) rotate(.4deg); box-shadow: var(--sh-pop); border-radius: 12px; cursor: grabbing; }
.origin { opacity: .35; }
.drop-ok { background: rgb(var(--c-ink) / .045) !important; box-shadow: inset 0 0 0 1.5px rgb(var(--c-ink3) / .5) !important; }
.drop-no { background: rgb(var(--c-holdBg) / .5) !important; box-shadow: inset 0 0 0 1.5px rgb(var(--c-hold) / .45) !important; }
.why-tip { display: inline-flex; gap: 6px; align-items: flex-start; background: rgb(var(--c-paper)); color: rgb(var(--c-hold)); font-size: 12px; font-weight: 500; line-height: 16px; padding: 6px 10px; border-radius: 10px; box-shadow: var(--sh-pop); max-width: 320px; }

/* Phone */
.phone { width: 372px; border-radius: 56px; padding: 11px; background: #1B1B1D; box-shadow: inset 0 0 0 1.5px #3A3A3C, 0 0 0 1px #0E0E0F, 0 30px 60px rgb(0 0 0 / .22); flex: none; }
.phone-screen { border-radius: 46px; overflow: hidden; background: rgb(var(--c-sunk)); position: relative; height: 760px; }
.island { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 112px; height: 32px; border-radius: 20px; background: #000; z-index: 3; }
.ph-status { position: absolute; top: 0; left: 0; right: 0; height: 50px; padding: 0 32px; display: flex; align-items: center; font-size: 15px; font-weight: 600; }
.ph-body { position: absolute; inset: 50px 0 0; overflow: hidden; }
.ph-group { margin: 0 16px 16px; background: rgb(var(--c-paper)); border-radius: 16px; }
.ph-big { margin: 0 16px 12px; width: calc(100% - 32px); height: 50px; border-radius: 14px; border: 0; font-size: 16px; font-weight: 600; background: rgb(var(--c-brand)); color: #fff; }
.ph-tabs { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); border-radius: 999px; padding: 4px; display: flex; gap: 4px; z-index: 3; }
.ph-tabs span { width: 86px; height: 52px; border-radius: 999px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; font-weight: 500; color: rgb(var(--c-ink2)); position: relative; }
.ph-tabs span svg.i { font-size: 21px; }
.ph-tabs span.on { background: rgb(var(--c-ink) / .08); color: rgb(var(--c-brand)); }
.ph-home { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 134px; height: 5px; border-radius: 9px; background: rgb(var(--c-ink)); }


@keyframes slidein { from { transform: translateY(-8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes panelin { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Motion classes (DESIGN.md §15) ─────────────────────────────────────── */
.slidein { animation: slidein .22s cubic-bezier(.2,.9,.3,1.2); }
.fadein { animation: fadein .18s ease-out; }
.sheet-in { animation: sheet .26s var(--ease); }
.panel-in { animation: panelin .22s var(--ease); }

/* ============================================================================
   Application shell — measured from the prototype's Shell.tsx, Launchpad.tsx and Toasts.tsx
   (LRQA DESIGN PROTOTYPING/src/app), DESIGN.md §8.
   ============================================================================ */
.app { height: 100%; display: flex; background: rgb(var(--c-sunk)); }
.app-main { flex: 1; min-width: 0; overflow: auto; position: relative; }
.page { padding: 12px 28px 40px; max-width: 1520px; }

/* Sidebar: floating glass, 236 px, 8 px from the window, radius 18 */
.sidebar { width: 236px; flex: none; margin: 8px 0 8px 8px; border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; }
.sidebar .logo { padding: 16px 16px 12px; display: flex; align-items: center; }
.sidebar .logo img { height: 17px; width: auto; display: block; }
.sidebar nav { flex: 1; overflow-y: auto; padding: 0 10px 12px; }
.side-group { margin-top: 12px; }
.side-group:first-child { margin-top: 4px; }
.side-group h5 { margin: 0 0 4px; padding: 0 10px; font-size: 11px; font-weight: 600; color: rgb(var(--c-ink3)); }
.side-item { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 10px; border-radius: 9px; font-size: 13px; color: rgb(var(--c-ink)); text-decoration: none; transition: background-color .15s; }
.side-item:hover { background: rgb(var(--c-ink) / .05); text-decoration: none; }
.side-item.on { background: rgb(var(--c-brand) / .13); font-weight: 600; }
.side-item > svg.i { color: rgb(var(--c-brand)); font-size: 16px; }
.side-item .lb { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-item i { font-style: normal; font-size: 12px; color: rgb(var(--c-ink3)); font-variant-numeric: tabular-nums; }

/* The office switcher at the top of the sidebar */
.office-wrap { position: relative; padding: 0 10px; margin-bottom: 4px; }
.office-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 10px; background: rgb(var(--c-ink) / .05); text-align: left; cursor: pointer; }
.office-btn:hover { background: rgb(var(--c-ink) / .08); }
.office-btn .pin { width: 28px; height: 28px; border-radius: 8px; background: rgb(var(--c-brand)); color: #fff; display: grid; place-items: center; font-size: 14px; flex: none; }
.office-btn .who, .user-btn .who { flex: 1; min-width: 0; line-height: 1.25; }
.who b { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who span { font-size: 11px; color: rgb(var(--c-ink3)); }
.office-btn > svg.i:last-child, .user-btn > svg.i:last-child { font-size: 14px; color: rgb(var(--c-ink3)); }

/* The user, at the foot of the sidebar or the end of the toolbar */
.user-wrap { position: relative; padding: 10px; border-top: 1px solid rgb(var(--c-ink) / .07); }
.user-wrap.compact { padding: 0; border-top: 0; }
.user-btn { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 0; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; color: rgb(var(--c-ink)); }
.user-wrap:not(.compact) .user-btn { width: 100%; }
.user-btn:hover { background: rgb(var(--c-ink) / .05); }

/* Popovers and menu rows (Shell.tsx Popover, MenuRow) */
.popover { position: absolute; top: calc(100% + 8px); z-index: 40; border-radius: 14px; padding: 6px; color: rgb(var(--c-ink)); }
.popover.up { top: auto; bottom: calc(100% + 8px); }
.popover-h { padding: 4px 8px 6px; font-size: 11px; font-weight: 600; color: rgb(var(--c-ink3)); }
.menu-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; text-align: left; color: rgb(var(--c-ink)); cursor: pointer; }
.menu-row:hover { background: rgb(var(--c-brand)); color: #fff; }
.menu-row .chk { width: 14px; flex: none; color: rgb(var(--c-brand)); font-size: 14px; }
.menu-row:hover .chk { color: #fff; }
.menu-row .tx { flex: 1; }
.menu-row .tx b { display: block; font-size: 13px; font-weight: 500; }
.menu-row .tx span, .menu-row .aside { font-size: 11px; opacity: .7; }
.menu-sep { height: 1px; background: rgb(var(--c-ink) / .08); margin: 6px 8px; }

/* Toolbar: 56 px of glass over the scrolling content */
.toolbar { position: sticky; top: 0; z-index: 30; height: 56px; display: flex; align-items: center; gap: 8px; padding: 0 20px; }
.toolbar .flex { flex: 1; }
.toolbar .logo { margin: 0 4px; display: flex; align-items: center; }
.toolbar .logo img { height: 15px; width: auto; display: block; }
.icon-btn { width: 32px; height: 32px; border: 0; border-radius: 50%; display: grid; place-items: center; background: transparent; color: rgb(var(--c-ink2)); font-size: 17px; cursor: pointer; transition: background-color .15s; }
.icon-btn:hover { background: rgb(var(--c-ink) / .07); }
.icon-btn:active { background: rgb(var(--c-ink) / .12); }
.btn > svg.i.brand { color: rgb(var(--c-brand)); }
.btn > svg.i.quiet { color: rgb(var(--c-ink3)); font-size: 13px; }
.seg.nav-switch { margin-right: 4px; }
.seg > button svg.i { font-size: 13px; }
.crumbs { display: flex; align-items: center; gap: 4px; margin-right: 8px; font-size: 12.5px; color: rgb(var(--c-ink3)); white-space: nowrap; }
.crumbs a { display: flex; align-items: center; gap: 4px; color: rgb(var(--c-ink3)); text-decoration: none; }
.crumbs a:hover { color: rgb(var(--c-brand)); }
.crumbs a.here { color: rgb(var(--c-ink)); font-weight: 500; }
.crumbs a svg.i { font-size: 13px; }
.crumbs > svg.i { font-size: 12px; }
.click-away { position: fixed; inset: 0; z-index: 35; }

/* Launchpad (Launchpad.tsx) */
.lp { max-width: 1240px; margin: 0 auto; }
.lp-greet { margin: 8px 0 20px; }
.lp-greet h1 { margin: 0; font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -.025em; }
.lp-greet p { margin: 4px 0 0; font-size: 13px; color: rgb(var(--c-ink3)); }
/* The needs-you-now strip (DESIGN.md §8.3): up to three tinted cards, the count on the left. */
.lp-now { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 18px; }
.lp-need { display: flex; align-items: center; gap: 14px; text-align: left; border: 1px solid; border-radius: 14px; padding: 12px 16px; cursor: pointer; font: inherit; }
.lp-need.hold { background: rgb(var(--c-holdBg)); border-color: rgb(var(--c-holdLine)); color: rgb(var(--c-hold)); }
.lp-need.due { background: rgb(var(--c-dueBg)); border-color: rgb(var(--c-dueLine)); color: rgb(var(--c-due)); }
.lp-need .n { font-size: 26px; line-height: 30px; font-weight: 700; min-width: 34px; }
.lp-need .what { flex: 1; display: flex; flex-direction: column; }
.lp-need .what b { font-size: 14px; line-height: 18px; font-weight: 600; color: rgb(var(--c-ink)); }
.lp-need .what span { font-size: 12px; line-height: 16px; color: rgb(var(--c-ink3)); }
.lp-sec { margin-bottom: 28px; }
.lp-sec h2 { margin: 0 0 12px; font-size: 17px; line-height: 22px; font-weight: 600; }
.lp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.lp-tile { position: relative; background: rgb(var(--c-paper)); border-radius: 16px; box-shadow: var(--sh-card); padding: 16px; min-height: 132px; display: flex; flex-direction: column;
           color: rgb(var(--c-ink)); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.lp-tile:hover { transform: translateY(-2px); box-shadow: var(--sh-pop); text-decoration: none; }
.lp-tile.wide { grid-column: span 2; }
.lp-tile .top { display: flex; align-items: flex-start; }
.lp-tile .ic { width: 44px; height: 44px; border-radius: 12px; background: rgb(var(--c-brand) / .11); color: rgb(var(--c-brand)); display: grid; place-items: center; }
.lp-tile .ic svg.i { font-size: 22px; stroke-width: 1.8; }
.lp-tile .fill { flex: 1; }
.lp-tile b { margin-top: 12px; font-size: 15px; line-height: 20px; font-weight: 600; }
.lp-tile .line { margin-top: 2px; font-size: 12px; line-height: 16px; color: rgb(var(--c-ink3)); }
.lp-tile .go { position: absolute; right: 16px; bottom: 16px; font-size: 15px; color: rgb(var(--c-brand)); opacity: 0; transition: opacity .15s; }
.lp-tile:hover .go { opacity: 1; }
.badge-lg { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; font-size: 11.5px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.badge-lg.hold { background: rgb(var(--c-hold)); } .badge-lg.due { background: rgb(var(--c-due)); }

/* Launch sheet: the same destinations, compact, over any screen */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .20); backdrop-filter: blur(3px); }
.launch { margin: 68px auto 0; width: min(1080px, calc(100% - 48px)); max-height: calc(100% - 100px); overflow-y: auto; padding: 20px; border-radius: 22px;
          background: rgb(var(--c-sunk) / .97); backdrop-filter: blur(24px); box-shadow: var(--sh-pop); }
.launch-h { display: flex; align-items: center; margin-bottom: 12px; }
.launch-h a { font-size: 17px; font-weight: 600; color: rgb(var(--c-ink)); text-decoration: none; }
.launch-h a:hover { color: rgb(var(--c-brand)); }
.launch-h .flex { flex: 1; }
.close-btn { width: 28px; height: 28px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgb(var(--c-ink) / .06); color: rgb(var(--c-ink2)); cursor: pointer; font-size: 14px; }
.close-btn:hover { background: rgb(var(--c-ink) / .10); }
.launch-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 20px; }
.launch-grid h3 { margin: 0 0 8px; font-size: 11px; font-weight: 600; color: rgb(var(--c-ink3)); text-transform: uppercase; letter-spacing: .025em; }
.launch-items { display: grid; gap: 8px; }
.launch-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgb(var(--c-paper)); color: rgb(var(--c-ink)); text-decoration: none; }
.launch-item:hover { box-shadow: var(--sh-card); text-decoration: none; }
.launch-item.on { background: rgb(var(--c-brand) / .13); }
.launch-item .ic { width: 32px; height: 32px; border-radius: 9px; flex: none; display: grid; place-items: center; background: rgb(var(--c-brand) / .11); color: rgb(var(--c-brand)); }
.launch-item .ic svg.i { font-size: 17px; }
.launch-item .tx { flex: 1; min-width: 0; }
.launch-item .tx b { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.launch-item .tx span { display: block; font-size: 11px; color: rgb(var(--c-ink3)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Toasts (Toasts.tsx): glass banners, top right, 380 px */
.toasts { position: fixed; top: 12px; right: 12px; z-index: 60; width: 380px; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: flex-start; gap: 12px; padding: 12px 8px 12px 14px; border-radius: 16px; font-size: 13px; color: rgb(var(--c-ink)); }
.toast > svg.i:first-child { font-size: 18px; margin-top: 1px; }
.toast .msg { flex: 1; line-height: 18px; }
.toast .x { width: 24px; height: 24px; border: 0; border-radius: 50%; display: grid; place-items: center; background: transparent; color: rgb(var(--c-ink3)); cursor: pointer; font-size: 13px; }
.toast .x:hover { background: rgb(var(--c-ink) / .08); }
.t-ok { color: rgb(var(--c-ok)); } .t-hold { color: rgb(var(--c-hold)); } .t-due { color: rgb(var(--c-due)); } .t-info { color: rgb(var(--c-brand)); }

/* Page head (ui.tsx PageHead) */
.phead { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.phead > div:first-child { min-width: 0; }
.phead h1 { margin: 0; font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -.022em; }
.phead p { margin: 4px 0 0; font-size: 13px; color: rgb(var(--c-ink3)); }
.phead .flex { flex: 1; }
.phead .acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Record screens */
.stack > * + * { margin-top: 14px; }
.grid-detail { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 760px) { .grid-detail { grid-template-columns: minmax(0, 1fr); } }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 14px; padding: 4px 16px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.err { font-size: 11px; line-height: 14px; color: rgb(var(--c-hold)); margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
fieldset.plain { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.plain:disabled .inp { background: rgb(var(--c-field)); color: rgb(var(--c-ink2)); box-shadow: none; opacity: 1; }
fieldset.plain:disabled .check { color: rgb(var(--c-ink2)); }

/* Sign in (SignIn.tsx) */
.signin { min-height: 100%; display: grid; place-items: center; padding: 32px; position: relative; overflow: hidden; background: rgb(var(--c-sunk)); }
.signin .glow1 { position: absolute; top: -160px; left: -160px; width: 640px; height: 640px; border-radius: 50%; background: rgb(var(--c-brand) / .10); filter: blur(64px); }
.signin .glow2 { position: absolute; bottom: -192px; right: -128px; width: 560px; height: 560px; border-radius: 50%; background: rgb(var(--c-accent) / .12); filter: blur(64px); }
.signin .col { position: relative; width: 100%; max-width: 420px; }
.signin .brand { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 28px; }
.signin .brand img { height: 56px; width: auto; display: block; }
.signin .brand p { margin: 16px 0 0; font-size: 13px; color: rgb(var(--c-ink3)); }
.signin .card { background: rgb(var(--c-paper)); border-radius: 18px; box-shadow: var(--sh-pop); padding: 24px; }
.signin h1 { margin: 0; font-size: 22px; line-height: 26px; font-weight: 700; letter-spacing: -.02em; text-align: center; }
.signin .card > p { margin: 4px 0 20px; font-size: 12px; color: rgb(var(--c-ink3)); text-align: center; }
.signin form > * + * { margin-top: 10px; }
.signin .inp { height: 36px; font-size: 14px; }
.signin .btn-pri { width: 100%; height: 36px; font-size: 14px; margin-top: 14px; }

/* Blazor moves focus to the page title after navigation, for screen readers. No ring for that. */
h1:focus { outline: none; }

/* Blazor's own failure bar, shown by the framework when a circuit fails. */
#blazor-error-ui { display: none; position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 1000; padding: 12px 16px; border-radius: 12px;
                   background: rgb(var(--c-holdBg)); color: rgb(var(--c-hold)); box-shadow: var(--sh-pop); font-weight: 500; }
#blazor-error-ui .reload { margin-left: 8px; }
#blazor-error-ui .dismiss { cursor: pointer; margin-left: 12px; }

/* Dialog (prototype components/ui Dialog): a sheet over a dimmed page */
.dlg-scrim { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgb(0 0 0 / .25); backdrop-filter: blur(2px); }
.dlg { background: rgb(var(--c-paper)); border-radius: 16px; box-shadow: var(--sh-pop); width: 100%; max-height: 88vh; display: flex; flex-direction: column; }
.dlg-h { display: flex; align-items: flex-start; gap: 12px; padding: 20px 24px 12px; }
.dlg-h h2 { margin: 0; font-size: 17px; line-height: 22px; font-weight: 600; }
.dlg-h p { margin: 4px 0 0; font-size: 12px; color: rgb(var(--c-ink3)); }
.dlg-x { width: 28px; height: 28px; margin-right: -8px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgb(var(--c-ink) / .06); color: rgb(var(--c-ink2)); cursor: pointer; }
.dlg-x:hover { background: rgb(var(--c-ink) / .1); }
.dlg-b { padding: 0 24px 16px; overflow-y: auto; }
.dlg-f { display: flex; justify-content: flex-end; gap: 8px; padding: 8px 24px 20px; }
.selbar { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 20; width: max-content; border-radius: 14px; padding: 8px 12px; display: flex; align-items: center; gap: 8px; box-shadow: var(--sh-pop); }
.boxface { border-radius: 8px; min-height: 70px; padding: 8px; display: grid; place-items: center; text-align: center; overflow-wrap: anywhere; font-family: var(--mono); font-weight: 600; font-size: 20px; background: rgb(var(--c-field)); box-shadow: inset 0 0 0 1px rgb(var(--c-rule)); }
.boxface.long { font-size: 14px; line-height: 18px; }
.boxface.gate { background: rgb(var(--c-holdBg)); color: rgb(var(--c-hold)); box-shadow: inset 0 0 0 1px rgb(var(--c-holdLine)), inset 0 -3px 0 rgb(var(--c-hold)); }
.boxface.unres { background: rgb(var(--c-dueBg)); color: rgb(var(--c-due)); box-shadow: inset 0 0 0 1px rgb(var(--c-dueLine)); }
.mx-banner { display: flex; align-items: center; gap: 12px; padding: 8px 12px; font-size: 13px; border-bottom: 1px solid; }
.mx-banner.hold { background: rgb(var(--c-holdBg)); border-color: rgb(var(--c-holdLine)); }
.mx-banner.due { background: rgb(var(--c-dueBg)); border-color: rgb(var(--c-dueLine)); }

/* ============================================================================
   Colour layer — the brand palette applied (design review of 2026-10-09: "too much white").
   The structure is unchanged: type, spacing, radii, density, motion and every state colour
   (hold, due, ok, info) are as before; brand still never signals state. What changes is where
   colour sits: a navy shell, teal for action and selection, a cool tinted ground, navy title
   bands and tinted table heads.
   ============================================================================ */

/* Ground: a cool blue-grey, so white panels read as cards rather than as the page */
body, .signin { background: rgb(var(--c-sunk)); }
.app { background: linear-gradient(180deg, rgb(var(--c-sunk)) 0%, rgb(var(--c-field)) 100%); }
h1, h2, h3 { color: rgb(var(--c-brandInk)); }

/* Action: the logo's teal gradient on the primary button; secondary buttons tinted, not grey */
.btn { background: rgb(var(--c-brand) / .09); color: rgb(var(--c-brandInk)); }
.btn:hover:not(:disabled) { background: rgb(var(--c-brand) / .16); }
.btn:active:not(:disabled) { background: rgb(var(--c-brand) / .22); }
.btn-pri { background: var(--brand-grad); color: #fff; box-shadow: 0 1px 2px rgb(11 124 140 / .35); }
.btn-pri:hover:not(:disabled), .btn-pri:active:not(:disabled) { background: var(--brand-grad); filter: brightness(.94); }
.btn-ghost { background: transparent; }
.btn-danger { color: rgb(var(--c-hold)); background: rgb(var(--c-hold) / .10); }
.btn-tint { background: rgb(var(--c-brand) / .14); color: rgb(var(--c-brand)); }
.inp:focus { box-shadow: inset 0 0 0 1.5px rgb(var(--c-brand)); outline: none; }

/* Sidebar: the logo's navy, white type, the active item in the teal gradient */
.sidebar.glass { background: var(--navy-grad); box-shadow: 0 8px 30px rgb(11 32 57 / .25); color: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
.sidebar .side-group h5 { color: rgb(255 255 255 / .5); letter-spacing: .02em; }
.sidebar .side-item { color: rgb(255 255 255 / .86); }
.sidebar .side-item:hover { background: rgb(255 255 255 / .08); }
.sidebar .side-item > svg.i { color: rgb(var(--c-accent)); }
.sidebar .side-item.on { background: var(--brand-grad); color: #fff; box-shadow: 0 2px 8px rgb(26 171 156 / .35); }
.sidebar .side-item.on > svg.i { color: #fff; }
.sidebar .office-btn { background: rgb(255 255 255 / .08); color: #fff; }
.sidebar .office-btn:hover { background: rgb(255 255 255 / .13); }
.sidebar .office-btn .pin { background: var(--brand-grad); }
.sidebar .who span, .sidebar .office-btn > svg.i:last-child, .sidebar .user-btn > svg.i:last-child { color: rgb(255 255 255 / .55); }
.sidebar .user-wrap { border-top-color: rgb(255 255 255 / .1); }
.sidebar .user-btn { color: #fff; }
.sidebar .user-btn:hover { background: rgb(255 255 255 / .08); }
.sidebar .popover, .toolbar .popover { background: rgb(var(--c-paper) / .98); color: rgb(var(--c-ink)); }
.sidebar .popover .who span, .toolbar .popover .who span { color: rgb(var(--c-ink3)); }

/* Toolbar: light glass beside the navy sidebar, with the teal line beneath; navy itself when
   the sidebar is hidden, so the brand is always on screen */
.toolbar.glass-bar { background: rgb(var(--c-sunk) / .82); }
.toolbar.glass-bar::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--brand-grad); opacity: .55; }
.toolbar.brand { background: var(--navy-grad); color: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
.toolbar.brand::after { opacity: 1; }
.toolbar.brand .icon-btn, .toolbar.brand .crumbs, .toolbar.brand .crumbs a { color: rgb(255 255 255 / .7); }
.toolbar.brand .crumbs a:hover { color: rgb(var(--c-accent)); }
.toolbar.brand .crumbs a.here { color: #fff; }
.toolbar.brand .icon-btn:hover { background: rgb(255 255 255 / .1); }
.toolbar.brand .btn { background: rgb(255 255 255 / .1); color: #fff; }
.toolbar.brand .btn:hover:not(:disabled) { background: rgb(255 255 255 / .18); }
.toolbar.brand .seg { background: rgb(255 255 255 / .1); }
.toolbar.brand .seg > button { color: rgb(255 255 255 / .75); }
.toolbar.brand .seg > button.on { background: #fff; color: rgb(var(--c-navy)); }
.toolbar.brand .user-btn { color: #fff; }
.toolbar.brand .user-btn:hover { background: rgb(255 255 255 / .1); }
.toolbar.brand .who span, .toolbar.brand .user-btn > svg.i:last-child { color: rgb(255 255 255 / .6); }
.toolbar.brand .popover .who span { color: rgb(var(--c-ink3)); }
.toolbar.brand .popover .btn { background: rgb(var(--c-brand) / .09); color: rgb(var(--c-brandInk)); }
/* A dialog opened from the toolbar (tester feedback) keeps its own buttons, as a popover does. */
.toolbar.brand .dlg .btn { background: rgb(var(--c-ink) / .06); color: rgb(var(--c-ink)); }
.toolbar.brand .dlg .btn:hover:not(:disabled) { background: rgb(var(--c-ink) / .10); }
.toolbar.brand .dlg .btn-pri, .toolbar.brand .dlg .btn-pri:hover:not(:disabled) { background: rgb(var(--c-brand)); color: #fff; }
.seg > button.on { color: rgb(var(--c-brandInk)); }
.menu-row:hover { background: var(--brand-grad); }
.avatar { background: var(--brand-grad); }

/* Title band: the header block of a record, in navy, so every record screen opens on the brand */
.tblock { background: var(--navy-grad); box-shadow: 0 6px 20px rgb(11 32 57 / .18); }
.tblock > div { border-right-color: rgb(255 255 255 / .1); }
.tblock dt { color: rgb(255 255 255 / .55); }
.tblock dd { color: #fff; }
.tblock dd a { color: rgb(var(--c-accent)); }

/* Panels and tables: white cards; heads and group rows tinted with the brand */
.panel { box-shadow: 0 0 0 .5px rgb(11 32 57 / .08), 0 2px 8px rgb(11 32 57 / .06); }
.panel-h { color: rgb(var(--c-brandInk)); border-bottom: 1px solid rgb(var(--c-rule2)); background: linear-gradient(90deg, rgb(var(--c-brandTint) / .55), rgb(var(--c-paper)) 70%); }
.panel-h::before { content: ''; flex: none; width: 3px; height: 14px; border-radius: 2px; background: var(--brand-grad); margin-right: 2px; }
table.t th { background: rgb(var(--c-brandTint) / .45); color: rgb(var(--c-brandInk) / .75); }
tr.grp td, table.mx tr.grp td { background: rgb(var(--c-navy) / .06); color: rgb(var(--c-brandInk)); }
table.mx thead th { background: rgb(var(--c-brandTint) / .9); color: rgb(var(--c-brandInk) / .75); }
table.mx thead th.p.mine { background: var(--brand-grad); color: #fff; box-shadow: none; }
.filters { background: rgb(var(--c-field) / .6); }
.pill { background: rgb(var(--c-brand) / .08); color: rgb(var(--c-brandInk)); }
.pill:hover { background: rgb(var(--c-brand) / .15); }
.pill-on, .pill-on:hover { background: rgb(var(--c-navy)); color: #fff; }
.tile { border-top: 3px solid rgb(var(--c-accent)); }
.tile .n { color: rgb(var(--c-brandInk)); }
.note { background: rgb(var(--c-brandTint) / .45); box-shadow: inset 3px 0 0 rgb(var(--c-accent)); }
.dlg-h { border-bottom: 1px solid rgb(var(--c-rule2)); margin-bottom: 12px; background: linear-gradient(90deg, rgb(var(--c-brandTint) / .6), rgb(var(--c-paper)) 70%); border-radius: 16px 16px 0 0; }

/* Launchpad: the greeting on the brand, the tile icons in the teal gradient */
.lp-greet { background: var(--navy-grad); border-radius: 18px; padding: 22px 26px; position: relative; overflow: hidden; }
.lp-greet::after { content: ''; position: absolute; right: -60px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: rgb(var(--c-accent) / .22); filter: blur(40px); }
.lp-greet h1 { color: #fff; position: relative; }
.lp-greet p { color: rgb(255 255 255 / .7); position: relative; }
.lp-tile .ic, .launch-item .ic { background: var(--brand-grad); color: #fff; }
.lp-tile:hover { box-shadow: 0 0 0 1.5px rgb(var(--c-accent) / .5), var(--sh-pop); }
.launch-item.on { background: rgb(var(--c-brandTint)); }

/* Sign in: the card on the brand's navy */
.signin { background: var(--navy-grad); }
.signin .glow1 { background: rgb(var(--c-accent) / .22); }
.signin .glow2 { background: rgb(var(--c-brand) / .30); }
.signin .brand p { color: rgb(255 255 255 / .7); }

/* Candidate matching (OPS-030): one tag per eligibility check, and the score bar — the prototype's
   Candidates screen. */
.ctags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ctag { display: inline-flex; align-items: center; gap: 2px; font-size: 10.5px; padding: 1px 6px; border-radius: 3px; border: 1px solid rgb(var(--c-rule2)); color: rgb(var(--c-ink2)); background: rgb(var(--c-paper)); }
.ctag svg.i { font-size: 10px; color: rgb(var(--c-ok)); }
.ctag.fail { color: rgb(var(--c-hold)); border-color: rgb(var(--c-holdLine)); font-weight: 600; }
.ctag.fail svg.i { color: rgb(var(--c-hold)); }
.ctag.na { color: rgb(var(--c-ink3)); }
.sbar { display: inline-block; width: 44px; height: 6px; border-radius: 2px; overflow: hidden; background: rgb(var(--c-field)); box-shadow: inset 0 0 0 1px rgb(var(--c-rule2)); vertical-align: middle; }
.sbar > span { display: block; height: 100%; background: var(--brand-grad); }
.brk { display: grid; grid-template-columns: 110px 1fr auto; gap: 3px 10px; font-size: 12px; line-height: 16px; align-content: start; }
.brk .k { color: rgb(var(--c-ink3)); }
.brk .v { text-align: right; }
.brk .w { color: rgb(var(--c-ink3)); }
.brk .tot { font-weight: 600; color: rgb(var(--c-ink)); border-top: 1px solid rgb(var(--c-rule)); padding-top: 3px; }
.brk.chk { grid-template-columns: 16px 160px 1fr; }
.brk .o { color: rgb(var(--c-ink3)); } .brk .o.passed { color: rgb(var(--c-ok)); } .brk .o.failed { color: rgb(var(--c-hold)); }

/* Shortlist to client (OPS-031): one card per candidate, as the prototype's Shortlist. */
.slist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
@media (max-width: 1100px) { .slist { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .slist { grid-template-columns: minmax(0, 1fr); } }
.slist .rk { width: 20px; height: 20px; border-radius: 999px; background: rgb(var(--c-brandTint)); color: rgb(var(--c-brand)); display: inline-grid; place-items: center; font-size: 10.5px; margin-right: 8px; }
.slist .t td.k { font-size: 12px; color: rgb(var(--c-ink3)); width: 38%; }
.slist .t td { font-size: 13px; }
.consent { padding: 10px 12px 12px; border-top: 1px solid rgb(var(--c-rule2)); font-size: 12.5px; }
.consent .k { font-size: 11px; color: rgb(var(--c-ink3)); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; margin-bottom: 3px; }
.consent .acts { display: flex; flex-wrap: wrap; gap: 6px; }

/* Agencies on a shortlist, and vetting a nominee (OPS-039). */
.enq { border-top: 1px solid rgb(var(--c-rule2)); }
.enq-h { display: flex; align-items: center; gap: 8px; padding: 10px 14px 2px; font-size: 13px; }
.enq-h .id { color: rgb(var(--c-ink3)); font-size: 12px; }
.enq-s { padding: 0 14px 10px; font-size: 12.5px; color: rgb(var(--c-ink2)); line-height: 18px; }
.nomgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.vetgrid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 900px) { .vetgrid, .nomgrid { grid-template-columns: minmax(0, 1fr); } }

/* The jobs board (OPS-060): columns by where each job stands, as the prototype's AssignmentBoard. */
.board { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 4px 0 12px; }
@media (max-width: 1100px) { .board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .board { grid-template-columns: minmax(0, 1fr); } }
.lane { background: rgb(var(--c-field)); border: 1px solid rgb(var(--lane-line)); border-radius: 12px; padding: 10px; min-height: 360px; }
.lane h6 { margin: -10px -10px 8px; padding: 8px 10px; border-radius: 11px 11px 0 0; border-bottom: 1px solid rgb(var(--lane-line)); background: rgb(var(--lane-fill)); font-size: 11.5px; font-weight: 600; display: flex; }
/* Feedback 152: each stage a light tone from the state tokens, so they read apart here and in dark mode. */
.lane-mute { --lane-fill: var(--c-sunk); --lane-line: var(--c-rule); }
.lane-info { --lane-fill: var(--c-infoBg); --lane-line: var(--c-infoLine); }
.lane-brand { --lane-fill: var(--c-brandTint); --lane-line: var(--c-brandLine); }
.lane-ok { --lane-fill: var(--c-okBg); --lane-line: var(--c-okLine); }
.lane-due { --lane-fill: var(--c-dueBg); --lane-line: var(--c-dueLine); }
.lane-hold { --lane-fill: var(--c-holdBg); --lane-line: var(--c-holdLine); }
/* A panel that slides in from the right over the page and leaves the page usable (feedback 155). */
.side-sheet { position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; width: min(690px, 100vw); margin: 0; overflow-y: auto; border-radius: 0; box-shadow: -8px 0 28px rgb(0 0 0 / .18); }
.side-sheet:focus { outline: none; }
/* The page makes room, so the grid scrolls clear of the panel and a focused box is not hidden behind it. */
@media (min-width: 1100px) { .sheet-room { padding-right: 670px; } }
/* Feedback 157: the summary's numbers open the list behind them. */
.num-link { font: inherit; color: rgb(var(--c-brand)); background: none; border: 0; padding: 0 2px; cursor: pointer; text-decoration: underline; }
tr.t-total td { font-weight: 600; border-top: 2px solid rgb(var(--c-rule)); }
.lane h6 i { margin-left: auto; font-style: normal; font-weight: 400; color: rgb(var(--c-ink3)); }
.jcard { display: flex; flex-direction: column; gap: 2px; background: rgb(var(--c-paper)); border: 1px solid rgb(var(--c-rule)); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; color: rgb(var(--c-ink)); text-decoration: none; }
.jcard:hover { border-color: rgb(var(--c-brandLine)); }
.jcard .id { font-size: 11.5px; color: rgb(var(--c-brandInk)); }
.jcard .who { font-size: 11.5px; color: rgb(var(--c-ink2)); }
.jcard .what { font-size: 11px; color: rgb(var(--c-ink3)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jcard .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* ── UI standards (decided by the user 2026-10-14; stream A owns them for every stream — docs/streams/README.md §5) ── */

/* 2. A record header strip sizes its cells to their values and wraps to a second row; nothing is cut with an ellipsis.
   (A page's inline grid-template-columns no longer applies: the strip is a wrapping row.) */
.tblock { display: flex; flex-wrap: wrap; }
.tblock > div { flex: 1 1 auto; border-bottom: 1px solid rgb(var(--c-rule2)); margin-bottom: -1px; }

/* 2. Forms: auto-fill columns (form-grid above); long text spans the row; a textarea starts at two rows and grows. */
.form-grid > textarea, .form-grid .wide, .form-grid > div:has(> textarea) { grid-column: 1 / -1; }
textarea.inp { field-sizing: content; min-height: 52px; height: auto; padding-top: 6px; padding-bottom: 6px; line-height: 18px; resize: vertical; }
/* A note that sat in an otherwise empty right column, now one line above the form. */
.notebar { display: block; font-size: 12.5px; line-height: 17px; padding: 8px 14px; border-radius: 10px;
  background: rgb(var(--c-field)); color: rgb(var(--c-ink2)); margin-bottom: 12px; }
.notebar svg.i { vertical-align: -2px; margin-right: 6px; color: rgb(var(--c-ink3)); }
.notebar b { color: rgb(var(--c-ink)); font-weight: 600; }
/* The detail layout with no context column: the record spans the full width. */
.grid-full { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }

/* 5. Line serial numbers: a display counter first in every list and detail-line table — 1, 2, 3 in the order shown,
   continuing down "show more"; a paged list starts it with style="--row-start: 25" on the table. Never a business number.
   Not on the ITP matrix, key-value tables, or a row that is only a message ("No … yet"). Opt out with .nonum. */
table.t { counter-reset: row var(--row-start, 0); }
table.t:not(.nonum, .matrix) > thead > tr::before { content: "#"; display: table-cell; vertical-align: middle; text-align: right;
  font-size: 11px; font-weight: 600; padding: 8px 4px 8px 16px; border-bottom: 1px solid rgb(var(--c-rule2)); width: 1%; white-space: nowrap; }
table.t:not(.nonum, .matrix) > tbody > tr:not(:has(> td:only-child)) { counter-increment: row; }
table.t:not(.nonum, .matrix) > tbody > tr::before { content: counter(row); display: table-cell; vertical-align: middle; text-align: right;
  font-size: 11.5px; font-variant-numeric: tabular-nums; color: rgb(var(--c-ink3)); padding: 0 4px 0 16px; border-bottom: 1px solid rgb(var(--c-rule2)); width: 1%; white-space: nowrap; }
table.t:not(.nonum, .matrix) > tbody > tr:has(> td:only-child)::before { content: ""; }
table.t:not(.nonum, .matrix) > tfoot > tr::before { content: ""; display: table-cell; }
table.t:not(.nonum, .matrix) th:first-child, table.t:not(.nonum, .matrix) td:first-child { padding-left: 12px; }
.slist table.t > thead > tr::before, .slist table.t > tbody > tr::before { content: none; }
.slist table.t > tbody > tr { counter-increment: none; }
/* The number cell takes the row's own tint: hovered, held, due, a group row (which is a heading, not a line: unnumbered). */
table.t tbody tr.hov:hover::before { background: rgb(var(--c-hover)); }
table.t tr.r-hold::before { background: rgb(var(--c-holdBg) / .5); }
table.t tr.r-due::before { background: rgb(var(--c-dueBg) / .6); }
table.t:not(.nonum, .matrix) > tbody > tr.grp { counter-increment: none; }
table.t:not(.nonum, .matrix) > tbody > tr.grp::before { content: ""; background: rgb(var(--c-navy) / .085); }

/* 1 and 7. The searchable dropdown (<Pick>): the look of .inp (DESIGN.md §10.7); its list over the page, placed by etei.pick.
   Its root is .picker, not .pick: .pick is the checkbox label on stream B's pages. */
.picker { position: relative; display: block; width: 100%; min-width: 0; }
.pick-in { padding-right: 46px; text-overflow: ellipsis; cursor: pointer; }
.pick-in:focus { cursor: text; }
.pick-in::placeholder { color: rgb(var(--c-ink3)); }
.pick-off .pick-in { background: rgb(var(--c-field)); color: rgb(var(--c-ink2)); box-shadow: none; cursor: default; }
.pick-caret { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); pointer-events: none; color: rgb(var(--c-ink3)); font-size: 14px; display: grid; }
.pick-x { position: absolute; right: 27px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; border: 0; border-radius: 999px; padding: 0;
  display: grid; place-items: center; background: transparent; color: rgb(var(--c-ink3)); font-size: 12px; cursor: pointer; }
.pick-x:hover { background: rgb(var(--c-ink) / .08); color: rgb(var(--c-ink)); }
.pick-list { position: fixed; z-index: 1000; margin: 0; padding: 4px; list-style: none; overflow-y: auto; overscroll-behavior: contain;
  background: rgb(var(--c-paper)); border-radius: 9px; box-shadow: 0 0 0 .5px rgb(var(--c-ink) / .14), 0 8px 24px rgb(11 32 57 / .16); }
.pick-list li { display: flex; align-items: baseline; gap: 8px; padding: 6px 9px; border-radius: 6px; font-size: 13px; line-height: 17px; cursor: pointer; color: rgb(var(--c-ink)); }
.pick-list li.on { background: rgb(var(--c-brandTint)); }
.pick-list li.sel .pick-tx { font-weight: 600; }
.pick-list li.pick-msg { color: rgb(var(--c-ink3)); cursor: default; font-size: 12.5px; }
.pick-code { font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: rgb(var(--c-ink3)); white-space: nowrap; flex: none; }
.pick-tx { min-width: 0; overflow-wrap: anywhere; }
.pick-d { display: block; font-size: 11.5px; color: rgb(var(--c-ink3)); font-weight: 400; }
@media (max-width: 760px) { .pick-list li { padding: 9px 10px; } }

/* History hidden by default (UI standard 2b): a detail grid left with one panel takes the full width. */
.grid-detail:not(:has(> :nth-child(2))) { grid-template-columns: minmax(0, 1fr); }
/* A dropdown inside a read-only form (a disabled fieldset) offers nothing to open or clear. */
fieldset:disabled .pick-x, fieldset:disabled .pick-caret { display: none; }

/* The shell on a phone (stream D's report, 14 Oct 2026): the toolbar fits 390 px with no sideways scroll. Breadcrumbs and
   the Sidebar/Tiles switch go (the page heading says where you are; the tiles menu is the phone's); the Menu button, the
   office and the account shrink to their icons, each still a button; the search box takes the room that is left. */
@media (max-width: 640px) {
  .toolbar { gap: 4px; padding: 0 10px; }
  .toolbar .crumbs, .toolbar .nav-switch, .toolbar > .flex { display: none; }
  .toolbar .tb-lb, .toolbar .office-compact > svg.i.quiet { display: none; }
  .toolbar .tb-menu, .toolbar .office-compact { padding: 0 9px; flex: none; }
  .toolbar .user-btn { padding: 4px; gap: 0; }
  .toolbar .user-btn .who, .toolbar .user-btn > svg.i:last-child { display: none; }
  .toolbar .gs { flex: 1 1 auto; width: auto; min-width: 36px; }
  .toolbar .icon-btn, .toolbar .logo { flex: none; }
  .toolbar .popover { position: fixed; left: 8px !important; right: 8px !important; top: 52px; width: auto !important; }
  /* The sidebar style chosen on a larger screen: on a phone the sidebar opens over the page, below the toolbar, whose button hides it. */
  .app > .sidebar { position: fixed; z-index: 40; top: 56px; bottom: 0; left: 0; margin: 8px; box-shadow: 0 12px 40px rgb(0 0 0 / .35); }
  /* The page itself never scrolls sideways: a long choice wraps, and a wide table scrolls inside its own box. */
  :is(.page, .portal-page) .seg { flex-wrap: wrap; height: auto; }
  :is(.page, .portal-page) .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :is(.page, .portal-page) table.t { display: block; max-width: 100%; overflow-x: auto; }
  /* A layout a page wrote inline with fixed columns stacks into one column on a phone. */
  :is(.page, .portal-page) [style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
}
/* A tab strip longer than the page scrolls within itself, at any width. */
.tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs > .tab { flex: none; white-space: nowrap; }

/* The dropdown's codes in a column of their own (tester feedback 2, 2026-10-15): in the open list a fixed-width,
   monospace, muted column, the name beside it on one line (ellipsis, full text as its title, only past 520 px); in the
   closed box the code as a muted prefix and the words after it. */
.pick-list li { align-items: flex-start; }
.pick-list .pick-code { width: var(--pick-code, auto); font-variant-numeric: tabular-nums; padding-top: 1px; white-space: normal; overflow-wrap: anywhere; }  /* a code longer than the column wraps inside it, never over the text */
.pick-list .pick-tx { flex: 1 1 auto; overflow: hidden; }
.pick-list .pick-tx, .pick-list .pick-d { white-space: normal; overflow-wrap: anywhere; }  /* a long choice wraps, never cut (dropdown audit 9) */

/* Browse… at the foot of a server-searched dropdown, and its dialog (tester feedback 2). */
.pick-list li.pick-more { border-top: 1px solid rgb(var(--c-rule2)); margin-top: 4px; padding-top: 8px; color: rgb(var(--c-brandInk)); font-weight: 500; align-items: center; }
.pick-list li.pick-more svg.i { color: rgb(var(--c-brand)); font-size: 14px; }
.pick-browse { margin-top: 10px; max-height: 52vh; overflow-y: auto; border-radius: 10px; box-shadow: inset 0 0 0 1px rgb(var(--c-rule2)); }
.pick-browse table.t tr.on td { background: rgb(var(--c-brandTint)); }
.pick-browse table.t tbody tr { cursor: pointer; }
/* Every dialog stays within the screen: its column may shrink below its content's width, and wide content scrolls inside. */
.dlg-scrim { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.dlg { min-width: 0; }
.pick-browse { overflow: auto; }
@media (max-width: 640px) { .dlg-scrim { padding: 12px; } .dlg-h { padding: 16px 16px 10px; } .dlg-b { padding: 0 16px 14px; } }
/* Button rows (.seg) are for view switches and filters, never form fields (tester feedback 3): where one is longer than
   its place it wraps onto a second line rather than running off the panel. */
.seg { flex-wrap: wrap; max-width: 100%; }
/* Rows that read as one line (tester feedback 4, 2026-10-15). A narrower base column: a field takes two, a number, date or
   time (or a field marked .short) one, long text the whole row. Every label is one line, so the boxes of a row sit on the
   same line whatever is written beneath them; long labels are shortened, the full wording kept as a hint. A form that
   lays out its own columns (an inline grid-template-columns) keeps them. On a phone every field takes the row. */
.form-grid { grid-template-columns: repeat(var(--fg-cols), minmax(0, 1fr)); align-items: start; }
.form-grid:not([style*="grid-template-columns"]) > * { grid-column: span 2; min-width: 0; }
.form-grid:not([style*="grid-template-columns"]) > div:has(> input[type=number]),
.form-grid:not([style*="grid-template-columns"]) > div:has(> input[type=date]),
.form-grid:not([style*="grid-template-columns"]) > div:has(> input[type=time]),
.form-grid:not([style*="grid-template-columns"]) > .short { grid-column: span 1; }
.form-grid > .full, .form-grid > .wide, .form-grid > textarea, .form-grid > div:has(> textarea),
.form-grid:not([style*="grid-template-columns"]) > .full, .form-grid:not([style*="grid-template-columns"]) > div:has(> textarea) { grid-column: 1 / -1; }
.form-grid > div > .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.form-grid > label.check { align-self: end; min-height: 34px; }
/* Empty spacer cells pages once used to push a field onto the next line leave gaps in this grid. */
.form-grid > div:empty { display: none; }
@media (max-width: 640px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid > * { grid-column: 1 / -1 !important; }
}

/* Which screen this is (decided by the user 2026-10-15): on a record page the screen's name in a small line above the
   record, linking back to its list (DESIGN.md: 12.5 px, medium, ink2; no capitals). */
.screen-name { display: inline-flex; align-items: center; gap: 2px; margin: 0 0 6px -3px; font-size: 12.5px; font-weight: 500;
  line-height: 18px; color: rgb(var(--c-ink2)); text-decoration: none; }
.screen-name svg.i { font-size: 14px; color: rgb(var(--c-ink3)); }
.screen-name:hover { color: rgb(var(--c-brandInk)); }
.screen-name:hover svg.i { color: rgb(var(--c-brand)); }

/* Required fields (tester feedback 7): a field the server's validator requires carries "lbl req" — a small dot after
   its label in the brand colour, read aloud as "required" — and a form holding one says once, at its foot, what the
   dot means. Which fields are marked comes from the validators (tools/dev/required_fields.py); the box itself is not shaded. */
.lbl.req::after { content: "\2022" / " required"; margin-left: 4px; color: rgb(var(--c-brand)); font-weight: 700; }
.form-grid:has(.lbl.req)::after,
.dlg-b:not(:has(.form-grid)):has(.lbl.req)::after { content: "\2022  required"; display: block; grid-column: 1 / -1; font-size: 11px; line-height: 14px; color: rgb(var(--c-ink3)); white-space: pre; }
.dlg-b:not(:has(.form-grid)):has(.lbl.req)::after { margin-top: 10px; }
/* Once, and at the foot (feedback 143): not on a form with a grid or more of the form still to come under it. A grid's
   required columns say it at the grid's foot. */
.form-grid:has(.lbl.req):has(~ :is(.egrid, .qlines, .wk-lines))::after, .panel:has(~ .panel .lbl.req) .form-grid::after, .form-grid:has(~ .form-grid .lbl.req)::after { content: none; }
.egrid:has(th .lbl.req) .egrid-foot::after { content: "\2022  required"; order: 9; font-size: 11px; line-height: 14px; color: rgb(var(--c-ink3)); white-space: pre; }

/* Chips in a list never touch or overlap what is beside them (tester feedback 5). A chip after anything else in its cell —
   a revision, a date, another chip — keeps 6 px from it; chips wrap onto a new line rather than overrun, with 2 px between
   lines; and a chip never shrinks, so a status column is always as wide as its longest chip (table auto layout). Text
   before a chip is in an element of its own (a bare text node cannot be selected). */
table.t td .chip { margin-block: 2px; flex-shrink: 0; vertical-align: middle; }
:is(table.t td, dd) > :has(+ .chip) { margin-right: 6px; }  /* the gap is on what comes before, so a chip that wraps starts flush */
:is(table.t td, dd) .chip + :not(.chip) { margin-left: 6px; }
table.t td:has(.chip) { line-height: 20px; }

/* A form's actions (tester feedback 8): at the right end of its own full-width row at the foot of the form, the
   primary action last and in the primary style, Cancel or Clear to its left. Dialogs already do this (DESIGN.md §10.8).
   A panel's add button sits at the right end of the panel's header. */
.form-acts, .form-grid > .form-acts { grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel-h:not(:has(> .flex, > span[style*="flex: 1"], > span[style*="flex:1"])) > button.btn:first-of-type { margin-left: auto; }

/* Disclosure: a closed panel whose header opens it (Components/Design/Disclosure.razor). */
.panel-h.disclose { width: 100%; border: 0; font: inherit; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
.panel-h.disclose::before { display: none; }
.panel-h.disclose svg.i { color: rgb(var(--c-ink3)); }
.disclose-note { margin: 0; padding: 8px 16px 12px; font-size: 12px; color: rgb(var(--c-ink2)); }
.disclosure:has(.disclose[aria-expanded="true"]) .disclose-note { padding-bottom: 4px; }

/* A form inside a panel, above the panel's list (the rate card's "Add a rate"): its own small heading, a rule beneath. */
.sub-h { padding: 12px 16px 0; font-size: 12px; font-weight: 600; color: rgb(var(--c-ink2)); }
.rate-add { border-bottom: 1px solid rgb(var(--c-rule2)); }

/* One form grid for the whole page (URGENT, decided by the user 2026-10-16): every section of a page lays its fields on the
   same columns. The count is even and set by the width of the panel or dialog the form is in — 8 columns on a full-width
   panel, 6, 4, then one on a phone — so a field of two columns fills a row exactly and columns stay on the same lines from
   section to section; a row that does not fill simply ends. (Before: auto-fill gave 9 columns, every row of normal fields
   left the ninth empty, and a section of short fields filled it, so sections looked unaligned.) */
:root { --fg-cols: 8; }
.panel, .dlg-b { container-type: inline-size; }
@container (max-width: 1099px) { .form-grid { --fg-cols: 6; } }
@container (max-width: 799px) { .form-grid { --fg-cols: 4; } }
@container (max-width: 519px) { .form-grid { --fg-cols: 2; } .form-grid:not([style*="grid-template-columns"]) > * { grid-column: 1 / -1; } }

/* Placeholders read as placeholders (ink3, regular); a chosen or typed value is ink. */
.inp::placeholder { color: rgb(var(--c-ink3)); opacity: 1; font-weight: 400; }

/* A closed dropdown shows its value exactly as a text box shows typed text — same font, size, colour, 10 px from the left —
   with its code after the name, muted: "UAE dirham · AED". An input cannot colour part of its text, so the line is drawn
   over the input (whose own text, the same words, is made transparent); the input keeps the value for screen readers and
   the full value as its tooltip. Disabled, the value wraps instead of being cut. */
.pick-show { position: absolute; left: 0; right: 46px; top: 0; bottom: 0; padding: 0 0 0 10px; display: flex; align-items: center; min-width: 0;
  font-size: 13px; color: rgb(var(--c-ink)); pointer-events: none; white-space: nowrap; overflow: hidden; }
.pick-show > span:first-child { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pick-show .pick-sc { flex: none; color: rgb(var(--c-ink3)); padding-left: 0.3em; }
/* A box too narrow for the name and the code shows the name alone, cut only at its end (feedback 140, 145: never "N · NOS").
   Decided by the width and nothing else: the code wraps to a line below the box, a whole line clear of it (the name's margin),
   so not a pixel of it shows. The spacer centres the name's line in the box, as align-items does when nothing wraps. The
   whole text stays on the input's tooltip. */
.picker:not(.pick-off, .pick-wrap) .pick-show { flex-wrap: wrap; align-content: flex-start; align-items: flex-start; }
.picker:not(.pick-off, .pick-wrap) .pick-show::before { content: ""; flex: 0 0 100%; height: calc(50% - .5lh); }
.picker:not(.pick-off, .pick-wrap) .pick-show > span:first-child { max-width: 100%; margin-bottom: 1lh; }
/* The room kept for the clear (×) is kept only where there is one. */
.picker:not(:has(.pick-x)) .pick-show { right: 24px; }
.picker.pick-shows .pick-in { color: transparent; }
.picker.pick-shows .pick-in:focus { color: transparent; caret-color: rgb(var(--c-ink)); }
:is(.pick-off, fieldset:disabled .picker) .pick-show { position: relative; right: auto; min-height: 28px; padding: 6px 46px 6px 10px; white-space: normal; line-height: 16px;
  background: rgb(var(--c-field)); border-radius: 7px; color: rgb(var(--c-ink2)); display: block; }
:is(.pick-off, fieldset:disabled .picker) .pick-show > span:first-child { overflow: visible; }
:is(.pick-off, fieldset:disabled .picker).pick-shows .pick-in { position: absolute; inset: 0; opacity: 0; }
/* Every read-only value in one colour: a disabled box, a disabled dropdown, a box in a disabled form. */
.inp:disabled, fieldset:disabled .inp { color: rgb(var(--c-ink2)); -webkit-text-fill-color: rgb(var(--c-ink2)); opacity: 1; }
fieldset:disabled .picker.pick-shows .pick-in, .pick-off.pick-shows .pick-in { -webkit-text-fill-color: transparent; }

/* Phone: no dropdown or box is wider than the screen less its gutter, whatever width a filter row gave it (dropdown audit 10). */
@media (max-width: 760px) { .picker, .inp { max-width: 100%; } .picker[style*="width"] { width: 100% !important; } }
/* Read-only looks read-only on every disabled Pick, its own Disabled or a disabled form around it: field fill, no caret,
   no clear, default cursor (dropdown audit 11). */
fieldset:disabled .picker .pick-in, .pick-off .pick-in { background: rgb(var(--c-field)); box-shadow: none; cursor: default; }
.pick-off .pick-x, .pick-off .pick-caret { display: none; }

/* <Pick WrapValue>: the closed value wraps and the box grows with it (a long activity on the phone), never cut. */
.pick-wrap .pick-show { position: relative; right: auto; display: block; white-space: normal; min-height: 28px; padding: 6px 46px 6px 10px; line-height: 16px;
  background: rgb(var(--c-paper)); border-radius: 7px; box-shadow: inset 0 0 0 1px rgb(var(--c-rule)); }
.pick-wrap .pick-show > span:first-child { overflow: visible; }
.pick-wrap.pick-shows .pick-in { position: absolute; inset: 0; height: 100%; opacity: 0; }
.pick-wrap:focus-within .pick-show { box-shadow: inset 0 0 0 1.5px rgb(var(--c-brand)); }
/* On a phone every field has its own row, so nothing beside it to line up with: a long closed value wraps, never cut. */
@media (max-width: 760px) {
  .picker.pick-shows:not(.pick-off) .pick-show { position: relative; right: auto; display: block; white-space: normal; min-height: 28px; padding: 6px 46px 6px 10px;
    line-height: 16px; background: rgb(var(--c-paper)); border-radius: 7px; box-shadow: inset 0 0 0 1px rgb(var(--c-rule)); }
  .picker.pick-shows .pick-show > span:first-child { overflow: visible; }
  .picker.pick-shows:not(.pick-off) .pick-in { position: absolute; inset: 0; height: 100%; opacity: 0; }
  .picker.pick-shows:focus-within .pick-show { box-shadow: inset 0 0 0 1.5px rgb(var(--c-brand)); }
  .fx-field .picker.pick-shows .pick-show { background: transparent; box-shadow: none; text-align: right; }
}

/* A section of repeating child records on a record page (order lines, feedback 15): its name, and at its right the
   button that adds one; child records are added from their own section, never from the page header. */
.section-h { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; }
.section-h h2 { font-size: 15px; font-weight: 600; margin: 0; }
.section-h > .btn:first-of-type { margin-left: auto; }

/* RecordStamp (feedback 18): under a record's heading, its status chip, then who entered and who approved it, and when. */
.stamp { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 6px; font-size: 12px; color: rgb(var(--c-ink2)); }
.stamp > span:not(.chip) ~ span:not(.chip)::before { content: "\00B7"; margin-right: 12px; color: rgb(var(--c-ink3)); }

/* Touch screens (no hover, so no tooltip): a dropdown value the box cuts is shown whole under the box while the field is
   in use; the open list is placed below it (etei.pick.place measures the whole .picker). */
.pick-full { display: none; }
@media (hover: none) {
  .picker[data-cut] .pick-full { display: block; padding: 4px 2px 0; font-size: 12px; line-height: 16px; color: rgb(var(--c-ink2)); white-space: normal; overflow-wrap: anywhere; }
}

/* RecordRef (feedback 43): the line under a record's number naming its client and project — one line, cut with its
   tooltip rather than wrapping, so every row keeps the same height and the columns stay aligned. */
.sub.whose { max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ═══ Forms v1.2 — the project lead's review of 18 October 2026: "the forms are too disorganised" ═══════════════════
   DESIGN.md v1.2 and docs/streams/FORMS-v1.2.md say why; this block is the whole of it, tokens only. */

/* 1. Fields that can be seen. An editable field: white, a 1.5 px border in --c-fieldLine; in focus the brand; in error
      the hold red. Read-only and disabled: the grey field fill and no border, never mistaken for an empty box. */
.inp { box-shadow: inset 0 0 0 1.5px rgb(var(--c-fieldLine)); background: rgb(var(--c-paper)); }
.inp:focus { box-shadow: inset 0 0 0 2px rgb(var(--c-brand)), 0 0 0 3px rgb(var(--c-brand) / .15); outline: none; }
div:has(> .err) > .inp, div:has(> .err) > .picker .pick-in, .inp[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px rgb(var(--c-hold)); }
.inp[readonly], .inp:disabled, fieldset:disabled .inp { background: rgb(var(--c-field)); box-shadow: none; }

/* 2. Each kind of field known at a glance (the legend, DESIGN.md §10.7a): text — white with the field border; dropdown —
      the brand tint, its chevron in brand; date — white, its calendar in brand; number and money — right-aligned, the unit
      or currency inside the field; required — the dot in the brand accent after the label. */
.picker:not(.pick-off) .pick-in { background: rgb(var(--c-pickTint)); }
fieldset:disabled .picker .pick-in { background: rgb(var(--c-field)); }
.picker:not(.pick-off) .pick-caret { color: rgb(var(--c-brand)); }
@media (max-width: 760px) { .picker.pick-shows:not(.pick-off) .pick-show { background: rgb(var(--c-pickTint)); box-shadow: inset 0 0 0 1.5px rgb(var(--c-fieldLine)); } }
.pick-wrap .pick-show { background: rgb(var(--c-pickTint)); box-shadow: inset 0 0 0 1.5px rgb(var(--c-fieldLine)); }
input.inp:is([type=date], [type=datetime-local], [type=month])::-webkit-calendar-picker-indicator {
  background-color: rgb(var(--c-brand)); background-image: none; cursor: pointer; width: 15px; height: 15px; opacity: 1;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") center / contain no-repeat; }
input.inp[type=time]::-webkit-calendar-picker-indicator {
  background-color: rgb(var(--c-brand)); background-image: none; cursor: pointer; width: 15px; height: 15px; opacity: 1;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center / contain no-repeat; }
.inp:disabled::-webkit-calendar-picker-indicator, .inp[readonly]::-webkit-calendar-picker-indicator { background-color: rgb(var(--c-ink3)); }
.num-wrap { position: relative; display: block; min-width: 0; }
.num-wrap > .inp { padding-right: calc(16px + var(--unit-ch, 3) * 1ch); }
.num-wrap > .unit { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 500; color: rgb(var(--c-ink3)); pointer-events: none; }
.lbl.req::after { color: rgb(var(--c-accent2)); }

/* 3. Use the width. The grid's columns (8 on a full-width panel) take fields by size, said by the page, not in pixels:
      .f-s one column (dates, codes, numbers, yes/no), .f-m two (most fields), .f-l four (names, descriptions),
      .full the row (notes). A desktop section so shows 3–4 fields a row. Sections sit side by side in .sections. */
.form-grid:not([style*="grid-template-columns"]) > .f-s { grid-column: span 1; }
.form-grid:not([style*="grid-template-columns"]) > .f-m { grid-column: span 2; }
.form-grid:not([style*="grid-template-columns"]) > .f-l { grid-column: span min(4, var(--fg-cols)); }
.form-grid > .full, .form-grid:not([style*="grid-template-columns"]) > .full { grid-column: 1 / -1; }
@container (max-width: 519px) { .form-grid:not([style*="grid-template-columns"]) > :is(.f-s, .f-m, .f-l) { grid-column: 1 / -1; } }
.sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 600px), 1fr)); gap: 0 16px; align-items: start; }
.sections > .panel { min-width: 0; }

/* 4. Tables a row can be followed across: row rules in --c-gridLine, a column rule between cells, the header row filled. */
table.t th { background: rgb(var(--c-headFill)); border-bottom: 1.5px solid rgb(var(--c-fieldLine) / .55); color: rgb(var(--c-brandInk)); }
table.t td { border-bottom: 1px solid rgb(var(--c-gridLine)); }
table.t td + td, table.t th + th { border-left: 1px solid rgb(var(--c-gridLine) / .7); }
table.mx th, table.mx td { border-bottom-color: rgb(var(--c-gridLine)); border-right-color: rgb(var(--c-gridLine)); }
table.mx thead th { background: rgb(var(--c-headFill)); }

/* 5. The brand on record screens (DESIGN.md §3.3). A record's title block — its facts strip, then its number, title,
      status and stamp — is one navy band. Data keeps its own tones: chips are not recoloured. */
.tblock:has(+ .phead) { margin-bottom: 0; border-radius: 12px 12px 0 0; box-shadow: none; }
:is(.tblock + .phead, .phead:has(> div > .stamp)) { background: var(--navy-grad); color: rgb(var(--c-bandInk)); padding: 14px 18px 16px; border-radius: 12px; margin-bottom: 20px; box-shadow: 0 6px 20px rgb(var(--c-navy) / .18); }
.tblock + .phead { border-radius: 0 0 12px 12px; border-top: 1px solid rgb(var(--c-bandLine) / .12); }
:is(.tblock + .phead, .phead:has(> div > .stamp)) h1 { color: rgb(var(--c-bandInk)); }
:is(.tblock + .phead, .phead:has(> div > .stamp)) p, :is(.tblock + .phead, .phead:has(> div > .stamp)) .stamp { color: rgb(var(--c-bandInk2)); }
:is(.tblock + .phead, .phead:has(> div > .stamp)) .btn:not(.btn-pri):not(.btn-danger) { background: rgb(var(--c-bandLine) / .10); color: rgb(var(--c-bandInk)); box-shadow: inset 0 0 0 1px rgb(var(--c-bandLine) / .35); }
:is(.tblock + .phead, .phead:has(> div > .stamp)) .btn:not(.btn-pri):not(.btn-danger):hover:not(:disabled) { background: rgb(var(--c-bandLine) / .18); }
:is(.tblock + .phead, .phead:has(> div > .stamp)) a:not(.btn) { color: rgb(var(--c-accent)); }

/* Section headers in panels carry the brand: a teal band, a 4 px teal rule, the title in brand ink. */
.panel-h { background: rgb(var(--c-brandTint)); border-bottom: 1px solid rgb(var(--c-brandLine)); color: rgb(var(--c-brandInk)); font-weight: 600; }
.panel-h::before { width: 4px; height: 16px; }

/* Tabs: the active one in brand. Secondary buttons outlined in brand, not grey. */
.tabs { background: rgb(var(--c-brandTint)); }
.tab:hover { color: rgb(var(--c-brandInk)); }
.tab-on { background: rgb(var(--c-brand)); color: rgb(var(--c-bandInk)); box-shadow: 0 1px 2px rgb(var(--c-navy) / .2); }
:is(main, .dlg) .btn:not(.toolbar *):not(.btn-pri):not(.btn-tint):not(.btn-danger):not(.btn-ghost):not(.tb-menu):not(.pick-x):not(.dlg-x) { background: rgb(var(--c-paper)); color: rgb(var(--c-brand)); box-shadow: inset 0 0 0 1.5px rgb(var(--c-brand) / .55); }
:is(main, .dlg) .btn:not(.toolbar *):not(.btn-pri):not(.btn-tint):not(.btn-danger):not(.btn-ghost):not(.tb-menu):not(.pick-x):not(.dlg-x):hover:not(:disabled) { background: rgb(var(--c-brandTint)); }
.toolbar.brand .btn, .toolbar.brand .btn:hover:not(:disabled) { box-shadow: none; }

/* 6. Popups and dialogs: a brand header bar, set apart from the page. */
.dlg { overflow: hidden; }
.dlg-h { background: var(--navy-grad); color: rgb(var(--c-bandInk)); padding: 16px 24px 14px; }
.dlg-h h2 { color: rgb(var(--c-bandInk)); }
.dlg-h p { color: rgb(var(--c-bandInk2)); }
.dlg-x { background: rgb(var(--c-bandLine) / .12); color: rgb(var(--c-bandInk)); }
.dlg-x:hover { background: rgb(var(--c-bandLine) / .22); }
.dlg-b { padding-top: 16px; }

/* Text colours by class, never by a page's style attribute (Forms v1.2): quiet ink2, muted ink3. */
.quiet { color: rgb(var(--c-ink2)); }
.muted { color: rgb(var(--c-ink3)); }
/* State-toned text and resets, by class (Forms v1.2): never a colour in a page's style attribute. */
.t-due { color: rgb(var(--c-due)); }
.t-hold { color: rgb(var(--c-hold)); }
.t-ok { color: rgb(var(--c-ok)); }
.t-brand { color: rgb(var(--c-brand)); }
.inherit { color: inherit; }
.bare { background: none; }
/* Meters (a proportion as a bar; the width is the page's, the colours are these), and two small surfaces (Forms v1.2). */
.meter { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: rgb(var(--c-ink) / .08); }
.meter.tall { height: 8px; border-radius: 4px; }
.meter > .m-accent { background: rgb(var(--c-accent)); }
.meter > .m-ok { background: rgb(var(--c-ok)); }
.meter > .m-hold { background: rgb(var(--c-hold) / .55); }
.photo-empty { position: relative; height: 150px; display: grid; place-items: center; background: rgb(var(--c-ink) / .05); }
.on-paper { background: rgb(var(--c-paper)); }
table.t.boxed { background: rgb(var(--c-paper)); border: 1px solid rgb(var(--c-rule2)); }
table.t.boxed.held { border-color: rgb(var(--c-holdLine)); }
/* Moved from pages' own stylesheets (Forms v1.2: colours live here): a heading's leading icon, the sign-in recovery link. */
svg.i.i-lead { vertical-align: -2px; margin-right: 8px; color: rgb(var(--c-brand)); }
.forgot { display: block; margin-top: 14px; text-align: center; font-size: 12.5px; color: rgb(var(--c-brand)); text-decoration: none; }
.forgot:hover { text-decoration: underline; }
/* The inspector's phone (DESIGN.md §16) keeps its own rows: a value sits inline at the row's right, no box (v1.2 leaves
   the field shell's rows as they are; only the chevron takes the brand). */
.fx-field .picker .pick-in, .fx-field .picker.pick-shows .pick-show { background: transparent; box-shadow: none; }

/* A blurred bar must not trap the dialogs opened from it (tester report, 19 October 2026). backdrop-filter on an element
   makes it the containing block of its position: fixed descendants, so a dialog opened from the toolbar or the portal bar
   was centred on the 56 px bar and its top ran off the screen. The blur moves to a layer behind the bar's content; the
   bar itself has no filter, and every .dlg-scrim inside it covers the whole window again. */
.glass-bar { -webkit-backdrop-filter: none; backdrop-filter: none; }
.glass-bar::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.toolbar.brand::before { display: none; }

/* The editable grid (<EditGrid>, Forms v1.2; stream B's request for Quick RFI, 2026-10-18). A table.t — the row rules,
   column rules, header fill and row numbers above — whose cells each hold one field, drawn as the legend says (a text
   box white, a dropdown tinted, a number right-aligned): compact, so a row reads as a row of a spreadsheet. The cell
   being edited is ringed; widths go by size, as a form's fields do. */
.egrid { min-width: 0; overflow-x: auto; }
.egrid-t { min-width: 560px; }
table.t.egrid-t td { height: 36px; padding: 3px 4px; }
table.t.egrid-t th { padding: 7px 8px; }
table.t.egrid-t :is(td, th):first-child { padding-left: 4px; }
table.t.egrid-t :is(td, th):last-child { padding-right: 4px; }
table.t.egrid-t .inp { height: 30px; font-size: 12.5px; padding: 0 8px; }
table.t.egrid-t .num-wrap > .inp { padding-right: calc(14px + var(--unit-ch, 3) * 1ch); }
table.t.egrid-t tbody tr:focus-within::before { background: rgb(var(--c-brandTint) / .6); color: rgb(var(--c-brand)); }
table.t.egrid-t th.num { text-align: right; }
/* A narrow grid column has its text before its clear (×): the × comes with the pointer or the focus; Delete clears as well. */
table.t.egrid-t .picker:not(:hover, :focus-within) .pick-x { display: none; }
table.t.egrid-t .picker:not(:hover, :focus-within) .pick-show { right: 24px; }
table.t.egrid-t th .lbl.req { display: inline; margin: 0; font: inherit; color: inherit; }
.egrid-s { width: 110px; }
/* A short dropdown and its master's + (a unit, form finish audit F-11): room for "Kilometres" whole beside the +. */
.egrid-sp { width: 9rem; }
.egrid-m { width: 200px; }
.egrid-l { min-width: 240px; }
table.t.egrid-t .egrid-x { width: 36px; text-align: center; }
table.t.egrid-t td.egrid-x .btn { padding: 0 6px; color: rgb(var(--c-ink3)); }
table.t.egrid-t td.egrid-x .btn:hover { color: rgb(var(--c-hold)); }
.egrid-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 4px 2px; }
.egrid-foot .hint { margin-top: 0; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* A form's actions at its foot (<FormActions>, tester feedback 46): after the last field, on the right, held to the
   window's bottom edge while the form scrolls. No backdrop-filter, transform or filter here: a dialog opened from the
   bar must not be trapped by it (the integrator's hotfix 34be295). */
.form-foot { position: sticky; bottom: 0; z-index: 20; display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 18px 0 0; padding: 10px 16px; background: rgb(var(--c-paper)); border: 1px solid rgb(var(--c-rule2)); border-bottom: 0;
  border-radius: 12px 12px 0 0; box-shadow: 0 -6px 18px rgb(var(--c-navy) / .08); }
.portal-page .form-foot { margin-bottom: 10px; }
@media (max-width: 600px) { .form-foot { margin-inline: -16px; border-radius: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); } .form-foot .btn { flex: 1 1 auto; justify-content: center; } }

/* The status stamp (<RecordStamp>, tester feedback 59): a stamp, not a chip, with a look for each kind of state so it is
   told at a glance. It sits on the record's navy band. Approved: double rule in the approved tone, a tick, who and when
   inside. Draft: dashed. Submitted: amber. Rejected: red, heavy. Cancelled: grey, struck through. Other: a plain rule. */
.seal { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 3px 10px 4px; border-radius: 6px;
  border: 1.5px solid currentColor; color: rgb(var(--c-sealMute)); font-size: 11px; line-height: 15px; transform: rotate(-2deg); transform-origin: left center; }
.seal-w { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.seal-w svg.i { width: 14px; height: 14px; stroke-width: 3; }
.seal-by { font-weight: 500; letter-spacing: 0; opacity: .92; }
.seal-approved { color: rgb(var(--c-sealOk)); border: 3px double currentColor; background: rgb(var(--c-sealOk) / .12); padding: 3px 12px 5px; }
.seal-draft { border-style: dashed; color: rgb(var(--c-bandInk2)); }
.seal-submitted { color: rgb(var(--c-sealDue)); background: rgb(var(--c-sealDue) / .10); }
.seal-rejected { color: rgb(var(--c-sealHold)); border-width: 2.5px; background: rgb(var(--c-sealHold) / .12); }
.seal-cancelled { color: rgb(var(--c-sealMute)); opacity: .9; }
.seal-cancelled .seal-w { text-decoration: line-through; text-decoration-thickness: 2px; }
.stamp { align-items: center; }
.stamp > .seal { margin-right: 4px; }
.stamp > span:not(.chip):not(.seal) ~ span:not(.chip):not(.seal)::before { content: "\00B7"; margin-right: 12px; color: rgb(var(--c-ink3)); }

/* The record band's type (tester feedback 60, approved 19 October 2026). The number is the band's title, not a poster:
   one step above the facts beside it. Facts read in the text face, words and numbers alike (figures aligned), so a
   document's kind ("Sales order") and its client follow one style; codes stay as typed. The client is highlighted
   (class t-client on its fact). */
:is(.tblock + .phead, .phead:has(> div > .stamp)) h1 { font-size: 20px; line-height: 26px; font-weight: 700; letter-spacing: -.01em; }
:is(.tblock + .phead, .phead:has(> div > .stamp)) p { font-size: 13px; }
.tblock dd { font-family: inherit; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.tblock dt { font-size: 11px; font-weight: 500; letter-spacing: .01em; }
.tblock .t-client dd { display: inline-block; vertical-align: top; color: rgb(var(--c-bandInk));
  background: rgb(var(--c-accent) / .22); box-shadow: inset 3px 0 0 rgb(var(--c-accent)); padding: 1px 8px 1px 9px; margin-left: -9px; border-radius: 4px; }
.tblock .t-client dt { color: rgb(var(--c-accent)); }
.stamp > span.seal + span:not(.chip):not(.seal)::before { content: none; }
.tblock > div { padding-inline: 14px; }

/* Grids and the plan matrix (tester feedback 64, approved 19 October 2026; with stream B for Quick RFI's plan grid).
   The activity column takes the width the boxes leave (no empty space at the right of the grid); each row reads as one
   (a stronger rule under every row, faint rules between cells, alternate rows tinted); more rows in view (less padding,
   a taller scroll box). Pages apply classes only: .mx-tight shrinks a column to its content (an "add a column" button),
   .grid-bar lays a grid's controls across the width above it. */
.flex { flex: 1 1 auto; }
table.mx .sk2 { width: auto; min-width: clamp(300px, 26vw, 460px); }
table.mx thead .mx-tight, table.mx .mx-tight { width: 1%; min-width: 0; white-space: nowrap; }
table.mx th, table.mx td { padding: 4px 8px; border-right-color: rgb(var(--c-gridLine) / .55); }
table.mx tbody td { border-bottom: 1.5px solid rgb(var(--c-gridLine)); }
table.mx tbody tr:not(.grp):nth-child(even) td:not(.cell):not(.mine) { background: rgb(var(--c-ink) / .022); }
table.mx tr.grp td { padding-top: 6px; padding-bottom: 6px; border-top: 1.5px solid rgb(var(--c-fieldLine) / .55); }
.mx .meta { margin-top: 1px; line-height: 1.35; }
.mx td.cell .ex, .mx td.cell .tick { margin-top: 0; line-height: 1.2; }
.mx-wrap { max-height: max(420px, calc(100vh - 240px)); }
.grid-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 12px; border-bottom: 1px solid rgb(var(--c-rule2)); }
.grid-bar > .grow { flex: 1 1 260px; min-width: 0; }
.grid-bar > .grow > .inp, .grid-bar > .grow > .picker { width: 100%; }
/* The same in the shared editable grid: the description column ("l") takes the spare width, rows are separated harder
   and sit closer. */
table.t.egrid-t { table-layout: auto; }
table.t.egrid-t .egrid-l { width: auto; min-width: clamp(260px, 30vw, 520px); }
table.t.egrid-t tbody td { height: 32px; padding-top: 2px; padding-bottom: 2px; border-bottom: 1.5px solid rgb(var(--c-gridLine)); }
table.t.egrid-t td + td { border-left-color: rgb(var(--c-gridLine) / .5); }
table.t.egrid-t tbody tr:nth-child(even) td { background: rgb(var(--c-ink) / .022); }
table.t.egrid-t .inp { height: 28px; }
@media (max-width: 760px) { table.mx .sk2 { min-width: 200px; } table.t.egrid-t .egrid-l { min-width: 200px; } }

/* "New template from templates…" (TemplateCombine, feedback 62): the templates on the left, what is taken from each, in
   order, on the right; each stage opens to its activities. */
.tc-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; margin-top: 12px; }
@media (max-width: 760px) { .tc-cols { grid-template-columns: 1fr; } }
.tc-pane { min-width: 0; max-height: 52vh; overflow: auto; }
.tc-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.tc-list li { border: 1px solid rgb(var(--c-rule2)); border-radius: 8px; padding: 6px 8px; }
.tc-list li.on { border-color: rgb(var(--c-brand) / .55); background: rgb(var(--c-brandTint) / .5); }
.tc-list .check { align-items: flex-start; gap: 8px; }
.tc-tx { display: grid; gap: 1px; min-width: 0; }
.tc-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 10px; background: rgb(var(--c-brand)); color: rgb(var(--c-bandInk)); font-size: 11px; font-weight: 700; }
.tc-part { border: 1px solid rgb(var(--c-rule2)); border-radius: 10px; padding: 6px 10px 8px; margin-top: 6px; }
.tc-part-h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.tc-stage { border-top: 1px solid rgb(var(--c-gridLine)); padding: 4px 0; }
.tc-stage > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style-position: inside; }
.tc-stage > summary .sub { margin-left: auto; }
.tc-act { display: flex; gap: 8px; padding: 3px 0 3px 26px; font-size: 12.5px; }

/* The record band's layout (tester feedback 77, approved 20 October 2026): on every record page — a band that carries
   its RecordStamp — the stamp sits at the top right, in line with the record's name; the actions under it; the title and
   subtitle on the left. One rule here, no page markup: the band's first block is laid open (display: contents) so its
   title, subtitle and stamp are the band's own grid items. On a phone it is one column again. */
.phead:has(> div > .stamp) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 20px; align-items: start; }
.phead:has(> div > .stamp) > div:first-child { display: contents; }
.phead:has(> div > .stamp) > div:first-child > * { grid-column: 1; }
.phead:has(> div > .stamp) > div:first-child > .stamp { grid-column: 2; grid-row: 1 / span 2; justify-self: end; flex-direction: column; flex-wrap: nowrap; align-items: flex-end; gap: 3px; margin-top: 2px; text-align: right; }
.phead:has(> div > .stamp) > div:first-child > .stamp > span:not(.seal)::before { content: none; }
.phead:has(> div > .stamp) .seal { transform-origin: right center; margin-right: 0; }
.phead:has(> div > .stamp) > .flex { display: none; }
.phead:has(> div > .stamp) > .acts { grid-column: 2; grid-row: 3 / span 2; justify-self: end; align-self: end; margin-top: 8px; }
.phead:has(> div > .stamp) > div:first-child > .band-notes { grid-column: 1 / -1; grid-row: 30; }
/* A band with more than one stamp (Quick RFI, Visited again, Partial RFI beside the RecordStamp; tester feedback 167,
   20 November 2026): the extra stamps sit in the title's own column, each on its own line under the subtitle, chip then
   words, wrapping there. A middle column of their own (28 October) took the width of their longest line and squeezed the
   title to a word a line, drawn over its neighbours. The title column keeps at least 30rem (or 60%), so the actions wrap
   at the right before the title does. */
.phead:has(> div > .stamp) { grid-template-columns: minmax(min(30rem, 60%), 1fr) minmax(0, auto); }
.phead:has(> div > .stamp ~ .stamp) > div:first-child > .stamp ~ .stamp { grid-column: 1; grid-row: auto; justify-self: start; align-self: start;
  flex-direction: row; flex-wrap: wrap; align-items: center; gap: 2px 8px; text-align: left; margin-top: 6px; max-width: none; }
.phead:has(> div > .stamp ~ .stamp) > div:first-child > .stamp ~ .stamp > span:not(.chip) { flex: 1 1 16rem; min-width: 0; text-wrap: pretty; }
@media (max-width: 600px) {
  .phead:has(> div > .stamp) { grid-template-columns: minmax(0, 1fr); }
  .phead:has(> div > .stamp) > div:first-child > .stamp { grid-column: 1; grid-row: auto; justify-self: start; align-items: flex-start; text-align: left; margin-top: 8px; }
  .phead:has(> div > .stamp) .seal { transform-origin: left center; }
  .phead:has(> div > .stamp) > .acts { grid-column: 1; grid-row: auto; justify-self: start; }
}

/* A record's messages in its band (<BandNote>, tester feedback 79): one compact line each — the message's heading, or
   its first line — with a chevron that opens the whole of it; the detail below keeps its height for rows. The message's
   own box (.warnbox, .refusal, .okbox, .notebar) gives only its tone, as the rule at the line's left. */
.band-notes { display: grid; gap: 4px; margin-top: 12px; min-width: 0; }
.band-note { display: flex; align-items: flex-start; gap: 6px; min-width: 0; padding: 3px 4px 3px 12px; border-radius: 8px;
  background: rgb(var(--c-bandLine) / .07); box-shadow: inset 3px 0 0 rgb(var(--c-sealMute)); }
.band-note:has(.warnbox) { box-shadow: inset 3px 0 0 rgb(var(--c-sealDue)); }
.band-note:has(.refusal) { box-shadow: inset 3px 0 0 rgb(var(--c-sealHold)); }
.band-note:has(.okbox) { box-shadow: inset 3px 0 0 rgb(var(--c-sealOk)); }
.band-note-c { flex: 1; min-width: 0; padding: 2px 0; font-size: 12.5px; line-height: 18px; color: rgb(var(--c-bandInk2)); }
.band-note-c > :is(.warnbox, .refusal, .okbox, .notebar) { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; margin: 0; color: inherit; font-size: inherit; line-height: inherit; }
.band-note-c :is(.warnbox-h, .refusal-h, .okbox-h) { margin: 0; }
.band-note-c .warnbox-h { color: rgb(var(--c-sealDue)); }
.band-note-c .refusal-h { color: rgb(var(--c-sealHold)); }
.band-note-c .okbox-h { color: rgb(var(--c-sealOk)); }
.band-note-c :is(.box-body, li, p, span, b, strong) { color: inherit; }
.band-note-c .box-body { font-size: 12px; line-height: 17px; margin-top: 2px; }
.band-note-c a:not(.btn) { color: rgb(var(--c-accent)); }
.band-note:not(.open) .band-note-c > * > :not(:first-child) { display: none; }
.band-note:not(.open) .band-note-c > *, .band-note:not(.open) .band-note-c > * > :first-child { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.band-note:not(.open) .band-note-c > * > :first-child svg.i { vertical-align: -2px; margin-right: 6px; }
.band-note-x { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; color: rgb(var(--c-bandInk2)); cursor: pointer; }
.band-note-x:hover { background: rgb(var(--c-bandLine) / .14); color: rgb(var(--c-bandInk)); }
.band-note-x svg.i { transition: transform .15s; }
.band-note.open .band-note-x svg.i { transform: rotate(180deg); }
.band-note:not(.open) .band-note-c > .notebar > :first-child { display: inline; }
@media (max-width: 600px) { .tblock .t-client dd { white-space: normal; } }

/* A dialog asking before it loses what was typed (Dialog Dirty, tester feedback 78): the footer becomes the question. */
.dlg-ask { background: rgb(var(--c-dueBg)); }
.dlg-ask-q { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: rgb(var(--c-due)); }

/* A long field's length as it fills (tester feedback 90): "52/60" at the field's end once four-fifths is used. */
.len-count { position: absolute; z-index: 300; pointer-events: none; padding: 0 6px; border-radius: 6px; font-size: 11px; line-height: 16px;
  font-variant-numeric: tabular-nums; color: rgb(var(--c-ink3)); background: rgb(var(--c-paper) / .92); }
.len-count.full { color: rgb(var(--c-due)); font-weight: 600; }

/* A date, typed or picked (<DateInput>, tester feedback 91): a text field showing "21 Oct 2026" with a calendar button in
   brand at its end (as the native date field had); the calendar opens with a month and a year to choose. A typed date that
   is not a date: the field's border in the hold tone and the reason beside it. */
.date-wrap { position: relative; display: block; min-width: 0; }
.date-wrap > .date-in { padding-right: 34px; }
.date-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 28px; height: 28px;
  border: 0; border-radius: 6px; background: transparent; color: rgb(var(--c-brand)); cursor: pointer; }
.date-btn:hover:not(:disabled) { background: rgb(var(--c-brandTint)); }
.date-btn:disabled { color: rgb(var(--c-ink3)); cursor: default; }
.date-wrap.bad > .date-in { box-shadow: inset 0 0 0 1.5px rgb(var(--c-hold)); }
.date-bad { display: block; margin-top: 4px; font-size: 11.5px; line-height: 15px; color: rgb(var(--c-hold)); }
.date-pop { z-index: 400; width: 296px; padding: 10px; border-radius: 12px; background: rgb(var(--c-paper)); box-shadow: 0 10px 30px rgb(var(--c-navy) / .22), 0 0 0 1px rgb(var(--c-rule2)); }
.date-pop-h { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.date-pop-h .date-year { width: 64px; flex: none; text-align: center; }
.date-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.date-dn { font-size: 10.5px; font-weight: 600; text-align: center; color: rgb(var(--c-ink3)); padding: 2px 0 4px; }
.date-d { height: 32px; border: 0; border-radius: 7px; background: transparent; font: inherit; font-size: 12.5px; font-variant-numeric: tabular-nums; color: rgb(var(--c-ink)); cursor: pointer; }
.date-d:hover { background: rgb(var(--c-brandTint)); }
.date-d.other { color: rgb(var(--c-ink3) / .6); }
.date-d.today { box-shadow: inset 0 0 0 1.5px rgb(var(--c-brand) / .5); }
.date-d.on { background: rgb(var(--c-brand)); color: rgb(var(--c-bandInk)); font-weight: 600; }
.date-pop-f { display: flex; justify-content: space-between; margin-top: 6px; }
/* The inspector's phone keeps its own rows (DESIGN.md §16): a date sits inline at the row's right in brand, no box. */
.fx-field .date-wrap { flex: 0 1 auto; }
.fx-field .date-wrap > .date-in { background: transparent; box-shadow: none; border: 0; text-align: right; color: rgb(var(--c-brand)); font-weight: 600; }

/* A master's link beside its field (MasterLink, feedback 92): the dropdown and the link on one line, the label and any
   hint or error across the field as before. */
.mlink { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.mlink .btn { color: rgb(var(--c-brand)); }
:is(div, label):has(> .picker + .mlink) { display: grid; grid-template-columns: minmax(0, 1fr) 28px; column-gap: 4px; align-items: center; }
:is(div, label):has(> .picker + .mlink) > :not(.picker):not(.mlink) { grid-column: 1 / -1; }

/* The inspector's printable profile (feedback 93): an A4 sheet under the record's band, its sections as tables; printed or
   saved as PDF from the browser, with only the sheet on the page and the band's colours kept. */
.prof-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.prof-sheet { max-width: 210mm; margin: 0 auto; padding: 14mm 12mm; background: rgb(var(--c-paper)); border-radius: 12px; box-shadow: var(--sh-card);
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.prof-top { display: grid; grid-template-columns: 34mm minmax(0, 1fr); gap: 16px; margin: 4px 0 14px; }
.prof-photo { width: 34mm; height: 42mm; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: rgb(var(--c-ink) / .05); }
.prof-photo img { width: 100%; height: 100%; object-fit: cover; }
.prof-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; margin: 0; align-content: start; }
.prof-facts dt { font-size: 11px; color: rgb(var(--c-ink3)); }
.prof-facts dd { margin: 0; font-size: 13px; font-weight: 600; }
.prof-sec { margin-top: 12px; break-inside: avoid-page; }
.prof-sec h2 { font-size: 13px; margin: 0 0 6px; padding-bottom: 4px; border-bottom: 1.5px solid rgb(var(--c-brand) / .5); color: rgb(var(--c-brandInk)); }
.prof-sec table.t td { height: auto; padding: 4px 8px; font-size: 12px; }
.prof-sec table.t th { padding: 5px 8px; }
.prof-sec table.t tr { break-inside: avoid; }
.prof-foot { margin-top: 16px; font-size: 10.5px; color: rgb(var(--c-ink3)); text-align: right; }
@media (max-width: 600px) { .prof-sheet { padding: 16px 12px; } .prof-top { grid-template-columns: 1fr; } .prof-facts { grid-template-columns: 1fr; } }
@page { size: A4; margin: 12mm; }
@media print {
  body * { visibility: hidden; }
  .prof-sheet, .prof-sheet * { visibility: visible; }
  .prof-sheet { position: absolute; left: 0; top: 0; max-width: none; width: 100%; margin: 0; padding: 0; box-shadow: none; border-radius: 0; }
  .prof-acts.no-print, .no-print { display: none; }
}

/* Stage lists: a stage heading is a band, its activities lighter under it (tester feedback 87, approved 21 October 2026;
   with stream B for Quick RFI's "Stage and visit" tab and the plan matrix). The heading row (tr.grp) is shaded across the
   whole width with a firmer rule above it and no cell dividers or boxes in it, so it reads as a band and not as a boxed
   row; chips in it are flat labels. The activities under it have quieter rules and a little more height, so each row
   breathes without fewer rows in view. Every tr.grp gets the band; a table.t of stages adds .staged for the activity
   rows (table.mx has them already). */
tr.grp td, table.mx tr.grp td { background: rgb(var(--c-navy) / .085); color: rgb(var(--c-brandInk)); font-weight: 600;
  border-top: 1.5px solid rgb(var(--c-fieldLine) / .6); border-bottom: 1px solid rgb(var(--c-fieldLine) / .35); }
table.t tr.grp td + td, table.mx tr.grp td { border-left: 0; border-right: 0; }
table.mx tr.grp td.sk2 { box-shadow: none; }
table.t > tbody > tr.grp:first-child td, table.mx > tbody > tr.grp:first-child td { border-top: 0; }
tr.grp .chip { border-radius: 3px; background: transparent; box-shadow: none; padding-inline: 0; }
tr.grp .btn { border-radius: 6px; }
table.mx tbody tr:not(.grp) td, table.t.staged > tbody > tr:not(.grp) > td { border-bottom: 1px solid rgb(var(--c-gridLine) / .6); }
table.mx tbody tr:not(.grp) td:not(.cell) { padding-top: 5px; padding-bottom: 5px; }
table.t.staged > tbody > tr:not(.grp) > td { height: 36px; color: rgb(var(--c-ink2)); font-weight: 400; }
table.t.staged > tbody > tr:not(.grp) > td + td { border-left-color: rgb(var(--c-gridLine) / .4); }
table.t.staged > tbody > tr.grp > td { height: 34px; font-size: 12.5px; }

/* Keyboard focus that can be seen on every screen (tester feedback 95, approved 21 October 2026). One ring for every
   control a key reaches (buttons of every kind, links, tabs, chips, dropdown triggers, the master-link icons): a 2px
   outline in --c-focus, 2px clear of the control, shown only for keyboard focus (:focus-visible), never for a click. It
   contrasts with what is around it: navy on light panels; teal on the navy shell, menu, record band and dialog heads, and
   in the dark theme; white round a teal button on those. No rule may remove the outline without a replacement
   (UiStandardsTests.Focus; ui_check focus). A text field keeps its own focus border, which shows for a click too. */
:is(.sidebar, .toolbar.brand, .tblock, .tblock + .phead, .phead:has(> div > .stamp), .dlg-h, .lp-greet) { --c-focus: 45 198 167; }
:is(.sidebar, .toolbar.brand, .tblock, .tblock + .phead, .phead:has(> div > .stamp), .dlg-h, .lp-greet) :is(.btn-pri, .side-item.on) { --c-focus: 255 255 255; }
:is(.pill-on, .toolbar.brand .seg > button.on) { --c-focus: 11 124 140; }
:root[data-theme="dark"] :is(.btn-pri, .side-item.on, .tab-on, .pill-on, [role=tab][aria-selected=true]) { --c-focus: 245 245 247; }
:focus-visible { outline: 2px solid rgb(var(--c-focus)); outline-offset: 2px; }
/* A tab sits in a strip that scrolls sideways and would cut a ring drawn outside it: its ring is drawn just inside. */
[role=tab]:focus-visible { outline-offset: -4px; }
/* A dropdown (Pick) is a text box, which a browser counts as keyboard-focused even when clicked; etei.js marks the page
   while keys are moving the focus (data-keys), so the ring shows for a Tab into it and not for a click. */
/* On the field's own edge, not 2px clear of it: a ring standing apart from a field was the finish fault of feedback 143. */
:root[data-keys] .pick-in:focus { outline: 2px solid rgb(var(--c-focus)); outline-offset: -2px; }

/* Table alignment (project lead, 22 October 2026; DESIGN.md §10.5). Five rules for every table (table.t, the plan
   matrix, the editable grid):
   1. A cell is always a cell. A class that lays out a block (.sub, .row, .flex …) on a <td> or <th> took it out of the
      table: the row lost its colspan, its line and its height, and grew a phantom column. On a cell such a class
      only colours and sizes the text.
   2. A group row (tr.grp) is one cell spanning every column, shaded across the full width, its label at the left.
   3. One vertical alignment: top. Every body cell has the same 10px top padding and a 20px line, so a one-line row is
      40px as before and a multi-line cell starts on the same line as its neighbours. A button, field or dropdown in a
      cell is drawn up to that line (a 28px control by 4px, a 22px one by 1px); a chip sits on it.
   4. The row draws the lines. What is inside a cell has no border of its own.
   5. Every row has as many cells as the header has columns (checked by ui_check tables and tools/dev/table_audit.py). */
:is(table.t, table.mx) :is(td, th) { display: table-cell; }
:is(table.t, table.mx) :is(td, th).sub { margin-top: 0; }
table.t tbody td { vertical-align: top; height: 40px; padding-top: 10px; padding-bottom: 9px; line-height: 20px; }
table.t tbody td.tall { padding-top: 10px; padding-bottom: 9px; }
table.t:not(.nonum, .matrix) > tbody > tr::before { vertical-align: top; padding-top: 10px; line-height: 20px; }
table.t:not(.egrid-t) tbody td > :is(.btn, .inp, .picker, .date-wrap, .row-inline):not(.btn-sm) { margin-block: -4px; }
table.t:not(.egrid-t) tbody td > .btn-sm { margin-block: -1px; }
/* A row of fields is as tall as its fields (feedback 143): it stood at 42 px round a 28 px box, the height set by the row's
   other cells. A cell of text beside a field keeps its first line level with the field's text. */
table.t:not(.egrid-t) tbody tr:has(> td > :is(.inp, .picker, .date-wrap, .num-wrap)) > td { height: auto; padding-block: 6px 2px; }
table.t:not(.egrid-t) tbody tr:has(> td > :is(.inp, .picker, .date-wrap, .num-wrap)) > td:has(> :is(.inp, .picker, .date-wrap, .num-wrap, .btn:not(.btn-sm))) { padding-block: 6px; }
table.t:not(.egrid-t) tbody tr:has(> td > :is(.inp, .picker, .date-wrap, .num-wrap)) > td:has(> .btn-sm) { padding-block: 3px; }
table.t tbody td .chip { margin-block: 0; vertical-align: top; }
table.t tbody td input[type=checkbox], table.t tbody td input[type=radio] { margin-block: 3px 0; vertical-align: top; }
table.t tbody td .sub { line-height: 16px; }
tr.grp > td { text-align: left; }
table.t > tbody > tr.grp > td { height: auto; padding-top: 7px; padding-bottom: 6px; line-height: 16px; }
table.t > tbody > tr.grp::before { padding-top: 7px; padding-bottom: 6px; line-height: 16px; }
.mx td.cell { vertical-align: top; }
table.t.egrid-t tbody td { vertical-align: top; line-height: 20px; }
:is(table.t, table.mx) td :not(input, select, textarea, button, .btn, .inp, .picker, .picker *, .chip, .date-wrap, .date-wrap *, .mlink, .mlink *, .seal, .pick-pop *, .date-pop *, svg, img) { border: 0; }

/* A master's screen in a pop-up (MasterDialog; project lead, 22 October 2026): the page's own width by its size (Small 560,
   Medium 880, Large 1240 — set on the sheet) up to 90% of the window, its content scrolling inside under the header; the
   whole window on a phone. The page's band and panels sit on the pop-up's grey, as on the page. */
.dlg.dlg-master { width: 90vw; max-height: 90vh; }
.dlg.dlg-master .dlg-b { flex: 1 1 auto; min-height: 0; background: rgb(var(--c-sunk)); padding: 16px 20px 20px; }
.dlg.dlg-master .dlg-f { border-top: 1px solid rgb(var(--c-rule2)); padding-top: 12px; }
.master-pop > .page, .master-pop .panel:last-child { margin-bottom: 0; }
.mlink > button.btn { color: rgb(var(--c-brand)); }
@media (max-width: 640px) {
  .dlg-scrim:has(> .dlg-master) { padding: 0; }
  .dlg.dlg-master { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
}
/* A group row of more than one cell (a code and a name) is a heading too: not counted (the counting rule above outranked it). */
table.t:not(.nonum, .matrix) > tbody > tr.grp:not(:has(> td:only-child)) { counter-increment: none; }

/* A date field's own size (tester feedback 108, 23 October 2026): wide enough for "21-10-2026" or "21 Oct 2026" and the
   calendar button. One column of the 8-column grid (about 165px); two where the grid has 6 or 4 columns, where one is too
   narrow. Written .f-d; a date field written .f-s gets the same. */
.date-wrap { min-width: 9.5rem; }
.form-grid:not([style*="grid-template-columns"]) > :is(.f-d, .f-s:has(> .date-wrap)) { grid-column: span 1; min-width: 9.5rem; }
/* A track is narrower than 9.5rem below a panel of about 1350 px (eight tracks, seven gaps, the form's padding): there the
   date takes two tracks rather than running into the gap (form finish audit, F-12). */
@container (max-width: 1349px) { .form-grid:not([style*="grid-template-columns"]) > :is(.f-d, .f-s:has(> .date-wrap)) { grid-column: span 2; } }
@container (max-width: 519px) { .form-grid:not([style*="grid-template-columns"]) > :is(.f-d, .f-s:has(> .date-wrap)) { grid-column: 1 / -1; } }
table.t:not(.egrid-t) .date-wrap, .fx-field .date-wrap { min-width: 0; }
/* In an editable grid (feedback 105/108, Quick RFI's "Inspection dates"): a cell holding a date is wide enough for
   "23-10-2026" and its calendar button, whatever size its column was given; Size="d" says so outright. */
.egrid-d { width: 10.5rem; }
table.t.egrid-t td:has(> .date-wrap) { min-width: 10.5rem; }
table.t.egrid-t .date-wrap { min-width: 9.5rem; }

/* The master link's slot is a fixed 28px beside its field, drawn empty where the user may not use it (tester feedback 114,
   23 October 2026): a field, and a grid's column, keep their width whether or not the link shows. A second button (Refresh,
   after a new tab) sits over the slot's right edge rather than widening it. */
.mlink { width: 28px; min-width: 28px; justify-content: flex-start; overflow: visible; position: relative; }
.mlink .btn { padding: 0 7px; }
.mlink > .btn + .btn { position: absolute; left: 100%; margin-left: 2px; }
td > .mlink, .egrid-t .mlink { vertical-align: middle; }
/* In a table cell, a Pick's master link sits beside the field on its line, as it does in a form (feedback 140, 145): on its
   own line under the field it made the row taller than the field. A cell cannot be the form's grid, so the two are placed
   in line and the field given what the link's slot leaves. */
table.t td:has(> .picker + .mlink) { white-space: nowrap; }
table.t td > .picker:has(+ .mlink) { display: inline-block; width: calc(100% - 32px); vertical-align: middle; margin-right: 4px; }
/* A slot with no link in it (the user may not use it) is not kept: the field goes to the edge and lines up with the fields
   above and below it (feedback 143, in part reversing 114). A grid's column keeps its width either way, as 114 asked. */
.mlink.none { display: none; }
:is(div, label):has(> .picker + .mlink.none) { grid-template-columns: minmax(0, 1fr); }
table.t td > .picker:has(+ .mlink.none) { width: 100%; margin-right: 0; }

/* EditGrid's remove (feedback 110): seen on every row, not only on hover; a locked grid says why under it. */
table.t.egrid-t td.egrid-x .btn { color: rgb(var(--c-ink2)); }
.egrid-locked { gap: 6px; align-items: center; }
.egrid-locked svg.i { color: rgb(var(--c-ink3)); }

/* A field in a table cell keeps its box on focus (tester feedback 111, 23 October 2026): the focus ring is drawn inside it,
   so nothing paints over the next column, and nothing in the row moves. */
:is(table.t, table.mx) td .inp:focus { box-shadow: inset 0 0 0 2px rgb(var(--c-brand)); }

/* The toolbar on a smaller laptop (tester feedback 96, 23 October 2026): nothing in it wraps onto a second line or over its
   neighbour. The Sidebar/Tiles switch never shrinks, and below 1366px shows its icons only (each has its tooltip); the
   user's name and role stay one line each, cut with an ellipsis (the whole is the button's tooltip). */
.toolbar .seg { flex: none; flex-wrap: nowrap; }
.toolbar .seg > button { flex: none; }
.toolbar .user-btn { min-width: 0; max-width: 220px; }
.toolbar .user-btn .who > :is(b, span) { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1365px) {
  .seg.nav-switch > button { padding: 0 8px; }
  .seg.nav-switch > button .seg-t { display: none; }
}

/* Text over text (tester feedback 96): two shared causes.
   - A heading that wraps took the body's 16px line, so its lines (and the line under it) were drawn over each other.
   - The client and project under a record's number (RecordRef) was cut at 340px, not at its cell, and ran into the
     next column; it now stops at the cell's edge, with its ellipsis and tooltip. */
h1, h2, h3 { line-height: 1.25; }
.sub.whose { max-width: min(340px, 100%); }
/* In a table the 100% counts for nothing while the columns are sized, so a long client line set its column's width (stream C,
   feedback 171, the orders list): in a table cell the cap is a plain 340px. */
table.t .sub.whose { max-width: 340px; }
/* A tile's figure (28px at line-height 1) drew its glyphs 3px into the line under it: a little room (feedback 96). */
.tile .n { line-height: 1.15; }

/* A phone number (PhoneInput; tester feedback 119/120, 23 October 2026): the dialling code chosen, then the number, side
   by side, wide enough together to show a whole international number ("+971 50 555 0102") without clipping. In a form it
   takes its own size, .f-p (two columns of eight, the row below 520px); a phone written with another size gets the same.
   In an editable grid, Size="p", and a cell holding one is widened to it whatever its column was given. */
.phone-wrap { display: grid; grid-template-columns: 7rem minmax(9.5rem, 1fr); gap: 4px; min-width: 17rem; }
.phone-wrap > .picker { min-width: 0; }
/* Read-only, a disabled Pick wraps its value: in the country's narrow box that made four lines and a tall row (feedback 143).
   Here it stays on one line, cut at its end, the whole text on the tooltip. */
.phone-wrap > :is(.pick-off, fieldset:disabled .picker) .pick-show { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone-wrap > :is(.pick-off, fieldset:disabled .picker) .pick-show > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.phone-wrap > .phone-num { min-width: 0; font-variant-numeric: tabular-nums; }
.form-grid:not([style*="grid-template-columns"]) > :is(.f-p, :has(> .phone-wrap)) { grid-column: span 2; min-width: 17rem; }
@container (max-width: 519px) { .form-grid:not([style*="grid-template-columns"]) > :is(.f-p, :has(> .phone-wrap)) { grid-column: 1 / -1; min-width: 0; } }
@container (max-width: 519px) { .phone-wrap { min-width: 0; grid-template-columns: 7.5rem minmax(0, 1fr); } }
.egrid-p { width: 17.75rem; }
table.t td:has(> .phone-wrap) { min-width: 17.75rem; }

/* The cell being edited in a grid (tester feedback 139 and 143, 5 November 2026, reversing 122): nothing is drawn on the
   cell, which is taller than its field, so a box on it stood apart from the field. Focus in a grid is the field's own border,
   as everywhere else (.inp:focus above); a button or a tick keeps :focus-visible on itself. Do not draw on td:focus-within:
   ui_check focus and UiStandardsTests refuse it. */
/* In a half-width panel the description column's minimum (30% of the window) left no room for the rest of the row, and
   the grid ran past the panel: there it is sized to the panel instead. */
@container (max-width: 799px) { table.t.egrid-t .egrid-l { min-width: 200px; } }

/* The record band with a long "Raised by …" (tester feedback 124, 23 October 2026: the request page): the stamp's lines
   took what width they asked for and squeezed the title into a narrow column. The stamp now wraps within about 24rem,
   right-aligned, and the title keeps the rest of the band. */
.phead:has(> div > .stamp) > div:first-child > .stamp { max-width: 24rem; }
.phead:has(> div > .stamp) > div:first-child > .stamp > span { white-space: normal; text-wrap: balance; }

/* A detail page's two columns (.grid-detail) with one side panel running down beside the rest (feedback 124: the request
   page pinned it there with a style, so on a phone it kept a column of no width): .gd-side is the right column, from the
   top, as tall as it needs; .gd-main the left. Below 760px both are the one column, in order. */
.grid-detail > .gd-main { grid-column: 1; }
.grid-detail > .gd-side { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 760px) { .grid-detail > :is(.gd-main, .gd-side) { grid-column: 1; grid-row: auto; } }

/* A field a refused save is about (tester feedback 130, 26 October 2026): its border in the error colour and its message
   under it, naming it ("Calling code is required") — whether the field shows its own error (Problem and Field on the
   shared inputs, FieldError) or the refusal's box marked it (etei.problems: aria-invalid on the field, data-err on its
   place in the form). */
:is(.inp, .pick-in, .date-in, .phone-num)[aria-invalid="true"] { box-shadow: inset 0 0 0 2px rgb(var(--c-hold)); }
.picker:has(.pick-in[aria-invalid="true"]) .pick-show { box-shadow: inset 0 0 0 2px rgb(var(--c-hold)); }
[data-err]::after { content: attr(data-err); display: block; grid-column: 1 / -1; margin-top: 4px; font-size: 12px; line-height: 16px;
  font-weight: 500; color: rgb(var(--c-hold)); white-space: normal; }
td[data-err]::after { font-size: 11.5px; margin-top: 2px; }
/* A page's own "required" beside its field, said with the field's label where the script knows it (data-say). */
.err[data-say] { font-size: 0; }
.err[data-say]::before { content: attr(data-say); font-size: 11px; line-height: 14px; }

/* Several to choose in one dropdown (Pick Multiple; tester feedback 135, 26 October 2026): closed, the chosen as chips with
   their × over the box (a click between them opens the list), or "n chosen"; open, a check box at the start of each row. */
.pick-multi .pick-chips { position: absolute; left: 6px; right: 44px; top: 50%; transform: translateY(-50%); display: flex; gap: 4px;
  overflow: hidden; pointer-events: none; z-index: 1; }
.pick-multi .pick-chips .chip { pointer-events: auto; flex: none; max-width: 14rem; gap: 2px; padding-right: 3px; overflow: hidden; text-overflow: ellipsis; }
.pick-chip-x { border: 0; background: transparent; width: 16px; height: 16px; padding: 0; display: inline-grid; place-items: center; border-radius: 50%;
  color: rgb(var(--c-ink3)); cursor: pointer; flex: none; }
.pick-chip-x:hover { color: rgb(var(--c-hold)); background: rgb(var(--c-ink) / .06); }
.pick-chip-x svg.i { font-size: 11px; }
.pick-check { width: 16px; height: 16px; flex: none; margin-right: 8px; border-radius: 4px; display: inline-grid; place-items: center;
  box-shadow: inset 0 0 0 1.5px rgb(var(--c-fieldLine)); background: rgb(var(--c-paper)); color: #fff; }
.pick-check.on { background: rgb(var(--c-brand)); box-shadow: none; }
.pick-check svg.i { font-size: 12px; stroke-width: 3; }

/* A mandatory instruction read and acknowledged where the person is (InstructionDialog, InstructionBlockers; project
   lead, 29 October 2026). */
.instr-item + .instr-item { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgb(var(--c-rule2)); }
.instr-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 14px; }
.instr-h .sub { margin: 0; }
.instr-body { margin-top: 6px; white-space: pre-line; font-size: 13px; line-height: 19px; color: rgb(var(--c-ink2)); }
.instr-act { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; font-size: 12.5px; }
.instr-act > span { flex: 1 1 200px; }
.instr-done, .instr-ok { display: inline-flex; align-items: center; gap: 6px; color: rgb(var(--c-ok)); font-size: 12.5px; font-weight: 500; }
.instr-done { margin-top: 10px; }
.instr-summary { margin: 4px 0 0; font-weight: 500; }
.instr-blockers li { margin-top: 6px; }
.instr-blockers .instr-read, .instr-blockers .instr-ok { margin-left: 8px; vertical-align: middle; }
.fx-refusal .instr-blockers .instr-read, .fx-refusal .instr-blockers .instr-ok { margin-left: 0; }
.menu-row .badge { margin-left: auto; }

/* The shared upload takes a file dropped on its row, or pasted (tester feedback 141, 30 October 2026): the row is
   highlighted while a file is dragged over it; on a phone, where there is nothing to drag, the words are not shown. */
.drop-zone { transition: background-color .12s, box-shadow .12s; }
.drop-zone.drop-on { background: rgb(var(--c-brand) / .08); box-shadow: inset 0 0 0 2px rgb(var(--c-brand) / .55); border-radius: 10px; }
.drop-say { font-weight: 400; }
@media (max-width: 760px), (pointer: coarse) { .drop-say { display: none; } }
.upload .upload-said { flex-basis: 100%; }

/* From inspectors (31 October 2026): the forward shows the inspector's original beside what the client gets. */
.fwd-item + .fwd-item { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgb(var(--c-rule2)); }
.fwd-h { margin-bottom: 8px; font-size: 14px; }
.fwd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.fwd-orig { white-space: pre-line; font-size: 13px; line-height: 19px; color: rgb(var(--c-ink2)); background: rgb(var(--c-ink) / .04); border-radius: 8px; padding: 8px 10px; min-height: 86px; }
@container (max-width: 560px) { .fwd-cols { grid-template-columns: 1fr; } }
/* The screen guide (Tour, project lead 14 November 2026): a light navy layer over the page with the target cut out and
   ringed in the accent, and a bubble beside it, on paper like a popover (DESIGN.md §10.9) with an arrow at the target.
   Above dialogs, below toasts. The bubble slides in per step (§15 slidein); the cut-out fades in; no motion when reduced. */
.tour-btn { gap: 6px; }
.tour { position: fixed; inset: 0; z-index: 55; pointer-events: none; }
.tour-veil { position: fixed; inset: 0; pointer-events: auto; }
.tour-hole { position: fixed; border-radius: 10px; pointer-events: none; box-shadow: 0 0 0 2px rgb(var(--c-accent)), 0 0 0 200vmax rgb(var(--c-navy) / .38); animation: fadein .18s ease-out; }
.tour-bubble { position: fixed; left: -9999px; top: 0; width: min(340px, calc(100vw - 24px)); padding: 12px 14px 10px; border-radius: 14px; background: rgb(var(--c-paper)); color: rgb(var(--c-ink)); box-shadow: var(--sh-pop); pointer-events: auto; outline: none; }
.tour-bubble.tour-in { animation: slidein .22s cubic-bezier(.2,.9,.3,1.2); }
.tour-bubble:focus-visible { box-shadow: var(--sh-pop), 0 0 0 2px rgb(var(--c-focus)); }
.tour-arrow { position: absolute; width: 12px; height: 12px; background: rgb(var(--c-paper)); transform: rotate(45deg); }
.tour-bubble[data-side="bottom"] .tour-arrow { top: -6px; left: calc(var(--tour-arrow, 50%) - 6px); box-shadow: -1px -1px 0 rgb(0 0 0 / .06); }
.tour-bubble[data-side="top"] .tour-arrow { bottom: -6px; left: calc(var(--tour-arrow, 50%) - 6px); box-shadow: 1px 1px 0 rgb(0 0 0 / .06); }
.tour-bubble[data-side="right"] .tour-arrow { left: -6px; top: calc(var(--tour-arrow, 50%) - 6px); box-shadow: -1px 1px 0 rgb(0 0 0 / .06); }
.tour-bubble[data-side="left"] .tour-arrow { right: -6px; top: calc(var(--tour-arrow, 50%) - 6px); box-shadow: 1px -1px 0 rgb(0 0 0 / .06); }
.tour-bubble.tour-lost .tour-arrow { display: none; }
.tour-top { display: flex; align-items: center; gap: 8px; margin: -2px -6px 2px 0; }
.tour-count { flex: 1; font-size: 11px; line-height: 16px; font-weight: 600; color: rgb(var(--c-ink3)); font-variant-numeric: tabular-nums; }
.tour-title { margin: 0 0 4px; font-size: 14px; line-height: 18px; font-weight: 600; color: rgb(var(--c-ink)); }
.tour-text { margin: 0; font-size: 13px; line-height: 18px; color: rgb(var(--c-ink2)); }
.tour-acts { display: flex; align-items: center; gap: 6px; margin: 12px -6px 0 -8px; }
.tour-never { color: rgb(var(--c-ink3)); }

/* A one-time sign-in link to pass on (OneTimeLink, 19 November 2026): the read-only box with Copy beside it. */
.otl { padding: 12px 16px; }
.otl-row { display: flex; gap: 8px; align-items: center; }
.otl-row .inp { flex: 1; min-width: 0; }

/* A table that may be wider than its panel (stream C, feedback 171, 20 November 2026): wrapped in .t-scroll it scrolls inside
   its own frame at every width, and the page never scrolls sideways. A wrapper, not every table.t: a table made a block
   on the desktop would lose the column widths every other list relies on. */
.t-scroll { max-width: 100%; overflow-x: auto; }
.t-scroll > table.t { min-width: 100%; }
