/* BoardNotes app styles — plain CSS, no framework (minimal deps per packet §3 CH-31).
   UX v3 migration (CH-A…CH-G) against D-052: BoardNotesUXv3.html is the binding
   visual and structural specification, not a reference. This sheet ports its
   component layer 1:1.

   D-049, binding and UNCHANGED by D-052: the token file is gospel and is copied
   byte-identical (sha256 daee3db7…9bc6). This sheet consumes ONLY the SEMANTIC
   layer — never a primitive (--grey-*, --green-*, …), never a literal hex/rgb.
   AC-T4B-15 greps for exactly that. Light and dark both come from the one token
   set via [data-theme]; nothing here re-declares a colour.

   CSP note (app/src-tauri/tauri.conf.json: style-src 'self'; img-src 'self'):
   inline style attributes and data: URIs are blocked in the webview, so every
   inline style the mockup uses is promoted to a named class here, and the SXA
   mark ships as real PNGs under assets/. Same pixels, only door available. */

* { box-sizing: border-box; }

/* B-102(3) · APP-LEVEL derived constants. These live HERE and not in the token file:
   D-049 pins boardnotes-tokens.css byte-identical to the SXA source (sha daee3db7…9bc6)
   and calls any divergence an escalation — it is brand truth, and a layout constant this
   sheet derives for its own controls is not. tests/test_token_compliance.py enforces it,
   and it caught this value sitting in the wrong file.

   --control-h is the height of ONE single-line control, built from the same tokens its
   padding is: line box + vertical padding + both borders. Read from --fs-body explicitly
   rather than written as `em`, because `em` resolves against each ELEMENT's own font size
   — the same expression would yield a different height on a 12px caption button than on a
   15px input, which is precisely the property a row of controls sharing a centre line
   must not have. */
:root {
  --control-h: calc(1.25 * var(--fs-body) + (var(--space-3) * 2) + 2px);
  /* B-115(3) · every pill in the app is at least as wide as the widest SIGN value, which
     is what "standardize the pill width to the sign-natural width" asks for: the taxonomy's
     `natural` / `contra` pair sat at two different widths in one column, and the ragged
     right edge was the reported defect. The count is the length of the LONGER sign word,
     a fact about the vocabulary in App.taxonomyRow rather than a tuned number — and
     tests/test_b115_ux_residue.py reads that vocabulary and fails if the two disagree, so
     it cannot rot into a magic 7 the day a third sign value is added.
     Used as `ch` on .chip only, where the font size is fixed at --fs-caption by the rule
     itself; the --control-h note above is about exactly the trap that avoids. */
  --chip-sign-chars: 7;
}

html, body {
  margin: 0;
  height: 100%;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--tracking-body);
  color: var(--text-primary);
  background: var(--bg-app);
}
body { overflow: hidden; }

.hidden { display: none !important; }
.muted { color: var(--text-secondary); }
.error { color: var(--danger-text); }
.ok { color: var(--ok-text); }
.grow { flex: 1; min-width: 0; }
button { font: inherit; cursor: pointer; color: inherit; background: none; border: none; }
.sprite { position: absolute; }

/* WCAG 2.2 AA focus: a visible, non-colour-only indicator on every interactive
   control, never removed. :focus-visible keeps it off mouse clicks. */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* Respect a reduced-motion preference: transitions are decoration, not signal. */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}

/* ---- slash motif (from the SXA mark) ---- */
.slashes { display: inline-flex; gap: 4px; margin-right: var(--space-3); }
.slashes i {
  width: var(--slash-w); height: 1.05em; border-radius: 1px;
  transform: skewX(var(--slash-slant)); display: inline-block;
}
.slashes i:nth-child(1) { background: var(--brand); }
.slashes i:nth-child(2) { background: var(--accent); }
.slashes i:nth-child(3) { background: var(--text-primary); }

/* ============================ SIGN-IN / BOOT ERROR ============================ */
#screen-signin, #screen-version-error {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-app); overflow: hidden;
}
.signin-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.signin-bg i {
  position: absolute; top: -12%; height: 124%; border-radius: 4px;
  transform: skewX(var(--slash-slant)); opacity: .07;
}
.signin-bg i:nth-child(1) { left: 66%; width: 90px; background: var(--brand); }
.signin-bg i:nth-child(2) { left: 74%; width: 90px; background: var(--accent); }
.signin-bg i:nth-child(3) { left: 82%; width: 90px; background: var(--text-primary); }
.signin-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-10);
  width: 420px; text-align: center;
}
.signin-card .logo { width: 168px; margin: 0 auto var(--space-7); display: block; }
.signin-card h1 {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-h2); line-height: var(--lh-heading);
  letter-spacing: var(--tracking-tight); font-weight: var(--fw-demibold);
}
.signin-card .sub { color: var(--text-secondary); margin: 0 0 var(--space-8); }
.btn-ms {
  display: flex; align-items: center; justify-content: center; gap: var(--space-4);
  width: 100%; padding: var(--space-4) var(--space-6);
  background: var(--brand); color: var(--on-brand);
  border-radius: var(--radius); font-weight: var(--fw-demibold);
  transition: background var(--dur-1) var(--ease);
}
.btn-ms:hover:not(:disabled) { background: var(--brand-hover); }
.btn-ms:disabled { opacity: .5; cursor: default; }
.signin-foot { margin-top: var(--space-6); font-size: var(--fs-caption); color: var(--text-tertiary); }
.signin-foot.error { color: var(--danger-text); }

/* version-error variant reuses the sign-in chrome (D-045 copy unchanged) */
.boot-error-badge {
  display: inline-flex; align-items: center; gap: var(--space-3);
  background: var(--danger-weak); color: var(--danger-text);
  border: 1px solid var(--danger); border-radius: var(--radius);
  padding: var(--space-4) var(--space-5); margin: 0 0 var(--space-5);
  font-size: var(--fs-small); text-align: left;
}
#screen-version-error .sub { margin-bottom: 0; }

/* ============================ APP SHELL ============================ */
/* TS WALK2-FIX (row 3): the ONE row is the window's height and no taller — `minmax(0, 1fr)`, not the
   implicit `auto` row, which grew to the sidebar's content (1,026px once its sections came) and
   carried the main column, and the foot of every long page with it, below a window `body` will not
   scroll. The sidebar scrolls within itself when it is the taller one. */
#app { display: grid; grid-template-columns: var(--nav-w) 1fr; grid-template-rows: minmax(0, 1fr);
       height: 100vh; }

/* ---- sidebar collapse (CL-3 · D-152, D-157) ----

   D-152 extends D-149's concept from the confirm surface's three columns to the app
   shell: the sidebar collapses and the rest AUTO-SCALES into the freed width. The whole
   auto-scale mechanism is the `1fr` that #app's grid already had — swapping the first
   track from --nav-w to --nav-w-collapsed hands the difference to the content column with
   no second rule and no width written down anywhere. Both widths are existing named
   tokens; nothing here introduces a number.

   D-150's affordance ruling applies unchanged ("same concept"): no draggable splitter.
   Its reasons carry over exactly — a splitter hands width ownership to the user and
   widths a user has pinned cannot then be auto-scaled; a 4-px handle is discoverable only
   by accident (D-138 shipped that, D-140 overturned it); and a splitter dragged to zero
   leaves nothing to grab, so collapse would have no restore path that survives being
   collapsed. Hence a labelled rail. */
#app.nav-collapsed { grid-template-columns: var(--nav-w-collapsed) 1fr; }
#app.nav-collapsed aside { padding-left: 0; padding-right: 0; align-items: stretch; }
/* Collapsed, the rail is the ONLY thing in the column. Driven from the shell class
   rather than by toggling .hidden on six separate children, so there is one source of
   truth for the state and no way for a newly added sidebar block to escape it. */
#app.nav-collapsed aside > :not(#side-rail) { display: none; }
#app:not(.nav-collapsed) #side-rail { display: none; }

.siderail {
  flex: 1 1 auto; display: flex; align-items: center; justify-content: center;
  font: inherit; color: var(--text-tertiary); cursor: pointer;
  background: none; border: none; padding: var(--space-5) 0;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.siderail:hover { background: var(--bg-hover); color: var(--text-primary); }
.siderail:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; }
/* Same vertical treatment the confirm rails use, for the same reason: a horizontal label
   in a 64-px column wraps to a stack of single letters. */
.siderail .raillabel {
  writing-mode: vertical-rl; text-orientation: mixed; white-space: nowrap;
  font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: .04em;
}
.sidecollapse { flex: none; }
.sidecollapse svg { transform: rotate(90deg); }

/* ---- sidebar ---- */
aside {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex; flex-direction: column;
  min-height: 0; overflow-y: auto;
  padding: var(--space-6) var(--space-4) var(--space-5);
  z-index: var(--z-nav);
}
/* The collapse control sits with the mark, so the row is a flex pair now: the button
   trails the logo instead of pushing it onto a second line. */
.side-logo {
  padding: 0 var(--space-3) var(--space-7);
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--space-3);
}
/* `flex: none` states the intent rather than relying on the arithmetic working out: the
   row has 200px of usable width and holds 176px (140 mark + 8 gap + 28 button), so the
   mark does not shrink today — but a longer control or a wider mark later would silently
   squash the logo instead of failing visibly. */
.side-logo img { width: 140px; display: block; flex: none; }
.navgroup { margin-bottom: var(--space-6); }
.navgroup .navhead {
  font-size: var(--fs-micro); font-weight: var(--fw-demibold);
  letter-spacing: var(--tracking-caps); text-transform: uppercase;
  color: var(--text-tertiary); padding: 0 var(--space-4); margin-bottom: var(--space-2);
}
.navitem {
  position: relative; display: flex; align-items: center; gap: var(--space-4);
  width: 100%; text-align: left;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-weight: var(--fw-medium);
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.navitem:hover { background: var(--bg-hover); color: var(--text-primary); }
.navitem.active { background: var(--brand-weak); color: var(--brand-text); font-weight: var(--fw-demibold); }
.navitem.active::before {
  content: ""; position: absolute; left: -2px; top: 6px; bottom: 6px; width: 3px;
  background: var(--brand); border-radius: 2px; transform: skewX(var(--slash-slant));
}
.navitem svg { width: 17px; height: 17px; flex: none; }
/* D-165 clause 2 gave the sidebar's Review counter and the picker's per-client counter
   ONE declaration block, so they cannot drift into two treatments that merely look alike.
   B-112 / D-169 finishes the job: the block is now a BASE `.count` rule, which is what the
   bell's badge markup has been asking for since BB-2 — `#alertbadge` carries `count`, the
   rule only ever applied under `.navitem`, and the badge rendered as a bare number over
   the icon with no background, colour or pill radius. UX-4 found this and filed it rather
   than fixing it, because restyling a control that packet was not asked to touch is a
   design change; D-169 ruled it in here. All three counters are now one rule. */
/* B-115(7) / D-172: one declaration, one named value, every pill. `--counter` rather than
   `--danger` because a count is not an error — softening every danger surface was never
   what was ruled. The token is semantic and lives in the pinned file; see its note there
   for the escalation and the ruled contrast cost.

   B-115(8) — D-173's flush-badge residue — is NOT fixed here, because it no longer exists.
   It was specific to the sub-nav's Files and Mappings badges, which sat against their
   labels because `margin-left: auto` lived on `.navitem .count` and the sub-nav was not a
   navitem. CH-98 eliminated that row: every counted destination is a navitem now and
   inherits the auto below, and the bell's badge is absolutely positioned and takes
   neither. A base margin here would be worse than useless — it would shift the bell, which
   is what D-169 removed `margin-left: 0` from `.alertcount` to stop compensating for. */
.count {
  background: var(--counter); color: var(--on-counter);
  font-size: var(--fs-caption); font-weight: var(--fw-demibold);
  border-radius: var(--radius-pill); padding: 0 var(--space-3); line-height: 1.5;
}
/* Both are pushed to the right edge of their row; the bell's badge is absolutely
   positioned instead and takes neither. */
.navitem .count, .cbx-opt .count { margin-left: auto; }
.side-spacer { flex: 1; }
/* BB-2 / D-131 — the footer carries three things now: the identity block (a menu
   trigger), the relocated theme toggle to its right, and the menu itself. position
   is load-bearing: .side-menu anchors to this box, and it must open UPWARD because
   the footer is the last thing in the column and there is no room below it. */
.side-user {
  position: relative;
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border-subtle); margin-top: var(--space-4); padding-top: var(--space-5);
}
/* The identity block reads as it always did; what is new is that it takes a click.
   flex:1 makes the WHOLE block the target — avatar, name and address alike — rather
   than leaving the name a hit area and the avatar an inert neighbour, which is W-22a's
   finding about the old company chip applied before it can be made again. */
.side-id {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2); margin: calc(var(--space-2) * -1);
  border-radius: var(--radius); text-align: left;
  transition: background var(--dur-1) var(--ease);
}
.side-id:hover { background: var(--bg-hover); }
.side-id:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 1px; }
.side-menu {
  position: absolute; bottom: calc(100% - var(--space-2)); left: var(--space-4); right: var(--space-4);
  background: var(--bg-overlay); border: 1px solid var(--border-default);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: var(--space-1); z-index: var(--z-nav);
}
.side-menu button {
  display: flex; align-items: center; gap: var(--space-3); width: 100%;
  padding: var(--space-3) var(--space-3); border-radius: var(--radius-sm);
  font-size: var(--fs-small); color: var(--text-primary); text-align: left;
}
.side-menu button:hover { background: var(--bg-hover); }
.side-menu button:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; }
.side-menu svg { width: 15px; height: 15px; color: var(--text-tertiary); flex: none; }
.avatar {
  width: 30px; height: 30px; border-radius: var(--radius-pill); flex: none;
  background: var(--brand); color: var(--on-brand);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-caption); font-weight: var(--fw-bold);
}
.avatar.sm { width: 26px; height: 26px; font-size: var(--fs-micro); }
.avatar.accent { background: var(--accent); color: var(--on-accent); }
.side-user .who { min-width: 0; }
.side-user .who .name { font-size: var(--fs-small); font-weight: var(--fw-demibold); }
.side-user .who .upn {
  font-size: var(--fs-micro); color: var(--text-tertiary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---- right column ----
   min-height:0 on both the column and the scroller is load-bearing: a flex item's
   default min-height:auto refuses to shrink below its content, so a long page
   would stretch the grid row past 100vh and carry the sidebar (user chip and all)
   off the bottom of the window instead of scrolling `main`. */
.appcol { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

/* topbar */
.topbar {
  height: var(--topbar-h); flex: none;
  display: flex; align-items: center; gap: var(--space-5);
  padding: 0 var(--space-8);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  z-index: var(--z-sticky);
}
/* BB-1 / D-133 — the shared searchable combobox (webapp/combobox.js).
   The native <select> is gone: its popup placement and internal option rendering were
   the OS's to decide, which is what W-22b and W-31 reported. Everything below is
   app-rendered, so both themes reach it through the same semantic tokens the rest of
   the surface uses. The client switcher is one SKIN of this control (.cbx-client);
   BB-5's unit switcher is the second consumer and takes the same base. */
.cbx { position: relative; display: inline-flex; }
.cbx-trigger {
  display: inline-flex; align-items: center; gap: var(--space-3);
  border: 1px solid var(--border-default); border-radius: var(--radius);
  padding: var(--space-2) var(--space-4);
  font-weight: var(--fw-demibold); font-size: var(--fs-small);
  color: var(--text-primary); background: none; width: 100%;
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.cbx-trigger:hover { background: var(--bg-hover); border-color: var(--border-strong); }
/* W-22a: the whole chip is the click target, so the focus ring belongs to the whole
   chip too — the old control could only ever ring the <select> inside it. */
.cbx-trigger:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 1px; }
.cbx-open .cbx-trigger { background: var(--bg-hover); border-color: var(--border-strong); }
.cbx-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); flex: none; }
.cbx-dot-ok { background: var(--ok); }
.cbx-label {
  flex: 1 1 auto; min-width: 0; text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cbx-unset .cbx-label { color: var(--text-tertiary); font-weight: var(--fw-regular); }
.cbx-chev {
  width: 12px; height: 12px; color: var(--text-tertiary); flex: none;
  transition: transform var(--dur-1) var(--ease);
}
.cbx-open .cbx-chev { transform: rotate(180deg); }

/* Anchored BELOW on every platform (D-133), which is what top:100% means once the
   browser is not the one choosing. Near the viewport bottom the LIST scrolls
   internally rather than the popup flipping above: one placement everywhere was the
   ruling, and a conditional flip is the inconsistency W-31 reported wearing our name. */
.cbx-popup {
  position: absolute; top: calc(100% + var(--space-2)); left: 0; min-width: 100%;
  z-index: var(--z-nav);
  background: var(--bg-overlay);
  border: 1px solid var(--border-default); border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-2);
  display: flex; flex-direction: column; gap: var(--space-2);
}
.cbx-searchwrap { padding: var(--space-1); }
.cbx-search {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--border-default); border-radius: var(--radius-sm);
  background: var(--bg-inset); color: var(--text-primary);
  padding: var(--space-2) var(--space-3);
  font: inherit; font-size: var(--fs-small);
}
.cbx-search::placeholder { color: var(--text-tertiary); }
.cbx-search:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -1px; }
.cbx-list {
  list-style: none; margin: 0; padding: 0;
  max-height: 280px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 1px;
}
.cbx-opt {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--fs-small); color: var(--text-primary);
  cursor: default; white-space: nowrap;
}
/* Keyboard and pointer share ONE highlight. Two different affordances for "this is the
   one you are about to pick" is how a list ends up looking like it has two cursors. */
.cbx-opt.cbx-active { background: var(--bg-hover); }
.cbx-opt[aria-selected="true"] { background: var(--bg-selected); color: var(--brand-text); font-weight: var(--fw-demibold); }
.cbx-opt[aria-selected="true"].cbx-active { background: var(--brand-weak); }
.cbx-opt-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cbx-opt-hint { color: var(--text-tertiary); font-size: var(--fs-caption); flex: none; }
/* D-129: a confirmed unit greys and takes a checkmark, but stays selectable — the user
   re-opens what they already confirmed. Colour and a mark, never a disabled state. */
.cbx-done .cbx-opt-label { color: var(--text-tertiary); }
.cbx-check { width: 13px; height: 13px; color: var(--ok); flex: none; }
.cbx-empty {
  padding: var(--space-3) var(--space-4);
  color: var(--text-tertiary); font-size: var(--fs-small);
}
/* TS WALK2-B (F20 R-41, D-572): the type-ahead's group headings — the screen's own groups, in the
   section-label voice — and the line under a long list saying how many more matches there are. */
.cbx-grp {
  padding: var(--space-2) var(--space-4) var(--space-1);
  font-size: var(--fs-micro); color: var(--text-tertiary); text-transform: uppercase;
  letter-spacing: var(--tracking-caps); font-weight: var(--fw-demibold); list-style: none;
}
.cbx-more {
  padding: var(--space-2) var(--space-4); border-top: 1px solid var(--border-subtle);
  color: var(--text-tertiary); font-size: var(--fs-caption);
}
/* The type-ahead as an inline picker (the participants and findings-link pickers): its trigger
   reads as a search field, wide enough for a name or a register item's text. */
.cbx-typeahead { min-width: 260px; max-width: 420px; }
.cbx-typeahead .cbx-popup { min-width: 320px; }

/* The topbar skin. Only the width ceiling and the chip's own metrics live here; every
   behaviour above is the shared control's. */
.client-switch { display: inline-flex; min-width: 0; }
.cbx-client { max-width: 260px; }
.cbx-client .cbx-popup { max-width: 340px; }
.crumbs {
  color: var(--text-tertiary); font-size: var(--fs-small);
  display: flex; gap: var(--space-3); align-items: center;
}
.crumbs b { color: var(--text-secondary); font-weight: var(--fw-medium); }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: var(--space-4); }

/* BB-2 / D-131 — the alert bell and its popout.
   The badge overlaps the icon rather than sitting beside it so the control keeps the
   32px footprint every other .iconbtn has; the row's geometry does not change when a
   count appears and vanish when it clears. */
.bellwrap { position: relative; display: inline-flex; }
/* B-112 / D-169: `margin-left: 0` is GONE, not kept as belt-and-braces. It existed to
   override `.navitem .count`'s `margin-left: auto` — a rule that never reached this badge,
   which is the tell UX-4 read the intent off: the author expected to be inheriting the
   pill. With `.count` now a base rule carrying no margin at all, the override has nothing
   left to override, and a declaration that neutralises a rule that does not apply is how
   the next reader concludes the cascade works differently than it does. The overrides that
   REMAIN are real: this badge is 16px tall over a 32px icon, so it keeps its own tighter
   padding and line box against the base rule's. */
.alertcount {
  position: absolute; top: -2px; right: -4px;
  padding: 0 var(--space-2); min-width: 16px; line-height: 16px;
  text-align: center; pointer-events: none;
}
.alertpop {
  position: absolute; top: calc(100% + var(--space-2)); right: 0;
  width: 340px; max-width: 78vw; z-index: var(--z-nav);
  background: var(--bg-overlay);
  border: 1px solid var(--border-default); border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.alertpop .head {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--fs-small); font-weight: var(--fw-demibold); color: var(--text-primary);
}
.alertpop .head .linklike { margin-left: auto; font-size: var(--fs-caption); }
/* The LIST scrolls, the popout does not: the header and its dismiss-all have to stay
   reachable when a hundred alerts are open, which is exactly when they matter most. */
.alertpop .list { overflow-y: auto; max-height: 320px; padding: var(--space-1); }
.alertrow {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-3); border-radius: var(--radius-sm);
}
.alertrow:hover { background: var(--bg-hover); }
.alertrow .body { flex: 1 1 auto; min-width: 0; }
/* text-align is explicit because the jumpable variant of this row is a <button>, and a
   button's UA default centres its text. Found by rendering: the rows WITH a target came
   out ragged-centred next to the plain ones, which no source assertion could have seen.
   width:100% for the same reason — a button shrink-wraps where a div fills. */
.alertrow .text {
  font-size: var(--fs-small); color: var(--text-primary);
  text-align: left; width: 100%; display: block; padding: 0;
}
/* Underline on hover only. A permanent one under three lines of body prose reads as
   damage rather than as an affordance; the pointer and the hover carry it. */
.alertrow .text.linklike { color: var(--text-primary); text-decoration: none; }
.alertrow .text.linklike:hover { color: var(--text-link); text-decoration: underline; }
.alertrow .when { font-size: var(--fs-micro); color: var(--text-tertiary); margin-top: var(--space-1); }
.alertrow .kindmark { width: 6px; height: 6px; border-radius: 50%; flex: none; margin-top: 6px; background: var(--text-tertiary); }
.alertrow .kindmark.danger { background: var(--danger); }
.alertrow .kindmark.warn { background: var(--warn); }
.alertrow .kindmark.ok { background: var(--ok); }
.alertrow .x {
  flex: none; width: 22px; height: 22px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-tertiary);
}
.alertrow .x:hover { background: var(--bg-hover); color: var(--text-primary); }
.alertrow .x:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; }
.alertrow .x svg { width: 13px; height: 13px; }
.alertpop .empty { padding: var(--space-6) var(--space-5); text-align: center; }
.iconbtn {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius); color: var(--text-secondary);
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.iconbtn:hover { background: var(--bg-hover); color: var(--text-primary); }
.iconbtn svg { width: 17px; height: 17px; }

/* company sub-nav */
/* The client sub-nav's styles lived here and are GONE with the strip itself (F8 CH-98,
   B-113/D-178). BB-4/D-140's two deliberate rows, the forced `.subnav-break`, and B-087's
   overflow finding were all about a fixed-width tab row that no longer exists — a
   hierarchy has no width to run out of. Removed rather than left as dead rules, because
   an orphan `.subnav` would be the thing a later reader restores a component from.
   In git at 920856f, and the sidebar that replaced it is `aside .navgroup` below. */

/* main scroll area — fluid, fills the window (no dead gutters: the 980px
   .tabpane cap is deliberately gone, per CH-A3) */
main { flex: 1; min-height: 0; overflow-y: auto; padding: var(--space-8); }
/* B-102(1) · CARD-TO-CARD spacing is ONE named parameter, CARD_GAP_PX, served through
   /config/ui and written onto --card-gap by the shell (App.applyLayoutParams). Every
   card-to-card gap in the app reads it and nothing else does: `main`'s padding above is
   the PAGE MARGIN, which Nathan ruled at triage is a separate parameter and stays on the
   token scale. Derivation of the value lives in config/parameters.yaml beside the seed —
   two-thirds of the 20px gap the deployed image was measured at, so it is recorded where
   the number is, not in a close document nobody re-reads. */
.page { display: grid; gap: var(--card-gap); align-content: start; }

/* B-115(1) · the gap reaches the cards, not just the page.
   The drive found `--card-gap` missing on Across your clients, Files and Companies. It was
   never a three-page defect: `.page` is the PANE, and every async surface renders its cards
   into a `loadInto` HOST one level further in — a bare `el("div", {})` with no rule of any
   kind, so its cards sat flush. Overview escaped only because its body happened to be given
   `grid overviewbody` for an unrelated reason.
   Enumerated rather than patched (the entry says so): `loadInto` is the ONE function every
   such body passes through, and it always puts a `.card` into the host itself — the loading
   skeleton, the empty state and the error notice are all cards. So the host is card-bearing
   BY CONSTRUCTION, and the class is added there rather than at sixteen call sites, where a
   seventeenth view would forget it exactly as these three did.
   Deliberately just display+gap: `.overviewbody` is also a cardflow host, and `align-content:
   start` here would stop its rows filling their tracks and put the one-screen Overview
   (D-130 amendment) back on the fold. */
.cardflow { display: grid; gap: var(--card-gap); }

/* B-102(4) · the one-screen Client Overview.
   Ruled live by Nathan at the UXFIX_S2 dispatch; it AMENDS D-130, which had ruled that
   nothing on Overview scrolls internally. The D-number is owed and drafted in this
   chunk's close. What forced the amendment: the drive found the page running past the
   fold anyway, and a page that overflows defeats "a glance" more completely than a
   scrollbar inside a card does.

   NO FIXED PIXEL HEIGHT anywhere below, which is the point. The requirement is one screen
   at 1512 AND at the 14-inch class (D-152), and no single height can satisfy two viewport
   heights — a number tuned for one is wrong on the other, and would silently rot the day a
   third display appears. Instead the page is exactly as tall as `main`'s content box and
   the panel region absorbs whatever is left over, so "fits one screen" is true by
   construction at every viewport rather than true at the two that were measured. This also
   keeps the no-hard-coded-N rule honestly: there is no N. */
.page.fitscreen {
  display: flex; flex-direction: column;
  /* Percentage against main's CONTENT box, so main's own padding — the page margin, which
     Nathan ruled a separate parameter — is excluded and main never overflows. */
  height: 100%;
}
.page.fitscreen > .overviewbody { flex: 1; min-height: 0; }
/* The leading rows are content-sized: they are fixed-shape summaries and shrinking them
   would be the wrong thing to give up. Every row after them — Recent activity, then the
   Topic/Metrics pair — shares the remaining height equally, and every one of THOSE is a
   `.panelfit`, so what gives is a scrollbar inside a panel rather than a card painting
   over its neighbour. `grid-auto-rows` rather than a fully enumerated track list because
   the region's child count is not constant: the loader puts a skeleton here first, and an
   as-of reconstruction adds nothing while an error state replaces everything.

   B-115(10) · THE OVERLAP THE DRIVE REPORTED, and it was this line. The count was `auto
   auto` and named "the stat tiles, the rollup cards" — true when it was written, and false
   from F8 CH-95, which inserted the A/D/Q cards BETWEEN them. That pushed the third row into
   the `minmax(0, 1fr)` region, where a track shorter than the card lets the card's own
   content overflow its grid area, so it painted over the strip below it. A rule that pinned a
   POSITION broke when the position moved — the failure shape this project keeps meeting, in
   CSS. The count is mechanised in tests/test_b115_ux_residue.py against the rows
   view_overview actually emits, so the next row inserted here fails a test instead of
   overlapping a card.

   THREE → TWO at F8 CH-R7b: DF-1 removed the rollup row, so the fixed-shape rows are the
   stat tiles and the A/D/Q cards. The number is NOT edited by hand here — the mechanised test
   above is what said it had to change, which is the whole point of having derived it. */
.overviewbody { grid-template-rows: auto auto; grid-auto-rows: minmax(0, 1fr); }
/* A grid ITEM defaults to min-height:auto — a content-based floor that refuses to shrink,
   which would push the region past its track and put the page back on the fold no matter
   what the track said. The same reason .appcol and main carry it (see "right column"). */
.overviewbody > .grid, .overviewbody > .card { min-height: 0; }
/* The card takes the height its track gives it; the ROWS are what scroll. Heading, note
   and any empty state stay put — a panel whose title scrolled away would leave the reader
   looking at a list of rows with nothing saying which panel they belong to. */
.panelfit { display: flex; flex-direction: column; min-height: 0; }
.panelfit > .rows { overflow-y: auto; min-height: 0; }
/* TS R pass 4: an EMPTY panel had no .rows to give, so `.empty`'s fixed 56px padding held
   the panel open past its track and "Nothing recorded yet" painted under the row below
   (Overview, a new client, a 727px-tall window). In a panel the empty state takes the
   height the track leaves and centres in it, the way the rows would scroll in it. */
.panelfit > .empty {
  flex: 1 1 auto; min-height: 0; overflow: hidden; padding-block: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}

/* page header */
.pagehead { display: flex; align-items: baseline; gap: var(--space-5); flex-wrap: wrap; }
/* B-102(2) · title + descriptor. The pair is its OWN centred group so the descriptor is
   centred on the TITLE TEXT and on nothing else — see App.pagehead for why centring the
   whole header row instead is the wrong fix. .pagehead keeps baseline alignment, so this
   group's first baseline (the h1's) still governs where the actions sit: the pattern
   changed, the header's relationship to its controls did not. */
.titlegroup {
  display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap;
  min-width: 0;
}
.pagehead h1 {
  margin: 0; font-size: var(--fs-h1); line-height: var(--lh-heading);
  letter-spacing: var(--tracking-tight); font-weight: var(--fw-bold);
  display: flex; align-items: center;
}
.pagehead .meta { color: var(--text-secondary); font-size: var(--fs-small); }
.pagehead .actions { margin-left: auto; display: flex; gap: var(--space-3); align-items: flex-end;
  /* TS F20-P5 (P5-A3): a register's filter band wraps inside the pane, so New entry stays in view
     at 1440 instead of past the right edge of a band 1900 px wide. */
  flex-wrap: wrap; justify-content: flex-end; max-width: 100%; min-width: 0; }

/* ---- cards & grids ---- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
  min-width: 0;
}
/* a card whose whole body is a .table breathes through the cells, not the box */
.card.tablecard { padding: var(--space-2) var(--space-4); }
.card > h2, .card > h3 {
  margin: 0 0 var(--space-5);
  font-size: var(--fs-h4); line-height: var(--lh-heading);
  letter-spacing: var(--tracking-tight); font-weight: var(--fw-demibold);
  display: flex; align-items: center; gap: var(--space-3);
}
.card .cardnote {
  margin: calc(-1 * var(--space-3)) 0 var(--space-5);
  color: var(--text-tertiary); font-size: var(--fs-caption);
}
.card .cardnote.ok { color: var(--ok-text); }
/* TS R pass 4: the negative top margin tucks a note under a card HEAD; under a notice it
   pulled the note up across the notice's bottom border (Admin → Create client, the
   "Provisioned automatically" line). A note that follows a notice sits below it. */
.card .notice + .cardnote { margin-top: var(--space-3); }
.card .cardnote.tail { margin: var(--space-4) 0 0; }
.card .cardnote.warn { color: var(--warn-text); }
/* F9/CH-102 (R-4): the inter-part gap line, sitting BETWEEN the two parts it separates in
   the intake list. Indented to the depth of a part's own text and left in the tertiary
   colour every other cardnote uses — a measured operational fact is not a warning, and
   R-4 says it is never rendered as an alarming one. */
.card .cardnote.gapline { margin: var(--space-2) 0 var(--space-2) var(--space-6); }

/* DF-1 removed BB-4 (D-130)'s Overview rollup rules — `.rollup .rolltotal`, `.rollup .bands`
   and `.chip.clickable`, which nothing but a rollup band ever wore. The row those cards formed
   restated the A/D/Q cards directly above it, so it is gone from the surface and its
   stylesheet went with it: a rule for a control that no longer exists reads like a live
   requirement to whoever edits this file next, which is the reasoning BB-5b used on the
   retired checkbox rule and D-197 has now used in reverse. D-130's server-side arithmetic is
   untouched and still tested. */

/* BB-4 (D-130) · the cross-company landing. The client band is a heading INSIDE the due
   card rather than a card per client: with four engagements, four cards is four sets of
   chrome around what is one list, and the ruling asked for the actions grouped, not for
   the page fragmented. */
.clientband {
  display: flex; align-items: baseline; gap: var(--space-4);
  margin: var(--space-5) 0 var(--space-3);
  font-size: var(--fs-h4); font-weight: var(--fw-demibold); color: var(--text-primary);
  border-top: 1px solid var(--border-subtle); padding-top: var(--space-4);
}
.clientband:first-of-type { border-top: none; padding-top: 0; }
.clientband .meta { margin-left: auto; font-weight: var(--fw-regular); }
.grid { display: grid; gap: var(--card-gap); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
/* D-402: the R-15 card row is one card per register kind and the fourth kind now has one.
   It collapses on the same breakpoint as cols-3 rather than a new one — four cards at the
   width three were already sharing is four columns of nothing. */
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
/* TS F18-P3 (F18 R-5): the Overview's five register cards, one per kind. */
.grid.cols-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.grid.main-rail { grid-template-columns: minmax(0, 2.2fr) minmax(300px, 1fr); align-items: start; }
@media (max-width: 1180px) {
  .grid.cols-3, .grid.cols-4, .grid.cols-5 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid.cols-2, .grid.main-rail { grid-template-columns: minmax(0,1fr); }
}

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--card-gap); }
.stat {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: var(--space-5) var(--space-6);
  position: relative; overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; right: -14px; top: -20%; height: 140%; width: 34px;
  transform: skewX(var(--slash-slant));
  background: var(--brand-weak); opacity: .8;
}
.stat.accent::after { background: var(--accent-weak); }
.stat .v {
  font-size: var(--fs-h1); font-weight: var(--fw-bold);
  line-height: var(--lh-tight); letter-spacing: var(--tracking-tight);
}
.stat .l {
  margin-top: var(--space-2); font-size: var(--fs-micro); color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: var(--tracking-caps); font-weight: var(--fw-demibold);
}
/* F8 CH-98: the Companies tile is a BUTTON, so it needs the browser's control defaults
   undone to sit in the row as a tile — a button inherits neither the page font nor the
   left-aligned text a stat's two lines are drawn with. Everything visual still comes from
   `.stat` above; this rule only removes what the element type imposed. */
.statlink {
  font: inherit; color: inherit; text-align: left; width: 100%; cursor: pointer;
}
/* No :focus-visible rule here on purpose — the global one at the top of this file already
   dresses every focusable control, and a second would drift from it. */
.statlink:hover { border-color: var(--border-strong); }

/* chips */
.chip {
  display: inline-flex; align-items: center; gap: var(--space-2);
  border-radius: var(--radius-pill); padding: 1px var(--space-4);
  font-size: var(--fs-caption); font-weight: var(--fw-medium);
  border: 1px solid var(--border-default); color: var(--text-secondary); background: var(--bg-surface);
  white-space: nowrap;
  /* B-115(3). Border-box, so the padding and both borders are inside the figure — this is
     the width of the `natural` pill, not of its text. `justify-content` is what makes the
     floor visible as a standard rather than as slack: a shorter value centres in the pill
     instead of hugging its left edge. */
  min-width: calc(var(--chip-sign-chars) * 1ch + 2 * var(--space-4) + 2px);
  justify-content: center;
}
.chip.ok     { background: var(--ok-weak);     color: var(--ok-text);     border-color: var(--brand-weak-border); }
.chip.warn   { background: var(--warn-weak);   color: var(--warn-text);   border-color: var(--warn); }
.chip.danger { background: var(--danger-weak); color: var(--danger-text); border-color: var(--danger); }
.chip.info   { background: var(--accent-weak); color: var(--accent-text); border-color: var(--accent-weak-border); }
/* a chip or link pushed to the far edge of a card heading */
/* ============================================================================
   TS CH-182 · the workstream control, and the band colours (F13 R-9; D-454, D-455)
   ============================================================================

   BAND COLOURS ARE KEYED TO THE PARAMETER BY POSITION, never to a band's NAME. The surface
   gives a pill `band-<i>` for the band's INDEX in ROUTE_CONFIDENCE_BANDS, strongest first,
   and the rules below colour by that index. A `.chip.green` would be a second spelling of a
   parameter whose VALUES and COUNT are provisional by ruling (D-310), and CH-143's re-band
   would silently stop colouring whatever it renamed.

   The tokens are the app's own semantic ones — the same ok/warn/danger scale every other
   status on the surface uses — so a theme change moves these with everything else rather
   than leaving one palette behind.

   FOUR RULES FOR A THREE-BAND SEED, deliberately: the seed is three and D-310 says the count
   FALLS OUT OF THE DATA. A fourth band added to the parameter colours on the next rule
   rather than falling through to neutral, which is what AC-F13-28's falsification drives. A
   band added past these rules still draws — as `band-none`'s neutral — and that is the
   honest failure: an uncoloured pill, never a miscoloured one. */
.chip.ws.band-0 { background: var(--ok-weak);     color: var(--ok-text);     border-color: var(--ok); }
.chip.ws.band-1 { background: var(--warn-weak);   color: var(--warn-text);   border-color: var(--warn); }
.chip.ws.band-2 { background: var(--danger-weak); color: var(--danger-text); border-color: var(--danger); }
.chip.ws.band-3 { background: var(--accent-weak); color: var(--accent-text); border-color: var(--accent-weak-border); }

/* The NEUTRAL colour (D-455): a workstream a PERSON added carries no model band, and in the
   register EVERY pill is this one colour with no band word and no band colour (D-454). One
   rule serves both, because they are the same statement — this pill makes no claim about
   confidence. */
.chip.ws.band-none { background: var(--bg-surface); color: var(--text-secondary); border-color: var(--border-default); }

/* The + . Sized and aligned to the pills it sits among rather than to the button defaults,
   so a row of pills does not gain a taller line when the control is editable. */
.tagadd {
  border: 1px dashed var(--border-default); border-radius: var(--radius-pill);
  color: var(--text-secondary); background: var(--bg-surface);
  font-size: var(--fs-caption); line-height: 1; padding: 2px var(--space-3);
}
.tagadd:disabled { opacity: 0.45; cursor: default; }

.wsmenu {
  position: fixed; z-index: 60; min-width: 12rem; max-height: 18rem; overflow-y: auto;
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  padding: var(--space-2);
}
.wsmenu-item {
  display: block; width: 100%; text-align: left;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-xs);
  font-size: var(--fs-caption); color: var(--text-primary);
}
.wsmenu-item:hover { background: var(--bg-app); }

.chip.trail, .linklike.trail { margin-left: auto; }

/* TS-C CH-144 (F13 R-9, D-310) — the x that makes a workstream pill a REVIEW control.
   NAMED `tagdrop` AND NOT `chipx`: the B-115 chip census reads `.chip<something>` as a
   chip VARIANT, so `.chipx` registered as a variant called `x` that inherits the
   standardized pill width — a class name that lies to a guard about what it is.
   Nathan's shape at the ruling: "system user should be able to drop a tag similar to how
   someone can drop an owner (x on pill)". Inside the chip rather than beside it, so the
   click target belongs unambiguously to THAT tag when three sit in a row.

   It is only rendered above R-5's floor of one, so its ABSENCE is meaningful and the pill
   must not reserve space for it — the chip is inline-flex and the button is a normal child,
   which is what makes a floor-bound pill collapse to exactly the width of its own text
   instead of leaving a gap where a control used to be. */
.chip .tagdrop {
  border: 0; background: none; cursor: pointer; padding: 0;
  margin-left: var(--space-2); line-height: 1;
  font-size: var(--fs-caption); font-weight: var(--fw-medium);
  color: inherit; opacity: 0.55;
}
.chip .tagdrop:hover, .chip .tagdrop:focus-visible { opacity: 1; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-3);
  border-radius: var(--radius); padding: var(--space-3) var(--space-5);
  font-weight: var(--fw-demibold); font-size: var(--fs-small);
  border: 1px solid transparent;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.btn.primary { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.btn.primary:hover:not(:disabled) { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.primary:active:not(:disabled) { background: var(--brand-active); border-color: var(--brand-active); }
.btn.ghost { border-color: var(--border-default); color: var(--text-primary); }
.btn.ghost:hover:not(:disabled) { background: var(--bg-hover); border-color: var(--border-strong); }
.btn.danger { border-color: var(--danger); color: var(--danger-text); }
.btn.danger:hover:not(:disabled) { background: var(--danger-weak); }
.btn.sm { padding: var(--space-2) var(--space-4); font-size: var(--fs-caption); }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: default; }
.linklike {
  color: var(--text-link); font-size: var(--fs-caption);
  text-decoration: underline; padding: 0 var(--space-1);
}
.linklike:hover { color: var(--accent-hover); }

/* list rows */
.rows { display: flex; flex-direction: column; }
.rows.mb { margin-bottom: var(--space-5); }
.rowitem {
  display: flex; gap: var(--space-5); align-items: flex-start;
  padding: var(--space-4) var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
}
.rowitem:last-child { border-bottom: none; }
.rowitem .body { flex: 1; min-width: 0; }
.rowitem .meta { font-size: var(--fs-caption); color: var(--text-tertiary); margin-top: 2px; }
.rowitem:hover { background: var(--bg-hover); border-radius: var(--radius); }
.rowitem.clickable { cursor: pointer; }

/* data table (registers, meetings, metrics, citations, spend) */
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.table th {
  text-align: left; font-size: var(--fs-micro); text-transform: uppercase;
  letter-spacing: var(--tracking-caps); color: var(--text-tertiary); font-weight: var(--fw-demibold);
  padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border-default);
}
.table td { padding: var(--space-4); border-bottom: 1px solid var(--border-subtle); vertical-align: top; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:nth-child(even) { background: var(--bg-zebra); }
.table tbody tr:hover { background: var(--bg-hover); }
.table .prime { font-weight: var(--fw-medium); color: var(--text-primary); }
/* B-102(5) / FB-18 · a name and the slug that names it, on ONE line. Baseline-aligned so
   the key sits ON the label's line rather than centred against a taller box, and allowed
   to wrap as a pair on a narrow window — the key following its label onto the next line is
   still the two read together, which is the point of moving it up here. */
.namekey { display: flex; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; }
.keytag {
  font-family: var(--font-mono); font-size: var(--fs-caption);
  font-weight: var(--fw-regular); color: var(--text-tertiary);
}
.table .sub { color: var(--text-tertiary); font-size: var(--fs-caption); margin-top: 2px; }
.table td.sub { font-size: var(--fs-small); }
.table tr.clickable { cursor: pointer; }
.table tr.historyrow td { padding-top: 0; }
/* column widths — named, so no inline style attribute is needed (CSP) */
.table .c-date    { width: 130px; }
.table .c-type    { width: 110px; }
.table .c-state   { width: 210px; }   /* TS Z (D-510 (2)): the meeting's run state */
.table .c-due     { width: 120px; }
.table .c-status  { width: 100px; }
/* TS WALK2-D (D-567 (3)): the status a plain select filling its cell; Close? its own narrow column. */
.table .c-close   { width: 52px; text-align: center; }
/* The owner's flags (proposed, unowned) and its + sit beside the pill where the column has room
   and drop under it where it has not; the pill itself never wraps (D-567 (1)). */
.ownercell .sr { flex-wrap: wrap; row-gap: 2px; }
/* the inline table control's compact metrics (`select.mini`), wide enough for the longest word */
.statuscell .st-select { width: 100%; min-width: 9em; }
/* a finding's words are Open and Closed (F18 R-5), and its table is drawn to fit its card (P5-A1) */
.fd-regcard .statuscell .st-select { min-width: 6em; }
.table th.c-close, .table td.c-close { padding-left: var(--space-2); padding-right: var(--space-2); }
.statuscell .st-panel:empty { display: none; }
.st-close { display: inline-flex; justify-content: center; cursor: pointer; }
.st-close input[disabled] { cursor: not-allowed; }
.table .c-meeting { width: 160px; }
.table .c-count   { width: 120px; }
.table .c-value   { width: 160px; }
.table .c-period  { width: 100px; }
.table .c-speaker { width: 130px; }
.table .c-tokens  { width: 170px; }
.table .c-cost    { width: 100px; }
.table .c-calls   { width: 90px; }
.table .c-basis   { width: 110px; }
.table .c-folder  { width: 150px; }
.table .c-open    { width: 80px; }
/* B-102(5) / FB-18 · content-sized columns. `width: 1%` is the standing table idiom for
   "take only what you need" — the browser resolves it against the content once no other
   column claims the space — so every fixed column here stops holding width it never used
   and the budget lands on the one variable-width column beside them. Distinct from the
   px widths above, which exist to stop SHORT content from collapsing a column. */
.table .c-tight { width: 1%; white-space: nowrap; }
/* The statement kind is a fixed vocabulary of four short phrases ("Income statement",
   "Balance sheet", "Cash flow", "Operating measure"). It was wrapping to two lines inside
   a 110px column, which is what FB-18 reported: the column was narrower than any of the
   four values it can ever hold. */
.table .c-statement { width: 1%; white-space: nowrap; }
/* B-115(4) · a column that centres. Both the <th> and the column's cells carry this class
   (App.applyColumnClasses), which is the whole point: centring only the header would move
   the label away from the values instead of onto them. `.table th`'s left alignment is
   overridden here rather than being made conditional up there, so the default for a column
   stays left and centring is something a column spec asks for. */
.table .c-mid { text-align: center; }

/* B-115(5) · ONE column grid, shared by both Files tables.
   `table-layout: fixed` is the only thing that actually guarantees the alignment the drive
   asked for. Sharing a column SPEC (B-102(7)) made the two tables declare the same columns;
   under automatic layout each still sized them from its own content, so the live list and
   the refused list put the same headings at different x-positions. Fixed layout sizes from
   the header row alone, and the widths below are PERCENTAGES, so the two tables agree at
   every window width and the row can never overflow the card the way a set of pixel widths
   summing past the container would.
   The budget: FILE gives up the width it was hogging, which is what pays for Uploaded
   becoming its own column instead of a second line inside Uploaded by. Percentages total
   100 and are checked by tests/test_b115_ux_residue.py, because a set that quietly sums to
   96 leaves a gap no one would attribute to this rule. */
.table.lockcols { table-layout: fixed; }
/* TS F4-P3 (F4 R-10; D-052): the mockup's four columns — Name, Modified, By, In Waypoint —
   plus the row's own actions. Format, Basis, Uploaded by, Uploaded and Folder are GONE with
   D-130's two axes: the picture draws none of them, and Modified/By answer the question
   Uploaded/Uploaded by answered about a file now that SharePoint holds it. There is one
   Files table, so `lockcols` no longer buys alignment BETWEEN two of them; it is kept
   because fixed layout is still what stops a long filename resizing the column. */
.table.lockcols .f-name    { width: 28%; }
.table.lockcols .f-when    { width:  9%; }
/* One line: a person's name wrapping is how a table of one-line rows becomes a table of
   two-line rows, which is the defect B-115(5) removed. */
.table.lockcols .f-by      { width: 15%; white-space: nowrap; overflow: hidden;
                             text-overflow: ellipsis; }
/* The status is a SENTENCE here, not a word: "Waiting for you to confirm its layout" is the
   mockup's own wording and the widest of the five. Sized for it and never wrapped — a status
   that wraps to two lines puts back the ragged row heights B-115(5) removed. The test reads
   the words back out of `fileStatus`, so a longer one added later fails here rather than on
   a drive, exactly as it did for FILE_STATE_LABELS. */
.table.lockcols .f-status  { width: 28%; white-space: nowrap; }
/* Wide enough for the longest review door a row can carry ("Confirm file layout") beside the
   menu, at the width the list has WITH THE VIEWER PANEL OPEN — which is the narrow case, and
   the one the first shots found the buttons clipped in. */
.table.lockcols .f-actions { width: 20%; }
/* One line, never two: the review door and the menu side by side is the row's height, and a
   wrapped action cell puts back exactly the ragged heights B-115(5) removed. */
.table.lockcols .f-actions .rowactions { flex-wrap: nowrap; justify-content: flex-end; }
/* Fixed layout stops a long filename RESIZING the column; it does not stop it wrapping to
   three lines inside it, which would put back exactly the row height this item is removing.
   So the name is one line, clipped with an ellipsis. The ellipsis has to go on the block
   INSIDE the cell — `text-overflow` needs a block box with nowrap, and a <td> is neither.
   Nothing is lost: the cell carries the full name as its tooltip (App.primeCell's `title`),
   which is also the only place a truncated name can still be read. */
.table.lockcols .f-name { overflow: hidden; }
.table.lockcols .f-name > div,
.table.lockcols .f-namebox > .fname {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* A status carrying a refusal reason on its tooltip. Marked, or the tooltip is a secret:
   the reason used to be a visible second line, and collapsing it without a cue would just
   be deleting it. */
.hasnote { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }

/* filter bar / form fields */
.filterbar { display: flex; gap: var(--space-4); align-items: flex-end; flex-wrap: wrap; }
.filterbar.mb { margin-bottom: var(--space-5); }
.filterbar.mt { margin-top: var(--space-5); }
.field label {
  display: block; font-size: var(--fs-micro); text-transform: uppercase;
  letter-spacing: var(--tracking-caps); color: var(--text-tertiary);
  font-weight: var(--fw-demibold); margin-bottom: var(--space-2);
}
/* B-102(3) / FB-25 · one control-height band per captioned control, so a row of fields
   agrees on its centre line whatever each control's intrinsic height is. See App.field.
   The band is a block-level box filling the field's width, so `.field.wide`'s `width: 100%`
   controls still fill their column; a control taller than the band (a textarea) simply
   grows it. */
.field .ctlband {
  display: flex; align-items: center; min-height: var(--control-h);
}
.field.grow { flex: 1; }
/* DF-5 · a field sized to its own content instead of sharing the row's slack. For a select
   over a fixed vocabulary the widest option IS the right width — letting it flex makes the
   control change width between screens, which reads as a different control. */
.field.fixed { flex: 0 0 auto; }
/* DF-5 · the write row: the box somebody types in takes the leftover width, and the two fields
   are the same HEIGHT so the row reads as one line. `stretch` matches the fields; `.ctlband`
   already centres each control inside its own band, so the select keeps its natural size
   rather than being deformed to a two-row textarea's height. */
.createwrite { align-items: stretch; }
.createwrite .field.grow textarea { width: 100%; resize: vertical; }
/* TS F20-P5 (P5-A4; F18 mockup v1, Screen 7): the create form's own card — two columns, the
   writing field and Related findings across, the buttons at the right. */
.card.createcard { max-width: 820px; }
.createcard .createfields { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4) var(--space-5);
  align-items: end; margin-top: var(--space-3); }
.createcard .createfields > .wide { grid-column: 1 / -1; }
.createcard .createfields .field { margin: 0; }
.createcard .createwrite .field { width: 100%; }
.createfixed { display: inline-flex; align-items: center; height: var(--control-h); padding: 0 var(--space-3);
  border: 1px solid var(--border-default); border-radius: var(--radius-sm); color: var(--text-secondary);
  background: var(--bg-inset); }
.createbtns { display: flex; gap: var(--space-3); justify-content: flex-end; margin-top: var(--space-5); }
.field.grow2 { flex: 2; min-width: 220px; }
.field.mb { margin-bottom: var(--space-5); }
.field.wide input, .field.wide select, .field.wide textarea { width: 100%; }
.self-end { align-self: flex-end; }
/* B-102(3) / FB-25 · `input[type="search"]` joins both lists, and it is the SPECIMEN
   Nathan reported: the Files long-list search box is the app's only search input, so it
   was the only text field in the product wearing the browser's default chrome — a
   different border, a different height and therefore a different centre line from the
   GROUP BY control beside it in the same bar. It was never excluded on purpose; it was
   added later than the list and never joined the set. */
input[type="text"], input[type="email"], input[type="date"], input[type="number"],
input[type="search"], select, textarea {
  font: inherit; color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-default); border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  box-sizing: border-box; line-height: 1.25;
}
/* WebKit gives input[type="date"] a taller intrinsic box than a select of the same
   font and padding — its ::-webkit-datetime-edit carries its own metrics. Side by
   side in a filterbar the date field visibly overhangs its neighbours. Pinning the
   single-line controls to one height derived from the same tokens (padding + line box +
   borders) lines them up without a magic pixel value. */
input[type="text"], input[type="email"], input[type="date"], input[type="number"],
input[type="search"], select {
  height: var(--control-h);
}
/* Safari paints its own decorations inside a search field — the cancel affordance and,
   historically, a pill border — which would sit on top of the shared box above. */
input[type="search"] { -webkit-appearance: none; appearance: none; }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
textarea { width: 100%; resize: vertical; min-height: 64px; }
/* .mini sets its own compact metrics — exempt it from the shared control height
   above, which would otherwise stretch it back to full size. */
select.mini, input.mini {
  padding: 1px var(--space-3); font-size: var(--fs-caption); height: auto;
}
input.mini { width: 5em; }
/* TS AC: a money figure in a table row — the platform fee, "110.00" — wider than a count. */
input.mini.money { width: 7.5em; }
/* TS Y (D-500 (6)): EVERY single-line entry box in a wizard is one height — the shared
   --control-h above — so a box narrowed for one letter (Add user's middle initial) is narrower,
   never shorter. `.mini`'s compact metrics belong to inline table controls, never a wizard. */
input.initial { width: 4.5em; }
.wizard input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
.wizard select {
  height: var(--control-h); padding: var(--space-3) var(--space-4); font-size: inherit;
}
/* D-500 (5): space between a user's e-mail and the signed-in pill beside it. */
.tablecard td .inline { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }

/* evidence quote + provenance */
.quote {
  background: var(--bg-inset);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--space-3) var(--space-4);
  margin: var(--space-3) 0;
  font-style: italic; color: var(--text-secondary); font-size: var(--fs-small);
  white-space: pre-wrap;
}
.provchip {
  display: inline-flex; align-items: center; gap: var(--space-2);
  border: 1px solid var(--accent-weak-border); background: var(--accent-weak);
  color: var(--accent-text); border-radius: var(--radius-pill);
  padding: 0 var(--space-4); font-size: var(--fs-caption); font-weight: var(--fw-medium);
  transition: background var(--dur-1) var(--ease);
}
.provchip:hover { background: var(--bg-hover); }
.provchip svg { width: 11px; height: 11px; }
.provchips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }

/* audio chip (CH-48 cluster player — presentation only; the bytes path is unchanged) */
.audiochip {
  display: inline-flex; align-items: center; gap: var(--space-3);
  border: 1px solid var(--border-default); border-radius: var(--radius-pill);
  padding: var(--space-2) var(--space-4) var(--space-2) var(--space-2);
  background: var(--bg-surface);
}
.audiochip .play {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: var(--accent); color: var(--on-accent);
  display: inline-flex; align-items: center; justify-content: center;
}
.audiochip .play svg { width: 10px; height: 10px; margin-left: 1px; }
.audiochip .wave { display: flex; gap: 2px; align-items: center; height: 18px; }
.audiochip .wave i { width: 2px; border-radius: 1px; background: var(--accent); opacity: .75; }
/* Decorative bars, not real peaks (audit note 5: rendering ornament as ornament
   is faithful; peak analysis is out of scope). Heights live here rather than in
   JS so nothing sets an inline style — the webview CSP is style-src 'self'. */
.audiochip .wave i:nth-child(1)  { height: 3.0px; }
.audiochip .wave i:nth-child(2)  { height: 15.9px; }
.audiochip .wave i:nth-child(3)  { height: 6.3px; }
.audiochip .wave i:nth-child(4)  { height: 15.0px; }
.audiochip .wave i:nth-child(5)  { height: 9.4px; }
.audiochip .wave i:nth-child(6)  { height: 13.4px; }
.audiochip .wave i:nth-child(7)  { height: 12.1px; }
.audiochip .wave i:nth-child(8)  { height: 11.0px; }
.audiochip .wave i:nth-child(9)  { height: 14.2px; }
.audiochip .wave i:nth-child(10) { height: 8.2px; }
.audiochip .wave i:nth-child(11) { height: 15.5px; }
.audiochip .wave i:nth-child(12) { height: 4.9px; }
.audiochip .wave i:nth-child(13) { height: 16.0px; }
.audiochip .wave i:nth-child(14) { height: 4.4px; }
.audiochip .wave i:nth-child(15) { height: 15.6px; }
.audiochip .wave i:nth-child(16) { height: 7.7px; }
.audiochip .wave i:nth-child(17) { height: 14.4px; }
.audiochip .wave i:nth-child(18) { height: 10.6px; }
.audiochip .wave i:nth-child(19) { height: 12.5px; }
.audiochip .wave i:nth-child(20) { height: 13.1px; }
.audiochip .wave i:nth-child(21) { height: 9.9px; }
.audiochip .wave i:nth-child(22) { height: 14.8px; }
.audiochip .dur { font-size: var(--fs-caption); color: var(--text-tertiary); }
.audiochip audio { height: 26px; max-width: 240px; }
.audiochip .err { font-size: var(--fs-caption); color: var(--danger-text); }

/* ---- review stepper ---- */
.stepper {
  display: flex; gap: var(--space-2); align-items: stretch; flex-wrap: wrap;
  position: sticky; top: calc(-1 * var(--space-8)); z-index: var(--z-sticky);
  background: var(--bg-app); padding: var(--space-2) 0;
}
.step {
  display: flex; align-items: center; gap: var(--space-3);
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius); padding: var(--space-3) var(--space-5);
  font-size: var(--fs-small); box-shadow: var(--shadow-sm);
}
.step .g {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--fs-micro); font-weight: var(--fw-bold);
  background: var(--bg-inset); color: var(--text-secondary);
}
.step.done .g { background: var(--ok); color: var(--on-ok); }
.step.attn { border-color: var(--warn); }
.step.attn .g { background: var(--warn); color: var(--on-warn); }
.step b { font-weight: var(--fw-demibold); }
.step .n { color: var(--text-tertiary); font-size: var(--fs-caption); }
.step-slash { align-self: center; color: var(--border-strong); font-weight: var(--fw-bold); }
/* TS V (D-489): the wizard card reuses the review stepper; the step being filled is marked. */
.step.current { border-color: var(--border-focus); }
.step.current .g { background: var(--accent); color: var(--on-accent); }
.wizard .wizard-steps { position: static; margin-bottom: var(--space-5); }
.wizard .wizard-body { min-height: 72px; }
.wizard .wizard-foot { justify-content: flex-end; margin-top: var(--space-5); }
/* TS Y (D-500 (1)): a step that is not the last reads "Next" with a right arrow, so a person
   knows a step follows; the last button (Create project, Save, Add user…) carries none. Drawn
   here so the label a busy button restores stays the bare word. */
.btn[data-arrow]::after { content: "\2192"; margin-left: var(--space-2); }
.checklist { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); }
.checklist .check { display: inline-flex; align-items: center; gap: var(--space-3);
  font-size: var(--fs-small); color: var(--text-primary); }
.rows.nested { margin-top: var(--space-3); padding-left: var(--space-5);
  border-left: 2px solid var(--border-subtle); }
.card.readonly { background: var(--bg-inset); }
.cardhead { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.cardhead h2 { margin-right: auto; }

/* segmented control (Accept / New entry / Skip · theme picker).
   Real radio inputs stay underneath for a11y; the segment is styling only. */
/* F4 R-15's "N new" pill: on the Client switch and on every folder holding files nobody
   has processed (the mockup's states 3 and 4). It reads as NEWS rather than as a warning —
   the brand tint the sidebar's active row uses, not the danger one — because a client
   sharing files is the system working. Built from the same tokens as `.chip` and `.count`
   so it carries the shell's own figure in both themes with no colour of its own. */
.newpill {
  display: inline-flex; align-items: center; margin-left: var(--space-3);
  border-radius: var(--radius-pill); padding: 0 var(--space-3);
  font-size: var(--fs-caption); font-weight: var(--fw-demibold); line-height: 1.5;
  background: var(--brand-weak); color: var(--brand-text);
  border: 1px solid var(--border-default); white-space: nowrap;
}
/* On the switch the pill sits inside a button whose label is its sibling, and in a folder's
   name box inside a flex row that must not squeeze it. */
.seg.tabs .btn .newpill { margin-left: var(--space-3); }
.f-namebox .newpill { flex: 0 0 auto; }

.seg { display: inline-flex; border: 1px solid var(--border-default); border-radius: var(--radius); overflow: hidden; }
.seg label {
  display: inline-flex; align-items: center;
  padding: var(--space-2) var(--space-5); font-size: var(--fs-small);
  color: var(--text-secondary); border-right: 1px solid var(--border-default);
  cursor: pointer; margin: 0;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.seg label:last-child { border-right: none; }
.seg label:hover { background: var(--bg-hover); color: var(--text-primary); }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg input:checked + span,
.seg label.on { color: var(--brand-text); font-weight: var(--fw-demibold); }
.seg label:has(input:checked) { background: var(--brand-weak); color: var(--brand-text); font-weight: var(--fw-demibold); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--border-focus); outline-offset: -2px; }

/* Button-driven variant of .seg, for in-page tabs (Admin). The radio-based .seg
   above styles labels; these are real buttons carrying their own state. */
.seg.tabs { margin-bottom: var(--space-5); }
.seg.tabs .btn {
  border: none; border-right: 1px solid var(--border-default); border-radius: 0;
  color: var(--text-secondary);
}
.seg.tabs .btn:last-child { border-right: none; }
.seg.tabs .btn.active {
  background: var(--brand-weak); color: var(--brand-text); font-weight: var(--fw-demibold);
}
/* TS AE (D-505 (3)): the Lanes tab's sub-tabs sit inside its body, which takes the card gap. */
.seg.tabs.subtabs { margin-bottom: 0; justify-self: start; }

/* diff rows */
.diffrow {
  display: flex; gap: var(--space-5); align-items: flex-start;
  padding: var(--space-5) var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
}
.diffrow:last-child { border-bottom: none; }
.diffrow .body { flex: 1; min-width: 0; }
.diffrow.focused { background: var(--bg-hover); border-radius: var(--radius); }
/* F12/CH-126 (D-278 clause 2): the staged residue reads as a listing, not a question —
   dimmed a step so the rows that carry a proposal keep the visual priority, but never
   hidden, because a substantive unattributed voice is itself a finding. */
.diffrow.staged { opacity: 0.75; }
.diffrow.staged:hover, .diffrow.staged:focus-within { opacity: 1; }

/* D-197 / D-200 — the review control pair, and the pair is the point.

   BB-5b deleted `.diffrow input[type="checkbox"]` and left a tombstone here saying no diff
   row contains one. D-197 makes that false, so the tombstone is GONE rather than left to
   read as a live requirement to the next person editing this file — which is the same
   failure the tombstone was written to prevent, arriving from the other direction.

   The checkbox is the ordinary two-outcome row: checked accepts, unchecked rejects, and
   unchecked is where every row starts. Sized up from the browser default because it is the
   primary control on the screen and a 13px box in a 40px row reads as a decoration.

   NO UNDECIDED TINT, and its absence is deliberate rather than forgotten: a checkbox has
   two states, so there is no third one to mark. The select below keeps that tint because it
   still HAS the state — `probable` alone kept its dropdown, since `new_entry` is a third
   outcome a checkbox cannot represent. */
.diffrow input[type="checkbox"].resolve,
.acceptall input[type="checkbox"].resolve {
  width: var(--space-5); height: var(--space-5); margin: 0;
  accent-color: var(--accent); cursor: pointer;
}

/* The three-way control, `probable` only now. Sized so the widest option ("Accept match")
   does not make the dropdown jump between rows, because a control that changes width down a
   list reads as a different control.

   An UNDECIDED row is marked, not merely un-filled: unset is where a probable row starts, so
   "nothing chosen here" is the state a reviewer has to be able to SEE down a long list. The
   selector matches the placeholder option being the selected one, which is the SAME condition
   collectApproved reads — so the mark cannot drift out of step with what the commit will do.
   Deliberately not `:invalid` + `required`: nothing here blocks the commit, and announcing a
   required field to a screen reader when it is not one is a lie told to the people least able
   to check it.

   Toned as a reminder rather than an error. Undecided is the honest starting state of an
   uncertain match; dressing it in red would make a correct screen look broken. */
select.resolve { min-width: 152px; }
select.resolve:has(option[value=""]:checked) {
  border-color: var(--warn); color: var(--text-tertiary);
}

/* DF-12 / D-199 — accept-all at TWO scopes, one appearance apart. The shared rule carries the
   layout so the two cannot drift into looking like different controls; each scope's own rule
   carries only its weight. */
/* An inline-flex SPAN, not a block: the per-card scope mounts inside the card's `<h2>`, whose
   content model is phrasing only, so this carries no divs at all (see App.acceptAllStrip). */
.acceptall { display: inline-flex; align-items: center; gap: var(--space-3); }
.acceptall .sub { color: var(--text-tertiary); font-size: var(--fs-small); }
/* Label BESIDE the box rather than above it, and carrying the same caps caption every field
   label in the sheet wears — so this reads as the same kind of thing here as anywhere else,
   without inheriting `App.field`'s stacked block layout, which would make a one-line control
   twice the height of the row it sits in. */
.acceptall > label {
  font-size: var(--fs-micro); text-transform: uppercase;
  letter-spacing: var(--tracking-caps); color: var(--text-tertiary);
  font-weight: var(--fw-demibold); cursor: pointer;
}

/* The review-wide one reads as a header strip rather than another proposal card: it acts ON
   the cards below, and giving it a register row's weight would put it in the list it operates. */
.acceptall-review { display: flex; gap: var(--space-5); padding: var(--space-4) var(--space-5); }

/* The per-card one rides INSIDE the card heading (`.card > h2` is already a flex row), so it
   costs no vertical space on a screen that already scrolls. Reset to regular weight: it
   inherits the heading's demibold otherwise, and a second bold thing on that line competes
   with the card's own title, which is what the reviewer is actually reading. */
.acceptall-card { gap: var(--space-3); font-weight: var(--fw-regular); }
.candidate {
  background: var(--bg-inset); border: 1px dashed var(--border-strong);
  border-radius: var(--radius); padding: var(--space-3) var(--space-4);
  margin: var(--space-3) 0; font-size: var(--fs-small);
}
.candidate .meta { font-size: var(--fs-caption); color: var(--text-tertiary); }
.morerow { padding: var(--space-3) var(--space-2); }

/* F8 CH-96 — people lifecycle (B-107). Create-at-review sits INSIDE the speaker row it
   serves, so the reviewer never leaves the card whose voice they are naming. */
.assignslot { display: flex; gap: var(--space-3); align-items: flex-end; }
.inlinecreate {
  margin-top: var(--space-3); padding: var(--space-3);
  background: var(--bg-inset); border-radius: var(--radius);
}

/* F8 CH-95 — R-15 Client Overview A/D/Q cards, per Nathan's 2026-08-04 mockup.

   Each band is a BUTTON, because every one of them navigates to the register filtered to
   exactly what it counted. Styled as a figure rather than as a control: it has to read as a
   number at a glance and only reveal itself as clickable on approach, or three cards of
   buttons would shout louder than the page they summarise. */
.adqcard .adqbands {
  display: flex; gap: var(--space-4); margin: var(--space-4) 0;
}
.adqband {
  display: flex; flex-direction: column; gap: var(--space-1);
  background: none; border: 1px solid transparent; border-radius: var(--radius);
  padding: var(--space-2) var(--space-3); cursor: pointer; text-align: left;
  color: inherit; font: inherit;
}
.adqband:hover { background: var(--bg-hover); border-color: var(--border-subtle); }
.adqband b { font-size: var(--fs-h2); line-height: 1; }
.adqband.warn b { color: var(--warn-text); }
.adqband.danger b { color: var(--danger-text); }
.adqband .adqlabel { font-size: var(--fs-caption); color: var(--text-tertiary); }

/* R-15's companion from the same mockup: the summary row reads at a reduced height, so the
   three cards below it are what the eye lands on rather than the stat strip above them. */
.overviewbody .stats { padding-block: var(--space-3); }

/* F8 CH-95 — R-13 carry-forward. A reading list, not a table: the point of the view is the
   last thing SAID about each item, and a table cell would clip exactly that. */
.carryrow {
  padding: var(--space-4) 0; border-bottom: 1px solid var(--border-subtle);
}
.carryrow:last-child { border-bottom: none; }
.carryhead { display: flex; gap: var(--space-3); align-items: baseline; flex-wrap: wrap; }
.carryrow .quote { margin-top: var(--space-2); }

/* F8 CH-94 — register surfaces at research table stakes (R-12 / DIR-F8-07).

   The latest update on a collapsed row is DEMOTED, not hidden: it is context for the entry
   above it, and at full weight it competes with the entry's own text for the eye. */
.latest { font-style: italic; color: var(--text-tertiary); }

/* Overdue and stale sit together under the row they describe. They are two chips because
   they are two different failures on two different dates — the distinction DIR-F8-07 was
   added to draw — so they are never merged into one "needs attention". */
.flagrow { display: flex; gap: var(--space-2); margin-top: var(--space-2); }

/* DIR-F8-02's + button, inside the expanded history. Sits on one line with its input so
   the append reads as one gesture rather than as a form. */
.appendrow {
  display: flex; gap: var(--space-3); align-items: center;
  margin-top: var(--space-3);
}
.appendrow input[type="text"] { flex: 1; min-width: 0; }

/* A from/to pair reads as ONE filter, so the two inputs are bound together visually — two
   loose date boxes side by side read as two unrelated filters, which is exactly the
   confusion a separate due/next-update pair could otherwise cause. */
.daterange { display: inline-flex; gap: var(--space-2); align-items: center; }
.daterange input { min-width: 0; }
/* TS WALK2-D (D-567 (4)): from over to, stacked under the filter's label. */
.daterange.stacked { display: inline-flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); }
.daterange .dr-row { display: inline-flex; align-items: center; gap: var(--space-2); }
.daterange .dr-k { width: 32px; font-size: var(--fs-caption); color: var(--text-tertiary); }
/* the register's filter bar, left-aligned under the page head, on every register but Findings */
.filterbar.regfilters { justify-content: flex-start; align-items: flex-start; margin-bottom: var(--space-4); }

/* F8 CH-93 — the register walk (R-14 / D-175).

   A walk row stacks rather than sitting in the diff row's two columns: it carries an item's
   own state ABOVE whatever is being asked about it, and a side-by-side would put the
   question level with the identity instead of after it. Everything else — the border, the
   focus tint, the chips — is inherited from `.diffrow` on purpose, because it is the same
   list on the same screen and a second visual language for half of it would read as a
   second screen. */
.walkrow { flex-direction: column; gap: var(--space-3); }
.walkrow > * { width: 100%; }

/* A proposal staged onto an item, indented under it. The left rule is what says "this
   belongs to the entry above" without a heading that would break the walk's one ordering. */
.walkprop {
  border-left: 2px solid var(--accent-weak-border);
  padding: var(--space-3) 0 var(--space-3) var(--space-4);
  margin-left: var(--space-2);
}

/* The manual half. `.walkextra` and its panels are toggled by the `hidden` class the rest of
   the app already uses — the fields for an action nobody picked are not merely unstyled,
   they are out of the tab order, so a keyboard reviewer does not walk through four sets of
   inputs belonging to actions they did not choose. */
.walkact { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: flex-start; }
.walkextra { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.walkchanges { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.walkact input[type="text"] { min-width: 280px; }

/* commit bar */
.commitbar {
  position: sticky; bottom: calc(-1 * var(--space-8)); z-index: var(--z-sticky);
  margin: var(--space-4) calc(-1 * var(--space-8)) calc(-1 * var(--space-8));
  padding: var(--space-4) var(--space-8);
  background: var(--bg-raised);
  border-top: 1px solid var(--border-default);
  box-shadow: var(--shadow);
  display: flex; gap: var(--space-4); align-items: center;
}
.commitbar .sum { color: var(--text-secondary); font-size: var(--fs-small); }
.commitbar .keys { margin-left: auto; color: var(--text-tertiary); font-size: var(--fs-caption); }
kbd {
  font-family: var(--font-mono); font-size: var(--fs-micro);
  background: var(--bg-inset); border: 1px solid var(--border-default);
  border-bottom-width: 2px; border-radius: var(--radius-sm);
  padding: 0 var(--space-2);
}

/* pipeline progress */
.pipeline { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.pipeline.mb { margin-bottom: var(--space-5); }
.pipestep { display: flex; align-items: center; gap: var(--space-3); font-size: var(--fs-small); color: var(--text-tertiary); }
.pipestep .dot {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-inset); border: 1px solid var(--border-default);
  font-size: var(--fs-micro); color: var(--text-tertiary);
}
.pipestep.done { color: var(--text-secondary); }
.pipestep.done .dot { background: var(--ok); border-color: var(--ok); color: var(--on-ok); }
.pipestep.now { color: var(--brand-text); font-weight: var(--fw-demibold); }
.pipestep.now .dot { border-color: var(--brand); color: var(--brand-text); animation: pulse 1.6s var(--ease) infinite; }
/* W-25: elapsed-vs-typical under the running stage. Normal weight and tertiary colour
   so the readout informs without competing with the stage label it sits beside. */
.pipestep.now .sub { font-weight: var(--fw-regular); color: var(--text-tertiary); }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px var(--brand-weak); } }
.pipearrow { color: var(--border-strong); }
progress { width: 100%; height: 10px; }

/* dropzone */
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius-lg);
  padding: var(--space-9); text-align: center;
  color: var(--text-secondary); background: var(--bg-inset);
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.dropzone:hover, .dropzone.armed { border-color: var(--brand); background: var(--brand-weak); color: var(--brand-text); }
.dropzone .big { font-size: var(--fs-h4); font-weight: var(--fw-demibold); color: var(--text-primary); margin-bottom: var(--space-2); }
.dropzone .pick { margin-top: var(--space-4); }
/* Mid-conversion the zone is inert — the hover highlight would promise a drop
   that intakeAudio will refuse. */
.dropzone.busy { opacity: 0.6; cursor: progress; }
.dropzone.busy:hover {
  border-color: var(--border-strong); background: var(--bg-inset); color: var(--text-secondary);
}
/* Indeterminate: /downmix reports nothing until ffmpeg exits, so there is no
   percentage to show. Under prefers-reduced-motion the global rule above stops
   the rotation and it reads as a static ring — the text carries the state. */
.spinner {
  display: inline-block; width: 12px; height: 12px; vertical-align: -1px;
  border: 2px solid var(--border-strong); border-top-color: var(--brand);
  border-radius: 50%; animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* attendee grid */
.attendees { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-2) var(--space-5); }
.attendee {
  display: flex; gap: var(--space-3); align-items: center;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius);
  font-size: var(--fs-small); color: var(--text-primary); margin-bottom: 0;
}
.attendee:hover { background: var(--bg-hover); }
.attendee input { accent-color: var(--brand); width: 15px; height: 15px; flex: none; }
.attendee .role { color: var(--text-tertiary); font-size: var(--fs-caption); }
.attendee .drop { margin-left: auto; color: var(--text-tertiary); }
/* TS Z (D-506 (2), (4)): a row names the person, then their role on this project and their
   e-mail on a second line; a name the agent read from the agenda carries its chip. */
.attendee .who { display: flex; flex-direction: column; min-width: 0; }
.attendee .who .role { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* TS Z (D-509): the line under the agenda box naming the file it is kept in Files as. */
.agendafile { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap;
              margin: 0 0 var(--space-3); font-size: var(--fs-caption); }
.agendafile .meta { color: var(--text-secondary); }
/* TS Z (D-506 (3)): the "Works for" picker sits in a field like a text box — its full width and
   one control high, with an entry's regular weight — so the add rows line up. */
.cbx-org { display: flex; width: 100%; min-width: 0; }
a.btn { text-decoration: none; }   /* TS Z: an Open link drawn as a button reads as one */
.cbx-org .cbx-trigger { height: var(--control-h); font-weight: var(--fw-regular);
                        font-size: var(--fs-body); min-width: 0; }
.contacts-add .filterbar .field { min-width: 160px; }

/* empty state */
.empty { text-align: center; padding: var(--space-10) var(--space-8); color: var(--text-secondary); }
.empty .slashes { justify-content: center; display: flex; margin: 0 0 var(--space-5); }
.empty .slashes i { height: 28px; width: 7px; opacity: .5; }
.empty h3 { margin: 0 0 var(--space-2); font-size: var(--fs-h4); color: var(--text-primary); }
.empty p { margin: 0 0 var(--space-5); font-size: var(--fs-small); }

/* skeletons (loading state — replaces the CH-47 "Loading…" paragraph) */
.skel { position: relative; overflow: hidden; background: var(--skeleton-base); border-radius: var(--radius-sm); }
.skel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, var(--skeleton-shine) 50%, transparent 70%);
  animation: shine 1.4s linear infinite;
}
@keyframes shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.skelbar { height: 14px; margin: var(--space-4) 0; }
.skelbar.w1 { width: 62%; }
.skelbar.w2 { width: 88%; }
.skelbar.w3 { width: 44%; }

/* transcript */
.turns { max-width: 860px; }
.turn {
  display: grid; grid-template-columns: 140px 1fr; gap: var(--space-5);
  padding: var(--space-4) 0; border-bottom: 1px solid var(--border-subtle);
}
.turn:last-child { border-bottom: none; }
.turn .who { font-weight: var(--fw-demibold); font-size: var(--fs-small); }
.turn .who.unmapped { color: var(--text-tertiary); font-weight: var(--fw-regular); font-style: italic; }
.turn .t { font-size: var(--fs-caption); color: var(--text-tertiary); font-family: var(--font-mono); }
.turn.hit .txt {
  background: var(--bg-selected); border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  margin: calc(-1 * var(--space-2)) calc(-1 * var(--space-3));
}

/* sparkline */
.sparkline { width: 100%; height: 110px; color: var(--accent); }

/* history rail */
.history { margin: var(--space-3) 0 0 var(--space-2); padding-left: var(--space-5); border-left: 2px solid var(--border-subtle); }
.history .h { font-size: var(--fs-caption); color: var(--text-tertiary); padding: var(--space-1) 0; }
.history .h b { color: var(--text-secondary); font-weight: var(--fw-medium); }

/* notice banner — now an IN-PANE STATE only (empty, error, informational), which is
   what D-052's per-screen state matrix asks each screen to render.
   BB-2 / D-131 retired the other use: the sticky OUTCOME banner with a Dismiss button
   that survived re-renders. That mechanism (App.notice/setNotice/renderNotice) is gone —
   outcomes are toasts below, failures also land in the bell. Nothing here is dismissed
   by a click any more, because nothing here is in the user's way. */
.notice {
  display: flex; align-items: center; gap: var(--space-4);
  border-radius: var(--radius); padding: var(--space-4) var(--space-5);
  font-size: var(--fs-small); border: 1px solid;
}
.notice.ok { background: var(--ok-weak); color: var(--ok-text); border-color: var(--brand-weak-border); }
.notice.warn { background: var(--warn-weak); color: var(--warn-text); border-color: var(--warn); }
.notice.danger { background: var(--danger-weak); color: var(--danger-text); border-color: var(--danger); }
/* BB-4: the Overview's as-of banner. Informational, not a warning — reconstructing the
   page at a past date is a thing the user asked for, and dressing it in warning colour
   would read as something having gone wrong. */
.notice.info { background: var(--accent-weak); color: var(--accent-text); border-color: var(--accent-weak-border); }
.notice .x { margin-left: auto; }

/* BB-2 / D-131 — toasts. The transient half of W-17's split.
   pointer-events:none on the STACK and auto on each toast is the whole "nothing blocks
   interaction" requirement in two declarations: the column spans a corner of the
   viewport, and clicks pass straight through it to whatever is underneath; only the
   toast bodies themselves take a click, and then only to dismiss early. Bottom-right
   and not centred for the same reason — it is out of the reading path. */
.toasts {
  position: fixed; right: var(--space-6); bottom: var(--space-6);
  z-index: var(--z-toast); pointer-events: none;
  display: flex; flex-direction: column-reverse; gap: var(--space-3);
  max-width: min(420px, calc(100vw - var(--space-8)));
}
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: var(--space-4);
  border-radius: var(--radius); padding: var(--space-4) var(--space-5);
  font-size: var(--fs-small); border: 1px solid;
  background: var(--bg-overlay); color: var(--text-primary);
  border-color: var(--border-default); box-shadow: var(--shadow);
  animation: toast-in var(--dur-2) var(--ease);
}
.toast.ok { background: var(--ok-weak); color: var(--ok-text); border-color: var(--brand-weak-border); }
.toast.warn { background: var(--warn-weak); color: var(--warn-text); border-color: var(--warn); }
.toast.danger { background: var(--danger-weak); color: var(--danger-text); border-color: var(--danger); }
.toast .text { flex: 1 1 auto; min-width: 0; }
.toast .x {
  flex: none; width: 20px; height: 20px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center; color: inherit; opacity: 0.7;
}
.toast .x:hover { opacity: 1; }
.toast .x:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; opacity: 1; }
.toast .x svg { width: 12px; height: 12px; }
/* The leaving state is a class, not a removal, so the node is still there for the
   animation and is dropped on its own timer afterwards. */
.toast.leaving { animation: toast-out var(--dur-2) var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; transform: translateY(4px); } }
/* Motion is decoration here; the toast must still appear and still leave. */
@media (prefers-reduced-motion: reduce) {
  .toast, .toast.leaving { animation: none; }
}

/* Theme-dependent logo swap is driven from App.theme.apply(), which toggles
   .hidden on the inactive mark. MIGRATION_STEPS §0 sketched it as a pair of
   [data-theme] rules, but those cannot work in theme mode "system" — the mode
   REMOVES the attribute (CH-G2), so neither selector matches and both marks
   render. Doing it in the theme engine also keeps this sheet free of any
   theme selector, which the token contract requires (tokens own theming). */

/* CH-75 consumption (R-9), kept at CH-172 under D-419. A cited figure is a control, not
   decoration: it reads as part of the sentence but opens the cell it came from. Styled from
   tokens only — this sheet carries no theme selector (the token contract owns theming). The
   answer card these sat in was retired with "Ask the figures"; the chat panel renders them
   next (CH-175). */
.btn.cite {
  display: inline; padding: 0 var(--space-1); margin: 0;
  font-variant-numeric: tabular-nums; font-weight: var(--fw-medium);
  border: none; border-bottom: 1px dashed var(--brand); border-radius: 0;
  background: none; color: var(--text-primary);
}
.btn.cite:hover:enabled { background: var(--brand-weak); }
/* A figure whose source file predates the retained raw table cannot be opened. Shown as
   plain text rather than a dead control that looks clickable. */
.btn.cite:disabled { border-bottom-style: dotted; opacity: 1; cursor: default; }
.citedcell { background: var(--brand-weak); font-weight: var(--fw-medium); }

/* ---- hosted-surface additions (F2/CH-80) ----
   The only rules in this sheet that are NOT the ported original. Both exist because
   a browser is not a desktop window; both consume the semantic token layer only, and
   neither introduces a colour value or a theme selector (D-049 holds here exactly as
   it holds on the desktop sheet). */

/* D-073: the AI icon owns the upper-right corner and the theme toggle sits left of it.
   Reserved at the icon button's own footprint so that when F3 fills this slot nothing
   around it moves — a mount point that shifts the chrome when it is filled has not
   really reserved anything. Empty and aria-hidden until then. */
.f3-mount { width: 32px; height: 32px; flex: none; }

/* TS CH-175 · the chat panel (F3's R-1; D-073, D-131). Built to D-131 as ruled — Nathan's
   DIR-F3-12, "if i hate it its just a UX change" — and judged at close verification. It is an
   OVERLAY: fixed over the working surface, so opening it reflows nothing underneath, and the
   D-152/D-157 sidebar and the D-150 confirm columns measure exactly as they did. Tokens only,
   no theme selector (the token contract), so both themes come from the same rules. */
.f3btn[aria-expanded="true"] { background: var(--bg-selected); color: var(--text-primary); }
.f3panel {
  position: fixed; z-index: var(--z-overlay);
  top: calc(var(--topbar-h) + var(--space-2)); right: var(--space-4); bottom: var(--space-4);
  width: 440px; max-width: calc(100vw - 2 * var(--space-4));
  display: flex; flex-direction: column; min-height: 0;
  background: var(--bg-overlay); color: var(--text-primary);
  border: 1px solid var(--border-default); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.f3head {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border-subtle);
}
.f3title { font-weight: var(--fw-demibold); font-size: var(--fs-small); }
.f3head .btn { white-space: nowrap; }
.f3pick { flex: 1 1 auto; min-width: 0; }
.f3close { margin-left: auto; }
.f3flash:empty { display: none; }
.f3flash { padding: var(--space-2) var(--space-4) 0; }
.f3body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
/* History above the thread, capped, so a long history never pushes the conversation off. */
.f3history {
  flex: none; max-height: 132px; overflow-y: auto;
  padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--border-subtle);
  display: flex; flex-direction: column; gap: var(--space-1);
}
.f3threadrow {
  display: flex; gap: var(--space-3); align-items: baseline; width: 100%; text-align: left;
  padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: var(--fs-caption);
}
.f3threadrow:hover { background: var(--bg-hover); color: var(--text-primary); }
.f3threadrow.active { background: var(--bg-selected); color: var(--text-primary); }
.f3threadrow .f3q { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
                    white-space: nowrap; }
.f3thread {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  padding: var(--space-3) var(--space-4); display: flex; flex-direction: column;
  gap: var(--space-3);
}
.f3hint { margin: var(--space-2) 0; }
.f3msg { font-size: var(--fs-small); line-height: var(--lh-body); max-width: 100%; }
.f3you {
  align-self: flex-end; max-width: 85%; white-space: pre-wrap;
  background: var(--brand-weak); border: 1px solid var(--brand-weak-border);
  border-radius: var(--radius); padding: var(--space-2) var(--space-3);
}
.f3you.f3answer { background: none; border-style: dashed; color: var(--text-secondary); }
.f3ai { align-self: stretch; }
.f3ai .f3text { white-space: pre-wrap; }
.f3ai.streaming .f3text::after { content: "\2026"; color: var(--text-tertiary); }
.f3refused .f3text { color: var(--danger-text); }
.f3reads { font-size: var(--fs-caption); margin-bottom: var(--space-1); }
/* THE PARAPHRASE MARK (TS QUOTE-CHECK; D-601, D-052). The quoted span itself is NOT restyled —
   it is the source's own words and reads as the rest of the answer does — and the mark is the
   icon beside it, which IS the link to the passage (Nathan's ruling). Inline, baseline-aligned,
   and quiet: it sits inside a sentence, so anything heavier would read as an error badge on an
   answer that is correct. An exact quote carries no mark at all. */
.quotemark {
  padding: 0 2px; margin-left: 2px; border: 0; background: none; line-height: 1;
  vertical-align: baseline; color: var(--text-tertiary); cursor: pointer;
}
.quotemark svg { width: 13px; height: 13px; vertical-align: -2px; }
.quotemark:hover:enabled { color: var(--brand); }
.quotemark:disabled { opacity: 1; cursor: default; }
.f3figs { margin-top: var(--space-2); display: flex; flex-wrap: wrap; gap: var(--space-2);
          align-items: baseline; }
.f3done { display: flex; gap: var(--space-2); align-items: center; color: var(--ok-text); }
.f3done svg { width: 15px; height: 15px; }
/* THE PLAYBACK: the sentence above the card, the card in the register's own labels, and the
   three controls beneath (F3's R-10). */
.f3card {
  background: var(--bg-raised); border: 1px solid var(--border-default);
  border-radius: var(--radius); padding: var(--space-3);
}
.f3card:not(.state-open) { opacity: 0.8; }
.f3sentence { margin: 0 0 var(--space-3); font-weight: var(--fw-medium); }
.f3cardrows {
  display: grid; grid-template-columns: max-content 1fr; gap: var(--space-1) var(--space-3);
  margin: 0; font-size: var(--fs-caption);
}
.f3cardrows dt { color: var(--text-secondary); }
.f3cardrows dd { margin: 0; min-width: 0; overflow-wrap: anywhere; color: var(--text-primary); }
.f3controls { display: flex; gap: var(--space-2); margin-top: var(--space-3); flex-wrap: wrap; }
.f3state { margin: var(--space-2) 0 0; }
.f3confirm { margin-top: var(--space-2); display: flex; flex-direction: column;
             gap: var(--space-2); }
.f3composer {
  display: flex; gap: var(--space-2); align-items: flex-end;
  padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border-subtle);
}
.f3composer textarea { flex: 1 1 auto; min-width: 0; resize: vertical; }
/* F3's OQ-4, decided on first render: below the width where a 440px panel would cover most
   of the working surface anyway, the panel takes the whole width under the topbar, edge to
   edge, rather than floating a card with slivers of the page beside it. */
@media (max-width: 640px) {
  .f3panel {
    top: var(--topbar-h); right: 0; bottom: 0; left: 0; width: auto; max-width: none;
    border-radius: 0; border-left: none; border-right: none;
  }
}

/* Nothing else. Sign-out already exists on the Settings screen's Account card, which
   is where the mockup puts it and where the port leaves it. */

/* W-43. `.actionbar` was used by both confirm surfaces and defined by NEITHER stylesheet,
   so the row (primary button / reason select / free-text detail / Refuse) laid out as
   plain block-level children and the controls did not line up. Same flex treatment as
   .filterbar, centred rather than baseline-aligned because these are controls without
   captions above them, and `.grow` lets the refusal detail take the slack. */
.actionbar {
  display: flex; gap: var(--space-4); align-items: center; flex-wrap: wrap;
}
.actionbar .grow { flex: 1; min-width: 220px; }

/* W-20. A compact roster row: name and email share the first line, so a user costs two
   lines instead of three and the card survives a real list. */
.rowitem.compact { padding-top: var(--space-3); padding-bottom: var(--space-3); }
.rowitem .inline { display: flex; gap: var(--space-3); align-items: baseline; flex-wrap: wrap; }
.rowitem .inline .meta { font-size: var(--fs-caption); color: var(--text-secondary); }

/* W-27. A mutating control is disabled and visibly working while its request is in
   flight — the pattern lives in App.onMutate; this is what it looks like. */
.btn.busy, select.busy { opacity: 0.65; cursor: progress; }

/* W-28. The register a group of proposals will land in, in plain words. */
.regheading {
  margin: var(--space-5) 0 var(--space-3); font-size: var(--fs-small);
  text-transform: uppercase; letter-spacing: var(--tracking-caps);
  color: var(--text-tertiary); font-weight: var(--fw-demibold);
  /* DF-9 put this heading at the TOP of its own card and hung the per-card sweep off it, so it
     is a flex row now. `align-items: baseline` rather than `center`: the words and the caps
     caption beside them sit on one line of text, which centring would break by half a pixel
     down a long screen. First-child reset because a card's first heading needs no top margin. */
  display: flex; align-items: baseline; gap: var(--space-4);
}
.card > .regheading:first-child { margin-top: 0; }

/* DF-9 — a section that splits into cards is a GROUP, not a card: it carries the section's one
   heading and chip (the stepper is one step per section by R-15) and the cards sit inside it.
   Deliberately not `.card` itself — nesting a card in a card would draw two borders around one
   thing, and the section is a label for its cards rather than a surface of its own. */
.diffgroup { display: flex; flex-direction: column; gap: var(--space-5); }
.diffgroup > h2 { margin: 0; }

/* W-45. The taxonomy card's open row editor, so an in-place edit reads as one. */
.table tr.editing { background: var(--bg-inset); }

/* W-32. The engagement-file dropzone, sharing the audio dropzone's treatment (B-018). */
.filedrop {
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  padding: var(--space-4); text-align: center; color: var(--text-secondary);
  font-size: var(--fs-caption);
}
.filedrop.over { border-color: var(--accent); color: var(--text-primary); }

/* B-183. The agenda box takes a drop, so it says so while something is over it — the
   same `.over` signal the two file zones already use, on the control that is already
   there rather than a third widget wrapped around it. Nothing about the resting textarea
   changes: an operator who only ever pastes sees exactly what they saw before. */
#f-agenda.over { border-color: var(--accent); background: var(--brand-weak); }

/* B-104 / FB-3. The refusal, on the target rather than in a corner toast. Empty until
   something is refused, so the resting dropzone is unchanged; it does not auto-hide,
   because the whole defect was a message that had gone before it was looked at. */
.filedrop-note:empty { display: none; }
.filedrop-note {
  margin-top: var(--space-2); padding-top: var(--space-2);
  border-top: 1px solid var(--border);
  font-size: var(--fs-caption); text-align: left;
}
.filedrop-note.danger { color: var(--danger-text); }
.filedrop-note.warn { color: var(--warn-text); }

/* BB-4 (D-130) · the standing long-list pattern.
   The controls bar and the footer belong to the CARD, not to the page header: a filter
   that scrolled away from the table it filters leaves the reader looking at a subset with
   no visible reason. The register tabs put theirs in .pagehead (CH-C2) and are
   deliberately not converted in this chunk — they carry D-021 as-of time travel and an
   expandable history row, which is a different problem.
   flex-wrap per B-087's ruling: this bar is the second consumer of that pattern, and a
   filter you cannot reach is worse than a bar two lines tall. */
.listbar {
  display: flex; flex-wrap: wrap; gap: var(--space-5); align-items: flex-end;
  padding: var(--space-5) var(--space-5) 0;
}
.listbar .field { margin-bottom: 0; }
.listbar input[type="search"] { min-width: 240px; }

.listfoot {
  display: flex; flex-wrap: wrap; gap: var(--space-5); align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border-subtle);
}
.pager { display: flex; gap: var(--space-3); align-items: center; }

/* Sortable headers. The button carries the label so the whole thing is keyboard
   reachable and announces as a control; the th keeps aria-sort, which is what tells a
   screen reader which column is doing the ordering.

   B-102(7) / FB-27, two fixes here. The button is now a FLEX ROW holding the label and the
   sort mark, and `width: 100%` is gone: the mark used to be the button's SIBLING, so a
   full-width button left it nothing on the line and it wrapped underneath the heading —
   which is the arrow "wrapped beneath the text" that was reported. And the button no
   longer borrows `.linklike`, whose underline made sortable headings visibly a different
   treatment from the plain ones beside them in the same row. Both header kinds now render
   identically at rest, at one font size, and the affordance shows on hover and focus. */
.table th.sortable { padding: 0; }
.table th.sortable .sortbtn {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-4); text-align: left;
  font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit;
  /* The heading and its arrow are one unbreakable line — the defect this rule replaces. */
  white-space: nowrap;
}
.table th.sortable .sortbtn:hover { color: var(--text-primary); text-decoration: underline; }
.table th.sorted { color: var(--text-primary); }
.sortmark { color: var(--brand-text); }

/* B-102(6) / FB-26 · row actions sit SIDE BY SIDE. They stacked because the column they
   live in was `.c-open` — 80px, sized for a one-word "Open" link — and two real buttons
   ("Confirm file layout", "Generate mappings") cannot share 80px, so they wrapped. The
   column is content-sized rather than given a wider fixed width: `width: 1%` on a table
   column is the standing "shrink to fit" idiom, and with the cell refusing to wrap it
   resolves to exactly the two buttons plus their gap, at whatever the labels happen to be.
   A number here would have been a guess that survives until someone renames a button. */
.table .c-actions { width: 1%; white-space: nowrap; }
.table .rowactions { display: flex; gap: var(--space-3); align-items: flex-start; }
/* The cell holding it must refuse to wrap too, or the column's content-based width is
   computed from a wrapped layout and the buttons stack again inside a narrow column. */
.table .rowactions .btn { white-space: nowrap; }

/* Group bands. The header is a <th scope="rowgroup"> and is styled to read as a divider
   rather than as a row of data — it labels what follows, it is not part of it. It sits
   above the zebra striping deliberately: a band header wearing the even-row background
   looks like the first row of the band. */
.table tr.grouphead th {
  background: var(--bg-inset); color: var(--text-primary);
  font-size: var(--fs-caption); font-weight: var(--fw-demibold);
  text-align: left; padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  border-top: 1px solid var(--border-subtle);
  /* .table th uppercases and letter-spaces column headings. A band heading is a company
     NAME, not a column label — "CRANFIELD HOLDINGS" is a different string from the one
     the engagement is called, so both are unwound here rather than inherited. */
  text-transform: none; letter-spacing: normal;
}
.table tr.grouphead .gname { margin-right: var(--space-4); }
.table tr.grouphead .meta { font-weight: var(--fw-regular); }
.table tbody tr.grouphead:hover { background: none; }
/* TS AE: a client under its firm on the storage card. */
.table td.indent { padding-left: var(--space-7); }

/* The group-by control: a segmented row of toggle buttons, NOT a native select. The
   pressed one is the only filled button, so "which grouping is in force" survives a
   monochrome screenshot as well as a colour one. */
.segmented { display: flex; flex-wrap: wrap; gap: var(--space-2); }
/* B-102(3) / FB-25, the OTHER half of the reported specimen. The pills are deliberately
   compact (D-130 chose a segmented control, not a fourth dropdown), so they are shorter
   than the inputs beside them. In a bar that bottom-aligns its fields, shorter meant their
   text sat on a different centre line from SEARCH's — visible, and exactly what was
   reported. The band, not the button, is what matches: the group occupies one control
   height and centres its pills inside it, so every caption in the row starts at the same
   y and every control's centre line agrees, without inflating a control D-130 sized. */
.listbar .segmented, .filterbar .segmented {
  min-height: var(--control-h); align-items: center;
}
.segmented .btn.on {
  background: var(--accent-weak); border-color: var(--accent-weak-border);
  color: var(--accent-text);
}
/* A caption that LOOKS like a field label without being a <label> — the association is
   aria-labelledby, because the control it captions is a role="group" container and a
   <label for> cannot point at one. */
.flabel {
  display: block; font-size: var(--fs-micro); text-transform: uppercase;
  letter-spacing: var(--tracking-caps); color: var(--text-tertiary);
  font-weight: var(--fw-demibold); margin-bottom: var(--space-2);
}

/* TS F4-P3 · Edit project's Client access step (F4 R-6; mockup state 8). The step's own grid,
   locked like the Files table's so the four columns the picture draws line up whatever a row
   happens to hold — a name, a role, an address and a state are four different lengths. */
.client-access .table.lockcols .ca-name  { width: 21%; }
.client-access .table.lockcols .ca-role  { width: 15%; }
.client-access .table.lockcols .ca-email { width: 24%; overflow: hidden;
                                           text-overflow: ellipsis; white-space: nowrap; }
/* The two HELD words are sentences ("Will be invited when you save") and the others are one or
   two words, so the chip wraps here rather than running out of its column and over the control
   beside it — which is what the first shot of state 8b showed. A chip is an inline-flex box, so
   it has to be told both things. */
.client-access .table.lockcols .ca-state { width: 17%; }
.client-access .table.lockcols .ca-state .chip { display: inline-block; white-space: normal; }
/* Wide enough for the longest control the step offers ("Invite to Client library") AT THE
   POP-OUT'S WIDTH, which is narrower than a page: the first shot of state 8 came back with it
   wrapped to four lines inside a 12% column. */
.client-access .table.lockcols .ca-act   { width: 23%; text-align: right; }
.client-access .table.lockcols .ca-act .btn { white-space: nowrap; }

/* ============================================================================
   TS F4-P3 · Files, a folder browser over the project's two libraries
   (F4 v2.1 R-10; DIR-F4-12, DIR-F4-26, DIR-F4-32; D-052's mockup, states 1 to 7)
   ============================================================================
   BB-4's folder rail and its per-row move chooser are GONE from here, with the two axes
   DIR-F4-26 dropped: the rail was the only control that set a folder filter, and there is
   no folder filter any more — there is a folder you are standing in. What replaces them is
   below, drawn from the mockup and on tokens alone (D-049), so both themes come free. */

/* The bar under the page header: the Internal | Client switch, then the breadcrumbs. One
   row, wrapping at narrow widths rather than letting the crumbs push the switch off. */
.fbar {
  display: flex; align-items: center; gap: var(--space-5);
  flex-wrap: wrap; margin-bottom: var(--space-4);
}
.fcrumbs {
  display: flex; align-items: center; gap: var(--space-3);
  font-size: var(--fs-small); color: var(--text-secondary); min-width: 0;
}
.fcrumbs .sep { color: var(--text-tertiary); }
.fcrumbs b { color: var(--text-primary); font-weight: var(--fw-demibold); }

/* The search box lives in the page header's actions, beside New folder and Upload file. */
.fsearch {
  min-width: 18em; padding: var(--space-2) var(--space-4);
  font-size: var(--fs-small); color: var(--text-primary);
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius);
}
.fsearch:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -1px; }

/* A row's name: the icon, the control that opens it, and the lock where it is one of the
   project's own. The icon is drawn in CSS rather than fetched — it is a folder or a sheet of
   paper, and img-src 'self' makes a sprite a build step for two glyphs. */
/* The flex box is a wrapper INSIDE the cell and never the cell itself: `display: flex` on a
   <td> takes it out of table-cell layout, so `table-layout: fixed`'s percentage stops applying
   and the column sizes itself from its content — which is how the folder names came back
   clipped to eleven characters with the header above them in the wrong place. The same trap
   `.rowactions` is a wrapper for (FB-26), met again one column to the left. */
.f-namebox { display: flex; align-items: baseline; gap: var(--space-3); min-width: 0; }
.fname { text-align: left; min-width: 0; }
.fname.on { font-weight: var(--fw-demibold); }
/* The sprite's own glyphs — `i-files` is the folder this app already draws in the sidebar, and
   `i-doc` its document sibling, added here. Drawn from the sprite rather than from a clip-path
   so a folder on this screen is the same mark as a folder everywhere else in the product. */
.ficon { flex: none; display: inline-flex; color: var(--text-tertiary); }
.ficon svg { width: 16px; height: 16px; }
.flock { color: var(--text-tertiary); font-size: var(--fs-caption); }
.fwhere { margin-left: var(--space-2); }

/* The row menu (R-11, R-12, R-13). A disclosure of plain buttons revealed in place: no
   popup, so nothing has to be positioned and nothing escapes a scrolling table — the
   posture BB-4's move chooser took and D-133's reason for it. */
.fmenuwrap { position: relative; display: inline-flex; flex-direction: column;
             align-items: flex-end; }
.kebab {
  background: none; border: none; cursor: pointer; padding: 0 var(--space-2);
  color: var(--text-tertiary); font-weight: var(--fw-bold); letter-spacing: 1px;
}
.kebab:hover { color: var(--text-primary); }
.kebab:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.fmenu, .fmove {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: var(--space-2); margin-top: var(--space-3);
  padding: var(--space-3); background: var(--bg-inset);
  border: 1px solid var(--border-subtle); border-radius: var(--radius);
}
.fmenu .linklike.danger { color: var(--danger-text); }
.fmovewrap { display: flex; flex-direction: column; align-items: flex-start; }

/* A name typed in place (D-133: window.prompt is the one dialog the token palette cannot
   reach at all). Pinned to the page rather than the row, so a rename started at the foot of
   a long list is not scrolled out of view by its own appearance. */
.fname-edit {
  position: sticky; bottom: var(--space-5); z-index: 2;
  display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center;
  margin-top: var(--card-gap); padding: var(--space-4) var(--space-5);
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.fname-edit input { flex: 1; min-width: 12em; }

/* The viewer panel beside the list (state 6). The mockup's grid, and the frame fills what is
   left of the panel: Microsoft's viewer is the only thing in it, so a fixed height would
   either crop the document or leave a band of empty panel under it. */
.fsplit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
          gap: var(--card-gap); align-items: start; }
/* WITH THE PANEL OPEN the list is a third narrower, and the longest status is a sentence. It
   wraps here rather than being cut: a status clipped mid-word tells the reader less than one on
   two lines, and this is the only place the column is too tight for it. The full-width table —
   the common case, with no file open — keeps the one-line rule above. */
.fsplit .table.lockcols .f-status { white-space: normal; }
/* The chip is an inline-flex box, so the column's `white-space` alone does not reach its text:
   it has to be told to wrap, and to be a block that can take two lines. */
.fsplit .table.lockcols .f-status .chip { display: inline-block; white-space: normal; }
.fviewer {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); display: flex; flex-direction: column;
  overflow: hidden; min-height: 24rem;
}
.fviewer-head {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  padding: var(--space-3) var(--space-5); border-bottom: 1px solid var(--border-subtle);
  font-size: var(--fs-small);
}
.fviewer-name { min-width: 0; overflow: hidden; text-overflow: ellipsis;
                white-space: nowrap; }
.fviewer-acts { display: flex; align-items: center; gap: var(--space-3); flex: none; }
.fviewer-body { flex: 1; display: flex; min-height: 22rem; }
.fviewer-frame { flex: 1; width: 100%; min-height: 22rem; border: 0;
                 background: var(--bg-inset); }
/* Under the pane's own narrow width the panel goes below the list rather than squeezing the
   file names into two characters. */
@media (max-width: 1100px) {
  .fsplit { grid-template-columns: minmax(0, 1fr); }
}

/* ---- BB-5a · the redesigned confirm surface (D-129) ----
   W-34/35/36/42/43. Tokens only, no colour values and no theme selector — D-049 holds
   here exactly as it holds everywhere else in this sheet, so both themes come free.

   The colour key is NINE slots rendered as four hues plus grey in two treatments: a FILLED
   chip and an OUTLINED one. Two treatments rather than nine hues because nine hues that
   stay distinguishable in both themes do not exist in this palette, and because an outline
   survives greyscale and colour blindness where a ninth hue does not. Kinds that say the
   same sort of thing share a slot (the totals headline and every mismatch under it are one
   subject); the grouping is decided server-side in ingest/confirm.py FINDING_KEYS, so the
   tag beside a finding and the chip beside its rows cannot drift apart. */

.confirmhead {
  display: flex; align-items: center; gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.cbx-unit { max-width: 320px; }
.cbx-unit .cbx-popup { max-width: 420px; }

/* ---- D-149 + D-150: three collapsible columns ----

   W-34's split was a FIXED two-column grid, and D-149 ruled that the fixed split is the
   defect rather than the ratio: the page render and the transcription were stacked and both
   62 vh, so the transcription started below the fold and the comparison this screen exists
   for could not be made. Any fixed choice merely picks a different reader to disadvantage.

   Flex rather than grid, and that is the whole auto-width mechanism: `flex: N 1 0` shares
   the row in proportion, so collapsing a column to `flex: 0 0 auto` hands its width to
   whatever is left with no per-state rule and no width written down anywhere. A grid would
   have needed `grid-template-columns` restated for each of the collapse combinations —
   eight of them, and inline styles are barred here anyway (CSP `style-src 'self'`). */
/* B-099 / D-160: the row honors its CONTAINER, and this one declaration is the fix.
   `.page.view` is a grid, so this row is a GRID ITEM, and a grid item's `min-width: auto`
   floors it at its own min-content width. That floor was the 13-period P&L's table: the
   row measured 1606 px inside a 1193 px container, its flex children sat at their floor,
   and the 176 px the sidebar freed changed nothing because the row was still
   over-constrained afterwards (1606 inside 1369). Measured, both before and after, in
   _verify/F2_VF-2_fit.md.

   `min-width: 0` releases the floor, and the width then has somewhere to go: the row
   becomes exactly its container, the freed 176 px lands on it, and the table's overflow
   stops propagating upward — `.gridscroll` below absorbs it, which is D-160's "the flex
   floor becomes the SCROLL BOX, not its content". The rest of this file already spells
   the same idea `minmax(0, 1fr)` on its grids; this row is the one that was missed. */
.confirmcols {
  display: flex; align-items: stretch; gap: var(--space-5);
  min-width: 0;
  margin-bottom: var(--space-5);
}
.ccol {
  min-width: 0;
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5) var(--space-5);
}
/* The seed ratio is W-34's 4:6, kept so an untouched screen looks like the one the walk
   signed off. It is a starting proportion, not a split: the reader changes it by collapsing.
   `min-width: 0` on every column is what lets the grid inside one actually scroll rather
   than forcing its column wider than its share. */
.col-findings { flex: 4 1 0; }
.col-page, .col-grid { flex: 6 1 0; }
.col-findings .ccolbody { max-height: 62vh; overflow: auto; }

.ccolhead {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3); margin-bottom: var(--space-4);
}
.ccolname { color: var(--text-tertiary); font-size: var(--fs-caption);
            text-transform: uppercase; letter-spacing: .04em; }
.ccoltoggle {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: var(--space-7); height: var(--space-7); padding: 0;
  background: none; border: 1px solid transparent; border-radius: var(--radius-sm);
  color: var(--text-tertiary); cursor: pointer;
}
.ccoltoggle:hover { background: var(--bg-hover); color: var(--text-primary); }
.ccoltoggle:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; }
.ccoltoggle svg { width: 14px; height: 14px; transform: rotate(90deg); }

/* A collapsed column is a LABELLED rail, never a sliver — the label is what makes it a
   restore control rather than a mystery stripe, and it is a real button so the keyboard
   reaches it and a screen reader announces its collapsed state. D-150 rejected the
   draggable splitter partly on this: one dragged to zero leaves nothing to grab. */
.ccolrail {
  flex: 0 0 auto; width: var(--space-9); padding: var(--space-4) 0;
  display: flex; align-items: center; justify-content: center;
  font: inherit; color: var(--text-tertiary); cursor: pointer;
}
.ccolrail:hover { background: var(--bg-hover); color: var(--text-primary); }
.ccolrail:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; }
.raillabel {
  writing-mode: vertical-rl; text-orientation: mixed; white-space: nowrap;
  font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: .04em;
}

/* Below the app's minimum width the columns stack rather than squeezing the grid into a
   column of single words — W-34's original reason, unchanged. A rail stacked is a full
   -width bar: a 40 px vertical stripe across a phone-width screen is a scrollbar, not a
   control. */
@media (max-width: 1100px) {
  .confirmcols { flex-direction: column; }
  .ccol { flex: 1 1 auto; }
  .ccolrail { width: auto; padding: var(--space-3) var(--space-4); justify-content: flex-start; }
  .raillabel { writing-mode: horizontal-tb; }
}
.findingswrap > h2 {
  display: flex; align-items: baseline; gap: var(--space-3);
  font-size: var(--fs-h3); margin: 0 0 var(--space-3);
}

/* The persisted plain-language summary. Its absence is a sentence, not a blank: a unit
   with no summary and a unit whose summary is empty must not look the same. */
.summary {
  margin: 0 0 var(--space-5); color: var(--text-secondary);
  font-size: var(--fs-small); line-height: var(--lh-body);
  border-left: 2px solid var(--brand-weak-border); padding-left: var(--space-4);
}
.summary.absent { color: var(--text-tertiary); font-style: italic;
                  border-left-color: var(--border-default); }

.findinglist { display: flex; flex-direction: column; gap: var(--space-1); }
.finding {
  display: flex; gap: var(--space-3); align-items: flex-start; width: 100%;
  text-align: left; background: none; border: 1px solid transparent;
  border-radius: var(--radius); padding: var(--space-3) var(--space-3);
  font: inherit; font-size: var(--fs-small); color: var(--text-primary); cursor: pointer;
}
.finding:hover { background: var(--bg-hover); }
.finding:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; }
.finding.on { background: var(--bg-selected); border-color: var(--brand-weak-border); }
.finding.tone-warn .ftext { color: var(--warn-text); }
.finding.tone-ask .ftext { color: var(--text-primary); font-weight: var(--fw-demibold); }
.ftext { flex: 1 1 auto; line-height: var(--lh-body); }

/* The colour tag IS the cross-reference, so it is sized to be seen next to prose rather
   than to be decoration. */
.ftag {
  flex: none; width: 10px; height: 10px; margin-top: 3px;
  border-radius: var(--radius-xs); border: 1.5px solid transparent;
}
.ftag.none { border-color: var(--border-default); }

.promotion {
  margin: var(--space-2) 0 var(--space-4) var(--space-7);
  padding-left: var(--space-4); border-left: 2px solid var(--warn);
}
.promoterow {
  display: flex; align-items: center; gap: var(--space-3);
  margin-top: var(--space-3); font-size: var(--fs-small);
}

/* ---- BB-5b: the PDF lane's source page (D-141) ----
   Two stacked things in the right column: the page as the file draws it, and under it
   the transcription that was read off it. The callout above the page is the D-141
   surface — it names page and table because no coordinates exist to outline one with —
   so it is styled as a statement the eye lands on, not as a caption to skim past. */

.sourcepane {
  display: flex; flex-direction: column; gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.sourcepane .callout {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-2) var(--space-3);
  background: var(--accent-weak); border: 1px solid var(--accent-weak-border);
  border-radius: var(--radius); padding: var(--space-3) var(--space-4);
  font-size: var(--fs-small); color: var(--accent-text);
}
.sourcepane .callout .l { color: var(--text-tertiary); font-size: var(--fs-caption); }
.sourcepane .callout .t {
  flex: 1 1 100%; color: var(--text-tertiary); font-size: var(--fs-caption);
  line-height: var(--lh-body);
}
/* The stage is the measuring element: paintUnitPage reads its clientWidth and rasterizes
   to exactly that many CSS pixels times the display's own ratio, so the canvas below is
   fitted by max-width rather than by a number written down in two places. */
.pagestage {
  display: flex; justify-content: center; overflow: auto; max-height: 62vh;
  border: 1px solid var(--border-subtle); border-radius: var(--radius);
  background: var(--bg-inset); padding: var(--space-3);
}
/* No background declared, and that is deliberate rather than an omission: pdf.js paints
   the page opaque, white paper included, so a colour here would be this sheet inventing a
   value it has no token for (D-049) to sit underneath pixels that already cover it. */
.pagecanvas {
  max-width: 100%; height: auto; align-self: flex-start;
  box-shadow: var(--shadow-sm); border-radius: var(--radius-xs);
}
/* A page that is still drawing, absent, or refused says which in a sentence. A blank box
   that never resolves is indistinguishable from a page that rendered empty. */
.pagenote {
  margin: 0; padding: var(--space-5) var(--space-4);
  color: var(--text-tertiary); font-size: var(--fs-small); line-height: var(--lh-body);
  text-align: center;
}
.pagenote.warn { color: var(--warn-text); text-align: left; }

/* ---- the rendered unit ---- */

.gridwrap { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
/* D-160: THIS box is the floor. `overflow: auto` already makes it scrollable, but a
   scroll container still contributes its content's min-content size upward unless it is
   told not to — which is how a 19-column P&L came to widen every ancestor up to
   `.confirmcols` instead of simply scrolling. `min-width: 0` on the box and its wrapper
   is what makes "the table scrolls" true rather than "the table wins". */
.gridscroll { overflow: auto; min-width: 0; max-height: 62vh;
              border: 1px solid var(--border-subtle);
              border-radius: var(--radius); }
.unitgrid {
  border-collapse: separate; border-spacing: 0; width: 100%;
  font-size: var(--fs-caption); font-variant-numeric: tabular-nums;
}
.unitgrid th, .unitgrid td {
  border-bottom: 1px solid var(--border-subtle); padding: var(--space-2) var(--space-3);
  text-align: right; white-space: nowrap;
}
.unitgrid thead th {
  position: sticky; top: 0; z-index: 1; background: var(--bg-inset);
  border-bottom: 1px solid var(--border-default); vertical-align: bottom; cursor: pointer;
}
.unitgrid .gx {
  position: sticky; left: 0; z-index: 1; background: var(--bg-inset);
  text-align: left; color: var(--text-tertiary); font-weight: var(--fw-regular);
  cursor: pointer; min-width: 56px;
}
.unitgrid thead .gx.corner { z-index: 2; }
.unitgrid .gy .letter { display: block; color: var(--text-tertiary);
                        font-size: var(--fs-micro); font-weight: var(--fw-regular); }
.unitgrid .gy .hdr { display: block; color: var(--text-primary); }
.unitgrid .role-label, .unitgrid td.role-label { text-align: left; white-space: normal;
                                                 min-width: 180px; }
.unitgrid .role-unlabeled { color: var(--warn-text); }
.unitgrid tr.total td, .unitgrid tr.total .gx { font-weight: var(--fw-demibold); }

/* ---- D-148: the grid renders as financials ----

   The row carries the background rather than each cell, and that is load-bearing rather
   than tidiness: a long label spills right across the cells its row leaves EMPTY and must
   be cut off by the first one that is NOT, which is what a spreadsheet does. The stop is
   paint — a filled cell is opaque and sits a layer above — so `background: inherit` has to
   reach a real colour on the row. Zebra and selection therefore move up to the tr; a cell
   painting its own zebra would stop every carry-over dead in a total row. */
.unitgrid tbody tr { background: var(--bg-surface); }
.unitgrid tbody tr.total { background: var(--bg-zebra); }

/* Accounting negatives (D-148 clause 1): parenthesised by the formatter, red here. Colour
   is the second signal, never the only one — the parentheses survive a monochrome print
   and a reader who does not separate red from black. */
.unitgrid td.neg { color: var(--danger-text); }

/* Clause 4's gutter: which label column each row's name was read from. Dim because it is
   evidence rather than content, present because indentation alone would show the
   conclusion and hide what it was derived from. */
.unitgrid .srccol, .unitgrid td.srccell {
  width: 1%; text-align: center; color: var(--text-tertiary);
  font-size: var(--fs-micro); padding-left: var(--space-2); padding-right: var(--space-2);
}

/* Clause 5, Excel's carry-over. The label is taken OUT OF FLOW so the column keeps its
   width and the text overhangs it — left in flow, `nowrap` would simply grow the column
   and wrapping would give back the three- and four-line rows the ruling exists to remove.
   Absolute positioning is relative to the cell's PADDING box, so `left` restates the
   indent the depth classes below apply as padding.

   `pointer-events: none` is the clause the ruling names: the overhang is painted over the
   neighbouring cells, and hit-testing must fall THROUGH it to whichever cell the reviewer
   is actually pointing at, or the carry-over would quietly steal clicks from D-129's
   region highlight — the one interaction this whole screen is built around. */
.unitgrid td.account { position: relative; --indent: var(--space-3); }
.unitgrid td.account .lbl {
  position: absolute; left: var(--indent); top: var(--space-2);
  white-space: nowrap; pointer-events: none;
}
/* The truncation. `spillstop` is set on the first non-empty cell of the row and on every
   cell after it, so the carry-over is cut off there and cannot reappear in a later gap —
   which is what a mask on the filled cell alone did, painting over the middle of a word
   and leaving its tail showing two columns to the right. */
.unitgrid td.spillstop { position: relative; z-index: 1; background: inherit; }

/* Indent by label column: the file encodes section depth this way, so the render does
   too rather than flattening a shape the reviewer is being asked to vouch for. Both
   declarations come from ONE depth class — the padding sizes the cell, the custom property
   places the overhanging label at the same offset, so the two cannot drift apart. */
.unitgrid td.d1 { padding-left: var(--space-6); --indent: var(--space-6); }
.unitgrid td.d2 { padding-left: var(--space-8); --indent: var(--space-8); }
.unitgrid td.d3 { padding-left: var(--space-9); --indent: var(--space-9); }
.unitgrid td.d4 { padding-left: var(--space-10); --indent: var(--space-10); }

/* The active highlight: the one strong layer, over the passive chips. */
.unitgrid tbody tr.hot { background: var(--bg-selected); }
.unitgrid tr.hot > .gx,
.unitgrid td.hot, .unitgrid th.hot { background: var(--bg-selected); }
.unitgrid th.hot { box-shadow: inset 0 -2px 0 0 var(--brand); }

.keystrip { display: inline-flex; gap: 2px; margin-left: var(--space-2); vertical-align: middle; }
.kchip { display: inline-block; width: 6px; height: 6px; border-radius: 1px;
         border: 1.5px solid transparent; }

/* Banner and footer are text the file carried outside the grid, with no row numbers to be
   drawn at — so they are bands, and a finding about them highlights the band. */
.gridband {
  display: flex; gap: var(--space-4); align-items: baseline; cursor: pointer;
  padding: var(--space-3) var(--space-4); border-radius: var(--radius);
  background: var(--bg-inset); font-size: var(--fs-caption);
}
.gridband.hot { background: var(--bg-selected); }
.gridband .l { color: var(--text-tertiary); flex: none; }
.gridband .t { color: var(--text-secondary); }

/* ---- the nine colour slots ---- */
.ftag.k1, .kchip.k1 { background: var(--info); }
.ftag.k2, .kchip.k2 { background: var(--text-tertiary); }
.ftag.k3, .kchip.k3 { background: var(--ok); }
.ftag.k4, .kchip.k4 { background: var(--warn); }
.ftag.k5, .kchip.k5 { background: var(--danger); }
.ftag.k6, .kchip.k6 { border-color: var(--warn); }
.ftag.k7, .kchip.k7 { border-color: var(--text-tertiary); }
.ftag.k8, .kchip.k8 { border-color: var(--info); }
.ftag.k9, .kchip.k9 { border-color: var(--ok); }

/* ---- W-43's action bar ---- */
.actionbar-sticky {
  position: sticky; bottom: 0; z-index: var(--z-sticky);
  margin-bottom: 0; box-shadow: 0 -2px 8px var(--bg-scrim);
}
.actionbar .barspace { flex: 1 1 auto; }
/* The refusal free-text on its OWN row, full width. It used to share the bar and carried
   class "mini" (`input.mini { width: 5em }`), which squeezed the refuse flow's only
   feedback field to the placeholder fragment "What di". A row of its own cannot be
   squeezed by what sits beside it. */
.actionbar.detailrow { margin-top: var(--space-3); }
.actionbar.detailrow .grow { width: 100%; }

/* ---- the file-level strip ---- */
.filesays .factstrip { display: flex; flex-wrap: wrap; gap: var(--space-5) var(--space-8); }
.filesays .fact { display: flex; flex-direction: column; gap: var(--space-1); }
.filesays .fact .l { color: var(--text-tertiary); font-size: var(--fs-caption);
                     text-transform: uppercase; letter-spacing: var(--tracking-caps); }

/* F9/CH-106. The live indicator on the Run screen. It animates only while the poll is
   painting, so it cannot outlive the thing it claims is happening — a spinner that keeps
   spinning over a dead process is worse than none, which is the state the exit drive
   found the Run screen in. */
.pulse {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 8px; background: var(--accent); vertical-align: middle;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

/* F10 CH-112 — the selection card's block list. A list that reads as sentences rather
   than as bullets: each line is "Title — why it was selected (N cited turns)", which is
   prose with a lead-in, not an enumeration of options. The bullet would imply the reader
   has something to choose between, and this card is the one place on the review screen
   with nothing to decide (D-265: there is no per-item approval queue). */
.plainlist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.plainlist > li { line-height: var(--lh-body); }

/* F10 CH-114 · the admin Blocks card's preset picker. Shaped on `.attendees` above rather
   than given its own geometry: both are "a set of things you tick", and a second layout for
   the same affordance is how two screens come to disagree about what a checkbox looks
   like. */
.checkrow { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); margin-top: var(--space-2); }
.blockcheck {
  display: flex; gap: var(--space-2); align-items: center;
  font-size: var(--fs-caption); color: var(--text-secondary); margin-bottom: 0;
}
.blockcheck input { accent-color: var(--brand); width: 14px; height: 14px; flex: none; }

/* F15 · the recap edited on its meeting page (TS CH-179; R-12). Built from the mockup's own
   vocabulary — the row, the chip, the notice, the button — and the chat's playback card
   (`.f3card`), so one protocol has one look (D-249). A selectable line is keyboard-reachable
   and its selection is VISIBLE: the brand's weak fill and a focus-coloured rule at its edge. */
.recap-version { display: flex; gap: var(--space-2); align-items: center; }
.recap-publish { display: flex; gap: var(--space-3); align-items: center; }
.recap-publish .grow { flex: 1; }
.selectable { cursor: pointer; border-radius: var(--radius); }
.selectable:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.selectable.selected {
  background: var(--brand-weak); box-shadow: inset 3px 0 0 var(--border-focus);
}
.card > .selectable { padding: var(--space-2); margin: calc(-1 * var(--space-2)); }
.recap-extras { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center;
                margin-top: var(--space-2); }
.recap-box {
  display: flex; flex-direction: column; gap: var(--space-2);
  margin: var(--space-2) 0 var(--space-3); padding: var(--space-3);
  border: 1px solid var(--border-default); border-radius: var(--radius);
  background: var(--bg-surface);
}
.recap-instruction {
  width: 100%; min-height: 56px; resize: vertical; font: inherit;
  padding: var(--space-2); border: 1px solid var(--border-default); border-radius: var(--radius);
  background: var(--bg-raised); color: var(--text-primary);
}
.recap-thread:empty, .recap-cardslot:empty { display: none; }
.recap-card .recap-refused { color: var(--danger-text); }
.recap-refusal { margin-top: var(--space-2); }

/* ===================== TS Packet U · F17 UAT feedback capture (R-1, R-7, R-12) =====================
   The binding mockup's new components (specs/F17_mockup_v1.html, D-052), on the semantic token layer
   only. Two changes from the mockup, both forced by the product rather than chosen: the layer and the
   form are FIXED to the viewport (the mockup's frame is a scrolling page, so it drew them absolute), and
   the form stacks one step above the layer so the one thing the layer must not swallow is reachable.
   The layer sits above every modal and below the toast host (R-1). */

/* [A] the capture toggle — an iconbtn in the sidebar foot beside the theme toggle */
.iconbtn.capturebtn[aria-pressed="true"] { background: var(--accent-weak); color: var(--accent-text);
  box-shadow: inset 0 0 0 1px var(--accent-weak-border); }

/* the capture layer — fixed, full viewport, the target of every pointer event while on */
.uat-layer { position: fixed; inset: 0; z-index: calc(var(--z-modal) + 1); cursor: crosshair; }
.uat-banner { position: absolute; top: calc(var(--topbar-h) + var(--space-4)); left: 50%;
  transform: translateX(-50%); display: flex; gap: var(--space-4); align-items: center;
  background: var(--bg-overlay); border: 1px solid var(--accent-weak-border); color: var(--text-primary);
  border-radius: var(--radius-pill); padding: var(--space-2) var(--space-5); box-shadow: var(--shadow);
  font-size: var(--fs-small); pointer-events: none; }
.uat-banner kbd { font-size: var(--fs-micro); }
/* [B] the highlight — element hover/selection, and a dragged region */
.uat-hl { position: absolute; border: 2px solid var(--border-focus); background: var(--accent-weak);
  border-radius: var(--radius-sm); pointer-events: none; }
.uat-hl.region { border-style: dashed; }
.uat-hl .uat-tag { position: absolute; left: -2px; top: -22px; background: var(--accent);
  color: var(--on-accent); font-size: var(--fs-micro); padding: 1px var(--space-3);
  border-radius: var(--radius-xs); white-space: nowrap; font-family: var(--font-mono); }
/* [C] the comment form — a popover card anchored beside the selection */
.uat-form { position: fixed; z-index: calc(var(--z-modal) + 2); width: 380px; max-height: calc(100vh - 2 * var(--space-6));
  overflow: auto; background: var(--bg-overlay); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: var(--space-6);
  display: grid; gap: var(--space-4); }
.uat-form h2 { margin: 0; font-size: var(--fs-h4); }
.uat-form .uat-where { font-size: var(--fs-caption); color: var(--text-tertiary); font-family: var(--font-mono);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uat-form .uat-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.uat-form .uat-count { font-size: var(--fs-micro); color: var(--text-tertiary); text-align: right; margin-top: var(--space-1); }
.uat-form .uat-actions { display: flex; gap: var(--space-3); justify-content: flex-end; }
.uat-shot { border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--bg-inset);
  display: block; width: 100%; height: auto; }
/* A real picture of a small selection is a few dozen pixels tall; stretched to the card's width it
   would push the form off the window. Contained, at most a band of the viewport, it keeps the short
   thumbnail the mockup draws.
   TS WALK2-FIX (B-417 F1): and NEVER scaled up — `width: auto` with `max-width: 100%` caps it at its
   natural size, so a small selection reads as the short strip at true scale the mockup draws, where
   `width: 100%` enlarged it up to ~4x, blurred, to the card's width. A large one still shrinks to fit. */
img.uat-shot { object-fit: contain; width: auto; max-width: 100%; max-height: 24vh; }
.uat-expand img.uat-shot { max-height: 40vh; }
.uat-walk { display: flex; align-items: center; gap: var(--space-3); font-size: var(--fs-small);
  color: var(--text-secondary); flex-wrap: wrap; }
.uat-walk b { color: var(--text-primary); }
.uat-walk svg { width: 16px; height: 16px; }
/* [F] a row's expansion — screenshot beside history */
.uat-expand { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--space-6);
  padding: var(--space-3) 0; }
.uat-expand h4 { margin: 0 0 var(--space-3); font-size: var(--fs-micro); text-transform: uppercase;
  letter-spacing: var(--tracking-caps); color: var(--text-tertiary); }
.uat-kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-5);
  font-size: var(--fs-small); margin-top: var(--space-4); }
.uat-kv dt { color: var(--text-tertiary); }
.uat-kv dd { margin: 0; font-family: var(--font-mono); font-size: var(--fs-caption); word-break: break-all; }
.uat-ev { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-4);
  font-size: var(--fs-small); }
.uat-ev .when { color: var(--text-tertiary); font-size: var(--fs-caption); white-space: nowrap; }
.uat-ev .note { color: var(--text-secondary); font-style: italic; }
.chip.sev-blocker { border-color: var(--danger); color: var(--danger-text); background: var(--danger-weak); }
.chip.sev-high { border-color: var(--warn); color: var(--warn-text); background: var(--warn-weak); }
.uat-comment { max-width: 42ch; }
/* [I] the Settings switch card */
.uat-switchnote { font-size: var(--fs-small); color: var(--text-secondary); margin: var(--space-4) 0 0; }
.uat-last { font-size: var(--fs-caption); color: var(--text-tertiary); margin-top: var(--space-3); }

/* ============================ TS W · THE POP-OUT (D-491 (1)) ============================
   Every wizard opens over the page on a scrim — firm, client, project, add user, both Edit
   paths and the lane wizards. The wizard card is unchanged inside it: stepper, body, footer. */
.popout-scrim {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: flex; align-items: flex-start; justify-content: center;
  padding: var(--space-8) var(--space-4); overflow-y: auto;
  background: var(--bg-scrim);
}
.popout { width: min(720px, 100%); }
.popout > .card.wizard { margin: 0; box-shadow: 0 12px 40px var(--bg-scrim); }
/* The scrim scrolls a tall wizard (the lane step); the body never scrolls on its own, which
   would scroll a focused field over the text above it. A note inside a step sits in the flow,
   not tucked up under a card head the way a card's own note is. */
.popout .wizard .wizard-body .cardnote { margin: 0 0 var(--space-4); }
.popout .wizard .wizard-body .filterbar + .cardnote { margin-top: var(--space-4); }
@media (max-width: 640px) {
  .popout-scrim { padding: var(--space-4) var(--space-3); }
}

/* ============================ TS W · LANES, USERS, ADMIN ROWS ============================ */
/* The context block, shown wherever a lane is configured (D-489 (5)): the definition routing
   reads, set off as a quotation so it reads as the lane's own words. */
.lane-block {
  margin: var(--space-3) 0 0; padding: var(--space-3) var(--space-4);
  border-left: 3px solid var(--border-strong); border-radius: 0;
  background: var(--bg-inset); color: var(--text-primary);
}
.lane-block p { margin: var(--space-2) 0 0; white-space: pre-wrap; font-size: var(--fs-small); }
.lane-block-label {
  display: block; color: var(--text-tertiary); font-size: var(--fs-caption);
  text-transform: none; letter-spacing: 0;
}
.lane-row { align-items: flex-start; }
.lane-row .body { min-width: 0; }
.lane-supplement { margin-top: var(--space-3); }
.lane-supplement .sub { white-space: pre-wrap; }
.lane-sponsor { margin-top: var(--space-3); }
.lane-actions { flex: 0 0 auto; }
.lane-edit { display: grid; gap: var(--space-3); min-width: min(420px, 60vw); }
.lane-step .card { margin-bottom: var(--space-4); }
.lane-step textarea, [data-card="create-project-lane"] textarea { width: 100%; }

/* Client and project buttons in fixed slots, right-aligned, so Edit sits over Edit and Delete
   over Delete (D-491 (4), Nathan's choice "A"). */
.client-block { border-bottom: 1px solid var(--border-default); padding-bottom: var(--space-3); }
.client-block:last-child { border-bottom: 0; }
.client-block > .rows.nested { margin-left: var(--space-7); }
.admin-actions { display: flex; gap: var(--space-3); justify-content: flex-end; align-items: center;
  flex: 0 0 auto; margin-left: auto; }
.admin-actions .slot { display: inline-flex; justify-content: flex-end; }
.admin-actions .slot-edit { min-width: 4.5rem; }
.admin-actions .slot-delete { min-width: 5.5rem; }
.admin-actions .slot-create:empty { display: none; }

/* Users & access (D-491 (6)): the list selects the user the two panes below follow. */
.users-card tbody tr { cursor: pointer; }
.users-card tbody tr.selected, .rowitem.pick.selected { background: var(--bg-selected); }
.rowitem.pick { cursor: pointer; }
.users-card .mono { font-family: var(--font-mono); font-size: var(--fs-caption); }
.user-panes { align-items: start; }
.lane-block p.folded {
  display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden;
}
.lane-block .linklike { margin-top: var(--space-2); }

/* ================================ TS X · DEFINITIONS, CONTACTS ================================ */
/* An on-screen definition (D-498): PRINTED on a screen that asks, with its X; after the X, or on
   a screen that only displays the term, an info icon in the same place that opens the same words.
   The words come from the server (`boardnotes.definitions`); nothing here restates them. */
.definitions { display: grid; gap: var(--space-3); margin: 0 0 var(--space-4); }
.definitions:empty { display: none; }
.definition-card {
  display: flex; align-items: flex-start; gap: var(--space-4);
  padding: var(--space-4) var(--space-5); border: 1px solid var(--accent-weak-border);
  border-radius: var(--radius); background: var(--accent-weak); color: var(--text-primary);
}
.definition-body { min-width: 0; flex: 1 1 auto; }
.definition-text { margin: 0; font-size: var(--fs-small); line-height: 1.5; }
.definition-why { margin: var(--space-3) 0 0; font-size: var(--fs-small); color: var(--text-secondary); }
.definition-x {
  flex: 0 0 auto; border: 0; background: transparent; color: var(--accent-text);
  font-size: 1.25rem; line-height: 1; padding: var(--space-1) var(--space-2); cursor: pointer;
  border-radius: var(--radius-sm);
}
.definition-x:hover { background: var(--accent-weak-border); }
.definition-icon {
  display: inline-flex; align-items: center; gap: var(--space-3);
  border: 0; background: transparent; color: var(--accent-text); padding: var(--space-1) 0;
  font-size: var(--fs-small); cursor: pointer;
}
.definition-icon .g {
  display: inline-grid; place-items: center; width: 1.15rem; height: 1.15rem;
  border: 1.5px solid currentColor; border-radius: var(--radius-pill);
  font-size: 0.75rem; font-weight: 700; font-style: italic; font-family: Georgia, serif;
}
.definition-icon:hover span:last-child { text-decoration: underline; }
.definition-pop {
  margin-top: var(--space-2); padding: var(--space-4) var(--space-5);
  border: 1px solid var(--border-default); border-radius: var(--radius);
  background: var(--bg-inset); max-width: 64ch;
}
.definitions .definition[data-state="icon"] { display: block; }
.definitions:has(> .definition[data-state="icon"]) { gap: var(--space-2); }

/* A project's Contacts (D-493, D-496): the list and its add row, on the wizard and Edit project. */
.contacts .rows { margin-bottom: var(--space-4); }
.contact-row { align-items: flex-start; }
.contact-row .body { min-width: 0; flex: 1 1 auto; }
.contact-row input { max-width: 320px; }
.contacts-add { border-top: 1px solid var(--border-default); padding-top: var(--space-4); }
.contacts-add h3 { margin: 0 0 var(--space-3); }
@media (max-width: 640px) {
  .contact-row { flex-wrap: wrap; }
  .contact-row input { max-width: none; }
}

/* TS Y (D-500 (10)): each client's "Users assigned to this client" block — a heading with the
   client beside it, then its users as rows in the Users & access panes' style. */
.client-users-block > .inline { display: flex; gap: var(--space-3); align-items: baseline; flex-wrap: wrap; }
.client-users-block + .client-users-block { margin-top: var(--space-6); }

/* TS F20-P1 (D-521 (3) to (7)): an item's title line — a fixed narrow flag slot on the left,
   the title, which wraps, and the transcript pill at the right end. */
.titleline { display: flex; align-items: flex-start; gap: var(--space-2); }
.titleline .tl-flag { flex: none; width: 14px; height: 1.4em; display: inline-flex; align-items: center;
  color: var(--warn); }
.titleline .tl-flag svg { width: 12px; height: 12px; }
.titleline .tl-title { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.titleline .tl-title > h2 { margin: 0; }
.titleline .tl-spans { flex: none; margin-top: 0; margin-left: auto; justify-content: flex-end; }

/* TS F20-P1 · the Inbox (F20 R-7 to R-18, R-22, R-28, R-36, R-37) — mockup v2 (sha256 6ed0f90d…)
   and the locked sketch, on the product's semantic tokens. One grid for every row of every
   section, so each shared column sits above and below the same column of the neighbouring one. */
.ibx-proj { display: grid; gap: var(--space-4); }
.ibx-proj h2 { margin: 0; display: flex; align-items: baseline; gap: var(--space-3); }
.ibx-proj .client { color: var(--text-tertiary); font-size: var(--fs-caption); font-weight: var(--fw-regular); }
.ibx-proj .total { margin-left: auto; }
.ibx-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); }
.ibx-counts > div { border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: var(--space-2) var(--space-3);
  background: var(--bg-inset); }
.ibx-counts .n { font-size: var(--fs-h3); font-weight: var(--fw-bold); line-height: var(--lh-tight); }
.ibx-counts .n.zero { color: var(--text-disabled); }
.ibx-counts .k { font-size: var(--fs-micro); color: var(--text-tertiary); text-transform: uppercase;
  letter-spacing: var(--tracking-caps); font-weight: var(--fw-demibold); }
.ibx-others { font-size: var(--fs-caption); color: var(--text-secondary); }
.ibx-stats { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--card-gap); }
.ibx-stats .stat { padding: var(--space-4) var(--space-5); cursor: pointer; text-align: left; }
.ibx-stats .stat .sub { margin-top: var(--space-2); font-size: var(--fs-micro); color: var(--text-tertiary); line-height: 1.5; }
.ibx-rows { display: grid; gap: var(--card-gap); margin-top: var(--card-gap); }
.ibx-sec > h2 .count, .dir-sub h3 .count { margin-left: var(--space-2); }
/* D-555: a section's heading collapses and expands it; collapsed, its name and its count and
   nothing else; a section turned off reads Off beside its name while collapsed (D-557). */
.ibx-sec > h2 { cursor: pointer; user-select: none; }
/* TS WALK2-B (F20 R-38, D-574): Accept all at the right of a section's heading, and its in-page
   confirm under the heading — the question, then Accept all and Cancel; no browser dialog. */
.ibx-sec > h2 { display: flex; align-items: center; }
.ibx-sec > h2 .ibx-allbtn { margin-left: auto; font-size: var(--fs-caption); }
.ibx-sec.collapsed > h2 .ibx-allbtn, .ibx-sec.collapsed > .ibx-allconfirm { display: none; }
.ibx-allconfirm { display: flex; align-items: center; gap: var(--space-2); margin: var(--space-2) 0;
  padding: var(--space-2) var(--space-3); border: 1px solid var(--border-strong);
  border-radius: var(--radius); background: var(--bg-inset); font-size: var(--fs-small); }
.ibx-allconfirm .q { margin-right: auto; color: var(--text-primary); font-weight: var(--fw-medium); }
.ibx-sec > h2 .ibx-chev { display: inline-block; width: 1.1em; color: var(--text-tertiary); font-size: var(--fs-small); }
.ibx-sec > h2 .ibx-chev::before { content: "▾"; }
.ibx-sec.collapsed > h2 .ibx-chev::before { content: "▸"; }
.ibx-sec.collapsed > :not(h2) { display: none !important; }
.ibx-sec.collapsed > h2 { margin-bottom: 0; }
.ibx-sec > h2 .ibx-offchip { margin-left: var(--space-2); font-weight: var(--fw-medium); }
.ibx-sec:not(.collapsed) > h2 .ibx-offchip { display: none; }
.ibx-grp { font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: var(--tracking-caps);
  color: var(--text-tertiary); font-weight: var(--fw-demibold); margin: var(--space-5) 0 var(--space-1);
  display: flex; align-items: center; gap: var(--space-3); }
.ibx-grp.flush { margin-top: 0; }
.ibx-grp .count { background: var(--bg-inset); color: var(--text-secondary); border: 1px solid var(--border-default); }
.ibx-grp.fold { cursor: pointer; border-top: 1px solid var(--border-subtle); padding-top: var(--space-4); }
.ibx-grp.fold::before { content: "▸"; font-size: var(--fs-caption); }
.ibx-grp.fold.open::before { content: "▾"; }
.ibx-was { border: 1px solid var(--border-subtle); border-radius: var(--radius); background: var(--bg-inset);
  padding: var(--space-3) var(--space-4); }
.ibx-was .reg { font-size: var(--fs-micro); color: var(--text-tertiary); text-transform: uppercase; letter-spacing: var(--tracking-caps); }
.ibx-was .line { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.ibx-was .title { font-weight: var(--fw-medium); color: var(--text-primary); }
.ibx-was .meta { font-size: var(--fs-caption); color: var(--text-tertiary); margin-top: var(--space-2);
  display: flex; gap: var(--space-4); flex-wrap: wrap; align-items: center; }
.ibx-was .meta b { color: var(--text-secondary); font-weight: var(--fw-medium); }
.pill-conf { min-width: 0; }
.pill-conf.hi { background: var(--ok-weak); color: var(--ok-text); border-color: var(--brand-weak-border); }
.pill-conf.md { background: var(--accent-weak); color: var(--accent-text); border-color: var(--accent-weak-border); }
.pill-conf.lo { background: var(--warn-weak); color: var(--warn-text); border-color: var(--warn); }
.ph { background: var(--warn-weak); color: var(--warn-text); border-radius: var(--radius-xs); padding: 0 var(--space-2); font-weight: var(--fw-medium); }
.decided-by { font-size: var(--fs-caption); color: var(--text-secondary); }
.decided-by b { color: var(--text-primary); }
.ibx-foot { position: sticky; bottom: 0; display: flex; align-items: center; gap: var(--space-5); margin-top: var(--card-gap);
  background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: var(--space-4) var(--space-6); }
.ibx-foot .sum { color: var(--text-secondary); font-size: var(--fs-small); }
.ibx-foot .btn.primary { margin-left: auto; }
.ibx-shape { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); margin-top: var(--space-3); }
.ibx-shape .field label { font-size: var(--fs-micro); }
.ibx-shape input { width: 100%; }
.ibx-person { font: inherit; font-size: var(--fs-caption); margin-top: var(--space-1); }
/* TS WALK2-B (F20 R-39, D-571): a proposed contact's fields before Accept — one row of labelled
   fields in the new-metric shape's own voice, the middle initial narrow, the checkbox and Save at
   its end; it wraps on a narrow window rather than overflowing. */
.ibx-contact { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-2) var(--space-3);
  padding: var(--space-3); border: 1px solid var(--border-subtle); border-radius: var(--radius);
  background: var(--bg-inset); }
.ibx-contact .field { flex: 1 1 140px; min-width: 0; }
.ibx-contact .field.mi { flex: 0 0 104px; }
.ibx-contact .field label { white-space: nowrap; }
.ibx-contact .field label { font-size: var(--fs-micro); }
.ibx-contact input.ibx-cf-in { width: 100%; }
.ibx-contact .cbx-typeahead { min-width: 0; width: 100%; }
/* The Directory's contact Edit (R-39): first, middle initial and last name on one line. */
tr.dir-editing td.dir-names { min-width: 260px; }
tr.dir-editing .dir-company .cbx-typeahead { min-width: 0; width: 100%; max-width: 240px; }
.dir-names .ibx-cf-flag { white-space: nowrap; margin-top: var(--space-2); }
.dir-names .dir-name-row { display: flex; gap: var(--space-2); }
.dir-names .dir-name-row input { flex: 1 1 0; min-width: 0; }
.dir-names .dir-name-row input.dir-mi { flex: 0 0 52px; }
.dir-names .field { margin-top: var(--space-2); }
/* TS WALK2-B (F20 R-40, D-573): the Note — a collapsed line in the quote's reveal shape, the text
   beneath it in the quote's own box; the box and its buttons while writing. The register row's note
   where the row opens. */
.ibx-note-line { font-size: var(--fs-small); }
/* TS WALK2-B (F20 R-42): a quoted turn and its speaker, in the quote's box. */
.ibx-quote-turns { display: grid; gap: var(--space-1); }
.ibx-qt { display: flex; gap: var(--space-2); align-items: baseline; }
.ibx-qt .who { flex: none; font-weight: var(--fw-demibold); color: var(--text-primary); font-style: normal; }
.ibx-qt .who.ph { font-weight: var(--fw-medium); color: var(--warn-text); }
.ibx-note-text { display: flex; gap: var(--space-3); align-items: baseline; white-space: pre-wrap; }
.ibx-note-text .linklike { margin-left: auto; flex: none; }
/* TS EXTRACTOR rider (D-394; Nathan 2026-11-02): the Note editor is laid out FULL WIDTH and
   ONE TEXT LINE HIGH at open, with more air above the box and below it, and the resize handle
   kept. `max-width: 720px` is dropped on both: it is what held the box off the row's full
   width wherever the row is wider than that.

   `min-height: 0` is the load-bearing line. The shell's global rule is
   `textarea { ... min-height: 64px; }`, which is about four text lines — so EVERY note box
   opened multiple lines high no matter what its `rows` attribute said, and setting rows="1"
   alone would have changed nothing. `resize: vertical` is inherited from that same global
   rule and deliberately NOT overridden: "it already has the ability to expand which is great,
   leave that".

   The gap carries his two spacing asks — between the word "Note" and the top of the box, and
   between the bottom of the box and the Save note / Cancel buttons. It is ONE grid gap, so
   both are the same, and 8px against the previous 4px is "a little more space". The exact
   value is this session's engineering choice, which the packet leaves open. */
.ibx-note-edit { display: grid; gap: var(--space-3); }
.ibx-note-in, .reg-note-in { width: 100%; font: inherit; min-height: 0; }
.reg-note { display: grid; gap: var(--space-3); margin: var(--space-2) 0; }
/* The Directory row's note opens in a strip of its own below the row, spanning every column,
   because the actions cell it used to open inside is as narrow as that column — which is the
   "narrow box on the right side" his directive names. */
.dir-noterow > td { padding-top: 0; }
.dir-noterow .reg-note { max-width: none; margin: 0 0 var(--space-3); }
.reg-note-k { font-size: var(--fs-micro); color: var(--text-tertiary); text-transform: uppercase;
  letter-spacing: var(--tracking-caps); font-weight: var(--fw-demibold); }
.ibx-cf-flag { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--fs-small);
  color: var(--text-primary); padding-bottom: var(--space-2); }
.dir-sub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--card-gap); }
.dir-sub .card { padding: var(--space-5); }
.dir-sub h3 { margin: 0 0 var(--space-3); font-size: var(--fs-small); display: flex; align-items: center; gap: var(--space-2); }
.chip.auto { min-width: 0; background: var(--accent-weak); color: var(--accent-text); border-color: var(--accent-weak-border); }
/* TS F18-LAYOUT · layout B (D-554, D-556, D-557; specs/F18_inbox_layout_mockup_v1.html, sha256
   4c5ce5c5…): an item is its title on a line of its own, one line of columns under it, and
   everything else full width under that. No column holds the item's text. The six sections with
   fields of their own share one grid, column for column; Voices and the Directory, which have
   none, start their columns at the left edge with Source, Decide and Directory keeping their place
   (D-556 (1)). */
.ir-item { border-top: 1px solid var(--border-subtle); padding: var(--space-3) 0 var(--space-2); }
.ir-item.upd { border-left: 3px solid var(--brand); margin-left: calc(-1 * (var(--space-4) + 3px));
  padding-left: var(--space-4); border-top: 0; }
.ir-title { font-size: var(--fs-body); font-weight: var(--fw-demibold); color: var(--text-primary); }
.ir-item.decided .ir-title { color: var(--text-secondary); }
/* TS WALK2-FIX (rows 2, 9): the quiet in-progress mark on the item an act waits on — dimmed, its
   own controls resting until the page's re-read lands; every other item stays live. */
.ir-item.ir-busy { opacity: 0.55; pointer-events: none; transition: opacity 120ms; }
/* TS WALK2-D (B-464): a register row an act is waiting on, dimmed as the inbox dims an item. */
tr.ir-busy { opacity: 0.55; pointer-events: none; transition: opacity 120ms; }
/* TS WALK2-D (D-567 (5)): a risk's quoted turns, opened in a row under the risk. */
.table tr.quoteexpand td { padding-top: 0; }
.ir-title b { font-weight: var(--fw-bold); }
.ir-title .from { text-decoration: line-through; color: var(--text-tertiary); font-weight: var(--fw-medium); }
.ir-title .to { color: var(--brand-text); }
.ir-title .chip { margin-left: var(--space-2); vertical-align: middle; font-weight: var(--fw-medium); }
.ir { display: grid; grid-template-columns: 250px 190px 110px minmax(0,1fr) minmax(0,1fr) 62px 150px;
  gap: var(--space-3); align-items: start; padding: var(--space-2) 0; font-size: var(--fs-small); }
.nospec .ir { grid-template-columns: 190px 110px minmax(0,1fr) minmax(0,1fr) 62px 150px; }
.nospec .ir > .c-spec { display: none !important; }
.ir > div { min-height: 28px; display: flex; align-items: flex-start; }
.ir > .c-src { padding-top: 5px; }
.ir > .c-spec { padding-top: 3px; }
.ir > .c-conf { padding-top: 3px; }
.ir-h { padding: 2px 0; font-size: var(--fs-micro); color: var(--text-secondary); font-weight: var(--fw-demibold); }
.ir-h > div { min-height: 0; padding-top: 0 !important; }
.ir-h .c-spec.own { font-size: var(--fs-small); color: var(--text-primary); font-weight: var(--fw-medium); }
.ir-detail { padding: 0 0 var(--space-2); font-size: var(--fs-small); color: var(--text-primary); }
.ir-detail:empty, .ir-opened:empty, .ir-turns-host:empty { display: none; }
/* TS F20-P5 (D-559; the groups picture's Screen 3): the Source link, and the turns it opens in
   the Directory quotation's box — who, when, what was said — scrolling past its height. */
.ir-srclink { text-align: left; font-size: inherit; }
.ir-turns-host > .ir-turns { margin: var(--space-2) 0; font-style: normal; white-space: normal;
  max-height: 320px; overflow-y: auto; }
.ir-turn { display: grid; grid-template-columns: minmax(96px, max-content) 64px 1fr;
  gap: var(--space-3); padding: 2px 0; }
.ir-turn .who { font-weight: var(--fw-demibold); color: var(--text-primary); }
.ir-turn .who.ph { font-weight: var(--fw-regular); }
.ir-turn .when { color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.ir-turn .said { font-style: italic; color: var(--text-secondary); }
.ir-detail > * + * { margin-top: var(--space-2); }
.ir-detail .sub { font-size: var(--fs-small); color: var(--text-secondary); }
.ir-detail .sub b { color: var(--text-primary); font-weight: var(--fw-medium); }
.ir-detail .lockr { font-size: var(--fs-small); color: var(--warn-text); }
.ir-detail .lockr.refused { color: var(--danger-text); }
.ir-detail .quote { margin: 0; font-size: var(--fs-small); }
.ir-detail .linklike { font-size: inherit; }
.ir-dl { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 8px var(--space-5); align-items: baseline; }
.ir-dl > .k { font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: var(--tracking-caps);
  color: var(--text-tertiary); font-weight: var(--fw-demibold); }
.ir-dl > .v { min-width: 0; }
.ir-dl > .wide { grid-column: 1 / -1; }
.ir-opened > .ir-exp, .ir-item > .ir-shape { margin: var(--space-2) 0; }
.ibx-shape > .field:last-child { grid-column: span 2; }
.c-spec { display: grid !important; grid-template-columns: 118px minmax(0,1fr); gap: var(--space-3); }
.c-src { font-size: var(--fs-caption); color: var(--text-secondary); }
.c-rev, .c-ws, .c-act, .c-dir { gap: var(--space-2); }
.c-dir { margin-left: 20px; }
.ibx-shape-which { display: flex; flex-direction: column; gap: var(--space-2); }
.ibx-shape-value { display: flex; gap: var(--space-2); }
.ibx-shape-value > * { flex: 1 1 0; min-width: 0; }
.ir .na { color: var(--text-secondary); }
.ir-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ir-stack .sr { display: flex; align-items: center; gap: 4px; }
/* TS WALK2-D (D-567 (1), (2)): a pill never wraps inside its row of the stack. */
.ir-stack .ir-rv, .ir-stack .ir-ws { white-space: nowrap; }
.ir-rv { font-size: var(--fs-caption); padding: 1px 8px; border-radius: 999px; background: var(--brand-weak);
  border: 1px solid var(--brand-weak-border); color: var(--brand-text); white-space: nowrap; }
.ir-ws { font-size: var(--fs-caption); padding: 1px 8px; border-radius: 999px; background: var(--ok-weak);
  color: var(--ok-text); border: 1px solid var(--ok); white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; }
.ir-rv { display: inline-flex; align-items: center; gap: 2px; }
.ir-rv .rvdrop { padding: 0 0 0 2px; background: none; border: 0; color: inherit; cursor: pointer; line-height: 1; }
.wsmenu-find { display: block; width: 100%; margin-bottom: 4px; }
.wsmenu-note { font-size: var(--fs-caption); color: var(--text-secondary); padding: 4px 8px; }
.ir-ws .tagdrop { display: none; }
.ir-ws:hover .tagdrop, .ir-ws:focus-within .tagdrop { display: inline; }
.ir-plus { width: 20px; height: 20px; border-radius: 999px; border: 1px solid var(--border-default); background: var(--bg-surface);
  color: var(--text-secondary); display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
.ir-plus svg { width: 12px; height: 12px; }
.ir-plus[disabled] { opacity: .5; cursor: not-allowed; }
.dec { width: 28px; height: 28px; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center;
  padding: 0; cursor: pointer; }
.dec svg { width: 16px; height: 16px; }
.dec.ok { background: var(--ok-weak); border: 1px solid var(--ok); color: var(--ok-text); }
.dec.no { background: var(--danger-weak); border: 1px solid var(--danger); color: var(--danger-text); }
.dec[disabled] { background: var(--bg-surface); border-color: var(--border-default); color: var(--text-secondary); opacity: .6; cursor: not-allowed; }
.dec.done { cursor: default; }
.dicons { display: inline-flex; gap: 6px; }
.dicon { width: 28px; height: 28px; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-default); background: var(--bg-surface); color: var(--text-tertiary); cursor: default; padding: 0; }
.dicon svg { width: 16px; height: 16px; }
.dicon.has { background: var(--brand-weak); border-color: var(--brand-weak-border); color: var(--brand-text); cursor: pointer; }
.dicon.has.open { outline: 2px solid var(--brand); outline-offset: 1px; }
.dicon[disabled] { opacity: 1; }
/* TS F20-P5 (D-560 (6), D-565 (3); the groups picture's Screen 3): a tag whose entry is still
   undecided — the icon outlined, the word Pending beside the name, in the muted mark's style. */
.dicon.has.pend { background: var(--warn-weak); border: 1px dashed var(--warn); color: var(--warn-text); }
.dicon.has.pend.open { outline: 2px solid var(--warn); outline-offset: 1px; }
.ir-pendname { white-space: nowrap; }
.pendmark { display: inline-block; background: var(--warn-weak); color: var(--warn-text);
  border: 1px dashed var(--warn); border-radius: var(--radius-pill); padding: 0 6px;
  font-size: var(--fs-micro); font-weight: var(--fw-medium); margin-left: 6px; vertical-align: 1px; line-height: 1.6; }
.ir-exp { margin: 0 0 var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); background: var(--bg-inset); }
.exp-h { font-size: var(--fs-caption); font-weight: var(--fw-demibold); color: var(--text-secondary); margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px; }
.exp-h svg { width: 14px; height: 14px; }
.exp-row { display: flex; gap: var(--space-3); font-size: var(--fs-small); padding: 3px 0; }
.exp-row .role { color: var(--text-secondary); }
.ir-was { margin-top: var(--space-3); }
.ibx-shape-which { display: flex; flex-direction: column; gap: var(--space-2); }
.ibx-shape-value { display: flex; gap: var(--space-2); }
.ibx-shape-value > * { flex: 1 1 0; min-width: 0; }
/* TS F20-P4's audit, G2: the choice is as wide as its three buttons (the column flexbox above
   stretched it, leaving an empty bordered segment), joined as the tabs are, the chosen one marked. */
.ibx-shape-kind { align-self: flex-start; }
.ibx-shape-kind .btn { border: none; border-right: 1px solid var(--border-default); border-radius: 0; }
.ibx-shape-kind .btn:last-child { border-right: none; }
.ibx-shape-kind .btn.active { background: var(--brand-weak); color: var(--brand-text); font-weight: var(--fw-demibold); }
.ir-shape { margin: 0 0 var(--space-3); }
tr.direxpand > td { background: var(--bg-surface); padding: var(--space-3) var(--space-4) var(--space-4) 44px; }
.recapdir { margin-top: var(--space-2); }
.recapdir .ir-exp { margin-top: var(--space-2); }
.ibx-sec .dir-sub { grid-template-columns: minmax(0, 1fr); gap: 0; }
.ibx-sec .dir-sub .card { padding: 0; border: 0; box-shadow: none; background: none; }
.ibx-sec .dir-sub h3 { margin: var(--space-5) 0 var(--space-2); }
.ibx-sec .dir-sub > .card:first-child h3 { margin-top: var(--space-2); }
/* A voice row's clip is the review screen's player drawn as the mockup's small round play. */
.ir-title .audiochip { border: 0; background: none; padding: 0; min-width: 0; vertical-align: middle; }
.ir-title .audiochip .wave, .ir-title .audiochip .dur { display: none; }
.ir-title .audiochip .play { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-default); display: inline-grid;
  place-items: center; color: var(--accent-text); background: var(--bg-surface); margin-right: var(--space-2); }
.ir-title .audiochip .play svg { width: 12px; height: 12px; }

/* TS F20-P2 (F20 R-5): the cover form's two people side by side (mockup v1, Screen 4). */
.cov-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.cover-form .cov-row + .field { margin-top: var(--space-5); }
.cover-form .cov-row .field { margin-top: 0; }
.dir-acts { display: flex; gap: var(--space-3); align-items: center; }
/* TS F20-P2 (F20 R-6): the person filter at the top of the inbox (mockup v1, Screens 2 and 3). */
.ibx-top { display: flex; align-items: flex-end; gap: var(--space-5); flex-wrap: wrap; margin-bottom: var(--card-gap); }
.ibx-top .cardnote { margin: 0 0 var(--space-2); }
.ibx-filter .cbx-trigger[disabled] { opacity: 1; cursor: default; }
.ibx-filter .lock { font-size: var(--fs-micro); color: var(--text-tertiary); margin-left: var(--space-2); }
/* TS F20-P3 audit F12: a member's locked filter is a plain box with "Your own inbox" beside it
   (mockup v1) — no chevron, the note on the control's line. */
.ibx-filter.locked .ctlband { display: flex; align-items: center; }
.ibx-filter.locked .cbx-chev { display: none; }
.cover-form .wizard-body .cardnote.tail { margin-top: var(--space-4); }

/* TS F20-P3 · the Directory screen (F20 R-26; mockup v1's Screen 6): the tabs on the left, the
   tab's Add button on the right, then the entries' table, the Rejected list and the note. */
.dir-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
           flex-wrap: wrap; margin-bottom: var(--card-gap); }
.dir-acts { gap: var(--space-4); justify-content: flex-end; }
.dir-rejected h2 .count { margin-left: var(--space-2); }
.dir-note { margin-top: var(--space-4); }
/* TS F20-P5 (D-558; the groups picture's Screen 4): the Contacts list's company and e-mail, the
   muted words where there is none, and the row opened for editing. */
.dir-none { color: var(--text-tertiary); }
.dir-contacts tr.dir-editing td { background: var(--bg-inset); vertical-align: middle; }
.dir-contacts tr.dir-editing input { width: 100%; }
.dir-contacts .dir-company { min-width: 160px; }
.dir-contacts .dir-email { min-width: 180px; overflow-wrap: anywhere; }
/* TS WALK2-C (D-577 (1)): the person's Title and their Role on this project, two columns. */
.dir-contacts .dir-title, .dir-contacts .dir-role { min-width: 120px; }
tr.dir-editing .dir-title input, tr.dir-editing .dir-role input { width: 100%; min-width: 0; }
/* Edit project's Inbox step (F20 R-24): one switch and what it does. */
.inbox-setting .checkline { display: inline-flex; align-items: center; gap: var(--space-2);
                            font-weight: 600; cursor: pointer; }
.dir-top .seg.tabs { margin-bottom: 0; }

/* TS F20-P4 (F20 R-30; mockup v1 Screen 5): the meeting page — the items accepted from it beside
   its details. */
.mp-accepted h2 { margin-bottom: var(--space-3); }
.mp-waiting { margin-bottom: var(--space-3); }
.mp-group { margin-top: var(--space-4); }
.mp-grp-h { font-size: var(--fs-micro); font-weight: var(--fw-demibold); letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-secondary); margin-bottom: var(--space-1); }
/* TS WALK2-FIX (B-417 F4): the id and the text, then one auto column per thing that trails them — an
   action's status chip (and "closed"), then the link — so a row without a chip keeps its old shape. */
.mp-row { display: grid; grid-template-columns: 64px 1fr; grid-auto-flow: column; grid-auto-columns: auto;
  gap: var(--space-3); align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--border-subtle); }
.mp-id { font-family: var(--font-mono); font-size: var(--fs-caption); color: var(--text-secondary); }
.mp-link { white-space: nowrap; }
.mp-dl { display: grid; grid-template-columns: 96px 1fr; gap: var(--space-3); padding: 4px 0; }
.mp-dt { color: var(--text-secondary); }
tr.focused > td { background: var(--brand-weak); }

/* TS F20-P4 (F20 R-31; mockup v1 Screen 5): the Meetings tab's Outputs cell. */
.c-outputs { min-width: 360px; }
.mt-outputs { display: flex; flex-direction: column; gap: var(--space-2); cursor: default; }
.mt-btns { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: flex-start; }
.mt-recap { display: flex; flex-direction: column; gap: 4px; max-width: 180px; }
.mt-note { font-size: var(--fs-micro); color: var(--text-secondary); }
.mt-waiting { color: var(--warn-text); font-size: var(--fs-caption); cursor: default; }

/* TS F18-P1 (F18 R-6, R-7, R-8, R-12, R-25): a finding's card, its links and their picker, the
   Findings section's Off state and Edit project's setting rows — the binding mockup's F18 component
   block (specs/F18_mockup_v1.html), on the semantic token layer only. The picture's quiet inline note
   is .fd-note here; the inbox's two count grids carry eight (F18 R-6). */
.fd-type { display: inline-block; font-size: var(--fs-caption); font-weight: var(--fw-demibold); padding: 1px 8px;
  border-radius: 999px; border: 1px solid var(--border-default); white-space: nowrap; }
.fd-type.issue { background: var(--warn-weak); color: var(--warn-text); border-color: var(--warn); }
.fd-type.opp { background: var(--accent-weak); color: var(--accent-text); border-color: var(--accent-weak-border); }
.fd-cond { color: var(--text-primary); }
.fd-expert { font-size: var(--fs-small); color: var(--accent-text); background: var(--accent-weak);
  border: 1px solid var(--accent-weak-border); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); }
.fd-expert b { font-weight: var(--fw-demibold); }
.fd-q { margin: 6px 0 0; padding-left: var(--space-4); border-left: 2px solid var(--border-default); font-size: var(--fs-small); }
.fd-q .who { color: var(--text-tertiary); }
.fd-links { font-size: var(--fs-small); }
.fd-link { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); padding: 2px 0; }
.fd-link .rel { color: var(--text-secondary); white-space: nowrap; }
.fd-link .id { font-family: var(--font-mono); color: var(--text-tertiary); }
.fd-link .pend { color: var(--warn-text); }
.fd-link .x { width: 18px; height: 18px; border-radius: var(--radius-xs); border: 1px solid var(--border-default); background: var(--bg-surface);
  color: var(--text-tertiary); display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
.fd-link .x svg { width: 10px; height: 10px; }
/* D-556 (2): a removed link stays struck through, its Undo at full strength beside it. */
.fd-link.removing .rel, .fd-link.removing .id, .fd-link.removing .pend, .fd-link.removing .txt { opacity: .55; }
.fd-link.removing .txt { text-decoration: line-through; }
.fd-link .undo { color: var(--text-tertiary); }
.fd-link .by { color: var(--brand-text); }
.fd-picker { margin-top: var(--space-2); border: 1px solid var(--border-default); border-radius: var(--radius); background: var(--bg-overlay);
  box-shadow: var(--shadow); max-width: 440px; }
/* TS WALK2-B (F20 R-41): the link picker is the shell's type-ahead now — the trigger and its popup
   carry their own box, so the panel draws none around them. */
.fd-picker.fd-picker-ta { border: 0; background: none; padding: 0; overflow: visible; max-height: none; box-shadow: none; max-width: none;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.fd-picker .ph-in { border-bottom: 1px solid var(--border-subtle); padding: var(--space-2) var(--space-3); color: var(--text-tertiary); }
.fd-picker .opt { display: flex; gap: var(--space-3); padding: var(--space-2) var(--space-3); font-size: var(--fs-caption); }
.fd-picker .opt .id { font-family: var(--font-mono); color: var(--text-tertiary); width: 40px; flex: none; }
.fd-picker .opt.sel { background: var(--bg-selected); color: var(--brand-text); }
.fd-picker .grp { padding: var(--space-2) var(--space-3) 0; font-size: var(--fs-micro); text-transform: uppercase;
  letter-spacing: var(--tracking-caps); color: var(--text-tertiary); font-weight: var(--fw-demibold); }
.fd-picker .rel-choice { display: flex; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-top: 1px solid var(--border-subtle); }
.ibx-stats .stat.off .v { color: var(--text-disabled); }
.fd-off { display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-4); border-radius: var(--radius);
  background: var(--bg-inset); color: var(--text-secondary); font-size: var(--fs-small); }
.fd-off .chip { min-width: 0; }
.fd-note { font-size: var(--fs-caption); color: var(--text-tertiary); }
.setting-row { display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-4) 0; border-bottom: 1px solid var(--border-subtle); }
.setting-row:last-child { border-bottom: 0; }
.setting-row .lbl { font-weight: var(--fw-medium); }
.setting-row .hint { font-size: var(--fs-caption); color: var(--text-tertiary); margin-top: 2px; max-width: 64ch; }
.fd-picker .opt { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; color: inherit; }
.fd-picker input.ph-in { width: 100%; border: 0; border-bottom: 1px solid var(--border-subtle); background: none; }
.fd-vouch { color: var(--text-tertiary); }
.fd-plus { margin-top: 4px; }
/* What a click opens in a finding's labelled line — its quotations, its picker — opens in the line
   itself, across the detail's width (D-554 (3), the picture's Screen 2). */
.fd-panel { display: block; }
.fd-panel .fd-q { max-width: 110ch; }
.fd-panel .fd-picker { max-width: 620px; }
.fd-picker .opt { font-size: var(--fs-small); }
button.fd-said { margin: 0; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: var(--fs-small); color: var(--accent-text); font-weight: var(--fw-demibold);
  text-align: left; display: block; }
button.fd-said::before { content: "▸ "; }
button.fd-said.open::before { content: "▾ "; }

/* ---- TS F18-P3 (B-453; D-561, D-562, D-565): the sidebar in sections and the inbox page in groups,
   drawn as specs/F20_inbox_groups_and_sidebar_mockup_v1.html draws them, its values in the product's
   own class names. ---- */
/* A section's heading is a button: it keeps the label's look and collapses the section. */
.navgroup > button.navhead { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left;
  background: none; border: 0; cursor: pointer; font-family: inherit; }
.navgroup > button.navhead:hover { color: var(--text-secondary); }
.navgroup .navchev { display: inline-block; width: 1em; }
.navgroup .navchev::before { content: "▾"; }
.navgroup.shut .navchev::before { content: "▸"; }
.navgroup.shut > .navbody { display: none; }
.navgroup.shut { margin-bottom: var(--space-4); }
/* The page's groups (D-561): each a row with its name and total, open to its cards and sections. */
.ibx-groups { display: grid; gap: var(--card-gap); margin-top: var(--card-gap); }
.ibx-group { min-width: 0; }
.ibx-ghead { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-6);
  background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); cursor: pointer; user-select: none; font-size: var(--fs-h3, 20px);
  font-weight: var(--fw-bold); letter-spacing: var(--tracking-tight); color: var(--text-primary);
  line-height: var(--lh-heading); }
.ibx-ghead:hover { background: var(--bg-hover); }
.ibx-ghead .ibx-chev { display: inline-block; width: 1.1em; color: var(--text-tertiary); font-size: var(--fs-small); }
.ibx-ghead .ibx-chev::before { content: "▾"; }
.ibx-group.shut > .ibx-ghead .ibx-chev::before { content: "▸"; }
.ibx-ghead .count { margin-left: var(--space-2); }
.ibx-group.shut > .ibx-gbody { display: none; }
.ibx-gbody { display: grid; gap: var(--card-gap); margin-top: var(--card-gap); padding-left: var(--space-5);
  border-left: 2px solid var(--border-subtle); }
.ibx-gbody > .ibx-stats { grid-template-columns: repeat(auto-fill, minmax(150px, 176px)); }

/* ---- TS F18-P3 (F18 R-5; F18 mockup v1, Screen 6): the findings register ---- */
.fd-nonew { font-size: var(--fs-caption); color: var(--text-tertiary); align-self: flex-end; }
.fd-regbar { padding: 0 0 var(--space-3); align-items: flex-start; gap: var(--space-3); }
/* TS F20-P5 (P5-A2): Screen 6's quiet filter line — small buttons, each opening its control. */
.fd-filter { position: relative; }
.fd-filterbtn.set { border-color: var(--brand-weak-border); background: var(--brand-weak); color: var(--brand-text); }
.fd-filterpop { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; min-width: 220px;
  padding: var(--space-3); background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.fd-filterpop .field { margin: 0; }
/* TS DELRAY-RECONCILE (Nathan at the look): a set filter's × clears it, beside its button. */
.fd-filter.set { display: inline-flex; align-items: center; }
.fd-filter.set .fd-filterbtn { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.fd-filterclear { align-self: stretch; padding: 0 8px; border: 1px solid var(--brand-weak-border); border-left: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--brand-weak); color: var(--brand-text);
  cursor: pointer; line-height: 1; }
.fd-filterclear:hover { background: var(--brand-weak-border); }
.fd-regfoot { margin-top: var(--space-3); border-top: 1px solid var(--border-subtle); padding-top: var(--space-2); }
.fd-prime { min-width: 220px; }
.fd-prime .fd-title { font-weight: var(--fw-demibold); color: var(--text-primary); }
.fd-prime .fd-cond { margin-top: 2px; }
.c-ftype { width: 96px; }
.c-fshort { min-width: 120px; max-width: 150px; font-size: var(--fs-small); color: var(--text-secondary); }
.c-fbears { min-width: 96px; font-size: var(--fs-small); }
.c-flinks { min-width: 150px; }
/* TS F20-P5 (P5-A1): every column in the card at 1440, as Screen 6 draws it — the cells' side
   padding the picture's, the id column as wide as its id. */
.fd-regcard .table th, .fd-regcard .table td { padding-left: var(--space-2); padding-right: var(--space-2); }
.fd-regcard .table th.sortable .sortbtn { padding-left: var(--space-2); padding-right: var(--space-2); }
.fd-regcard .table .c-displayid { width: 64px; }
.fd-regcard .c-flinks { min-width: 92px; }
.fd-regcard .fd-prime { min-width: 180px; }
.fd-regcard .c-fshort { min-width: 92px; }
/* TS DELRAY-RECONCILE: the People column (D-603 (1)) is paid for by Expected, Impacts and Linked items. */
.fd-regcard .c-fbears { min-width: 80px; }
.fd-reglinks .fd-link { font-size: var(--fs-small); }
.fd-regsaid { margin-bottom: var(--space-3); }
.fd-regsaid .fd-k { font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: var(--tracking-caps);
  color: var(--text-tertiary); font-weight: var(--fw-demibold); margin: var(--space-2) 0 4px; }
.fd-regsaid .fd-q { font-size: var(--fs-small); margin-top: 4px; }
.fd-regsaid .fd-q .who { color: var(--text-tertiary); }
.mp-type { margin-left: var(--space-2); vertical-align: middle; }
/* ---- TS F18-P3 (F18 R-12 (3); Screen 7): the Related findings picker on the forms ---- */
.rf-field { margin: var(--space-3) 0; }
.rf-box { position: relative; }
.rf-trigger { display: inline-flex; align-items: center; gap: var(--space-2); }
.rf-trigger svg { width: 12px; height: 12px; }
.rf-list { position: relative; max-width: 440px; }
/* TS F20-P5 (P5-A5; Screen 7): the trigger IS the search — one box — and the list opens under it,
   a chosen finding highlighted in it. */
.rf-trigger.rf-find { position: relative; padding: 0; }
.rf-find input { border: 0; background: transparent; height: 100%; min-width: 260px;
  padding: 0 var(--space-6) 0 var(--space-3); font: inherit; color: inherit; }
.rf-find:focus-within { outline: 2px solid var(--border-focus); outline-offset: 1px; }
.rf-find svg { position: absolute; right: var(--space-3); top: 50%; transform: translateY(-50%); pointer-events: none; }
.rf-list .opt.sel { background: var(--brand-weak); color: var(--brand-text); }
.rf-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-2) 0; }
.rf-chip { display: inline-flex; align-items: center; gap: 6px; height: auto; line-height: 1.5; padding: 2px 10px; }
.rf-chip .x { width: 16px; height: 16px; border: 0; background: none; cursor: pointer; padding: 0; color: var(--text-tertiary); }
.rf-chip .x svg { width: 10px; height: 10px; }
.rf-hint { margin-top: var(--space-2); }
/* TS WALK2-C (D-567 (6)): a Directory row's Details — the record read-only, in its actions cell. */
.dir-details { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2);
  text-align: left; white-space: normal; width: 320px; }
.dir-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-1) var(--space-3);
  margin: 0; width: 100%; }
.dir-dl dt { color: var(--text-secondary); font-size: var(--fs-small); white-space: nowrap; }
.dir-dl dd { margin: 0; overflow-wrap: anywhere; }

/* TS DELRAY-RECONCILE (D-603 (2); Nathan at the look, Option B): the people on an item — the owner
   the top pill, the people tagged by hand under it, the reviewer stack's pills; a proposed owner and
   an unowned row's None are the warning yellow; a removal the viewer just made reads struck, Undo
   beside it. On the inbox card the stack sits under the section's first own field. */
.ptag-lead.ptag-proposed, .ptag-lead.ptag-none {
  background: var(--warn-weak); color: var(--warn-text); border: 1px solid var(--warn); }
.ir .c-spec .sv .ptags { margin-top: 6px; }
.ptag.struck { text-decoration: line-through; opacity: 0.6; }
/* Nathan at the look: dates never wrap; the item's own text gets room to read; the record opens
   from a chevron where the History column's Edit link was. */
.table td.c-due { white-space: nowrap; }
.table td.prime:not(.fd-prime) { min-width: 200px; }
/* The register tables (the only ones with a Directory column) take tighter cell padding, a
   narrower status select and smaller Directory icons, so the wider item text, the unwrapped dates
   and the owner stack still fit the card at 1440px. */
.table:has(td.c-entities) th, .table:has(td.c-entities) td { padding-left: 8px; padding-right: 8px; }
.table:has(td.c-entities) th.sortable .sortbtn { padding-left: 8px; padding-right: 8px; }
.table:has(td.c-entities) .statuscell .st-select { min-width: 8.4em; }
.fd-regcard .table:has(td.c-entities) .statuscell .st-select { min-width: 6em; }
.table:has(td.c-entities) .dicons { gap: 3px; }
.table:has(td.c-entities) .dicon { width: 26px; height: 26px; }
/* The owner stack: a pill and the + beside it never break onto two lines. */
.table .c-owner { width: 160px; }
.ptags .sr { flex-wrap: nowrap; white-space: nowrap; }
.table .c-history { width: 32px; text-align: center; }
.table:has(td.c-entities) th.c-history, .table:has(td.c-entities) td.c-history { padding-left: 2px; padding-right: 6px; }
.regopen { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  padding: 0; border: 1px solid var(--border-subtle); border-radius: 6px; background: none;
  color: var(--text-muted); cursor: pointer; }
.regopen:hover { color: var(--text-primary); border-color: var(--border); }
.regopen svg { width: 15px; height: 15px; transition: transform .15s; }
.regopen[aria-expanded="true"] svg { transform: rotate(180deg); }
.ptag-pop { min-width: 240px; padding: 6px; }

/* TS WALK3 (D-609): an agenda, readable — the Meetings list's link, its full-width row, and the
   agenda's text wherever it is drawn (a meeting's own screen, the same words). */
.table td.c-agenda { max-width: 280px; }
.agenda-link { padding: 0; text-align: left; font-size: var(--fs-small); }
.table tr.agenda-row > td { background: var(--bg-inset); padding: var(--space-4) var(--space-6); }
.agenda-row-h { font-size: var(--fs-small); color: var(--text-secondary); margin-bottom: var(--space-2); }
.agenda-text { max-width: 88ch; line-height: var(--lh-body); color: var(--text-primary);
  overflow-wrap: anywhere; }
.agenda-text p { margin: 0 0 var(--space-1); }
.agenda-text .agenda-gap { height: var(--space-3); }
.mp-agenda .agenda-text { font-size: var(--fs-small); }
