/* sortmy.life shared components (docs/brand.md): one class per part, used by
   the board (src/global.css), the landing site (site/site.css) and the sign-in pages (/auth/components.css). Built only
   from tokens.css; `yarn design` draws every class here in light and dark. */

/* ---- Buttons ---- */
/* One button, five kinds (Joel, 2026-11-12, drift.html): .btn alone is secondary; add .btn-primary, .btn-danger,
   .btn-quiet, or .btn-quiet.btn-danger for a red text action. 44px, 18px sides, 16px Quicksand. Hover only where a
   pointer hovers; pressed takes the hover color and dips to 97%. Busy (aria-busy) keeps full color and says "…ing…".
   The board renders these through src/ui/Button.tsx. */
.btn { font: inherit; font-family: var(--font-display); font-weight: var(--font-button-weight); font-size: var(--fs-16);
       min-height: var(--tap); padding: 0 18px; border: 0;   /* guard: optical — the decided 18px label inset */
       border-radius: var(--radius-control); display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
       background: var(--tint-primary); color: var(--text); cursor: pointer;
       transition: background-color var(--fast) var(--ease), transform var(--fast) var(--ease); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-danger { background: var(--danger); color: var(--on-danger); }
.btn-quiet { background: transparent; color: var(--text); }
.btn-quiet.btn-danger { background: transparent; color: var(--danger); }
.btn[disabled] { opacity: var(--disabled-opacity); cursor: not-allowed; }
.btn[aria-busy=true] { cursor: progress; }
@media (hover: hover) {
  .btn:hover:not(:disabled, [aria-busy=true]) { background: var(--tint-primary-hover); }
  .btn-primary:hover:not(:disabled, [aria-busy=true]) { background: var(--primary-hover); }
  .btn-danger:hover:not(:disabled, [aria-busy=true]) { background: var(--danger-hover); }
  .btn-quiet:hover:not(:disabled, [aria-busy=true]) { background: var(--hover-quiet); }
  .btn-quiet.btn-danger:hover:not(:disabled, [aria-busy=true]) { background: var(--hover-danger); }
}
.btn:active:not(:disabled, [aria-busy=true]) { background: var(--tint-primary-hover); transform: scale(.97); }
.btn-primary:active:not(:disabled, [aria-busy=true]) { background: var(--primary-hover); }
.btn-danger:active:not(:disabled, [aria-busy=true]) { background: var(--danger-hover); }
.btn-quiet:active:not(:disabled, [aria-busy=true]) { background: var(--hover-quiet); }
.btn-quiet.btn-danger:active:not(:disabled, [aria-busy=true]) { background: var(--hover-danger); }

/* ---- Fields ---- */
/* One text field (Joel, 2026-11-12, drift.html): .field > .field-label + .field-input + .field-help or .field-error.
   44px, 2px --line border, 8px corners, Quicksand label above. Focus is tokens.css's field glow, red while
   aria-invalid. The error line takes the help line's place and says what to do. The board renders these through
   src/ui/Field.tsx. The board's rename field (.nameField) and the search box are their own parts. */
.field { display: grid; gap: var(--sp-2); }
.field-label { font: 600 var(--fs-16) var(--font-display); }
.field-input { font: inherit; font-size: var(--fs-16); color: var(--text); background: var(--surface);
               border: 2px solid var(--line); border-radius: var(--radius-control); min-height: var(--tap);
               padding: 0 var(--sp-3); width: 100%; box-sizing: border-box; }
.field-input::placeholder { color: var(--muted); opacity: 1; }
.field-input[aria-invalid=true] { border-color: var(--danger); }
.field-input:disabled { opacity: var(--disabled-opacity); cursor: not-allowed; }
.field-help { margin: 0; color: var(--muted); font-size: var(--fs-13); }
.field-error { margin: 0; color: var(--danger); display: flex; gap: var(--sp-2); align-items: start; }
.field-error[hidden] { display: none; }
.field-error-icon { flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%;   /* guard: optical — sized to the 16px line */
                    background: var(--danger); color: var(--on-danger); display: grid; place-items: center; font: 700 var(--fs-13) system-ui; }

/* ---- Chips ---- */
/* .chip: a small pill label (a count, "you", "Here now"), 13px bold on the quiet tint (Joel, 2026-11-12, drift.html).
   Tones: .chip-sun for where something is now or what waits on you, .chip-danger for
   anything not ok (admin's "2 down"). A button.chip stays small with a fine pointer
   and grows to a full touch target on touch screens, as does an a.chip. It resets everything the board's bare button rule sets.
   .chip-pick: a 44px toggle (aria-pressed), picked in sun. The board renders these through src/ui/Chip.tsx. */
.chip { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-1); flex: none;
        min-height: 0; padding: 2px var(--sp-3); border: 0; border-radius: var(--radius-pill);
        background: var(--hover-quiet); color: var(--text); font: inherit; font-size: var(--fs-13); font-weight: 700;
        line-height: 1.4; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip-sun { background: var(--sun); color: var(--on-sun); }
.chip-danger { background: var(--danger); color: var(--on-danger); }
button.chip { cursor: pointer; }
button.chip:disabled { opacity: var(--disabled-opacity); cursor: not-allowed; }
/* a.chip: a link drawn as a chip, ending in ↗ when it opens another site (the admin cards' "Charts ↗"). */
a.chip { color: var(--text); text-decoration: none; cursor: pointer; transition: background-color var(--fast) var(--ease); }
a.chip.chip-sun { color: var(--on-sun); }   /* a sun link keeps its sun ink (a.chip's --text would win) */
a.chip:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
@media (hover: hover) {
  a.chip:hover { background: var(--hover-row); }
  a.chip.chip-sun:hover { background: var(--sun); box-shadow: inset 0 0 0 2px var(--on-sun); }   /* stays sun, so its ink keeps contrast */
}
@media (pointer: coarse) {
  :is(a, button).chip { min-height: var(--tap); }
}
.chip-pick { font: inherit; font-family: var(--font-display); font-weight: var(--font-button-weight); font-size: var(--fs-16); min-height: var(--tap); padding: 0 var(--sp-4);
             border: var(--border-w) solid var(--line-soft); border-radius: var(--radius-pill); background: var(--surface); color: var(--text);
             display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.chip-pick[aria-pressed=true] { border-color: var(--sun-line); background: var(--sun-tint); font-weight: 600; }
.chip-pick:disabled { opacity: var(--disabled-opacity); cursor: not-allowed; }
/* .chip-pick-sm: the compact pick for a row of scopes, like search's All · Items · Tags (Joel, 2026-11-14,
   sidebar-search.html). 13px, small with a fine pointer and a full touch target on touch screens, as button.chip.
   A .chip-pick-count after the word says how many it holds, in the muted ink until picked. */
.chip-pick-sm { flex: none; gap: var(--sp-1); min-height: calc(var(--tap) - var(--sp-3)); padding: 0 var(--sp-3); font-size: var(--fs-13); }
@media (pointer: coarse) {
  .chip-pick-sm { min-height: var(--tap); }
}
.chip-pick-count { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.chip-pick[aria-pressed=true] .chip-pick-count { color: var(--text); }

/* ---- Popovers and menus ---- */
/* .popover: a card that floats over the board beside its trigger (Joel, 2026-11-12, drift.html). It fades in, or drops
   in from below when opened above its trigger ([data-flipped]), and scrolls inside itself when the screen clamps it.
   .menu is a popover of rows: .menu-item (44px, sun hover, data-danger in red), .menu-sep, .menu-note, and in a row a
   right-hand .menu-detail or .menu-check. The board's ⋯ menu wears "popover menu"; the sun panel wears "popover" with
   its own padding. src/ui/Menu.tsx renders the rows. It sits on --fill-raised inside a --line-raised edge, and sets
   --surface to the fill's lower end, so whatever inside fills with --surface (a chip, the fade, a mark tile) matches it. */
.popover { --surface: var(--surface-raised); position: fixed; z-index: var(--z-menu); background: var(--surface) var(--fill-raised); color: var(--text);
           border: var(--border-w) solid var(--line-raised); border-radius: var(--radius-control); box-shadow: var(--shadow-pop);
           animation: popover-in var(--fast) var(--ease); overflow-y: auto; overscroll-behavior: contain; }
.popover[data-flipped] { animation-name: popover-up; }
/* .popover-float: a popover one step above the raised rail (search's dropdown over the rail and the board): the lighter
   --fill-float and the deeper --shadow-float (Joel, 2026-11-15, stack-3up.html B). */
.popover-float { --surface: var(--surface-float); background: var(--surface) var(--fill-float); box-shadow: var(--shadow-float); }
@media (max-width: 1099px) {   /* B1: on the phone it floats over the board alone, so a smaller shadow (Joel, 2026-11-16) */
  .popover-float { box-shadow: var(--shadow-md); }
}
@keyframes popover-in { from { opacity: 0; transform: translateY(calc(-1 * var(--sp-1))); } }
@keyframes popover-up { from { opacity: 0; transform: translateY(var(--sp-1)); } }
.menu { display: flex; flex-direction: column; padding: var(--sp-2); min-width: 220px; font-size: var(--fs-16); }
.menu-item { display: flex; align-items: center; width: 100%; min-height: var(--tap); padding: 0 var(--sp-3); border: 0;
             border-radius: var(--radius-control); background: transparent; color: var(--text); font-size: var(--fs-16);
             font-family: var(--font-display); font-weight: var(--font-button-weight); text-align: left; text-decoration: none;
             transition: background-color var(--fast) var(--ease); }
.menu-item:hover:not([aria-disabled=true]) { background: var(--hover-row); }
.menu-item[data-danger] { color: var(--danger); }
/* The sunshine hover would leave dark mode's --danger under 4.5:1, so a red row hovers on a faint tint of its own color. */
.menu-item[data-danger]:hover:not([aria-disabled=true]) { background: var(--hover-danger); }
.menu-item:focus-visible { outline: 2px solid transparent; outline-offset: -2px; box-shadow: var(--focus-ring-inset); }   /* the row sits flush in the popover */
.menu-item[role=menuitemradio] { gap: var(--sp-2); }
.menu-detail { margin-left: auto; color: var(--muted); }
.menu-check { flex: none; display: grid; place-items: center; width: 20px; margin-left: auto; padding-left: var(--sp-2); box-sizing: content-box; }
.menu-sep { flex: none; height: 1px; margin: var(--sp-2) calc(-1 * var(--sp-2)); background: var(--line-raised); }   /* edge to edge, like the results hairlines */
.menu-note { margin: 0; padding: 0 var(--sp-2) var(--sp-2); color: var(--muted); font-size: var(--fs-13); }
/* The account menu (src/RailFoot.tsx): its rows start with a --muted .menu-icon (--danger on Sign out). Appearance's
   .menu-two holds its name over the current choice and ends in a .menu-chev that turns when it unfolds its .menu-sub
   radios, indented under its words. */
.menu-icon { flex: none; width: var(--icon-md); height: var(--icon-md); margin-right: var(--sp-3); color: var(--muted); }
.menu-item[data-danger] > .menu-icon { color: var(--danger); }
.menu-two { display: grid; gap: 1px; padding: 6px 0; line-height: 1.2; }   /* guard: optical — air around the two lines in the row */
.menu-two > small { color: var(--muted); font: 400 var(--fs-13)/1.2 var(--font-body); }
.menu-chev { flex: none; width: var(--icon-sm); height: var(--icon-sm); margin-left: auto; color: var(--muted); transition: rotate var(--fast) var(--ease); }
.menu-item[aria-expanded=true] > .menu-chev { rotate: 90deg; }
.menu-sub { padding-left: calc(var(--sp-3) + var(--icon-md) + var(--sp-3)); }

/* .build-card: which build the site runs, a tiny card at the desktop board's bottom-right corner (Joel, 2026-11-15). */
.build-card { position: fixed; right: var(--sp-2); bottom: var(--sp-2); z-index: var(--z-raised); margin: 0; padding: 2px 6px;   /* guard: optical — a tiny card hugging its 11px text */
              border: var(--border-w) solid var(--line-soft); border-radius: calc(var(--radius-control) / 2); background: var(--surface); color: var(--muted);
              font: var(--fs-11)/1.3 var(--font-body); font-variant-numeric: tabular-nums; }

/* ---- Results ---- */
/* .results: a grouped list of rows in a panel, for search, Move to… and other pickers (Joel, 2026-11-14, ds-updates.html).
   Markup: .popover.results > .results-scroll > (p.results-label + ul.results-list > li > button.result)…, then an optional
   .results-help. A .result holds .result-name (an item's <small>×3</small> and marks inside, matched letters in <mark>),
   .result-detail under it, and an optional .result-end at the right (a fate icon or a .chip count). .result.result-more is
   the "N more" row. The highlighted row is [role=option][aria-selected=true], so the keyboard and the pointer light the
   same row: an option gets no :hover fill of its own, and its list moves aria-selected to the row under the pointer.
   Rows run edge to edge in the body font, split by --line-raised hairlines, like a .choice-list (Joel, 2026-11-14).
   An item reads as on the board: names at 400, a match at 600 by weight, not a link underline. The label is Quicksand
   600, since Quicksand ships no 700. On a lit row the muted parts turn --text (--muted is 3.1:1 on the dark sun hover)
   and a chip fills with --surface, the popover's raised fill (1.2:1 → 1.9:1 against the row in dark). The scroll gets
   a thin --line scrollbar and, while more is below, a --sp-6 fade to --surface; it follows scroll(nearest), so
   browsers without scroll timelines, and reduced motion (tokens.css stops every animation), get no fade.
   .results-help: a good-news strip under the list, its .result a one-line title and a two-line answer. */
.results { display: flex; flex-direction: column; overflow: hidden; }
.results-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
/* A fade at either end says there's more that way: the foot's shows until the end is reached, the top's once scrolled
   down. Each is --sp-4 tall, short enough to read as an edge. Where scroll timelines aren't supported, neither shows. */
.results-scroll::before, .results-scroll::after { content: ""; position: sticky; z-index: var(--z-raised); display: block; height: var(--sp-4);
                                                  pointer-events: none; opacity: 0; animation: linear both; animation-timeline: scroll(nearest); }
.results-scroll::before { top: 0; margin-bottom: calc(-1 * var(--sp-4)); background: linear-gradient(var(--surface), transparent); animation-name: results-fade-top; }
.results-scroll::after { bottom: 0; margin-top: calc(-1 * var(--sp-4)); background: linear-gradient(transparent, var(--surface)); animation-name: results-fade; }
@keyframes results-fade { 0%, 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes results-fade-top { 0% { opacity: 0; } 10%, 100% { opacity: 1; } }
.results-label { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-2);
                 margin: 0; padding: var(--sp-4) var(--sp-4) var(--sp-2); color: var(--muted); font: 600 var(--fs-13) var(--font-display);
                 letter-spacing: .04em; text-transform: uppercase; }
.results-label:first-child { padding-top: var(--sp-3); }
.results-list { display: grid; margin: 0; padding: 0; list-style: none; }
/* Hairlines as in a .choice-list: between rows, and one above each label to start a group (none under it, so the label
   heads its rows). The panel's edge stands in at the top. */
:is(.results-list, .results-tiles) > * + * { border-top: var(--border-w) solid var(--line-raised); }
.results-scroll > .results-label:not(:first-child) { border-top: var(--border-w) solid var(--line-raised); }
.result { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--sp-2); align-content: center; box-sizing: border-box;
          width: 100%; min-height: var(--tap-row); padding: var(--sp-2) var(--sp-4); margin: 0; border: 0; border-radius: 0;
          background: transparent; color: var(--text); font: inherit; font-weight: 400; text-align: left; cursor: pointer; }
.result[aria-selected=true] { background: var(--hover-row); }
/* On the phone a row is as tall as the board's list rows (Board.module.css .rows: 52px), so a result reads like one. */
@media (max-width: 1099px) {   /* B1: result rows match the phone lists */
  .result { min-height: calc(var(--tap) + var(--sp-2)); }
}
@media (hover: hover) {
  .result:not([role=option]):hover { background: var(--hover-row); }
}
.result:focus-visible { outline: 2px solid transparent; outline-offset: -2px; box-shadow: var(--focus-ring-inset); }   /* the row sits flush in the panel */
.result-name { grid-column: 1; overflow-wrap: anywhere; }
.result-name mark { background: none; color: inherit; font-weight: 600; }
.result-name small { color: var(--muted); font-size: var(--fs-13); white-space: nowrap; }
.result-detail { grid-column: 1; color: var(--muted); font-size: var(--fs-13); overflow-wrap: anywhere; }
.result-end { grid-column: 2; grid-row: 1 / span 2; align-self: center; display: grid; place-items: center; color: var(--muted); }
.result[aria-selected=true] :is(.result-detail, .result-name small, .result-end) { color: var(--text); }
.result[aria-selected=true] .chip:not(.chip-sun, .chip-danger) { background: var(--surface); }   /* the quiet chip only: a toned chip keeps its tone */
@media (hover: hover) {
  .result:not([role=option]):hover :is(.result-detail, .result-name small, .result-end) { color: var(--text); }
  .result:not([role=option]):hover .chip:not(.chip-sun, .chip-danger) { background: var(--surface); }
}
.result-more { color: var(--primary); font-size: var(--fs-13); }
.results-help { flex: none; padding: var(--sp-2);
                background: var(--sun-tint); border-top: var(--border-w) solid var(--edge-sun-soft); }
.results-help > .result { padding-inline: var(--sp-2); grid-template-columns: var(--icon-sm) minmax(0, 1fr) auto; row-gap: var(--sp-1); align-items: baseline; }
.results-help img { width: var(--icon-sm); height: var(--icon-sm); align-self: center; }
.results-help .result-name { grid-column: 2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.results-help .result-end { grid-column: 3; grid-row: 1; }
.results-help .result-detail { grid-column: 2 / -1; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.results-help:first-child { border-top: 0; border-radius: inherit; }   /* help alone is the whole popover */
.results-help > .result + .result { margin-top: var(--sp-1); }
/* .results-hint: the help strip's sun tint, edge and sun slimmed to one line, at the panel's foot (Joel, 2026-11-15,
   empty-field.html). Tapping it opens the example's article; it ends in a round sun-tinted
   chevron that turns solid sun on hover (Joel, 2026-11-16, hint-go.html C). Markup: button.results-hint > img + span +
   span.results-hint-go > svg. */
.results-hint { display: flex; align-items: center; gap: var(--sp-2); flex: none; box-sizing: border-box; width: 100%; min-height: 0; margin: 0; padding: var(--sp-2) var(--sp-3);
                border: 0; border-radius: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer;
                background: var(--sun-tint); border-top: var(--border-w) solid var(--edge-sun-soft); font-size: var(--fs-13); }
.results-hint img { flex: none; width: var(--icon-sm); height: var(--icon-sm); }
.results-hint:focus-visible { outline: 2px solid transparent; outline-offset: -2px; box-shadow: var(--focus-ring-inset); }
.results-hint-go { flex: none; display: grid; place-items: center; width: var(--icon-md); height: var(--icon-md); margin-block: calc(var(--sp-1) / -2);   /* keeps the row one text line tall */
                   border-radius: var(--radius-pill); background: color-mix(in srgb, var(--sun) 18%, transparent); color: var(--text);
                   transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease); }
@media (hover: hover) {
  .results-hint:hover .results-hint-go { background: var(--sun); color: var(--on-sun); }   /* as .chip-sun: sun with its own ink */
}
.results-hint:first-child { border-top: 0; border-radius: inherit; }   /* no recents: the hint is the whole popover */
.results-hint > span:not(.results-hint-go) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Search's own parts (Joel, 2026-11-14, sidebar-search.html), in a panel of .results:
   .results-picks: the row of .chip-pick.chip-pick-sm scopes over the list; it scrolls sideways when they don't fit.
   A .results-label may end in a button.result-more, its action ("All 9").
   .results-sub: a room's heading inside a Place's group, in the text ink, so it reads under the uppercase label. Its
   rows step in one --sp-4 and their hairlines fade in from the panel's edge to the text, while a lit row's fill still runs edge to edge (Joel, 2026-11-14).
   .result[data-done]: a row already opened from a tag's pile, its name muted and a .result-end check in --ok; lit, it
   takes the lit row's --text like the rest.
   .results-summary: the sun strip over a tag's pile ("7 to sell / in House and Garage"), edge to edge like the help strip.
   .results-tiles > .results-tile: the item menu's fates (Board.module.css .fateTile) as picks, drawn as rows of the list:
   an icon, a word and a .chip count, lit by aria-selected like a .result.
   Every part keeps the rows' --sp-4 side inset, so text lines up down the panel.
   .results-empty: the one line when nothing matched, with an optional button as a text link. */
.results-picks { flex: none; display: flex; gap: var(--sp-1); overflow-x: auto; scrollbar-width: none; padding: var(--sp-3) var(--sp-4);
                 border-bottom: var(--border-w) solid var(--line-raised); }
.results-label > .result-more { border: 0; padding: 0; background: none; font-family: var(--font-display); font-weight: 400; letter-spacing: normal; text-transform: none; cursor: pointer; }
.results-sub { margin: 0; padding: var(--sp-2) var(--sp-4) var(--sp-1); color: var(--text); font: 600 var(--fs-13) var(--font-display); }
.results-sub + .results-list .result { padding-left: var(--sp-6); }
.results-sub + .results-list > li + li { position: relative; border-top: 0; }
.results-sub + .results-list > li + li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: var(--border-w);
                                                 background: linear-gradient(to right, transparent, var(--line-raised) var(--sp-6)); }
.result[data-done]:not([aria-selected=true]) .result-name { color: var(--muted); }
.result[data-done]:not([aria-selected=true]) .result-end { color: var(--ok); }
.results-summary { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); background: var(--sun-tint);
                   font-family: var(--font-display); font-size: var(--fs-13); }
.results-summary b { font-size: var(--fs-16); font-weight: 600; }
.results-summary svg { flex: none; width: var(--icon-md); height: var(--icon-md); }
.results-tiles { display: grid; }
.results-tile { min-width: 0; min-height: var(--tap-row); display: flex; align-items: center; gap: var(--sp-3); margin: 0; padding: var(--sp-2) var(--sp-4);
                border: 0; border-radius: 0; background: transparent; color: var(--text); font: inherit; text-align: start; cursor: pointer; }
.results-tile > svg { flex: none; width: var(--icon-md); height: var(--icon-md); color: var(--muted); }
.results-tile > span:not(.chip) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results-tile[aria-selected=true] { background: var(--hover-row); }
.results-tile[aria-selected=true] > svg { color: var(--text); }
.results-tile[aria-selected=true] > .chip { background: var(--surface); }
.results-tile:focus-visible { outline: 2px solid transparent; outline-offset: -2px; box-shadow: var(--focus-ring-inset); }
.results-empty { margin: 0; padding: var(--sp-3) var(--sp-4); color: var(--muted); overflow-wrap: anywhere; }
.results-empty button { border: 0; padding: 0; background: none; color: var(--primary); font: inherit; cursor: pointer; }

/* .results-all: the pinned last row of the quick dropdown, the way into the full view, worded as the next step: the
   sun img, "8 to sort" over a <small> "Open them and pick an action for each", then a .results-all-go ›. It sits under
   .results-scroll, so it never scrolls away, on the pile strip's sun tint and edge. It replaces the groups' "All N"
   rows (Joel, 2026-11-14; worded and tinted 2026-11-15). */
.results-all { flex: none; display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: var(--tap-row); margin: 0;
               padding: var(--sp-2) var(--sp-4); border: 0; border-top: var(--border-w) solid var(--edge-sun-soft); border-radius: 0;
               background: var(--sun-tint); color: var(--text); font: 600 var(--fs-16) var(--font-display);
               text-align: start; cursor: pointer; }
.results-all > img { flex: none; width: var(--icon-md); height: var(--icon-md); }
.results-all > span:not(.results-all-go) { flex: 1; min-width: 0; line-height: 1.3; }
.results-all small { color: var(--muted); font: 400 var(--fs-13) var(--font-display); }
.results-all-go { flex: none; color: var(--muted); font-size: var(--fs-20); line-height: 1; }
.results-all[aria-selected=true] { background: var(--hover-row); }
.results-all[aria-selected=true] :is(small, .results-all-go) { color: var(--text); }
.results-all:focus-visible { outline: 2px solid transparent; outline-offset: -2px; box-shadow: var(--focus-ring-inset); }

/* ---- Rail ---- */
/* .rail: the board's one sidebar, a raised card (the popover's fill, edge and shadow) beside the board (on desktop --sp-3 from the left edge, edge to edge top and bottom; Board.module.css)
   over the flat board cards; it only navigates and filters, so its rows take no drops, drags or ⋯ (Joel,
   2026-11-14). Markup: .rail > .rail-top (.rail-wordmark holding wordmark.svg, then a
   .field: a search svg and its .field-input), a .results-scroll of .rail-section… (p.results-label +
   ul.rail-list > li > button.rail-row), then .rail-foot (below).
   A .rail-row holds an icon, its name and a .rail-count; .rail-row-sub steps a room in under its place; a filter row
   starts with a .rail-check box, then its fate or mark icon. A section's Clear is the label's button.chip.
   Rows sit --sp-2 in from the card's sides with the one corner and 2px apart, so their text keeps the --sp-4 inset
   and two lit rows stay two. The current Where row is [aria-current=true], a picked filter row [aria-pressed=true]:
   both the medium gold --hover-row, at 600, their muted parts in --text. A row with nothing in it is
   .rail-row[data-zero], muted. In a .sheet (the phone) the rail is the sheet's body: no card of its own and taller
   rows. */
.rail { --surface: var(--surface-raised); display: flex; flex-direction: column; min-height: 0; overflow: hidden;
        background: var(--surface) var(--fill-raised); border: var(--border-w) solid var(--line-raised); border-radius: var(--radius-card); box-shadow: var(--shadow-pop); }
.rail-top { --ink: var(--text); display: grid; gap: var(--sp-3); padding: var(--sp-4) var(--sp-4) var(--sp-3); }   /* wordmark.svg paints its letters with --ink */
.rail-wordmark svg { display: block; width: 148px; height: auto; }
.rail-top > .field { position: relative; }
.rail-top > .field > svg { position: absolute; left: var(--sp-3); top: 50%; width: var(--icon-md); height: var(--icon-md); translate: 0 -50%; color: var(--muted); pointer-events: none; }
.rail-top > .field > .field-input { padding-left: calc(var(--sp-3) + var(--icon-md) + var(--sp-2)); }
.rail > .results-scroll { flex: 1; }   /* the shared scroller, so the rail fades at its foot while there is more */
.rail-section { --clear-h: calc(var(--tap) - var(--sp-4)); }   /* the Clear chip's height, which its label always keeps */
.rail-section + .rail-section { border-top: var(--border-w) solid var(--line-raised); }   /* none under the field: the first label heads the list */
.rail-section > .results-label { padding-top: var(--sp-3); align-items: center; }
.rail-section > .results-label > span { display: flex; align-items: center; min-height: var(--clear-h); }   /* on the words, so the padding stays as it is */
/* Clear: a quiet chip at the label's right end, its 44px reach an overlay, so showing it never moves the rows (Joel, 2026-11-15). */
.rail-section > .results-label > .chip { height: var(--clear-h); min-height: 0; padding-inline: var(--sp-3); font-family: var(--font-display); letter-spacing: normal; text-transform: none; position: relative; }
.rail-section > .results-label > .chip::after { content: ''; position: absolute; inset: calc((100% - var(--tap)) / 2) 0; }
.rail-list { display: grid; gap: 2px; margin: 0; padding: 0 var(--sp-2) var(--sp-2); list-style: none; }   /* a sliver between rows, so two picked rows stay two */
.rail-row { display: flex; align-items: center; gap: var(--sp-2); box-sizing: border-box; width: 100%; min-height: calc(var(--tap) - var(--sp-2)); margin: 0; padding: 0 var(--sp-2);
            border: 0; border-radius: var(--radius-control); background: transparent; color: var(--text); font: 400 var(--fs-16) var(--font-body); text-align: start; cursor: pointer; }
.rail-row > svg { flex: none; width: var(--icon-sm); height: var(--icon-sm); color: var(--muted); }
.rail-row > span:not(.rail-count, .rail-check) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-row-sub { min-height: calc(var(--tap) - var(--sp-3)); padding-left: calc(var(--sp-2) + var(--icon-sm) + var(--sp-2)); font-size: var(--fs-13); }
.rail-count { margin-left: auto; color: var(--muted); font-size: var(--fs-13); font-variant-numeric: tabular-nums; }
.rail-row[data-zero] { color: var(--muted); }
.rail-row:is([aria-current=true], [aria-pressed=true]) { background: var(--hover-row); color: var(--text); font-weight: 600; }
.rail-row:is([aria-current=true], [aria-pressed=true]) :is(.rail-count, svg) { color: var(--text); }
@media (hover: hover) {
  .rail-row:not([aria-current=true], [aria-pressed=true]):hover { background: var(--hover-quiet); }
}
.rail-row:focus-visible { outline: 2px solid transparent; outline-offset: -2px; box-shadow: var(--focus-ring-inset); }
.rail-check { flex: none; margin-inline-end: var(--sp-2); display: grid; place-items: center; box-sizing: border-box; width: var(--icon-sm); height: var(--icon-sm);
              border: 1.5px solid var(--line); border-radius: calc(var(--radius-control) / 2); }   /* half the corner: at 16px the whole one is a circle, a radio */
.rail-row[aria-pressed=true] .rail-check { border-color: var(--text); color: var(--text); }   /* a --text tick, no fill: blue fought the gold row (Joel, 2026-11-15) */
.rail-check > svg { width: calc(var(--icon-sm) - var(--sp-1)); height: calc(var(--icon-sm) - var(--sp-1)); }
/* .rail-foot holds one .rail-user row, inset like the lists above it (Joel, 2026-11-15). The row is a .rail-row in corner, hover, focus and type, always --tap-row tall: a
   32px .rail-avatar tile (a filled silhouette in two quiet grays of the rail's fill, or with sign-in off
   .rail-avatar-gear), then .rail-user-text (a line in --text, an optional small one in --muted), then an up
   .rail-user-caret in --text. It opens the account menu above it (src/RailFoot.tsx) and stays lit while that is open.
   The phone's menu sheet ends in the same row as a plain div, with no caret. */
.rail-foot { padding: var(--sp-2); border-top: var(--border-w) solid var(--line-raised); }
.rail-user { display: flex; align-items: center; gap: var(--sp-3); box-sizing: border-box; width: 100%; min-height: var(--tap-row); margin: 0; padding: var(--sp-1) var(--sp-2);
             border: 0; border-radius: var(--radius-control); background: transparent; color: var(--text); font: 400 var(--fs-16) var(--font-body); text-align: start; }
button.rail-user { cursor: pointer; }
@media (hover: hover) {
  button.rail-user:hover { background: var(--hover-quiet); }
}
.rail-user[aria-expanded=true] { background: var(--hover-quiet); }
.rail-user:focus-visible { outline: 2px solid transparent; outline-offset: -2px; box-shadow: var(--focus-ring-inset); }
.rail-user-text { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.rail-user-text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-user-text > small { color: var(--muted); font-size: var(--fs-13); }
.rail-user-caret { flex: none; width: var(--icon-sm); height: var(--icon-sm); color: var(--text); }
.rail-avatar { flex: none; display: block; width: 32px; height: 32px; border-radius: var(--radius-control); overflow: hidden;
               background: color-mix(in srgb, var(--muted) 16%, var(--surface)); color: color-mix(in srgb, var(--muted) 45%, var(--surface)); }
.rail-avatar > svg { display: block; width: 100%; height: 100%; }
.rail-avatar-gear { display: grid; place-items: center; color: var(--muted); }
.rail-avatar-gear > svg { width: var(--icon-md); height: var(--icon-md); }
.sheet .rail { border: 0; border-radius: 0; box-shadow: none; background: none; }
.sheet .rail-row { min-height: var(--tap-row); }
.sheet .rail-row-sub { min-height: var(--tap); }

/* .filter-chips: the phone's row of .chip-pick.chip-pick-sm under the field (House, Sell +1, Label), each an optional
   --icon-sm icon, its words, a .chip-pick-count, then a chevron-down svg, and each opening the filter sheet (.sheet-fixed) on its tab. A chip with something picked is [aria-pressed=true] in --hover-row, not
   the sun, since the pile's summary strip is the one yellow on screen. */
.filter-chips { display: flex; gap: var(--sp-2); overflow-x: auto; scrollbar-width: none; }
.filter-chips > .chip-pick { background: var(--chip-raised); border-color: var(--chip-raised-line); }   /* a see-through fill and line, so a chip shows on the raised header (Joel, 2026-11-16; made stronger the same day) */
.filter-chips > .chip-pick[aria-pressed=true] { border-color: transparent; background: var(--hover-row); }
.filter-chips > .chip-pick > svg { flex: none; width: var(--icon-sm); height: var(--icon-sm); }
.filter-chips > .chip-pick > svg:last-child { margin-inline-end: calc(-1 * var(--sp-1)); }   /* the chevron's own inset stands in for the chip's last 4px */

/* ---- Pile and details ---- */
/* .pile: a filter's things, a flat card (the board's --surface and --line-soft) holding a .results-summary strip (the
   only yellow on screen), then .results-scroll with a .results-label per place, a .results-sub per storage spot
   ("Office › Desk box") and .result rows, lit by aria-selected. Its hairlines are the text ink at 10% (white at a low
   alpha in dark), fainter than a popover's --line-raised. .pile-zero: nothing left, under its own summary strip: the
   sun img, a bold line, a muted line, a .btn back to more, then a <small> "or" and a button.result-more.
   .details: the lit row's pane: .details-path (muted, small), .details-name (h2), an .outcome, then .details-section
   blocks (a p.sheet-label, then a div of .chip-pick picks, each a fate or mark svg and its word) and the Move… and
   Show on board .btn in .details-buttons, each with an svg. .outcome: the sun box around the Sold / Given / Thrown
   out button (a check svg and the word), its <small> note centered under it (Joel, 2026-11-14). */
.pile { --line-raised: color-mix(in srgb, var(--text) 10%, transparent); display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: var(--surface); border: var(--border-w) solid var(--line-soft); border-radius: var(--radius-card); }
.pile > .results-scroll { flex: 1; }
.pile-zero { display: grid; justify-items: center; gap: var(--sp-3); padding: var(--sp-6) var(--sp-5); color: var(--muted); text-align: center; }
.pile-zero > img { width: calc(var(--icon-lg) + var(--sp-4)); height: calc(var(--icon-lg) + var(--sp-4)); }
.pile-zero > b { color: var(--text); font: 600 var(--fs-16) var(--font-display); }
.pile-zero > small { font-size: var(--fs-13); }
.pile-zero .result-more { border: 0; padding: 0; background: none; font: inherit; cursor: pointer; }
.details { display: grid; align-content: start; gap: var(--sp-5); }
.details-path { margin: 0; color: var(--muted); font-size: var(--fs-13); overflow-wrap: anywhere; }
.details-name { margin: calc(-1 * var(--sp-4)) 0 0; font: 600 var(--fs-25) var(--font-display); overflow-wrap: anywhere; }
.details-section { display: grid; gap: var(--sp-2); }
/* The picks sit in two even columns, as on the phone's opened row (Joel, 2026-11-15);
   a line of its own (the Other name field) spans both. */
.details-section > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.details-buttons { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.details-section .chip-pick { justify-content: flex-start; min-width: 0; gap: var(--sp-2); padding-inline: var(--sp-2); }
:is(.details-section .chip-pick, .details-buttons > .btn, .outcome > .btn) > svg { flex: none; width: var(--icon-md); height: var(--icon-md); }
/* .open-row: the phone's lit pile row, opened in place under its .result[aria-expanded=true] (Joel, 2026-11-15): the details pane's parts with no name of its own.
   Row and parts share the raised panel surface, so the two read as one card lifted off the list, packed tighter than
   the pane (Joel, 2026-11-16, open-row.html B). The name leaves the list's indent and sits right over the path, with
   Move… and Board stacked small in the top right, risen beside them; the path takes row 1's left and every other part
   spans both columns. Picks and buttons take the filter chips' see-through fill, so they show on the raised card
   (Joel, 2026-11-16, open-path.html C). */
.result[aria-expanded=true] { min-height: 0; padding-block: var(--sp-3) var(--sp-1); font-weight: 600; box-shadow: inset 0 var(--border-w) 0 var(--line-raised); }   /* ends just above the path */
.results-sub + .results-list .result[aria-expanded=true] { padding-left: var(--sp-3); }   /* out of the list's indent, in line with its card */
.results-list .result[aria-expanded=true]:has(+ .open-row) { width: calc(100% - 3 * var(--sp-6) - var(--sp-3)); }   /* stops short of the buttons */
.results-list li:has(> .open-row) { background: var(--surface-raised); }   /* fills the corner the buttons rise into */
.open-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-3); padding: 0 var(--sp-3) var(--sp-3);
            box-shadow: inset 0 calc(-1 * var(--border-w)) 0 var(--line-raised), var(--shadow-sm); }
:is(.result[aria-expanded=true], .open-row) { background: var(--surface-raised); }
.open-row > * { grid-column: 1 / -1; }
.open-row > .details-path { grid-column: 1; grid-row: 1; }
.open-row > .details-buttons { grid-column: 2; grid-row: 1; align-self: start; flex-direction: column; flex-wrap: nowrap; gap: var(--sp-1); position: relative;
                               width: calc(3 * var(--sp-6)); margin-top: calc(-1 * var(--sp-3) - var(--fs-16) * 1.25); }   /* rises into the name row, a few px inside the card's top */
.open-row > .details-buttons > .btn { justify-content: flex-start; gap: var(--sp-1); min-height: var(--sp-5); padding-inline: var(--sp-2); font-size: var(--fs-13); }
.open-row > .details-buttons > .btn > svg { width: var(--icon-sm); height: var(--icon-sm); }
:is(.open-row .chip-pick:not([aria-pressed=true]), .open-row > .details-buttons > .btn) { background: var(--chip-raised); border: var(--border-w) solid var(--chip-raised-line); }
.open-row .details-section .chip-pick { min-height: calc(var(--tap) - var(--sp-3)); }
.open-row .details-section > div { gap: var(--sp-1) var(--sp-2); }
.outcome { display: grid; gap: var(--sp-2); padding: var(--sp-3); border: var(--border-w) solid var(--edge-sun-soft); border-radius: var(--radius-card); background: var(--sun-tint); }
.outcome > .btn { background: var(--sun); color: var(--on-sun); }
.outcome > small { color: var(--muted); font-size: var(--fs-13); text-align: center; }

/* ---- Help articles ---- */
/* .help-title and .help-body: a help article opened from search, in a .sheet (src/HelpArticle.tsx). The body is the
   article's own limited HTML (src/help-articles.ts): p, ol, ul, li, b and links, with .help-more leading into a
   .help-links list of guides from the makers of a device or browser. */
.help-title { display: flex; align-items: center; gap: var(--sp-2); margin: 0; font: 600 var(--fs-20)/1.2 var(--font-display); overflow-wrap: anywhere; }
.help-title img { flex: none; width: var(--icon-sm); height: var(--icon-sm); }
.help-body { line-height: 1.5; }
.help-body :is(p, ol, ul) { margin: 0 0 var(--sp-3); }
.help-body :is(ol, ul) { padding-left: var(--sp-5); }
.help-body li { margin-bottom: var(--sp-1); }
.help-body > :last-child { margin-bottom: 0; }
.help-body a { color: var(--primary); }
/* A help part for one layout only (data-layout, src/help-articles.ts): the other layout hides it. */
@media (max-width: 1099px) { [data-layout="wide"] { display: none; } }   /* B1: hide desktop-only help text */
@media (min-width: 1100px) { [data-layout="narrow"] { display: none; } }   /* B1: hide phone-only help text */

/* ---- Cards ---- */
/* .card: a flat panel on the page (docs/brand.md): --surface, a 1px --line-soft border, the one
   corner. No shadow; only dialogs get one. */
.card { background: var(--surface); border: var(--border-w) solid var(--line-soft); border-radius: var(--radius-card); padding: var(--sp-3) var(--sp-4); }

/* ---- Link bar ---- */
/* .link-bar: a few page links across the top, in centered columns of up to 10rem, each a .link-bar-name over a
   .link-bar-detail, both centered (Joel, 2026-11-14). Every detail is a chip: quiet
   for a plain count, .chip-danger for anything not ok, .chip-sun for what waits. Two variants: with details, or names
   only (leave the details out; nothing reserves their height).
   The current page ([aria-current=page]) is underlined with its name at 600. The admin pages draw it (nav.mjs). */
.link-bar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 10rem); justify-content: center; gap: var(--sp-1); margin: 0; padding: 0; }
.link-bar-item { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-1); justify-items: center; text-align: center; padding: var(--sp-2); border-radius: var(--radius-control);
  color: var(--text); text-decoration: none; min-width: 0; transition: background-color var(--fast) var(--ease); }
.link-bar-name { max-width: 100%; font-size: var(--fs-16); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-bar-detail { display: flex; justify-content: center; max-width: 100%; font-size: var(--fs-13); color: var(--muted); }
.link-bar-detail > .chip { display: block; flex: 0 1 auto; min-width: 0; padding-inline: var(--sp-2); overflow: hidden; text-overflow: ellipsis; }   /* 8px sides here and on the item, so "12 warnings" fits a phone's 114px column */   /* .chip is flex: none; here a long one shrinks to its column */
.link-bar-item[aria-current=page] > .link-bar-name { font-weight: 600; }   /* as the board's current tab */
/* The current page: a short primary underline at the item's foot, so its chip keeps the plain background. */
.link-bar-item[aria-current=page]::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 2rem; height: 3px;
  transform: translateX(-50%); border-radius: var(--radius-pill); background: var(--primary); }
.link-bar-item:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
@media (hover: hover) {
  .link-bar-item:not([aria-current=page]):hover { background: var(--hover-row); }
  .link-bar-item:hover > .link-bar-detail { color: var(--text); }   /* --muted is 3.1:1 on --hover-row in dark */
}

/* ---- Sheets ---- */
/* .sheet: a native modal <dialog>. On a phone it slides up from the bottom with a handle; from 701px every sheet is a
   card centered above the bottom edge (Joel, 2026-11-12, picked A), or with .sheet-center in the middle; .sheet-steady keeps its full height. Markup: dialog.sheet > .sheet-body > .sheet-handle,
   then the content, with .sheet-section > .sheet-label for labelled groups. src/ui/Sheet.tsx opens and closes it. */
.sheet { position: fixed; inset: auto 0 0 0; width: 100%; max-width: 100%; max-height: 85svh; margin: 0; padding: 0;
         overflow-y: auto; border: 0; border-radius: var(--radius-card) var(--radius-card) 0 0;
         background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); }
.sheet[open] { animation: sheet-up var(--slow) ease-out; }
@keyframes sheet-up { from { transform: translateY(100%); } }
.sheet::backdrop { background: color-mix(in srgb, var(--text) 30%, transparent); }
.sheet-steady { height: 85svh; }   /* one height while its content narrows (the Move list's find), so it never shrinks under a phone keyboard */
@media (min-width: 701px) {   /* B2: sheet floats as a card */
  .sheet { inset: auto 0 var(--sp-5) 0; width: min(var(--column-max), calc(100% - 2 * var(--sp-4))); max-height: 80svh; margin: 0 auto; border-radius: var(--radius-control); }
  .sheet-center { inset: 0; margin: auto; max-height: 95vh; }
  .sheet-steady { height: 95vh; }   /* the Move list: in the middle of the screen (Joel, 2026-11-15) */
}
/* .sheet-fixed: the phone's filter sheet (Joel, 2026-11-15). Its top sits at the
   search field's foot (Sheet's top: the chip row's top, less the field's --sp-2 margin), so the .tab-bar heading it
   lands on the chips and covers them; it keeps one height on every tab, with no handle. Markup: .sheet-body > .tab-bar,
   then a .sheet-fixed-panel holding the rail, whose list scrolls inside, then the foot button, pinned (or, when the
   picks match nothing, a .sheet-foot: a muted .sheet-foot-note over a Show board button). Full width at
   every phone-layout width, since the chips are. */
.sheet.sheet-fixed { inset: calc(var(--sheet-top, 0px) - var(--sp-2)) 0 0 0; width: 100%; height: auto; max-height: none; margin: 0; overflow: hidden;
                     border-radius: var(--radius-card) var(--radius-card) 0 0; }
.sheet-fixed > .sheet-body { box-sizing: border-box; height: 100%; padding-top: var(--sp-2); grid-template-rows: auto minmax(0, 1fr) auto; }
.sheet-fixed-panel { display: flex; flex-direction: column; min-height: 0; }
.sheet-fixed-panel > .rail { flex: 1; }
.sheet-foot { display: grid; gap: var(--sp-2); }   /* when the picks match nothing: the note, then Show board */
.sheet-foot-note { display: grid; place-items: center; min-height: var(--tap); margin: 0; color: var(--muted); font-size: var(--fs-16); }

.sheet-body { display: grid; gap: var(--sp-4); padding: var(--sp-2) var(--sp-4) calc(var(--sp-5) + env(safe-area-inset-bottom, 0px)); }
.sheet-handle { justify-self: center; width: 36px; height: 4px; border-radius: var(--radius-pill); background: var(--line); }
.sheet-section { display: grid; gap: var(--sp-2); }
.sheet-label { margin: 0; color: var(--muted); font-size: var(--fs-13); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
/* .tab-bar: full-width underlined tabs at the head of a sheet (Joel, 2026-11-15).
   Markup: .tab-bar[role=tablist] > button[role=tab][aria-selected]: the words, then a .tab-count pill when that tab has
   picks. The open tab is --text, 600, over a 3px --sun underline; the others --muted. */
.tab-bar { display: flex; margin-inline: calc(-1 * var(--sp-4)); padding-inline: var(--sp-4); border-bottom: var(--border-w) solid var(--line-raised); }
.tab-bar > [role=tab] { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-1); min-height: var(--tap); margin: 0 0 calc(-1 * var(--border-w)); padding: 0 var(--sp-2);
                        border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; color: var(--muted); cursor: pointer;   /* square, so the underline's ends stay straight */
                        font: var(--font-button-weight) var(--fs-16) var(--font-display); }
.tab-bar > [role=tab][aria-selected=true] { color: var(--text); font-weight: 600; border-bottom-color: var(--sun); }
.tab-bar > [role=tab]:focus-visible { outline: 2px solid transparent; outline-offset: -2px; box-shadow: var(--focus-ring-inset); }
.tab-count { display: inline-grid; place-items: center; box-sizing: border-box; min-width: calc(var(--sp-5) - var(--sp-1)); height: calc(var(--sp-5) - var(--sp-1)); padding: 0 var(--sp-1); border-radius: var(--radius-pill);
             background: var(--hover-row); color: var(--text); font-size: var(--fs-13); font-weight: 600; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .popover, .popover[data-flipped], .sheet[open] { animation: none; }
  .menu-item, .menu-chev { transition: none; }
}

/* ---- Choices ---- */
/* .choice: a radio or checkbox as one row of a grouped list (.choice-list), label left and control right: a round
   radio that fills with a dot, a square checkbox that fills with a tick. Markup: .choice-list > label.choice > input +
   span, with any .choice-add rows ("＋ More rooms") last. The input covers the row, visually hidden, so it keeps its
   focus, keyboard and form behavior. Onboarding and the sign-in pages' welcome question both use it. */
.choice { position: relative; display: flex; cursor: pointer; }
.choice > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }
.choice > input + span {
  position: relative; flex: 1; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  min-height: var(--tap-row); padding: 0 var(--sp-4); font-size: var(--fs-16); line-height: 1.3;
}
.choice > input + span::after {
  content: ""; flex: none; box-sizing: border-box; width: 20px; height: 20px;
  border: 1.5px solid var(--line); border-radius: 50%; background: var(--surface);
}
.choice > input[type=checkbox] + span::after { border-radius: var(--radius-control); }
/* The tick: two borders of a small box, turned 45°, centered on the 20px box (just above middle). No image, so no CSP
   has to allow data: URLs. It only shows once checked. */
.choice > input[type=checkbox] + span::before {
  content: ""; position: absolute; right: 23px; top: 50%; box-sizing: border-box; width: 6px; height: 11px; margin-top: -7px;   /* guard: optical — centers the tick */
  border: solid var(--on-primary); border-width: 0 2px 2px 0; border-radius: 0 0 1px 0; /* guard: pip */ transform: rotate(45deg); opacity: 0;
}
.choice > input[type=radio]:checked + span::after { border: 6px solid var(--primary); }
.choice > input[type=checkbox]:checked + span::after { border-color: var(--primary); background: var(--primary); }
.choice > input[type=checkbox]:checked + span::before { opacity: 1; }
.choice > input:disabled + span { opacity: var(--disabled-opacity); }
.choice > input:disabled { cursor: default; }
.choice-list { display: grid; border: var(--border-w) solid var(--line-soft); border-radius: var(--radius-control); background: var(--surface); overflow: hidden; }
.choice-list > :not(:first-child) { border-top: var(--border-w) solid var(--line-soft); }
.choice-add {
  display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: var(--tap-row); padding: 0 var(--sp-4); margin: 0; border: 0; border-radius: 0;
  background: none; color: var(--primary); font: inherit; font-family: var(--font-body); font-weight: 400; font-size: var(--fs-16); text-align: left;
}
.choice-add:hover:not(:disabled) { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.choice > input:focus-visible + span, .choice-add:focus-visible { outline: 2px solid transparent; outline-offset: -2px; box-shadow: var(--focus-ring-inset); }

/* ---- Toast: a note that floats bottom center over the board (Joel, 2026-11-12: one size for every toast) ----
   Tones: .toast-muted (saving), .toast-ok (saved), .toast-danger (a failed save), .toast-sun (good news, the sun on
   --sun-tint). The action is a plain .btn; the ✕ is .toast-close, which the welcome and invite cards reuse in place. */
.toast {
  position: fixed;
  z-index: var(--z-toast);
  left: 50%;
  bottom: calc(var(--sp-3) + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(max(var(--column-max), 40vw), calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));   /* up to 40% of a wide screen (Joel, 2026-11-15) */
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-4);
  border: var(--border-w) solid var(--line-soft);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  line-height: 1.4;
  box-shadow: var(--shadow-pop);
  animation: toast-in var(--fast) var(--ease);
}
@keyframes toast-in { from { opacity: 0; } }
.toast-muted { color: var(--muted); }
.toast-ok { color: var(--ok); }
.toast-danger { color: var(--danger); border-color: var(--danger); }
.toast-sun { background: var(--sun-tint); border-color: var(--edge-sun-soft); color: var(--text); animation-duration: var(--slow); }
.toast-message { flex: 1; min-width: 0; margin: 0; overflow-wrap: anywhere; text-wrap: pretty; text-align: left; }
.toast > .btn { flex: none; white-space: nowrap; }
/* On a very narrow screen the action drops under the message, at the right. */
@media (max-width: 359px) {   /* B3: toast action wraps under */
  .toast { flex-wrap: wrap; }
  .toast:has(> .btn) > .toast-message { flex-basis: 100%; }
  .toast > .btn { margin-left: auto; }
}
/* The ✕: a 44px box. The bare button rule's 0 18px padding would widen it past 44px and push the glyph off center.
   On the --sun-tint card, hover adds a --text wash and a --muted edge (5.7:1 light, 6.3:1 dark against the card) so it
   reads as a button; press deepens the wash; keyboard focus gets the tokens' ring. */
.toast-close {
  flex: none;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: var(--tap);
  height: var(--tap);
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text);
}
.toast-close:hover:not(:focus-visible) { box-shadow: inset 0 0 0 1px var(--muted); }
.toast-close:hover { background: color-mix(in srgb, var(--text) 14%, transparent); }
.toast-close:active { background: color-mix(in srgb, var(--text) 22%, transparent); box-shadow: inset 0 0 0 1px var(--muted); }
.toast-close:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; }
}

/* ---- Admin ---- */
/* The admin pages' parts; their page shell is deploy/tenants/admin/admin.css. Status, from the admin overview. Tone comes from
   data-status: ok, warn or down. .meter: a square pip (an <i>) per thing, ok faint, warn amber, down red, on shared
   tracks at least --pip wide, so pips line up from one meter to the next; the page sorts them worst first. A
   .meter-rest pip stands for many ok things: the page spans it to the end of the row. .cat: a card per group, flush,
   with no box inside: h2.cat-title > button.cat-head (empty, with the group's label; it covers the row and opens the
   group), a <b> name, a .chip count and an optional a.chip link (Joel, 2026-11-13, picked A), then a .choice-list of
   its problem rows, then .cat-meter. The name and count sit on the button without taking taps; the chips go right,
   then the ›. .status-row: icon, .status-text (<b> name, <small> detail) and .status-word ("Down",
   "Warning", "OK"), so status never rests on color alone. As a link or button it gets a ›. Put rows in a .choice-list
   for the dividers. */
/* Each status names its tone once, as --tone; a page with its own statuses adds them the same way (invites.html). */
[data-status=ok] { --tone: var(--ok); }
[data-status=warn] { --tone: var(--warn); }
[data-status=down] { --tone: var(--danger); }
.meter { --pip: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--pip), 1fr)); gap: 2px; min-width: 0; }
.meter > i { aspect-ratio: 1; min-width: 0; border-radius: 2px; /* guard: pip */ background: var(--meter-ok); }
.meter > .meter-rest { aspect-ratio: auto; }
.meter > :is([data-status=warn], [data-status=down]) { background: var(--tone); }

.cat { display: grid; padding: 0; overflow: hidden; }
.cat-title { position: relative; display: flex; align-items: center; gap: var(--sp-2); min-height: var(--tap);
             margin: 0; padding: var(--sp-2) var(--sp-4); font-size: var(--fs-h2); }
.cat-title > * { position: relative; pointer-events: none; }
.cat-title > b { flex: 1; font: inherit; }
.cat-title > a { pointer-events: auto; }
.cat-title::after { content: "›"; position: relative; pointer-events: none; color: var(--muted); font-family: var(--font-body); font-weight: 400; }
.cat-title > .cat-head { position: absolute; inset: 0; pointer-events: auto; }
.cat-head { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; cursor: pointer;
            transition: background-color var(--fast) var(--ease); }
.cat-head:focus-visible { outline: 2px solid transparent; outline-offset: -2px; box-shadow: var(--focus-ring-inset); }   /* flush in a clipped card */
.cat > .choice-list { border: 0; border-radius: 0; border-top: var(--border-w) solid var(--line-soft); }
.cat-meter { padding: var(--sp-3) var(--sp-4); border-top: var(--border-w) solid var(--line-soft); }

.status-row { display: flex; align-items: center; gap: var(--sp-3); box-sizing: border-box; width: 100%; min-height: var(--tap-row);
              padding: var(--sp-2) var(--sp-4); margin: 0; border: 0; border-radius: 0; background: none; color: var(--text);
              font: inherit; font-size: var(--fs-16); line-height: 1.3; text-align: left; text-decoration: none; }
:is(a, button).status-row { cursor: pointer; transition: background-color var(--fast) var(--ease); }
:is(a, button).status-row::after { content: "›"; flex: none; color: var(--muted); }
.status-icon { flex: none; width: var(--icon-md); height: var(--icon-md); fill: none; stroke: currentColor; stroke-width: 2;
               stroke-linecap: round; stroke-linejoin: round; }
.status-text { flex: 1; min-width: 0; display: grid; overflow-wrap: anywhere; }
.status-text > small { color: var(--muted); font-size: var(--fs-13); }
.status-word { flex: none; font-size: var(--fs-13); font-weight: 600; }
/* .status-line: a status as one line of text, icon then words ("Down · app missing"), the whole line in its tone. */
.status-line { display: flex; align-items: center; gap: var(--sp-2); margin: 0; font-weight: 600; }
.status-line[data-status] { color: var(--tone); }
.status-row[data-status] :is(.status-icon, .status-word) { color: var(--tone); }
:is(a, button).status-row:focus-visible { outline: 2px solid transparent; outline-offset: -2px; box-shadow: var(--focus-ring-inset); }   /* flush in a clipped list */
@media (hover: hover) {
  .cat-head:hover, :is(a, button).status-row:hover { background: var(--hover-quiet); }
}
@media (prefers-reduced-motion: reduce) {
  .cat-head, :is(a, button).status-row { transition: none; }
}
/* .admin-nav: the admin pages' <nav> holding their .link-bar (deploy/tenants/admin/nav.mjs), on a surface of its own.
   Every item keeps its detail row (.chip-blank when it has no chip), so the bar never changes height as counts load. */
.admin-nav .link-bar { padding: var(--sp-1); border-radius: var(--radius-card); background: var(--surface); }
.admin-nav .chip-blank { visibility: hidden; }
