@font-face { font-family:"Geist"; src:url("/assets/geist.3626eba54729.woff2") format("woff2");
  font-weight:100 900; font-style:normal; font-display:swap; }
@font-face { font-family:"Geist Mono"; src:url("/assets/geist-mono.5d93ee62680b.woff2") format("woff2");
  font-weight:100 900; font-style:normal; font-display:swap; }
@layer bl-tokens, bl-base, bl-layout, bl-components, bl-screens, bl-utilities;

@layer bl-tokens {
  /* The 10 Ton design system owns every colour, size, weight, space, radius and shadow.
     They are the --tt-* variables in static/10ton-ds/tokens.css (and the shadcn names Basecoat
     reads), loaded before this sheet. Nothing here may declare a colour or re-declare a scale step:
     scripts/check-design.sh fails a literal, and a --tt-* or shadcn name declared here.
     What remains below is Backlot's own furniture: the shell's measurements and a few derived roles. */
  :root {
          /* One focus ring for every control, row and tab: shown on keyboard focus only. */
          --focus-ring:2px solid var(--tt-accent-ring); --focus-offset:2px;
          --control-h-touch:var(--tt-row-h);
          /* What a control is drawn at RIGHT NOW: 36 with a mouse, 44 on a phone (set below). */
          --control:var(--tt-control-h);
          --row-h-group:var(--tt-space-8); --row-h-head:var(--tt-control-h-sm);
          /* A label-sized thing — chip, slate: one height for all of them. */
          --chip-h:var(--tt-space-6);
          /* The segmented control's track: the hairline of air between its options. */
          --track:2px;
          --icon:var(--tt-space-4); --dot:var(--tt-space-2); --dot-sm:var(--tt-space-1); --stripe:2px;

          /* The shell's measurements. */
          --sidebar-pad:var(--tt-space-4); --nav-h:34px; --nav-row-gap:2px; --brand-air:var(--tt-space-3);
          --tabbar-h:56px;
          --bar-h:var(--tt-space-12); --inset:var(--tt-space-8); --block-gap:var(--tt-space-6); --col-gap:var(--tt-space-4);
          --measure:34rem; --measure-text:40rem; --measure-wide:46rem; --content-max:1600px; --side-panel-w:30rem; --inline-status-w:4.5rem;
          --sheet-max:72rem; --sheet-box-max:6rem; --menu-form-w:18rem; --value-input-w:16rem;
          /* The phone's side gutter, never inside the notch in landscape. */
          --gutter:max(var(--tt-space-5), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
          --safe-b:env(safe-area-inset-bottom, 0px); }
  /* A phone is touched, not pointed at: every control grows to the 44px target in one place. */
  @media (max-width:900px), (pointer:coarse) { :root { --control:var(--control-h-touch); } }
}

@layer bl-base {
  /* Reduced motion (SME audit 2026-11-12): no transitions, animations or smooth scrolling for someone
     who asked their system for less. !important in the base layer outranks every later layer's rule. */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration:0s !important; transition-delay:0s !important;
      animation-duration:0s !important; animation-delay:0s !important; animation-iteration-count:1 !important;
      scroll-behavior:auto !important; }
  }
  *, *::before, *::after { box-sizing:border-box; }
  :where(html) { -webkit-text-size-adjust:100%; -webkit-tap-highlight-color:transparent; }
  :where(html, body) { margin:0; padding:0; }
  :where(body) { min-height:100vh; background:var(--tt-canvas); color:var(--tt-fg);
                 font-family:var(--tt-font-sans); font-size:var(--tt-text-base); line-height:1.5;
                 font-weight:var(--tt-weight-normal);
                 -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; }
  :where(h1) { font-size:var(--tt-text-xl); line-height:1.2; letter-spacing:-.02em;
               font-weight:var(--tt-weight-medium); margin:0 0 var(--tt-space-2); }
  /* The section label, in sentence case at reading size (UX cleanup, D72): small tracked capitals on
     every block, with a capitalised aside opposite, made each screen read as a wall of labels. */
  :where(h2) { font-size:var(--tt-text-md); line-height:1.3; color:var(--tt-fg); font-weight:var(--tt-weight-medium);
               margin:var(--tt-space-8) 0 var(--tt-space-3); }
  :where(p) { margin:0 0 var(--tt-space-3); }
  :where(a) { color:inherit; text-underline-offset:.2em; }
  :where(b, strong) { font-weight:var(--tt-weight-medium); }
  :where(label) { display:block; font-size:var(--tt-text-xs); font-weight:var(--tt-weight-medium);
                  color:var(--tt-fg-muted); margin-bottom:var(--tt-space-2); }
  :where(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, textarea) {
          width:100%; min-height:var(--control); padding:0 var(--tt-space-3);
          font:inherit; font-size:var(--tt-text-base); color:var(--tt-fg); background:var(--tt-surface);
          border:1px solid var(--tt-line-input); border-radius:var(--tt-radius-md); box-shadow:var(--tt-shadow-xs);
          font-variant-numeric:tabular-nums;
          transition:border-color .12s ease, box-shadow .12s ease; }
  :where(textarea) { padding:var(--tt-space-2) var(--tt-space-3); min-height:calc(var(--control) * 2); }
  :where(input, select, textarea):hover { border-color:var(--tt-fg-muted); }
  :where(input, select, textarea):focus { border-color:var(--tt-accent-border); box-shadow:0 0 0 2px var(--tt-accent-soft); }
  :where(select) { appearance:none; padding-right:var(--tt-space-10); cursor:pointer; text-overflow:ellipsis; }
  :where(fieldset) { border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md);
                     padding:var(--tt-space-4); margin:0; min-width:0; }
  :where(legend) { font-size:var(--tt-text-xs); font-weight:var(--tt-weight-medium); color:var(--tt-fg-muted);
                   padding:0 var(--tt-space-1); }
  /* A form is a column of fields. Zero specificity, so ANY class — .inline-form, .range-form,
     .cluster — lays a form out differently without a fight. (It used to sit in the screens layer,
     which silently beat every component's display and stacked the period picker into a column.) */
  :where(form) { display:grid; gap:var(--tt-space-4); }
  /* A grid stretches its items; a button is as wide as its words unless it opts in to full. */
  :where(form) > :where(button, .btn) { justify-self:start; }
  /* The focus ring: full ink, offset, on everything focusable. Never removed, never clipped — a
     container that scrolls draws its children's ring INSIDE them instead (see .app-sidebar nav). */
  :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
          outline:var(--focus-ring); outline-offset:var(--focus-offset); }
  /* A heading the page moves focus to (tabindex="-1", for a screen reader) is not a control: no ring. */
  :where(h1, h2, h3, section, main, [role="region"]:not(.table-scroll))[tabindex="-1"]:focus { outline:none; }
  :where(table) { width:100%; border-collapse:collapse; font-size:var(--tt-text-base);
                  font-variant-numeric:tabular-nums; }
  /* Hairline tables (D100): one rule under the header, a hairline between rows, no zebra, no boxes.
     Headers sit in the muted ink, so a column name reads as a label, not a shout. */
  :where(th) { text-align:left; font-size:var(--tt-text-xs); font-weight:var(--tt-weight-medium); color:var(--tt-fg-muted);
               height:var(--row-h-head); padding:var(--tt-space-2) var(--tt-space-3);
               border-bottom:1px solid var(--tt-line); white-space:nowrap; vertical-align:bottom; }
  :where(td) { height:var(--tt-row-h); padding:var(--tt-space-2) var(--tt-space-3);
               border-bottom:1px solid var(--tt-line-subtle); vertical-align:middle; }
  :where(th:first-child, td:first-child) { padding-left:0; }
  :where(th:last-child, td:last-child) { padding-right:0; }
  :where(dl) { margin:0; }
  :where(dd) { margin:0; }
}

/* THE LAYOUT LAYER STYLES THE SHELL'S OWN CLASSES AND NOTHING ELSE. A later layer wins whatever the
   specificity, so a layout rule — phone or not — that targets a class the components layer also
   styles can never apply (that is how the theme switch leaked into the phone header). The
   stylesheet-guard test parses the layers and fails such a rule. */
@layer bl-layout {
  /* ---- the shell: a sticky sidebar beside a scrolling main ---- */
  .app { display:flex; align-items:flex-start; min-height:100vh; }
  .app-sidebar { flex:0 0 var(--tt-sidebar-w); width:var(--tt-sidebar-w); align-self:stretch;
             position:sticky; top:0; height:100vh; padding:0 var(--sidebar-pad) var(--tt-space-5);
             display:flex; flex-direction:column; }
  /* The design system's shell: the tinted canvas holds the sidebar, the work sits on a raised panel
     that separates by shade and a hairline ring, in both themes. */
  .main { flex:1 1 auto; min-width:0; align-self:stretch; min-height:calc(100vh - var(--tt-space-4));
          margin:var(--tt-space-2) var(--tt-space-2) var(--tt-space-2) 0; background:var(--tt-surface);
          border-radius:var(--tt-radius-lg); box-shadow:var(--tt-shadow-sm), var(--tt-ring-panel); }
  .shell-main { flex:1 1 auto; min-width:0; }
  /* The first thing in the page, off-screen until focused: it skips the whole sidebar. */
  .skip { position:absolute; left:var(--tt-space-2); top:var(--tt-space-2); z-index:10; background:var(--tt-sunken);
          color:var(--tt-fg); padding:var(--tt-space-2) var(--tt-space-3);
          border:1px solid var(--tt-line); border-radius:var(--tt-radius-md);
          text-decoration:none; font-size:var(--tt-text-sm); }
  .skip:not(:focus) { clip-path:inset(50%); width:1px; height:1px; padding:0; border:0; overflow:hidden; }

  /* The studio's mark and BACKLOT on one 48px row, level with the shell bar (D219: the logo slims). */
  .brand { display:flex; align-items:center; height:var(--bar-h); line-height:1; }
  .brand--official { height:auto; justify-content:center; padding-block:var(--tt-space-4); }
  /* THE NAV IS A HEIGHT BUDGET (sidebar-fit.test.ts): 34px rows 2 apart, groups 16 apart, the air
     above capped by the window. No group has a heading: the air between them is what groups them,
     and one hairline sets the admin rows apart. The rows draw their focus ring INSET, because this
     box scrolls and a scroll container clips anything drawn outside it. */
  .app-sidebar nav { margin-top:min(var(--brand-air), 4vh); position:relative; display:flex; flex-direction:column; gap:var(--tt-space-4);
                 min-height:0; overflow-y:auto; flex:none; }
  .nav-group { display:flex; flex-direction:column; gap:var(--nav-row-gap); }
  .nav-admin { padding-top:var(--tt-space-4); border-top:1px solid var(--tt-line-subtle); }
  .nav-item { display:flex; align-items:center; gap:var(--tt-space-3); min-height:var(--nav-h); padding:0 var(--tt-space-3);
              text-decoration:none; color:var(--tt-fg-muted); font-size:var(--tt-text-sm);
              font-weight:var(--tt-weight-normal); border-radius:var(--tt-radius-md);
              transition:background-color .12s ease, color .12s ease; }
  .nav-item:hover { color:var(--tt-fg); background:var(--tt-hover); }
  .nav-item:focus-visible { outline-offset:-2px; }
  .nav-active { color:var(--tt-fg); font-weight:var(--tt-weight-medium); background:var(--tt-raised);
                box-shadow:var(--tt-shadow-sm), var(--tt-ring-panel); }

  /* The foot is pinned: who you are, the theme, and the way out. */
  .foot { margin-top:auto; padding-top:var(--tt-space-3); display:flex; flex-direction:column; gap:var(--nav-row-gap);
          border-top:1px solid var(--tt-line-subtle); font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .foot-name { color:var(--tt-fg); font-weight:var(--tt-weight-medium); min-width:0; overflow-wrap:break-word; }
  .foot-studio { text-transform:uppercase; letter-spacing:.08em; font-size:var(--tt-text-xs); }
  .foot-out { margin-top:var(--tt-space-1); color:var(--tt-fg-muted); text-decoration:none; font-size:var(--tt-text-xs);
              text-transform:uppercase; letter-spacing:.08em; white-space:nowrap; }
  .foot-out:hover { color:var(--tt-fg); }

  /* The shell bar (D219): ONE 48px row. Trail and facts at the left, the page's controls, then
     search, New, Ask Egon and you. Dustin: "take advantage of EVERY pixel of app screen space." */
  .bar { max-width:var(--content-max); margin-inline:auto; height:var(--bar-h); padding:0 var(--tt-space-6) 0 var(--inset);
         display:flex; align-items:center; gap:var(--tt-space-3); }
  .bar-left { flex:1 1 auto; min-width:0; display:flex; align-items:center; gap:var(--tt-space-3); }
  /* The trail keeps its own width (up to most of the row) and the facts take what is left. */
  .bar-crumbs { flex:none; min-width:0; max-width:70%; }
  /* Grid, not flex: spare width is shared equally and each crumb stops at its own length, so short crumbs stay whole
     and only the longest one ellipsizes. Flex shrinks every crumb a little and clips them all. */
  .bar-crumbs ol { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0, auto); justify-content:start;
                   align-items:center; min-width:0; margin:0; padding:0; list-style:none; }
  .bar-crumb { display:flex; align-items:center; min-width:0; font-size:var(--tt-text-sm); color:var(--tt-fg-muted); }
  .bar-crumb a { display:inline-flex; align-items:center; min-width:0; overflow:hidden; min-height:var(--control); color:inherit; text-decoration:none; }
  .bar-crumb a:hover { color:var(--tt-fg); text-decoration:underline; }
  .bar-sep { flex:none; padding:0 var(--tt-space-2); color:var(--tt-fg-muted); }
  .bar-crumb-fold { display:none; }
  /* A long name earlier in the trail gives way to the page's own; its title attribute holds it whole. */
  .bar-crumb-label { display:block; min-width:0; max-width:16rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .menu-panel > .me-egon { display:none; }
  .bar-crumb--current { min-width:0; }
  .bar-title { margin:0; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
               font-size:var(--tt-text-sm); line-height:1.3; font-weight:var(--tt-weight-medium); color:var(--tt-fg); letter-spacing:0; }
  /* A fact that does not fit wraps to a second line the bar's height hides: it goes whole, never clipped. */
  .bar-meta { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); flex:0 1 auto; min-width:0;
              height:var(--chip-h); overflow:hidden; margin:0; padding:0; list-style:none; }
  .bar-meta > li { flex:none; white-space:nowrap; }
  /* An empty first item a chip tall, so the first fact wraps away whole too, instead of sitting cut in a box
     too narrow for it (a board's "4 open · 1 done" under its Filter at 1180). */
  .bar-meta::before { content:""; flex:none; width:0; height:var(--chip-h); margin-inline-end:calc(-1 * var(--tt-space-2)); }
  .bar-controls { display:flex; align-items:center; gap:var(--tt-space-2); flex:none; }
  .bar-sub { display:none; }
  /* D80: the admin's Settings sits at the sidebar's foot, below a hairline. */
  .app-sidebar > .nav-admin { margin-top:auto; }
  /* The global controls: + New, Ask Egon, you. The menus are <details>, so they need no script. */
  /* The controls hold one row and never shrink; a long title wraps beside them instead (a wrapped row
     of controls landed on the page's first control). On a phone the whole topbar wraps (below). */
  .bar-global { display:flex; align-items:center; gap:var(--tt-space-2); flex-wrap:nowrap; flex-shrink:0;
                justify-content:flex-end; }
  .menu { position:relative; }
  .menu > summary { list-style:none; cursor:pointer; }
  .menu > summary::-webkit-details-marker { display:none; }
  .menu-panel { position:absolute; right:0; top:calc(100% + var(--tt-space-1)); z-index:20; min-width:13rem;
                display:flex; flex-direction:column; gap:var(--nav-row-gap); padding:var(--tt-space-2);
                background:var(--tt-surface); border:1px solid var(--tt-line); border-radius:var(--tt-radius-md); }
  .menu-panel > a { display:flex; align-items:center; min-height:var(--control); padding:0 var(--tt-space-3);
                    border-radius:var(--tt-radius-md); text-decoration:none; color:var(--tt-fg); font-size:var(--tt-text-sm); }
  .menu-panel > a:hover { background:var(--tt-hover); }
  .menu-me .menu-panel { padding:var(--tt-space-3); gap:var(--tt-space-1); font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .me { display:inline-flex position:relative; }
  .me-dot { position:absolute; top:calc(var(--dot-sm) / -2); right:calc(var(--dot-sm) / -2); width:var(--dot); height:var(--dot); border-radius:50%; background:var(--tt-warn-text); box-shadow:0 0 0 2px var(--tt-surface); }
  .me-new { margin-left:var(--tt-space-2); padding:0 var(--tt-space-1); border-radius:var(--tt-radius-full); background:var(--tt-hover); color:var(--tt-fg); font-size:var(--tt-text-xs); }
  .search-page-form { margin-bottom:var(--tt-space-6); }
  .search-page-row { display:flex; gap:var(--tt-space-2); }
  .search-page-row input { flex:1 1 auto; min-width:0; max-width:var(--measure); }
  .search-hits { display:flex; flex-direction:column; gap:var(--tt-space-2); margin:0; padding:0; list-style:none; }
  .search-hits li { display:flex; flex-wrap:wrap; align-items:baseline; column-gap:var(--tt-space-2); }
  .search-hits a { display:inline-flex; align-items:center; min-height:var(--control); }
  .avatar { display:inline-flex; align-items:center; justify-content:center; width:var(--control); height:var(--control);
            border-radius:var(--tt-radius-full); background:var(--tt-accent-solid); border:0; color:var(--tt-accent-contrast);
            font-size:var(--tt-text-xs); font-weight:var(--tt-weight-semibold); box-shadow:var(--tt-shadow-sm); }
  .btn--active { background:var(--tt-hover); }
  /* The open area's tabs, in the bar as one switch; on a phone they slide in the row under it. */
  .bar-tabs { flex-wrap:nowrap; }

  /* ---- the content column ---- */
  .content { padding:var(--tt-space-3) var(--inset) var(--tt-space-12); max-width:var(--content-max); margin-inline:auto; min-width:0;
             display:flex; flex-direction:column; gap:var(--block-gap); }
  .content > * { min-width:0; }
  /* Tables take the width; running text keeps a length a person can read. */
  .content :is(p, dd) { max-width:var(--measure-text); }
  /* A form or a single decision is narrow whatever the window; tables take the full width. It
     starts where the title starts — a centred column under a left-aligned heading begins at a
     different x than the words above it. */
  .content .narrow { width:100%; max-width:var(--measure); margin:0; }
  .content .narrow-wide { width:100%; max-width:var(--measure-wide); margin:0; }

  /* ---- signed out: one centred decision under the studio's mark ---- */
  body.auth { min-height:100vh; display:flex; flex-direction:column; justify-content:center;
              padding:0 var(--gutter) calc(6vh + var(--safe-b)); }
  .auth-main { width:100%; max-width:var(--measure); margin:0 auto; display:flex;
               flex-direction:column; gap:var(--tt-space-6); }
  .auth-body { display:flex; flex-direction:column; }
}

@layer bl-components {
  /* Basecoat sizes .field > select to its longest option (width:fit-content), so one long franchise name
     pushed the page sideways on a phone and slid under the button beside it. Never wider than its box. */
  .field > select { max-width:min(100%, var(--measure)); }
  /* ---- icon: 16px strokes in the text's colour, always beside a word ---- */
  .icon { width:var(--icon); height:var(--icon); flex:none; display:block; }

  /* ---- btn: the one control. Neutral by default; primary is opt-in and rare ---- */
  :where(button, .btn, .empty-action, .topbar-action) {
          display:inline-flex; align-items:center; justify-content:center; gap:var(--tt-space-2);
          min-height:var(--control); min-width:var(--control); padding:0 var(--tt-space-3); margin:0;
          font:inherit; font-size:var(--tt-text-sm); font-weight:var(--tt-weight-medium); line-height:1.2;
          color:var(--tt-fg); background:var(--tt-raised); border:1px solid var(--tt-line); box-shadow:var(--tt-shadow-xs);
          border-radius:var(--tt-radius-md); text-decoration:none; white-space:nowrap; cursor:pointer;
          transition:background-color .12s ease, border-color .12s ease, color .12s ease; }
  :where(button, .btn, .empty-action):hover { background:var(--tt-surface-2); border-color:var(--tt-line-strong); }
  /* Primary: the accent's job (design system rule 4). One per surface: the thing it exists to do. */
  :where(.btn--primary, .topbar-action) { background:var(--tt-accent-solid); color:var(--tt-accent-contrast);
          border-color:transparent; box-shadow:var(--tt-shadow-sm); }
  :where(.btn--primary, .topbar-action):hover { background:var(--tt-accent-solid-hover); border-color:transparent; }
  /* Quiet: a secondary action in a row. No box until it is pointed at; the target is unchanged. */
  .btn--quiet { border-color:transparent; background:transparent; color:var(--tt-fg-muted); box-shadow:none; }
  /* An icon on its own (the shell bar's Search and Ask Egon): square, and named by aria-label. */
  .btn--icon { width:var(--control); padding:0; justify-content:center; }
  /* Ask Egon moves into your menu on a phone (D219 mock), so the page's name keeps its room. */
  @media (max-width:640px) { .btn.bar-egon { display:none; } }
  .btn--quiet:hover { color:var(--tt-fg); background:var(--tt-hover); border-color:transparent; }
  .btn--danger { border-color:var(--tt-bad-border); background:var(--tt-bad-soft); color:var(--tt-bad-text); box-shadow:none; }
  .btn--danger:hover { background:var(--tt-bad-soft-hover); border-color:var(--tt-bad-border); }
  /* Pressed: every kind answers the click the same way, one step darker than its hover. */
  :where(button, .btn):active { background:var(--tt-pressed); }
  :where(.btn--primary, .topbar-action):active { background:var(--tt-accent-solid-hover); }
  .btn--full { width:100%; }
  /* A disabled control must LOOK dead, and the cursor says so before the press. */
  :where(button):disabled, .btn[aria-disabled="true"] { opacity:.45; cursor:not-allowed; }
  :where(button):disabled:hover, .btn[aria-disabled="true"]:hover { background:var(--tt-raised); border-color:var(--tt-line); }

  /* ---- chip: a small label; chip-option: a selectable pill in a chip-group ---- */
  .chip { display:inline-flex; align-items:center; gap:var(--tt-space-1); min-height:var(--chip-h);
          width:fit-content; padding:0 var(--tt-space-2); border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-full);
          background:var(--tt-hover); color:var(--tt-fg-muted); font-size:var(--tt-text-xs);
          font-weight:var(--tt-weight-medium); white-space:nowrap; vertical-align:middle; }
  a.chip { min-height:var(--control); min-width:var(--control-h-touch); justify-content:center;
           padding:0 var(--tt-space-3); background:var(--tt-surface);
           border-color:var(--tt-line); color:var(--tt-fg); font-size:var(--tt-text-sm); text-decoration:none; }
  a.chip:hover { background:var(--tt-hover); }
  .chip-group { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); border:0; padding:0; margin:0; }
  .chip-group > legend { padding:0; margin-bottom:var(--tt-space-2); }
  /* The control is the PILL. The input inside it is invisible but still the thing that is focused
     and checked, so a keyboard reaches it and a screen reader hears a real radio or checkbox. */
  .chip-option { position:relative; display:inline-flex; align-items:center;
          gap:var(--tt-space-2); min-height:var(--control); padding:0 var(--tt-space-3); margin:0;
          border:1px solid var(--tt-line); border-radius:var(--tt-radius-full); background:var(--tt-surface);
          color:var(--tt-fg); font-size:var(--tt-text-sm); font-weight:var(--tt-weight-medium); cursor:pointer; }
  .chip-option input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
  .chip-option:hover { background:var(--tt-hover); }
  .chip-option:has(input:checked) { background:var(--tt-fg); border-color:var(--tt-fg); color:var(--tt-surface); }
  .chip-option:has(input:focus-visible) { outline:var(--focus-ring); outline-offset:var(--focus-offset); }

  /* ---- seg: a segmented control — one choice of a few, each a link ---- */
  .seg, .theme-pick { display:inline-flex; flex-wrap:wrap; align-items:stretch; gap:var(--track);
          padding:var(--track); width:fit-content; max-width:100%; align-self:flex-start;
          border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md); background:var(--tt-surface-2); }
  /* With a mouse the whole control is one 36px row; on touch each option IS the 44px target. */
  .seg__opt, .theme-opt { display:inline-flex; align-items:center; justify-content:center; gap:var(--tt-space-2);
          min-height:calc(var(--control) - var(--track) * 3); min-width:var(--control); flex-shrink:0; padding:0 var(--tt-space-3); border-radius:var(--tt-radius-sm);
          color:var(--tt-fg-muted); text-decoration:none; font-size:var(--tt-text-sm);
          font-weight:var(--tt-weight-medium); white-space:nowrap; }
  .seg__opt:hover, .theme-opt:hover { color:var(--tt-fg); background:var(--tt-hover); }
  /* The ring is drawn inside the option, so the track never clips it. */
  .seg__opt:focus-visible, .theme-opt:focus-visible { outline-offset:-2px; }
  /* Current is a fill AND ink, so it does not rest on colour alone. */
  .seg__opt[aria-current], .theme-opt[aria-pressed="true"] { color:var(--tt-fg); background:var(--tt-raised);
          box-shadow:var(--tt-shadow-sm), var(--tt-ring-panel); font-weight:var(--tt-weight-semibold); }

  /* ---- the theme control: the sidebar's foot on a desktop, the page's foot on a phone ---- */
  .theme-label { display:block; font-size:var(--tt-text-xs); text-transform:uppercase;
                 letter-spacing:.08em; color:var(--tt-fg-muted); margin:var(--tt-space-2) 0 var(--tt-space-1); }
  .theme-foot { display:none; }
  /* The sidebar is a measured width: its three options are words. The page-foot copy carries icons. */
  .foot .theme-opt .icon { display:none; }

  /* Rows out of view are said out loud: the script shows this only while some are. */
  .nav-more { align-self:stretch; justify-content:space-between; margin-top:var(--tt-space-1); font-size:var(--tt-text-xs);
              color:var(--tt-fg-muted); }
  .nav-more .icon { transform:rotate(90deg); }
  .nav-more[hidden] { display:none; }
  .nav-more[data-back] .icon { transform:rotate(-90deg); }

  /* The nav's icons are a shape to find a row by, quieter than its word until the row is yours. */
  .nav-item .icon { color:var(--tt-fg-muted); transition:color .12s ease; }
  .nav-item:hover .icon { color:inherit; }
  .nav-active .icon { color:var(--tt-accent-text); }

  /* ---- banner: a sentence about the screen. Neutral ink; the dot carries the status ---- */
  .banner { display:flex; align-items:flex-start; gap:var(--tt-space-3); margin:0;
          padding:var(--tt-space-3) var(--tt-space-4); border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md);
          background:var(--tt-sunken); color:var(--tt-fg); font-size:var(--tt-text-base); line-height:1.5; }
  .banner::before { content:""; flex:none; width:var(--dot); height:var(--dot);
          margin-top:calc((1lh - var(--dot)) / 2); border-radius:50%; background:var(--tt-fg-muted); }
  .banner--ok::before { background:var(--tt-ok-text); }
  .banner--error::before { background:var(--tt-bad-text); }

  /* ---- dot: the ONLY colour in the interface. Always beside words that say the same thing ---- */
  .dot { display:inline-block; flex:none; width:var(--dot); height:var(--dot); border-radius:50%; background:var(--tt-fg-muted); }
  .dot--ok { background:var(--tt-ok-text); }
  .dot--bad { background:var(--tt-bad-text); }
  .dot--warn { background:var(--tt-warn-text); }
  .status-dot { display:inline-flex; align-items:center; gap:var(--tt-space-2); }

  /* ---- slate: a production stage, drawn as a clapperboard chip ---- */
  .slate { display:inline-flex; align-items:stretch; min-height:var(--chip-h); width:fit-content;
           border:1px solid var(--tt-fg); vertical-align:middle;
           border-radius:var(--tt-radius-sm); font-family:var(--tt-font-mono); font-size:var(--tt-text-xs);
           font-weight:var(--tt-weight-medium); text-transform:uppercase; letter-spacing:.04em;
           line-height:1; white-space:nowrap; overflow:hidden; }
  .slate::before { content:""; width:var(--dot); flex:none;
           background:repeating-linear-gradient(-45deg, var(--tt-fg) 0 var(--stripe), var(--tt-surface) var(--stripe) calc(var(--stripe) * 2)); }
  .slate__no { display:inline-flex; align-items:center; padding:0 var(--tt-space-1);
               background:var(--tt-fg); color:var(--tt-surface); font-variant-numeric:tabular-nums; }
  .slate__label { display:inline-flex; align-items:center; padding:0 var(--tt-space-2); color:var(--tt-fg); }

  /* ---- tc and money: durations and money, and ONLY those, in mono with fixed-width digits.
     A figure column is right-aligned and tabular, but its header and any words in it ("Nothing
     logged") stay in the sans: mono is a property of the figure, not of the column. ---- */
  .tc, .money { font-family:var(--tt-font-mono); font-variant-numeric:tabular-nums; letter-spacing:0;
                white-space:nowrap; }
  th.num, td.num { text-align:right; font-variant-numeric:tabular-nums; }

  /* ---- table: wrapped so it scrolls ITSELF, never the page ---- */
  .table-scroll { position:relative; max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; }
  .table-scroll:focus-visible { outline-offset:-2px; }
  td.actions, th.actions { text-align:right; white-space:nowrap; }
  td.dim { color:var(--tt-fg-muted); }
  /* A parent row: marked by air and a small upper label, never by indenting its leaves. Its figure
     is the SUBTOTAL, so it is the heaviest number on its row, not the faintest. */
  tr.group td { height:var(--row-h-group); font-size:var(--tt-text-xs); font-weight:var(--tt-weight-medium);
                text-transform:uppercase; letter-spacing:.08em; color:var(--tt-fg-muted); border-bottom:0;
                padding-top:var(--tt-space-4); }
  tr.group td.num { font-size:var(--tt-text-base); font-weight:var(--tt-weight-semibold); color:var(--tt-fg);
                    text-transform:none; letter-spacing:0; }
.indent { padding-left: var(--tt-space-5); }
  tr.leaf td:first-child { color:var(--tt-fg-muted); }
  tr.leaf td.num { font-weight:var(--tt-weight-normal); }

  /* ---- a cluster: a row of controls that wraps — an input that grows, then its buttons ---- */
  .cluster { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); }
  .cluster > .sub { margin:0; }
  .cluster > input { flex:1 1 16rem; width:auto; min-width:0; }
  .content .cluster > input { max-width:var(--measure-text); }
  @media (max-width:900px) { .cluster > input { flex-basis:100%; } }

  /* ---- pager: previous / where you are / next, one height ---- */
  .range-custom > summary { list-style:none; }
  .range-custom > summary::-webkit-details-marker { display:none; }
  .range-custom[open] > summary { margin-bottom:var(--tt-space-2); }
  .pager { display:flex; align-items:center; gap:var(--tt-space-2); flex-wrap:wrap; }

  /* Spacing system (D89): controls never run into each other. Wherever controls sit side by side or
     stack, --space-2 (8px) separates them across and down. The display check's controls-too-close
     rule fails a screen that breaks it. */
  td.actions form, .inline-form { display:inline-flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2);
                                  vertical-align:middle; }
  /* Settings → Franchise lists (D144): a value's rename box and the add row. */
  .inline-form:is(.vl-rename, .vl-add) { flex-wrap:nowrap; max-width:none; }
  .vl-rename input:not([type="hidden"]), .vl-add input { flex:0 1 var(--value-input-w); min-width:0; }
  .vl-add { margin-top:var(--tt-space-4); }
  .vl-add label { flex:none; }
  .cell:has(> :is(.btn, .chip, .inline-form, .select-wrap, .edit-actions)),
  p:has(> .btn ~ .btn) { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); }
  td.actions > .cell { justify-content:flex-end; }
  :is(form, .cluster, .edit-actions):not(.inline-form) + :is(form, .cluster, .edit-actions, .hint):not(.inline-form),
  .hint + :is(form, .cluster):not(.inline-form) { margin-top:var(--tt-space-2); }
  .pager__label { display:inline-flex; align-items:center; min-height:var(--control);
                  font-size:var(--tt-text-sm); font-weight:var(--tt-weight-medium); padding:0 var(--tt-space-2);
                  font-variant-numeric:tabular-nums; }

  /* ---- period: a segmented range plus a From / To form, one toolbar row ---- */
  .period { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-3); }
  .range-form { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2) var(--tt-space-3); }
  .range-field { display:inline-flex; align-items:center; gap:var(--tt-space-2); }
  .range-field label { margin:0; }
  .range-field input[type="date"] { width:auto; min-width:9rem; }

  /* ---- panel: a heading over rows, closed by a rule. No card, no shadow ---- */
  /* drawer: "+ New" opens its form over the page, from the right; full width on a phone */
  .side-drawer { display:none; }
  .side-drawer:target, .drawer--open { display:block; position:fixed; inset:0; z-index:30; }
  .drawer-scrim { position:absolute; inset:0; background:color-mix(in srgb, var(--tt-fg) 24%, transparent); }
  .drawer-panel { position:absolute; top:0; right:0; bottom:0; width:min(100%, var(--measure));
                  overflow-y:auto; padding:var(--tt-space-6); background:var(--tt-surface); border-left:1px solid var(--tt-line);
                  display:flex; flex-direction:column; gap:var(--tt-space-4); }
  .drawer-head { display:flex; align-items:center; justify-content:space-between; gap:var(--tt-space-4); }
  .drawer-head h2 { margin:0; }
  /* D100 polish: one divider on the page, the faint rule under a section's heading row. A section has
     no rule above it (the gap between sections does that work), so no line ever lands on a control.
     Inside a section: 16 between blocks, 24 before the closing action. */
  .panel > :not(:first-child) { margin-top:var(--tt-space-4); }
  .panel > p { margin-bottom:0; }
  .panel > p + :is(.btn, form, .cluster, .form-fold) { margin-top:var(--tt-space-6); }
  /* A form that waits behind its own button: the summary IS the button; open, the form sits under it. */
  .form-fold > summary { list-style:none; cursor:pointer; width:fit-content; }
  .form-fold > summary::-webkit-details-marker { display:none; }
  .form-fold[open] > summary { margin-bottom:var(--tt-space-4); }
  .panel-head { display:flex; align-items:baseline; justify-content:space-between; gap:var(--tt-space-4);
                padding:var(--tt-space-3) 0; border-bottom:1px solid var(--tt-line-subtle); min-height:var(--tt-space-12); }
  .panel-head h2 { margin:0; }
  .panel-head .sub { margin:0; max-width:var(--measure); font-size:var(--tt-text-xs); color:var(--tt-fg-muted); text-align:right; }
  /* A panel whose body waits for a tap: the head is the summary, a chevron turns when it opens. */
  .panel-fold > summary { list-style:none; cursor:pointer; display:grid; align-items:center;
                          grid-template:"title sub mark" auto / minmax(0, 1fr) auto auto; column-gap:var(--tt-space-3); }
  .panel-fold > summary::-webkit-details-marker { display:none; }
  .panel-fold > summary h2 { grid-area:title; }
  .panel-fold > summary .sub { grid-area:sub; }
  .panel-fold > summary::after { grid-area:mark; content:"›" / ""; color:var(--tt-fg-muted); transition:rotate .15s; }
  .panel-fold[open] > summary::after { rotate:90deg; }
  .panel-fold:not([open]) > summary { border-bottom:0; }
  .panel-fold[open] > summary + * { margin-top:var(--tt-space-4); }

  /* A record page: header, Activity on the left, Details on the right (one column on a phone). */
  .record-head { display:flex; align-items:flex-start; gap:var(--tt-space-3); flex-wrap:wrap; padding-bottom:var(--tt-space-4); }
  .record-mark { flex:none; display:inline-flex; align-items:center; justify-content:center;
                 width:var(--tt-control-h); height:var(--tt-control-h); border-radius:var(--tt-radius-md);
                 background:var(--tt-fg); color:var(--tt-surface); font-size:var(--tt-text-sm); font-weight:var(--tt-weight-medium); }
  .record-id { flex:1 1 16rem; min-width:0; overflow-wrap:break-word; }
  .record-crumb { font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .record-title { margin:0; display:flex; align-items:center; flex-wrap:wrap; gap:var(--tt-space-2);
                  font-size:var(--tt-text-xl); text-transform:none; letter-spacing:normal; color:var(--tt-fg); }
  .record-sub { margin:var(--tt-space-1) 0 0; font-size:var(--tt-text-xs); color:var(--tt-fg-muted); overflow-wrap:break-word; }
  .record-actions { flex:none; }

  /* The record header (D109): the facts a producer reads first, the status chips and More beside them
     (BL-FPA-5: the stage is a fact now, so the chips no longer need a row of their own). */
  .rec-head { display:grid; grid-template-columns:minmax(0, 1fr) auto; align-items:start; gap:var(--tt-space-4); }
  .rec-head > .rec-facts { grid-column:1; grid-row:1; }
  .rec-head > .rec-chips { grid-column:2; grid-row:1; justify-content:flex-end; }
  /* The record's panel strip: plain links, 8px apart, wrapping on a phone; nothing touches. */
  .rec-jump { display:flex; flex-wrap:wrap; gap:var(--tt-space-2) var(--tt-space-4); padding-block:var(--tt-space-2); border-block:1px solid var(--tt-line-subtle); font-size:var(--tt-text-sm); }
  .rec-jump a { color:var(--tt-fg-muted); text-decoration:none; padding-block:var(--tt-space-1); }
  .rec-jump a:hover, .rec-jump a:focus-visible { color:var(--tt-fg); text-decoration:underline; }
  /* A finger needs the full 44px target: the strip's links were 28px tall on a phone and a tablet. The space
     between words moves inside each link, so the words keep their 16px gap and left edges line up. */
  @media (max-width:900px), (pointer:coarse) {
    .rec-jump { column-gap:0; }
    .rec-jump a { display:inline-flex; align-items:center; min-height:var(--control); min-width:var(--control);
                  padding-block:0; padding-inline-end:var(--tt-space-4); }
  }
  .rec-chips { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); }
  .rec-more { margin-left:auto; }
  .confirm-dialog { width:min(100% - var(--tt-space-8), 28rem); padding:var(--tt-space-6); color:var(--tt-fg);
                    background:var(--tt-surface); border:1px solid var(--tt-line); border-radius:var(--tt-radius-lg);
                    box-shadow:var(--tt-shadow-lg); }
  .confirm-dialog[open] { display:flex; flex-direction:column; gap:var(--tt-space-3); }
  .confirm-dialog:not(:modal) { position:static; margin:0; }
  .confirm-dialog::backdrop { background:color-mix(in srgb, var(--tt-surface) 60%, transparent); }
  .confirm-dialog h2 { margin:0; font-size:var(--tt-text-xl); overflow-wrap:break-word; }
  .confirm-dialog p { margin:0; }
  .confirm-dialog-label { font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .confirm-dialog-counts { margin:0; padding-left:var(--tt-space-5); }
  .confirm-dialog-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center;
                            gap:var(--tt-space-3); margin-top:var(--tt-space-2); }
  .confirm-dialog-actions form { display:contents; }
  /* Poster test card page (poster-testing C1): the Rating box and the card at full width. */
  .ptc-rating { display:flex; align-items:center; gap:var(--tt-space-3); flex-wrap:wrap; margin:var(--tt-space-4) 0; }
  .ptc-card { margin:var(--tt-space-4) 0 0; }
  .ptc-card svg { display:block; width:100%; height:auto; }
  .ptc-download { display:flex; align-items:center; gap:var(--tt-space-3); flex-wrap:wrap; margin-top:var(--tt-space-4); }
  .ptc-download .sub { margin:0; }
  .ptc-links { margin-top:var(--tt-space-4); }
  /* "Preview test card" and "Back to the project" stand alone, so each is a 44px target for a finger (they were 18px). */
  @media (max-width:900px), (pointer:coarse) {
    .ptc-links > a { display:inline-flex; align-items:center; min-height:var(--control); }
  }
  .rec-facts { display:flex; flex-wrap:wrap; gap:var(--tt-space-4) var(--tt-space-10); margin:0; }
  .rec-facts > div { min-width:0; max-width:var(--measure); }
  .rec-facts dt { font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .rec-facts dd { margin:var(--tt-space-1) 0 0; font-weight:var(--tt-weight-medium); overflow-wrap:break-word; }

  /* On a record every section is a card (Dustin 2026-11-11: "cards and containers"). The card's border
     is the container, so its heading row needs no rule, and an empty section is one quiet line. */
  /* The intake sections arrive in one wrapper; on a record each is a card of its own. */
  .record-main > #vetting { display:contents; }
  .record-main > #vetting > :not(.panel) { justify-self:start; order:-1; }
  .record-main > .banner { max-width:none; order:-2; }
  :is(.record-main, .record-aside, #vetting, .card-stack) > .panel { border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-lg);
          background:var(--tt-raised); padding:var(--tt-space-4) var(--tt-space-5); }
  :is(.record-main, .record-aside, #vetting, .card-stack) > .panel > .panel-head { border-bottom:0; padding:0; min-height:0; }
  /* A phone keeps the card's edge but gives the room back to the content: a stacked table row inside a
     card had 238px at 320 for a stage chip that needs 271. */
  @media (max-width:600px) {
    :is(.record-main, .record-aside, #vetting, .card-stack) > .panel { padding:var(--tt-space-4) var(--tt-space-3); }
    .record-grid .table--stack td[data-label] { grid-template-columns:minmax(0, 6rem) minmax(0, 1fr); }
    /* A card's heading keeps its Edit on the same line; the sub-line drops below. */
    :is(.record-main, .record-aside, #vetting, .card-stack) > .panel > .panel-head { flex-direction:row; flex-wrap:wrap;
          align-items:baseline; justify-content:space-between; }
  }
  :is(.record-grid, .record-main, .record-aside, .card-stack) .empty { max-width:none; border:0; background:none; padding:0;
          gap:var(--tt-space-2); }
  :is(.record-grid, .record-main, .record-aside, .card-stack) .empty-what { font-size:var(--tt-text-base); font-weight:var(--tt-weight-normal); color:var(--tt-fg-muted);
          letter-spacing:normal; }
  /* Inside a card the picture shrinks and the button stays outlined: one filled button per surface. */
  :is(.record-grid, .record-main, .record-aside, .card-stack) .empty-icon { width:var(--tt-space-8); height:var(--tt-space-8); }
  :is(.record-grid, .record-main, .record-aside, .card-stack) .empty-icon svg { width:var(--icon); height:var(--icon); }
  :is(.record-grid, .record-main, .record-aside, .card-stack) .empty .empty-action { background:var(--tt-surface); color:var(--tt-fg);
          border-color:var(--tt-line); }
  :is(.record-grid, .record-main, .record-aside, .card-stack) .empty .empty-action:hover { background:var(--tt-hover);
          border-color:var(--tt-fg-muted); }
  /* The next step (D234): the cards on the left, the Decision history beside them; one column on a phone. */
  .next-step-grid { display:grid; gap:var(--tt-space-4); grid-template-columns:minmax(0, 1fr); align-items:start; }
  .next-step-col, .next-step-aside { display:grid; gap:var(--tt-space-4); align-content:start; min-width:0; }
  .record-main > #vetting > .next-step-grid { justify-self:stretch; order:0; }
  :is(.next-step-col, .next-step-aside) > .panel { border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-lg);
          background:var(--tt-raised); padding:var(--tt-space-4) var(--tt-space-5); }
  :is(.next-step-col, .next-step-aside) > .panel > .panel-head { border-bottom:0; padding:0; min-height:0; }
  @media (max-width:600px) { :is(.next-step-col, .next-step-aside) > .panel { padding:var(--tt-space-4) var(--tt-space-3); } }
  @media (min-width: 64rem) { .next-step-grid { grid-template-columns:minmax(0, 1fr) minmax(0, 20rem); } }
  .ns-form { display:grid; gap:var(--tt-space-3); margin:0; }
  .ns-pills { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); min-width:0; margin:0; padding:0; border:0; }
  .ns-why { display:grid; gap:var(--tt-space-1); font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .ns-why textarea { box-sizing:border-box; width:100%; resize:vertical; font:inherit; font-size:var(--tt-text-md); color:var(--tt-fg); }
  .ns-actions { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-3); }
  .ns-actions .hint { margin:0; flex:1 1 12rem; min-width:0; }
  .ns-now { margin:0 0 var(--tt-space-2); font-weight:var(--tt-weight-medium); }
  .ns-history { display:grid; gap:var(--tt-space-2); margin:0; padding:0; list-style:none; }
  .ns-when { color:var(--tt-fg-muted); font-size:var(--tt-text-xs); }
  .bs-row { display:grid; gap:var(--tt-space-1); padding:var(--tt-space-3) 0; border-top:1px solid var(--tt-line-subtle); }
  .bs-row:first-of-type { border-top:0; padding-top:0; }
  .bs-pills { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); min-width:0; margin:0; padding:0; border:0; }
  .bs-pills legend { padding:0; margin:0 0 var(--tt-space-2); font-weight:var(--tt-weight-medium); }
  .bs-rubric { display:flex; flex-wrap:wrap; gap:0 var(--tt-space-4); }
  .bs-rubric, .bs-team { margin:0; color:var(--tt-fg-muted); font-size:var(--tt-text-xs); overflow-wrap:break-word; }
  .ns-reason { display:block; overflow-wrap:break-word; }
  /* A screen of cards (Home): the same card as a record's, stacked with the record's gap. */
  .card-stack { display:grid; gap:var(--tt-space-4); }
  .card-stack > .panel { margin:0; }
  .record-grid { display:grid; gap:var(--tt-space-6); grid-template-columns:minmax(0, 1fr); }
  /* Two columns only once the main one keeps 35rem beside the sidebar and the 24rem aside (1280 wide);
     at 1024 it was 19rem and the Titles table ran under Details. */
  @media (min-width: 80rem) { .record-grid { grid-template-columns:minmax(0, 1fr) minmax(0, 24rem); } }
  .record-main, .record-aside { min-width:0; display:grid; gap:var(--tt-space-4); align-content:start; }
  .attrs { margin:0; }
  .attr { display:grid; grid-template-columns:minmax(0, 8rem) minmax(0, 1fr); gap:var(--tt-space-3);
          padding:var(--tt-space-2) 0; border-bottom:1px solid var(--tt-line-subtle); overflow-wrap:break-word; }
  .attr dt { color:var(--tt-fg-muted); font-size:var(--tt-text-xs); }
  .attr dd { margin:0; min-width:0; overflow-wrap:break-word; }
  .attr dd a { max-width:100%; word-break:break-word; }
  /* D105: a detail edited where it sits. With script it reads as text until clicked. The value and its
     open field share one box (a control tall, inset by --space-2 into the label gap), so opening a field
     never moves the row. */
  .inline-edit { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); margin:0; }
  .inline-edit-show, .search-pick-show, .pill-pick-show, .inline-edit :is(input:not([type="hidden"]), select, textarea) { box-sizing:border-box; flex:1 1 0; width:auto; min-width:0;
    min-height:var(--control); height:auto; margin:0 var(--tt-space-2) 0 calc(var(--tt-space-2) * -1); padding:var(--tt-space-2);
    border:1px solid transparent; border-radius:var(--tt-radius-sm); font:inherit; line-height:inherit; }
  .inline-edit :is(input:not([type="hidden"]), select, textarea) { border-color:var(--tt-fg); }
  /* On a phone the open field is 16px (iOS zooms below that), so its text at rest is 16px too. */
  @media (max-width:900px), (pointer:coarse) {
    .inline-edit-show, .search-pick-show, .pill-pick-show, .inline-edit :is(input:not([type="hidden"]), select, textarea), .vet-compose :is(input, select, textarea), .search-page-row input { font-size:var(--tt-text-md); }
  }
  .inline-edit .field-error { flex-basis:100%; margin:0; }
  .inline-edit { position:relative; }
  .inline-edit-status { position:absolute; inset-block-start:0; inset-inline-end:0; z-index:1; display:flex; align-items:center; height:var(--control);
    padding:0 var(--tt-space-2); background:var(--tt-raised); border-radius:var(--tt-radius-sm); color:var(--tt-fg-muted); font-size:var(--tt-text-xs); pointer-events:none; }
  .inline-edit-status:empty { display:none; }
  /* While "Saving…" or "Saved" shows, the value keeps clear of it, so wrapped text never runs under it. */
  .inline-edit-status { box-sizing:border-box; max-width:var(--inline-status-w); }
  .inline-edit:has(> .inline-edit-status:not(:empty)) :is(.inline-edit-show, input:not([type="hidden"]), select, textarea) { padding-inline-end:var(--inline-status-w); }
  .attr:has(.inline-edit) dt { padding-top:var(--tt-space-2); }
  .inline-edit-show, .search-pick-show, .pill-pick-show { display:flex; align-items:flex-start; justify-content:flex-start; background:none; color:inherit; font:inherit;
    line-height:inherit; text-align:left; white-space:normal; overflow-wrap:break-word; word-break:break-word; cursor:text;
    border-color:transparent; box-shadow:none; }
  :is(.inline-edit-show, .search-pick-show, .pill-pick-show):focus-visible { outline:var(--focus-ring); outline-offset:var(--focus-offset); }
  @media (pointer:fine) { :is(.inline-edit-show, .search-pick-show, .pill-pick-show):hover { background:var(--tt-hover); } }
  .inline-edit-add, .search-pick-add, .pill-pick-add { color:var(--tt-fg-muted); }
  /* An empty field's "Add" in a narrow table column still gets a finger's width. */
  .inline-edit-show.inline-edit-add { min-width:var(--control-h-touch); }
  .inline-edit--live:not(.inline-edit--open) > :is(input:not([type="hidden"]), select, textarea), .inline-edit--live .inline-edit-save { display:none; }
  .inline-edit--open .inline-edit-show { display:none; }
  /* The why box under a pick that needs one (Greenlit, D94): with script it shows only while that pick waits. */
  .inline-edit-ask { display:flex; flex-direction:column; flex-basis:100%; gap:var(--tt-space-1); }
  .inline-edit--live .inline-edit-ask:not(.is-asking) { display:none; }
  /* Long text (D136): the box takes the row, keeps its line breaks at rest, and grows by dragging. */
  .inline-edit--long :is(textarea, .inline-edit-show) { flex-basis:100%; }
  .inline-edit--long textarea { min-height:calc(var(--control) * 3); resize:vertical; font-family:inherit; }
  .inline-edit--long .inline-edit-show { white-space:pre-line; }
  .inline-edit--live:not(.inline-edit--open) .rt-tools { display:none; }
  .rt-tools { display:flex; flex-basis:100%; gap:var(--tt-space-1); }
  .rt-tool { min-width:var(--control); }
  .inline-edit--long .inline-edit-show:has(.rt) { white-space:normal; text-align:left; }
  .rt { display:flex; flex-direction:column; gap:var(--tt-space-1); }
  .rt > span { display:block; overflow-wrap:break-word; }
  .rt .rt-h { font-weight:var(--tt-weight-medium); font-size:var(--tt-text-xl); }
  .rt .rt-p { margin:0; }
  .rt .rt-gap { height:var(--tt-space-2); }
  .rt .rt-li { padding-left:var(--tt-space-4); position:relative; }
  .rt .rt-li::before { content:"\2022"; position:absolute; left:var(--tt-space-1); }
  .rt .rt-li--num::before { content:attr(data-n); left:0; }
  .rt code { font-family:var(--tt-font-mono); background:var(--tt-sunken); padding:0 var(--tt-space-1); border-radius:var(--tt-radius-sm); }
  .rt .rt-link { text-decoration:underline; }
  .work-check { align-items:center; }
  .work-check-body { flex:1 1 auto; min-width:0; overflow-wrap:break-word; }
  .work-checklist { margin-top:var(--tt-space-3); }
  .work-check.work-subtask--done .work-check-body { color:var(--tt-fg-muted); text-decoration:line-through; }
  .work-check-remove { opacity:0; }
  .work-check:is(:hover, :focus-within) .work-check-remove { opacity:1; }
  @media (hover:none) { .work-check-remove { opacity:1; } }
  .work-file-list { list-style:none; margin:0 0 var(--tt-space-2); padding:0; display:flex; flex-direction:column; gap:var(--tt-space-1); }
  .work-file { display:flex; align-items:center; gap:var(--tt-space-2); min-height:var(--control); }
  .work-file a { flex:1 1 auto; min-width:0; overflow-wrap:break-word; }
  .work-files { margin-top:var(--tt-space-3); }
  .work-files-add { display:flex; flex-direction:column; gap:var(--tt-space-1); }
  .work-files-pick { align-self:flex-start; cursor:pointer; }
  .work-file-size { color:var(--tt-fg-muted); font-family:var(--tt-font-mono); white-space:nowrap; }
  .work-file:is(:hover, :focus-within) .work-check-remove { opacity:1; }
  .work-files-progress { list-style:none; margin:var(--tt-space-1) 0 0; padding:0; color:var(--tt-fg-muted); }
  .task-tags { display:inline-flex; flex-wrap:wrap; gap:var(--tt-space-1); }
  .task-tag { display:inline-block; padding:0 var(--tt-space-2); border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-full); font-size:var(--tt-text-sm); }
  .work-time { margin-top:var(--tt-space-3); }
  .work-slack { margin-top:var(--tt-space-3); }
  .work-time--over { color:var(--tt-bad-text); }
  .task-dates { display:flex; align-items:center; gap:var(--tt-space-2); flex-wrap:wrap; }
  .task-dates-arrow { color:var(--tt-fg-muted); }
  /* Side panel (D128, D315): a card over the page. The page under it never moves: no
     narrowing, no reflow, no scroll, the same scrollbar. A light scrim says the panel is on top; a click
     on it closes the panel (it is a link back to the list). A full-height sheet on a phone. */
  .side-panel-scrim { position:fixed; inset:0; z-index:24; background:color-mix(in srgb, var(--tt-fg) 14%, transparent);
                      -webkit-tap-highlight-color:transparent; -webkit-touch-callout:none; }
  .side-panel { position:fixed; top:0; right:0; bottom:0; z-index:25; width:min(100%, var(--side-panel-w)); display:flex;
                flex-direction:column; background:var(--tt-raised); border-left:1px solid var(--tt-line-subtle); box-shadow:var(--tt-shadow-lg); }
  .side-panel-head { display:flex; align-items:center; gap:var(--tt-space-2); padding:var(--tt-space-3) var(--tt-space-4);
                     border-bottom:1px solid var(--tt-line-subtle); }
  /* On the narrowest phones the head keeps the icon and close; the words stay for screen readers. */
  @media (max-width:22.5rem) {
    .side-panel-head a.btn > span { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  }
  .side-panel-title { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:var(--tt-space-1); }
  .side-panel-title h2 { margin:0; font-size:var(--tt-text-md); overflow-wrap:break-word; }
  .side-panel-sub { margin:0; display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); color:var(--tt-fg-muted);
                    font-size:var(--tt-text-sm); }
  .side-panel-icon { flex:none; width:var(--control); padding:0; }
  /* The panel's ⋯ menu (SME audit item 2): an admin's rename and status, each a small form. The menu
     is placed from the head, not its button, so it opens inside the panel on a phone too. */
  .side-panel-head { position:relative; }
  .side-panel-more { position:static; flex:none; }
  .side-panel-more-panel { right:var(--tt-space-4); top:calc(100% - var(--tt-space-2));
                           width:min(var(--menu-form-w), calc(100% - 2 * var(--tt-space-4)));
                           gap:var(--tt-space-4); padding:var(--tt-space-4); }
  .side-panel-more-form { display:grid; gap:var(--tt-space-4); }
  .side-panel-more-form + .side-panel-more-form { padding-top:var(--tt-space-4); border-top:1px solid var(--tt-line-subtle); }
  .side-panel-more-form :is(input:not([type="hidden"]):not([type="radio"]), select) { box-sizing:border-box; width:100%; }
  .side-panel-more-set { display:grid; gap:0; margin:0; padding:0; border:0; }
  .side-panel-more-set legend { padding:0; margin-bottom:var(--tt-space-2); }
  .side-panel-more-set label { display:flex; align-items:center; gap:var(--tt-space-2); min-height:var(--control); }
  .side-panel-initial { flex:none; display:grid; place-items:center; width:var(--control); height:var(--control);
                        border-radius:var(--tt-radius-full); background:var(--tt-accent-soft); color:var(--tt-accent-text); font-weight:var(--tt-weight-semibold); }
  .side-panel-body { flex:1 1 auto; overflow-y:auto; overscroll-behavior:contain; padding:var(--tt-space-4); display:flex; flex-direction:column;
                     gap:var(--tt-space-3); }
  .side-panel-foot { flex:none; display:flex; justify-content:flex-end; padding:var(--tt-space-3) var(--tt-space-4); border-top:1px solid var(--tt-line-subtle); }
  /* A folding card (D138): the summary is the card's head, the chevron turns when it is open. */
  .side-panel-group { border-bottom:1px solid var(--tt-line-subtle); padding-bottom:var(--tt-space-2); }
  .side-panel-group > summary { display:flex; align-items:center; gap:var(--tt-space-2); min-height:var(--control);
                                cursor:pointer; list-style:none; }
  .side-panel-group > summary::-webkit-details-marker { display:none; }
  .side-panel-group > summary:focus-visible { outline:var(--focus-ring); outline-offset:var(--focus-offset);
                                              border-radius:var(--tt-radius-sm); }
  .side-panel-group > summary > svg { flex:none; color:var(--tt-fg-muted); transition:rotate .15s; }
  .side-panel-group[open] > summary > svg { rotate:90deg; }
  .side-panel-group > summary h3 { flex:1 1 auto; margin:0; font-size:var(--tt-text-sm); }
  .side-panel-score { display:flex; flex-direction:column; align-items:stretch; gap:var(--tt-space-2); min-width:0; }
  .side-panel-score-team { margin:0; color:var(--tt-fg-muted); font-size:var(--tt-text-xs); }
  .side-panel-link { display:inline-flex; align-items:center; min-height:var(--control); }
  .side-panel-vote { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); }
  .side-panel-group-count { color:var(--tt-fg-muted); font-size:var(--tt-text-xs); }
  .side-panel-group > .side-panel-rows { padding-bottom:var(--tt-space-3); }
  .side-panel-sec { display:flex; flex-direction:column; gap:var(--tt-space-2); }
  .side-panel-sec h3 { margin:0; color:var(--tt-fg-muted); font-size:var(--tt-text-sm); }
  .side-panel-rows { margin:0; display:flex; flex-direction:column; gap:var(--tt-space-2); }
  .side-panel-row { display:grid; grid-template-columns:9rem minmax(0, 1fr); gap:var(--tt-space-2); align-items:start; }
  .side-panel-row dt { display:flex; align-items:center; gap:var(--tt-space-2); min-height:var(--control); color:var(--tt-fg-muted);
                       font-size:var(--tt-text-sm); }
  .side-panel-row dd { display:flex; align-items:center; justify-content:flex-end; min-height:var(--control); margin:0; min-width:0;
                       text-align:right; font-size:var(--tt-text-sm); }
  .side-panel-row dt .icon { display:none; }
  .side-panel-row dd :is(.inline-edit-show, .search-pick-show, .pill-pick-show) { justify-content:flex-end; text-align:right; font-size:var(--tt-text-sm); }
  .side-panel-row dd :is(.inline-edit, .search-pick, .pill-pick) { justify-content:flex-end; }
  .side-panel-row dd > form { flex:1 1 auto; min-width:0; }
  .side-panel-open { box-shadow:inset 0 0 0 2px var(--tt-accent-solid); }
  .side-panel-callout { padding:var(--tt-space-3); border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md);
                        background:var(--tt-sunken); }
  .side-panel-feed { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:var(--tt-space-2);
                     font-size:var(--tt-text-sm); }
  .side-panel-feed li { display:flex; align-items:baseline; gap:var(--tt-space-3); }
  .side-panel-feed li > span { flex:1 1 auto; min-width:0; overflow-wrap:break-word; }
  .side-panel-feed time { flex:none; color:var(--tt-fg-muted); white-space:nowrap; }
  @media (max-width: 40rem) {
    /* On a phone the panel is the whole screen, so the page under it is hidden: nothing it covers can be
       tabbed to, read out, or sit against the panel's own controls (a short page's theme rule ended 3px
       from the foot's Open full page). */
    body:has(.side-panel) { visibility:hidden; }
    .side-panel { width:100%; border-left:0; box-shadow:none; visibility:visible; }
    .side-panel-row { grid-template-columns:7.5rem minmax(0, 1fr); }
  }

  /* Pill pick (D130): a short known list; one for type or format, several for genre. A click saves. */
  .pill-pick { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); margin:0; }
  .pill-pick-set { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); min-width:0; margin:0; padding:0; border:0; }
  .pill-pick-pill { position:relative; display:inline-flex; }
  .pill-pick-pill input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
  .pill-pick-pill span { display:inline-flex; align-items:center; min-height:var(--control); padding:0 var(--tt-space-3);
                         border:1px solid var(--tt-line); border-radius:var(--tt-radius-full); background:var(--tt-raised);
                         font-size:var(--tt-text-sm); white-space:nowrap; }
  @media (pointer:fine) { .pill-pick-pill:hover input:not(:checked) + span { background:var(--tt-hover); } }
  .pill-pick-pill input:checked + span { background:var(--tt-fg); border-color:var(--tt-fg); color:var(--tt-surface); }
  .pill-pick-pill input:focus-visible + span { outline:var(--focus-ring); outline-offset:var(--focus-offset); }
  .pill-pick .field-error { flex-basis:100%; margin:0; }
  .pill-pick-status { color:var(--tt-fg-muted); font-size:var(--tt-text-xs); }
  .pill-pick-status:empty { display:none; }
  .field-error:has(> .field-retry) { display:flex; flex-wrap:wrap; align-items:center; column-gap:var(--tt-space-2); }
  .pill-pick-show { flex-wrap:wrap; gap:var(--tt-space-1); cursor:pointer; }
  .pill-pick-hint { display:none; flex-basis:100%; margin:0; color:var(--tt-fg-muted); font-size:var(--tt-text-xs); }
  .pill-pick--live .pill-pick-save, .pill-pick--live:not(.pill-pick--open) .pill-pick-set,
  .pill-pick--open .pill-pick-show { display:none; }
  .pill-pick--open .pill-pick-hint { display:block; }

  /* Search pick (D128): people and long lists picked by typing; a select with a Save without script */
  .search-pick { position:relative; display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); margin:0; }
  .search-pick > select { flex:1 1 0; min-width:0; }
  .search-pick-show { cursor:pointer; }
  .search-pick--live > select, .search-pick--live .search-pick-save { display:none; }
  .search-pick .field-error { flex-basis:100%; margin:0; }
  .search-pick-pop { position:absolute; left:0; right:0; top:calc(100% + var(--tt-space-1)); z-index:5; display:flex;
                     flex-direction:column; gap:var(--tt-space-2); padding:var(--tt-space-2); background:var(--tt-raised);
                     border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md); box-shadow:var(--tt-shadow-lg); }
  .search-pick-pop[hidden], .search-pick-show[hidden] { display:none; }
  .search-pick-input { width:100%; max-width:none; }
  .search-pick-list { list-style:none; margin:0; padding:0; max-height:15rem; overflow-y:auto; display:flex;
                      flex-direction:column; }
  .search-pick-opt { display:flex; align-items:center; gap:var(--tt-space-2); min-height:var(--control);
                     padding:0 var(--tt-space-2); border-radius:var(--tt-radius-sm); cursor:pointer; }
  .search-pick-opt[aria-selected="true"] { background:var(--tt-hover); }
  .search-pick-name { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .search-pick-hint { color:var(--tt-fg-muted); font-size:var(--tt-text-sm); white-space:nowrap; }
  .search-pick-none { color:var(--tt-fg-muted); }
  .search-pick-free .search-pick-name { color:var(--tt-fg); font-weight:var(--tt-weight-medium); }
  .search-pick > .search-pick-text { flex:1 1 100%; }
  .search-pick--live > .search-pick-text { display:none; }
  .search-pick-empty { padding:var(--tt-space-2); color:var(--tt-fg-muted); }
  .search-pick-keys { margin:0; color:var(--tt-fg-muted); font-size:var(--tt-text-xs); }
  @media (pointer:coarse) { .search-pick-keys { display:none; } }
  /* A phone reads a record's Details first: on one column the aside leads (CRM look and feel, Phones). */
  @media (max-width: 79.99rem) { .record-aside { order:-1; } }
  /* The body column is a reading line: rows stop at the text measure on wide screens. */
  .timeline { list-style:none; margin:0; padding:0; }
  .tl-row { display:grid; grid-template-columns:minmax(0, 7rem) minmax(0, 1fr) auto; gap:var(--tt-space-3);
            align-items:start; padding:var(--tt-space-3) 0; border-bottom:1px solid var(--tt-line-subtle); }
  .tl-when { display:grid; gap:var(--tt-space-1); font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .tl-body { min-width:0; max-width:var(--measure-text); overflow-wrap:break-word; }
  .tl-detail { max-width:var(--measure); margin:var(--tt-space-1) 0 0; font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .tl-action { flex:none; }
  /* The record's timeline (CRM): days as quiet headings, one icon-led line each. */
  .ctl-day + .ctl-day { margin-top:var(--tt-space-5); }
  .ctl-day-head { margin:0 0 var(--tt-space-2); font-size:var(--tt-text-xs); font-weight:var(--tt-weight-medium); color:var(--tt-fg-muted); }
  /* The row and its rule stop at the text's measure, not the page's width (2560 drew 188-character rows). */
  .ctl-list { list-style:none; margin:0; padding:0; max-width:calc(1.5rem + var(--tt-space-3) + var(--measure-text)); }
  .ctl-item { display:grid; grid-template-columns:auto minmax(0, 1fr); gap:var(--tt-space-3); align-items:start;
              padding:var(--tt-space-3) 0; border-bottom:1px solid var(--tt-line-subtle); }
  .ctl-mark { display:inline-flex; align-items:center; justify-content:center; width:1.5rem; height:1.5rem;
              border-radius:50%; background:var(--tt-hover); color:var(--tt-fg-muted); }
  .ctl-body { min-width:0; max-width:var(--measure-text); overflow-wrap:break-word; }
  .ctl-label { color:var(--tt-fg); text-decoration:none; }
  a.ctl-label:hover { text-decoration:underline; text-underline-offset:.2em; }
  .ctl-meta { margin:var(--tt-space-1) 0 0; font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .ctl-kind { color:var(--tt-fg-muted); }
  .ctl-more { margin:var(--tt-space-4) 0 0; }
  /* A quoted line under an Activity entry: a note's body, a park reason. */
  .tl-quote { display:block; margin-top:var(--tt-space-1); color:var(--tt-fg); }
  /* Baseline, not centre: a centred pick whose name wraps rides up its baseline-aligned phone cell into the pick above. */
  .merge-pick { display:inline-flex; align-items:baseline; gap:var(--tt-space-2); min-height:var(--control-h-touch); }
  .tag-list { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); margin-bottom:var(--tt-space-2); }
  .tag-list > form { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); max-width:100%; }
  .tag-list :where(.chip, button) { white-space:normal; overflow-wrap:break-word; max-width:100%; }
  @media (min-width: 24rem) { .tag-list > form { flex-wrap:nowrap; } }
  .tag-list > form > .chip { flex:0 1 auto; min-width:0; }
  .tag-list > form > button { flex:none; }
  .add-form { margin-top:var(--tt-space-4); }
  .add-form > .field > label { margin-bottom:var(--tt-space-1); }
  /* Log activity (Kelly UAT C6): Titles pitched shows only once Pitch meeting is picked. */
  .lt-form > .chip-group { margin-bottom:var(--tt-space-4); }
  .lt-form .lt-titles { display:none; }
  .lt-form:has(input[name="kind"][value="pitch_meeting"]:checked) .lt-titles {
    display:grid; gap:var(--tt-space-2); margin-bottom:var(--tt-space-4); }
  .lt-titles > label, .lt-titles > .hint { margin:0; }
  .lt-title-box { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); }
  .lt-title-chips { display:contents; }
  .lt-title-box > input { flex:1 1 12rem; width:auto; min-width:0; max-width:var(--measure-text); }
  .lt-chip { color:var(--tt-fg); }
  .lt-chip > button { border:0; background:none; padding:0 0 0 var(--tt-space-1); color:inherit; cursor:pointer;
    font:inherit; line-height:1; min-height:0; }
  /* C4 Roles form: the new-franchise link sits under the select (design A). */
  .crmrole-form { display:flex; flex-direction:column; gap:var(--tt-space-3); align-items:flex-start; }
  .crmrole-form > .field { margin:0; width:100%; max-width:24rem; }
  .crmrole-new { margin:var(--tt-space-1) 0 0; font-size:var(--tt-text-sm); }
  .crmrole-new a { display:inline-flex; align-items:center; min-height:var(--control-h-touch);
                  font-weight:var(--tt-weight-medium); }
  .crmrole-new .sub { font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  /* Display check: the link was 17px tall at 320-768. A finger gets the full control height on touch. */
  @media (max-width:900px), (pointer:coarse) {
    .crmrole-new a { display:inline-flex; align-items:center; min-height:var(--control); }
  }
  .merge-actions :where(button, .btn) { white-space:normal; text-align:left; overflow-wrap:break-word; max-width:100%; }


  /* ---- total: the headline figure. At most one per screen ---- */
  .total-block { display:flex; flex-direction:column; align-items:flex-end; margin:0;
                 padding:0; }
  .total-label { font-size:var(--tt-text-xs); font-weight:var(--tt-weight-medium); text-transform:uppercase;
                 letter-spacing:.08em; color:var(--tt-fg-muted); }
  .total-value { font-family:var(--tt-font-sans); font-size:var(--tt-text-3xl); font-weight:var(--tt-weight-semibold);
                 letter-spacing:-.03em; line-height:1; font-variant-numeric:tabular-nums;
                 margin:var(--tt-space-3) 0 var(--tt-space-2); }
  .total-value :is(.tc, .money) { font-family:inherit; letter-spacing:inherit; }
  .total-count { font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }

  /* ---- empty: what will be here, how it arrives, the one action ---- */
  /* An empty state is a message, so it stops at the reading measure with the search field and text above. */
  /* Basecoat also has an .empty (a centred flex column); Backlot's is a left-set note, so the
     properties Basecoat sets and this one would not are stated here. */
  .empty { display:block; flex:none; width:auto; text-align:start; text-wrap:wrap; max-width:var(--measure-text); border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md); background:var(--tt-sunken);
           padding:var(--tt-space-6); display:flex; flex-direction:column; gap:var(--tt-space-3);
           align-items:flex-start; }
  .empty-what { margin:0; max-width:var(--measure-text); font-size:var(--tt-text-md); line-height:1.45;
                font-weight:var(--tt-weight-medium); letter-spacing:-.01em; }
  .empty-how { margin:0; max-width:var(--measure-text); color:var(--tt-fg-muted); }
  .empty-icon { display:inline-grid; place-items:center; width:var(--control-h-touch); height:var(--control-h-touch); border-radius:50%;
                background:var(--tt-hover); color:var(--tt-fg); }
  .empty-actions { margin:var(--tt-space-1) 0 0; display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-3); }
  .empty-action { background:var(--tt-fg); color:var(--tt-surface); border-color:var(--tt-fg); }
  .empty-action:hover { background:color-mix(in srgb, var(--tt-fg) 84%, var(--tt-surface)); border-color:var(--tt-fg); }
  .empty-help { display:inline-flex; align-items:center; min-height:var(--control-h-touch); min-width:var(--control-h-touch);
                font-size:var(--tt-text-sm); color:var(--tt-fg-muted); }
  .comps-pick { list-style:none; margin:0; padding:0; max-width:var(--measure-text); border:1px solid var(--tt-line-subtle);
                border-radius:var(--tt-radius-md); }
  .comps-pick li + li { border-top:1px solid var(--tt-line-subtle); }
  .comps-pick-row { display:flex; justify-content:space-between; align-items:center; gap:var(--tt-space-3);
                    min-height:var(--control); padding:var(--tt-space-2) var(--tt-space-3); color:var(--tt-fg); text-decoration:none; }
  .comps-pick-row:hover { background:var(--tt-hover); }

  /* ---- submit-bar: a phone form's primary, pinned to the thumb (phone rules below) ---- */
  .submit-bar { display:grid; }

  /* ---- copy helpers ---- */
  .sub { color:var(--tt-fg-muted); font-size:var(--tt-text-base); margin:0 0 var(--tt-space-6); max-width:40rem; }
  /* In the page's column the column's own gap spaces it; a margin on top of that is dead space. */
  .content > .sub { margin:0; }
  .hint { color:var(--tt-fg-muted); font-size:var(--tt-text-sm); margin-top:var(--tt-space-2); }
  /* D175, D232: the one line that says pages are recorded, in the avatar menu, not on the page. */
  .field { display:grid; grid-template-columns:minmax(0, 1fr); gap:var(--tt-space-2); }
  .field > label { margin:0; }
  .field + .field { margin-top:var(--tt-space-4); }
  .field-optional { font-weight:var(--tt-weight-normal); color:var(--tt-fg-muted); }
  .field-hint, .field-error { margin:0; font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .field-error { color:var(--tt-bad-text); }
  .field :where(input[aria-invalid="true"]) { border-color:var(--tt-bad-text); }
  /* A link alone on its line is a target; a link in a sentence is not. */
  .link-line { margin:0; }
  .content .btn { align-self:flex-start; }
  .content .banner, .content .hint { max-width:var(--measure-text); }
  .content :where(input:not([type="checkbox"], [type="radio"]), select) { max-width:var(--measure); }
  /* Signed out, the line under the heading needs more air before the one action. (It sat in the
     layout layer, where the .sub rule above always beat it.) */
  .auth-body .sub { margin-bottom:var(--tt-space-8); }
}

@layer bl-screens {
  /* Home (D186, D189): act on the left, know on the right; one column below 72rem, in rank order. */
  .home-cols { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 24rem); gap:var(--tt-space-6);
               align-items:start; }
  @media (max-width:72rem) { .home-cols { grid-template-columns:minmax(0, 1fr); } }
  .home-more { margin-left:auto; font-size:var(--tt-text-sm); color:var(--tt-fg-muted); }
  .home-short { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
                gap:var(--tt-space-3); padding:var(--tt-space-3) var(--tt-space-4); margin:0;
                border:1px solid var(--tt-warn-text); border-radius:var(--tt-radius-md); background:var(--tt-sunken); }
  .home-short p { margin:0; }
  .home-dates { list-style:none; margin:0; padding:0; }
  .home-date-row { display:grid; grid-template-columns:2.75rem minmax(0, 1fr); gap:var(--tt-space-3);
                   align-items:start; padding:var(--tt-space-3) 0; }
  .home-date-row + .home-date-row { border-top:1px solid var(--tt-line-subtle); }
  .home-date { display:grid; place-items:center; width:2.75rem; height:2.75rem; border:1px solid var(--tt-line-subtle);
               border-radius:var(--tt-radius-md); line-height:1.1; }
  .home-date-month { font-size:var(--tt-text-xs); color:var(--tt-fg-muted); text-transform:uppercase; }
  .home-date-day { font-weight:var(--tt-weight-medium); }
  .home-date-text .sub { display:block; }
  .home-late { color:var(--tt-bad-text); }
  .home-date-row--late .home-date { border-color:var(--tt-bad-text); }
  .home-recent { list-style:none; margin:0; padding:0; }
  .home-recent-row { padding:var(--tt-space-2) 0; }
  .home-recent-row + .home-recent-row { border-top:1px solid var(--tt-line-subtle); }
  .home-recent-row .sub { display:block; margin:0; font-size:var(--tt-text-xs); }
  .home-vote { list-style:none; margin:0; padding:0; }
  .home-vote-row { display:flex; align-items:center; justify-content:space-between; gap:var(--tt-space-3);
                   padding:var(--tt-space-2) 0; }
  .home-vote-row + .home-vote-row { border-top:1px solid var(--tt-line-subtle); }
  .home-vote-row { flex-wrap:wrap; }
  .home-vote-name { display:flex; flex-direction:column; flex:1 1 12rem; min-width:0; }
  .home-vote-name .dim { font-size:var(--tt-text-sm); }
  .home-close-rows { margin:0; }
  .home-close-row { display:flex; justify-content:space-between; gap:var(--tt-space-4); padding:var(--tt-space-2) 0; }
  .home-close-row + .home-close-row { border-top:1px solid var(--tt-line-subtle); }
  .home-close-row dt { color:var(--tt-fg-muted); white-space:nowrap; }
  .home-close-row dd { margin:0; text-align:right; }
  .home-task-counts { margin-left:var(--tt-space-2); font-size:var(--tt-text-sm); font-weight:var(--tt-weight-normal); color:var(--tt-fg-muted); }
  .home-tasks { list-style:none; margin:0; padding:0; }
  .home-task { display:grid; grid-template-columns:auto minmax(0, 1fr) fit-content(40%) auto; align-items:center;
               column-gap:var(--tt-space-3); padding:var(--tt-space-2) 0; }
  .home-task + .home-task { border-top:1px solid var(--tt-line-subtle); }
  .home-task-title { min-width:0; overflow-wrap:break-word; color:inherit; text-decoration:none; }
  .home-task-title:hover { text-decoration:underline; }
  .home-task-place { min-width:0; overflow-wrap:break-word; font-size:var(--tt-text-sm); color:var(--tt-fg-muted); text-align:right; }
  .home-task-place a { color:inherit; text-decoration:none; }
  .home-task-place a:hover { text-decoration:underline; }
  .home-task-due { min-width:var(--tt-space-16); font-size:var(--tt-text-sm); white-space:nowrap; text-align:right; }
  .home-task-add { margin-top:var(--tt-space-3); }
  /* Beside an open franchise the list is about 13rem wide: where and when go under the title, which keeps the row. */
  .home-tasks { container-type:inline-size; }
  @container (max-width:24rem) {
    .home-task { grid-template-columns:auto minmax(0, 1fr); }
    .home-task-place, .home-task-due { grid-column:2; text-align:left; }
  }
  @media (max-width:40rem) {
    .home-task { grid-template-columns:auto minmax(0, 1fr) auto; }
    .home-task-place { display:none; }
  }
  /* The pipeline board (D101/D103/D106): the stages read left to right as columns of cards, scrolling
     sideways inside the board when a laptop runs out of room (Dustin, 2026-11-10: "pipeline needs to read
     in. linear fashion"). Each column is a <details>: open side by side on a wide screen, stacked as tap-to-
     open rows on a phone. A card is one link to the franchise; nothing on it edits (D79). */
  /* Positioned, so the screen-reader text in its columns scrolls with them: with no positioned ancestor a
     label placed past the window's edge escaped the clip and ran the page 1305px wide. */
  .board { position:relative; display:flex; flex-wrap:nowrap; align-items:flex-start; gap:var(--tt-space-3); overflow-x:auto;
           padding-bottom:var(--tt-space-2); }
  .board-col { flex:1 0 15rem; min-width:0; border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-lg);
               background:var(--tt-sunken); padding:var(--tt-space-2); }
  .board-head { display:flex; flex-wrap:wrap; align-items:center; gap:0 var(--tt-space-2); min-height:var(--control);
                padding:0 var(--tt-space-2); list-style:none; cursor:default; font-size:var(--tt-text-sm);
                font-weight:var(--tt-weight-medium); }
  .board-head::-webkit-details-marker { display:none; }
  .board-name { flex:none; }
  .board-count { color:var(--tt-fg-muted); font-variant-numeric:tabular-nums; font-weight:var(--tt-weight-normal); }
  .board-meta { margin-left:auto; font-size:var(--tt-text-xs); font-weight:var(--tt-weight-normal); }
  .board-cards { list-style:none; margin:var(--tt-space-2) 0 0; padding:0; display:grid; gap:var(--tt-space-2); }
  /* The card is the box; its text is the link and its Move form sits under it, inside the same border. */
  .board-link { display:flex; align-items:flex-start; gap:var(--tt-space-3); padding:var(--tt-space-3);
                color:inherit; text-decoration:none; }
  .board-card:has(> .board-link:hover) { border-color:var(--tt-line); }
  .board-poster { flex:none; width:2.5rem; aspect-ratio:2 / 3; object-fit:cover; border-radius:var(--tt-radius-sm);
                  background:var(--tt-hover); }
  .board-body { display:grid; gap:var(--tt-space-1); min-width:0; font-size:var(--tt-text-xs); color:var(--tt-fg-muted);
                overflow-wrap:break-word; }
  .board-title { font-size:var(--tt-text-sm); font-weight:var(--tt-weight-medium); color:var(--tt-fg); }
  .board-tags { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); }
  /* Relative: the in-place edits' screen-reader labels are absolute and must stay inside the scrolling board. */
  .board-card { position:relative; min-width:0; border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md); background:var(--tt-raised); }
  .board-facts { display:grid; grid-template-columns:auto minmax(0, 1fr); align-items:baseline;
                 gap:var(--tt-space-2) var(--tt-space-3); margin:0; padding:0 var(--tt-space-3) var(--tt-space-3);
                 font-size:var(--tt-text-xs); }
  .board-facts > div { display:contents; }
  .board-facts dt { color:var(--tt-fg-muted); }
  .board-facts dd { margin:0; min-width:0; }
  /* An inline edit hangs 8px left so its text lines up with the label; the clip margin keeps that hang
     and the focus ring visible while the box itself stays inside the card (viewport gate). */
  .board-facts .inline-edit { overflow:clip; overflow-clip-margin:var(--tt-space-3); }
  /* Production (option A): one card listing what the area will hold. */
  .planned-card { max-width:var(--measure-text); border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md);
             background:var(--tt-sunken); padding:var(--tt-space-6); display:grid; gap:var(--tt-space-4); justify-items:start; }
  .planned-card h2 { margin:0; font-size:var(--tt-text-md); }
  .planned-list { list-style:none; margin:0; padding:0; display:grid; gap:var(--tt-space-3); justify-self:stretch; }
  .planned-list li { display:grid; gap:var(--tt-space-1); padding-top:var(--tt-space-3); border-top:1px solid var(--tt-line-subtle); }
  .planned-name { font-weight:var(--tt-weight-medium); }
  .planned-what { color:var(--tt-fg-muted); font-size:var(--tt-text-sm); }
  /* The area is empty, so its message is the shared empty state, drawn as the card's last row. */
  .planned-card > .empty { border:0; border-top:1px solid var(--tt-line-subtle); border-radius:0; background:none;
                      padding:var(--tt-space-4) 0 0; gap:var(--tt-space-2); justify-self:stretch; }
  .planned-card .empty-what { font-size:var(--tt-text-base); }
  .planned-card .empty-how { font-size:var(--tt-text-sm); }
  .board-move { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2);
                padding:0 var(--tt-space-3) var(--tt-space-3); }
  .board-move select { flex:1 1 6rem; min-width:0; }
  .board-move .btn[hidden] { display:none; }
  /* V4.1 (D-row in board-decisions): a desktop card moves by drag; its Move picker stays in the DOM, out of
     sight, and shows once the card holds focus, so a keyboard still moves it. A phone gets a stage chip that
     opens the native picker (the Trello/ClickUp way: tap, pick a list), a 44px target. */
  @media (hover:hover) and (pointer:fine) {
    .board-card:not(:has(:focus-visible)) .board-move[data-board-move] { position:absolute; width:1px; height:1px;
      margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  }
  @media not ((hover:hover) and (pointer:fine)) {
    .board-move[data-board-move] select { flex:0 1 auto; width:auto; max-width:100%; min-height:var(--control-h-touch);
      padding:0 var(--tt-space-10) 0 var(--tt-space-4); border-radius:var(--tt-radius-full); border-color:transparent;
      appearance:none; font-size:var(--tt-text-md);
      background:linear-gradient(45deg, transparent 50%, var(--tt-fg-muted) 50%) calc(100% - var(--tt-space-6)) 55% / var(--tt-space-2) var(--tt-space-2) no-repeat,
        linear-gradient(135deg, var(--tt-fg-muted) 50%, transparent 50%) calc(100% - var(--tt-space-4)) 55% / var(--tt-space-2) var(--tt-space-2) no-repeat, var(--tt-hover); }
  }
  /* Board slice 3: a dragged card fades where it was; the column it would land in is outlined. */
  .board-card[draggable="true"] { cursor:grab; }
  .board-card.is-dragging { opacity:.5; }
  .board-col.is-drop { outline:var(--focus-ring); outline-style:dashed; outline-offset:calc(var(--focus-offset) * -1); }
  .board-move-why:not([hidden]) { flex-basis:100%; display:grid; gap:var(--tt-space-1); font-size:var(--tt-text-xs);
                                  color:var(--tt-fg-muted); }
  .board-move-why > label:not(:first-child) { margin-top:var(--tt-space-1); }
  .board-line, .board-why { line-height:1.5; }
  .board-why { color:var(--tt-fg); }
  .board-owner { display:flex; align-items:center; gap:var(--tt-space-2); margin-top:var(--tt-space-1); }
  .board-owner .avatar { width:1.5rem; height:1.5rem; font-size:var(--tt-text-xs); }
  .board-empty { margin:var(--tt-space-2) 0 0; padding:var(--tt-space-2); font-size:var(--tt-text-sm); }
  .board-add { display:flex; align-items:center; min-height:var(--control); margin-top:var(--tt-space-2);
               padding:0 var(--tt-space-2); border-radius:var(--tt-radius-md); font-size:var(--tt-text-sm); color:var(--tt-fg-muted);
               text-decoration:none; }
  .board-add:hover { color:var(--tt-fg); background:var(--tt-raised); }
  /* Voting lane (D287, V-A): avatars with who has voted, the spread pill, the panel's voter list. */
  .vt-stack { display:flex; padding-left:var(--tt-space-1); margin-top:var(--tt-space-2); }
  .vt-avatar { position:relative; display:inline-flex; align-items:center; justify-content:center; flex:none;
               border-radius:var(--tt-radius-full); background:var(--tt-hover); border:1px solid var(--tt-line-subtle);
               color:var(--tt-fg-muted); font-weight:var(--tt-weight-medium); opacity:.7; }
  .vt-avatar.is-voted { opacity:1; color:var(--tt-fg); }
  .vt-avatar--sm { width:1.625rem; height:1.625rem; font-size:var(--tt-text-xs); margin-left:calc(var(--tt-space-1) * -1); }
  .vt-avatar--md { width:1.75rem; height:1.75rem; font-size:var(--tt-text-xs); }
  .vt-badge { position:absolute; right:calc(var(--tt-space-1) * -1); bottom:calc(var(--tt-space-1) * -1); display:inline-flex; align-items:center; justify-content:center;
              width:1rem; height:1rem; border-radius:var(--tt-radius-full); background:var(--tt-ok-text); color:var(--tt-surface);
              font-size:var(--tt-text-xs); line-height:1; }
  .vt-pill { display:inline-flex; align-items:center; width:fit-content; min-height:var(--chip-h); padding:0 var(--tt-space-2);
             border-radius:var(--tt-radius-sm); background:var(--tt-hover); color:var(--tt-fg); font-size:var(--tt-text-xs);
             font-variant-numeric:tabular-nums; margin-top:var(--tt-space-2); }
  .vt-empty { padding:var(--tt-space-3); font-size:var(--tt-text-sm); }
  .vt-empty p { margin:0 0 var(--tt-space-1); }
  .vt-panel { display:flex; flex-direction:column; gap:var(--tt-space-3); margin-bottom:var(--tt-space-4); }
  .vt-move { display:flex; align-items:center; justify-content:space-between; gap:var(--tt-space-3); flex-wrap:wrap;
             padding:var(--tt-space-3); border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md); }
  .vt-move-form { margin:0; }
  .vt-move p { margin:0; }
  .vt-move-t { font-weight:var(--tt-weight-medium); }
  .vt-head { display:flex; align-items:center; justify-content:space-between; gap:var(--tt-space-2); }
  .vt-head h3, .vt-sub { margin:0; font-size:var(--tt-text-sm); }
  .vt-head .vt-pill { margin-top:0; }
  .vt-voters, .vt-qs { list-style:none; margin:0; padding:0; }
  .vt-voter { display:flex; align-items:center; gap:var(--tt-space-3); padding:var(--tt-space-2) 0; }
  .vt-who { display:flex; flex-direction:column; flex:1 1 auto; min-width:0; font-size:var(--tt-text-sm); }
  .vt-name { display:flex; align-items:center; gap:var(--tt-space-2); flex-wrap:wrap; font-weight:var(--tt-weight-medium); }
  .vt-stat { flex:none; font-size:var(--tt-text-sm); font-variant-numeric:tabular-nums; }
  .vt-qs li { display:flex; justify-content:space-between; gap:var(--tt-space-3); padding:var(--tt-space-2) 0;
              border-top:1px solid var(--tt-line-subtle); font-size:var(--tt-text-sm); font-variant-numeric:tabular-nums; }
  .vt-pill .vt-nw { white-space:nowrap; }
  .vt-stack ~ .vt-pill { flex-wrap:wrap; column-gap:var(--tt-space-1); }
  .vt-two { display:flex; flex-direction:column; align-items:flex-end; text-align:right; }
  .vt-note { margin:0; font-size:var(--tt-text-sm); }
  .vt-vote { align-self:flex-start; }
  .vt-add { display:grid; gap:var(--tt-space-2); padding:var(--tt-space-3); border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md); }
  .vt-add fieldset { display:grid; gap:var(--tt-space-1); margin:0; padding:0; border:0; min-width:0; }
  .vt-add legend { padding:0; margin-bottom:var(--tt-space-1); color:var(--tt-fg); font-size:var(--tt-text-sm); font-weight:var(--tt-weight-medium); }
  .vt-add-person { display:flex; align-items:center; gap:var(--tt-space-2); min-height:var(--control); color:var(--tt-fg); font-size:var(--tt-text-sm); }
  .vt-add .btn { justify-self:start; }
  @media (max-width:64rem) {
    .board { flex-direction:column; align-items:stretch; overflow-x:visible; }
    .board-col { flex:none; }
    .board-head { min-height:var(--control-h-touch); cursor:pointer; }
    .board-head::before { content:"›" / ""; width:1em; color:var(--tt-fg-muted); transition:rotate .15s; }
    .board-col[open] > .board-head::before { rotate:90deg; }
  }

  /* A record's Details card folds on a phone (D109 slice 5): title and one summary line, a tap opens it.
     Wider, the head is a plain heading and the summary line is not shown. */
  .attr-fold-head { list-style:none; cursor:default; min-height:var(--control); }
  .attr-fold-head::-webkit-details-marker { display:none; }
  .attr-fold-sum { display:none; }
  @media (max-width:600px) {
    .attr-fold-head { display:grid; grid-template-columns:minmax(0, 1fr) auto; align-items:center;
                      gap:var(--tt-space-1) var(--tt-space-2); min-height:var(--control-h-touch); cursor:pointer; }
    .attr-fold-head::after { content:"›" / ""; grid-column:2; grid-row:1; color:var(--tt-fg-muted); transition:rotate .15s; }
    .attr-fold[open] > .attr-fold-head::after { rotate:90deg; }
    /* One column: Details leads, then the main cards, then the rest of the side (Agreements). */
    .record-grid:has(.attr-fold) { gap:var(--tt-space-4); }
    .record-grid:has(.attr-fold) > :is(.record-main, .record-aside) { display:contents; }
    .record-aside > .attr-fold { order:-3; }
    .attr-fold:not([open]) .attr-fold-sum { grid-column:1 / -1; display:grid; gap:var(--tt-space-1);
                                            font-size:var(--tt-text-sm); color:var(--tt-fg-muted); }
  }

  /* A record's Coverage card (slate-deals 5b): one read per row, verdict first, Remove at its foot. */
  .coverage-list { list-style:none; margin:0; padding:0; }
  .coverage-run { display:grid; gap:var(--tt-space-1); padding:var(--tt-space-3) 0; overflow-wrap:break-word; }
  .coverage-run + .coverage-run { border-top:1px solid var(--tt-line-subtle); }
  .coverage-run-head .dim { display:block; font-size:var(--tt-text-sm); }
  .coverage-reason { margin:0; max-width:var(--measure-text); }
  .coverage-run-actions { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-4); }
  .coverage-run .hint { margin:0; }

  /* "Who can see this" (D142): the switch, then one checkbox per person, wrapping. */
  .access-form { display:grid; gap:var(--tt-space-4); }
  .access-people { display:flex; flex-wrap:wrap; gap:var(--tt-space-2) var(--tt-space-4); border:0; margin:0; padding:0; }
  .access-people > legend { padding:0; margin-bottom:var(--tt-space-2); }
  .access-person, .access-switch { display:flex; align-items:center; gap:var(--tt-space-2); min-height:var(--control); }

  /* A record's Titles card (D109 slice 3): one row per title, its own stage beside it (D101), hours to
     date, then the cost sheet. On a phone the stage and the link take a second line. */
  .panel-count { color:var(--tt-fg-muted); font-weight:var(--tt-weight-normal); }
  .title-list { list-style:none; margin:0; padding:0; }
  .title-row { display:grid; grid-template-columns:minmax(0, 1fr) auto auto;
               grid-template-areas:"main stage open"; align-items:center; gap:var(--tt-space-2) var(--tt-space-4);
               padding:var(--tt-space-3) 0; }
  .title-row + .title-row { border-top:1px solid var(--tt-line-subtle); }
  .title-main { grid-area:main; max-width:var(--measure-text); display:grid; gap:var(--tt-space-1); min-width:0; overflow-wrap:break-word; }
  .title-name { font-weight:var(--tt-weight-medium); }
  .title-row--retired .title-name { color:var(--tt-fg-muted); }
  .title-type { font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .title-stage { grid-area:stage; justify-self:end; display:grid; justify-items:end; gap:var(--tt-space-1); }
  .title-note { max-width:var(--measure); font-size:var(--tt-text-xs); color:var(--tt-fg-muted); text-align:right; }
  :is(.title-stage, .title-type) .inline-edit-show { flex:none; }
  .title-open { grid-area:open; font-size:var(--tt-text-sm); }
  .act-franchise { font-weight:var(--tt-weight-medium); }
  .doc-kind { font-size:var(--tt-text-xs); color:var(--tt-fg-muted); text-transform:uppercase; letter-spacing:.08em; }
  .title-delete { justify-self:start; font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .title-next { margin-top:var(--tt-space-1); display:flex; flex-wrap:wrap; align-items:baseline; justify-content:flex-end; gap:var(--tt-space-1) var(--tt-space-2);
                max-width:var(--measure); font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .title-next-key { color:var(--tt-fg-muted); }
  .title-next .inline-edit-show { flex:none; }
  /* A title's Distribution block (D153): its buyers, then Add buyer, across the row's full width. */
  .buyers { grid-column:1 / -1; display:grid; gap:var(--tt-space-2); padding-top:var(--tt-space-2); border-top:1px solid var(--tt-line-subtle); font-size:var(--tt-text-sm); }
  .buyers-head { margin:0; font-size:var(--tt-text-xs); color:var(--tt-fg-muted); text-transform:uppercase; letter-spacing:.08em; }
  .buyers-list { list-style:none; margin:0; padding:0; display:grid; gap:var(--tt-space-2); }
  .buyers-row { display:flex; flex-wrap:wrap; align-items:baseline; gap:var(--tt-space-1) var(--tt-space-3); }
  .buyers-name { font-weight:var(--tt-weight-medium); }
  .buyers-status, .buyers-terr, .buyers-note { color:var(--tt-fg-muted); }
  .buyers-add > summary, .buyers-change > summary { display:flex; align-items:center; min-height:var(--control-h-touch); cursor:pointer; color:var(--tt-fg-muted); }
  .buyers-licence { font-size:var(--tt-text-xs); }
  .buyers-remove { color:var(--tt-bad-text); }
  .buyers-error { margin:0; color:var(--tt-bad-text); }
  .buyers form { display:flex; flex-wrap:wrap; align-items:end; gap:var(--tt-space-2) var(--tt-space-3); margin-top:var(--tt-space-2); }
  .buyers label { display:grid; gap:var(--tt-space-1); font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  @media (max-width:600px) {
    .title-next { justify-content:flex-start; }
    .title-row { grid-template-columns:minmax(0, 1fr) auto; grid-template-areas:"main main" "stage open"; }
    .title-stage { justify-self:start; justify-items:start; }
    .title-note { text-align:left; }
  }

  /* Rules for markup the views still write by hand. Each one moves to a component when its screen
     is migrated; none of them may introduce a value off the scales. */

  /* ---- forms ---- */
  .content form, .entry-form { max-width:var(--measure); }
  .content form.cluster, .content form.inline-form, .content form.task-add, .content form.proj-new { max-width:none; }
  /* A correction's Hours box is sized to a timecode like the log's, never to half the form. */
  .entry-form .hours-input, .hours-form .hours-input { max-width:7rem; }
  form.whose { display:flex; align-items:flex-end; flex-wrap:wrap; gap:var(--tt-space-2) var(--tt-space-3);
               margin:0 0 var(--tt-space-4); }
  form.whose .select-wrap { min-width:14rem; }
  .select-wrap { position:relative; }
  .select-wrap::after { content:""; position:absolute; right:var(--tt-space-4); top:50%;
          width:var(--dot); height:var(--dot); pointer-events:none; border-right:2px solid var(--tt-fg-muted);
          border-bottom:2px solid var(--tt-fg-muted); transform:translateY(-75%) rotate(45deg); }

  /* Admin > AI settings: pickers and amounts pair up, one column on a phone. */
  .ai-pair { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:var(--tt-space-4); }
  @media (max-width:40rem) { .ai-pair { grid-template-columns:minmax(0, 1fr); } }
  .ai-pair > .field { margin:0; }
  .ai-kpis { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:var(--tt-space-4); margin-bottom:var(--tt-space-5); }
  @media (max-width:40rem) { .ai-kpis { grid-template-columns:minmax(0, 1fr); } }
  .ai-kpi--ok::after { background:var(--tt-ok-solid); }
  .ai-kpi--warn::after { background:var(--tt-warn-solid); }
  .ai-kpi--bad::after { background:var(--tt-bad-solid); }
  .ai-kpi--plain::after { background:var(--tt-line); }
  .ai-kpi-value { font-size:var(--tt-text-2xl); }
  .ai-model { white-space:nowrap; }
  .ai-prices input { width:5.5rem; min-width:0; }
  @media (max-width:40rem) { .ai-prices input { width:100%; } }
  .ai-form { display:grid; gap:var(--tt-space-6); }
  /* Admin > Coverage guide: the AI settings layout with long text boxes. */
  .ai-form textarea { width:100%; min-height:12rem; resize:vertical; line-height:1.5; }
  .cg-fields { display:grid; gap:var(--tt-space-5); }
  .cg-read { white-space:pre-wrap; overflow-wrap:break-word; line-height:1.5; margin:0; }
  .ai-key-state { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); margin:0; }
  .ai-replace > summary { display:inline-flex; list-style:none; cursor:pointer; }
  .ai-replace > summary::-webkit-details-marker { display:none; }
  .ai-replace[open] > summary { margin-bottom:var(--tt-space-4); }
  .ai-meter-row { display:grid; grid-template-columns:auto minmax(0, 1fr); gap:var(--tt-space-2) var(--tt-space-4); align-items:baseline; }
  .ai-meter-row > .hint { margin:0; text-align:right; }
  .ai-meter-row > .intake-meter { grid-column:1 / -1; }

  /* Admin > API tokens: panels stacked like Admin > AI; a new token's connect lines scroll sideways. */
  .api-tokens { display:grid; grid-template-columns:minmax(0, 1fr); gap:var(--tt-space-6); }
  .api-token-form { display:grid; gap:var(--tt-space-4); }
  .api-token-form > .field, .api-token-form > .chip-group { margin:0; }
  .api-token-snippet { margin:0 0 var(--tt-space-4); padding:var(--tt-space-3); border:1px solid var(--tt-line-subtle);
    border-radius:var(--tt-radius-sm); font-family:var(--tt-font-mono); font-size:var(--tt-text-xs);
    white-space:pre; overflow-x:auto; }
  .api-token-actions { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); justify-content:flex-end; }
  .api-token-actions > form { margin:0; }
  .connect-form { display:grid; gap:var(--tt-space-4); }
  .connect-form > .field { margin:0; }
  .connect-secret { display:grid; gap:var(--tt-space-2); min-width:0; flex:1; }
  .connect-manual { margin-top:var(--tt-space-3); }
  .connect-manual > summary { list-style:none; cursor:pointer; display:inline-flex; }
  .connect-manual > summary::-webkit-details-marker { display:none; }
  .connect-manual-body { display:grid; gap:var(--tt-space-3); margin-top:var(--tt-space-3); }
  .connect-confirm > summary { list-style:none; cursor:pointer; }
  .connect-confirm > summary::-webkit-details-marker { display:none; }
  .connect-confirm > form { display:grid; gap:var(--tt-space-2); margin:var(--tt-space-2) 0 0; text-align:left; }

  /* ---- the week grid on the entry form ---- */
  .for-day { margin:0; color:var(--tt-fg-muted); }
  .for-day b { color:var(--tt-fg); font-weight:var(--tt-weight-semibold); }
  /* The sheet lays itself out by the room it has, not the window: the sidebar takes width too. */
  .week-sheet { margin:0 0 var(--tt-space-5); container:sheet / inline-size; }
  .sheet-grid { width:100%; max-width:var(--sheet-max); border-collapse:collapse; table-layout:fixed; }
  .sheet-grid th, .sheet-grid td { padding:var(--tt-space-1); text-align:center; }
  .sheet-grid thead th:not(:first-child), .sheet-grid tbody td, .sheet-grid tfoot td { width:9%; }
  .sheet-grid .sheet-work, .sheet-grid thead th:first-child, .sheet-grid tfoot th { text-align:left; white-space:normal; }
  .sheet-grid .sheet-work { font-size:var(--tt-text-base); text-transform:none; letter-spacing:0; color:var(--tt-fg);
                            vertical-align:middle; border-bottom-color:var(--tt-line-subtle); }
  .sheet-grid tfoot th, .sheet-grid tfoot td { vertical-align:middle; border-bottom-color:var(--tt-line-subtle); }
  .sheet-grid .sheet-day.today { text-decoration:underline; text-underline-offset:var(--tt-space-1); }
  .planned-tag { display:block; font-size:var(--tt-text-xs); font-style:italic; color:var(--tt-fg-muted); }
  .sheet-grid td.planned .sheet-cell { border-style:dotted; }
  .sheet-grid .sheet-total { font-weight:var(--tt-weight-medium); }
  .sheet-cell { width:100%; max-width:var(--sheet-box-max); min-height:var(--control-h-touch); padding-inline:var(--tt-space-1);
    text-align:center; border:1px solid var(--tt-line); border-radius:var(--tt-radius-sm); background:var(--tt-sunken);
    color:var(--tt-fg); font-size:var(--tt-text-base); scroll-margin-block:var(--tt-space-16); }
  @media (max-width:900px), (pointer:coarse) { .sheet-cell { font-size:var(--tt-text-md); } }
  .sheet-cell:focus { outline:2px solid var(--tt-fg); outline-offset:1px; }
  .sheet-cell:disabled, .sheet-cell[data-why] { opacity:.4; cursor:not-allowed; }
  .content form[data-sheet-form] { max-width:none; }
  .week-sheet .btn[hidden] { display:none; }
  .sheet-grid td { position:relative; }
  .sheet-grid td[data-state] .sheet-cell { padding-right:var(--tt-space-3); }
  .sheet-grid td[data-state]::after { position:absolute; top:50%; right:var(--tt-space-2); transform:translateY(-50%);
    font-size:var(--tt-text-sm); pointer-events:none; }
  .sheet-grid td[data-state="saving"] .sheet-cell { border-style:dashed; }
  .sheet-grid td[data-state="saving"]::after { content:"…"; color:var(--tt-fg-muted); }
  .sheet-grid td[data-state="saved"] .sheet-cell { border-color:var(--tt-ok-text); }
  .sheet-grid td[data-state="saved"]::after { content:"✓"; color:var(--tt-ok-text); }
  .sheet-grid td[data-state="failed"] .sheet-cell { border-color:var(--tt-bad-text); border-width:2px; }
  .sheet-grid td[data-state="failed"]::after { content:"!"; color:var(--tt-bad-text); font-weight:var(--tt-weight-medium); }
  .sheet-note td { text-align:left; font-size:var(--tt-text-sm); color:var(--tt-bad-text); }
  .sheet-note--plain td { color:var(--tt-fg-muted); }
  .sheet-note span { margin-right:var(--tt-space-2); }
  .sheet-note .btn { margin-right:var(--tt-space-1); }
  .sheet-work-in { display:flex; justify-content:space-between; align-items:center; gap:var(--tt-space-3); }
  .sheet-remove { min-height:var(--control); flex:none; background:none; border:0; padding:0 0 0 var(--tt-space-2); font:inherit; font-size:var(--tt-text-xs); letter-spacing:normal; text-transform:none; color:var(--tt-fg-muted); text-decoration:underline; cursor:pointer; }
  .week-today, .sheet-links a { display:inline-flex; align-items:center; min-height:var(--control); }
  .week-today { font-size:var(--tt-text-sm); }
  .sheet-status { min-height:1.4em; font-size:var(--tt-text-sm); color:var(--tt-fg-muted); }
  /* Its line stays reserved so "Saved" never moves the add row; inside a card the card sets the gap. */
  :is(.record-main, .record-aside) > .panel .sheet-status { margin:0; }
  /* The iOS decimal keypad has no colon, so a phone is only shown the decimal example. */
  @media (max-width:640px) { .hint-colon { display:none; } }
  /* No room for a row label beside the boxes: the name takes its own line and every box wears its day,
     so the head can go. Eight across, then four and four where eight would be too small for a thumb:
     Mon Tue Wed Thu, Fri Sat Sun Total. Nothing scrolls sideways and no day is out of sight. */
  @container sheet (max-width:44rem) {
    .sheet-grid, .sheet-grid thead, .sheet-grid tbody, .sheet-grid tfoot { display:block; }
    .sheet-grid thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
    .sheet-grid tr { display:grid; grid-template-columns:repeat(8, minmax(0, 1fr)); gap:var(--tt-space-2);
                     padding-block:var(--tt-space-3); border-bottom:1px solid var(--tt-line-subtle); }
    .sheet-grid th, .sheet-grid td { display:block; width:auto; height:auto; padding:0; border:0; }
    .sheet-grid thead th:not(:first-child), .sheet-grid tbody td, .sheet-grid tfoot td { width:auto; }
    .sheet-grid .sheet-work, .sheet-grid tfoot th, .sheet-note td { grid-column:1 / -1; }
        .sheet-grid td[data-label]::before { content:attr(data-label); display:block; margin-bottom:var(--tt-space-1);
      font-family:var(--tt-font-sans); font-size:var(--tt-text-xs); line-height:1.3; color:var(--tt-fg-muted); white-space:nowrap; }
    /* "planned" will not fit beside the day at phone width; the italic label and dotted box carry it. */
    .sheet-grid td.planned[data-label]::before { font-style:italic; }
    .sheet-grid td.today[data-label]::before { color:var(--tt-fg); font-weight:var(--tt-weight-medium);
      text-decoration:underline; text-underline-offset:var(--tt-space-1); }
    .sheet-cell { max-width:none; }
    .sheet-grid .sheet-total, .sheet-grid tfoot td { font-size:var(--tt-text-base); line-height:var(--control-h-touch); }
    .sheet-grid .sheet-total::before, .sheet-grid tfoot td::before { line-height:1.3; }
    /* A row's total is not another day: no box, a rule beside it, and its label and figure in full ink. */
    .sheet-grid .sheet-total, .sheet-grid [data-week-total] { border-left:1px solid var(--tt-line); font-weight:var(--tt-weight-semibold); }
    .sheet-grid td.sheet-total[data-label]::before, .sheet-grid td[data-week-total][data-label]::before {
      color:var(--tt-fg); font-weight:var(--tt-weight-medium); }
    .sheet-grid tfoot tr { border-bottom:0; }
    /* The totals line is one line on a phone: the days with hours and the week, not seven blank boxes.
       A day's total fills in as hours are typed, and it shows then. */
    .sheet-grid tfoot tr { display:flex; flex-wrap:wrap; align-items:baseline; gap:var(--tt-space-1) var(--tt-space-4); }
    .sheet-grid tfoot td:empty { display:none; }
    .sheet-grid tfoot :is(th, td) { line-height:var(--control-h-touch); }
    .sheet-grid tfoot td[data-label]::before { display:inline; margin:0 var(--tt-space-1) 0 0; }
    .sheet-grid tfoot [data-week-total] { padding-left:var(--tt-space-3); }
    .sheet-grid td[data-state] .sheet-cell { padding-right:var(--tt-space-1); }
    .sheet-grid td[data-state]::after { top:0; right:0; transform:none; font-size:var(--tt-text-xs); line-height:1.3; }
  }
  @container sheet (max-width:34rem) {
    .sheet-grid tr { grid-template-columns:repeat(4, minmax(0, 1fr)); }
  }
  .sheet-add { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); align-items:center; margin-top:var(--tt-space-3); }
  .sheet-add label { margin:0; }
  .sheet-add .select-wrap { flex:0 1 var(--measure); min-width:0; }
  /* Inside a card the card is the one width (My hours): Cost code and Add work share one row across it,
     the start-and-stop lines take it too, and the card's own gap sets the rhythm. */
  :is(.record-main, .record-aside) > .panel :is(.sheet-add, .clock-lines) { max-width:none; }
  :is(.record-main, .record-aside) > .panel .sheet-add .select-wrap { flex:1 1 14rem; max-width:var(--measure); }
  :is(.record-main, .record-aside) > .panel .sheet-add select { max-width:none; }
  :is(.record-main, .record-aside) > .panel .week-sheet { margin-bottom:0; }
  .sheet-links { margin-top:var(--tt-space-4); font-size:var(--tt-text-sm); color:var(--tt-fg-muted); }
  .day-lines { margin-top:var(--tt-space-4); }
  .day-strip { display:flex; flex-wrap:wrap; gap:var(--tt-space-1); margin-block:var(--tt-space-2); }
  .day-chip { display:grid; min-width:4.5rem; min-height:var(--control); padding:var(--tt-space-1) var(--tt-space-2); border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md); color:var(--tt-fg-muted); text-decoration:none; font-size:var(--tt-text-sm); }
  .day-chip.on { border-color:var(--tt-fg); color:var(--tt-fg); }
  .clock-total { color:var(--tt-fg-muted); }
  .clock-lines { display:grid; gap:var(--tt-space-2); }
  .clock-line { display:grid; grid-template-columns:7rem 7rem minmax(0, 1fr) 4rem auto; gap:var(--tt-space-2); align-items:center; }
  .clock-line[hidden] { display:none; }
  .clock-line--head { color:var(--tt-fg-muted); font-size:var(--tt-text-sm); }
  .clock-hours { text-align:right; font-variant-numeric:tabular-nums; font-weight:var(--tt-weight-medium); }
  .clock-time { font-variant-numeric:tabular-nums; }
  .clock-note { color:var(--tt-fg-muted); font-size:var(--tt-text-sm); }
  .clock-actions { display:flex; gap:var(--tt-space-2); flex-wrap:wrap; }
  .clock-long { display:flex; gap:var(--tt-space-1); align-items:center; }
  @media (max-width: 640px) {
    .clock-line { grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) 4rem; padding:var(--tt-space-2); border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md); }
    .clock-line > select { grid-column:1 / -1; }
    .clock-line--head { display:none; }
    .clock-actions .btn { flex:1 1 100%; justify-content:center; }
  }
  .week-pick { border:0; padding:0; margin:0 0 var(--tt-space-4); }
  .week-pick legend { font-size:var(--tt-text-xs); font-weight:var(--tt-weight-medium); text-transform:uppercase;
                      letter-spacing:.08em; color:var(--tt-fg-muted); padding:0 0 var(--tt-space-2); }
  /* minmax(0,1fr): a column with a min-content floor pushes the grid wider than its box. */
  .week-grid { display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); gap:var(--tt-space-1); }
  .day-cell { position:relative; display:flex; flex-direction:column; align-items:center; gap:var(--tt-space-1);
              padding:var(--tt-space-3) var(--tt-space-1); border:1px solid var(--tt-line); border-radius:var(--tt-radius-md);
              background:var(--tt-surface); cursor:pointer; text-align:center; font-size:var(--tt-text-xs); line-height:1.2; }
  .day-cell input { position:absolute; opacity:0; width:0; height:0; }
  .day-cell .day-initial { font-size:var(--tt-text-xs); font-weight:var(--tt-weight-medium); color:var(--tt-fg-muted);
                           letter-spacing:.04em; }
  .day-cell .day-num { font-family:var(--tt-font-mono); font-size:var(--tt-text-base); font-weight:var(--tt-weight-medium); color:var(--tt-fg); }
  .day-cell:hover { border-color:var(--tt-fg-muted); }
  .day-cell.today { border-color:var(--tt-fg); }
  .day-cell:has(input:checked) { background:var(--tt-fg); border-color:var(--tt-fg); }
  .day-cell:has(input:checked) .day-initial, .day-cell:has(input:checked) .day-num { color:var(--tt-surface); }
  .day-cell.future { opacity:.34; cursor:not-allowed; background:var(--tt-sunken); }
  .day-cell.future:hover { border-color:var(--tt-line); }
  .day-cell:focus-within { outline:2px solid var(--tt-fg); outline-offset:2px; }
  /* A logged day carries a status dot, and its accessible name says so too. */
  .day-cell.logged::after { content:""; position:absolute; left:50%; bottom:var(--tt-space-1);
                            width:var(--dot-sm); height:var(--dot-sm); transform:translateX(-50%);
                            border-radius:50%; background:var(--tt-ok-text); }
  /* On the selected day the cell is INK, and green on ink fails 3:1 in both themes. The dot is
     drawn in the inverted ink instead (check-contrast.sh refuses a status colour on an inverted fill). */
  .day-cell.on.logged::after, .day-cell:has(input:checked).logged::after { background:var(--tt-surface); }
  /* split rows, one-tap days and the work search on the entry form */
  .rows { display:grid; gap:var(--tt-space-4); margin:0 0 var(--tt-space-2); }
  .entry-row { display:grid; grid-template-columns:10rem minmax(0, 1fr); gap:var(--tt-space-2) var(--tt-space-3);
               align-items:start; }
  .entry-row .row-hours, .entry-row .row-work { min-width:0; }
  .entry-row .hours-input { max-width:none; width:100%; }
  .entry-row + .entry-row { padding-top:var(--tt-space-4); border-top:1px solid var(--tt-line-subtle); }
  .row-note { grid-column:1 / -1; margin:0; min-height:0; font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .row-note:empty { display:none; }
  .row-note--error { color:var(--tt-fg); }
  .row-note--error::before { content:""; display:inline-block; width:var(--dot); height:var(--dot);
                             margin-right:var(--tt-space-2); border-radius:50%; background:var(--tt-bad-text); }
  .row-tools { display:flex; align-items:center; flex-wrap:wrap; gap:var(--tt-space-2) var(--tt-space-4);
               margin:0 0 var(--tt-space-2); }
  .day-total { margin:0; color:var(--tt-fg-muted); font-variant-numeric:tabular-nums; }
  .day-total:empty { display:none; }
  .day-total b { color:var(--tt-fg); }
  .hours-chips { display:flex; gap:var(--tt-space-2); margin-top:var(--tt-space-2); }
  .hours-chips[hidden] { display:none; }
  .hours-chips .btn { flex:1 0 auto; min-height:var(--control-h-touch); padding-inline:var(--tt-space-2); }
  .earlier-input { width:auto; max-width:12rem; }
  .workdays-form { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2) var(--tt-space-3);
                   margin-top:var(--tt-space-2); }
  fieldset.workdays { border:0; padding:0; margin:0; display:flex; flex-wrap:wrap; gap:var(--tt-space-1) var(--tt-space-3); }
  fieldset.workdays legend { font-size:var(--tt-text-xs); color:var(--tt-fg-muted); padding:0 0 var(--tt-space-1); }
  .day-check { display:inline-flex; align-items:center; gap:var(--tt-space-1); min-height:var(--control-h-touch); }
  /* A checkbox alone in a table cell: the label around it is the 44px a finger needs. */
  .cell-check { display:inline-flex; align-items:center; justify-content:center;
                min-width:var(--control-h-touch); min-height:var(--control-h-touch); }
  .quick { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); margin:0 0 var(--tt-space-4); }
  .quick .btn { flex:1 1 9rem; }
  .results { list-style:none; margin:0 0 var(--tt-space-4); padding:0; display:grid; gap:var(--tt-space-1);
             font-size:var(--tt-text-base); }
  .results li::before { content:""; display:inline-block; width:var(--dot); height:var(--dot);
                        margin-right:var(--tt-space-2); border-radius:50%; background:var(--tt-fg-muted); }
  .results .results-ok::before { background:var(--tt-ok-text); }
  .results .results-bad::before { background:var(--tt-bad-text); }
  .results .results-left::before { background:var(--tt-fg-muted); }
  .time-off-line { margin:var(--tt-space-3) 0; color:var(--tt-fg-muted); font-variant-numeric:tabular-nums; }
  .time-off-line b { color:var(--tt-fg); margin-right:var(--tt-space-2); }
  .day-cell { min-height:var(--control-h-touch); justify-content:center; }
  /* The work search. Only exists when the script has run; the plain select is the fallback. */
  .work-combo { position:relative; }
  .work-combo input { width:100%; }
  .entry-row.is-enhanced .select-wrap { display:none; }
  .work-list { position:absolute; z-index:5; left:0; right:0; top:calc(100% + var(--tt-space-1)); margin:0;
               padding:var(--tt-space-1); list-style:none; max-height:16rem; overflow-y:auto;
               background:var(--tt-surface); border:1px solid var(--tt-line); border-radius:var(--tt-radius-md); }
  .work-list[hidden] { display:none; }
  .work-list li { display:flex; align-items:center; justify-content:space-between; gap:var(--tt-space-3);
                  min-height:var(--control-h-touch); padding:0 var(--tt-space-3); border-radius:var(--tt-radius-md);
                  cursor:pointer; }
  .work-list li[aria-selected="true"], .work-list li:hover { background:var(--tt-hover); }
  .work-list li small { color:var(--tt-fg-muted); font-size:var(--tt-text-xs); }
  .work-list .work-none { cursor:default; color:var(--tt-fg-muted); height:auto; padding:var(--tt-space-3); }
  @media (max-width:520px) { .entry-row { grid-template-columns:minmax(0, 1fr); } }
  .catch-up { border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md); padding:var(--tt-space-3);
              margin:0 0 var(--tt-space-3); }
  .catch-up legend { color:var(--tt-fg); }
  .catch-up .hint { margin:var(--tt-space-2) 0 0; }

  /* ---- report and money heads ---- */
  .report-head { display:flex; align-items:baseline; justify-content:space-between; gap:var(--tt-space-4); }
  .report-head h1, .report-head h2.range { margin:0; }
  .report-head .btn { flex:none; }
  .report-head + .sub { margin-top:var(--tt-space-2); }
  /* The range and its week's state read as one line; the download stays at the far edge. */
  .report-head-title { display:flex; align-items:baseline; flex-wrap:wrap; gap:var(--tt-space-2) var(--tt-space-4); min-width:0; }
  /* The period's figures side by side from the left, each with its own status under it, unboxed. */
  .report-totals { display:flex; flex-wrap:wrap; align-items:flex-start; gap:var(--tt-space-6) var(--tt-space-12);
                   margin-block:var(--tt-space-6); }
  .report-totals .total-block { align-items:flex-start; }
  .report-total > p { margin:var(--tt-space-2) 0 0; }
  dl.facts { display:grid; grid-template-columns:auto minmax(0, 1fr); gap:var(--tt-space-2) var(--tt-space-5);
             margin:0 0 var(--tt-space-6); }
  dl.facts dt { color:var(--tt-fg-muted); font-size:var(--tt-text-xs); text-transform:uppercase; letter-spacing:.06em;
                align-self:center; }
  dl.facts dd { font-variant-numeric:tabular-nums; }
  .status { padding-top:var(--tt-space-5); border-top:1px solid var(--tt-line-subtle); color:var(--tt-fg-muted); }
  .status b { color:var(--tt-fg); font-variant-numeric:tabular-nums; }

  /* ---- the week's state on the hours screen ---- */
  .week-state { display:flex; align-items:center; flex-wrap:wrap; gap:var(--tt-space-2) var(--tt-space-3);
                margin:var(--tt-space-3) 0 0; padding:var(--tt-space-3) var(--tt-space-4); border:1px solid var(--tt-line-subtle);
                border-radius:var(--tt-radius-md); background:var(--tt-raised); }
  .state-note, .week-state .state-status, .week-state .consequence { color:var(--tt-fg-muted); font-size:var(--tt-text-xs); }
  .week-state .state-status { flex-basis:100%; }
  .week-state .consequence { max-width:46ch; }
  .week-state .reopen { flex-basis:100%; }
  details.intake > summary { cursor:pointer; min-height:var(--control); padding-block:var(--tt-space-2); box-sizing:border-box; }
  .week-state .reopen summary { cursor:pointer; color:var(--tt-fg-muted); font-size:var(--tt-text-xs); }
  .week-state .reopen .hours-form { margin-top:var(--tt-space-3); }
  .week-state .close-form { display:flex; align-items:center; flex-wrap:wrap; gap:var(--tt-space-2) var(--tt-space-3);
                            margin:0 0 0 auto; }

  /* ---- the hours screen: one ledger, the same columns for every person ----
     Each person's table is fixed-layout over the same colgroup, so DAY, WORK and HOURS sit at one x
     all the way down a long week. */
  .person-block { display:flex; flex-direction:column; gap:var(--tt-space-1); }
  table.hours { table-layout:fixed; }
  table.hours col.c-day { width:10rem; }
  table.hours col.c-num { width:6rem; }
  table.hours col.c-act { width:7rem; }
  table.hours td:not(.actions) { overflow:hidden; text-overflow:ellipsis; }
  .hours-form { display:grid; gap:var(--tt-space-3); padding:var(--tt-space-4) 0 var(--tt-space-5); }
  .edit-head { margin:0; color:var(--tt-fg-muted); }
  .edit-head b { color:var(--tt-fg); }
  .edit-fields { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:var(--tt-space-3); }
  /* Add franchise (#add-franchise): fields pair up on one grid. The sibling-field margin would drop the right
     column's field out of line, so it is off; the pitch spans the row and the button sits under all fields. */
  #add-franchise .edit-fields > .field + .field { margin-top:0; }
  #add-franchise .edit-fields > .field--wide { grid-column:1 / -1; }
  #add-franchise .edit-fields > .btn { grid-column:1 / -1; justify-self:start; }
  /* Project vetting (vetting-view.ts): label above field, long answers span both columns. */
  .vet-form { display:grid; gap:var(--tt-space-3); }
  .vet-field { display:grid; gap:var(--tt-space-1); min-width:0; margin:0; border:0; padding:0; }
  fieldset.vet-field { gap:var(--tt-space-2); }
  .vet-wide { grid-column:1 / -1; }
  .vet-choice { display:inline-flex; align-items:center; gap:var(--tt-space-2); min-height:var(--control);
                margin-right:var(--tt-space-4); }
  .vet-list { list-style:none; margin:0 0 var(--tt-space-4); padding:0; display:grid; gap:var(--tt-space-3); }
  .vet-list ul { margin:var(--tt-space-1) 0 0; padding-left:var(--tt-space-4); }
  .vet-rubric { display:grid; grid-template-columns:auto minmax(0, 1fr); gap:0 var(--tt-space-2); margin:var(--tt-space-1) 0 0; color:var(--tt-fg-muted); font-size:var(--tt-text-sm); }
  .vet-rubric dt { font-variant-numeric:tabular-nums; }
  .vet-rubric dd { margin:0; }
  .mat-drop { display:grid; gap:var(--tt-space-2); margin:0 0 var(--tt-space-3); }
  .mat-drop[hidden] { display:none; }
  .mat-drop-label { display:flex; align-items:center; justify-content:center; gap:var(--tt-space-2);
                    padding:var(--tt-space-4) var(--tt-space-3); border:1px dashed var(--tt-line); border-radius:var(--tt-radius-md);
                    color:var(--tt-fg-muted); font-size:var(--tt-text-sm); text-align:center; cursor:pointer; }
  .mat-drop-label:hover, .mat-drop.is-over .mat-drop-label { background:var(--tt-hover); border-color:var(--tt-fg); color:var(--tt-fg); }
  .mat-drop .sr-only:focus-visible + .mat-drop-label { outline:2px solid var(--tt-fg); outline-offset:2px; }
  .mat-queue { list-style:none; margin:0; padding:0; display:grid; gap:var(--tt-space-2); }
  .mat-queue:empty { display:none; }
  .mat-item { display:grid; grid-template-columns:auto minmax(0, 1fr) auto; align-items:center; gap:var(--tt-space-1) var(--tt-space-2); font-size:var(--tt-text-sm); }
  .mat-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .mat-status { color:var(--tt-fg-muted); font-variant-numeric:tabular-nums; }
  .mat-item--bad .mat-status { color:var(--tt-fg); font-weight:var(--tt-weight-medium); }
  .mat-bar { grid-column:1 / -1; height:var(--tt-space-1); border-radius:var(--tt-radius-md); background:var(--tt-hover); overflow:hidden; }
  .mat-bar[hidden] { display:none; }
  .mat-bar > span { display:block; height:100%; width:0; background:var(--tt-fg); }
  .ta-drop { margin:var(--tt-space-3) 0 0; }
  .ta-drop-status:empty { display:none; }
  .ta-drop.is-bad .ta-drop-status { color:var(--tt-bad-text); }
  @media (max-width:520px) {
    .mat-item { grid-template-columns:minmax(0, 1fr) auto; }
    .mat-item > :first-child { order:1; }
    .mat-status { order:2; }
    .mat-name { order:3; grid-column:1 / -1; }
    .mat-bar { order:4; }
  }
  .mat-links > summary { cursor:pointer; padding:var(--tt-space-3) 0; color:var(--tt-fg-muted); font-size:var(--tt-text-sm); }
  .mat-links[open] > summary { margin-bottom:var(--tt-space-1); }
  /* Intake in one tidy box (D127): the rail, the step and its actions in one card. A narrow card folds the
     rail to "Step 3 of 6" and a bar, and stacks the actions under the dark button. */
  .intake > * { width:100%; max-width:42.5rem; margin-inline:auto; }
  .intake-head { display:flex; align-items:center; justify-content:space-between; gap:var(--tt-space-3); }
  .intake-head .sub { margin:0; }
  .intake-head > .btn { flex:none; }
  .intake-card { container:intake / inline-size; display:grid; gap:var(--tt-space-5); }
  .intake-card > * { margin:0; }
  .intake-card :is(form, input:not([type="checkbox"], [type="radio"]), select, textarea) { max-width:none; }
  .intake-rail { list-style:none; display:flex; align-items:center; gap:var(--tt-space-2); margin:0; padding:0 0 var(--tt-space-3); border-bottom:1px solid var(--tt-line-subtle); }
  .intake-rail > li { display:flex; align-items:center; gap:var(--tt-space-2); flex:1 1 auto; min-width:0; }
  .intake-rail > li:last-child { flex:0 0 auto; }
  .intake-rail > li:not(:last-child)::after { content:""; flex:1 1 var(--tt-space-3); min-width:var(--tt-space-3); height:1px; background:var(--tt-line-subtle); }
  .intake-rail > li.is-done:not(:last-child)::after { background:var(--tt-fg); }
  .intake-step { display:inline-flex; align-items:center; gap:var(--tt-space-2); min-height:var(--control-h-touch); color:var(--tt-fg); text-decoration:none; white-space:nowrap; }
  .intake-step:hover > span:not(.intake-dot) { text-decoration:underline; }
  .intake-step[aria-current="step"] { font-weight:var(--tt-weight-medium); }
  .is-todo > .intake-step:not([aria-current]) { color:var(--tt-fg-muted); }
  .intake-dot { display:inline-grid; place-items:center; flex:none; box-sizing:border-box; width:var(--tt-space-6); height:var(--tt-space-6); border:1px solid var(--tt-line-subtle); border-radius:50%;
          color:var(--tt-fg-muted); font-size:var(--tt-text-xs); font-variant-numeric:tabular-nums; }
  .intake-dot .icon { width:var(--tt-space-3); height:var(--tt-space-3); stroke-width:2.5; }
  .is-done .intake-dot { background:var(--tt-fg); border-color:var(--tt-fg); color:var(--tt-surface); }
  .is-todo > [aria-current] > .intake-dot { border:2px solid var(--tt-fg); color:var(--tt-fg); }
  .is-done > [aria-current] > .intake-dot { outline:2px solid var(--tt-fg); outline-offset:2px; }
  .intake-compact { display:none; padding:0 0 var(--tt-space-4); border-bottom:1px solid var(--tt-line-subtle); }
  .intake-compact-row { display:flex; justify-content:space-between; align-items:baseline; gap:var(--tt-space-2); margin:0 0 var(--tt-space-2); }
  .intake-compact-row span { color:var(--tt-fg-muted); font-size:var(--tt-text-sm); }
  .intake-meter { appearance:none; display:block; width:100%; height:var(--tt-space-1); border:0; border-radius:var(--tt-radius-full); background:var(--tt-line-subtle); overflow:hidden; }
  .intake-meter::-webkit-progress-bar { background:var(--tt-line-subtle); }
  .intake-meter::-webkit-progress-value { background:var(--tt-fg); }
  .intake-meter::-moz-progress-bar { background:var(--tt-fg); }
  .intake-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:var(--tt-space-3); }
  .intake-card-head h2 { margin:0; }
  .intake-card-head .sub { margin:var(--tt-space-1) 0 0; }
  .intake-saved { display:inline-flex; align-items:center; gap:var(--tt-space-1); flex:none; margin:0; color:var(--tt-fg-muted); font-size:var(--tt-text-sm); }
  .intake-saved .icon { width:var(--tt-space-3); height:var(--tt-space-3); }
  .intake-people { display:grid; gap:var(--tt-space-3); padding-top:var(--tt-space-5); border-top:1px solid var(--tt-line-subtle); }
  .intake-people h3 { margin:0; font-size:var(--tt-text-base); }
  .intake-people .hint { margin:var(--tt-space-1) 0 0; }
  .intake-people-list { list-style:none; display:grid; gap:var(--tt-space-2); margin:0; padding:0; }
  .intake-people-list li { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); }
  .intake-people-before dl { display:grid; grid-template-columns:max-content minmax(0, 1fr); gap:var(--tt-space-1) var(--tt-space-3); margin:var(--tt-space-2) 0 0; }
  .intake-people-before dt { color:var(--tt-fg-muted); }
  .intake-people-before dd { margin:0; }
  .vet-person .people-note { color:var(--tt-fg-muted); }
  .vet-person .chip.people-talk { color:var(--tt-ok-text); border-color:var(--tt-ok-text); }
  .vet-person .people-actions { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); }
  .intake-people-add { display:grid; grid-template-columns:minmax(0, 1fr) 11rem; align-items:end; gap:var(--tt-space-3); }
  .intake-foot { display:grid; grid-template-columns:minmax(0, 1fr) auto auto; grid-template-areas:"back skip go"; align-items:center;
          gap:var(--tt-space-2) var(--tt-space-5); padding-top:var(--tt-space-4); border-top:1px solid var(--tt-line-subtle); }
  .intake-foot > .btn { grid-area:go; }
  .intake-back { grid-area:back; justify-self:start; }
  .intake-skip { grid-area:skip; }
  .intake-foot--done { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:var(--tt-space-2); }
  .intake-quiet { display:inline-flex; align-items:center; min-height:var(--control-h-touch); min-width:var(--control-h-touch); color:var(--tt-fg-muted); text-decoration:none; }
  .intake-quiet:hover { color:var(--tt-fg); text-decoration:underline; }
  .intake-summary { list-style:none; margin:0; padding:0; }
  .intake-summary li { display:grid; grid-template-columns:auto 8rem minmax(0, 1fr) auto; grid-template-areas:"dot name value edit"; align-items:start;
          column-gap:var(--tt-space-3); padding:var(--tt-space-4) 0; }
  .intake-summary li + li { border-top:1px solid var(--tt-line-subtle); }
  .intake-summary .intake-dot { grid-area:dot; width:var(--tt-space-5); height:var(--tt-space-5); }
  .intake-summary-name { grid-area:name; font-weight:var(--tt-weight-medium); }
  .intake-summary-value { grid-area:value; display:grid; gap:var(--tt-space-2); min-width:0; overflow-wrap:break-word; }
  .intake-summary-value p { margin:0; }
  .intake-chips { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); }
  .intake-summary .intake-quiet { grid-area:edit; justify-content:flex-end; margin-block:calc(-1 * var(--tt-space-3)); }
  @container intake (max-width:37.5rem) {
    .intake-rail { display:none; }
    .intake-compact { display:block; }
    .intake-foot { grid-template-columns:minmax(0, 1fr) auto; grid-template-areas:"go go" "back skip"; }
    .intake-foot > .btn { width:100%; }
    .intake-skip { justify-self:end; }
    .intake-foot--done { flex-direction:column-reverse; }
    .intake-foot--done > .btn { width:100%; }
    .intake-people-add { grid-template-columns:minmax(0, 1fr); }
    .intake-people-add > .btn { justify-self:start; }
    .intake-summary li { grid-template-columns:auto minmax(0, 1fr) auto; grid-template-areas:"dot name edit" "value value value"; row-gap:var(--tt-space-2); }
  }
  .intake-q { display:grid; gap:var(--tt-space-2); }
  .tap-row { display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:var(--tt-space-2); }
  .tap { position:relative; display:block; }
  .tap input { position:absolute; opacity:0; inset:0; margin:0; }
  .tap span { display:flex; align-items:center; justify-content:center; min-height:var(--control-h-touch); border:1px solid var(--tt-fg-muted); border-radius:var(--tt-radius-sm); }
  .tap input:checked + span { background:var(--tt-fg); color:var(--tt-surface); border-color:var(--tt-fg); }
  .tap input:focus-visible + span { outline:2px solid var(--tt-fg); outline-offset:2px; }
  .edit-link { display:inline-flex; align-items:center; min-height:var(--control-h-touch); min-width:var(--control-h-touch); }
  /* Click-to-type rows on a franchise's page (D136): the label left, the field right, one row each. */
  .vet-click { margin:0 0 var(--tt-space-3); display:flex; flex-direction:column; gap:var(--tt-space-2); }
  .vet-click-row { display:grid; grid-template-columns:9rem minmax(0, 1fr); gap:var(--tt-space-2); align-items:start; }
  .vet-click-row dt { display:flex; align-items:center; min-height:var(--control); color:var(--tt-fg-muted); font-size:var(--tt-text-sm); }
  .vet-compose { display:flex; flex-direction:column; align-items:flex-start; gap:var(--tt-space-2); margin:var(--tt-space-3) 0; }
  .vet-compose textarea { box-sizing:border-box; width:100%; resize:vertical; font-family:inherit; }
  .vet-compose--row { flex-direction:row; flex-wrap:wrap; align-items:center; }
  .vet-compose--row :is(input, select) { box-sizing:border-box; flex:1 1 calc(var(--control) * 4); min-width:0; }
  .vet-click-row dd { display:flex; align-items:center; min-height:var(--control); margin:0; min-width:0; }
  .vet-click-row dd > form { flex:1 1 auto; min-width:0; }
  @media (max-width: 40rem) { .vet-click-row { grid-template-columns:7.5rem minmax(0, 1fr); } }
  .intake-prompt { margin:0 0 var(--tt-space-4); }
  .vet-list p { margin:0; }
  .vet-person { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--tt-space-2); }
  .vet-asset { --vet-kind-w:calc(var(--tt-space-16) + var(--tt-space-4)); display:flex; justify-content:space-between; align-items:center; gap:var(--tt-space-3); min-width:0; }
  .vet-asset-main { display:flex; align-items:baseline; gap:var(--tt-space-2); flex:1; min-width:0; }
  .vet-asset-main > * { flex-shrink:0; }
  .vet-asset-kind { width:var(--vet-kind-w); }
  .vet-asset-main > .vet-asset-name { flex-shrink:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  @media (max-width:480px) { .vet-asset { align-items:flex-start; } .vet-asset > .inline-form { margin-top:calc(-1 * var(--tt-space-2)); margin-top:calc((1lh - var(--control)) / 2); } .vet-asset-main { flex-wrap:wrap; row-gap:var(--tt-space-1); } .vet-asset-main > .vet-asset-meta { padding-left:calc(var(--vet-kind-w) + var(--tt-space-2)); } .vet-asset-main > .vet-asset-name { flex:1 1 0; display:block; min-height:0; padding-block:var(--tt-space-3); margin-block:calc(-1 * var(--tt-space-3)); } .vet-asset-main > .vet-asset-meta { flex-basis:100%; } }
  .vet-asset-actions { display:flex; align-items:center; gap:var(--tt-space-2); flex-shrink:0; }
  .vet-note { white-space:pre-wrap; max-width:72ch; }
  /* Script check (/tools/script-review/check): chips, then the first and last page side by side. */
  .sr-chips { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); margin:0; }
  .sr-samples { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:var(--tt-space-3); }
  @media (max-width:40rem) { .sr-samples { grid-template-columns:minmax(0, 1fr); } }
  .sr-sample { border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md); padding:var(--tt-space-3); min-width:0; }
  .sr-sample-head { margin:0 0 var(--tt-space-2); font-size:var(--tt-text-xs); font-weight:var(--tt-weight-medium); color:var(--tt-fg-muted); }
  .sr-sample-text { margin:0; font-family:var(--tt-font-mono); font-size:var(--tt-text-sm); white-space:pre-wrap; overflow-wrap:break-word; max-height:20rem; overflow:auto; }
  /* Poster test benchmark (/tools/poster-testing/benchmark, B3): headline, chips, the log; cards on a phone. */
  .ptb-kpis { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:var(--tt-space-4); margin-bottom:var(--tt-space-5); }
  @media (max-width:40rem) { .ptb-kpis { grid-template-columns:minmax(0, 1fr); } }
  .ptb-kpi-value { font-size:var(--tt-text-2xl); }
  /* TODO(design-system#28): ui.css sets .tt-kpi-foot in fg-faint, below 4.5:1; drop this once v0.8.0 is vendored. */
  .ptb-kpis .tt-kpi-foot { flex-wrap:wrap; color:var(--tt-fg-muted); }
  .ptb-kpis .tt-delta { white-space:nowrap; }
  .ptb-filters { display:flex; flex-wrap:wrap; justify-content:flex-start; align-items:center; gap:var(--tt-space-3) var(--tt-space-6); margin-block:var(--tt-space-3); }
  .ptb-log { font-size:var(--tt-text-sm); }
  .ptb-log .num { font-variant-numeric:tabular-nums; }
  .ptb-log td.num, .ptb-log td.ptb-nw { white-space:nowrap; }
  .ptb-filters > nav { flex:0 1 auto; margin:0; }
  .ptb-log tr.ptb-out td { color:var(--tt-fg-muted); }
  @media (max-width:40rem) {
    .ptb-log, .ptb-log tbody { display:block; }
    .ptb-log thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
    .ptb-log tr { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:var(--tt-space-2) var(--tt-space-3);
                  padding:var(--tt-space-3); margin-bottom:var(--tt-space-3); border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md); }
    .ptb-log td { display:block; height:auto; padding:0; border:0; min-width:0; overflow-wrap:break-word; text-align:left; white-space:normal; }
    .ptb-log td.ptb-project { grid-column:1 / -1; font-weight:var(--tt-weight-medium); }
    .ptb-log td.ptb-project a { display:inline-flex; align-items:center; min-height:var(--control); }
    .ptb-log td[data-label]:not(.ptb-project)::before { content:attr(data-label); display:block; margin-bottom:var(--tt-space-1);
      font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  }
  /* Script review (/tools/script-review): run list, the new-review picker, a reader's panel. */
  .sr-runs { font-size:var(--tt-text-sm); }
  .sr-picks { display:grid; gap:var(--tt-space-2); }
  .sr-pick { display:grid; grid-template-columns:auto minmax(0, 1fr) auto; align-items:center; column-gap:var(--tt-space-3); row-gap:var(--tt-space-1); min-height:var(--control-h-touch); padding:var(--tt-space-3) var(--tt-space-4); cursor:pointer; }
  .sr-pick:has(input:checked) { border-color:var(--tt-accent-solid); box-shadow:inset 0 0 0 1px var(--tt-accent-solid); }
  .sr-pick:has(input:focus-visible) { outline:2px solid var(--tt-accent-solid); outline-offset:2px; }
  .sr-pick--off { cursor:not-allowed; }
  .sr-pick-name { font-weight:var(--tt-weight-medium); }
  .sr-lede { max-width:60ch; }
  .sr-form { gap:var(--tt-space-6); max-width:48rem; }
  .sr-form-step { display:grid; gap:var(--tt-space-3); }
  .sr-form-step-head { display:flex; align-items:center; gap:var(--tt-space-2); margin:0; font-size:var(--tt-text-md); font-weight:var(--tt-weight-semibold); }
  .sr-form-step-n { display:inline-grid; place-items:center; width:var(--tt-space-6); height:var(--tt-space-6); border-radius:var(--tt-radius-full); background:var(--tt-line-subtle); font-size:var(--tt-text-xs); font-variant-numeric:tabular-nums; }
  .sr-form-foot { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-3) var(--tt-space-4); }
  .sr-form-foot > .hint { margin:0; flex:1 1 20rem; }
  .sr-runs td.sr-nw { white-space:nowrap; }
  @media (max-width:40rem) {
    .sr-runs, .sr-runs tbody { display:block; }
    .sr-runs thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
    .sr-runs tr { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:var(--tt-space-2) var(--tt-space-3);
                  padding:var(--tt-space-3); margin-bottom:var(--tt-space-3); border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md); }
    .sr-runs td { display:block; height:auto; padding:0; border:0; min-width:0; overflow-wrap:break-word; text-align:left; white-space:normal; }
    .sr-runs td.sr-runs-script { grid-column:1 / -1; font-weight:var(--tt-weight-medium); }
    .sr-runs td[data-label]:not(.sr-runs-script)::before { content:attr(data-label); display:block; margin-bottom:var(--tt-space-1);
      font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  }
  .sr-pick > input { grid-row:1 / span 2; margin:0; }
  .sr-pick > span { grid-column:2; min-width:0; overflow-wrap:break-word; }
  .sr-pick > .sub { margin:0; max-width:none; font-size:var(--tt-text-xs); }
  .sr-pick > a.sub { grid-column:3; grid-row:1 / span 2; font-size:var(--tt-text-sm); white-space:nowrap; }
  .sr-pick--off { color:var(--tt-fg-muted); }
  .sr-reader { min-width:0; }
  .sr-run { gap:var(--tt-space-6); max-width:72rem; }
  .sr-head { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:var(--tt-space-4); }
  .sr-head-title { min-width:0; }
  .sr-title { margin:var(--tt-space-1) 0; font-size:var(--tt-text-2xl); font-weight:var(--tt-weight-semibold); letter-spacing:-0.02em; overflow-wrap:break-word; }
  .sr-head-side { display:flex; flex-direction:column; align-items:flex-end; gap:var(--tt-space-2); }
  .sr-head-actions { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); }
  .sr-small { margin:0; font-size:var(--tt-text-sm); }
  .sr-steps { display:flex; flex-wrap:wrap; gap:var(--tt-space-5); margin:0; padding:0; list-style:none; font-size:var(--tt-text-sm); color:var(--tt-fg-muted); }
  .sr-step { display:flex; align-items:center; gap:var(--tt-space-2); }
  .sr-step-dot { width:var(--tt-space-2); height:var(--tt-space-2); border-radius:var(--tt-radius-full); background:var(--tt-line); }
  .sr-step--done { color:var(--tt-fg); } .sr-step--done .sr-step-dot { background:var(--tt-ok-solid); }
  .sr-step--now { color:var(--tt-fg); font-weight:var(--tt-weight-medium); }
  .sr-step--now .sr-step-dot { background:var(--tt-accent-solid); animation:sr-pulse 1.4s ease-in-out infinite; }
  @keyframes sr-pulse { 50% { opacity:.35; } }
  @media (prefers-reduced-motion:reduce) { .sr-step--now .sr-step-dot { animation:none; } }
  .sr-kpi--ok::after { background:var(--tt-ok-solid); }
  .sr-kpi--warn::after { background:var(--tt-warn-solid); }
  .sr-kpi--bad::after { background:var(--tt-bad-solid); }
  .sr-kpi--plain::after { background:var(--tt-line); }
  .sr-meter { appearance:none; display:block; width:100%; height:var(--tt-space-1); border:0; border-radius:var(--tt-radius-full); background:var(--tt-line-subtle); overflow:hidden; }
  .sr-meter::-webkit-meter-bar { background:var(--tt-line-subtle); border:0; border-radius:var(--tt-radius-full); }
  .sr-meter::-webkit-meter-optimum-value { background:var(--tt-accent-solid); border-radius:var(--tt-radius-full); }
  .sr-meter::-moz-meter-bar { background:var(--tt-accent-solid); }
  .sr-kpi-value { font-size:var(--tt-text-2xl); }
  .sr-readers { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:var(--tt-space-4); }
  @media (max-width:64rem) { .sr-readers { grid-template-columns:minmax(0, 1fr); } }
  .sr-reader-head { display:flex; align-items:center; justify-content:space-between; gap:var(--tt-space-3); }
  .sr-reader-head h3 { margin:0; font-size:var(--tt-text-base); font-weight:var(--tt-weight-semibold); }
  .sr-dots { display:inline-flex; gap:var(--tt-space-1); }
  .sr-dot { width:var(--tt-space-2); height:var(--tt-space-2); border-radius:var(--tt-radius-full); background:var(--tt-line); }
  .sr-dot--ok { background:var(--tt-ok-solid); } .sr-dot--bad { background:var(--tt-bad-solid); }
  .sr-badges { flex-wrap:wrap; gap:var(--tt-space-2); }
  .sr-rationale { margin:0; font-size:var(--tt-text-sm); line-height:1.55; color:var(--tt-fg-muted); }
  .sr-scores { display:grid; gap:var(--tt-space-2); }
  .sr-score { display:grid; grid-template-columns:6.5rem minmax(0, 1fr) auto; align-items:center; gap:var(--tt-space-3); font-size:var(--tt-text-sm); }
  .sr-score-label { color:var(--tt-fg-muted); }
  .sr-score-val { min-width:4.5rem; text-align:right; }
  .sr-details > summary { cursor:pointer; font-size:var(--tt-text-sm); color:var(--tt-fg-muted); min-height:var(--control-h-touch); display:flex; align-items:center; }
  .sr-details > summary:hover { color:var(--tt-fg); }
  .sr-details ul, .sr-details p { margin:var(--tt-space-2) 0 0; font-size:var(--tt-text-sm); }
  .sr-group { display:flex; align-items:center; gap:var(--tt-space-2); margin:var(--tt-space-2) 0 var(--tt-space-3); font-size:var(--tt-text-sm); font-weight:var(--tt-weight-semibold); }
  .sr-findings { display:grid; gap:0; margin:0 0 var(--tt-space-5); padding:0; list-style:none; }
  .sr-finding { padding:var(--tt-space-4) 0; border-top:1px solid var(--tt-line-subtle); }
  .sr-finding-meta { gap:var(--tt-space-2); font-size:var(--tt-text-xs); }
  .sr-quote { margin:var(--tt-space-3) 0 var(--tt-space-2); padding-left:var(--tt-space-3); border-left:2px solid var(--tt-line); font-family:var(--tt-font-mono); font-size:var(--tt-text-sm); white-space:pre-wrap; overflow-wrap:break-word; }
  .sr-why { margin:0; font-size:var(--tt-text-sm); line-height:1.55; }
  .sr-example { margin-top:var(--tt-space-2); white-space:pre-wrap; }
  .sr-page-link { color:var(--tt-fg-muted); text-decoration:underline; text-decoration-color:var(--tt-line); text-underline-offset:.2em; }
  .sr-page-link:hover { color:var(--tt-fg); }
  .sr-page-text { margin:0; font-family:var(--tt-font-mono); font-size:var(--tt-text-sm); line-height:1.5; white-space:pre-wrap; overflow-wrap:break-word; }
  .sr-page-text mark { background:var(--tt-accent-soft); color:inherit; border-radius:var(--tt-radius-sm); }
  .sr-about { border-top:1px solid var(--tt-line-subtle); padding-top:var(--tt-space-2); }
  @media (max-width:40rem) { .sr-head-side { align-items:flex-start; } .sr-score { grid-template-columns:5.5rem minmax(0, 1fr) auto; } }
  /* A table row that opens a record: the name link stretches over the row, the row shows it on hover,
     and an action link (row-open) sits above the stretch so it stays its own target. */
  tr:has(a.row-link) { position:relative; }
  tr:has(a.row-link):hover td { background:var(--tt-hover); }
  /* Only where a pointer hovers: on a touch screen the fill would stick to the last row tapped. */
  @media (hover:hover) {
    .table-scroll > table > tbody > tr:not(.group, .edit-row):hover > td { background:var(--tt-hover); }
  }
  a.row-link::after { content:""; position:absolute; inset:0; }
  /* The Franchise column's link sits above the stretched row link, or the row takes its click (D270). */
  td a[href^="/projects/franchise/"] { position:relative; z-index:1; }
  /* The row a side panel has open (D131) keeps a mark: a rule above and below and the hover fill. Its
     cells keep their padding, so nothing in the row moves when the panel opens (D315). */
  .table-scroll tr.side-panel-open { box-shadow:none; }
  .table-scroll tr.side-panel-open > * { background:var(--tt-hover);
                                         box-shadow:inset 0 2px 0 var(--tt-fg), inset 0 -2px 0 var(--tt-fg); }
  /* A tablet's or a laptop's bar has no room for an area's tabs beside search, New and you (at 768 they pushed
     you off the screen; at 1024 they ran the page 230px wide; an admin's ran it to 1316px up to 1305): the tabs
     take the slim row under the bar, as on a phone, and scroll there if they must. 120rem is where the widest
     set, an admin's eleven Settings tabs, fits beside them with room left for the page's title (at 1440 they
     ran the page to 1593px once Meeting recorders and API tokens joined). */
  @media (min-width:40.01rem) and (max-width:119.99rem) {
    .bar-controls > .bar-tabs { display:none; }
    .bar-controls:not(:has(> :not(.bar-tabs))) { display:none; }
    .bar-sub:has(> .bar-tabs) { display:flex; align-items:center; padding:0 var(--gutter) var(--tt-space-2);
                                overflow-x:auto; scrollbar-width:none; }
    .bar-sub > .bar-tabs { flex:0 1 auto; min-width:0; }
    .bar-sub > .bar-action { display:none; }
  }
  a.row-open { position:relative; z-index:1; display:inline-flex; align-items:center; gap:var(--tt-space-1);
               min-height:var(--control); white-space:nowrap; }
  .crumbs { color:var(--tt-fg-muted); margin:0 0 var(--tt-space-2); }
  .crumbs a { color:inherit; display:inline-flex; align-items:center; min-height:var(--control-h-touch); }
  .crumbs [aria-current] { color:var(--tt-fg); font-weight:var(--tt-weight-medium); }
  /* Projects list (projects-list-view.ts): a sortable header, a filter bar, a poster grid. */
  th a.th-sort { color:inherit; text-decoration:none; display:inline-flex; min-height:var(--control);
                 min-width:var(--control-h-touch); align-items:center; }
  th a.th-sort:hover { color:var(--tt-fg); }
  .list-bar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--tt-space-3);
              margin:0 0 var(--tt-space-4); }
  /* One row: the filter field takes the room, the status and the button keep their own width. */
  .list-filters { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end;
                  gap:var(--tt-space-2); flex:1 1 32rem; }
  .list-filters :is(input, select) { width:auto; min-width:0; }
  .list-filters input { flex:1 1 16rem; max-width:28rem; }
  .list-filters select { flex:0 1 auto; }
  /* The bar and its table read as one block: a small step, not the page's gap between blocks. */
  .content > .list-bar { margin-bottom:calc(var(--tt-space-3) - var(--block-gap)); }
  @media (max-width:40rem) { .list-filters select { flex:1 1 auto; } }
  /* Slate fund (S11 F1): the filter is the bar's only control, so it starts at the left; a plain header
     sits level with the sortable ones beside it. */
  .slate-fund-bar, .slate-fund-bar .list-filters { justify-content:flex-start; }
  .slate-fund thead th { vertical-align:middle; }
  .poster-thumb { display:block; width:var(--tt-space-8); height:var(--tt-space-12); object-fit:cover;
                  border-radius:var(--tt-radius-sm); }
  .poster-none { background:var(--tt-hover); }
  .poster-grid { list-style:none; margin:0; padding:0; display:grid; gap:var(--tt-space-4);
                 grid-template-columns:repeat(5, minmax(0, 1fr)); }
  @media (max-width:900px) { .poster-grid { grid-template-columns:repeat(3, minmax(0, 1fr)); } }
  @media (max-width:520px) { .poster-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); } }
  .poster-card { display:grid; gap:var(--tt-space-1); color:inherit; text-decoration:none; }
  .poster-card:hover .poster-title { text-decoration:underline; }
  .contact-row.side-panel-open { box-shadow:inset 0 2px 0 var(--tt-fg), inset 0 -2px 0 var(--tt-fg); background:var(--tt-hover); }
  /* Forced colours drop shadows and fills: the open card or row keeps a ring there instead. */
  @media (forced-colors:active) {
    .side-panel-open, .table-scroll tr.side-panel-open, .contact-row.side-panel-open { outline:2px solid CanvasText; outline-offset:-2px; }
  }
  .side-panel-row .tag-list { margin-bottom:0; }
  /* The poster whose franchise is open in the side panel (D154) keeps an outline, as an open row does. */
  .poster-card.side-panel-open { outline:2px solid var(--tt-fg); outline-offset:var(--tt-space-1); border-radius:var(--tt-radius-md); }
  .poster-img { display:block; width:100%; aspect-ratio:2 / 3; object-fit:cover; border-radius:var(--tt-radius-sm); }
  .poster-title { font-weight:var(--tt-weight-medium); }
  .vet-add > summary { min-height:var(--control); display:flex; align-items:center; cursor:pointer; }
  .hours-form .opt { font-weight:var(--tt-weight-normal); }
  .edit-actions { display:flex; align-items:center; gap:var(--tt-space-3); flex-wrap:wrap; }
  .cancel { display:inline-flex; align-items:center; min-height:var(--control); color:var(--tt-fg-muted);
            text-decoration:none; padding:0 var(--tt-space-1); }
  .cancel:hover { color:var(--tt-fg); }
  /* .edit-row is also the Manage work list's flex row; in a table it stays a row, or colspan means nothing. */
  tr.edit-row { display:table-row; }
  tr.edit-row td { background:var(--tt-sunken); padding:0 var(--tt-space-3); height:auto; white-space:normal; overflow:visible; }
  h2.person { display:flex; justify-content:space-between; align-items:baseline; gap:var(--tt-space-3);
              font-size:var(--tt-text-base); text-transform:none; letter-spacing:0; color:var(--tt-fg);
              font-weight:var(--tt-weight-medium); margin:0; }
  h2.person span { color:var(--tt-fg-muted); }
  h2.range { font-size:var(--tt-text-xs); text-transform:uppercase; letter-spacing:.08em;
             color:var(--tt-fg-muted); margin:0 0 var(--tt-space-3); }
  table.hours tfoot td { border-bottom:0; padding-top:var(--tt-space-3); color:var(--tt-fg-muted);
                         font-weight:var(--tt-weight-medium); }
  td.day { white-space:nowrap; }
  /* A text field inside a table cell takes the control metric like every other input. */
  .cell-input { width:9rem; }
  .cell-input--wide { width:11rem; }

  /* ---- manage work: one row per item — the name IS the field, then Rename, then Retire ---- */
  .edit-list { list-style:none; margin:0; padding:0; }
  .edit-row { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2);
              padding:var(--tt-space-2) 0; border-bottom:1px solid var(--tt-line-subtle); }
  .edit-row > .cluster { flex:2 1 24rem; min-width:0; }
  /* A company job's Function ("Operations & Production Support") runs longer than its name, so on a wide
     screen the pair splits the row unevenly instead of clipping the Function at half. */
  @media (min-width:901px) {
    .edit-row > .cluster > input[name="label"] { flex-basis:14rem; }
    .edit-row > .cluster > input[name="parentFunction"] { flex-basis:18rem; }
  }
  /* An auto-width table gives a name box only what it has to; the slide wrapper carries the rest. */
  @media (min-width:901px) { td .cluster > input { min-width:20rem; } }

  /* Contacts is a one-handed lookup: a whole row is the 44px target, and nothing scrolls sideways. */
  .contact-list { list-style:none; margin:0; padding:0; }
  /* A form card (D99 Add contact): centred, one column, every control one width and a touch target tall. */
  .form-card { max-width:var(--measure); margin:var(--tt-space-6) auto; padding:var(--tt-space-6);
               border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md); background:var(--tt-surface); }
  .form-card-head { display:grid; gap:var(--tt-space-1); margin-bottom:var(--tt-space-6); }
  .form-card-head h2 { margin:0; font-size:var(--tt-text-xl); font-weight:var(--tt-weight-semibold);
                       text-transform:none; letter-spacing:normal; color:var(--tt-fg); }
  .form-card-head .sub { margin:0; }
  @media (max-width:640px) { .form-card { max-width:none; margin:var(--tt-space-4) 0 0; padding:0; border:0; border-radius:0; } }
  .form-card-fields { display:grid; gap:var(--tt-space-4); max-width:none; }
  .form-card-fields > .field { gap:var(--tt-space-2); }
  .form-card-fields > .field > label { margin:0; }
  .form-card-fields :where(input:not([type="hidden"]), select, textarea) { width:100%; max-width:none; min-height:var(--control); }
  .field-optional { font-weight:var(--tt-weight-normal); color:var(--tt-fg-muted); }
  .field-error { margin:0; font-size:var(--tt-text-sm); color:var(--tt-bad-text); }
  .form-card-fields .hint { margin:0; }
  .form-card-actions { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); padding-top:var(--tt-space-2); }
  .contact-row { display:flex; align-items:center; gap:var(--tt-space-3); min-height:var(--control-h-touch);
                 padding:var(--tt-space-2) 0; border-bottom:1px solid var(--tt-line-subtle); color:inherit;
                 text-decoration:none; }
  .contact-row-main { flex:1 1 auto; min-width:0; overflow-wrap:break-word; }
  .mail-row { flex-wrap:wrap; }
  .mail-row > .cluster { flex-wrap:wrap; max-width:100%; }
  .mail-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
                  gap:var(--tt-space-3); margin-top:var(--tt-space-4); }
  .mail-toolbar > .sub { margin:0; }
  /* The long privacy wording behind one quiet line, so a section's lead stays one or two lines. */
  .how > summary { display:inline-flex; align-items:center; min-height:var(--control); cursor:pointer;
                   color:var(--tt-fg-muted); text-decoration:underline; text-underline-offset:.2em; list-style:none; }
  .how > summary::-webkit-details-marker { display:none; }
  .how[open] { flex-basis:100%; }
  .how > p { margin:var(--tt-space-2) 0 0; color:var(--tt-fg-muted); }
  .mail-toolbar-actions { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-3); }
  .contact-row-side { flex:0 0 calc(var(--tt-space-16) * 3); text-align:right; color:var(--tt-fg-muted);
                      font-size:var(--tt-text-xs); }
  .contact-row-main .hint { margin-top:0; }
  .contact-row-tags { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); margin-top:var(--tt-space-1); }
  .contact-managed { display:block; margin-top:var(--tt-space-1); }
  /* A team member's name sits in the same touch-height box as the Company and Email links beside it. */
  @media (max-width:900px), (pointer:coarse) {
    .contact-managed-value { display:inline-flex; align-items:center; min-height:var(--control-h-touch); }
  }
  @media (max-width:900px) { .contact-row-side { flex:none; max-width:45%; } }
  /* Tools hub: an off-site row's action word and its external icon stay on one line (.icon is a block). */
  .tool-action { display:inline-flex; align-items:center; gap:var(--tt-space-1); }
  .tools-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:var(--tt-space-4); margin:0 0 var(--tt-space-5); padding:0; list-style:none; }
  @media (max-width:64rem) { .tools-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); } }
  @media (max-width:40rem) { .tools-grid { grid-template-columns:minmax(0, 1fr); } }
  .tools-grid > li { display:flex; min-width:0; }
  .tools-card { display:grid; grid-template-rows:auto auto 1fr auto; gap:var(--tt-space-2); width:100%; padding:var(--tt-space-5); color:inherit; text-decoration:none; transition:border-color var(--tt-dur-fast), box-shadow var(--tt-dur-fast); }
  .tools-card:hover { border-color:var(--tt-line); box-shadow:var(--tt-shadow-md); }
  .tools-card:focus-visible { outline:2px solid var(--tt-accent-ring); outline-offset:2px; }
  .tools-card-icon { display:grid; place-items:center; width:var(--tt-space-8); height:var(--tt-space-8); margin-bottom:var(--tt-space-2); border-radius:var(--tt-radius-md); background:var(--tt-accent-soft); color:var(--tt-accent-text); }
  .tools-card-name { font-size:var(--tt-text-base); font-weight:var(--tt-weight-semibold); }
  .tools-card-purpose { font-size:var(--tt-text-sm); line-height:1.5; color:var(--tt-fg-muted); }
  .tools-card-foot { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); margin-top:var(--tt-space-2); font-size:var(--tt-text-sm); }
  .tools-card-foot .tool-action { margin-left:auto; color:var(--tt-fg-muted); }
  .tools-card:hover .tool-action { color:var(--tt-fg); }
  .list-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-3); margin-bottom:var(--tt-space-4); }
  /* People as a records table (D194): initials beside a bold name, a muted dash for a blank, chips that wrap. */
  .ct-name { display:inline-flex; align-items:center; gap:var(--tt-space-2); min-height:var(--control);
             color:inherit; text-decoration:none; }
  .ct-name:hover strong { text-decoration:underline; text-underline-offset:.2em; }
  .ct-company { color:inherit; text-decoration:none; }
  .ct-company:hover { text-decoration:underline; text-underline-offset:.2em; }
  .ct-mark { display:inline-flex; align-items:center; justify-content:center; flex:none; width:1.5rem; height:1.5rem;
             border-radius:50%; background:var(--tt-hover); font-size:var(--tt-text-xs);
             font-weight:var(--tt-weight-semibold); }
  .ct-name + .chip { margin-left:var(--tt-space-2); }
  /* The role / owed hint sits on the name's line, after any chip, so rows keep one height; on a phone a
     long one moves down whole rather than breaking mid-phrase. */
  td .ct-name ~ .hint { display:inline-block; max-width:100%; margin:0 0 0 var(--tt-space-2); overflow:hidden;
                       white-space:nowrap; text-overflow:ellipsis; vertical-align:middle; }
  .ct-blank { color:var(--tt-fg-muted); }
  .ct-people th { vertical-align:middle; }
  .ct-people td { overflow-wrap:break-word; }
  /* On a desktop every People cell holds one line, so a team chip or a two-word company never makes one
     row taller than the rest; the table scrolls sideways instead. A phone keeps its stacked cards. */
  @media (min-width:641px) {
    .ct-people td, .ct-people .ct-tags > .chip { white-space:nowrap; }
    .ct-people .ct-tags, .ct-people .cell { flex-wrap:nowrap; }
    /* A cell holding a chip is a flex row whose gap already spaces the chip and hint. */
    .ct-people .cell:has(> .chip) > :is(.chip, .hint) { margin-left:0; }
  }
  .ct-ghost input { width:100%; min-height:var(--control); border:1px dashed var(--tt-line-subtle); background:transparent; }
  .ct-toolbar { justify-content: flex-start; }
  .content .ct-toolbar .list-search { flex: 0 1 calc(var(--tt-space-16) * 3.75); }
  .ct-empty { margin:var(--tt-space-3) 0 0; }
  .ct-cards { list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:var(--tt-space-3); }
  /* A card grows to fill its row only up to a card's width: two people at 2560 stretched to half the page each. */
  .ct-cards > li { flex:1 1 14rem; min-width:0; max-width:22rem; }
  .ct-card { display:grid; gap:var(--tt-space-1); align-content:start; padding:var(--tt-space-4); min-height:100%;
             border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md); color:inherit; text-decoration:none; }
  .ct-card:hover { border-color:var(--tt-fg); }
  .ct-card .hint { margin:0; overflow-wrap:break-word; }
  .ct-card--ghost { border-style:dashed; }
  .ct-tags { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); }
  /* A long tag wraps rather than pushing a phone's contact card sideways. */
  .ct-tags { min-width:0; }
  .ct-tags > .chip { max-width:100%; white-space:normal; }
  /* A name edited in a table cell keeps room for a real franchise name; on a tablet the actions column
     otherwise squeezed it to 256px and cut "History That Doesn't Suck Podcast". */
  @media (min-width:700px) { .cluster > .name-field { min-width:20rem; } }
  .content .list-search { display:flex; flex:1 1 calc(var(--tt-space-16) * 4); max-width:var(--measure-text); }
  .list-search input { flex:1 1 auto; width:100%; min-width:0; max-width:none; height:var(--control); margin:0; }
  .list-toolbar > .btn { min-height:var(--control); height:var(--control); }
  .tag-bar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
             gap:var(--tt-space-3); margin-bottom:var(--tt-space-4); }
  .tag-bar > nav { flex:1 1 auto; }
  .tag-rename[open] { flex-basis:100%; }
  .tag-rename > form { margin-top:var(--tt-space-2); }
  .crm-view-save[open] { flex-basis:100%; }
  .crm-view-save > form { margin-top:var(--tt-space-2); }
  .crm-view-save .field-error { flex-basis:100%; margin:0; }
  .crm-view-delete { margin:0; }
  .task-row > form { flex:none; }
  .task-row > .contact-row-main { max-width:var(--measure-text); }
  .task-late { color:var(--tt-bad-text); }
  .task-add { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); margin-top:var(--tt-space-3); }
  /* Work (platform/boards, D159): a board's status groups, their dots, the done tick, the add row. */
  .work-meta { margin:0; color:var(--tt-fg-muted); font-size:var(--tt-text-sm); max-width:var(--measure-text); }
  /* The task page's way back is a target of its own: 44px tall for a finger (it was 17px). */
  @media (max-width:900px), (pointer:coarse) {
    .work-back > a { display:inline-flex; align-items:center; min-height:var(--control); }
  }
  .work-bar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--tt-space-3); }
  .work-groups { display:grid; gap:var(--tt-space-4); }
  .work-group { border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md); padding:0 var(--tt-space-3); }
  .work-group > summary { display:flex; align-items:center; gap:var(--tt-space-2); min-height:var(--control);
                          cursor:pointer; list-style:none; }
  .work-group > summary::-webkit-details-marker { display:none; }
  .work-group > summary h2 { margin:0; font-size:var(--tt-text-sm); }
  .work-count { display:inline-flex; align-items:center; justify-content:center; min-width:var(--tt-space-6); min-height:var(--tt-space-6);
                padding:0 var(--tt-space-2); border-radius:var(--tt-radius-full); background:var(--tt-hover); color:var(--tt-fg-muted);
                font-size:var(--tt-text-xs); font-weight:var(--tt-weight-medium); }
  .work-link { display:flex; align-items:center; gap:var(--tt-space-1); }
  .work-link > a { min-width:0; overflow-wrap:break-word; }
  .work-kind { flex:none; color:var(--tt-fg-muted); font-size:var(--tt-text-xs); }
  .work-group[open] > summary { border-bottom:1px solid var(--tt-line-subtle); }
  .work-group table { table-layout:fixed; }
  .work-group th:nth-child(2) { width:10rem; }
  .work-group th:nth-child(3) { width:7rem; }
  .work-group th:nth-child(4) { width:6rem; }
  .work-group th:nth-child(5) { width:30%; }
  .work-dot { width:var(--dot); height:var(--dot); border-radius:50%; flex:none; background:var(--tt-fg-muted); }
  .work-dot--doing { background:var(--tt-accent-solid); }
  .work-dot--waiting { background:var(--tt-warn-text); }
  .work-dot--blocked { background:var(--tt-bad-text); }
  .work-dot--done { background:var(--tt-ok-text); }
  .work-task { display:flex; align-items:center; gap:var(--tt-space-1); min-width:0; }
  /* On a touch screen a cell's link is inline-flex, so its text sits in its own span to be able to wrap. */
  .work-task > :last-child, .work-task > a > span { min-width:0; overflow-wrap:break-word; }
  /* The tick keeps a full touch target; the circle drawn inside it is the small mark. */
  /* A row opens as a whole (row-link); its other links and the tick sit above that so they keep their own click. */
  :is(.work-index, .work-group) td :is(a:not(.row-link), button) { position:relative; z-index:1; }
  .work-tick { flex:none; padding:0; border-color:transparent; background:none; }
  .work-tick::before { content:""; width:var(--tt-space-4); height:var(--tt-space-4); border:1px solid var(--tt-fg-muted); border-radius:50%; }
  .work-tick--done::before { background:var(--tt-ok-text); border-color:var(--tt-ok-text); }
  span.work-tick { display:inline-flex; align-items:center; justify-content:center; min-width:var(--control);
                   min-height:var(--control); }
  .work-help { margin:0 0 var(--tt-space-3); max-width:var(--measure-text); color:var(--tt-fg-muted); }
  .work-new-what { margin:0; font-size:var(--tt-text-sm); color:var(--tt-fg-muted); }
  .work-add { flex-wrap:wrap; margin:var(--tt-space-2) 0 var(--tt-space-3); }
  .work-add > input { flex:1 1 14rem; min-width:0; }
  .work-add-meta { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); min-width:0; max-width:100%; }
  .work-add-meta > input, .work-add-meta > select { width:auto; flex:1 1 8rem; min-width:0; }
  .work-col .work-add-meta { flex:1 1 100%; flex-direction:column; }
  .work-col .work-add-meta > input, .work-col .work-add-meta > select { width:100%; min-width:0; flex:none; }
  .work-col .work-add:not(:focus-within):has(input[name="title"]:placeholder-shown) :is(.work-add-meta, button) { display:none; }
  .work-task-page { display:grid; gap:var(--tt-space-4); max-width:var(--measure-wide); }
  /* A board as Kanban (S2): a column per status, side by side on a wide screen and stacked on a phone. A
     card is a link to its task; its Move select saves the status. Modelled on the Franchises board. */
  /* Work S6: a board's Calendar. A month grid on a wide screen; on a phone, an agenda of the days with tasks. */
  .wcal { min-width:0; }
  .wcal-date { display:block; }
  .wcal-head { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); margin:0 0 var(--tt-space-3); }
  .wcal-title { margin:0; min-width:10rem; text-align:center; font-size:var(--tt-text-xl); }
  .wcal-undated { margin-left:auto; color:var(--tt-fg-muted); font-size:var(--tt-text-sm); }
  .wcal-weekdays, .wcal-grid { list-style:none; margin:0; padding:0; display:grid;
                               grid-template-columns:repeat(7, minmax(0, 1fr)); }
  .wcal-weekdays li { padding:0 var(--tt-space-2) var(--tt-space-1); color:var(--tt-fg-muted); font-size:var(--tt-text-xs); }
  .wcal-grid { border-top:1px solid var(--tt-line-subtle); border-left:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-lg);
               overflow:hidden; }
  .wcal-day { min-width:0; min-height:7rem; padding:var(--tt-space-1) var(--tt-space-2) var(--tt-space-2);
              border-right:1px solid var(--tt-line-subtle); border-bottom:1px solid var(--tt-line-subtle); background:var(--tt-raised); }
  .wcal-day--out { background:var(--tt-sunken); }
  .wcal-day--out .wcal-num { color:var(--tt-fg-muted); }
  .wcal-num { display:inline-grid; place-items:center; min-width:1.75rem; height:1.75rem; border-radius:50%;
              font-size:var(--tt-text-sm); }
  .wcal-day--today .wcal-num { background:var(--tt-fg); color:var(--tt-surface); font-weight:var(--tt-weight-medium); }
  .wcal-long { display:none; }
  .wcal-tasks { list-style:none; margin:var(--tt-space-1) 0 0; padding:0; display:grid; gap:var(--tt-space-1); }
  .wcal-task { display:flex; align-items:center; gap:var(--tt-space-1); min-width:0; padding:var(--tt-space-1);
               border-radius:var(--tt-radius-md); color:inherit; text-decoration:none; font-size:var(--tt-text-sm); }
  .wcal-task > span:last-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .wcal-task:hover, .wcal-task--open { background:var(--tt-sunken); }
  .wcal-task--late > span:last-child { color:var(--tt-bad-text); }
  .wcal-more { display:block; padding:0 var(--tt-space-1); color:var(--tt-fg-muted); font-size:var(--tt-text-xs); }
  @media (max-width:48rem) {
    .wcal-weekdays { display:none; }
    .wcal-grid { grid-template-columns:minmax(0, 1fr); border:0; border-radius:0; gap:var(--tt-space-2); }
    .wcal-day { min-height:0; border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-lg); padding:var(--tt-space-2) var(--tt-space-3); }
    .wcal-day--empty, .wcal-day--out { display:none; }
    .wcal-num { display:none; }
    .wcal-long { display:block; font-size:var(--tt-text-sm); font-weight:var(--tt-weight-medium); }
    .wcal-day--today .wcal-long { color:var(--tt-fg); }
    .wcal-task > span:last-child { white-space:normal; overflow-wrap:break-word; }
    .wcal-undated { margin-left:0; flex-basis:100%; }
  }
  /* Positioned for the same reason as the pipeline's board: its screen-reader labels scroll with it. */
  .work-kanban { position:relative; display:flex; flex-wrap:nowrap; align-items:flex-start; gap:var(--tt-space-3); overflow-x:auto;
                 padding-bottom:var(--tt-space-2); }
  .work-col { flex:1 0 15rem; min-width:0; border:1px solid transparent; border-radius:var(--tt-radius-lg);
              background:var(--tt-surface-2); padding:var(--tt-space-2); }
  .work-col-head { display:flex; align-items:center; gap:var(--tt-space-2); min-height:var(--control); margin:0;
                   padding:0 var(--tt-space-2); font-size:var(--tt-text-base); font-weight:var(--tt-weight-semibold); }
  .work-cards { list-style:none; margin:var(--tt-space-2) 0 0; padding:0; display:grid; gap:var(--tt-space-2); }
  .work-card { position:relative; min-width:0; border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-lg);
               background:var(--tt-raised); box-shadow:var(--tt-shadow-sm); }
  .work-card:has(> .work-card-link:hover) { border-color:var(--tt-line); }
  .work-card.side-panel-open { box-shadow:0 0 0 2px var(--tt-accent-solid); }
  .work-card-link { display:grid; gap:var(--tt-space-2); padding:var(--tt-space-4); color:inherit; text-decoration:none;
                    overflow-wrap:break-word; }
  .work-card-title { font-size:var(--tt-text-base); font-weight:var(--tt-weight-medium); }
  .work-card-facts { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); font-size:var(--tt-text-xs);
                     color:var(--tt-fg-muted); }
  /* Austin's ClickUp card face (B1): the project above the title; avatar, due date and a priority flag. */
  .work-card-proj { font-size:var(--tt-text-xs); color:var(--tt-fg-muted); overflow:hidden; text-overflow:ellipsis;
                    white-space:nowrap; }
  /* The default avatar sits on the accent's solid, the pair the design system holds at 4.5:1 for small text;
     dark mode's lighter chart-1 (#7d66d9) gave white initials only 4.4:1 and axe failed /work/:id. */
  .work-avatar { background:var(--tt-accent-solid); color:var(--tt-accent-contrast); }
  .work-avatar--teal { background:var(--tt-chart-2); }
  .work-avatar--blue { background:var(--tt-chart-3); }
  .work-avatar--green { background:var(--tt-chart-5); }
  .work-avatar:is(.work-avatar--teal, .work-avatar--blue, .work-avatar--green) { color:var(--tt-warn-contrast); }
  .work-review { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); padding:0 var(--tt-space-3) var(--tt-space-3);
                 font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .work-review select { flex:1 1 6rem; min-width:0; }
  /* Purple only on hover, keyboard focus or the picked project (Dustin 2026-11-30); a resting card is plain. */
  .work-card--project:has(> .work-card-link:hover) { border-color:var(--tt-accent-border); }
  .work-card--project > .work-card-link:focus-visible { outline:var(--focus-ring); outline-offset:var(--focus-offset);
    border-radius:var(--tt-radius-lg); }
  .work-card--project.work-card--on { border-color:var(--tt-accent-border); background:var(--tt-accent-soft); }
  .work-focus { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); margin:0 0 var(--tt-space-3); }
  .work-focus-name { display:flex; align-items:baseline; gap:var(--tt-space-2); margin:0 auto 0 0;
    font-size:var(--tt-text-base); font-weight:var(--tt-weight-semibold); }
  .work-focus-kind { font-size:var(--tt-text-xs); font-weight:var(--tt-weight-normal); color:var(--tt-fg-muted); }
  .work-proj-subs, .work-card-subs { padding:0 var(--tt-space-3) var(--tt-space-3); font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .work-proj-subs summary, .work-card-subs summary { cursor:pointer; min-height:var(--control); display:flex; align-items:center; }
  .work-proj-subs ul, .work-card-subs ul { display:grid; gap:var(--tt-space-1); margin:var(--tt-space-2) 0 0; padding:0; list-style:none; }
  .work-proj-subs li, .work-card-subs li { display:flex; align-items:center; gap:var(--tt-space-2); }
  .work-proj-subs a, .work-card-subs a { color:var(--tt-fg); }
  .work-proj-none { margin:0; padding:0 var(--tt-space-3) var(--tt-space-3); font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  /* The "+" sits in the column head's row; its form opens under the head. */
  .work-col { position:relative; }
  .work-col-head { padding-right:calc(var(--control) + var(--tt-space-2)); }
  .work-col-add > summary { position:absolute; top:var(--tt-space-2); right:var(--tt-space-2); display:grid; place-items:center;
    inline-size:var(--control); block-size:var(--control); border-radius:var(--tt-radius-full); cursor:pointer; list-style:none;
    font-size:var(--tt-text-lg); line-height:1; color:var(--tt-fg-muted); }
  .work-col-add > summary::-webkit-details-marker { display:none; }
  .work-col-add > summary:hover, .work-col-add[open] > summary { color:var(--tt-fg); background:var(--tt-hover); }
  .work-col-add > summary:focus-visible { outline:var(--focus-ring); outline-offset:var(--focus-offset); }
  .work-proj-add { margin:0 0 var(--tt-space-2); }
  .work-proj-add[open] > .navp-form { padding:var(--tt-space-2); }
  .work-move { display:flex; align-items:center; gap:var(--tt-space-2); padding:0 var(--tt-space-3) var(--tt-space-3); }
  .work-move select { flex:1 1 6rem; min-width:0; }
  .work-move .btn[hidden] { display:none; }
  /* Goals band over the Kanban (D343): four tiles in a row on a wide screen; on a phone it folds to one
     "This week" line (a details element the client script closes below 64rem). */
  .goals-band { margin:0 0 var(--tt-space-4); }
  .goals-summary { display:none; }
  .goals-tiles { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:var(--tt-space-3); }
  .goals-tile { display:grid; align-content:start; gap:var(--tt-space-3); min-width:0; padding:var(--tt-space-5);
                border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-lg); background:var(--tt-raised);
                box-shadow:var(--tt-shadow-sm); }
  .goals-tiles > .goals-tile { border-top:2px solid var(--tt-accent-solid); }
  .goals-tile--project { border-color:var(--tt-accent-border); }
  .goals-label { margin:0; font-size:var(--tt-text-base); font-weight:var(--tt-weight-medium); color:var(--tt-fg-muted); }
  .goals-line { margin:0; font-size:var(--tt-text-md); font-weight:var(--tt-weight-semibold); overflow-wrap:break-word; }
  .goals-line--big { font-size:var(--tt-text-xl); }
  .goals-tile--company { align-content:start; }
  .goals-list { display:grid; gap:var(--tt-space-1); margin:0; padding-left:var(--tt-space-4); }
  .goals-edit summary { display:inline-flex; cursor:pointer; list-style:none; }
  .goals-edit summary::-webkit-details-marker { display:none; }
  .goals-edit form { display:grid; gap:var(--tt-space-2); margin-top:var(--tt-space-2); }
  .goals-edit textarea { width:100%; min-width:0; }
  .goals-edit-actions { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); }
  .goals-sub, .goals-hint { margin:0; font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .goals-progress { display:flex; align-items:center; gap:var(--tt-space-2); margin:0; font-size:var(--tt-text-xs);
                    color:var(--tt-fg-muted); }
  .goals-bar { flex:1 1 auto; min-width:0; height:var(--tt-space-2); appearance:none; border:0; overflow:hidden;
               border-radius:var(--tt-radius-full); background:var(--tt-pressed); accent-color:var(--tt-accent-solid); }
  .goals-bar::-webkit-progress-bar { background:var(--tt-pressed); }
  .goals-bar::-webkit-progress-value { background:var(--tt-accent-solid); border-radius:var(--tt-radius-full); }
  .goals-bar::-moz-progress-bar { background:var(--tt-accent-solid); }
  .goals-last { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); margin:0;
                font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .goals-pill { display:inline-flex; align-items:center; min-height:var(--tt-space-6); padding:0 var(--tt-space-3);
                border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-full); background:var(--tt-hover);
                font-size:var(--tt-text-xs); font-weight:var(--tt-weight-medium); }
  .goals-person { display:grid; gap:var(--tt-space-1); }
  .goals-picks { margin:0; padding-left:var(--tt-space-5); font-size:var(--tt-text-sm); }
  .goals-pick form { display:grid; gap:var(--tt-space-2); margin-top:var(--tt-space-2); }
  .goals-pick fieldset { display:grid; gap:var(--tt-space-1); margin:0; padding:0; border:0; }
  .goals-check { display:flex; align-items:center; gap:var(--tt-space-2); font-size:var(--tt-text-sm); }
  .goals-pill--ok { color:var(--tt-ok-text); }
  .goals-pill--bad { color:var(--tt-bad-text); }
  @media (max-width:64rem) {
    .goals-summary { display:grid; gap:var(--tt-space-1); padding:var(--tt-space-3); border-radius:var(--tt-radius-md);
                     background:var(--tt-hover); cursor:pointer; list-style:none; }
    .goals-summary::-webkit-details-marker { display:none; }
    .goals-band[open] > .goals-summary { margin-bottom:var(--tt-space-3); }
    .goals-tiles { grid-template-columns:minmax(0, 1fr); }
    button.goals-pill { min-height:var(--control-h-touch); }
    .goals-check { min-height:var(--control-h-touch); }
  }
  /* D342 (Dustin 2026-11-23: "no status change buttons in desktop... just drag them to the next column"):
     on a mouse a Kanban card moves by drag only; its Move picker stays in the DOM, out of sight, and shows
     only while a keyboard holds focus in the card (:focus-visible), so a keyboard still moves it. A mouse click
     on a card focuses its link, which :focus-within counted as focus, so the picker popped up (Dustin 2026-11-24). A phone keeps it as a 44px status chip. */
  @media (hover:hover) and (pointer:fine) {
    .work-card:not(:has(:focus-visible)) .work-move[data-work-move] { position:absolute; width:1px; height:1px;
      margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  }
  @media not ((hover:hover) and (pointer:fine)) {
    .work-move[data-work-move] select { flex:0 1 auto; width:auto; max-width:100%; min-height:var(--control-h-touch);
      padding:0 var(--tt-space-10) 0 var(--tt-space-4); border-radius:var(--tt-radius-full); border-color:transparent;
      appearance:none; font-size:var(--tt-text-md);
      background:linear-gradient(45deg, transparent 50%, var(--tt-fg-muted) 50%) calc(100% - var(--tt-space-6)) 55% / var(--tt-space-2) var(--tt-space-2) no-repeat,
        linear-gradient(135deg, var(--tt-fg-muted) 50%, transparent 50%) calc(100% - var(--tt-space-4)) 55% / var(--tt-space-2) var(--tt-space-2) no-repeat, var(--tt-hover); }
  }
  .work-col-empty { margin:var(--tt-space-2) 0 0; padding:var(--tt-space-2); font-size:var(--tt-text-sm); color:var(--tt-fg-muted); }
  .work-col-add > .work-add { margin:var(--tt-space-2) 0 0; }
  .work-card[draggable="true"] { cursor:grab; }
  .work-card.is-dragging { opacity:.5; }
  .work-col.is-drop { outline:var(--focus-ring); outline-style:dashed; outline-offset:calc(var(--focus-offset) * -1); }
  @media (max-width:64rem) { .work-kanban { flex-direction:column; align-items:stretch; overflow-x:visible; }
                             .work-col { flex:none; } }
  /* My tasks (S3): the search box, the filter chips and the total on one line; a chip opens a short list of
     links under it. A chip with a pick reads as picked. */
  .work-filters { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); }
  .work-search { flex:1 1 16rem; max-width:var(--measure); }
  .work-search input { width:100%; }
  .work-chip > .menu-panel { left:0; right:auto; }
  .work-chip--on > summary { border-color:var(--tt-fg); }
  .work-chip > .menu-panel > a.work-chip-nested { padding-left:var(--tt-space-6); }
  .work-chip > .menu-panel > .work-chip-heading { margin:var(--tt-space-2) 0 0; padding:var(--tt-space-1) var(--tt-space-3);
                                                  font-size:var(--tt-text-xs); font-weight:var(--tt-weight-medium); color:var(--tt-fg-muted); }
  .work-total { margin-left:auto; color:var(--tt-fg-muted); font-size:var(--tt-text-sm); }
  .work-group-by { margin-left:auto; }
  .work-total ~ .work-group-by { margin-left:0; }
  .work-chip.work-group-by > .menu-panel { left:auto; right:0; }
  /* Timeline (one board S3): a name column and an eight-week day grid; a bar per dated task. */
  .wtl { display:block; }
  .wtl-grid { overflow-x:auto; --wtl-days:56; }
  .wtl-row { display:flex; align-items:center; gap:var(--tt-space-3); min-height:var(--tt-space-8); }
  .wtl-rows { margin:0; padding:0; list-style:none; }
  .wtl-name { flex:0 0 16rem; display:flex; align-items:center; gap:var(--tt-space-2); overflow:hidden; white-space:nowrap;
              text-overflow:ellipsis; font-size:var(--tt-text-sm); color:var(--tt-fg); text-decoration:none; }
  .wtl-name.is-open { font-weight:var(--tt-weight-medium); }
  .wtl-track { flex:1 0 40rem; display:grid; grid-template-columns:repeat(var(--wtl-days), minmax(0, 1fr)); align-items:center;
               position:relative; border-left:var(--tt-line-subtle); }
  .wtl-row--head .wtl-track > span:not(.wtl-today) { grid-row:1; font-size:var(--tt-text-xs); color:var(--tt-fg-muted); border-left:var(--tt-line-subtle);
                                                      padding-left:var(--tt-space-1); }
  .wtl-bar { height:var(--tt-space-2); border-radius:var(--tt-radius-md); background:var(--tt-fg); }
  .wtl-bar--late { background:var(--tt-bad-text); }
  .wtl-today { grid-row:1; width:1px; height:100%; background:var(--tt-warn-text); }
  .wtl-group { margin:var(--tt-space-4) 0 var(--tt-space-1); font-size:var(--tt-text-sm); }
  /* Phone Timeline (one board S6): the name sits over a full-width track, so a bar shows without a
     sideways scroll; every other week label is hidden so the dates still fit. */
  @media (max-width:640px) {
    .wtl-row { flex-wrap:wrap; row-gap:var(--tt-space-1); }
    .wtl-name { flex:1 1 100%; }
    .wtl-row--head .wtl-name { display:none; }
    .wtl-track { flex:1 1 100%; min-width:0; }
    .wtl-row--head .wtl-track > span:not(.wtl-today) { white-space:nowrap; }
    .wtl-row--head .wtl-track > span:not(.wtl-today):nth-child(even) { visibility:hidden; }
  }
  /* A board's own details (S1d): opened from ⋯ in the bar (D216); the rows, its Activity, Archive. */
  .work-about { max-width:var(--measure-wide); }
  .work-about-head { margin:var(--tt-space-4) 0 var(--tt-space-2); font-size:var(--tt-text-sm); }
  .work-about > .inline-form { margin-top:var(--tt-space-4); }
  /* Work in the bar (D219 (b)): List | Kanban, one Filter button whose panel holds the search, chips and
     Group by, and ⋯ for the board's details. On a phone the switch is one icon to the other layout. */
  .work-layout-phone, .work-more .work-layout-menu { display:none; }
  .work-bar--phone { display:none; }
  @media (max-width:640px) { .work-bar--phone { display:flex; } }
  .work-filter > summary { gap:var(--tt-space-2); }
  /* Closed, the panel is gone outright: its chips are summaries of their own, which a closed <details>
     would otherwise still lay out (content-visibility), so they would sit over the page. */
  .work-filter:not([open]) > .menu-panel { display:none; }
  /* The Kanban fills the window under the bar: columns run full height (D219 (b) mock). */
  @media (min-width:64.01rem) {
    .work-kanban { align-items:stretch; min-height:calc(100dvh - var(--bar-h) - var(--tt-space-3) - var(--tt-space-12)); }
  }
  /* One board (2026-11-24): the filters sit in a row under the bar, always in sight, not behind a button. */
  .work-filter-row { margin:0 0 var(--tt-space-3); }
  .work-title-tag { color:var(--tt-fg-muted); font-size:var(--tt-text-xs); }
  .work-filter-panel { width:min(32rem, calc(100vw - 2 * var(--gutter))); padding:var(--tt-space-3); }
  .work-filter-panel > .work-filters { flex-direction:column; align-items:stretch; }
  .work-filter-panel .work-search { flex:none; max-width:none; }
  .work-filter-panel .work-chip > .menu-panel { position:static; margin-top:var(--tt-space-1); }
  .work-filter-panel .work-group-by { margin-left:0; }
  .work-filter-n { min-width:var(--tt-space-4); padding:0 var(--tt-space-1); border-radius:var(--tt-radius-md); background:var(--tt-hover);
                   font-size:var(--tt-text-xs); text-align:center; }
  .work-more .menu-panel > form { display:flex; }
  .work-more .menu-item { flex:1 1 auto; justify-content:flex-start; border-color:transparent; background:none;
                          font-size:var(--tt-text-sm); font-weight:var(--tt-weight-normal); }
  .work-more .menu-item:hover { background:var(--tt-hover); }
  .work-more .menu-item--danger { color:var(--tt-bad-text); }
  .work-more .menu-panel > form { border-top:1px solid var(--tt-line-subtle); padding-top:var(--tt-space-1); }
  p.work-total { display:flex; align-items:center; gap:var(--tt-space-2); margin:0; }
  @media (max-width:640px) {
    .work-layout { display:none; }
    .work-layout-phone { display:inline-flex; }
  }
  /* A tablet's or a laptop's bar has no room for Work's switches beside search, New and you (at 1025 they ran
     the page 1131px wide): up to 78rem the index's tabs and My tasks take the page's first row, as on a phone,
     and a board's List | Kanban | Calendar moves into ⋯, as at 320. */
  @media (min-width:40.01rem) and (max-width:77.99rem) {
    .work-layout { display:none; }
    .work-bar--phone { display:flex; }
    .work-more .work-layout-menu { display:flex; }
  }
  /* At 320 a board's bar has one control too many beside search, New and you: List | Kanban moves into ⋯. */
  @media (max-width:22.5rem) {
    .work-layout-phone { display:none; }
    .work-more .work-layout-menu { display:flex; }
    .work-filter-panel { position:fixed; inset:auto 0 0 0; top:auto; width:auto; z-index:40; max-height:80vh; overflow:auto;
      border-start-start-radius:var(--tt-radius-lg); border-start-end-radius:var(--tt-radius-lg); border-end-start-radius:0; border-end-end-radius:0;
      padding:var(--tt-space-4) var(--gutter) calc(var(--tt-space-4) + var(--safe-b)); }
  }
  /* A task's subtask count on its row and card (S4c-ii). */
  .work-subcount { flex:none; margin-left:var(--tt-space-2); padding:0 var(--tt-space-1); border-radius:var(--tt-radius-md);
                   display:inline-flex; align-items:center; gap:var(--tt-space-1);
                   background:var(--tt-hover); color:var(--tt-fg-muted); font-size:var(--tt-text-xs); font-weight:var(--tt-weight-normal); }
  .work-subcount-bar { flex:none; width:var(--tt-space-8); height:var(--tt-space-1); }
  .work-card-link > .work-subcount { justify-self:start; margin-left:0; }
  /* A task's subtasks (S4c): ticks and links, "n of m done", an add line; a subtask names its parent. */
  .work-subtasks h3 { display:flex; align-items:baseline; gap:var(--tt-space-2); }
  .work-subtask-list { list-style:none; margin:0; padding:0; display:grid; gap:var(--tt-space-1); }
  /* The top-of-panel subtasks (2026-12-01): a bar, Open then Done, each row with status, owner and due. */
  .work-subtask-bar { display:block; width:100%; margin:var(--tt-space-1) 0 var(--tt-space-2); }
  .work-subtask-group { display:flex; align-items:baseline; gap:var(--tt-space-2); margin:var(--tt-space-3) 0 var(--tt-space-1);
                        font-size:var(--tt-text-xs); font-weight:var(--tt-weight-medium); color:var(--tt-fg-muted); }
  .work-subtasks .work-subtask { flex-wrap:wrap; column-gap:var(--tt-space-2); }
  .work-subtasks .work-subtask > a { flex:1 1 12rem; min-width:0; overflow-wrap:break-word; }
  .work-subtask-meta { display:flex; flex-wrap:wrap; gap:var(--tt-space-1) var(--tt-space-3); margin-left:auto;
                       font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .work-subtask-none { font-style:italic; }
  .work-subtask--done > a { color:var(--tt-fg-muted); text-decoration:line-through; }
  .work-subtasks .field-error { flex-basis:100%; margin:0; }
  .work-subtasks > .work-add { flex-wrap:wrap; }
  .work-parent { margin:0 0 var(--tt-space-3); font-size:var(--tt-text-sm); color:var(--tt-fg-muted); }
  /* A task's comments (S4a): a box at the head of Activity; each comment reads as its own block. */
  .work-comment { display:grid; gap:var(--tt-space-2); margin-bottom:var(--tt-space-4); }
  .work-comment textarea { width:100%; resize:vertical; }
  .work-comment .btn { justify-self:end; }
  .work-comment .field-error { margin:0; }
  .side-panel-feed li.work-said { flex-wrap:wrap; }
  .side-panel-feed--oldest-first { margin-bottom:var(--tt-space-3); }
  .work-said-body { flex-basis:100%; margin:0; padding:var(--tt-space-2) var(--tt-space-3); white-space:pre-wrap;
                    overflow-wrap:break-word; background:var(--tt-sunken); border-radius:var(--tt-radius-md); }
  /* New board (D216): a name-only popover under its button; a bottom sheet on a phone. */
  .work-new-board > .menu-panel { width:22rem; padding:var(--tt-space-4); }
  .work-new-form { display:grid; gap:var(--tt-space-2); }
  .work-new-form > input { width:100%; }
  .work-new-title { font-size:var(--tt-text-sm); font-weight:var(--tt-weight-medium); color:var(--tt-fg); }
  .work-new-more { font-size:var(--tt-text-sm); color:var(--tt-fg-muted); }
  .work-new-more > summary { cursor:pointer; min-height:var(--control); display:flex; align-items:center; }
  .work-new-more[open] { display:grid; gap:var(--tt-space-2); }
  .work-new-more select { width:100%; }
  .work-new-foot { display:flex; align-items:center; justify-content:space-between; gap:var(--tt-space-3); }
  .work-new-hint { font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  @media (max-width:640px) {
    .work-new-board > .menu-panel { position:fixed; inset:auto 0 0 0; top:auto; width:auto; z-index:40;
      border-start-start-radius:var(--tt-radius-lg); border-start-end-radius:var(--tt-radius-lg); border-end-start-radius:0; border-end-end-radius:0; padding:var(--tt-space-4) var(--gutter) calc(var(--tt-space-4) + var(--safe-b)); }
    .work-new-hint { display:none; }
    .work-new-foot .btn { flex:1 1 auto; }
  }
  /* A board with no task yet (D216): ghost adds, and one light hint over the columns. */
  .work-kanban--empty { position:relative; }
  .work-kanban--empty .work-add > input { border-style:dashed; background:transparent; }
  .work-empty-hint { text-align:center; font-size:var(--tt-text-sm); color:var(--tt-fg-muted); }
  .work-empty-hint > p { margin:0; }
  .work-empty-what { color:var(--tt-fg); font-weight:var(--tt-weight-medium); }
  .work-kanban--empty > .work-empty-hint { padding:var(--tt-space-4) 0; }
  @media (min-width:64.01rem) {
    .work-kanban--empty { align-items:stretch; }
    .work-kanban--empty > .work-empty-hint { position:absolute; inset:50% auto auto 50%; transform:translate(-50%, -50%);
      padding:var(--tt-space-2) var(--tt-space-3); background:var(--tt-surface); pointer-events:none; }
  }
  @media (max-width:64rem) { .work-kanban--empty > .work-empty-hint { order:-1; } }
  .work-empty-table { width:100%; }
  .work-empty-table th { font-size:var(--tt-text-sm); font-weight:var(--tt-weight-normal); color:var(--tt-fg-muted); text-align:left; }
  .work-empty-table + .work-add { margin-top:var(--tt-space-2); }
  .work-empty-table ~ .work-empty-hint { margin-top:var(--tt-space-6); }
  @media (max-width:640px) { .work-empty-table { display:none; } }
  .content form.work-add { max-width:var(--measure-text); }
  .content form.work-new, .content .work-groups + form.work-add { margin-top:var(--tt-space-4); }
  @media (max-width:640px) {
    :is(.work-group, .work-index) .table--list td:empty { display:none; }
    /* Line two joins only the cells that hold something, so an empty one leaves no stray dot. */
    .work-group .table--list tbody tr td:nth-child(n):not(.num)::before { content:none; }
    .work-group .table--list tbody tr td:not(:first-child):not(:empty) ~ td:not(:empty):not(:last-child):not(.num)::before {
      content:"· "; }
    .work-group .table--list td:last-child { flex-basis:100%; }
    .work-group .table--list td:last-child::before { content:none; }
    .work-index .table--list td:nth-child(3) { flex-basis:100%; }
    .work-index .table--list td:nth-child(3)::before { content:none; }
    .work-group .table--list .work-task { font-weight:var(--tt-weight-medium); }
  }
  .task-add > label { margin:0; flex:0 1 auto; }
  .task-add > .task-add-title { flex:1 1 calc(var(--tt-space-16) * 4); max-width:var(--measure); }
  .task-add :where(input, select) { width:100%; max-width:none; }
  @media (max-width:900px) { .task-add > label { flex:1 1 auto; } .task-add > .task-add-title { flex-basis:100%; } }
  .task-done { margin-top:var(--tt-space-3); }
  .task-done > summary { display:flex; align-items:center; min-height:var(--control-h-touch); cursor:pointer; }
  .contact-reach { margin:0; display:grid; gap:var(--tt-space-1); overflow-wrap:break-word; }
  .contact-reach a { display:inline-block; min-height:var(--control-h-touch); line-height:var(--control-h-touch); }
  .not-recorded { color:var(--tt-fg-muted); }
  /* A two-way choice (they owe / we owe, person / company): each option a 44px target, none pre-picked. */
  .choice { display:inline-flex; align-items:center; gap:var(--tt-space-2); min-height:var(--control-h-touch);
            padding:0 var(--tt-space-3); border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md); }
  .choice:has(input:checked) { border-color:var(--tt-fg); }

  /* ---- Egon: a record being asked a question ---- */
  .chat { display:flex; flex-direction:column; gap:var(--tt-space-6); margin:0 0 var(--tt-space-8); }
  .turn { display:flex; flex-direction:column; gap:var(--tt-space-3); }
  .ask { margin:0; padding-left:var(--tt-space-3); border-left:2px solid var(--tt-line-subtle); color:var(--tt-fg-muted); }
  .ask-who { display:block; font-size:var(--tt-text-xs); text-transform:uppercase; letter-spacing:.08em;
             color:var(--tt-fg-muted); margin-bottom:var(--tt-space-1); }
  .say { display:flex; flex-direction:column; gap:var(--tt-space-3); }
  .say-body { margin:0; white-space:pre-wrap; }
  .say-refused .say-body { color:var(--tt-fg-muted); }
  .sources summary { cursor:pointer; font-size:var(--tt-text-xs); text-transform:uppercase;
                     letter-spacing:.08em; color:var(--tt-fg-muted); }
  .sources summary:hover { color:var(--tt-fg); }
  .sources[open] summary { margin-bottom:var(--tt-space-3); }
  .source-list { list-style:none; margin:0; padding:0; display:grid; gap:var(--tt-space-4); }
  .source { padding-left:var(--tt-space-3); border-left:2px solid var(--tt-line-subtle); }
  .source-title { display:block; font-weight:var(--tt-weight-medium); margin-bottom:var(--tt-space-1); }
  /* D134: an amber dot when no agreement is on file. The dot sits on the title's first line. Its target is
     24px, or 44px on touch, and gives back its extra height, so a title with a dot is as tall as one
     without. Hover and focus are drawn on the dot, not the target. */
  .progress-no-agreement { display:flex; align-items:flex-start; justify-content:flex-start; flex:none; box-sizing:border-box;
          width:var(--tt-space-6); height:var(--tt-space-6); margin-block:calc((1lh - var(--tt-space-6)) / 2);
          padding:calc((var(--tt-space-6) - var(--dot)) / 2); }
  .progress-no-agreement::before { content:""; flex:none; width:var(--dot); height:var(--dot); border-radius:50%; background:var(--tt-warn-text); }
  .progress-no-agreement:hover::before { outline:var(--tt-space-1) solid var(--tt-hover); }
  .progress-no-agreement:focus-visible { outline:none; }
  .progress-no-agreement:focus-visible::before { outline:2px solid var(--tt-fg); outline-offset:2px; }
  @media (max-width:900px), (pointer:coarse) {
    .progress-no-agreement { min-width:var(--control); min-height:var(--control); margin-block:0;
          padding:calc((1lh - var(--dot)) / 2) 0 0 var(--tt-space-2); }
  }
  /* The record's Agreements card carries the same dot beside its title. A heading is one line tall, so on
     touch the 44px target is centred on the dot and gives back its extra height and width. */
  .record-agreements-title { display:flex; align-items:flex-start; gap:var(--tt-space-1); }
  @media (max-width:900px), (pointer:coarse) {
    .record-agreements-title > .progress-no-agreement { align-items:center; justify-content:center; padding:0;
          margin-block:calc((1lh - var(--control)) / 2); margin-inline-start:calc((var(--tt-space-6) - var(--control)) / 2); }
  }
  .source-body { display:block; color:var(--tt-fg-muted); white-space:pre-wrap; }
  .ask-form { display:grid; gap:var(--tt-space-4); }
  .examples-label { margin:0; font-size:var(--tt-text-xs); font-weight:var(--tt-weight-medium);
                    letter-spacing:.08em; text-transform:uppercase; color:var(--tt-fg-muted); }
  .examples { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); }
  button.example { border-radius:var(--tt-radius-full); white-space:normal; text-align:left; }
  /* The vote screen (D165): the reference beside the four questions; one column, a bar at the foot, below
     64rem. Each pick is a large button; the one saved is filled. */
  .vote { display:grid; background:var(--tt-raised); border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-lg); }
  .vote-head { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-3);
               padding:var(--tt-space-4) var(--tt-space-6); border-bottom:1px solid var(--tt-line-subtle); }
  .vote-mark { display:grid; place-items:center; inline-size:2.5rem; block-size:2.5rem; flex:none;
               border-radius:var(--tt-radius-md); background:var(--tt-fg); color:var(--tt-surface); font-weight:var(--tt-weight-semibold); }
  .vote-head-text { flex:1 1 12rem; min-width:0; display:grid; gap:var(--tt-space-1); }
  .vote-head-text h2 { margin:0; font-size:var(--tt-text-xl); overflow-wrap:break-word; }
  .vote-head-nav { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); }
  .vote-team { display:grid; gap:var(--tt-space-3); padding:var(--tt-space-4) var(--tt-space-6); border-bottom:1px solid var(--tt-line-subtle); }
  .vote-team h2 { margin:0; font-size:var(--tt-text-base); }
  .vote-team p { margin:0; }
  .vote-body { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 40%); }
  .vote-ref, .vote-side { display:grid; gap:var(--tt-space-5); align-content:start; padding:var(--tt-space-6); min-width:0; }
  .vote-side { gap:var(--tt-space-4); border-left:1px solid var(--tt-line-subtle); background:var(--tt-sunken); }
  .vote-label { margin:0 0 var(--tt-space-2); font-size:var(--tt-text-xs); font-weight:var(--tt-weight-medium);
                letter-spacing:.08em; text-transform:uppercase; color:var(--tt-fg-muted); }
  .vote-logline { margin:0; font-size:var(--tt-text-md); font-weight:var(--tt-weight-medium); }
  .vote-synopsis { margin:0; max-inline-size:var(--measure-text); white-space:pre-wrap; }
  .vote-tiles { display:flex; flex-wrap:wrap; gap:var(--tt-space-3); }
  .vote-tile { flex:1 1 10rem; min-width:0; padding:var(--tt-space-3) var(--tt-space-4); border:1px solid var(--tt-line-subtle);
               border-radius:var(--tt-radius-md); }
  .vote-tile .vote-label { margin-bottom:var(--tt-space-1); }
  .vote-tile-value { margin:0; display:flex; flex-wrap:wrap; gap:var(--tt-space-1); }
  .vote-list { margin:0; border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md); }
  .vote-row { display:grid; grid-template-columns:minmax(7rem, 12rem) minmax(0, 1fr); gap:var(--tt-space-3);
              padding:var(--tt-space-3) var(--tt-space-4); }
  .vote-row + .vote-row { border-top:1px solid var(--tt-line-subtle); }
  .vote-row dt { color:var(--tt-fg-muted); }
  .vote-row dd { margin:0; min-width:0; overflow-wrap:break-word; }
  .vote-dim { margin:0; color:var(--tt-fg-muted); font-size:var(--tt-text-sm); }
  .vote-folded { font-weight:var(--tt-weight-medium); }
  .vote-side-head, .vote-q-head { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between;
                                  gap:var(--tt-space-1) var(--tt-space-3); }
  .vote-side-head h2 { margin:0; font-size:var(--tt-text-md); }
  .vote-count { padding:0 var(--tt-space-2); border-radius:var(--tt-radius-full); background:var(--tt-hover); font-size:var(--tt-text-xs); }
  .vote-q { display:grid; gap:var(--tt-space-3); padding-top:var(--tt-space-4); border-top:1px solid var(--tt-line-subtle); }
  .vote-q-head h3 { margin:0; font-size:var(--tt-text-base); }
  .vote-q-set { margin:0; padding:0; border:0; min-width:0; }
  .vote-q-set legend { padding:0; margin-bottom:var(--tt-space-2); color:var(--tt-fg-muted); }
  .vote-picks { display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:var(--tt-space-2); }
  .vote-pick { min-block-size:var(--control-h-touch); min-inline-size:0; padding-inline:0;
               border:1px solid var(--tt-line); border-radius:var(--tt-radius-md);
               background:var(--tt-raised); color:var(--tt-fg); font:inherit; font-size:var(--tt-text-md);
               font-weight:var(--tt-weight-medium); cursor:pointer; }
  .vote-pick:hover { background:var(--tt-hover); }
  .vote-pick[aria-pressed="true"] { background:var(--tt-fg); border-color:var(--tt-fg); color:var(--tt-surface); }
  .vote-rubric { margin:0; display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:var(--tt-space-3);
                 font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .vote-rubric dt { font-weight:var(--tt-weight-medium); color:var(--tt-fg); }
  .vote-rubric dd { margin:0; }
  .vote-q-more summary { cursor:pointer; font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .vote-q-more[open] summary { margin-bottom:var(--tt-space-2); }
  .vote-note { display:flex; gap:var(--tt-space-2); }
  .vote-note input { flex:1 1 auto; min-width:0; }
  .vote-foot { position:sticky; bottom:0; display:flex; align-items:center; justify-content:space-between;
               gap:var(--tt-space-3); padding:var(--tt-space-3) var(--tt-space-6); border-top:1px solid var(--tt-line-subtle);
               background:var(--tt-raised); border-bottom-left-radius:var(--tt-radius-lg);
               border-bottom-right-radius:var(--tt-radius-lg); }
  .vote-foot-status { flex:1 1 auto; margin:0; display:flex; flex-wrap:wrap; align-items:baseline;
                      gap:0 var(--tt-space-2); min-width:0; }
  .vote-foot-count { font-variant-numeric:tabular-nums; }
  .vote-foot-actions { flex:none; display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); }
  /* The Candidate gate's question (D166): one card, the reason, then Move anyway and Cancel. */
  .gate { max-width:40rem; display:grid; gap:var(--tt-space-4); }
  .gate h2, .gate p { margin:0; }
  .gate-form { display:grid; gap:var(--tt-space-4); }
  .gate-actions { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); }
  @media (max-width:64rem) {
    .vote-body { grid-template-columns:minmax(0, 1fr); }
    .vote-side { border-left:0; border-top:1px solid var(--tt-line-subtle); }
  }
  @media (max-width:40rem) {
    .vote { border:0; border-radius:0; }
    .vote-head, .vote-team, .vote-ref, .vote-side, .vote-foot { padding-inline:var(--tt-space-4); }
    .vote-row, .vote-rubric { grid-template-columns:minmax(0, 1fr); gap:var(--tt-space-1); }
    .vote-foot { border-radius:0; }
  }
  /* At 320 the five picks need the side's last few pixels to stay 44px wide with 8px between. */
  @media (max-width:22.5rem) { .vote-side { padding-inline:var(--tt-space-3); } }
  /* New-project wizard (D296): a pop-up over the Projects list, progress bar along its top. */
  .pw-scrim { position:fixed; inset:0; z-index:40; display:flex; align-items:flex-start; justify-content:center;
              padding:var(--tt-space-12) var(--tt-space-4) var(--tt-space-4); overflow-y:auto; background:color-mix(in srgb, var(--tt-fg) 40%, transparent); }
  .pw-modal { width:min(100%, 38rem); display:flex; flex-direction:column; gap:var(--tt-space-3); padding:var(--tt-space-4) var(--tt-space-5) 0;
              background:var(--tt-raised); border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-lg); box-shadow:var(--tt-shadow-lg); }
  .pw-head { display:flex; align-items:center; justify-content:space-between; gap:var(--tt-space-3); }
  .pw-head h2 { margin:0; font-size:var(--tt-text-md); }
  .pw-close { display:inline-flex; align-items:center; justify-content:center; width:var(--control); height:var(--control);
              color:var(--tt-fg-muted); font-size:var(--tt-text-xl); text-decoration:none; border-radius:var(--tt-radius-sm); }
  .pw-bar { display:flex; gap:var(--tt-space-1); }
  .pw-seg { flex:1 1 0; height:var(--stripe); border-radius:var(--tt-radius-full); background:var(--tt-line); }
  .pw-seg--on { background:var(--tt-fg); }
  .pw-sub { margin:0; color:var(--tt-fg-muted); font-size:var(--tt-text-sm); }
  .pw-form { display:flex; flex-direction:column; gap:var(--tt-space-4); }
  .pw-field { display:flex; flex-direction:column; gap:var(--tt-space-2); min-width:0; margin:0; padding:0; border:0; }
  .pw-field > :is(label, legend, .pw-label) { font-size:var(--tt-text-sm); font-weight:var(--tt-weight-medium); padding:0; color:var(--tt-fg); }
  .pw-aside { color:var(--tt-fg-muted); font-weight:var(--tt-weight-normal); margin-left:var(--tt-space-2); }
  .pw-cards { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:var(--tt-space-2); }
  .pw-card { position:relative; display:flex; flex-direction:column; align-items:flex-start; gap:var(--tt-space-1); min-width:0; text-align:start; padding:var(--tt-space-3);
             border:1px solid var(--tt-line); border-radius:var(--tt-radius-md); cursor:pointer; font-size:var(--tt-text-sm); }
  .pw-card input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
  .pw-card-ico { margin-bottom:var(--tt-space-2); color:var(--tt-fg-muted); }
  .pw-card-hint { color:var(--tt-fg-muted); font-size:var(--tt-text-xs); }
  .pw-card:has(input:checked) { border-color:var(--tt-fg); box-shadow:0 0 0 1px var(--tt-fg); }
  .pw-card:has(input:focus-visible) { outline:var(--focus-ring); outline-offset:var(--focus-offset); }
  .pw-other-note { display:none; margin:0; padding:var(--tt-space-2) var(--tt-space-3); border-radius:var(--tt-radius-sm);
                   background:var(--tt-sunken); color:var(--tt-fg-muted); font-size:var(--tt-text-sm); }
  .pw-formats:has(input[value="Other"]:checked) .pw-other-note { display:block; }
  .pw-genres { border:1px solid var(--tt-line); border-radius:var(--tt-radius-md); background:var(--tt-sunken); }
  .pw-genres > summary { display:flex; align-items:center; justify-content:space-between; gap:var(--tt-space-2);
                         min-height:var(--control); padding:0 var(--tt-space-3); cursor:pointer; list-style:none; }
  .pw-genres > summary::-webkit-details-marker { display:none; }
  .pw-genres-val { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .pw-ph { color:var(--tt-fg-muted); }
  .pw-genre-list { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:var(--tt-space-1) var(--tt-space-2);
                   max-height:14rem; overflow-y:auto; padding:var(--tt-space-2) var(--tt-space-3); border-top:1px solid var(--tt-line-subtle); }
  .pw-genre-row { display:flex; align-items:center; gap:var(--tt-space-2); min-height:var(--control); font-size:var(--tt-text-sm); }
  .pw-genre-row input { width:auto; min-height:0; margin:0; }
  .pw-field--bad :is(input:not([type="radio"], [type="checkbox"]), textarea, .pw-genres, .pw-card) { border-color:var(--tt-bad-text); }
  .pw-err { margin:0; color:var(--tt-bad-text); font-size:var(--tt-text-sm); }
  .pw-sum { border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md); padding:var(--tt-space-3) var(--tt-space-4); }
  .pw-sum-head { display:flex; align-items:center; justify-content:space-between; gap:var(--tt-space-3); }
  .pw-sum h3 { margin:0; font-size:var(--tt-text-sm); }
  .pw-sum dl { display:grid; grid-template-columns:6rem minmax(0, 1fr); gap:var(--tt-space-2) var(--tt-space-3); margin:var(--tt-space-2) 0 0; font-size:var(--tt-text-sm); }
  .pw-sum dt { color:var(--tt-fg-muted); }
  .pw-sum dd { margin:0; min-width:0; overflow-wrap:break-word; }
  .pw-edit { min-height:var(--control); padding:0 var(--tt-space-2); border:0; background:none; color:var(--tt-fg-muted); font:inherit; font-size:var(--tt-text-sm); cursor:pointer; }
  .pw-note { margin:0; padding:var(--tt-space-2) var(--tt-space-3); border-radius:var(--tt-radius-sm); background:var(--tt-sunken); color:var(--tt-fg-muted); font-size:var(--tt-text-sm); }
  .pw-foot { display:flex; gap:var(--tt-space-2); padding:var(--tt-space-3) 0 var(--tt-space-4); border-top:1px solid var(--tt-line-subtle);
             margin-inline:calc(var(--tt-space-5) * -1); padding-inline:var(--tt-space-5); }
  @media (max-width:40rem) {
    .pw-scrim { padding:var(--tt-space-4) var(--tt-space-2); }
    .pw-modal { padding-inline:var(--tt-space-4); }
    .pw-cards { grid-template-columns:repeat(2, minmax(0, 1fr)); }
    .pw-foot { margin-inline:calc(var(--tt-space-4) * -1); padding-inline:var(--tt-space-4); }
    .pw-sum dl { grid-template-columns:5rem minmax(0, 1fr); }
  }
}

@layer bl-utilities {
  .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
             clip-path:inset(50%); white-space:nowrap; border:0; }
  .mono { font-family:var(--tt-font-mono); font-variant-numeric:tabular-nums; }
  .dim { color:var(--tt-fg-muted); }
  /* The page's column spaces its blocks with one gap; a block's own margin on top of it is dead space
     (Dustin 2026-11-16: no wasted space). The list bar keeps its smaller step above its table. */
  .content > :not(.list-bar, .sr-only) { margin-block:0; }
}

/* A touch display wide enough for the sidebar: its rows and foot are still thumb targets. */
@layer bl-layout {
  @media (pointer:coarse) {
    .nav-item, .foot-out { min-height:var(--control); }
    .foot-out { display:inline-flex; align-items:center; }
  }
}

/* ---- the phone. The sidebar becomes a two-row header: the brand with who you are and the way out,
   then the nav strip. It is a height budget too — at most 120px at 390 — so the work starts on the
   first screen. The theme moves to the page's foot (components, below). ---- */
@layer bl-layout {
  /* A short window has no height for a sidebar either: a landscape phone, or 200% zoom. */
  @media (max-width:900px), (max-height:560px) {
    .app { display:block; }
    .main { margin:0; border-radius:0; box-shadow:none; min-height:0; }
    .app-sidebar { position:static; height:auto; width:100%; flex:none; border-right:0;
               display:grid; grid-template-columns:auto minmax(0, 1fr); align-items:center;
               column-gap:var(--tt-space-4);
               border-bottom:1px solid var(--tt-line-subtle); padding:var(--tt-space-3) var(--gutter) 0; }
    .brand { grid-column:1; grid-row:1; height:var(--control); }
    .brand .tt-brand { display:inline-flex; align-items:center; min-height:var(--control); }
    .brand .tt-brand-app { display:none; }
    /* ONE ROW THAT SLIDES: a strip the platform already knows, with snap points. */
    .app-sidebar nav { grid-column:1 / -1; grid-row:2; margin-top:var(--tt-space-2); flex-direction:row;
                   flex-wrap:nowrap; gap:var(--tt-space-2); overflow-x:auto; padding-bottom:var(--tt-space-2);
                   scrollbar-width:thin; scroll-snap-type:x proximity; }
    .nav-group { flex-direction:row; flex-wrap:nowrap; gap:var(--tt-space-2); }
    .nav-admin { padding-top:0; border-top:0; }
    .nav-item { min-height:var(--control); padding:0 var(--tt-space-3); white-space:nowrap; scroll-snap-align:start; }
    .foot { grid-column:2; grid-row:1; margin:0; padding:0; flex-direction:row; align-items:center;
            justify-content:flex-end; gap:var(--tt-space-3); border-top:0; min-width:0; }
    .foot-studio { display:none; }
    .foot-out { margin-top:0; display:inline-flex; align-items:center; min-height:var(--control);
                padding:0 var(--tt-space-2); }
    .bar { padding:0 var(--gutter); }
    .app-sidebar > .nav-admin { margin-top:0; grid-column:2; grid-row:1; justify-self:end; }
    .content { padding:var(--tt-space-3) var(--gutter) var(--tt-space-12); gap:var(--tt-space-5); }
  }
}

@layer bl-layout {
  /* The phone's bottom nav (D95), its shell half: the strip and the admin row give way to the tab
     bar, the page clears it, and the More menu opens upward. Here, after every other layout rule,
     because the shell's own rules live in this layer. The tab bar itself is a component. */
  @media (max-width:640px) {
    .app-sidebar { padding-bottom:var(--tt-space-3); }
    .app-sidebar nav, .app-sidebar > .nav-admin { display:none; }
    .main { padding-bottom:calc(var(--tabbar-h) + var(--safe-b)); }
    /* D219: on a phone the bottom tab bar is the menu, so the sidebar's brand row goes too and the
       bar is the first thing on the page: one row, the trail folded, the actions as icons. */
    .app-sidebar { display:none; }
    .bar { gap:var(--tt-space-2); padding:0 var(--tt-space-2) 0 var(--gutter); }
    .bar-meta, .bar-controls > :is(.bar-tabs, .bar-action) { display:none; }
    .bar-controls:not(:has(> :not(.bar-tabs, .bar-action))) { display:none; }
    .bar-crumb--mid { display:none; }
    .bar-crumb--first .bar-crumb-label { display:none; }
    .bar-crumb--first .bar-crumb-fold { display:inline-flex; min-width:var(--control); justify-content:flex-end; }
    .bar-label { display:none; }
    .bar-crumb-label { max-width:7rem; }
    /* Ask Egon moves into your menu on a phone (D219 mock), so the page's name keeps its room. */
    .menu-panel > .me-egon { display:flex; }
    .bar-sub { display:flex; align-items:center; gap:var(--tt-space-2); padding:0 var(--gutter) var(--tt-space-2);
               overflow-x:auto; scrollbar-width:none; }
    .bar-sub > .bar-tabs { flex:0 1 auto; min-width:0; }
    .bar-sub > .bar-action { flex:none; margin-left:auto; }
    .tabbar-more .menu-panel { top:auto; bottom:calc(100% + var(--tt-space-2)); }
    .tabbar-more .menu-panel > a[aria-current="page"] { background:var(--tt-hover); font-weight:var(--tt-weight-medium); }
  }
}

@layer bl-components {
  /* 16px or iOS zooms the page the moment a field is focused: a phone, or any tablet. */
  @media (max-width:900px), (pointer:coarse) {
    :where(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, textarea) { font-size:var(--tt-text-md); }
  }
  @media (max-width:900px), (max-height:560px) {
    /* The sign over the strip's end, on the page's own background, fading into the row it cuts. */
    .nav-more { grid-column:1 / -1; grid-row:2; justify-self:end; align-self:start; z-index:1; margin-top:var(--tt-space-2);
                min-height:var(--control-h-touch); padding-inline:var(--tt-space-2); gap:var(--tt-space-1);
                background:var(--tt-surface); border-color:transparent;
                box-shadow:calc(var(--tt-space-4) * -1) 0 var(--tt-space-3) var(--tt-surface); }
    .nav-more:hover { background:var(--tt-surface); border-color:transparent; }
    .nav-more .icon { transform:none; }
    .nav-more[data-back] .icon { transform:rotate(180deg); }
    .panel-head { flex-direction:column; align-items:flex-start; gap:var(--tt-space-1); }
    .panel-head .sub { text-align:left; }
    .panel-fold > summary { grid-template:"title mark" auto "sub sub" auto / minmax(0, 1fr) auto; row-gap:var(--tt-space-1); }
    .total-value { font-size:var(--tt-text-2xl); }

    /* The nav strip slides sideways: words only, so more of it shows before the edge. */
    .nav-item .icon { display:none; }


    /* The theme: not in the header. A labelled row of three equal 44px options at the page's foot. */
    .foot .theme-pick, .foot .theme-label { display:none; }
    .menu-me .theme-pick, .menu-me .theme-label { display:none; }
    .theme-foot { display:flex; flex-direction:column; gap:var(--tt-space-2);
                  padding:var(--tt-space-5) var(--gutter) calc(var(--tt-space-8) + var(--safe-b));
                  border-top:1px solid var(--tt-line-subtle); }
    .theme-foot .theme-label { margin:0; }
    .theme-foot .theme-pick { display:flex; width:100%; flex-wrap:nowrap; }
    .theme-foot .theme-opt { flex:1 1 0; min-width:0; }

    /* Segments slide sideways in one row like the nav, and each option is a full touch target. */
    .seg, .theme-pick { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; }
    .period { flex-direction:column; align-items:stretch; }
    .period .seg { align-self:stretch; }
    /* A week's controls stay on one line, so the grid is not pushed down: arrows, the week, a small link. */
    .period--week { flex-direction:row; align-items:center; gap:var(--tt-space-2); }
    .period--week .pager { flex-wrap:nowrap; }
    .period--week .pager .btn > span { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
             clip-path:inset(50%); white-space:nowrap; border:0; }
    .period--week .pager__label { white-space:nowrap; }
    .range-form { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) auto;
                  align-items:end; gap:var(--tt-space-2); }
    .range-field { display:grid; gap:var(--tt-space-1); min-width:0; }
    .range-field input[type="date"] { width:100%; min-width:0; padding:0 var(--tt-space-2); }

    /* The primary sits in a bar pinned to the thumb, clear of the home indicator, on the page's own
       background with a hairline above — not a floating button over the field it should not hide. */
    .submit-bar { position:sticky; bottom:0; z-index:2; background:var(--tt-surface);
                  border-top:1px solid var(--tt-line-subtle);
                  padding:var(--tt-space-3) 0 calc(var(--tt-space-3) + var(--safe-b)); }
  }
  /* A focused field is scrolled clear of the bar, never under it (WCAG 2.2, 2.4.11). */
  @media (max-width:900px) {
    :where(html):has(.submit-bar) { scroll-padding-bottom:calc(var(--control) + var(--tt-space-8) + var(--safe-b)); }
  }

  /* The phone's bottom nav (D95) replaces the sliding strip; tablets and short windows keep the strip.
     Its z-index sits over the page's own menus, under the side panel (25) and a drawer (30). */
  .tabbar { display:none; }
  @media (max-width:640px) {
    .nav-more { display:none; }
    .tabbar { position:fixed; inset-inline:0; bottom:0; z-index:22; display:grid; grid-auto-flow:column;
              grid-auto-columns:minmax(0, 1fr); padding:0 var(--gutter) var(--safe-b);
              background:var(--tt-surface); border-top:1px solid var(--tt-line-subtle); }
    .tabbar-item { display:flex; flex-direction:column; align-items:center; justify-content:center;
                   gap:var(--tt-space-1); min-height:var(--tabbar-h); color:var(--tt-fg-muted); text-decoration:none;
                   font-size:var(--tt-text-xs); cursor:pointer; }
    .tabbar-active, .tabbar-more[open] > .tabbar-item { color:var(--tt-fg); font-weight:var(--tt-weight-medium); }
    .tabbar-more { display:flex; }
    .tabbar-more > .tabbar-item { flex:1 1 auto; }
    .submit-bar { bottom:calc(var(--tabbar-h) + var(--safe-b)); padding-bottom:var(--tt-space-3); }
    :where(html):has(.submit-bar) { scroll-padding-bottom:calc(var(--tabbar-h) + var(--control) + var(--tt-space-8) + var(--safe-b)); }
  }

  /* ---- a stacked table: each row becomes a card. The first cell heads it, full width; every other
     cell is one label beside ONE value (.cell), however many things that value holds. ---- */
  @media (max-width:640px) {
    .table--stack thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
    .table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display:block; width:100%; }
    .table--stack tr { padding:var(--tt-space-3) 0; border-bottom:1px solid var(--tt-line-subtle); }
    .table--stack td { height:auto; padding:var(--tt-space-1) 0; border:0; text-align:left; }
    .table--stack td[data-label] { display:grid; grid-template-columns:minmax(0, 8rem) minmax(0, 1fr);
                                   gap:var(--tt-space-3); align-items:baseline; }
    .table--stack td[data-label]::before { content:attr(data-label); color:var(--tt-fg-muted); font-family:var(--tt-font-sans);
                               font-size:var(--tt-text-xs); font-weight:var(--tt-weight-medium); }
    .table--stack td:first-child { font-weight:var(--tt-weight-medium); padding-bottom:var(--tt-space-2); }
    .table--stack td:first-child .hint { font-weight:var(--tt-weight-normal); }
    .table--stack .cell { min-width:0; }
    .table--stack .slate { white-space:normal; line-height:1.2; }
    .table--stack td.actions { text-align:left; white-space:normal; padding-top:var(--tt-space-2); }

    /* ---- a list table: two lines a row. Line one: the first cell, the figures right-aligned.
       Line two: everything else, muted, joined by a dot. ---- */
    .table--list thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
    .table--list, .table--list tbody { display:block; width:100%; }
    .table--list tr { display:flex; flex-wrap:wrap; align-items:baseline; column-gap:var(--tt-space-1);
                      padding:var(--tt-space-2) 0; border-bottom:1px solid var(--tt-line-subtle); }
    .table--list td { display:block; height:auto; padding:0; border:0; }
    /* A blank cell that still holds a placeholder (an em dash, an empty poster) is not :empty, so it
       would leave a lone "—" or a grey box in the phone line. The phone line drops it; the desktop
       column keeps its dash. */
    .table--list td:has(> .cell-none:only-child, > .poster-none) { display:none; }
    .table--list td:first-child { order:0; flex:1 1 0; min-width:0; overflow-wrap:break-word; font-weight:var(--tt-weight-medium); }
    .table--list td.num { order:1; flex:none; padding-left:var(--tt-space-3); }
    .table--list tr::after { content:""; order:1; flex-basis:100%; height:0; }
    .table--list td:not(:first-child):not(.num) { order:2; color:var(--tt-fg-muted); font-size:var(--tt-text-sm); }
    .table--list td:not(:first-child):not(.num) + td:not(.num)::before { content:"· "; }
    .table--list tfoot { display:block; width:100%; }
  }
}

@layer bl-components {
  /* Each option is the touch target on any touch display, not only a phone. */
  @media (max-width:900px), (pointer:coarse) {
    .seg__opt, .theme-opt { min-height:var(--control); }
    :where(label:has(> input[type="checkbox"], > input[type="radio"])) { display:flex; align-items:center;
      gap:var(--tt-space-2); min-height:var(--control); margin:0; }
    :is(td, li, dd, dt) a:not(.btn, .chip, .contact-row), .link-line a, .hint a, .sub a, .record-sub a, .tl-detail a, .source-title, .source-body, .home-more, .total-block a {
      display:inline-flex; align-items:center; min-height:var(--control); min-width:var(--control); }
  }
}

@layer bl-screens {
  /* A date no longer fits beside another at the smallest phones: one above the other. */
  @media (max-width:340px) { .range-form { grid-template-columns:minmax(0, 1fr); justify-items:stretch; } }
  /* The hours ledger on a phone: day and figure on a line, the work under them, Correct at the side. A
     fixed four-column table left the work column one word wide, and nothing at all at 320. */
  @media (max-width:640px) {
    table.hours, table.hours tbody, table.hours tfoot { display:block; width:100%; }
    table.hours colgroup { display:none; }
    table.hours thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
    table.hours tr { display:grid; grid-template-columns:minmax(0, 1fr) auto auto; column-gap:var(--tt-space-3);
                     align-items:center; padding-block:var(--tt-space-2); border-bottom:1px solid var(--tt-line-subtle); }
    table.hours td, table.hours td:not(.actions) { display:block; height:auto; padding:0; border:0; overflow:visible; }
    table.hours td.day { grid-column:1; grid-row:1; color:var(--tt-fg-muted); font-size:var(--tt-text-sm); }
    table.hours td.num { grid-column:2; grid-row:1; }
    table.hours td.work { grid-column:1 / 3; grid-row:2; overflow-wrap:break-word; }
    table.hours td.actions { grid-column:3; grid-row:1 / 3; }
    table.hours tfoot td:empty { display:none; }
    table.hours tfoot tr { border-bottom:0; }
    table.hours tr.edit-row { display:block; }
    table.hours tr.edit-row td { padding:0; }
  }
  @media (max-width:900px) {
    .edit-fields { grid-template-columns:minmax(0, 1fr); }
    .cell-input, .cell-input--wide { width:100%; min-width:0; }
    table.hours col.c-day { width:6.5rem; }
    table.hours col.c-num { width:4.5rem; }
    table.hours col.c-act { width:6.5rem; }
  }
}
@layer bl-screens {
  /* Comps (D157, D212): tiles, cards with a poster, films and series listed apart, the side card. */
  .csug-panel { display:grid; gap:var(--tt-space-3); }
  /* Comp Engine at /tools/comps (C1). */
  .cengine-intake { display:grid; gap:var(--tt-space-4); }
  .cengine-runs { display:grid; margin:0; padding:0; list-style:none; border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-lg); background:var(--tt-raised); }
  .cengine-run { display:flex; flex-wrap:wrap; align-items:baseline; gap:var(--tt-space-1) var(--tt-space-3); padding:var(--tt-space-3) var(--tt-space-4); }
  .cengine-run + .cengine-run { border-top:1px solid var(--tt-line-subtle); }
  .cengine-logline { margin:0 0 var(--tt-space-4); max-width:var(--measure); }
  .cengine-steer { display:grid; gap:var(--tt-space-2); margin-bottom:var(--tt-space-4); }
  .cengine-steer-form { display:flex; align-items:center; gap:var(--tt-space-2); }
  .cengine-steer-form input[name="steer"] { flex:1 1 0; min-width:0; }
  .cengine-kpis { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:var(--tt-space-4); margin-bottom:var(--tt-space-4); }
  @media (max-width:40rem) { .cengine-kpis { grid-template-columns:minmax(0, 1fr); } }
  .cengine-kpi--ok::after { background:var(--tt-ok-solid); }
  .cengine-kpi--warn::after { background:var(--tt-warn-solid); }
  .cengine-kpi--plain::after { background:var(--tt-line); }
  .cengine-kpi-value { font-size:var(--tt-text-2xl); font-variant-numeric:tabular-nums; }
  /* TODO(design-system#28): ui.css sets .tt-kpi-foot in fg-faint, below 4.5:1; drop this once v0.8.0 is vendored. */
  .cengine-kpis .tt-kpi-foot { color:var(--tt-fg-muted); }
  .cengine-steer-chips { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); margin:0; }
  .csug-head { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2) var(--tt-space-3); }
  .csug-meta { margin:0; flex:1 1 var(--measure); font-size:var(--tt-text-sm); color:var(--tt-fg-muted); }
  .csug-set { margin:var(--tt-space-2) 0 0; font-size:var(--tt-text-sm); color:var(--tt-fg); font-weight:var(--tt-weight-medium); }
  .csug-filter { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); }
  .csug-list { display:grid; margin:0; padding:0; list-style:none; border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-lg); background:var(--tt-raised); }
  .csug-row { display:grid; grid-template-columns:var(--tt-space-5) var(--tt-space-10) minmax(0,1fr) auto auto; align-items:center; gap:var(--tt-space-3); padding:var(--tt-space-3) var(--tt-space-4); }
  .csug-row + .csug-row { border-top:1px solid var(--tt-line-subtle); }
  .csug-check { width:var(--tt-space-5); height:var(--tt-space-5); margin:0; }
  .csug-poster { width:var(--tt-space-10); height:calc(var(--tt-space-10) * 1.5); border-radius:var(--tt-radius-md); object-fit:cover; background:var(--tt-hover); }
  .csug-main { display:grid; gap:var(--tt-space-2); min-width:0; }
  .csug-title, .csug-chips { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); margin:0; }
  .csug-chip { padding:0 var(--tt-space-2); border-radius:var(--tt-radius-md); background:var(--tt-hover); font-size:var(--tt-text-xs); line-height:var(--tt-space-5); color:var(--tt-fg-muted); }
  .csug-poster-none { display:inline-block; }
  .csug-suggested { color:var(--tt-fg-muted); }
  .csug-denied { color:var(--tt-fg-muted); }
  .csug-approved { color:var(--tt-ok-text, var(--tt-fg)); }
  .csug-score { display:grid; justify-items:center; margin:0; min-width:var(--tt-space-12); }
  .csug-score strong { font-size:var(--tt-text-xl); font-variant-numeric:tabular-nums; }
  .csug-score span { font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .csug-state { margin:0; text-align:right; }
  .csug-form { display:grid; gap:var(--tt-space-3); }
  .csug-bulk { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); margin:0; }
  .csug-actions { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); margin:0; }
  .csug-reason { flex:1 1 var(--tt-space-16); min-width:0; max-width:calc(var(--tt-space-16) * 5); }
  .csug-filter a { padding:0 var(--tt-space-3); border-radius:var(--tt-radius-md); background:var(--tt-hover); font-size:var(--tt-text-sm); line-height:var(--tt-space-6); text-decoration:none; color:var(--tt-fg-muted); }
  .csug-filter a[aria-current] { color:var(--tt-fg); font-weight:var(--tt-weight-medium); }
  @media (max-width: 640px) {
    .csug-row { grid-template-columns:var(--tt-space-5) var(--tt-space-10) minmax(0,1fr); }
    .csug-score { grid-column:3; grid-auto-flow:column; justify-content:start; gap:var(--tt-space-2); }
    .csug-state { grid-column:3; text-align:left; }
    .csug-reason { flex-basis:100%; max-width:none; }
  }
  .proj-search { display:flex; gap:var(--tt-space-2); }
  .proj-link { display:inline-flex; align-items:center; min-height:var(--control); font-size:var(--tt-text-sm); font-weight:var(--tt-weight-medium); }
  .proj-new { display:grid; grid-template-columns:minmax(0,1fr) minmax(0, calc(var(--tt-space-16) * 4.5)); gap:var(--tt-space-4); align-items:start; }
  .proj-main, .proj-project { display:grid; gap:var(--tt-space-4); }
  .proj-project > *, .proj-main > * { margin:0; }
  .proj-project textarea { width:100%; }
  .proj-step { margin:0; font-size:var(--tt-text-md); }
  .proj-step .sub { font-weight:var(--tt-weight-normal); }
  .proj-facts { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:var(--tt-space-3); }
  .proj-facts .field { margin:0; }
  .proj-evidence { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:var(--tt-space-3); }
  .proj-evidence .panel { margin:0; display:grid; gap:var(--tt-space-2); align-content:start; }
  .proj-evidence h3, .proj-evidence p { margin:0; }
  .proj-uses { position:sticky; top:var(--tt-space-4); display:grid; gap:var(--tt-space-3); background:var(--tt-sunken); margin:0; }
  .proj-uses > * { margin:0; }
  .proj-uses ul { list-style:none; padding:0; display:grid; gap:var(--tt-space-2); font-size:var(--tt-text-sm); color:var(--tt-fg-muted); }
  .proj-uses .proj-on { color:var(--tt-ok-text); }
  .proj-uses .btn { width:100%; justify-content:center; }
  .proj-search input { flex:1; min-width:0; }
  .proj-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:var(--tt-space-3); }
  .proj-grid > * { margin:0; }
  .proj-cutoffs { display:flex; flex-wrap:wrap; align-items:flex-end; gap:var(--tt-space-3); }
  .proj-cutoffs .field { margin:0; }
  .proj-hits { margin:0; padding:0; list-style:none; }
  .proj-hit { display:flex; align-items:center; gap:var(--tt-space-3); padding:var(--tt-space-3) 0; }
  .proj-hit + .proj-hit { border-top:1px solid var(--tt-line-subtle); }
  .proj-hit-main { flex:1; min-width:0; }
  .proj-poster { flex:none; width:var(--tt-space-10); aspect-ratio:2 / 3; height:auto; border-radius:var(--tt-radius-md); object-fit:cover; background:var(--tt-hover); }
  .proj-steps { margin:0; padding-left:var(--tt-space-5); display:grid; gap:var(--tt-space-2); max-width:var(--measure); }
  .proj-head { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:var(--tt-space-3); }
  .proj-head > .sub { margin:0; }
  .proj-top { display:grid; grid-template-columns:minmax(0,1fr) minmax(0, calc(var(--tt-space-16) * 5)); gap:var(--tt-space-4); align-items:start; }
  .proj-range, .proj-method { display:grid; gap:var(--tt-space-3); }
  .proj-range > *, .proj-method > * { margin:0; }
  .proj-trust { padding:var(--tt-space-2) var(--tt-space-3); border-radius:var(--tt-radius-md); background:color-mix(in srgb, var(--tt-warn-text) 14%, transparent); font-size:var(--tt-text-sm); font-weight:var(--tt-weight-medium); }
  .proj-other, .proj-actual { font-size:var(--tt-text-sm); }
  .proj-range-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--tt-space-2); }
  .proj-range-head h2 { margin:0; }
  .proj-kpi-value { font-size:var(--tt-text-2xl); font-variant-numeric:tabular-nums; }
  .proj-actual { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); }
  @media (max-width: 640px) {
    .proj-top { grid-template-columns:minmax(0,1fr); }
    .proj-new, .proj-facts, .proj-evidence { grid-template-columns:minmax(0,1fr); }
    .proj-uses { position:static; order:-1; }
    .comps-tiles.proj-tiles { flex-wrap:nowrap; gap:var(--tt-space-2); }
    .comps-tiles.proj-tiles > * { flex:1 1 0; padding:var(--tt-space-2); }
    .proj-tiles .proj-kpi-value { font-size:var(--tt-text-xl); }
  }
  .comps-panel { display:grid; gap:var(--tt-space-3); }
  .comps-error { margin:0; color:var(--tt-bad-text, var(--tt-fg)); font-size:var(--tt-text-sm); }
  .comps-tiles { display:flex; flex-wrap:wrap; gap:var(--tt-space-3); }
  .comps-tiles > * { flex:1 1 calc(var(--tt-space-16) * 3); min-width:0; }
  .comps-tile { padding:var(--tt-space-3); border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md); background:var(--tt-raised); }
  .comps-tile-label, .comps-tile-sub { margin:0; font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .comps-tile-value { margin:var(--tt-space-1) 0; font-size:var(--tt-text-xl); font-weight:var(--tt-weight-semibold); font-variant-numeric:tabular-nums; }
  .comps-filter { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); }
  .comps-group { margin:var(--tt-space-2) 0 0; font-size:var(--tt-text-sm); font-weight:var(--tt-weight-medium); }
  .comps-cards, .comps-reader-list { display:flex; flex-wrap:wrap; gap:var(--tt-space-3); margin:0; padding:0; list-style:none; }
  .comps-cards > *, .comps-reader-list > * { flex:1 1 var(--measure); min-width:0; max-width:100%; }
  .comps-card { display:flex; gap:var(--tt-space-3); padding:var(--tt-space-3); border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-lg); background:var(--tt-raised); box-shadow:var(--tt-shadow-xs); }
  .comps-card-body { display:grid; gap:var(--tt-space-2); min-width:0; flex:1; }
  .comps-card-head { display:flex; justify-content:space-between; align-items:start; gap:var(--tt-space-2); }
  .comps-numbers { display:flex; flex-wrap:wrap; gap:var(--tt-space-4); margin:0; font-size:var(--tt-text-sm); }
  .comps-numbers dd { margin:0; font-weight:var(--tt-weight-medium); font-variant-numeric:tabular-nums; }
  .comps-meta, .comps-fetched, .comps-subject, .comps-for { font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .comps-meta { display:block; }
  .comps-note { margin:0; font-size:var(--tt-text-base); }
  .comps-chip, .comps-source, .comps-source-readers { display:inline-flex; align-items:center; min-height:var(--chip-h); padding:0 var(--tt-space-2); border-radius:var(--tt-radius-full); background:var(--tt-hover); font-size:var(--tt-text-xs); }
  .comps-poster { flex:none; border-radius:var(--tt-radius-sm); object-fit:cover; background:var(--tt-sunken); }
  .comps-poster-none { display:inline-block; }
  .comps-poster-sm { width:var(--tt-space-6); height:calc(var(--tt-space-6) * 1.5); }
  .comps-poster-md { width:var(--tt-space-8); height:var(--tt-space-12); }
  .comps-poster-lg { width:calc(var(--tt-space-16) + var(--tt-space-4)); height:calc((var(--tt-space-16) + var(--tt-space-4)) * 1.5); }
  .comps-more { position:relative; }
  .comps-more-menu { position:absolute; inset-inline-end:0; z-index:1; display:grid; gap:var(--tt-space-1); padding:var(--tt-space-2); border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md); background:var(--tt-raised); box-shadow:var(--tt-shadow-lg); }
  .comps-actions, .comps-note-form { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); align-items:center; }
  .comps-note-in { flex:1; min-width:0; }
  .comps-remove { color:var(--tt-bad-text, var(--tt-fg)); }
  .comps-add, .comps-search { display:grid; gap:var(--tt-space-2); }
  .comps-add > summary { display:flex; align-items:center; min-height:var(--control-h-touch); cursor:pointer; }
  .comps-pick { display:grid; gap:var(--tt-space-2); }
  .comps-hit { display:flex; gap:var(--tt-space-2); align-items:center; }
  .comps-readers { display:grid; gap:var(--tt-space-2); }
  .comps-side { display:grid; gap:var(--tt-space-2); }
  .comps-side ul { display:grid; gap:var(--tt-space-2); margin:0; padding:0; list-style:none; }
  .comps-side-row { display:flex; gap:var(--tt-space-2); align-items:start; }
  .comps-side-sum { margin:0; font-size:var(--tt-text-xs); color:var(--tt-fg-muted); font-variant-numeric:tabular-nums; }
  .comps-side-sum span { color:var(--tt-fg); font-weight:var(--tt-weight-medium); }
  .tmdb-attribution { max-width:var(--measure, 65ch); display:flex; gap:var(--tt-space-2); align-items:center; font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .tmdb-logo { width:calc(var(--tt-space-16) + var(--tt-space-4)); height:auto; flex:none; }
  .tmdb-logo-1 { fill:currentColor; }
  /* "Is this them?" on a person's record (D249): face, three posters, three answers, 8px apart. */
  .record-photo { object-fit:cover; padding:0; background:var(--tt-line-subtle); }
  .tmdb-card { display:grid; gap:var(--tt-space-3); }
  .tmdb-who { display:flex; gap:var(--tt-space-3); align-items:center; }
  .tmdb-who h2 { margin:0; font-size:var(--tt-text-md); }
  .tmdb-who .hint { margin:0; }
  .tmdb-face { flex:none; width:var(--tt-space-12); height:var(--tt-space-12); border-radius:50%; object-fit:cover; background:var(--tt-line-subtle); }
  .tmdb-posters { display:flex; flex-wrap:wrap; gap:var(--tt-space-3); margin:0; padding:0; list-style:none; }
  .tmdb-poster { display:grid; gap:var(--tt-space-1); width:var(--tt-space-16); font-size:var(--tt-text-xs); }
  .tmdb-poster img, .tmdb-poster-none { display:block; width:100%; aspect-ratio:2 / 3; height:auto; border-radius:var(--tt-radius-sm); object-fit:cover; background:var(--tt-line-subtle); }
  .tmdb-poster-title { font-weight:var(--tt-weight-medium); overflow-wrap:break-word; }
  .tmdb-actions { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); align-items:center; }
  .tmdb-actions form { margin:0; }
  .tmdb-matched { display:grid; gap:var(--tt-space-2); margin-bottom:var(--tt-space-4); }
  .tmdb-matched .banner > div { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); align-items:center; }
  .tmdb-search { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); align-items:center; }
  .tmdb-search input { flex:1 1 14rem; min-width:0; }
}
@layer bl-screens {
  /* Brain review (bl-brain-review): queue left, one item open right. Every class carries 'brq-'. */
  .brq-filters { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-3); margin-bottom:var(--tt-space-4); }
  .brq-area { display:flex; align-items:center; gap:var(--tt-space-2); }
  .brq-area label { font-size:var(--tt-text-sm); color:var(--tt-fg-muted); }
  .brq-area select { min-height:var(--tt-control-h); }
  .brq-split { display:grid; grid-template-columns:minmax(0, 26rem) minmax(0, 1fr); border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-lg); background:var(--tt-raised); overflow:hidden; }
  .brq-list { margin:0; padding:0; list-style:none; border-right:1px solid var(--tt-line-subtle); max-height:calc(100dvh - 14rem); overflow:auto; }
  .brq-row { display:grid; gap:var(--tt-space-1); padding:var(--tt-space-3) var(--tt-space-4); border-bottom:1px solid var(--tt-line-subtle); border-left:2px solid transparent; color:var(--tt-fg); text-decoration:none; }
  .brq-row:hover { background:var(--tt-hover); }
  .brq-row--open { background:var(--tt-hover); border-left-color:var(--tt-fg); }
  .brq-row--open .brq-row-title { font-weight:var(--tt-weight-semibold); }
  .brq-row-tags { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); }
  .brq-row-meta { font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .brq-row-title { font-size:var(--tt-text-sm); overflow-wrap:break-word; }
  .brq-detail { display:grid; align-content:start; gap:var(--tt-space-4); padding:var(--tt-space-6) var(--tt-space-8); min-width:0; }
  .brq-detail-tags { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); margin:0; }
  .brq-pos { font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .brq-title { margin:0; font-size:var(--tt-text-2xl); overflow-wrap:break-word; }
  .brq-text { display:grid; gap:var(--tt-space-2); padding:var(--tt-space-4); border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md); background:var(--tt-sunken); max-width:var(--measure-wide); }
  .brq-text p { margin:0; overflow-wrap:break-word; }
  .brq-facts { display:flex; flex-wrap:wrap; gap:var(--tt-space-6); margin:0; }
  .brq-facts dt { font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .brq-facts dd { margin:0; font-size:var(--tt-text-sm); font-weight:var(--tt-weight-medium); }
  .brq-where summary { cursor:pointer; font-size:var(--tt-text-xs); color:var(--tt-fg-muted); min-height:var(--tt-control-h); display:flex; align-items:center; }
  .brq-where code { font-family:var(--tt-font-mono); font-size:var(--tt-text-xs); overflow-wrap:break-word; }
  .brq-bar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--tt-space-3); padding-top:var(--tt-space-4); border-top:1px solid var(--tt-line-subtle); }
  .brq-choices { display:flex; flex-wrap:wrap; align-items:flex-start; gap:var(--tt-space-3); }
  .brq-choice { display:grid; gap:var(--tt-space-1); max-width:14rem; }
  .brq-choice-help { font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .brq-edit, .brq-confirm { flex-basis:100%; }
  .brq-edit summary, .brq-confirm summary { display:inline-flex; list-style:none; cursor:pointer; }
  .brq-edit-body, .brq-confirm-body { display:grid; gap:var(--tt-space-3); margin-top:var(--tt-space-3); max-width:var(--measure-wide); }
  .brq-edit-body label, .brq-confirm-body p { margin:0; font-size:var(--tt-text-sm); color:var(--tt-fg-muted); }
  .brq-edit-body textarea { width:100%; min-height:10rem; }
  .brq-edit-body .btn, .brq-confirm-body .btn { justify-self:start; }
  .brq-done { margin-top:var(--tt-space-8); display:grid; gap:var(--tt-space-3); }
  .brq-done-h { margin:0; font-size:var(--tt-text-lg); }
  .brq-done-list { margin:0; padding:0; list-style:none; border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-lg); background:var(--tt-raised); }
  .brq-done-row { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) auto auto; align-items:center; gap:var(--tt-space-4); padding:var(--tt-space-3) var(--tt-space-4); border-bottom:1px solid var(--tt-line-subtle); }
  .brq-done-row:last-child { border-bottom:0; }
  .brq-done-title { font-size:var(--tt-text-sm); overflow-wrap:break-word; }
  .brq-done-result { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); }
  .brq-done-note, .brq-done-meta { font-size:var(--tt-text-xs); color:var(--tt-fg-muted); overflow-wrap:break-word; }
  .brq-step { display:flex; gap:var(--tt-space-4); margin:0; }
  .brq-step a { display:inline-flex; align-items:center; min-height:var(--tt-control-h); font-weight:var(--tt-weight-medium); }
  @media (max-width: 760px) {
    .brq-split { grid-template-columns:minmax(0, 1fr); }
    .brq-list { display:none; }
    .brq-detail { padding:var(--tt-space-4); }
    .brq-step a { min-height:var(--control-h-touch); }
    .brq-done-row { grid-template-columns:minmax(0, 1fr); gap:var(--tt-space-2); }
    .brq-choice { max-width:none; flex:1 1 100%; }
  }
}
@layer bl-screens {
  /* Trailer analysis (T1c): the link form, the run list and the readout. Every class carries 'ta-'. */
  .ta-crumb { display:flex; align-items:center; gap:var(--tt-space-2); margin-bottom:var(--tt-space-3); font-size:var(--tt-text-sm); color:var(--tt-fg-muted); }
  .ta-crumb a { color:inherit; display:inline-flex; align-items:center; min-height:var(--control-h-touch); min-width:var(--control-h-touch); }
  .ta-title { margin:0; font-size:var(--tt-text-2xl); }
  .ta-new { margin-top:var(--tt-space-4); max-width:var(--measure-wide); }
  .ta-new .ta-form { display:grid; gap:var(--tt-space-3); }
  .ta-head { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:var(--tt-space-3); margin-bottom:var(--tt-space-4); }
  .ta-meta { margin:var(--tt-space-1) 0 0; color:var(--tt-fg-muted); font-size:var(--tt-text-sm); }
  .ta-progress { margin-bottom:var(--tt-space-4); }
  .ta-now { margin:0; }
  .ta-steps { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); margin:var(--tt-space-3) 0 0; padding:0; list-style:none; }
  .ta-step { display:inline-flex; gap:var(--tt-space-2); align-items:center; min-height:var(--chip-h); padding:0 var(--tt-space-3); border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-full); font-size:var(--tt-text-sm); color:var(--tt-fg-muted); }
  .ta-step--done { color:var(--tt-fg); }
  .ta-step--now { color:var(--tt-fg); border-color:var(--tt-fg); }
  .ta-step-state { font-size:var(--tt-text-xs); }
  .ta-body { display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); grid-template-areas:"stats stats stats stats stats" "player player player notes notes" "timeline timeline timeline timeline timeline" "tribe tribe tribe tribe tribe" "sheet sheet sheet sheet sheet"; gap:var(--tt-space-4); align-items:start; }
  .ta-statswrap { grid-area:stats; display:flex; align-items:center; gap:var(--tt-space-2); }
  .ta-player { grid-area:player; background:var(--tt-hover); border-radius:var(--tt-radius-lg); overflow:hidden; aspect-ratio:16 / 9; display:grid; place-items:center; }
  .ta-player video, .ta-player iframe { width:100%; height:100%; display:block; background:var(--tt-surface); object-fit:contain; border:0; }
  .ta-player--wait { padding:var(--tt-space-4); }
  .ta-notes { grid-area:notes; min-width:0; }
  .ta-notes h2 { margin:0 0 var(--tt-space-2); font-size:var(--tt-text-md); }
  .ta-ready { margin:0 0 var(--tt-space-3); }
  .ta-ready-answer { font-weight:var(--tt-weight-medium); }
  .ta-note-list { display:grid; gap:var(--tt-space-3); margin:0; padding:0; list-style:none; }
  .ta-note p { margin:var(--tt-space-1) 0 0; overflow-wrap:break-word; }
  .ta-tag { display:inline-flex; align-items:center; min-height:var(--chip-h); padding:0 var(--tt-space-2); border-radius:var(--tt-radius-sm); background:var(--tt-hover); font-size:var(--tt-text-xs); font-weight:var(--tt-weight-medium); }
  .ta-tag--works { color:var(--tt-ok-text); }
  .ta-tag--try { color:var(--tt-warn-text); }
  .ta-tc { min-height:var(--control-h-touch); padding:0 var(--tt-space-2); border:0; background:transparent; color:var(--tt-fg); font:inherit; font-size:var(--tt-text-sm); font-variant-numeric:tabular-nums; text-decoration:underline; text-underline-offset:.2em; cursor:pointer; }
  .ta-tc:hover { background:var(--tt-hover); border-radius:var(--tt-radius-md); }
  .ta-notes-foot { margin:var(--tt-space-3) 0 0; font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .ta-failed { margin:0; }
  .ta-plot--strip { height:var(--tt-space-8); }
  .ta-beat rect { fill:var(--tt-hover); stroke:var(--tt-surface); stroke-width:2; }
  .ta-beat text, .ta-card text { font-size:var(--tt-text-xs); fill:var(--tt-fg); }
  .ta-card rect { fill:var(--tt-fg); }
  .ta-cardlist { display:none; margin:var(--tt-space-2) 0 0; padding:0; list-style:none; font-size:var(--tt-text-sm); }
  .ta-stats { flex:1; display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:var(--tt-space-3); margin:0; padding:var(--tt-space-3) var(--tt-space-4); border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-lg); background:var(--tt-raised); }
  .ta-stat dt { font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .ta-stat dd { margin:0; font-size:var(--tt-text-xl); font-weight:var(--tt-weight-medium); font-variant-numeric:tabular-nums; white-space:nowrap; }
  .ta-unit { font-size:var(--tt-text-xs); color:var(--tt-fg-muted); font-weight:var(--tt-weight-normal); }
  .ta-more { display:none; }
  .ta-timeline { grid-area:timeline; min-width:0; }
  .ta-lane, .ta-axis { display:grid; grid-template-columns:calc(var(--tt-space-16) * 2) minmax(0,1fr); gap:var(--tt-space-3); align-items:center; }
  .ta-lane + .ta-caption, .ta-lane + .ta-lane { margin-top:var(--tt-space-2); }
  .ta-lane-label { display:grid; gap:var(--tt-space-1); font-size:var(--tt-text-sm); }
  .ta-lane-label .sub { font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .ta-lane-none { margin:0; }
  .ta-axis { margin-bottom:var(--tt-space-2); }
  .ta-axis-track { display:block; height:var(--tt-space-4); font-size:var(--tt-text-xs); fill:var(--tt-fg-muted); font-variant-numeric:tabular-nums; }
  .ta-plot { position:relative; height:calc(var(--tt-space-16) + var(--tt-space-4)); border-bottom:1px solid var(--tt-line-subtle); cursor:pointer; }
  .ta-plot svg { display:block; width:100%; height:100%; }
  /* Send to Backlot window (/send, Fetch from my browser). */
  .yb-send { max-width:calc(var(--tt-space-16) * 9); }
  .yb-facts { display:grid; grid-template-columns:max-content minmax(0, 1fr); gap:var(--tt-space-2) var(--tt-space-4); margin:var(--tt-space-4) 0; }
  .yb-facts dt { color:var(--tt-fg-muted); }
  .yb-facts dd { margin:0; overflow-wrap:break-word; font-variant-numeric:tabular-nums; }
  .yb-curve { margin:var(--tt-space-4) 0; }
  .yb-curve h2 { font-size:var(--tt-text-sm); margin:0 0 var(--tt-space-2); }
  .yb-plot { height:calc(var(--tt-space-16) + var(--tt-space-4)); border-bottom:1px solid var(--tt-line-subtle); }
  .yb-plot svg { display:block; width:100%; height:100%; }
  .yb-line { fill:none; stroke:var(--tt-fg); stroke-width:1.5; vector-effect:non-scaling-stroke; }
  .yb-axis { display:flex; justify-content:space-between; margin:var(--tt-space-1) 0 0; font-size:var(--tt-text-xs); color:var(--tt-fg-muted); font-variant-numeric:tabular-nums; }
  .yb-steps { padding-left:var(--tt-space-6); }
  .yb-actions { display:flex; flex-wrap:wrap; gap:var(--tt-space-3); align-items:center; margin-top:var(--tt-space-4); }
  .yb-bookmarklet { cursor:grab; }
  /* A YouTube run the server could not read (Fetch from my browser, US-2). */
  .ta-stuck { border:1px solid var(--tt-warn-text); border-radius:var(--tt-radius-md); padding:var(--tt-space-4) var(--tt-space-5); margin:var(--tt-space-4) 0; }
  .ta-stuck h2 { font-size:var(--tt-text-md); margin:0 0 var(--tt-space-2); color:var(--tt-warn-text); }
  .ta-stuck-actions { display:flex; flex-wrap:wrap; gap:var(--tt-space-3); margin:var(--tt-space-3) 0; }
  .ta-stuck-setup { border-top:1px solid var(--tt-line-subtle); margin-top:var(--tt-space-4); padding-top:var(--tt-space-4); }
  .ta-stuck-setup h2 { color:var(--tt-fg); }
  .yx-panel { border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md); padding:var(--tt-space-3) var(--tt-space-4); margin:var(--tt-space-4) 0; }
  .yx-panel[data-state="missing"], .yx-panel[data-state="changed"], .yx-panel[data-state="failed"] { border-color:var(--tt-warn-text); }
  .yx-msg { margin:0; }
  .yx-bar { display:block; width:100%; margin:var(--tt-space-3) 0 0; }
  .yx-actions { display:flex; flex-wrap:wrap; gap:var(--tt-space-3); margin:var(--tt-space-3) 0 0; }
  .yx-actions:not(:has(> :not([hidden]))) { display:none; }
  .yx-install { max-width:calc(var(--tt-space-16) * 10); }
  .yx-steps { display:grid; gap:var(--tt-space-3); padding-left:var(--tt-space-5); margin:var(--tt-space-4) 0; }
  .yx-note { border-left:var(--stripe) solid var(--tt-line-subtle); padding-left:var(--tt-space-3); }
  .ta-bars { fill:var(--tt-fg-muted); opacity:.55; }
  .ta-line, .ta-curve { fill:none; stroke:var(--tt-fg); stroke-width:1.5; vector-effect:non-scaling-stroke; }
  .ta-curve { stroke-width:1; }
  .ta-refline { stroke:var(--tt-fg-muted); stroke-width:1; stroke-dasharray:4 4; vector-effect:non-scaling-stroke; }
  .ta-shade { fill:var(--tt-warn-text); opacity:.18; }
  .ta-plot--talk { height:var(--tt-space-8); }
  .ta-talk rect { fill:var(--tt-fg); opacity:.55; }
  .ta-refs { position:absolute; inset:0; font-size:var(--tt-text-xs); fill:var(--tt-fg-muted); pointer-events:none; }
  .ta-playhead { position:absolute; top:0; bottom:0; left:0; width:var(--stripe); background:var(--tt-bad-text); pointer-events:none; }
  .ta-caption { margin:var(--tt-space-2) 0 var(--tt-space-3); padding-left:calc(var(--tt-space-16) * 2 + var(--tt-space-3)); font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .ta-data { margin-top:var(--tt-space-3); }
  .ta-data summary { display:inline-flex; align-items:center; min-height:var(--control); cursor:pointer; color:var(--tt-fg-muted); text-decoration:underline; text-underline-offset:.2em; }
  .ta-table { border-collapse:collapse; margin:var(--tt-space-2) 0; font-size:var(--tt-text-sm); font-variant-numeric:tabular-nums; }
  .ta-table th, .ta-table td { padding:var(--tt-space-1) var(--tt-space-4) var(--tt-space-1) 0; text-align:left; }
  .ta-tribe { grid-area:tribe; min-width:0; display:grid; gap:var(--tt-space-3); }
  .ta-tribe h2, .ta-tribe h3 { margin:0; font-size:var(--tt-text-md); }
  .ta-tribe h3 { font-size:var(--tt-text-sm); color:var(--tt-fg-muted); }
  .ta-tribe-state { margin:0; }
  .ta-tribe-curve { width:100%; height:7.5rem; display:block; }
  .ta-tribe-line { stroke:var(--tt-fg); stroke-width:1.5; vector-effect:non-scaling-stroke; }
  .ta-tribe-zero { stroke:var(--tt-line-subtle); stroke-width:1; vector-effect:non-scaling-stroke; }
  .ta-tribe-hi { fill:var(--tt-fg); }
  .ta-tribe-lo { fill:var(--tt-surface); stroke:var(--tt-fg); stroke-width:1.5; }
  .ta-tribe-cols { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:var(--tt-space-4); }
  .ta-tribe-moments, .ta-tribe-hints { margin:var(--tt-space-2) 0 0; padding:0; list-style:none; display:grid; gap:var(--tt-space-2); }
  .ta-tribe-z { font-variant-numeric:tabular-nums; font-weight:var(--tt-weight-medium); }
  .ta-tribe-tablewrap { overflow-x:auto; }
  .ta-tribe-table { width:100%; border-collapse:collapse; font-size:var(--tt-text-sm); }
  .ta-tribe-table th, .ta-tribe-table td { text-align:left; vertical-align:top; padding:var(--tt-space-2) var(--tt-space-3); border-bottom:1px solid var(--tt-line-subtle); }
  .ta-sheet { grid-area:sheet; }
  .ta-sheet h2 { margin:0 0 var(--tt-space-3); font-size:var(--tt-text-md); }
  .ta-grid { display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:var(--tt-space-3) var(--tt-space-2); margin:0 0 var(--tt-space-3); padding:0; list-style:none; }
  @media (max-width:900px) { .ta-grid { grid-template-columns:repeat(3, minmax(0, 1fr)); } }
  @media (max-width:520px) { .ta-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); } }
  .ta-shot { display:grid; gap:var(--tt-space-1); justify-items:start; }
  .ta-shot img, .ta-noframe { width:100%; aspect-ratio:16 / 9; object-fit:cover; border-radius:var(--tt-radius-md); background:var(--tt-hover); cursor:pointer; display:block; }
  .ta-chip { min-height:var(--control-h-touch); min-width:var(--control-h-touch); padding:0 var(--tt-space-2); border:0; background:transparent; color:var(--tt-fg-muted); font-size:var(--tt-text-xs); font-variant-numeric:tabular-nums; cursor:pointer; }
  .ta-chip:hover { color:var(--tt-fg); background:var(--tt-hover); border-radius:var(--tt-radius-md); }
  @media (max-width:640px) {
    .ta-body { grid-template-columns:minmax(0,1fr); grid-template-areas:"player" "notes" "stats" "timeline" "tribe" "sheet"; }
    .ta-player { position:sticky; top:0; z-index:2; border-radius:var(--tt-radius-md); }
    .ta-statswrap { flex-direction:column; align-items:stretch; }
    .ta-stats { grid-auto-flow:row; grid-template-columns:repeat(2, minmax(0,1fr)); }
    .ta-js .ta-more { display:inline-flex; justify-content:center; }
    .ta-js .ta-stats:not(.ta-stats--open) .ta-stat--more { display:none; }
    .ta-lane, .ta-axis { grid-template-columns:minmax(0,1fr); gap:var(--tt-space-1); }
    .ta-tribe-cols { grid-template-columns:minmax(0,1fr); }
    .ta-axis .ta-lane-label { display:none; }
    .ta-plot { height:calc(var(--tt-space-16) * 1.5); }
    .ta-caption { padding-left:0; }
    .ta-card text { display:none; }
    .ta-cardlist { display:block; }
    .ta-grid { grid-template-columns:repeat(3, minmax(0,1fr)); }
  }
  /* Contacts › Meetings (meeting-notes S3): list left, the open meeting right; two screens on a phone. */
  .mtg-split { display:grid; grid-template-columns:minmax(0,calc(var(--tt-space-16) * 5.5)) minmax(0,1fr); border-top:1px solid var(--tt-line-subtle); min-height:70vh; }
  .mtg-list { border-right:1px solid var(--tt-line-subtle); }
  .mtg-group { margin:0; padding:var(--tt-space-3) var(--tt-space-4) var(--tt-space-1); font-size:var(--tt-text-xs); font-weight:var(--tt-weight-medium); color:var(--tt-fg-muted); text-transform:uppercase; }
  .mtg-rows { list-style:none; margin:0; padding:0; }
  .mtg-row { display:grid; gap:var(--tt-space-1); padding:var(--tt-space-3) var(--tt-space-4); border-bottom:1px solid var(--tt-line-subtle); color:var(--tt-fg); text-decoration:none; font-size:var(--tt-text-sm); }
  .mtg-row:hover, .mtg-row[aria-current="page"] { background:var(--tt-hover); }
  .mtg-row-top { display:flex; gap:var(--tt-space-2); justify-content:space-between; }
  .mtg-dim { color:var(--tt-fg-muted); font-size:var(--tt-text-xs); }
  .mtg-open { display:grid; align-content:start; gap:var(--tt-space-4); padding:var(--tt-space-6) var(--tt-space-6); min-width:0; }
  .mtg-none { place-content:center; }
  .mtg-back { display:none; }
  .mtg-head { display:flex; gap:var(--tt-space-3); align-items:center; justify-content:space-between; }
  .mtg-head h2 { margin:0; font-size:var(--tt-text-xl); }
  .mtg-people { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); align-items:center; margin:0; }
  .mtg-items-head { display:flex; flex-wrap:wrap; gap:var(--tt-space-3); align-items:center; justify-content:space-between; }
  .mtg-items-head h2, .mtg-summary h2 { margin:0; font-size:var(--tt-text-md); }
  .mtg-all { display:flex; flex-wrap:wrap; gap:var(--tt-space-3); align-items:center; margin-top:var(--tt-space-3); }
  .mtg-review h2 { margin:0 0 var(--tt-space-3); font-size:var(--tt-text-md); }
  .mtg-review-text { margin:0 0 var(--tt-space-1); font-size:var(--tt-text-md); }
  .mtg-board { display:flex; gap:var(--tt-space-2); align-items:center; }
  .mtg-items { list-style:none; margin:0; padding:0; display:grid; gap:var(--tt-space-2); }
  .mtg-item { display:flex; gap:var(--tt-space-3); align-items:center; padding:var(--tt-space-2) var(--tt-space-3); border:1px solid var(--tt-line-subtle); border-radius:var(--tt-radius-md); }
  .mtg-item form { margin:0; }
  .mtg-item-text { flex:1; min-width:0; font-size:var(--tt-text-sm); }
  .mtg-summary { font-size:var(--tt-text-sm); line-height:1.6; }
  .mtg-summary h3 { margin:var(--tt-space-3) 0 var(--tt-space-1); font-size:var(--tt-text-sm); }
  .mtg-transcript summary { cursor:pointer; color:var(--tt-fg-muted); font-size:var(--tt-text-sm); }
  .mtg-transcript p { margin:var(--tt-space-1) 0; font-size:var(--tt-text-sm); }
  @media (max-width:760px) {
    .mtg-split { grid-template-columns:minmax(0,1fr); }
    .mtg-list { border-right:0; }
    .mtg-split--open .mtg-list, .mtg-split:not(.mtg-split--open) .mtg-open { display:none; }
    .mtg-back { display:inline-flex; color:var(--tt-fg-muted); font-size:var(--tt-text-sm); }
    .mtg-open { padding:var(--tt-space-4); }
    .mtg-item { flex-wrap:wrap; }
  }
  /* The Inbox (platform/inbox V3, D361/D363): split list like Meetings; "+ Inbox" panel in the bar. */
  .nav-count { margin-left:auto; font-size:var(--tt-text-xs); color:var(--tt-fg-muted); font-variant-numeric:tabular-nums; }
  .inbx-cap-panel { width:min(28rem, calc(100vw - var(--tt-space-8))); padding:var(--tt-space-3); }
  .inbx-cap-panel form, .inbx-capture { display:grid; gap:var(--tt-space-2); margin:0; }
  .inbx-cap-panel textarea, .inbx-capture textarea { width:100%; min-height:4.5rem; resize:vertical; font:inherit; font-size:var(--tt-text-sm); }
  .inbx-capture { padding:var(--tt-space-3) var(--tt-space-4); border-bottom:1px solid var(--tt-line); }
  .inbx-capture-foot { display:flex; gap:var(--tt-space-3); align-items:center; justify-content:space-between; }
  .inbx-tabs-row { padding:var(--tt-space-2) var(--tt-space-4); overflow-x:auto; }
  .inbx-split { display:grid; grid-template-columns:minmax(0,calc(var(--tt-space-16) * 5.5)) minmax(0,1fr); border-top:1px solid var(--tt-line); min-height:70vh; }
  .inbx-left { border-right:1px solid var(--tt-line); min-width:0; }
  .inbx-group { margin:0; padding:var(--tt-space-3) var(--tt-space-4) var(--tt-space-1); font-size:var(--tt-text-xs); font-weight:var(--tt-weight-medium); color:var(--tt-fg-muted); text-transform:uppercase; }
  .inbx-rows { list-style:none; margin:0; padding:0; }
  .inbx-row { display:grid; gap:var(--tt-space-1); padding:var(--tt-space-3) var(--tt-space-4); border-bottom:1px solid var(--tt-line); color:var(--tt-fg); text-decoration:none; font-size:var(--tt-text-sm); }
  .inbx-row strong { font-weight:var(--tt-weight-medium); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .inbx-row:hover, .inbx-row[aria-current="page"] { background:var(--tt-surface-2); }
  .inbx-dim { color:var(--tt-fg-muted); font-size:var(--tt-text-xs); }
  .inbx-open { display:grid; align-content:start; gap:var(--tt-space-4); padding:var(--tt-space-6); min-width:0; }
  .inbx-open h2 { margin:0; font-size:var(--tt-text-lg); }
  .inbx-none { place-content:center; }
  .inbx-back { display:none; }
  .inbx-body { font-size:var(--tt-text-sm); line-height:1.6; white-space:normal; overflow-wrap:break-word; }
  .inbx-attach { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); margin-top:var(--tt-space-2); }
  .inbx-attach[hidden] { display:none; }
  .inbx-attach-list { list-style:none; margin:0; padding:0; flex-basis:100%; display:grid; gap:var(--tt-space-1); font-size:var(--tt-text-sm); }
  .inbx-attach-list li { display:flex; align-items:center; justify-content:space-between; gap:var(--tt-space-2); overflow-wrap:break-word; min-width:0; }
  form.inbx-drop { outline:2px dashed var(--tt-fg); outline-offset:var(--tt-space-1); }
  .inbx-files { display:grid; gap:var(--tt-space-3); margin:var(--tt-space-4) 0; }
  .inbx-shot { display:block; border:1px solid var(--tt-line); border-radius:var(--tt-radius-md); overflow:hidden; max-width:100%; }
  .inbx-shot img { display:block; max-width:100%; height:auto; max-height:calc(var(--tt-space-16) * 7.5); object-fit:contain; }
  .inbx-file-links { list-style:none; margin:0; padding:0; display:grid; gap:var(--tt-space-2); font-size:var(--tt-text-sm); }
  .inbx-file-links a { display:inline-flex; align-items:center; gap:var(--tt-space-2); overflow-wrap:break-word; }
  .inbx-decide { display:grid; gap:var(--tt-space-3); padding:var(--tt-space-4); border:1px solid var(--tt-line); border-radius:var(--tt-radius-md); }
  .inbx-decide h3 { margin:0; font-size:var(--tt-text-md); }
  .inbx-task { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:var(--tt-space-3); margin:0; }
  .inbx-field { display:grid; gap:var(--tt-space-1); min-width:0; }
  .inbx-field--wide, .inbx-task .inbx-actions { grid-column:1 / -1; }
  .inbx-field input, .inbx-field select { width:100%; }
  .inbx-actions { display:flex; flex-wrap:wrap; gap:var(--tt-space-2); align-items:center; }
  .inbx-actions form { margin:0; }
  .inbx-actions--other { padding-top:var(--tt-space-3); border-top:1px solid var(--tt-line); }
  @media (max-width:760px) {
    .inbx-split { grid-template-columns:minmax(0,1fr); }
    .inbx-left { border-right:0; }
    .inbx-split--open .inbx-left, .inbx-split:not(.inbx-split--open) .inbx-open { display:none; }
    .inbx-back { display:inline-flex; color:var(--tt-fg-muted); font-size:var(--tt-text-sm); }
    .inbx-open { padding:var(--tt-space-4); }
    .inbx-task { grid-template-columns:minmax(0,1fr); }
  }

  /* Meeting notes Record (D357): the sidebar row opens the pop-out; while it records the row says so. */
  /* "+ New" (2026-11-25): one menu, in the header. Capture first, then Create. */
  .new-menu-panel { min-width:15rem; background:var(--tt-overlay); box-shadow:var(--tt-shadow-lg); padding:var(--tt-space-1); }
  .new-menu-panel > .new-menu-item { gap:var(--tt-space-3); }
  .new-menu-item .icon { color:var(--tt-fg-muted); }
  .new-menu-h { margin:0; padding:var(--tt-space-2) var(--tt-space-3) var(--tt-space-1); font-size:var(--tt-text-xs);
                font-weight:var(--tt-weight-medium); color:var(--tt-fg-muted); }
  .new-menu-h + .new-menu-item ~ .new-menu-h { border-top:1px solid var(--tt-line-subtle); margin-top:var(--tt-space-1); }
  /* The Inbox panel has no button of its own: Note to Inbox open it. */
  .inbx-cap > .inbx-cap-trigger { display:block; width:0; height:var(--control); overflow:hidden; }
  /* Meeting notes running in the pop-out: a live pill in the header on every page. */
  .rec-live { display:inline-flex; align-items:center; gap:var(--tt-space-2); min-height:var(--control); padding:0 var(--tt-space-3);
              border-radius:var(--tt-radius-full); background:var(--tt-bad-soft); color:var(--tt-bad-text);
              font-size:var(--tt-text-xs); font-weight:var(--tt-weight-medium); text-decoration:none; white-space:nowrap; }
  .rec-live[hidden] { display:none; }
  .rec-live-dot { width:var(--tt-space-2); height:var(--tt-space-2); border-radius:var(--tt-radius-full); background:var(--tt-bad-solid); }
  .popout { min-height:100vh; }
  .popout-main { padding:var(--tt-space-5); max-width:30rem; margin:0 auto; }
  .rec { display:flex; flex-direction:column; gap:var(--tt-space-4); }
  .rec[hidden] { display:none; }
  .rec h1 { margin:0; font-size:var(--tt-text-lg); }
  .rec-field { display:flex; flex-direction:column; gap:var(--tt-space-1); font-size:var(--tt-text-sm); }
  .rec-check { display:flex; gap:var(--tt-space-2); align-items:flex-start; font-size:var(--tt-text-sm);
               font-weight:var(--tt-weight-normal); }
  .rec-check input { margin-top:var(--tt-space-1); flex:none; }
  .rec-line { display:flex; flex-direction:column; gap:var(--tt-space-2); padding:var(--tt-space-3);
              border:1px solid var(--tt-line); border-radius:var(--tt-radius-md); font-size:var(--tt-text-sm); color:var(--tt-fg-muted); }
  .rec-line .btn { align-self:flex-start; }
  .rec-time { margin:0; font-size:var(--tt-text-lg); font-variant-numeric:tabular-nums; font-weight:var(--tt-weight-medium); }
  .rec-time::before { content:""; display:inline-block; width:.6em; height:.6em; margin-right:var(--tt-space-2); border-radius:50%;
                      background:var(--tt-bad-solid); vertical-align:.08em; }
  .rec[data-paused] .rec-time::before { background:var(--tt-fg-faint); }
  .rec-meters { display:grid; grid-template-columns:auto minmax(0,1fr); gap:var(--tt-space-2) var(--tt-space-3);
                align-items:center; font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .rec-meter { height:var(--tt-space-2); border-radius:var(--tt-radius-full); background:var(--tt-hover); overflow:hidden; }
  .rec-meter > span { display:block; height:100%; width:0; background:var(--tt-fg); transition:width .1s linear; }
  .rec-actions { display:flex; gap:var(--tt-space-3); flex-wrap:wrap; }
  .rec-dim { margin:0; font-size:var(--tt-text-sm); color:var(--tt-fg-muted); }
  .rec progress { width:100%; }
  .rec-err:empty { display:none; }
  .rec-err { margin:0; color:var(--tt-bad-solid); font-size:var(--tt-text-sm); }
}
/* Franchise groups (project first P4, D270): the franchise page, its "Add a project" popover and the
   "Group into a franchise" dialog. Prefixed frg- so nothing leaks (styles are global). */
@layer bl-screens {
  .table-total td { background:var(--tt-sunken); font-weight:var(--tt-weight-semibold); }
  .frg-pop { width:min(20rem, calc(100vw - var(--tt-space-8))); padding:var(--tt-space-2); gap:var(--tt-space-1); }
  .frg-list { list-style:none; margin:0; padding:0; max-height:16rem; overflow-y:auto; }
  .frg-pick { display:flex; align-items:center; justify-content:space-between; gap:var(--tt-space-3);
              width:100%; min-height:var(--control); padding:0 var(--tt-space-3); border:0; background:none;
              border-radius:var(--tt-radius-sm); font:inherit; font-size:var(--tt-text-sm); color:var(--tt-fg);
              text-align:left; cursor:pointer; }
  .frg-pick:hover, .frg-pick:focus-visible { background:var(--tt-hover); }
  .frg-type { color:var(--tt-fg-muted); font-size:var(--tt-text-xs); }
  .frg-label { margin:var(--tt-space-1) var(--tt-space-3); color:var(--tt-fg-muted); font-size:var(--tt-text-xs); }
  .frg-new { display:flex; flex-direction:column; gap:var(--tt-space-2); padding:var(--tt-space-2) var(--tt-space-3);
             border-top:1px solid var(--tt-line-subtle); }
  .frg-row { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); }
  .frg-row > .input { flex:1 1 10rem; min-width:0; }
  .frg-row > .select { flex:0 0 auto; width:auto; }
  .frg-choices { display:flex; flex-direction:column; gap:var(--tt-space-1); border:0; margin:0; padding:0; }
  .frg-choice { display:flex; align-items:center; gap:var(--tt-space-2); min-height:var(--control); margin:0; }
  .frg-note { color:var(--tt-fg-muted); font-size:var(--tt-text-xs); }
  /* The app's reset drops a modal's centring margin. */
  #group-franchise:modal { margin:auto; }
  @media (max-width:640px) {
    .frg-add-words { display:none; }
    /* The button sits mid-bar on a phone: the popover takes the screen's width, not the button's edge. */
    .menu-panel.frg-pop { position:fixed; left:var(--tt-space-4); right:var(--tt-space-4); width:auto;
                          top:calc(var(--control-h-touch) + var(--tt-space-3)); }
    /* The total reads as one line of figures and one of stages, with no dot between blanks. */
    .frg-table .table--list td:empty { display:none; }
    .frg-table .table--list tfoot tr { background:var(--tt-sunken); }
    .frg-table .table--list tfoot td::before { content:none; }
    .frg-table .table--list tbody td.num + td:not(.num)::before { content:"· "; }
    /* A project with no franchise has no franchise on its line, so the next fact leads it. */
    .table--list td:first-child + td:has(> .cell-none:empty) + td::before { content:none; }
  }
}
/* Projects (bl-projects): the sidebar's Projects section with its "+", the Projects page and a project's
   List view (ClickUp's pattern). Prefixed navp- / projp- so nothing leaks (styles are global). */
@layer bl-screens {
  .navp { display:flex; flex-direction:column; gap:var(--tt-space-1); margin-top:var(--tt-space-4);
          padding-top:var(--tt-space-3); border-top:1px solid var(--tt-line-subtle); min-width:0;
          flex:none; }
  .navp-list { display:flex; flex-direction:column; gap:var(--tt-space-1); }
  .navp-row { position:relative; display:flex; align-items:center; }
  .navp-row .navp-item { flex:1 1 auto; min-width:0; padding-right:calc(var(--tt-space-6) + var(--tt-space-1)); }
  .navp-pinform { display:contents; }
  .navp-x { position:absolute; right:var(--tt-space-1); top:50%; transform:translateY(-50%); display:inline-flex;
            align-items:center; justify-content:center; width:var(--tt-space-6); height:var(--tt-space-6);
            min-width:0; min-height:0; padding:0; border:0; border-radius:var(--tt-radius-md); background:transparent;
            box-shadow:none; color:var(--tt-fg-muted); cursor:pointer; opacity:0; }
  .navp-x .icon { width:var(--tt-space-3); height:var(--tt-space-3); }
  .navp-row:hover .navp-x, .navp-x:focus-visible { opacity:1; }
  .navp-row:hover .navp-x { color:var(--tt-fg); }
  .navp-x:hover { color:var(--tt-fg); background:var(--tt-hover); }
  @media (hover:none) { .navp-x { opacity:1; } }
  .navp-all { padding:var(--tt-space-1) var(--tt-space-3); font-size:var(--tt-text-xs); color:var(--tt-fg-muted);
              text-decoration:none; border-radius:var(--tt-radius-md); }
  .navp-all:hover { color:var(--tt-fg); background:var(--tt-hover); }
  /* The sidebar never scrolls (D375): a window too short for the pins shows only the Projects heading;
     the pins stay on All projects, where each can still be unpinned. */
  @media (max-height:720px) { .navp-list, .navp-all, .navp-empty { display:none; } }
  /* Each row carries its rule with 8px above and below it, so a Pin stays clear of the rule and the next Pin (D89). */
  .projp-item { display:flex; align-items:center; justify-content:space-between; gap:var(--tt-space-3);
                padding-block:var(--tt-space-2); border-bottom:1px solid var(--tt-line-subtle); }
  .projp-pin { white-space:nowrap; }
  .navp-head { display:flex; align-items:center; justify-content:space-between; gap:var(--tt-space-2);
               padding:0 var(--tt-space-1) 0 var(--tt-space-3); position:relative; }
  .navp-title { font-size:var(--tt-text-xs); font-weight:var(--tt-weight-medium); color:var(--tt-fg-muted);
                text-decoration:none; }
  .navp-title:hover { color:var(--tt-fg); }
  .navp-add { position:static; }
  .navp-plus { list-style:none; display:inline-flex; align-items:center; justify-content:center;
               width:var(--tt-space-6); height:var(--tt-space-6); border-radius:var(--tt-radius-sm);
               color:var(--tt-fg-muted); cursor:pointer; }
  .navp-plus::-webkit-details-marker { display:none; }
  .navp-plus:hover, .navp-add[open] .navp-plus { color:var(--tt-fg); background:var(--tt-hover); }
  .navp-pop { position:absolute; left:0; right:0; top:calc(100% + var(--tt-space-1)); z-index:20;
              background:var(--tt-raised); border:1px solid var(--tt-line); border-radius:var(--tt-radius-md);
              box-shadow:var(--tt-shadow-lg); padding:var(--tt-space-3); }
  .navp-form { display:flex; flex-direction:column; gap:var(--tt-space-2); }
  .navp-form .input { width:100%; }
  .navp-kinds { display:flex; flex-wrap:wrap; gap:var(--tt-space-3); border:0; margin:0; padding:0; }
  .navp-kind { display:inline-flex; align-items:center; gap:var(--tt-space-1); font-size:var(--tt-text-sm);
               color:var(--tt-fg); }
  .navp-form-foot { display:flex; align-items:center; justify-content:space-between; gap:var(--tt-space-2); }
  .navp-hint { font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .navp-group { margin:var(--tt-space-2) 0 0; padding:0 var(--tt-space-3); font-size:var(--tt-text-xs);
                color:var(--tt-fg-muted); }
  .navp-item { display:flex; align-items:center; gap:var(--tt-space-3); min-height:var(--nav-h);
               padding:0 var(--tt-space-3); border-radius:var(--tt-radius-md); text-decoration:none;
               color:var(--tt-fg-muted); font-size:var(--tt-text-sm); min-width:0; }
  .navp-item:hover { color:var(--tt-fg); background:var(--tt-hover); }
  .navp-dot { flex:none; width:var(--tt-space-2); height:var(--tt-space-2); border-radius:var(--tt-radius-full);
              background:var(--tt-accent-solid); }
  .navp-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .navp-empty { display:flex; align-items:center; gap:var(--tt-space-3); min-height:var(--nav-h); padding:0 var(--tt-space-3);
                border-radius:var(--tt-radius-md); font-size:var(--tt-text-sm); color:var(--tt-fg-muted); text-decoration:none; }
  .navp-empty:hover { color:var(--tt-fg); background:var(--tt-hover); }
  @media (max-width:900px), (max-height:560px) {
    .navp { grid-column:1 / -1; grid-row:3; flex-direction:row; align-items:center; margin:0;
            padding:var(--tt-space-1) 0 var(--tt-space-2); border-top:0; }
    .navp-list, .navp-all, .navp-empty { display:none; }
    .navp-head { padding:0; }
  }
  /* A touch display that shows the Projects heading: its link and + are thumb targets too. */
  @media (pointer:coarse) {
    .navp-title { display:inline-flex; align-items:center; min-height:var(--control); }
    .navp-plus { width:var(--control); height:var(--control); }
  }

  .projp-h { margin:0 0 var(--tt-space-3); font-size:var(--tt-text-md); font-weight:var(--tt-weight-semibold); }
  .projp-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; }
  .projp-link { display:block; color:var(--tt-fg); text-decoration:none; }
  .projp-link:hover { color:var(--tt-accent-text); }
  .projp-new .navp-form { max-width:36ch; }
  /* New to-do on My tasks (bl-new-menu-project-todo): one row of fields, "Create project" under it. */
  .content form.todo-add { max-width:none; }
  .todo-add-h { margin:0 0 var(--tt-space-2); font-size:var(--tt-text-sm); }
  .todo-add-row { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2); }
  .todo-add-row > label { margin:0; flex:0 1 auto; }
  .todo-add-row > .todo-add-title { flex:2 1 calc(var(--tt-space-16) * 3); }
  .todo-add-row > .todo-add-project { flex:1 1 calc(var(--tt-space-16) * 2); }
  .todo-add-row :where(input, select) { width:100%; max-width:none; }
  .todo-add-new { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-3); border:0; margin:var(--tt-space-2) 0 0; padding:0; }
  .todo-add-new[hidden] { display:none; }
  .todo-add-new > legend { float:left; padding:0; font-size:var(--tt-text-sm); font-weight:var(--tt-weight-semibold); }
  @media (max-width:900px) { .todo-add-row > label { flex:1 1 100%; } }
  .projp-panel { padding:0; overflow:hidden; }
  .projp-tasks, .projp-sublist { list-style:none; margin:0; padding:0; }
  .projp-row { display:grid; grid-template-columns:minmax(0,1fr) 9rem 8rem 9rem; align-items:center;
               gap:var(--tt-space-3); padding:var(--tt-space-2) var(--tt-space-4);
               border-bottom:1px solid var(--tt-line-subtle); font-size:var(--tt-text-sm); }
  .projp-row--head { background:var(--tt-sunken); color:var(--tt-fg-muted); font-size:var(--tt-text-xs);
                     font-weight:var(--tt-weight-medium); }
  .projp-row--sub { padding-left:calc(var(--tt-space-4) + var(--tt-space-8)); }
  .projp-row--done .row-link { color:var(--tt-fg-muted); text-decoration:line-through; }
  .projp-row--add { display:block; }
  .projp-name { display:flex; align-items:center; gap:var(--tt-space-2); min-width:0; }
  .projp-name .row-link { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .projp-count, .projp-dim { color:var(--tt-fg-muted); font-size:var(--tt-text-xs); }
  .projp-subs { border-bottom:1px solid var(--tt-line-subtle); }
  .projp-subs-toggle { list-style:none; cursor:pointer; padding:var(--tt-space-1) var(--tt-space-4)
                       var(--tt-space-1) calc(var(--tt-space-4) + var(--tt-space-8));
                       font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .projp-subs-toggle::-webkit-details-marker { display:none; }
  .projp-subs-toggle:hover { color:var(--tt-fg); }
  .projp-subs-box[open] > .projp-subs-toggle { color:var(--tt-fg-muted); }
  .projp-sublist > .projp-row:last-child { border-bottom:0; }
  .projp-add { display:grid; grid-template-columns:minmax(0,1fr) 10rem 10rem auto; gap:var(--tt-space-2);
               align-items:center; }
  /* The select sizes to its longest name and the date box has its own width; each fills its track instead. */
  .projp-add > :is(.input, .select) { width:100%; min-width:0; max-width:none; }
  .projp-foot { padding:var(--tt-space-3) var(--tt-space-4); background:var(--tt-surface); }
  .projp-done { margin-top:var(--tt-space-4); }
  .projp-group { padding:var(--tt-space-4); }
  .projp-status { display:flex; }
  .projp-add--sub { padding:var(--tt-space-1) 0; }
  .work-subof { display:block; font-size:var(--tt-text-xs); color:var(--tt-fg-muted); }
  .projp-chip { display:inline-flex; align-items:center; padding:0 var(--tt-space-2); border-radius:var(--tt-radius-full);
                background:var(--tt-accent-soft); color:var(--tt-accent-text); font-size:var(--tt-text-xs);
                font-weight:var(--tt-weight-medium); text-decoration:none; }
  @media (max-width:760px) {
    .projp-row { grid-template-columns:minmax(0,1fr) auto; }
    .projp-row--head { display:none; }
    .projp-who { display:none; }
    .projp-due { display:none; }
    .projp-row--sub { padding-left:calc(var(--tt-space-4) + var(--tt-space-4)); }
    .projp-add { grid-template-columns:minmax(0,1fr) auto; }
    .projp-add-who, .projp-add-due { grid-column:1 / -1; }
  }
  /* A phone has no sidebar to pin to, and the bar has room only for the page's name and its one link. */
  @media (max-width:640px) { .projp-barpin { display:none; } }
}

/* FrameForge card on a franchise (connected apps V1, Figma 3221:3525): one status line per show. */
@layer bl-screens {
  .ffcard-head { display:flex; align-items:center; justify-content:space-between; gap:var(--tt-space-4); }
  .ffcard-head h2 { margin:0; }
  .ffcard-rows { margin:0; padding:0; list-style:none; }
  .ffcard-rows > li { border-top:1px solid var(--tt-line-subtle); }
  .ffcard-row { display:grid; grid-template-columns:minmax(0, 28%) minmax(0, 29%) minmax(0, 1fr);
                gap:var(--tt-space-4); padding:var(--tt-space-4) 0; color:var(--tt-fg); text-decoration:none; }
  .ffcard-row:hover .ffcard-name { text-decoration:underline; }
  .ffcard-row:focus-visible { outline:var(--focus-ring); outline-offset:var(--focus-offset); }
  .ffcard-col { display:flex; flex-direction:column; gap:var(--tt-space-1); min-width:0; }
  .ffcard-name { font-weight:var(--tt-weight-medium); }
  .ffcard-stage-name { display:flex; flex-wrap:wrap; align-items:center; gap:var(--tt-space-2);
                       font-weight:var(--tt-weight-medium); }
  .ffcard-sub, .ffcard-key { color:var(--tt-fg-muted); font-size:var(--tt-text-xs); }
  .ffcard-sub { margin:0; }
  .ffcard-alert { align-items:center; justify-content:space-between; gap:var(--tt-space-4); }
  .ffcard-alert p { margin:0; color:var(--tt-warn-text); font-weight:var(--tt-weight-medium); }
  .ffcard-alert .btn { flex:none; }
  .ffcard-unlinked { color:var(--tt-fg-muted); font-size:var(--tt-text-xs); }
  @media (max-width:640px) {
    .ffcard-row { grid-template-columns:minmax(0,1fr); gap:var(--tt-space-3); }
    .ffcard-col:last-child:empty { display:none; }
    .ffcard-alert { flex-direction:column; align-items:flex-start; }
  }
}

