/* collections.css (0.13.0): tables, lists, grids and boards, the six patterns Chris settled on 05/10/2026.
   README "Collections" has the decision tree (which pattern when) and the markup of each.

   Its OWN entry (`@gemboss/ui/collections.css`), loaded beside gemboss-ui.css, for two measured reasons:
   - the admin loads ui.css from its root layout, so every rule there is paid on every admin screen, under a first-load
     budget with no room (kit-plain.css says the same, 01/10/2026). The admin draws its tables with Polaris; nothing
     here is for it.
   - gemboss-ui.css had ~1.4 KB left under the 90 KB the export is held to (05/10/2026); these rules are several times
     that, and a page with no table, list or board should not download them.

   One owner per component (Gems/CLAUDE.md 9.3): `.ui-table` keeps its base in ui.css (it IS the Data table, Polaris
   DataTable's numbers since 0.12.0); this file owns every modifier and part named here, and nothing else.

   Numbers are Polaris 13.9.5 rendered in Chromium (Gems/_local/fleet/collections-2026-10/polaris-measured.json) and
   pinned in polaris-reference.json, which src/density.test.ts measures on the catalog.

   Not here, on purpose:
   - zebra rows. Polaris paints even rows #f7f7f7, the exact colour of its hover, so hover vanishes on half the rows
     (measured); the fleet used it 0 times. collections-gate.mjs reports a striped table.
   - row actions that appear on hover. A finger and a keyboard never see them. One button may stay visible, the rest go
     in the ⋯ menu (`ui-menu`).
   - an uppercase header (content-radar `.gtable`, 11/700): the header is 13/450 for both kinds (since 23/10/2026; the
     index header was 12/550). */

/* ── Shared tones, derived from the surface's own ink and paper so the dark theme follows. ──
   Mixed with --ui-text (#1b1c1e): 3.5% gives rgb(247,247,247) on white = Polaris bg-surface-secondary (hover, totals,
   footer, board columns; the index header's fill until 23/10/2026);
   6% gives rgb(241,241,241) = Polaris bg-surface-secondary-selected (a selected row). */
:root {
  --ui-coll-head-bg: color-mix(in srgb, var(--ui-text, #1b1c1e) 3.5%, var(--ui-surface, #fff));
  --ui-coll-hover: color-mix(in srgb, var(--ui-text, #1b1c1e) 3.5%, var(--ui-surface, #fff));
  --ui-coll-selected: color-mix(in srgb, var(--ui-text, #1b1c1e) 6%, var(--ui-surface, #fff));
  --ui-coll-check-w: 40px;
}

/* ══ 1 · Data table: `ui-table` (ui.css) + modifiers ═════════════════════════════════════════════════════════════════
   `<div class="ui-table-wrap"><table class="ui-table ui-table--sticky-first">…</table></div>`.
   - `--sticky-first`: the row's label column stays put while the wrap scrolls sideways (below 768 a data table SCROLLS,
     it never folds into a list; Chris 05/10/2026). An edge shadow appears once it has scrolled.
   - `--compact`: Polaris `increasedTableDensity` (rows 32, header 33), only for a table of more than 20 rows.
   - `tfoot.ui-table__totals` (650 on the secondary fill) and `.ui-table__footer` (source, "x of n") under the table.
   - `.ui-table-wrap--flush` (0.34.0): inside a card that is already the frame (DataTable `flush`, as ResourceList's):
     no border, radius or shadow of its own; a card around a framed wrap drew two frames (GemWatcher Ad Intel). Class
     doubled: `.ui-table-wrap` is in ui.css (the components part), and a bundle that loads this file first must not let
     it win back (GemWatcher's main.tsx recorded that inversion, 08/10/2026). The card clips its own corners
     (`overflow: hidden`): the last row's hover, the totals and the footer are square. */
.ui-table-wrap.ui-table-wrap--flush { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.ui-table--sticky-first tr { background: var(--ui-surface); }
@media (hover: hover) { .ui-table--sticky-first tbody tr:hover { background: var(--ui-surface-2); } }
.ui-table--sticky-first :is(th, td):first-child { position: sticky; left: 0; z-index: 1; background: inherit; }
@supports (animation-timeline: scroll()) {
  .ui-table-wrap:has(> .ui-table--sticky-first) { scroll-timeline: --ui-coll-x inline; }
  .ui-table--sticky-first :is(th, td):first-child { animation: ui-coll-edge linear both; animation-timeline: --ui-coll-x; animation-range: 0 24px; }
}
@keyframes ui-coll-edge { from { box-shadow: none; } to { box-shadow: 1px 0 0 var(--ui-border), 6px 0 8px -6px rgba(0, 0, 0, .18); } }
.ui-table--compact :is(td, tbody th) { padding-block: 6px; }
.ui-table--compact thead th { padding-block: 6px; }
.ui-table__totals > tr { background: var(--ui-coll-head-bg); }
.ui-table__totals > tr > :is(td, th) { background: var(--ui-coll-head-bg); font-weight: 650; color: var(--ui-text); border-top: 1px solid var(--ui-border); border-bottom: 0; }
.ui-table__footer { padding: 8px 12px; background: var(--ui-coll-head-bg); border-top: 1px solid var(--ui-border); color: var(--ui-text-muted); font-size: var(--ui-fs-body); text-align: center; }
/* A row header (`th scope=row class=ui-table__rowhead`) reads as a cell, as in Polaris DataTable's first column. A part of
   its own: ui.css keeps every other `th` muted (and on one line).
   0.16.0: it wraps like any other cell (Polaris `Cell--firstColumn` is `white-space: normal`); a column that must stay
   on one line says so with `truncate` (`ui-trunc`, the ellipsis, the whole text in `title`) or `ui-clamp-2`, the
   pattern's one rule for long content. 0.13.0 kept ui.css's `nowrap`, so a title + `ui-sub` row header ran one line as
   wide as its text and partner-radar wrapped it in a hand-made box (`cells.js`). A numeric row header stays on one line. */
.ui-table th.ui-table__rowhead { font-weight: 450; color: var(--ui-text); text-align: left; }
/* Wrapping, it would take the squeeze of a narrow frame alone (the other cells are short or one line) and fall to a word a
   line: 90px and eleven lines at 390. So it keeps Polaris's first-column width as a floor and the frame scrolls (a data
   table scrolls below 768, its first column sticky); `minWidth` on the column replaces the floor, and `minWidth: 0`
   removes it for a row header that is always short (a date, an id). */
/* 0.33.3: long tokens (an identifier in <code>, a URL) break inside the row header instead of widening it: a sticky first
   column 200px wide left ~85px for every other column in a 286px frame at 320 (GemFactory /framework, review #230). */
.ui-table th.ui-table__rowhead:not(.is-num) { white-space: normal; min-width: 9.0625rem; overflow-wrap: anywhere; }
/* A link alone on its line in a data table is a link in a LIST, 24px (WCAG 2.5.8), as ui.css makes `td > a`: the record's
   name in the row header, and an item of a list in a cell (the people of a company, its sources). A link in a sentence
   of a paragraph (`td > p > a`) keeps the text's line (WCAG's inline exception); CSS cannot tell a list item that is a
   sentence, whose link then becomes one unbroken box. 0.15.0 matched `td > a` only, so partner-radar set 24px by
   hand on 12 links (`cells.js` LINK24). */
.ui-table th.ui-table__rowhead > a, .ui-table:where(:not(.ui-table--index)) tbody :is(td, th) li > a { display: inline-flex; align-items: center; min-height: 24px; }
/* 0.16.0: a data table's cells sit at the TOP of their row, as Polaris DataTable's do (`verticalAlign` defaults to
   "top"; Polaris 13.9.5 Cell.js): a row with one cell of three lines reads from its first line, not from a value
   floating in the middle. (partner-radar /ops, /sources, /feed had their one-line cells centred against a three-line
   job.) The index table keeps `middle` (Polaris IndexTable; its cells are one line by rule). The header stays middle.
   Here and not in ui.css: the admin loads ui.css on every screen and draws no ui-table; ui.css keeps `middle` for a
   bare table on a page without this file. It weighs (0,1,2), just over ui.css's `.ui-table td`: a surface keeps
   `middle` with a rule of at least that weight (`.x-table tbody td`). */
.ui-table:where(:not(.ui-table--index)) tbody :is(td, th) { vertical-align: top; }
/* At the top of a cell a 24px link box puts its text 2-4px below the text of the cells beside it (its line is 20). Pulled
   back by half the difference, its text lines up; its box stays 24. `lh` is the cell's own line height, so this holds
   whatever line height the surface uses; a browser without `lh` drops the line and keeps the 2-4px. */
.ui-table:where(:not(.ui-table--index)) tbody :is(td > a, th.ui-table__rowhead > a, :is(td, th) li > a) { margin-block: calc((1lh - 24px) / 2); }

/* ── Sort, both table kinds: `<th aria-sort="ascending"><a class="ui-table__sort" href="?sort=name&dir=desc">Name</a></th>`
   (the order is in the URL: Back and a shared link keep it), or `<button type="button" class="ui-table__sort">` for a
   client sort (kit-plain.js `data-gb-sort="client"`, or React `onSort`). `aria-sort` sits on the th: none on a sortable
   column that is not the current one. One column at a time. The arrow is 16px; the target is 24px tall inside the 45px
   header (WCAG 2.5.8), 44 under a finger. */
.ui-table__sort {
  /* A block flex box, not inline: a 24px inline box with negative margins still grew the header's line box (45 → 46, 36 → 40). */
  display: flex; width: max-content; max-width: 100%; align-items: center; gap: 4px; min-height: 24px; margin-block: -2px; padding: 0; border: 0;
  background: none; color: inherit; font: inherit; text-align: inherit; text-decoration: none; cursor: pointer; white-space: nowrap;
}
@media (hover: hover) { .ui-table__sort:hover { color: var(--ui-text); } }
.ui-table__sort:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 2px; border-radius: 4px; }
.ui-table__sort::after {
  content: ""; flex: none; width: 16px; height: 16px; background: currentColor; opacity: 0;
  -webkit-mask: var(--ui-coll-arrow) center / 16px no-repeat; mask: var(--ui-coll-arrow) center / 16px no-repeat;
  --ui-coll-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3.5v9M4.5 9 8 12.5 11.5 9' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.ui-table__sort:is(:hover, :focus-visible)::after { opacity: .45; }
th[aria-sort="ascending"] > .ui-table__sort::after, th[aria-sort="descending"] > .ui-table__sort::after { opacity: 1; }
th[aria-sort="ascending"] > .ui-table__sort::after { transform: rotate(180deg); }
th[aria-sort="ascending"] > .ui-table__sort, th[aria-sort="descending"] > .ui-table__sort { color: var(--ui-text); }
.ui-table .is-num > .ui-table__sort { flex-direction: row-reverse; margin-left: auto; }

/* ── Long content (both table kinds and the lists): one line with an ellipsis, the whole text in `title` or on the
   detail page. `ui-trunc` caps a cell's text at --ui-trunc (default 32ch); `ui-clamp-2` allows two lines. */
.ui-trunc { display: block; max-width: var(--ui-trunc, 32ch); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-clamp-2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; white-space: normal; overflow-wrap: anywhere; }

/* ══ 2 · Index table: `ui-index > ui-table-wrap > table.ui-table.ui-table--index` ═══════════════════════════════════
   Header and cells as the data table's since 23/10/2026 (Chris: "GemPress's table reads lighter than Funnels"): the surface,
   13px regular, 12px above and below (45 tall), cells 8px 6px (a one-line row 37). It was Polaris IndexTable's grey band,
   12px / 550, 36 tall, over 6px cells: two looks for one thing, and the heavier one on the lists people open. The admin's
   Polaris IndexTables take the same in gemboss-shell.css (gemboss #5185).
   Row: `tr` with `data-href` (kit-plain.js) or `.is-linked` (React) = the WHOLE row opens the detail; the title stays a
   real link, `<a class="ui-table__title" href>`, for Cmd-click and screen readers. A row with two or more in-place
   editing controls is not linked (only its title is; collections-gate.mjs reports the other case).
   Cells stay on one line (ellipsis); the primary cell may add one `ui-sub` line, so a row is 37 to 59, never 119. */
.ui-index { position: relative; container: ui-index / inline-size; min-width: 0; }
.ui-table--index { font-size: var(--ui-fs-body); }
.ui-table--index tr { background: var(--ui-surface); }
/* The header and the cells take the data table's rules in ui.css (padding, size, weight, colour): one header by construction.
   Only what an index table adds is here: an opaque fill (the sticky select-all and label headers must hide the columns that
   scroll under them), a 20px line, no uppercase. */
.ui-table.ui-table--index thead th { background: var(--ui-surface); line-height: 20px; text-transform: none; letter-spacing: 0; }
.ui-table.ui-table--index :is(td, tbody th) { line-height: 20px; white-space: nowrap; vertical-align: middle; border-bottom: 0; border-top: 1px solid var(--ui-border); }
.ui-table.ui-table--index :is(th, td):where(:first-child) { padding-left: var(--ui-space-3); }
.ui-table.ui-table--index :is(th, td):where(:last-child) { padding-right: var(--ui-space-3); }
@media (hover: hover) { .ui-table--index tbody tr:hover { background: var(--ui-coll-hover); } }
.ui-table--index tbody tr:is(.is-selected, [aria-selected="true"]) { background: var(--ui-coll-selected); }
.ui-table--index tbody tr:is([data-href], .is-linked) { cursor: pointer; }
/* The row is the target: its focus ring is the row's, drawn when the title link has keyboard focus. */
.ui-table--index tbody tr:has(.ui-table__title:focus-visible) { outline: 2px solid var(--ui-focus); outline-offset: -2px; }
.ui-table__title:focus-visible { outline: none; }
.ui-table__primary { min-width: 0; }
.ui-table__primary-inner { display: flex; align-items: center; gap: var(--ui-space-3); min-width: 0; }
.ui-table__primary-text { min-width: 0; }
.ui-table__title {
  display: block; max-width: var(--ui-trunc, 40ch); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ui-text); font-weight: 650; text-decoration: none;
}
@media (hover: hover) { a.ui-table__title:hover { text-decoration: underline; } }
/* IndexTable primary column `wrap` (0.57.0): no 40ch cap, and the title wraps (a wrapped line has no "…" to show). */
.ui-table__primary--wrap { --ui-trunc: none; }
.ui-table__primary--wrap .ui-table__title { white-space: normal; }
.ui-table--index .ui-table__title + .ui-sub, .ui-table--index .ui-sub { display: block; max-width: var(--ui-trunc, 40ch); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 0; line-height: 16px; }
/* `ui-table td > a` (ui.css) makes a cell link inline-flex 24px; the title is a block with an ellipsis instead. */
.ui-table--index td > a.ui-table__title { display: block; min-height: 0; }
.ui-table--index td > .ui-table__primary-inner > a.ui-table__title, .ui-table--index .ui-table__primary-text > a.ui-table__title { line-height: 20px; }

/* Checkbox column: 40px, sticky at the left edge, like the label column after it while the wrap scrolls. */
/* The rows' and the header's own block padding (the data table's, ui.css), 8 to the label and 12 from the edge (Polaris). */
.ui-table.ui-table--index .ui-table__check { width: var(--ui-coll-check-w); padding: var(--ui-space-2) 8px var(--ui-space-2) var(--ui-space-3); }
.ui-table.ui-table--index thead .ui-table__check { padding-block: var(--ui-space-3); }
.ui-table__checkbox { display: flex; width: max-content; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; margin: -2px 0; cursor: pointer; }
/* The box itself, one rule for both collections that select (a list's `.ui-list__check`, 0.16.0). */
.ui-table__checkbox > input, .ui-list__check > input { width: 16px; height: 16px; margin: 0; accent-color: var(--ui-accent); cursor: pointer; }
.ui-table__checkbox > input:focus-visible, .ui-list__check > input:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 2px; }
.ui-table--index :is(.ui-table__check, .ui-table__primary) { position: sticky; z-index: 1; background: inherit; }
.ui-table--index .ui-table__check { left: 0; }
.ui-table--index .ui-table__primary { left: 0; }
.ui-table--index:has(.ui-table__check) .ui-table__primary { left: var(--ui-coll-check-w); }
.ui-table__actions { width: 1%; text-align: right; }
.ui-table__actions > * { vertical-align: middle; }
.ui-row-actions { display: inline-flex; align-items: center; gap: var(--ui-space-2); }

/* Bulk bar: replaces the header row while rows are selected (Polaris: 36px, in the header's place), so selecting the
   first row does not move the table. 38 here (a selectable resource list's bar); an index table's is 46 below = the wrap's
   top line + the 45px header; padding 4 (Polaris 6) because the kit's small button is 28 tall. `<div class="ui-bulkbar" hidden>` right before the wrap; kit-plain.js / React show
   it. It carries its own select-all box, because the folded list below 768 has no header. */
.ui-bulkbar {
  position: relative; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: var(--ui-space-2);
  box-sizing: border-box; min-height: 38px; margin-bottom: -38px; padding: 4px 8px 4px 12px;
  background: var(--ui-surface); border: 1px solid var(--ui-border); border-bottom-color: transparent; border-radius: var(--ui-radius-lg) var(--ui-radius-lg) 0 0;
  font-size: var(--ui-fs-body);
}
.ui-bulkbar[hidden] { display: none; }
/* An index table's bar, anywhere in it (a toolbar may wrap it): the wrap's top line + the 45px header. */
.ui-index .ui-bulkbar { min-height: 46px; margin-bottom: -46px; }
/* IndexTable `flush` (`.ui-index--flush`, 23/10/2026): in a card that is already the frame. The table has no frame of its own,
   so the bar covers the header's 45px (44.5 measured) and no more: its own bottom rule, drawn, takes the place of the header's
   bottom border, and the line under the bar reads as it does with no bar (the first row's top border under it). */
.ui-index--flush .ui-bulkbar { min-height: 45px; margin-bottom: -45px; border-width: 0 0 1px; border-bottom-color: var(--ui-border); border-radius: 0; }
.ui-bulkbar__count { flex: none; font-weight: 550; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ui-bulkbar__actions { display: inline-flex; flex-wrap: wrap; gap: var(--ui-space-2); margin-left: auto; }
.ui-bulkbar .ui-table__checkbox { margin-right: 4px; }
/* 0.33.0: ONE row. React measures the buttons (`.ui-bulkbar__measure`, a hidden copy) and puts what does not fit into a
   ⋯ menu at the end (`.ui-bulkbar__more`); five actions wrapped the bar to three rows at 390 (talent-radar /pool,
   10/10/2026). `data-fit="pending"` = not measured yet (server render, before hydration): no wrapping, the overflow is
   clipped for that moment rather than pushing the rows down and back up. The count never wraps or shrinks (above): a
   "0 / selected" squeezed onto two lines there read 12px short and let one button too many through (review #3965). */
.ui-bulkbar[data-fit="pending"] { flex-wrap: nowrap; }
.ui-bulkbar[data-fit="pending"] > .ui-bulkbar__actions { flex: 0 1 auto; flex-wrap: nowrap; min-width: 0; overflow: hidden; }
.ui-bulkbar__actions > .ui-bulkbar__more { flex: none; }
.ui-bulkbar__measure {
  position: absolute; top: 0; left: 0; display: inline-flex; gap: var(--ui-space-2); height: 0; overflow: hidden;
  visibility: hidden; pointer-events: none; white-space: nowrap;
}
.ui-bulkbar__measure > * { flex: none; }

/* Sort below 768: the header is gone, so a row of chips (`ui-chip`, aria-current on the active one) takes its place. */
.ui-index__sortbar { display: none; }

/* ── Folded: the index table becomes a list when ITS CONTAINER is 768 or narrower (Chris 05/10/2026). A container,
   not the viewport: right of a 240px rail a 1024px window leaves ~750px. The primary cell is the title line; the other
   cells follow on one wrapped line in caption size (`data-label` prefixes a value with its column name); a cell marked
   `data-condensed="hide"` is left out; checkbox and actions keep their places. Polaris `condensed`: rows 44 and up. */
@container ui-index (max-width: 768px) {
  .ui-table--index, .ui-table--index tbody { display: block; width: 100%; }
  .ui-table--index thead { display: none; }
  .ui-table--index tbody tr {
    position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px;
    min-height: 44px; box-sizing: border-box; padding: 10px 12px; border-top: 1px solid var(--ui-border);
  }
  .ui-table--index tbody tr:first-child { border-top: 0; }
  .ui-table--index tbody tr:has(> .ui-table__check) { padding-left: 48px; }
  .ui-table.ui-table--index tbody :is(td, th) { display: block; padding: 0; border: 0; position: static; background: none; white-space: nowrap; }
  /* `.ui-table.` too: (0,2,1) lost to the nowrap on every cell above (0,2,2), so free text under a title (GemPress's
     "missing: …" note, 384px at 320 on GemPress) and an unlinked title widened the row and scrolled the list sideways. A
     linked title (`.ui-table__title`) and its second line keep their own nowrap and cut; a token too long for the row (a
     URL, a slug) breaks anywhere. */
  .ui-table.ui-table--index tbody .ui-table__primary { flex: 1 0 100%; white-space: normal; overflow-wrap: anywhere; }
  .ui-table--index tbody td:not(.ui-table__primary, .ui-table__check, .ui-table__actions) { flex: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; color: var(--ui-text-muted); font-size: var(--ui-fs-caption); line-height: 18px; }
  .ui-table--index tbody td[data-label]:not(.ui-table__primary)::before { content: attr(data-label) " "; color: var(--ui-text-muted); }
  /* A capped value or a second line in a folded cell stays on the caption line (block, they broke "In" from its value). */
  .ui-table--index tbody td:not(.ui-table__primary, .ui-table__check, .ui-table__actions) .ui-trunc { display: inline-block; vertical-align: bottom; }
  .ui-table--index tbody td:not(.ui-table__primary, .ui-table__check, .ui-table__actions) .ui-sub { display: inline; margin-left: 6px; }
  .ui-table--index tbody td.is-num { text-align: left; }
  .ui-table--index tbody td[data-condensed="hide"] { display: none; }
  .ui-table.ui-table--index tbody .ui-table__check { position: absolute; left: 4px; top: 4px; width: auto; padding: 0; }
  /* Actions follow the second line, pushed right (absolute over the title, they covered it at 390). */
  .ui-table.ui-table--index tbody .ui-table__actions { order: 99; margin-left: auto; width: auto; padding: 0; align-self: center; }
  .ui-table--index .ui-table__checkbox { min-width: 44px; min-height: 44px; margin: 0; }
  /* The `title + .ui-sub` selector too (0.33.3): the cap above is (0,3,0) and won against a (0,2,0) reset, so a folded row
     still cut its second line at 40ch at any width (GemFactory Trash, review #230). */
  .ui-table--index .ui-table__title, .ui-table--index .ui-sub, .ui-table--index .ui-table__title + .ui-sub { max-width: none; }
  /* A folded row's title is a link in a list: 24px at least (Gems/CLAUDE.md 9.1, WCAG 2.5.8). Its line is 20px; 2px above and
     below make the box 24 and the negative margin keeps every line where it was (0.35.2; visual-gate tap_target_link on every
     folded index table, partner-radar /companies, /invites, /posts, 12/10/2026). Drawn above the line under it: the 2px it
     reaches into that line are the link's for a press, not the second line's (review #4096). A press anywhere else on the row
     still opens it through the script (kit-plain.js / IndexTable), not through an overlay: text in the row stays selectable. */
  .ui-table--index tbody a.ui-table__title { position: relative; z-index: 1; padding-block: 2px; margin-block: -2px; }
  .ui-index__sortbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ui-space-2); margin: 0 0 var(--ui-space-3); font-size: var(--ui-fs-caption); color: var(--ui-text-muted); }
  .ui-index .ui-bulkbar { min-height: 38px; margin-bottom: var(--ui-space-2); border-bottom-color: var(--ui-border); border-radius: var(--ui-radius-lg); }
  .ui-index .ui-table-wrap { overflow-x: visible; }
  /* Folded in a card (`flush`): the bar is the list's head, its rule on the first row (no 8px gap), and the sort chips sit
     inside the card as the rows do (12px), not against its edge. */
  .ui-index--flush .ui-bulkbar { margin-bottom: 0; border-radius: 0; }
  .ui-index--flush > .ui-index__sortbar { padding: var(--ui-space-2) 12px 0; }
}

/* ══ 3 · Resource list: `ul.ui-list > li.ui-list__item` ════════════════════════════════════════════════════════════
   Polaris ResourceItem: 12 on every side, 12 between media and text, two 20px lines = a 64px row. The whole row is the
   title's link (an overlay on `a.ui-list__title`, as ResourceItem's own); every other control in the row sits above it.
   Slots: `__media` (Avatar 24/32/40 or `ui-thumb`, one size per list) · `__body` > `__title` (one line) + `__sub`
   (two lines at most) + `__meta` (12px) + `__badges` (three, then "+N") · `__aside` (a score, a count) · `__actions`
   (one button + ⋯). Never a `ui-card` per row: the list is the card. */
.ui-list {
  container: ui-list / inline-size; margin: 0; padding: 0; list-style: none;
  background: var(--ui-surface); border: 1px solid var(--ui-border); border-radius: var(--ui-radius-lg); box-shadow: var(--ui-card-shadow);
}
.ui-list--flush { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.ui-list__item {
  position: relative; display: flex; align-items: flex-start; gap: var(--ui-space-3);
  box-sizing: border-box; padding: var(--ui-space-3); min-height: 44px; border-top: 1px solid var(--ui-border);
}
.ui-list > .ui-list__item:first-child { border-top: 0; }
.ui-list > .ui-list__item:first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.ui-list > .ui-list__item:last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
/* Child combinators (0.34.0): a row's OWN title, not one in a list nested in its open panel (a DisclosureItem's group). */
@media (hover: hover) { .ui-list__item:has(> .ui-list__body > .ui-list__title[href]):hover { background: var(--ui-coll-hover); } }
.ui-list__item:is(.is-selected, [aria-selected="true"]) { background: var(--ui-coll-selected); }
.ui-list__item:has(> .ui-list__body > .ui-list__title:focus-visible) { outline: 2px solid var(--ui-focus); outline-offset: -2px; }
.ui-list__media { flex: none; display: flex; align-items: center; min-height: 40px; }
.ui-list__body { flex: 1 1 auto; min-width: 0; }
.ui-list__title {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ui-text); font-size: var(--ui-fs-body); line-height: 20px; font-weight: 650; text-decoration: none;
}
.ui-list__title[href]::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.ui-list__title:focus-visible { outline: none; }
/* `--ui-list-sub-lines` (0.57.0, ResourceList `subtitleLines`): how many lines show; `none` = the whole subtitle. */
.ui-list__sub { margin: 0; color: var(--ui-text-muted); font-size: var(--ui-fs-body); line-height: 20px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--ui-list-sub-lines, 2); line-clamp: var(--ui-list-sub-lines, 2); overflow: hidden; overflow-wrap: anywhere; }
.ui-list__meta { margin: 2px 0 0; color: var(--ui-text-muted); font-size: var(--ui-fs-caption); line-height: 16px; }
.ui-list__badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ui-list__aside { flex: none; align-self: center; color: var(--ui-text); font-variant-numeric: tabular-nums; text-align: right; }
.ui-list__actions { flex: none; align-self: center; display: inline-flex; align-items: center; gap: var(--ui-space-2); }
/* Every control in a row is above the row's link: a checkbox, a button, the ⋯ menu, a second link. */
.ui-list__item :is(.ui-list__actions, .ui-list__aside a, .ui-list__body a:not(.ui-list__title), button, input, select, textarea, label, summary, details) { position: relative; z-index: 1; }
/* A text link beside a row ("Profile →", "Live page ↗") is a link in a list: 24px tall, WCAG 2.5.8 (0.34.3). It was the
   line's 20px unless each surface remembered (GemWatcher's old ExpandableRow did; its DisclosureItem did not, review #437). */
.ui-list__item > :is(.ui-list__actions, .ui-list__aside) a:not(.ui-btn) { display: inline-flex; align-items: center; min-height: 24px; }
/* Narrow (the LIST's own frame is 400 or less: a phone, a side column, a drawer). One rule, whatever the row holds:
   the body stays beside the media and takes all the width right of it; the aside and the actions share ONE line under
   the body, starting at the body's edge (aside left, actions right); the media spans both lines. A row without media
   gives the body the whole width. A body that is only its title (one line, already cut with "…") has nothing to make
   room for, so its aside and actions stay on that line, as in a wide frame.
   0.13.0 wrapped the flex row instead, so a long subtitle (the body's max-content) pushed the body under the media and
   the aside and the actions took a line each: partner-radar /hot 221 → 284 at 390. Giving the body `flex: 1 1 0` kept
   it beside the media but put the actions beside it too, narrowing it, and a body of many meta lines grew
   (/ugc-operators 308 → 332 at 320). The grid does neither. 0.15.0.
   The gaps are margins, not column-gap: an empty media column is then 0 wide with no gap, and no :has() is needed.
   The row's direct children are these four slots (a selection checkbox goes inside `__media`, as in Polaris). The
   loading skeleton keeps its own row. */
@container ui-list (max-width: 400px) {
  .ui-list:not(.ui-list--compact, .ui-skeleton--list) > .ui-list__item {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "media body body" "media aside actions";
    gap: 0; align-items: start;
  }
  .ui-list:not(.ui-list--compact, .ui-skeleton--list) > .ui-list__item > .ui-list__media { grid-area: media; margin-inline-end: var(--ui-space-3); }
  .ui-list:not(.ui-list--compact, .ui-skeleton--list) > .ui-list__item > .ui-list__body { grid-area: body; }
  /* 4 above the second line, as above the badges; the line exists only when the row has an aside or actions. */
  .ui-list:not(.ui-list--compact, .ui-skeleton--list) > .ui-list__item > .ui-list__aside { grid-area: aside; justify-self: start; align-self: center; margin-top: 4px; text-align: left; }
  .ui-list:not(.ui-list--compact, .ui-skeleton--list) > .ui-list__item > .ui-list__actions { grid-area: actions; justify-self: end; align-self: center; margin: 4px 0 0 var(--ui-space-3); }
  /* A DisclosureItem's body IS a button: its second band sits 8px under it (0.34.3), §9.1's gap between two targets when
     one is under 44 ("Profile →" was 4px under the toggle in GemWatcher's Feed, review #437). A ResourceItem keeps 4: its
     body is not a target of its own (the title's link covers the whole row). */
  .ui-list:not(.ui-list--compact, .ui-skeleton--list) > .ui-list__item--disclosure > :is(.ui-list__aside, .ui-list__actions) { margin-top: 8px; }
  /* A one-line body: one band. Without :has() support this falls back to the two lines above (taller, never broken). */
  .ui-list:not(.ui-list--compact, .ui-skeleton--list) > .ui-list__item:has(> .ui-list__body > .ui-list__title:only-child) {
    grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "media body aside actions"; align-items: center;
  }
  .ui-list:not(.ui-list--compact, .ui-skeleton--list) > .ui-list__item:has(> .ui-list__body > .ui-list__title:only-child) > :is(.ui-list__aside, .ui-list__actions) { margin-top: 0; }
  .ui-list:not(.ui-list--compact, .ui-skeleton--list) > .ui-list__item:has(> .ui-list__body > .ui-list__title:only-child) > .ui-list__aside { margin-inline-start: var(--ui-space-3); text-align: right; }
  /* A disclosure row's panel (0.34.0) takes every column, on a row of its own. */
  .ui-list:not(.ui-list--compact, .ui-skeleton--list) > .ui-list__item > .ui-list__panel { grid-column: 1 / -1; }
}
/* ── Disclosure row (0.34.0, React `DisclosureItem`): a row that opens IN PLACE (a group and its detail), not a page.
   `li.ui-list__item--disclosure > [.ui-list__media] + button.ui-list__body.ui-list__toggle[aria-expanded][aria-controls]
   (span.ui-list__title > span.ui-list__chev, span.ui-list__sub, span.ui-list__meta, span.ui-list__badges) + [.ui-list__aside]
   + [.ui-list__actions] + div.ui-list__panel[role=region]`. The body is the target (no stretched link: it would cover the
   open panel); media, aside and actions stay outside the button. The panel wraps under the row, full width. */
.ui-list__item--disclosure { flex-wrap: wrap; }
.ui-list__toggle {
  display: block; flex: 1 1 0; min-width: 0; min-height: 24px; margin: 0; padding: 0; border: 0; border-radius: var(--ui-radius-sm, 4px);
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.ui-list__toggle:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 2px; }
.ui-list__toggle > .ui-list__meta { display: block; }
/* Hover shades a CLOSED row, and only where hover is real (a tap leaves :hover stuck on touch screens, shading the open
   panel and ringing the timeline dots white). */
@media (hover: hover) { .ui-list__item--disclosure:not(.is-open):has(> .ui-list__toggle:hover) { background: var(--ui-coll-hover); } }
.ui-list__chev {
  display: inline-block; width: 16px; height: 16px; margin: 0 4px 0 -2px; vertical-align: -3px; background: var(--ui-text-muted);
  -webkit-mask: var(--ui-chev) center / 16px no-repeat; mask: var(--ui-chev) center / 16px no-repeat; transition: transform .15s;
  --ui-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 4l4 4-4 4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.ui-list__item--disclosure.is-open > .ui-list__toggle .ui-list__chev { transform: rotate(90deg); }
/* Forced colours drop mask-image backgrounds: draw the chevron in the system text colour. */
@media (forced-colors: active) { .ui-list__chev { forced-color-adjust: none; background: CanvasText; } }
.ui-list__panel { flex: 1 0 100%; min-width: 0; margin-top: var(--ui-space-2); }
.ui-list__panel[hidden] { display: none; }
@media (pointer: coarse), (max-width: 47.9975em) { .ui-list__toggle { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .ui-list__chev { transition: none; } }
/* ── Selection in a resource list (0.16.0, React `SelectableResourceList`): `div.ui-resource > div.ui-bulkbar + ul.ui-list`,
   each row's box `label.ui-list__check > input[type=checkbox]` FIRST in `__media` (Polaris ResourceItem's place). The bar
   is the list's header, there from the start ("0 selected", actions disabled): a list has no header for it to cover,
   and a bar that appears on the first check pushes every row down under the finger choosing them (talent-radar /pool,
   74px at 1280 and 194px at 390, 03/10/2026). The bar and the list are one frame. The box is a control: 24 under a
   mouse, 44 under a finger or at phone width, pulled into the row's padding so the media does not move right by 20. */
.ui-resource > .ui-bulkbar { margin-bottom: 0; border-bottom-color: var(--ui-border); }
.ui-resource > .ui-bulkbar:has(+ .ui-list--flush) { border-width: 0 0 1px; border-radius: 0; }
.ui-resource > .ui-list, .ui-resource > [aria-busy] > .ui-list { border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
.ui-list__check { display: flex; flex: none; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; cursor: pointer; }
.ui-list__check:not(:last-child) { margin-inline-end: 8px; } /* 4 inside the box + 8 = 12 to the media, as a row's gap */
@media (pointer: coarse), (max-width: 47.9975em) {
  .ui-list__check { min-width: 44px; min-height: 44px; margin-block: -2px; margin-inline-start: -12px; }
  .ui-list__check:not(:last-child) { margin-inline-end: -2px; }
  .ui-resource > .ui-bulkbar > .ui-table__checkbox { min-width: 44px; min-height: 44px; margin: -8px -8px -8px -12px; }
}

/* Thumbnail (Polaris Thumbnail): 24 · 40 (default) · 60 · 80, radius 8 (6 at 24), a 1px line, cropped to fill. */
.ui-thumb { display: block; flex: none; width: 40px; height: 40px; box-sizing: border-box; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-md); background: var(--ui-surface-2); overflow: hidden; object-fit: cover; }
.ui-thumb--xs { width: 24px; height: 24px; border-radius: var(--ui-radius-sm); }
.ui-thumb--md { width: 60px; height: 60px; }
.ui-thumb--lg { width: 80px; height: 80px; }
.ui-thumb > img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ══ 4 · Compact list: `ul.ui-list.ui-list--compact > li.ui-list__item > a|button|div.ui-list__row` ══════════════════
   One line per item: an icon or dot (16-20) · the label (ellipsis) · meta on the right (a time, a count) · a chevron or
   one button. 36 under a mouse, 44 under a finger or at phone width (a control; Gems/CLAUDE.md 9.1). */
.ui-list--compact > .ui-list__item { display: block; padding: 0; min-height: 0; }
.ui-list__row {
  display: flex; align-items: center; gap: var(--ui-space-2); box-sizing: border-box; width: 100%; min-height: 36px; padding: 8px 12px;
  border: 0; background: none; color: var(--ui-text); font: inherit; font-size: var(--ui-fs-body); line-height: 20px; text-align: left; text-decoration: none;
  border-radius: inherit;
}
:is(a, button).ui-list__row { cursor: pointer; }
@media (hover: hover) { :is(a, button).ui-list__row:hover { background: var(--ui-coll-hover); } }
:is(a, button).ui-list__row:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: -2px; }
.ui-list__row[aria-current="page"], .ui-list__row.is-selected { background: var(--ui-coll-selected); }
.ui-list__icon { flex: none; display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; color: var(--ui-text-muted); }
.ui-list__icon > svg { width: 16px; height: 16px; }
.ui-list__label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-list__row > .ui-list__meta { flex: none; margin: 0; font-variant-numeric: tabular-nums; }
@media (pointer: coarse), (max-width: 47.9975em) { .ui-list__row { min-height: 44px; } }

/* `--activity`: a timeline. A 20px rail on the left (an 8px dot on a 1px line), the event, one line of detail, an
   optional body (`__content`), the time.
   One shape for the six timelines the admin drew, partner-radar `.tl`, talent-radar `.tr-rows`, GemFactory `.gf-hist`.
   Tone the dot: `ui-list__dot--success | --warning | --critical | --info`. */
.ui-list--activity > .ui-list__item { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; column-gap: var(--ui-space-2); align-items: start; padding: 8px 12px; min-height: 36px; border-top: 0; }
.ui-list--activity > .ui-list__item::before { content: ""; position: absolute; left: 21.5px; top: 0; bottom: 0; width: 1px; background: var(--ui-border); }
.ui-list--activity > .ui-list__item:first-child::before { top: 14px; }
.ui-list--activity > .ui-list__item:last-child::before { bottom: calc(100% - 14px); }
.ui-list--activity > .ui-list__item:only-child::before { display: none; }
/* Unreleased: an item's `icon` in the dot's place, over the rail (opaque and positioned, as the dot is). */
.ui-list--activity .ui-list__icon { position: relative; z-index: 1; background: var(--ui-surface); }
.ui-list__dot { position: relative; z-index: 1; width: 8px; height: 8px; margin: 6px 0 0 6px; border-radius: 50%; background: var(--ui-text-muted); box-shadow: 0 0 0 3px var(--ui-surface); }
.ui-list__dot--success { background: var(--gemboss-success, #0a8f6a); }
.ui-list__dot--warning { background: var(--gemboss-warning, #b25e09); }
.ui-list__dot--critical { background: var(--gemboss-danger-strong, #c70a24); }
.ui-list__dot--info { background: var(--gemboss-accent, #5661f5); }
.ui-list--activity .ui-list__label { display: block; white-space: nowrap; }
/* 0.33.0: a LINKED activity label (CompactItem.href) is the item's name, not a link in running text: text colour with an
   underline on hover (Polaris's monochrome link), and a 24px box for a finger (WCAG 2.5.8, links in a list) whose 2px
   padding is pulled back by a negative margin, so the row is as tall as an unlinked one. It was the browser's blue and
   20px: talent-radar /activity, 71 links under 24 at 320 and 390 (10/10/2026). `position: relative` puts the padding
   above the detail line the negative margin pulls up, or its bottom 2px went to the detail (review #3965). */
.ui-list--activity a.ui-list__label { position: relative; color: var(--ui-text); text-decoration: none; padding-block: 2px; margin-block: -2px; }
@media (hover: hover) { .ui-list--activity a.ui-list__label:hover { text-decoration: underline; } }
.ui-list--activity a.ui-list__label:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 0; border-radius: 4px; }
.ui-list--activity .ui-list__detail { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ui-text-muted); font-size: var(--ui-fs-caption); line-height: 16px; }
.ui-list--activity time, .ui-list--activity .ui-list__time { color: var(--ui-text-muted); font-size: var(--ui-fs-caption); line-height: 20px; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* `.ui-list__content` (0.15.0, `CompactItem.body`): the event's own text under the label and the detail (a meeting
   summary, the note as written, a post). Body size, wraps, never cut: it is what the reader opened the timeline for. */
.ui-list__content { margin-top: 4px; color: var(--ui-text); font-size: var(--ui-fs-body); line-height: 20px; overflow-wrap: anywhere; }
.ui-list__content > p { margin: 0; }
.ui-list__content > p + p { margin-top: 4px; }
/* `--wrap` (0.15.0, `CompactList wrap`): the label and the detail wrap instead of ending in "…". The cut text's `title`
   cannot be read under a finger, so a list whose label or detail carries data (a company, a colleague's link, who wrote
   it) wraps; a list of short labels (a side rail) keeps one line. Either variant. */
/* The list's OWN rows (0.34.0): a list nested in a wrap list's open panel keeps its own setting. Every row shape puts these one
   level under a child of the li: li > a.ui-list__row > .ui-list__label, li > div > .ui-list__label / __detail (activity),
   li > .ui-list__body > .ui-list__title (ResourceItem, DisclosureItem's button). */
.ui-list--wrap > .ui-list__item > * > :is(.ui-list__label, .ui-list__detail, .ui-list__title) { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.ui-list--wrap > .ui-list__item > .ui-list__row { align-items: flex-start; }
/* Top-aligned (the icon and the meta stay on the first line of a wrapped label), so a one-line label is centred in the
   44px touch row by its padding: 12 + 20 + 12. */
@media (pointer: coarse), (max-width: 47.9975em) { .ui-list--wrap > .ui-list__item > .ui-list__row { padding-block: 12px; } }
.ui-list--wrap > .ui-list__item > .ui-list__row > .ui-list__meta { line-height: 20px; }

/* ══ 5 · Card grid: `div.ui-cardgrid[data-min="200|240|320"] > article.ui-card.ui-card--media` ═════════════════════
   The picture is what people choose by. auto-fill with ONE of three minimum widths (240 by default), 16 apart (Polaris
   InlineGrid gap 400): the column count follows the room, never a media query on the viewport (admin's
   `.gemboss-theme-grid` was repeat(3) by viewport and left ~201px cards at 768; since 06/10/2026 it copies this rule,
   because the admin stays on Polaris and does not load collections.css). The card and its parts (`__link`, `__menu`, `__meta`,
   `data-ratio`) are the media card's, so they live with it in kit-plain.css (one owner, Gems/CLAUDE.md 9.3). */
.ui-cardgrid { --ui-cardgrid-min: 240px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--ui-cardgrid-min), 100%), 1fr)); gap: var(--ui-space-4); margin: 0; padding: 0; list-style: none; }
.ui-cardgrid[data-min="200"] { --ui-cardgrid-min: 200px; }
.ui-cardgrid[data-min="320"] { --ui-cardgrid-min: 320px; }
.ui-cardgrid > * { min-width: 0; }

/* ══ 6 · Board: `div.ui-board > section.ui-board__col` ═════════════════════════════════════════════════════════════
   Items that move through fixed states (six columns at most) and people move them. Column: `header.ui-board__head`
   (a tone dot, the name, the count) · `ol.ui-board__list` of cards · after 12 cards `details.ui-board__more` ("Show 24
   more", nested for each further 24; no script). An empty column says so and stays: it is where a card goes.
   Moving a card (0.18.0, optional: `onMove` / `data-gb-move`) is a drag OR the keyboard (Space, arrows, Space), said in a
   live region; a finger cannot drag (no HTML drag on a phone), so keep a way that is not dragging (a select or the
   card's ⋯ menu).
   Columns are at least 240 and share the room; at phone width each is 78% of the board and they snap while it scrolls
   sideways; they never stack. `minColumn`: the board sets `--ui-board-col` (its own width shared by the columns, down to the
   floor) and the columns are at least that instead; below the floor it scrolls. One custom property, not a rule (kit weight). */
.ui-board {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(var(--ui-board-col, 240px), 1fr); gap: var(--ui-space-4);
  align-items: start; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding-bottom: 4px;
}
/* Phone width: a column is 78% of the board, so the next one peeks in; columns are states, their number never changes. */
@media (max-width: 47.9975em) { .ui-board { grid-auto-columns: 78%; } }
.ui-board__col { display: flex; flex-direction: column; gap: var(--ui-space-2); min-width: 0; padding: var(--ui-space-2); scroll-snap-align: start; background: var(--ui-coll-head-bg); border-radius: var(--ui-radius-lg); }
.ui-board__head { display: flex; align-items: center; gap: var(--ui-space-2); min-height: 28px; padding: 0 4px; font-size: var(--ui-fs-body); font-weight: 650; }
.ui-board__name { min-width: 0; margin: 0; font: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* font + margin: the same look as an h2/h3/h4 (columnHeading, 0.33.5) */
.ui-board__count { margin-left: auto; color: var(--ui-text-muted); font-weight: 450; font-variant-numeric: tabular-nums; }
.ui-board__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ui-text-muted); }
.ui-board__dot--success { background: var(--gemboss-success, #0a8f6a); }
.ui-board__dot--warning { background: var(--gemboss-warning, #b25e09); }
.ui-board__dot--critical { background: var(--gemboss-danger-strong, #c70a24); }
.ui-board__dot--info { background: var(--gemboss-accent, #5661f5); }
.ui-board__list { display: grid; gap: var(--ui-space-2); margin: 0; padding: 0; list-style: none; }
.ui-board__list > li { min-width: 0; }
.ui-board__empty { margin: 0; padding: var(--ui-space-4) var(--ui-space-2); color: var(--ui-text-muted); font-size: var(--ui-fs-body); text-align: center; border: 1px dashed var(--ui-border); border-radius: var(--ui-radius-md); }
/* No `width: fit-content`: the column's grid centres the summary and sizes it to its words (justify-self). Under a finger the kit draws a
   button with `::before`, which inherits its width, and fit-content of that empty pseudo-element is 0: "5 more" on Operator › Plan was a
   thin line through its words (prod, 390, 19/11/2026). */
.ui-board__more > summary { list-style: none; justify-self: center; margin: 4px auto 0; }
.ui-board__more > summary::-webkit-details-marker { display: none; }
.ui-board__more[open] > summary { display: none; }
.ui-board__more { display: grid; gap: var(--ui-space-2); }
/* 0.18.0, server paging (`hasMore` / `moreHref`): the column shows what the server sent and ends in ONE `ui-more` row
   that asks for the next page (`a[data-gb-more]`, kit-plain.js appends in place), so a board of 2,000 cards does not put
   2,000 cards in the HTML. Tighter than a feed's `ui-more` (16px above and below): it sits in the column, 4px under the
   last card like the `<details>` button. */
.ui-board__next.ui-more { padding: 4px 0 0; }
.ui-board__next .ui-more__error { color: var(--gemboss-danger-strong, #c70a24); }
/* 0.18.0, moving cards (`.ui-board[data-gb-move]`, board-move.ts / kit-plain.js). A card is a stop in the Tab order
   (Space picks it up) and a drag source; while one is held, the target column is tinted and a 2px line shows where it
   lands (`data-gb-drop` before / after a card), nothing in the DOM moves until the drop. */
.ui-board[data-gb-move] .ui-board__list > li[data-id] { position: relative; border-radius: var(--ui-radius-lg); cursor: grab; }
.ui-board[data-gb-move] .ui-board__list > li[data-id]:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 2px; }
.ui-board__list > li[data-gb-lifted] { outline: 2px solid var(--ui-focus); outline-offset: 2px; box-shadow: var(--gemboss-shadow-raised); border-radius: var(--ui-radius-lg); }
.ui-board[data-gb-dragging] .ui-board__list > li[data-gb-lifted] { outline: 0; opacity: .4; }
.ui-board__col[data-gb-over] { background: color-mix(in srgb, var(--ui-focus) 10%, var(--ui-coll-head-bg)); }
.ui-board__list > li[data-gb-drop]::before { content: ""; position: absolute; left: 0; right: 0; height: 2px; border-radius: 1px; background: var(--ui-focus); pointer-events: none; }
.ui-board__list > li[data-gb-drop="before"]::before { top: -5px; }
.ui-board__list > li[data-gb-drop="after"]::before { bottom: -5px; }

/* ══ States (Gems/CLAUDE.md 9.2), every pattern ════════════════════════════════════════════════════════════════════
   empty (`ui-empty`, ui.css) · no match (`ui-empty--no-match`: the header and the filters stay, "Clear filters") ·
   loading (`ui-skeleton--table|--list|--compact|--grid|--board`, the shape of the pattern) · reloading (`aria-busy` on
   the collection: the old rows stay, dimmed) · error (`ui-coll-error`: a banner in the frame + Retry; with old data,
   "as of HH:MM") · selected · sort · filter (`ui-toolbar` + `ui-chip` + `ui-coll-count`) · pagination (`ui-pager`,
   `ui-more`) · long content (`ui-trunc`, `ui-clamp-2`) · hover · focus-visible · reduced motion. */
.ui-empty--no-match { padding-block: 32px; }
.ui-coll-error { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ui-space-2) var(--ui-space-3); margin: var(--ui-space-3); }
.ui-coll-error > :first-child { flex: 1 1 240px; min-width: 0; }
.ui-coll-count { margin-left: auto; color: var(--ui-text-muted); font-size: var(--ui-fs-body); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ui-chip__x { margin-right: -4px; font-size: 14px; line-height: 1; opacity: .7; }
:is(.ui-table-wrap, .ui-index, .ui-list, .ui-cardgrid, .ui-board)[aria-busy="true"] { position: relative; }
:is(.ui-table-wrap, .ui-index, .ui-list, .ui-cardgrid, .ui-board)[aria-busy="true"] > :not(.ui-bulkbar, .ui-coll-busy) { opacity: .55; pointer-events: none; transition: opacity .15s; }
.ui-coll-busy { position: absolute; top: 8px; right: 8px; z-index: 4; }

/* Skeletons in the shape of the pattern (Polaris: 8px bars, radius 4, 12 apart; a 40px thumbnail). A table skeleton is
   a real `ui-table` with its real header and bars in the cells, so nothing moves when the rows arrive. */
:is(.ui-skeleton--table, .ui-skeleton--list, .ui-skeleton--compact, .ui-skeleton--grid, .ui-skeleton--board) .ui-skeleton__line { height: 8px; border-radius: 4px; }
/* A bar is 8 on a 20px line (margin 6 above and below), so a placeholder row is exactly as tall as the row it stands for. */
.ui-skeleton--table td .ui-skeleton__line { width: 70%; margin-block: 6px; }
.ui-skeleton--table td:first-child .ui-skeleton__line { width: 85%; }
@media (hover: hover) { .ui-skeleton--table tbody tr:hover { background: none; } }
.ui-skeleton__block { display: block; flex: none; width: 40px; height: 40px; border-radius: var(--ui-radius-md); background: var(--ui-surface-2); }
.ui-skeleton__block--round { border-radius: 50%; width: 32px; height: 32px; }
.ui-skeleton--list > .ui-list__item { align-items: center; }
.ui-skeleton--list .ui-list__body { display: grid; gap: 12px; }
.ui-skeleton--list .ui-list__body > .ui-skeleton__line:last-child { width: 60%; }
.ui-skeleton--compact .ui-list__row { gap: 12px; }
.ui-skeleton--compact .ui-list__row > .ui-skeleton__line { flex: 1 1 auto; max-width: 60%; }
.ui-skeleton--grid .ui-card__body { display: grid; gap: 12px; justify-items: stretch; }
.ui-skeleton--grid .ui-card__body > .ui-skeleton__line:last-child { width: 50%; }
.ui-skeleton--board .ui-board__list > li { height: 72px; border-radius: var(--ui-radius-md); background: var(--ui-surface); }

/* Under a finger: the sort header and the row checkbox are controls, 44 (the header grows; Polaris does the same). */
@media (pointer: coarse) {
  .ui-table__sort { min-height: 44px; margin-block: -12px; }
  .ui-table__checkbox { min-width: 44px; min-height: 44px; margin: -12px 0; }
}
/* 0.18.0: and 44 WIDE. A short label ("ID", "Views") made a sort button 44 tall but ~30 wide (GemCommunity admin
   Content #270, iPad landscape). Under a finger and at phone width (the chips' rule, kit-plain.css); the label keeps
   its side (a number column's stays right: row-reverse). The width only: the header row keeps its height under a mouse. */
@media (pointer: coarse), (max-width: 47.9975em) {
  .ui-table__sort { min-width: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .ui-table--sticky-first :is(th, td):first-child { animation: none; }
  :is(.ui-table-wrap, .ui-index, .ui-list, .ui-cardgrid, .ui-board)[aria-busy="true"] > * { transition: none; }
  .ui-board { scroll-behavior: auto; }
}
