*, *::before, *::after { box-sizing: border-box; }
:root { --ogn-icon-upload: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15v4h16v-4M12 16V4M7 9l5-5 5 5'/%3E%3C/svg%3E"); }
/* THE NOTICE'S ICONS (Lachlan, 2026-11-19), one shape each and one family: 24 units, stroke 2, round caps, drawn as masks in the notice's colour. */
:root { --ogn-icon-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-5M12 8h.01'/%3E%3C/svg%3E"); --ogn-icon-success: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M8 12l3 3 5-6'/%3E%3C/svg%3E"); --ogn-icon-warning: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9L1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E"); --ogn-icon-error: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M15 9l-6 6M9 9l6 6'/%3E%3C/svg%3E"); }
body.ogn-body { margin: 0; background: var(--surface); color: var(--on-surface);
  font-family: var(--font-body); font-size: var(--text-m); line-height: var(--leading-body); }
a { color: var(--link); }
h1, h2, h3 { font-family: var(--font-heading); line-height: var(--leading-tight); font-weight: var(--weight-bold); }
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-l); }
code, pre, kbd { font-family: var(--font-mono); font-size: var(--text-s); }
button, input, select, textarea { font: inherit; }
button { min-height: var(--size-touch); padding: var(--space-2) var(--space-4); border-radius: var(--radius-m);
  border: 0; cursor: pointer; background: var(--primary); color: var(--on-primary); font-weight: var(--weight-medium); }
a.ogn-button { display: inline-flex; align-items: center; min-height: var(--size-touch); padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-m); background: var(--primary); color: var(--on-primary); font-weight: var(--weight-medium); text-decoration: none; }
.ogn-button[data-variant="secondary"] { background: transparent; color: var(--primary); box-shadow: inset 0 0 0 var(--border-1) var(--outline); }
.ogn-button[data-variant="danger"] { background: var(--error); color: var(--on-error); }
.ogn-button[data-variant="quiet"] { background: transparent; color: var(--primary); }
.ogn-button[data-variant="secondary"]:hover, .ogn-button[data-variant="quiet"]:hover { background: var(--surface-container); }
button:disabled, .ogn-button:disabled { opacity: 0.6; cursor: not-allowed; }
button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: calc(var(--border-1) * 2) solid var(--primary); outline-offset: calc(var(--border-1) * 2); }
.ogn-visually-hidden { position: absolute; width: var(--border-1); height: var(--border-1); overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Three columns, the brand, the menu and the tools, on one row at every width above a phone's: only
   the menu wraps, within its own column, so the bar never pushes the user menu onto a row of its own. */
.ogn-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: var(--space-2) var(--space-5); padding: var(--space-3) var(--space-5);
  background: var(--surface-container-lowest); border-bottom: var(--border-1) solid var(--outline-variant); }
.ogn-brand { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; color: var(--on-surface);
  text-decoration: none; white-space: nowrap; }
/* Two links, Home on the suite's name and the app's root on its icon and name, drawn as the words they
   hold until hovered. */
.ogn-brand a { display: inline-flex; align-items: center; gap: var(--space-2); color: inherit; text-decoration: none;
  border-radius: var(--radius-s); }
.ogn-brand a:hover > span { text-decoration: underline; text-underline-offset: calc(var(--border-1) * 3); }
.ogn-brand img { display: block; width: var(--size-mark); height: var(--size-mark); border-radius: var(--radius-m); }
/* THE APP'S ICON is a mask over currentColor, not an image: an SVG drawn through <img> is its own document, so its
   currentColor is black whatever the theme (the icon was black on the dark bar, 2026-11-22). Single-colour line art only:
   a mask keeps the icon's shape and none of its colours. */
/* THE BRAND'S ICON ALONE is the bar's first element (Lachlan, 2026-11-19), at the icon's own width whatever the brand's name, so
   nothing after it moves from one brand to the next. It never gives way, and its link, where Home is named, is the icon. */
.ogn-home { flex: none; display: inline-flex; width: var(--size-mark); height: var(--size-mark); }
/* A brand with a dark icon (`brand: icon_dark`, 2026-11-19) draws both and shows one, by the theme in force: the device's where the page sets
   none, else the page's `data-theme`, as the tokens sheet decides. The favicon, manifest and installed icons keep `icon`. */
.ogn-brand .ogn-home-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ogn-brand .ogn-home-light { display: none; }
  :root:not([data-theme="light"]) .ogn-brand .ogn-home-dark { display: block; }
}
:root[data-theme="dark"] .ogn-brand .ogn-home-light { display: none; }
:root[data-theme="dark"] .ogn-brand .ogn-home-dark { display: block; }
.ogn-wordmark { font-family: var(--font-heading); font-size: var(--text-l); font-weight: var(--weight-bold); }
/* THE APP'S NAME is plain text right beside the brand icon, at the bar's left, with no app icon (Lachlan, 2026-12-02: "ditch the icon and
   left justify the text, to be beside the app brand icon in top-left"); the centre is empty. A long name is cut with an ellipsis on one
   line, never wrapped, so the bar stays one row. */
.ogn-label, .ogn-wordmark { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ogn-label { color: var(--on-surface); font-size: var(--text-s); font-weight: var(--weight-medium); }
.ogn-app { display: flex; min-width: 0; margin-inline: 0; overflow: hidden; }
.ogn-organisation { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--on-surface-variant); }
/* A prototype deployment's label, plain and alone, in every app's bar. It never gives way, as the app's label does not. */
.ogn-prototype { flex-shrink: 0; padding: 0 var(--space-2); border-radius: var(--radius-pill); background: var(--tertiary-container);
  color: var(--on-tertiary-container); font-size: var(--text-s); font-weight: var(--weight-medium); }
/* The attention mark in the bar's own buttons (the drawer's menu button, the account button): a dot or a count, its words hidden. */
.ogn-attention { display: inline-block; flex: none; }
.ogn-attention[data-kind="dot"] { width: var(--space-3); height: var(--space-3); border-radius: var(--radius-pill); background: var(--error); }
.ogn-attention > [aria-hidden] { display: inline-block; min-width: var(--space-5); padding-inline: var(--space-1); border-radius: var(--radius-pill);
  background: var(--error); color: var(--on-error); font-size: var(--text-xs); line-height: var(--space-5); text-align: center; }
.ogn-nav-toggle { position: relative; }
.ogn-nav-toggle .ogn-attention { position: absolute; top: var(--space-2); inset-inline-end: var(--space-2); }
.ogn-menu-organisation { margin: 0; color: var(--on-surface-variant); font-size: var(--text-s); }
.ogn-menu { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); }
/* The line between the menu's groups: plain, no label, decorative. Between tabs in a row it stands upright; in a column
   (the drawer, the side column) it lies flat across it. */
.ogn-menu-rule { flex: none; align-self: center; inline-size: 0; block-size: var(--space-5); margin: 0; border: 0;
  border-inline-start: var(--border-1) solid var(--outline-variant); }
.ogn-menu a { color: var(--on-surface-variant); text-decoration: none; white-space: nowrap;
  padding: var(--space-1) 0; border-bottom: calc(var(--border-1) * 2) solid transparent; }
.ogn-menu a:hover { color: var(--on-surface); }
.ogn-menu a[aria-current="page"] { color: var(--on-surface); border-bottom-color: var(--primary); }
.ogn-menu { grid-column: 2; }
/* "More", where the menu's script has moved the items that would have wrapped. */
.ogn-more { position: relative; }
.ogn-more > summary { list-style: none; cursor: pointer; white-space: nowrap; color: var(--on-surface-variant);
  padding: var(--space-1) 0; border-bottom: calc(var(--border-1) * 2) solid transparent; }
.ogn-more > summary::-webkit-details-marker { display: none; }
.ogn-more > summary::after { content: " ▾"; }
.ogn-more.ogn-current > summary { color: var(--on-surface); border-bottom-color: var(--primary); }
.ogn-more-panel { position: absolute; z-index: 10; left: 0; top: 100%; margin-top: var(--space-2); min-width: var(--size-panel);
  display: grid; gap: var(--space-1); padding: var(--space-2) var(--space-4); background: var(--surface-container-lowest);
  border: var(--border-1) solid var(--outline-variant); border-radius: var(--radius-l); box-shadow: var(--shadow-2); }
.ogn-tools { grid-column: 3; display: flex; align-items: center; justify-content: flex-end; gap: var(--space-3); min-width: 0; }
.ogn-tools ogn-user-menu { min-width: 0; max-width: 100%; }
/* The language switch's choices: one form, a button per language, named in that language. */
.ogn-languages { display: grid; gap: var(--space-1); margin: 0; }
.ogn-languages button { min-height: var(--size-touch); padding: var(--space-1) var(--space-2); background: transparent;
  color: var(--on-surface); font-weight: var(--weight-regular); text-align: start; border-radius: var(--radius-s); }
.ogn-languages button:hover:not([disabled]) { background: var(--surface-container); }
.ogn-languages button[aria-current="true"] { font-weight: var(--weight-bold); cursor: default; }
ogn-upload:not(:defined), ogn-drop:not(:defined), ogn-triage-tray:not(:defined), ogn-pino-count:not(:defined) { display: none; }
.ogn-main { max-width: var(--size-content); padding: var(--space-4) var(--space-5) var(--space-7); }
ogn-table th, ogn-table td { text-align: left; vertical-align: top; padding: var(--space-2) var(--space-3);
  border-bottom: var(--border-1) solid var(--outline-variant); }
ogn-table th { color: var(--on-surface-variant); font-weight: var(--weight-bold); }
ogn-table table { border-collapse: collapse; width: 100%; }
ogn-table caption { text-align: left; padding: var(--space-2) 0; color: var(--on-surface-variant); }
ogn-tabs .ogn-tab-heading { font-size: var(--text-l); }
ogn-tabs[upgraded] .ogn-tab-heading { position: absolute; width: var(--border-1); height: var(--border-1); overflow: hidden; clip-path: inset(50%); }
ogn-tabs .ogn-tablist { display: flex; flex-wrap: wrap; gap: var(--space-1); }
ogn-tabs [role="tab"] { min-height: var(--size-touch); padding: var(--space-2) var(--space-4); border: 0;
  border-bottom: calc(var(--border-1) * 2) solid transparent; border-radius: 0; background: transparent; color: var(--on-surface-variant); }
ogn-tabs [role="tab"][aria-selected="true"] { color: var(--on-surface); border-bottom-color: var(--primary); }
ogn-field [slot="error"], ogn-field [slot="hint"] { margin: 0; }
ogn-field .ogn-optional { color: var(--on-surface-variant); font-weight: var(--weight-regular); }
ogn-field .ogn-choices { display: grid; gap: var(--space-1); }
ogn-field .ogn-choice { display: flex; align-items: center; gap: var(--space-2); min-height: var(--size-touch); }
ogn-field .ogn-choice-item { display: contents; }
ogn-field .ogn-choice-hint { margin: calc(var(--space-2) * -1) 0 var(--space-1); padding-left: var(--space-6);
  color: var(--on-surface-variant); font-size: var(--text-s); }
ogn-dialog [slot="actions"] { display: flex; gap: var(--space-3); }
/* The gallery's theme switcher: its pills are links in the light DOM, where the page's `a` colour wins over
   a ::slotted rule, so their colours are set here. */
ogn-theme-switcher > a { color: var(--on-surface); }
ogn-theme-switcher > a[aria-current="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
/* THE PAGE SCAFFOLD every app re-declared in its own page.ex (product/notebook/proposals/
   2026-11-05-ui-patterns-and-copy-design.md §0): a page's sections and forms on a grid, a quiet line, a
   stack of fields, a bordered item, a plain list, a wrapping row, an inline form, a back link. */
.ogn-main > section, .ogn-main > form, .ogn-detail > section { display: grid; gap: var(--space-3); margin: var(--space-4) 0; }
.ogn-main h2 { margin: var(--space-2) 0 0; }
.quiet { color: var(--on-surface-variant); margin: 0; }
.fields { display: grid; gap: var(--space-3); }
.item { display: grid; gap: var(--space-2); padding: var(--space-3) var(--space-4); background: var(--surface-container-lowest);
  border: var(--border-1) solid var(--outline-variant); border-radius: var(--radius-m); }
.item h2, .item h3 { margin: 0; color: var(--on-surface); }
.item p, .item ul, .item dl { margin: 0; }
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.inline { display: inline; margin: 0; }
.back { margin: 0; }
code { overflow-wrap: anywhere; }
details > summary { cursor: pointer; }
ogn-table, ogn-notice { display: block; }
.ogn-main select, .ogn-main input, .ogn-main textarea { max-width: 100%; }
.ogn-main > section > *, .ogn-detail > section > *, .fields > *, .item > *, .filters .row > * { min-width: 0; }
/* A grid item's least width is its content's, so a ledger's table would widen the page at a phone's width
   rather than scroll within itself. */
.ogn-index > *, .ogn-detail > * { min-width: 0; }
/* Op.index and Op.ledger: a sort link in a header, columns aligned to the end, figures in even widths. */
ogn-table th a { color: inherit; }
ogn-table th[aria-sort="ascending"] a::after { content: " ▴"; }
ogn-table th[aria-sort="descending"] a::after { content: " ▾"; }
ogn-table .ogn-end, ogn-table .ogn-num { text-align: end; }
ogn-table .ogn-num, ogn-table .ogn-date { font-variant-numeric: tabular-nums; white-space: nowrap; }
ogn-table tfoot th, ogn-table tfoot td { font-weight: var(--weight-bold); border-bottom: 0;
  border-top: calc(var(--border-1) * 2) solid var(--outline-variant); }
.ogn-index, .ogn-detail { display: grid; gap: var(--space-3); }
.ogn-index > ogn-table::part(scroller) { margin: 0; }
/* Op.detail: the status line, and the facts as label and value side by side. */
.ogn-status-line { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin: 0; color: var(--on-surface-variant); }
.ogn-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-1) var(--space-4); margin: 0; }
.ogn-facts > div { display: contents; }
.ogn-facts dt { color: var(--on-surface-variant); }
.ogn-facts dd { margin: 0; }
/* Op.act: the reason it cannot go ahead, in front, where its button would be. */
.ogn-act { display: grid; gap: var(--space-2); margin: 0; }
.ogn-act-label { margin: 0; font-weight: var(--weight-medium); color: var(--on-surface-variant); }
.ogn-act-reason { margin: 0; }
/* Op.help: the note's words read as body text wherever it sits, a heading included. */
ogn-help { display: inline-block; vertical-align: middle; font-family: var(--font-body); font-size: var(--text-m);
  font-weight: var(--weight-regular); line-height: var(--leading-body); }
ogn-help [slot="title"] { display: block; font-weight: var(--weight-bold); }
ogn-help p { margin: 0; }
ogn-help form { margin: 0; }
/* A phone: ONE ROW, the brand and the tools, the icons first (Lachlan, 2026-11-18). The brand gives way before the tools do; the
   organisation is in the user menu, not the bar; the language choice is in the user menu, and the user menu a person icon. Where
   someone is signed in the tier is in the user menu too, since the badge has no room beside the brand. The pages, where the bar has
   them, wrap on a row of their own, so every item is in view. */
@media (max-width: 40rem) {
  .ogn-bar { grid-template-columns: minmax(0, 1fr) auto; padding: calc(var(--space-1) * 1.5) var(--space-4); gap: var(--space-2) var(--space-3); }
  .ogn-brand { grid-column: 1; grid-row: 1; overflow: hidden; }
  .ogn-organisation { display: none; }
  /* The icon is the app's name on a phone where the bar has the "Prototype" label to fit: its words stay for readers. */
  .ogn-prototype { font-size: var(--text-xs); }
  .ogn-tools { grid-column: 2; grid-row: 1; gap: var(--space-2); }
  .ogn-bar:has(ogn-user-menu) ogn-tier-badge { display: none; }
  .ogn-menu { grid-column: 1 / -1; grid-row: 2; gap: var(--space-1) var(--space-4); }
  .ogn-main { padding: var(--space-4) var(--space-4) var(--space-7); }
  /* Op.index's cards: each row a card, the title cell leading, each line cell under its column's label,
     hidden cells gone. The table stays a table: the header row is hidden from sight only, and no table
     or tbody is made a block, which would strip their meaning. */
  ogn-table[data-phone="cards"] thead tr { position: absolute; width: var(--border-1); height: var(--border-1); overflow: hidden; clip-path: inset(50%); }
  ogn-table[data-phone="cards"] tbody tr { display: grid; gap: var(--space-1); padding: var(--space-3) 0;
    border-bottom: var(--border-1) solid var(--outline-variant); }
  ogn-table[data-phone="cards"] tbody td { padding: 0; border: 0; text-align: start; }
  ogn-table[data-phone="cards"] td[data-phone="title"] { order: -1; font-weight: var(--weight-bold); }
  ogn-table[data-phone="cards"] td[data-phone="line"]::before { content: attr(data-label) ": "; color: var(--on-surface-variant); }
  ogn-table[data-phone="cards"] [data-phone="hide"] { display: none; }
  ogn-table[data-phone="cards"] td[data-phone]:empty { display: none; }
  ogn-table[data-phone="cards"] tfoot { display: none; }
  /* Op.ledger keeps its table and scrolls, its first column held in view. */
  ogn-table[data-ledger] tr > :first-child { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--surface); }
  .ogn-facts { grid-template-columns: minmax(0, 1fr); }
  .ogn-facts dd { margin-bottom: var(--space-2); }
}
/* PENDING (/-/pending.js): the link or button a person chose looks pressed and spins, in the frame it was
   chosen in, and a thin bar runs across the top while the next page is on its way. :root lifts the ring
   above a sort link's arrow, which it takes the place of. The bar is fixed, so nothing moves. */
body[aria-busy="true"] { cursor: progress; }
:root :is(a, area, button, input)[data-pending] { position: relative; top: var(--border-1); opacity: 0.75; pointer-events: none; }
:root :is(a, button)[data-pending]::after { content: ""; display: inline-block; box-sizing: border-box; width: var(--space-4); height: var(--space-4);
  margin-inline-start: var(--space-2); vertical-align: middle; border: calc(var(--border-1) * 2) solid currentColor;
  border-inline-end-color: transparent; border-radius: var(--radius-pill); animation: ogn-spin calc(var(--duration-short) * 6) linear infinite; }
/* The ring keeps its size wherever it is drawn: in a flex box it is a flex item, and without `flex: none` a box of fixed width
   (the brand icon's) shrank it to its left border, a "[" (Lachlan, 2026-12-02, on NSC). On the brand icon, whose box is the icon's
   own width, it is drawn over the icon, centred, so the app's name beside it does not move. */
:root :is(a, button)[data-pending]::after { flex: none; aspect-ratio: 1; }
:root .ogn-brand .ogn-home[data-pending]::after { position: absolute; inset: 0; margin: auto; }
@keyframes ogn-spin { to { transform: rotate(1turn); } }
.ogn-progress { position: fixed; inset: 0 0 auto 0; z-index: 1000; height: calc(var(--border-1) * 3); overflow: hidden;
  pointer-events: none; background: var(--primary-container); }
.ogn-progress::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 40%; background: var(--primary);
  animation: ogn-progress calc(var(--duration-short) * 10) ease-in-out infinite; }
@keyframes ogn-progress { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
/* Asked for less motion: the same marks, still. A whole ring beside the label, and the bar full width. */
@media (prefers-reduced-motion: reduce) {
  :root :is(a, area, button, input)[data-pending] { top: 0; }
  :root :is(a, button)[data-pending]::after { animation: none; border-inline-end-color: currentColor; opacity: 0.6; }
  .ogn-progress::before { animation: none; width: 100%; }
}
/* THE PAGE HEADING AND ITS CONTROL, `Frame.page`'s `h1` slot: a button beside the title (a filter's, say). It wraps under a
   long title. The control's rules state each property a bare `button` rule of an app could change, as the bar's do. */
.ogn-page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); margin-block: var(--space-2) var(--space-5); }
:root .ogn-main .ogn-page-head > h1:first-child { margin: 0; flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.ogn-page-head-slot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); flex: 0 0 auto; max-width: 100%; }
.ogn-page-head-slot :is(button, a.ogn-button) { margin: 0; border: 0; min-width: 0; min-height: var(--size-touch); padding: var(--space-2) var(--space-4); border-radius: var(--radius-m);
  font: inherit; font-weight: var(--weight-medium); letter-spacing: normal; text-transform: none; text-decoration: none; cursor: pointer; box-shadow: none; }
.ogn-page-head-slot :is(button, a.ogn-button):disabled { cursor: not-allowed; }
:root .ogn-page-head-slot :is(button, a, summary):focus-visible { outline: calc(var(--border-1) * 2) solid var(--primary); outline-offset: calc(var(--border-1) * 2); }
/* THE COMPACT LIST, `Op.index`'s `compact` (documentation/components.md, 3). Every rule is under [data-list="compact"], so a list without it draws what it drew before. */
[data-list="compact"] { gap: var(--space-2); }
* + .ogn-index[data-list="compact"] { margin-block-start: var(--space-3); }
[data-list="compact"] .ogn-list-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-2) var(--space-3); }
[data-list="compact"] .ogn-list-head h2 { grid-column: 1; grid-row: 1; margin: 0; min-width: 0; }
/* The filter's <details> gives its two parts to the heading's grid: the button beside the heading, the form under it. */
[data-list="compact"] .ogn-list-filter { display: contents; }
[data-list="compact"] .ogn-list-filter:not([open]) > form { display: none; }
[data-list="compact"] .ogn-list-filter > form { grid-column: 1 / -1; grid-row: 2; margin: 0; }
[data-list="compact"] .ogn-list-filter-toggle { grid-column: 2; grid-row: 1; display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: var(--size-touch); padding: 0 var(--space-3); border-radius: var(--radius-m); color: var(--primary); cursor: pointer;
  list-style: none; white-space: nowrap; font-weight: var(--weight-medium); position: relative;
  border: 0; margin: 0; box-shadow: none; text-transform: none; letter-spacing: normal; }
[data-list="compact"] .ogn-list-filter-toggle::-webkit-details-marker { display: none; }
[data-list="compact"] .ogn-list-filter-toggle:hover { background: var(--surface-container); }
[data-list="compact"] .ogn-list-filter[open] > .ogn-list-filter-toggle { background: var(--secondary-container); color: var(--on-secondary-container); }
[data-list="compact"] .ogn-list-filter-summary { min-width: 0; max-width: var(--size-panel); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--on-surface-variant); font-size: var(--text-s); }
[data-list="compact"] .ogn-list-filter-summary:empty { display: none; }
@media (max-width: 40rem) { [data-list="compact"] .ogn-list-filter-summary { max-width: var(--size-trigger-narrow); } }
[data-list="compact"] .ogn-list-filter-on { padding: 0 var(--space-2); border-radius: var(--radius-pill); background: var(--primary); color: var(--on-primary); font-size: var(--text-s); }
/* The headings: the whole cell is the link, its direction drawn beside the words; a heading that sorts but is not the
   sort shows a faint double mark, so it reads as something to press. */
[data-list="compact"] th[data-sortable] { padding: 0; }
[data-list="compact"] th[data-sortable] > a { display: flex; align-items: center; gap: var(--space-1); min-height: var(--size-touch); padding: var(--space-2) var(--space-3);
  color: inherit; text-decoration: none; }
[data-list="compact"] th[data-sortable] > a:hover { color: var(--on-surface); background: var(--surface-container); }
[data-list="compact"] th[data-sortable] > a::after { content: none; }
[data-list="compact"] .ogn-sort-mark::before { content: "↕"; opacity: 0.45; }
[data-list="compact"] th[aria-sort="ascending"] .ogn-sort-mark::before { content: "↑"; opacity: 1; }
[data-list="compact"] th[aria-sort="descending"] .ogn-sort-mark::before { content: "↓"; opacity: 1; }
[data-list="compact"] th[aria-sort] > a { color: var(--on-surface); }
/* Each row one link: the primary cell's link covers the row; anything else to press in the row sits above it. */
[data-list="compact"] tr[data-row-link] { position: relative; }
[data-list="compact"] tr[data-row-link]:hover { background: var(--surface-container-low); }
[data-list="compact"] td[data-primary] a { color: var(--on-surface); font-weight: var(--weight-medium); text-decoration: none; }
[data-list="compact"] tr[data-row-link]:hover td[data-primary] a { text-decoration: underline; }
[data-list="compact"] td[data-primary] a::after { content: ""; position: absolute; inset: 0; }
:root [data-list="compact"] td[data-primary] a:focus-visible { outline: none; }
[data-list="compact"] td[data-primary] a:focus-visible::after { outline: calc(var(--border-1) * 2) solid var(--primary); outline-offset: calc(var(--border-1) * -2); }
[data-list="compact"] tr[data-row-link] :is(button, input, select, textarea, td:not([data-primary]) a) { position: relative; z-index: 1; }
[data-list="compact"] td, [data-list="compact"] th { overflow-wrap: anywhere; }
/* The row's buttons keep their words whole, in a column as narrow as they are. */
[data-list="compact"] td[data-actions] { width: 1%; white-space: nowrap; overflow-wrap: normal; }
/* A refusal's reason is a sentence, not a button's word: it wraps, in the narrow column and in a phone's card. */
[data-list="compact"] td[data-actions] .ogn-act-reason { white-space: normal; overflow-wrap: anywhere; min-width: calc(var(--space-8) * 3); max-width: 100%; }
[data-list="compact"] thead th:not([data-sortable]) { white-space: nowrap; overflow-wrap: normal; }
/* A filter's choices are never required, so "optional" says nothing there. */
[data-list="compact"] .ogn-list-filter .ogn-optional { display: none; }
@media (max-width: 40rem) {
  /* A phone's cards: the headings that sort stay in view, as a row of links above the cards; the rest are hidden. */
  [data-list="compact"] ogn-table[data-phone="cards"] thead tr { position: static; width: auto; height: auto; overflow: visible; clip-path: none;
    display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); padding-bottom: var(--space-2); border-bottom: var(--border-1) solid var(--outline-variant); }
  [data-list="compact"] ogn-table[data-phone="cards"] thead th { border: 0; padding: 0; height: auto; position: static; background: none; }
  [data-list="compact"] ogn-table[data-phone="cards"] thead th:not([data-sortable]) { position: absolute; width: var(--border-1); height: var(--border-1); overflow: hidden; clip-path: inset(50%); }
  [data-list="compact"] ogn-table[data-phone="cards"] thead th[data-sortable] > a { min-height: var(--size-touch); padding: 0 var(--space-3); border-radius: var(--radius-pill);
    box-shadow: inset 0 0 0 var(--border-1) var(--outline-variant); font-weight: var(--weight-medium); }
  [data-list="compact"] ogn-table[data-phone="cards"] thead th[aria-sort] > a { background: var(--secondary-container); color: var(--on-secondary-container); box-shadow: none; }
  [data-list="compact"] ogn-table[data-phone="cards"] tbody tr { padding: var(--space-3) var(--space-2); }
  /* The cards are the page's to scroll, not a box of their own. */
  [data-list="compact"] ogn-table[data-phone="cards"]::part(scroller) { max-block-size: none; overflow: visible; }
  /* A LIST OF CARDS NEVER TRAPS THE SCROLL (Lachlan, 2026-11-18): the material look boxes a table at `--size-table` and scrolls it inside itself,
     and its rule is the more specific, so the cards rule above never won there. At a phone's width a compact list has no height of its own in
     either mode, so the page scrolls; a scrolling table (`phone="scroll"`) keeps only its sideways scroll. */
  :root[data-look] [data-list="compact"] ogn-table::part(scroller) { max-block-size: none; }
  :root[data-look] [data-list="compact"] ogn-table[data-phone="cards"]::part(scroller) { overflow: visible; }
  [data-list="compact"] ogn-table[data-phone="cards"] td[data-actions]::before { content: none; }
  [data-list="compact"] ogn-table[data-phone="cards"] td[data-actions] { justify-self: start; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  [data-list="compact"] ogn-table[data-phone="cards"] td[data-actions] .ogn-act-reason { min-width: 0; }
}
/* A coarse pointer: the headings, the filter's button and the rows' buttons each 44 px to hit, at every width. */
@media (pointer: coarse) {
  [data-list="compact"] :is(tr[data-row-link] button, th[data-sortable] > a, .ogn-list-filter-toggle),
  [data-list="compact"] ogn-table[data-phone="cards"] thead th[data-sortable] > a { min-height: var(--size-touch-min); }
}
