/* The shell's CSS (finding 7, 2026-09-22): moved out of
   templates/cotton/layout/base.html so the browser can cache it -- the inline
   version was invalidated on every request by its CSP nonce. What stayed inline
   there is per-tenant/per-language: the brand-colour :root block and the three
   translated .planperson content: rules -- see that template's residual
   <style> block, right before this file's <link>. */
/* The letter is Inter, in three weights and nothing else (UX v3, decision JP 2026-11-11,
   "1a"): 400 for what you read, 500 for a column head or a menu item, 600 for a heading.
   Served from our own static files (licence: fonts/Inter-LICENSE.txt, SIL OFL 1.1), so no
   other host sees who opens a page; the policy needs nothing new (`default-src 'self'`).
   `swap`: the text is there at once in the fallback, and Inter takes over when it arrives. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/Inter-Regular.3875f8357497.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/Inter-Medium.7b7f3cfa2944.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/Inter-SemiBold.b72fa2728a8e.woff2") format("woff2"); }

        /* styleguard:off -- token definitions are the source and may be raw */
        /* Admin skin (admin portal): the same app shell, a different brand-colour house style
           (slate/graphite; family via core.colour derivation). :root[data-skin] has
           higher specificity than :root, so this overrides the default/tenant --brand
           as soon as data-skin="admin" is set on <html>. */
        :root[data-skin="admin"] {
            --brand: #37414f; --brand-dark: #2a323d; --brand-action: #58697f; --brand-tint: #f1f2f3;
        }
        :root {
            /* Navigation chevrons as a vector mask (currentColor) instead of text-glyph arrows.
               One source, per direction; used by the disclosure/dropdown carets. */
            --chev-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
            --chev-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 15l6-6 6 6'/%3E%3C/svg%3E");
            --chev-right: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E");
            --chev-left: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 6l-6 6 6 6'/%3E%3C/svg%3E");
            --chev-updown: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 10l4-4 4 4M8 14l4 4 4-4'/%3E%3C/svg%3E");
            /* === Design tokens -- see docs/ontwerpsysteem.html ===
               Brand = tenant-variable (family derived from --brand); the rest is fixed. */
            /* Semantic (fixed). The four fixed text/status colours were darkened on
               2026-08-19 (JP: "volg de norm") so they meet the 4.5:1 that §3G's WCAG 2.2 AA
               asks for -- measured, not estimated, over 21 screens in a real browser:
               --text-muted 3.48 -> 5.19 on white and 4.63 on the palest tint it sits on,
               --danger 4.19 -> 4.68 on its own tint, --warning 3.15 -> 4.63,
               --success 4.04 -> 4.72. Each was the *token*, not the rules using it: one
               value carried every hint, label, chip and notice that failed. */
            --success: #1b7842; --success-dark: #166437; --success-tint: #d5f5e3;
            --danger: #b33528; --danger-tint: #fadbd8; --danger-field: #fdf3f2;
            --warning: #935f0b; --warning-tint: #fdebd0;
            /* Calendar-only colours (data-viz; used by the shift calendar and nothing else —
               easy to tweak here, and no other screen feels it). The generic values
               (--success/--danger/--brand-tint/--card/--txt-*) are reused where they match exactly. */
            --cal-highlighted: #eef5fb; --cal-today-bg: #eaf3fa; --cal-panel: 230px;
            --cal-full-text: #1e6b3f; --cal-full-bg: #eef9f2; --cal-full-border: #bfe3cd;
            --cal-full-headbg: #e3f4ea; --cal-full-headborder: #c2e6d0; --cal-slot-border: #a9dcbd; --cal-external-2: #aee3c4;
            --cal-under-text: #943126; --cal-under-border: #f0cbc5; --cal-under-headbg: #fbe7e4; --cal-under-headborder: #f2c9c3;
            --cal-empty-bg: rgba(192,57,43,0.06);
            --ux-mark: #f6b93b; /* review aid: marks "still needs UX attention" (temporary) */
            /* Neutral & surfaces (fixed) */
            --text: #2c3e50; --text-muted: #646f70; --text-inverse: #ffffff;
            --bg: #f4f6f7; --card: #ffffff; --surface-soft: #fafbfc; --surface-muted: #f6f8fa;
            --surface-desk: #e9ebee;  /* the grey desk a block editor lays its sheet on */
            --surface-icon-set: #b8bfc8;  /* the grey a set of icons is shown on: light, yet white icons stay visible */
            --border: #e3e8ec; --border-strong: #d5dbdb;
            /* The edge you recognise a field by: 3:1 against a card and the blue-grey form card
               (WCAG 1.4.11; --border-strong gave 1.25 to 1.40:1, so an empty field all but
               vanished). UX audit 2026-10-05, JP "1a". A card edge keeps --border: it is layout,
               not a control. */
            --border-field: #7f8c99;
            /* Data table (fixed) */
            --row-hover: #edf4f9; --col-hover: #e3ecf2; --col-filtered: #d2e6f7;
            /* What a row says about itself (`data-row-state`, the import row, JP 2026-10-28, "1a") */
            --row-changed: #eaf3fa; --row-changed-edge: #2e7cb8; --row-empty: #fbf8f1; --row-empty-edge: #d9cfb8;
            /* A field that causes a warning (JP 2026-11-06, "95b"): a shade lighter than --warning-tint,
               which put the soft text at 4.44:1, under AA. */
            --row-warning: #fdf0dc;
            /* Overlay (fixed) */
            --shadow: rgba(0,0,0,0.12); --shadow-strong: rgba(0,0,0,0.28); --divider-on-brand: rgba(255,255,255,0.15); --guide-on-brand: rgba(255,255,255,0.25); --text-inverse-soft: rgba(255,255,255,0.72);
            --scrim: rgba(22,24,29,0.4);
            /* Typography — modular type scale (§3A), base 12px (question 177, "proposal 12", JP
               2026-11-13: every step one down; was 14px since decision JP 2026-10-31, "7a") */
            --txt-xs: 0.625rem; --txt-sm: 0.6875rem; --txt-base: 0.75rem; --txt-lg: 0.9375rem; --txt-xl: 1.0625rem; --txt-2xl: 1.25rem;
            /* Line height (B14, JP 2026-10-21, "4c"): running text, and the compact one for a
               heading, a control, a table cell or a chip. An icon keeps 1 or 0: it is no text. */
            --lh-text: 1.35; --lh-compact: 1.15;
            /* Spacing — 4px base, 8px rhythm (§3B) */
            --sp-1: 0.25rem; --sp-2: 0.5rem; --sp-3: 0.75rem; --sp-4: 1rem; --sp-5: 1.5rem; --sp-6: 2rem;
            /* Radius (§3B) */
            /* Moneybird's structure in our colours (decision JP 2026-10-10, point 9 of the shell
               proposal): fields and buttons 8px, panels and cards 12px. Was 6px and 8px. */
            --radius-sm: 4px; --radius-md: 8px; --radius-lg: 12px; --radius-pill: 999px;
            /* Motion (UX v3, decision JP 2026-11-11, "13a" and "21a"): a menu, panel or page opens in
               `--motion-open`; a change of colour, border or shadow, and a panel closing, takes
               `--motion-change`. The rule for reduced motion stops both. */
            --motion-open: 140ms; --motion-change: 120ms;
            /* The inset of the white segment in a switch bar (UX v3, "9a"): small enough that the bar
               keeps `--control-h` and the segment still reads as lying in it. */
            --switch-gap: 2px;
            /* The tones of an avatar (UX v3, decision JP 2026-11-11, "14a"): eight fixed hues at the
               same lightness, so white initials read on each; the name picks one
               (`core/avatar.py::tone`). */
            --avatar-1: hsl(205 42% 40%); --avatar-2: hsl(160 42% 32%); --avatar-3: hsl(260 32% 46%); --avatar-4: hsl(20 52% 42%);
            --avatar-5: hsl(330 38% 44%); --avatar-6: hsl(45 60% 32%); --avatar-7: hsl(190 48% 32%); --avatar-8: hsl(280 30% 44%);
            /* Height of the fixed app header (topbar); also the sticky offset of the sidebar */
            --head-h: 56px;
            /* The two sizes an icon control may have (principle 9, decision JP 2026-08-20).
               Measured that day, the small controls came out at four sizes -- 30, 32, 26 and
               19px -- and only two of those had a reason. Each of these does:

                 `--control-h`      a control that stands on its own: a card head, a toolbar,
                                    the app header. The size is a free choice, so it is fixed
                                    here rather than per rule.
                 `--control-h-row`  a control inside a table row, which has to stay within the
                                    row height or the row grows around it.

               A third kind takes no token on purpose: an inline marker (`.infobtn`) has to
               run with the line height of the text beside it, so a fixed box is the wrong
               answer there. That is also what keeps it conforming -- WCAG 2.2 SC 2.5.8 asks
               24x24, and an inline target is exempt exactly while it is bounded by the
               surrounding text. */
            /* 32px since the compact shell (decision JP 2026-10-31, "7a" and "2a"); 36px from
               2026-10-10, 1.9rem before. */
            --control-h: 2rem;
            --control-h-row: 1.6rem;
            /* One height for a field (decision JP 2026-09-17, 1a). The composition walk
               measured a text field at 25px on its own, 27px as a select and 28px inside a
               field grid -- three heights for one kind of control, none of them chosen. The
               field-grid row already stood at 28px for the read/edit swap not to jump, so
               that is the value; the colour swatch keeps its own box as a named variant. */
            /* 32px since 2026-10-10 (shell proposal, point 9), still the one height. */
            --field-h: 32px;
            /* Height of the datatable toolbar; sticky offset of the column headers (they sit just
               below the sticky toolbar). One row: field height + vertical padding + border. */
            --tablebar-h: 2.75rem;
            /* Container widths (§3B) — bound form/card/content; data stays fluid */
            --w-sm: 440px; --w-xl: 1000px;
            /* The one label column (UX standard v2, B3; decision JP 2026-10-19, "8a"): a record's
               field grid, a setting row, a translation row. core/tests_field_layout.py holds it. */
            --label-w: 160px;
            /* The sidebar's width (decision JP 2026-10-31, "1a"): the body grid's first column
               and the left edge of the wide side panel read it. */
            --side-w: 224px;

            /* Aliases that point at another token. The rest of this block was
               old-Dutch-name -> new token, and that migration is done as of 2026-08-07:
               --kaart/--tekst/--rand/--primair are themselves now already named --card/
               --text/--border/--brand. After the rename those rules read `--card:
               var(--card)`, and a custom property that points at itself is invalid:
               the card lost its background. */
            --brand-light: var(--brand-action);
            --background: var(--bg);
            --text-soft: var(--text-muted);
        }
        /* styleguard:on */
        * { box-sizing: border-box; }
        /* App frame: the header (head) and sidebar (side) are fixed; only the content area
           (main-content) scrolls -- vertically and, with a wide table, horizontally. That way the
           frame never shifts along. body fills the screen exactly and does not scroll itself. */
        body { margin: 0; font-family: "Inter", "Segoe UI", system-ui, sans-serif; font-size: var(--txt-base); line-height: var(--lh-text); background: var(--background); color: var(--text); display: grid; grid-template-columns: var(--side-w) 1fr; grid-template-rows: var(--head-h) 1fr; grid-template-areas: "head head" "side main-content"; height: 100vh; overflow: hidden; }
        /* The compact line height where text is a name, a control or a cell, not a paragraph (B14). */
        :where(h1, h2, h3, h4, label, .label, button, .button, input, select, th, td, .badge, nav, summary) { line-height: var(--lh-compact); }
        /* Fixed app header (top bar) — brand, sticky; carries the logo, global actions and user menu (no navigation: principle 4) */
        .appheader { grid-area: head; position: sticky; top: 0; z-index: 60; background: var(--brand); color: var(--text-inverse); display: flex; align-items: center; gap: var(--sp-3); padding: 0 var(--sp-4); height: var(--head-h); box-shadow: 0 2px 6px var(--shadow); }
        .app-brand { display: flex; align-items: center; gap: var(--sp-2); color: var(--text-inverse); text-decoration: none; }
        .app-brand-text { font-size: var(--txt-lg); margin: 0; font-weight: 600; }
        /* The portal's logo beside the name: 48px in the 56px bar, 32px with the sidebar
           collapsed and on a phone, where the name would otherwise wrap (decisions JP
           2026-10-20, "1a" and "2a"). A wide logo keeps its height and grows sideways. */
        .app-brand-logo { display: block; height: 48px; width: auto; max-width: 12rem; object-fit: contain; }
        html[data-sidebar="collapsed"] .app-brand-logo { height: 32px; }
        @media (max-width: 800px) { .app-brand-logo { height: 32px; } }
        .appheader-right { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); }
        .appheader .head-icon { width: 16px; height: 16px; }
        a.headerbutton { text-decoration: none; }
        /* No shell navigation (the auth page type): the grid keeps reserving the 224px
           sidebar column and the header row otherwise, which leaves an empty gutter beside a
           login card. One area, and `main` scrolls the page itself. */
        body:is([data-chrome="none"], [data-chrome="frame"]) { grid-template-columns: 1fr; grid-template-rows: 1fr; grid-template-areas: "main-content"; }
        body[data-chrome="none"] main { padding: var(--sp-6) var(--sp-4); }
        /* A page in the frame of a dialog (`chrome="frame"`, decision JP 09-11-2026, "1b"): the
           dialog is its card, so the page has the card's ground and no margin, and a list card
           loses its edge and is as tall as its rows, up to the frame, and then scrolls. */
        body[data-chrome="frame"] { background: var(--card); }
        body[data-chrome="frame"] main { padding: 0; }
        body[data-chrome="frame"] .card--list { /* flat-card-ok: the dialog around the frame is the card */ flex: 0 1 auto; border: 0; border-radius: 0; box-shadow: none; }
        /* The header in the club colour, the sidebar one shade darker (decision JP 2026-10-31,
           "28c"); hover in the sidebar is the header's colour. */
        aside { grid-area: side; background: var(--brand-dark); color: var(--text-inverse); display: flex; flex-direction: column; position: sticky; top: var(--head-h); height: calc(100vh - var(--head-h)); overflow-y: auto; }
        .navbutton { display: none; background: none; border: 0; color: var(--text-inverse); padding: var(--sp-1) var(--sp-2); cursor: pointer; align-items: center; }
        /* Sidebar after Moneybird's structure (shell proposal points 2 and 3, decision JP
           2026-10-10): 224px since the compact shell (JP 2026-10-31, "7a"), an icon before every group, rows of one control height with
           the 8px radius, and the current page as a white pill in the brand colour. The
           subitems line up under the group's label, past the icon. */
        aside { padding: var(--sp-3); }
        aside nav { display: flex; flex-direction: column; flex: 1; }
        /* The Settings link under the main menu, behind a divider (decision JP 2026-10-31, "2a"). */
        aside nav + nav { flex: none; padding-top: var(--sp-2); border-top: 1px solid var(--divider-on-brand); }
        /* The menu is one size, the reading size. A main item is 600 and a subitem 400 at 72%
           white, with a guide line along an open group, so the two levels read apart (decision
           JP 2026-11-15, "1a"; was 500 and 400, question 177). The softer white is a colour, not
           `opacity`, so a contrast check still sees the bar behind it (SidebarLabelContrastTest). */
        aside nav a, summary.navhead, aside [data-sidebar-toggle] { display: flex; align-items: center; gap: var(--sp-3); min-height: var(--control-h); padding: 0 var(--sp-3); border-radius: var(--radius-md); color: var(--text-inverse); text-decoration: none; font-weight: 600; white-space: nowrap; }
        aside nav a .head-icon, summary.navhead .head-icon, aside [data-sidebar-toggle] .head-icon { width: 16px; height: 16px; flex: none; opacity: 0.8; }
        aside nav a:hover, summary.navhead:hover, aside [data-sidebar-toggle]:hover { background: var(--brand); }
        aside nav a.subitem { display: flex; align-items: center; min-height: var(--control-h); padding: 0 var(--sp-3) 0 calc(2 * var(--sp-3) + 16px); border-radius: var(--radius-md); font-size: var(--txt-base); font-weight: 400; color: var(--text-inverse-soft); }
        aside nav details[open] { position: relative; }
        aside nav details[open]::before { content: ""; position: absolute; left: calc(var(--sp-3) + 7px); top: calc(var(--control-h) + 2px); bottom: var(--sp-1); width: 1px; background: var(--guide-on-brand); pointer-events: none; }
        html[data-sidebar="collapsed"] aside nav details::before { display: none; }
        aside nav a.active { background: var(--text-inverse); color: var(--brand); font-weight: 600; }
        aside nav a.active .head-icon { opacity: 1; }
        summary.navhead { font-size: var(--txt-base); cursor: pointer; list-style: none; }
        /* The collapse button: a row like the others, at the foot of the bar. The sub-items and
           this button read softer through their size and weight, not through `opacity`: at 0.85
           the amber UX marking fell to 4.09:1 on the brand blue, and a contrast check cannot see
           the bar behind a translucent label (axe, portal check 2026-10-20). */
        aside [data-sidebar-toggle] { width: 100%; margin-top: var(--sp-2); border: 0; background: none; font: inherit; font-weight: 400; font-size: var(--txt-sm); cursor: pointer; }
        /* Collapsed to the icons: 64px, the labels in `title`, a group with the current page
           in it as the pill. Only on a wide screen; below 800px the sidebar is a drawer. */
        @media not all and (max-width: 800px) {
            html[data-sidebar="collapsed"] body { grid-template-columns: 64px 1fr; }
            html[data-sidebar="collapsed"] aside { padding: var(--sp-3) var(--sp-2); }
            html[data-sidebar="collapsed"] aside nav a > span, html[data-sidebar="collapsed"] summary.navhead > span, html[data-sidebar="collapsed"] aside [data-sidebar-toggle] > span { display: none; }
            html[data-sidebar="collapsed"] aside details > :not(summary) { display: none; }
            html[data-sidebar="collapsed"] summary.navhead::after { display: none; }
            html[data-sidebar="collapsed"] aside nav a, html[data-sidebar="collapsed"] summary.navhead, html[data-sidebar="collapsed"] aside [data-sidebar-toggle] { justify-content: center; padding: 0; }
            html[data-sidebar="collapsed"] aside details:has(a.active) > summary.navhead { background: var(--text-inverse); color: var(--brand); }
            html[data-sidebar="collapsed"] aside [data-sidebar-toggle] .head-icon { transform: scaleX(-1); }
        }
        summary.navhead::-webkit-details-marker { display: none; }
        /* Disclosure caret as a vector chevron (mask, currentColor) instead of a text glyph arrow */
        summary.navhead::after, .profile > summary::after {
            content: ""; display: inline-block; width: 0.72em; height: 0.72em; vertical-align: -0.08em;
            background-color: currentColor;
            -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
            -webkit-mask-position: center; mask-position: center;
            -webkit-mask-size: contain; mask-size: contain; }
        summary.navhead::after { margin-left: auto; opacity: 0.7; -webkit-mask-image: var(--chev-right); mask-image: var(--chev-right); }
        details[open] > summary.navhead::after { -webkit-mask-image: var(--chev-down); mask-image: var(--chev-down); }
        /* Header dropdowns: bell + user menu (native <details>, floating below the button) */
        .notif, .profile { position: relative; }
        .notif > summary, .profile > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--sp-2); color: var(--text-inverse); }
        .notif > summary::-webkit-details-marker, .profile > summary::-webkit-details-marker { display: none; }
        /* 2rem until 2026-08-20, and that was the one size with no reason behind it: the
           header has room to spare, so the bell was simply 2px larger than every other icon
           control in the app. Now the standard size. */
        .headerbutton { position: relative; width: var(--control-h); height: var(--control-h); border-radius: var(--radius-md); border: 1px solid var(--divider-on-brand); background: transparent; color: var(--text-inverse); display: inline-flex; align-items: center; justify-content: center; }
        .notif > summary:hover .headerbutton, .profile > summary:hover { background: var(--brand-dark); }
        .notif-badge { position: absolute; top: -5px; right: -5px; min-width: 1rem; height: 1rem; padding: 0 var(--sp-1); border-radius: var(--radius-pill); background: var(--danger); color: var(--text-inverse); font-size: var(--txt-xs); font-weight: 600; display: flex; align-items: center; justify-content: center; line-height: 1; }
        /* The account button: the first name in the same bordered box as the bell, no avatar
           (decision JP 2026-10-10, "1a", after Moneybird's top bar). */
        .profile > summary { height: var(--control-h); padding: 0 var(--sp-2) 0 var(--sp-3); border-radius: var(--radius-md); border: 1px solid var(--divider-on-brand); font-size: var(--txt-base); font-weight: 500; }
        .profile > summary::after { opacity: 0.8; -webkit-mask-image: var(--chev-down); mask-image: var(--chev-down); }
        .profile .name { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        /* The header menus (shell proposal point 13, JP 2026-10-10): white, 12px, a soft
           shadow, rows without lines; the contents are unchanged. */
        .header-panel { position: absolute; right: 0; top: calc(100% + var(--sp-2)); color: var(--text); min-width: 15rem; z-index: 70; overflow: hidden; border-color: var(--border); border-radius: var(--radius-lg); box-shadow: 0 8px 24px var(--shadow); padding: var(--sp-1); }
        /* The profile menu of the agreed visual (JP 2026-10-11, "1a 2b"): the name and address
           at the top, an icon before each item, a line between the groups. Plain elements in
           the menu, so no class of their own. */
        .profile .header-panel > header { display: flex; flex-direction: column; padding: var(--sp-2) var(--sp-3); font-size: var(--txt-sm); }
        .profile .header-panel > hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-1) 0; }
        .profile .header-panel > p.hint { padding: var(--sp-1) var(--sp-3); }
        .profile a.subitem, .profile button.subitem { display: flex; align-items: center; gap: var(--sp-2); width: 100%; text-align: left; color: var(--text); text-decoration: none; padding: var(--sp-2) var(--sp-3); font-size: var(--txt-sm); background: none; border: 0; border-radius: var(--radius-md); font-family: inherit; cursor: pointer; }
        /* The chosen language: a check mark at the end of the item, a state on the item and
           not a class of its own (the modifier/attribute model of principle 3). */
        .profile .subitem[aria-current] > svg { margin-left: auto; color: var(--success); }
        .profile .subitem > svg { width: 13px; height: 13px; flex: none; }  /* a menu item's icon (rule B1, JP 2026-10-21, "3a") */
        .profile a.subitem:hover, .profile button.subitem:hover { background: var(--brand-tint); }
        /* Notifications panel */
        .notif-panel { width: 21rem; max-width: calc(100vw - var(--sp-4)); }
        .notif-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); font-weight: 600; font-size: var(--txt-sm); }
        .notif-list { max-height: 60vh; overflow-y: auto; }
        /* A notification row: no lines between rows; unread is a dot before the title, in the
           colour of its kind (point 13, JP 2026-10-10; was a coloured left edge). */
        .notif-item { display: block; padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-md); color: var(--text); text-decoration: none; }
        .notif-item:hover { background: var(--brand-tint); }
        .notif-item.unread .notif-title::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: var(--sp-2); vertical-align: 0.1em; border-radius: var(--radius-pill); background: var(--brand-light); }
        /* Only an unread title draws the dot (`content` is set there), so these colour nothing else.
           The title class twice lifts them to the specificity of the rule above, which they follow. */
        .notif-item--error .notif-title.notif-title::before { background: var(--danger); }
        .notif-item--attention .notif-title.notif-title::before { background: var(--warning); }
        .notif-title { display: block; font-weight: 600; font-size: var(--txt-sm); }
        .notif-text { display: block; font-size: var(--txt-sm); color: var(--text-soft); }
        .notif-time { display: block; font-size: var(--txt-xs); color: var(--text-soft); }
        /* The empty panel says so in the one small grey letter (<c-ui.empty>, B13, decision JP
           2026-10-21, 1a), left like the items above it would stand; until then it was centred
           with its own padding and letter. */
        .notif-list > .hint { padding: var(--sp-2) var(--sp-3) 0; }
        /* The top padding here is pulled back up by the sticky card heading
           (`.card:not(.card--list) > .cardhead`, `top`) and the sticky create heading: change one, change the other, and the
           narrow-screen pair in the media query below. */
        main { grid-area: main-content; padding: var(--sp-4) var(--sp-5); min-width: 0; min-height: 0; overflow: auto; }
        /* **The work area is a sheet (UX v3, decision JP 2026-11-11, "11a").** It lies in the dark
           frame with a rounded corner of 12px and an edge of 8px on the right and at the bottom; the
           header and the sidebar keep their two tints ("12", decision JP 2026-10-31). */
        body { background: var(--brand-dark); }
        main { background: var(--background); margin: 0 var(--sp-2) var(--sp-2) 0; border-radius: var(--radius-lg); box-shadow: 0 0 0 1px var(--shadow); }
        /* Without the frame (a page without header and sidebar, a page in a dialog) there is no sheet. */
        body[data-chrome="none"] { background: var(--background); }
        :is(body[data-chrome], html[data-framed] body) main { margin: 0; border-radius: 0; box-shadow: none; }
        .card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-3); margin-bottom: var(--sp-4); }  /* B6: 12px inside since compact (JP 2026-10-31, "3a"), 16px to the next card (JP 2026-10-21, 1a) */
        /* A section of a record screen's panel (decision JP 2026-10-10, shell proposal point 6):
           no surface of its own, the card around it is the panel; a thin line runs to the next
           section, with the card's own padding on either side of it.
           A section can hold sections (the editable Person section of the person screen holds
           Address and Contact, one form for the tab); those draw the same line. */
        .section + .section, .section > .section { border-top: 1px solid var(--border); margin-top: var(--sp-4); padding-top: var(--sp-3); }
        /* The weight of a heading follows its role, set here once (rule B7, decision JP 2026-10-19, "8a"). */
        h1 { font-size: var(--txt-xl); font-weight: 600; }
        /* The card heading is the size of the text it heads, set apart by its weight (UX v3,
           decision JP 2026-11-11, "3a"): 14/600, in every card the same. */
        h2 { font-size: var(--txt-base); font-weight: 600; }
        /* What the browser draws bold by itself gets the heading weight: Inter has no 700, so it
           would be a fake bold (UX v3, decision JP 2026-11-11, "1a"; review Arch on #3054). A
           column head keeps its 500 (thead th, below). */
        b, strong, th { font-weight: 600; }
        /* What you read or operate is 14px; a column head and a field's label are 12px and grey
           (UX v3, decision JP 2026-11-11, "2a"). A table, a field, a button and a menu choice
           take --txt-base; thead th, label and .fieldgrid > .label keep --txt-sm. */
        /* The record heading is the one step above 20px (UX v3, decision JP 2026-11-11, "15a"):
           the title of a record screen, set by <c-layout.recordpage> (`record` on the card page). */
        .heading--record { font-size: var(--txt-2xl); }

        /* Blocks: data that belongs together, each in a frame of its own */
        .blockgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--sp-2) var(--sp-5); align-items: start; }
        /* Flat block (§3C): no box-in-box; grouping via an h3 heading with a thin rule.
           No width cap of its own: a card is as wide as the page and the fields keep their own
           width (decision JP 2026-10-13, "1a", the Moneybird comparison). */
        .block { padding: 0; }
        .block h3 { margin: 0 0 var(--sp-2); border-bottom: 1px solid var(--border); padding-bottom: var(--sp-1); }
        /* A block heading with a button (<c-ui.block>'s `actions` slot, 2026-09-29): the rule
           runs under the whole row and the buttons stand on it at the right, centred on the
           title, like every heading beside a control (the composition walk of
           core/tests_uniformity.py measures that centre). Their negative block margins
           (half of what a button is taller than the title line) keep the heading at the
           height of a bare block heading -- otherwise this block's fields start lower than
           those of the blocks beside it. When title and buttons do not fit on one line the
           buttons move under the title instead of covering it (UX inventory 26-10-2026,
           decision JP "1a"); the row gap gives back what the margins took. */
        .block > .cardhead { display: flex; flex-wrap: wrap; align-items: center; row-gap: calc(var(--sp-2) + var(--control-h) - var(--txt-sm) * var(--lh-text)); margin: 0 0 var(--sp-2); border-bottom: 1px solid var(--border); padding-bottom: var(--sp-1); }
        .block > .cardhead h3 { flex: 1 1 auto; margin: 0; border-bottom: 0; padding-bottom: 0; line-height: inherit; }
        /* A block whose heading is a grey band (<c-ui.block band>, decision JP 15-11-2026, "1a"):
           one level under the section, a component on Rates with its rules below it. */
        .block--band > :is(h3, .cardhead) { border-bottom: 0; border-radius: var(--radius-sm); background: var(--surface-muted); padding: var(--sp-1) var(--sp-2); }
        /* A block on a panel in the brand tint (<c-ui.block tint>, decision JP 17-11-2026, "1a"): the
           rules that give a kind of membership, set apart from its components below. */
        .block--tint { background: var(--brand-tint); border-radius: var(--radius-sm); padding: var(--sp-2); }
        .block--tint > :is(h3, .cardhead) { border-bottom: 0; padding-bottom: 0; }
        .block--tint + .block { margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid var(--border); }
        /* A table one level down (<c-ui.tableframe indented>, decision JP 15-11-2026, "1a"): 40px in,
           with a line in the brand colour on the left, so where its rows hang reads from where they stand. */
        .tableframe--indented { margin-left: calc(var(--sp-6) + var(--sp-2)); border-left: 2px solid var(--brand-action); padding-left: var(--sp-2); }
        .block > .cardhead > :not(h3) { margin: calc((var(--txt-sm) * var(--lh-text) - var(--control-h)) / 2) 0 calc((var(--txt-sm) * var(--lh-text) - var(--control-h)) / 2) auto; max-width: 100%; flex-wrap: wrap; justify-content: flex-end; }
        .cardfoot { margin-top: var(--sp-3); padding-top: var(--sp-2); border-top: 1px solid var(--border); color: var(--text-soft); font-size: var(--txt-sm); }

        /* Tables: subtle and compact, the same on every page */
        table { width: 100%; border-collapse: collapse; font-size: var(--txt-base); }
        th, td { text-align: left; padding: var(--sp-1) var(--sp-2); border-bottom: 1px solid var(--border); }
        /* A white head with soft text and one thin line, and no zebra: the rows are told apart
           by their lines and the hover (shell proposal point 5, decision JP 2026-10-10). */
        /* The head text in the small size rather than the extra small one, as in the agreed
           visual (JP 2026-10-11, "1a 2b"). */
        thead th { background: var(--card); color: var(--text-soft); font-weight: 500; font-size: var(--txt-sm); border-bottom: 1px solid var(--border); white-space: nowrap; }
        tbody tr:hover td { background: var(--row-hover); }
        /* What a row says about itself (`row_state` on `core/tables.py::build_table`, the import
           row, decision JP 2026-10-28, "1a"): a changed row is light blue with a blue edge and
           its new value bold, a value empty in the file sand with a softer text, a column that
           goes nowhere grey. The new value is the cell after the arrow, the old one before it.
           The soft text stays at AA on every one of them (`core/tests_house_style.py`): on the
           desk grey it fell to 4.34:1 (measured 28-10-2026). */
        tbody tr[data-row-state="changed"] td { background: var(--row-changed); }
        tbody tr[data-row-state="changed"] td:first-child { box-shadow: inset 3px 0 0 var(--row-changed-edge); }
        tbody tr[data-row-state="changed"] td:has(+ td[data-arrow]) { color: var(--text-soft); }
        tbody tr[data-row-state="changed"] td[data-arrow] + td { font-weight: 600; }
        tbody tr[data-row-state="empty"] td { background: var(--row-empty); color: var(--text-soft); }
        tbody tr[data-row-state="empty"] td:first-child { box-shadow: inset 3px 0 0 var(--row-empty-edge); }
        tbody tr[data-row-state="unmapped"] td { background: var(--surface-muted); color: var(--text-soft); }
        /* A field that causes a warning (JP 2026-11-06, "95b"): the tint and edge of the warning
           bar, a shade lighter; one that also changes keeps the arrow and its new value in bold. */
        tbody tr[data-row-state="warning"] td { background: var(--row-warning); }
        tbody tr[data-row-state="changed-warning"] td { background: var(--row-warning); }
        tbody tr[data-row-state="warning"] td:first-child { box-shadow: inset 3px 0 0 var(--warning); }
        tbody tr[data-row-state="changed-warning"] td:first-child { box-shadow: inset 3px 0 0 var(--warning); }
        tbody tr[data-row-state="changed-warning"] td:has(+ td[data-arrow]) { color: var(--text-soft); }
        tbody tr[data-row-state="changed-warning"] td[data-arrow] + td { font-weight: 600; }
        /* The arrow between a value before and after: a column as narrow as the arrow (1px makes
           the table give it no share of the spare width), an arrow only on a
           changed row. */
        table.datatable th[data-arrow], table.datatable td[data-arrow] { width: 1px; padding-inline: var(--sp-1); text-align: center; color: var(--text-soft); }
        table.datatable td[data-arrow] svg { width: 16px; height: 16px; vertical-align: -0.2em; }
        /* Column groups (a `group` on a column): a bar in the light brand colour above the
           titles, no capitals, and a thicker line where a group starts, through the whole
           table; between two bars the line is a white gap (JP 2026-10-28, "1a"). */
        thead tr.column-groups td { background: var(--card); padding-block: var(--sp-1); font-size: var(--txt-sm); font-weight: 600; white-space: nowrap; }
        thead tr.column-groups td[data-group] { background: var(--brand-tint); color: var(--brand); }
        table.datatable [data-group-start] { border-left: 2px solid var(--border-strong); }
        thead tr.column-groups td[data-group-start] { border-left: 4px solid var(--card); }
        /* A row in a card is about 40px high, in a list and on a detail screen alike (decision
           JP 2026-10-13, "3a"): detail tables ran from 25 to 48px. A height on a cell is a
           minimum, so a row with two lines of text still grows. */
        .card table :is(th, td) { height: 2.5rem; padding-top: 0; padding-bottom: 0; }
        th.sortable { cursor: pointer; user-select: none; }
        th.sortable:hover { background: var(--col-hover); }
        .sortmarker { margin-left: var(--sp-1); color: var(--brand-light); font-size: var(--txt-xs); }

        /* Dragging columns (order) and resizing their width. The wrapper is no longer a
           scroll context (the page scrolls, not the table) -- it only serves as the width reference
           for the column fit. That way the sticky column headers keep sticking to the page. */
        .tablewrap { min-width: 0; }
                /* Column headers stick vertically just below the sticky toolbar (§datatable-frame). `position:
           sticky` is also the positioning context for the resize handle (previously `relative`). */
        table.datatable thead th { position: sticky; top: var(--tablebar-h); z-index: 3; }
        /* A row 36px, the heading 32px (compact, decision JP 2026-10-31, "7a"). */
        table.datatable tbody td { height: calc(var(--control-h) + var(--sp-1)); padding-block: 0; }
        table.datatable thead th { height: var(--control-h); padding-block: 0; }
        /* The corner (sticky top as well as sticky left) has to stay over the headers that scroll along. */
        table.datatable thead th.selectcolumn, table.datatable thead th.actioncolumn { z-index: 4; }
        /* Handle inside the column border (right: 0, not -4px): otherwise the handle of the
           last column stuck out 4px beyond the table and that pulled in a tiny horizontal scrollbar. */
        .columnhandle { position: absolute; top: 0; right: 0; width: 8px; height: 100%; cursor: col-resize; z-index: 5; }
        .columnhandle:hover { background: var(--brand-light); opacity: 0.4; }
        th.dragging { opacity: 0.45; }
        th.droptarget { box-shadow: inset 3px 0 0 var(--brand-light); }
        td a { text-decoration: none; }
        td a:hover { text-decoration: underline; }

        a { color: var(--brand-light); }
        .button { display: inline-block; background: var(--brand-light); color: var(--text-inverse); border: 0; border-radius: var(--radius-md); padding: var(--sp-2) var(--sp-4); cursor: pointer; text-decoration: none; font-size: var(--txt-base); }  /* the size of what you read in a field (UX v3, JP 2026-11-11, "2a") */
        .button:hover { background: var(--brand); text-decoration: none; }
        /* A button with a label is --control-h high, like every other control on its own (shell
           proposal point 9; measured 11-10: 33px from the padding alone). Flex keeps the label and
           an icon before it on one centre line. An icon button and a small one keep their size. */
        .button:not(.button--icon, .button--small) { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); min-height: var(--control-h); padding-block: var(--sp-1); }
        /* Secondary is white with a line around it (the Moneybird shell, decision JP 11-10 "1a 2a"):
           the main action is the one filled button in sight. The border is inset, so the size
           stays that of a filled button.
           An icon button wears the same, unless it is red or green: in the agreed visual every
           icon button is white with a line, the plus that unfolds an input row first of all
           (JP 2026-10-11, "1a 2b"); a filled icon button read as a second main action. */
        .button--secondary, :not(.button--danger, .button--success).button--icon { background: var(--card); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
        .button:hover.button--secondary, .button:hover:not(.button--danger, .button--success).button--icon { background: var(--surface-muted); }
        /* In a table's toolbar a white button has no line, only a grey surface under the pointer
           (UX v3, decision JP 2026-11-11, "4a"): there it is a tool of the table. In a card's head
           it keeps its line, like in the page head: one white button everywhere (decision JP
           2026-11-15, "5b"; beside the season picker a button without a line read as loose text). */
        .tablebar .button--secondary.button--icon { box-shadow: none; border-color: transparent; background: transparent; }
        .tablebar :is(:hover, [open] > *).button--secondary.button--icon { border-color: transparent; background: var(--surface-muted); }
        .button--danger { background: var(--danger); }
        .button--small { padding: var(--sp-1) var(--sp-2); font-size: var(--txt-sm); line-height: 1rem; }  /* 16 + 2 x 4 = a 24px target (WCAG 2.5.8, JP 2026-10-05 1a) */
        .button:disabled { opacity: 0.45; cursor: default; }
        .button--icon { width: var(--control-h); height: var(--control-h); flex: none; padding: 0; font-size: var(--txt-base); line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
        .button--success { background: var(--success); }
        .button--success:hover { background: var(--success-dark); }
        .button svg { width: 16px; height: 16px; flex: none; }  /* labelled button with an icon (e.g. a dialog confirm); .button--icon overrides it below */
        .button--icon svg { width: 16px; height: 16px; }
        /* An icon beside text is 16px, in a heading too: one size wherever it stands (rule B1,
           decision JP 2026-10-21, "3a"; it used to be 1em, 22px in a page heading). */
        .head-icon { width: 16px; height: 16px; vertical-align: -0.125em; }
        /* The shared template-editor classes (e-mail and invoice editor). On the tokens since
           2026-10-19 (step A of the editor review, decision JP 19-10, "1a"): field height,
           the row control height and the radius of fields and buttons, labels by the global
           label rule, no literal colours. */
        .paletteblock { border: 1px solid var(--border); background: var(--card); border-radius: var(--radius-md); padding: var(--sp-2); cursor: grab; font-size: var(--txt-sm); user-select: none; }
        .paletteblock:hover { background: var(--row-hover); border-color: var(--border-strong); }
        .paletteblock[aria-disabled="true"], .paletteblock[aria-disabled="true"]:hover { opacity: 0.45; cursor: default; background: var(--surface-muted); border-color: var(--border); }
        .panel-label { display: block; font-size: var(--txt-sm); font-weight: 400; color: var(--text-soft); margin: var(--sp-2) 0 var(--sp-1); }
        .panel-input { width: 100%; box-sizing: border-box; height: var(--field-h); font-size: var(--txt-base); padding: 0 var(--sp-2); border: 1px solid var(--border-field); border-radius: var(--radius-md); }
        .panel-number { width: 3.4rem; box-sizing: border-box; height: var(--field-h); font-size: var(--txt-base); padding: 0 var(--sp-1); border: 1px solid var(--border-field); border-radius: var(--radius-md); }
        /* A choice bar has the one control height too (decision JP 2026-10-21, "1b"): it stood at the
           row height beside undo and redo at 36px. */
        .panel-button { flex: 1; min-width: 0; height: var(--control-h); font-size: var(--txt-base); padding: 0; border: 0; border-left: 1px solid var(--border-strong); border-radius: 0; background: var(--card); color: inherit; cursor: pointer; }
        .panel-button:first-child { border-left: 0; }
        .panel-button:not(.panel-button--active):hover { background: var(--row-hover); }
        .panel-button--active { background: var(--brand-light); color: var(--text-inverse); font-weight: 600; }
        .toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); margin-bottom: var(--sp-2); }
        /* A toolbar has one size, the one of the table toolbar (decision JP 2026-10-21, "2a"); until
           that day the editors' tools stood at the row height. */
        .tb-button { position: relative; flex: 0 0 auto; box-sizing: border-box; min-width: var(--control-h); height: var(--control-h); display: inline-flex; align-items: center; justify-content: center; gap: calc(var(--sp-1) / 2); padding: 0 var(--sp-2); font-size: var(--txt-sm); line-height: 1; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--card); color: inherit; cursor: pointer; }
        .tb-button:hover { background: var(--row-hover); }
        .tb-button.active { background: var(--row-hover); border-color: var(--brand); color: var(--brand); }
        .tb-button svg { width: 16px; height: 16px; }
        .panel-link { border: 0; background: none; color: var(--text-soft); cursor: pointer; font-size: var(--txt-sm); padding: 0; }
        .panel-section { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-soft); padding: 0 var(--sp-3) var(--sp-2); margin-bottom: var(--sp-2); }
        .panel-section:last-child { margin-bottom: 0; }
        /* A section folds open and shut (a <details>, see `groupPanelSections` in helpers.js). */
        .panel-section > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; margin: 0 0 var(--sp-1); padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); }
        .panel-section:not([open]) > summary { margin-bottom: 0; border-bottom: 0; }
        .panel-section > summary::-webkit-details-marker { display: none; }
        .panel-section > summary::after { content: ""; width: 0.72em; height: 0.72em; flex: none; background-color: var(--text-soft); -webkit-mask: var(--chev-right) center / contain no-repeat; mask: var(--chev-right) center / contain no-repeat; }
        .panel-section[open] > summary::after { -webkit-mask-image: var(--chev-down); mask-image: var(--chev-down); }
        .panel-section > summary > h4 { margin: 0; }
        /* Four (or two) number fields with the name of their side underneath (decision JP 19-10, "1a"). */
        .panel-sides { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--sp-1); }
        .panel-sides > label { display: flex; flex-direction: column; align-items: center; gap: calc(var(--sp-1) / 2); margin: 0; }  /* the side name is a label like any other: the global `label` rule sets its type (uniformity guard, 2026-10-20) */
        .panel-sides .panel-number { width: 100%; text-align: center; }
        /* The sticky formatting panel of the block editors (<ui.blockpanel>). Deliberately
           OUTSIDE the exception zone above: this is chrome around the canvas, not the
           document being edited, so it is token-driven and guarded like the rest of the
           house style. Until 2026-08-16 it was four inline styles in a partial. */
        /* 304px since 2026-10-21 (decision JP, "1a"): wide enough for the text toolbar at the
           one toolbar size on one line, also with the panel's own scrollbar of up to 17px
           beside it (measured with a 15px scrollbar: one line from 300px on). */
        .panel-box { flex: 0 0 304px; position: sticky; top: var(--sp-2); overflow: hidden; font-size: var(--txt-base); }
        .panel-head { background: var(--surface-muted); border-bottom: 1px solid var(--border); padding: var(--sp-2); display: flex; justify-content: space-between; align-items: center; }
        .panel-box .panel-head h4 { margin: 0; }  /* wins over the base `.panel h4` top margin */
        .panel-body { padding: var(--sp-2); }
        /* The two block editors (e-mail and invoice): their fixed layout and the pieces of the
           formatting panel. Outside the exception zone above for the same reason as the panel
           box: this is chrome around the document, so it is token-driven. Until 2026-09-30 it
           was inline `style` attributes and `cssText` in both editors and in
           `_blockwidgets.html`, each editor with its own spacings for the same row
           (decision JP 30-09, "1a": the content security policy is closing for inline style). */
        .editor { display: flex; gap: var(--sp-3); align-items: flex-start; }
        .editor-palette { flex: 0 0 196px; }
        .editor-palette-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
        /* A hint keeps its one margin (0 above, `:where(p, div).hint`); the palette and a field in the
           panel set the room above it, as the tabs do on a list card (decision JP 20-10, "1a"). */
        .editor-palette-list:has(+ .hint), .panel-section > :has(+ .hint) { margin-bottom: var(--sp-2); }
        /* A palette block as a tile: the icon above the name (decision JP 19-10, "1a"). */
        .paletteblock--tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-1); min-height: 4rem; text-align: center; line-height: var(--lh-compact); }
        .paletteblock--tile .head-icon { width: 16px; height: 16px; vertical-align: 0; }
        .editor-palette-list--off { opacity: 0.4; pointer-events: none; }  /* page preview: nothing to drag */
        .editor-canvas { flex: 1; background: var(--surface-desk); border-radius: var(--radius-lg); padding: var(--sp-3); max-height: 78vh; overflow: auto; }
        /* The editor over the full height (step D, decision JP 2026-10-19, "1a"): main is a column,
           the heading and the details take their own height and the editor the rest, so only the
           desk scrolls the document, with 8px around it, and the panel scrolls its own body.
           `min-height` keeps a short window usable: below it main scrolls as before. */
        @media not ((max-width: 999px) or (pointer: coarse)) {  /* where .desktop-only shows */
            main:has(> .desktop-only > .editor) { display: flex; flex-direction: column; }
            main:has(> .desktop-only > .editor) > .desktop-only { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
            .desktop-only > .editor { flex: 1 1 auto; min-height: 24rem; align-items: stretch; }
            .desktop-only > .editor > .editor-palette { align-self: flex-start; }
            .desktop-only > .editor > .editor-canvas { max-height: none; padding: var(--sp-2); }
            .desktop-only > .editor > .panel-box { position: static; align-self: flex-start; max-height: 100%; display: flex; flex-direction: column; }
            .desktop-only > .editor > .panel-box > .panel-body { min-height: 0; overflow: auto; }
        }
        .editor-zoombar { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-4); position: sticky; top: 0; z-index: 3; margin-bottom: var(--sp-2); }
        .editor-tools { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-1); }
        .editor-tools--end { align-items: flex-end; }
        .editor-sheet-box { margin: 0 auto; }
        /* The A4 sheet: its size is the paper's, not the screen's; the script scales it for zoom. */
        .editor-sheet { display: block; width: 794px; height: 1123px; transform-origin: top left; border: 0; border-radius: var(--radius-lg); background: var(--card); box-shadow: 0 1px 4px var(--shadow); }
        .editor-sheet--page { background: var(--surface-desk); }
        .icon-medium { width: 16px; height: 16px; flex: none; }
        .panel-gauge { display: inline-block; min-width: 2.3rem; text-align: center; }
        .panel-number--narrow { width: 2.75rem; }
        .panel-options { display: flex; border: 1px solid var(--border-strong); border-radius: var(--radius-md); overflow: hidden; background: var(--card); }  /* one bar, the chosen option in the brand colour */
        .panel-options svg { width: 16px; height: 16px; vertical-align: middle; }
        .panel-options--wide svg { width: 30px; }  /* the line-style icons draw a line, not a glyph */
        .panel-item { display: flex; align-items: center; gap: var(--sp-1); margin-bottom: var(--sp-1); }  /* one network: name, address, remove */
        .panel-item > .panel-label { flex: 0 0 4.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .panel-item > .panel-input { flex: 1; min-width: 0; }
        .panel-link--danger { color: var(--danger); }
        .panel-colour-bar { position: absolute; left: 5px; right: 5px; bottom: 3px; height: 3px; background: var(--text); }
        /* A cell with its four sides as buttons; the script only sets each line's colour and thickness. */
        .panel-border-preview { position: relative; width: 46px; height: 30px; margin: var(--sp-2) auto var(--sp-1); background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); }
        .panel-border-side { position: absolute; border: 0; background: transparent; padding: 0; cursor: pointer; }
        .panel-border-side--top { left: 0; right: 0; top: -4px; height: 9px; }
        .panel-border-side--bottom { left: 0; right: 0; bottom: -4px; height: 9px; }
        .panel-border-side--left { top: 0; bottom: 0; left: -4px; width: 9px; }
        .panel-border-side--right { top: 0; bottom: 0; right: -4px; width: 9px; }
        .panel-border-line { position: absolute; background: var(--border-strong); }
        .panel-border-side--top .panel-border-line, .panel-border-side--bottom .panel-border-line { left: 0; right: 0; top: 50%; transform: translateY(-50%); height: 1px; }
        .panel-border-side--left .panel-border-line, .panel-border-side--right .panel-border-line { top: 0; bottom: 0; left: 50%; transform: translateX(-50%); width: 1px; }
        /* The colour picker, the dropdown and the popover of the shared widgets. */
        .panel-picker { position: relative; display: inline-flex; align-items: center; gap: var(--sp-1); }
        .panel-picker > .panel-input { width: 5.6rem; }  /* the colour code next to its swatch */
        .panel-swatch { position: relative; flex: none; width: var(--field-h); height: var(--field-h); padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--card); cursor: pointer; }
        .panel-swatch > .panel-colour-bar { inset: 3px; height: auto; border-radius: var(--radius-sm); }  /* the text colour fills its swatch */
        .panel-swatch:disabled { opacity: 0.4; cursor: not-allowed; }
        .panel-popover { position: fixed; z-index: 1000; background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--radius-md); box-shadow: 0 4px 14px var(--shadow); padding: var(--sp-2); }
        .panel-popover .panel-input { flex: 1; min-width: 0; }
        .panel-popover--colour { width: 150px; }
        .panel-popover--link { width: 230px; }
        .panel-popover--menu { padding: var(--sp-1); max-height: 220px; overflow: auto; }
        .panel-icon-set { display: inline-flex; align-items: center; gap: var(--sp-1); margin-left: var(--sp-2); padding: var(--sp-1); vertical-align: middle; border-radius: var(--radius-sm); background: var(--surface-icon-set); }  /* a few icons of one set in a choice list, the same grey for every set (JP 2026-10-20) */
        /* A row with previews: the name left, the grey at the right edge, so the sets line up whatever
           the length of their name (decision JP 2026-10-21, "1a"). Other menu rows keep their look. */
        .tb-menu-item:has(.panel-icon-set) { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
        .tb-menu-item:has(.panel-icon-set) > .panel-icon-set { margin-left: 0; flex: none; }
        .panel-swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--sp-1); margin-bottom: var(--sp-2); }
        .panel-swatches button { width: 100%; height: 20px; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid var(--border-strong); }
        .panel-more { display: inline-flex; align-items: center; gap: var(--sp-2); margin: var(--sp-2) 0 0; font-size: var(--txt-sm); font-weight: 400; color: var(--text-soft); cursor: pointer; }
        .panel-more input { width: 22px; height: 22px; padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; }
        .tb-menu-item { display: block; width: 100%; text-align: left; border: 0; background: none; height: auto; padding: var(--sp-1) var(--sp-2); }
        .tb-button--end { margin-left: auto; }
        /* The merge field menu of the mail editor (decision JP 22-10-2026, "1a" and "2a"): a group
           heading that folds its fields open and shut, with the count at the right, and the fields
           under it, indented; one that this template cannot fill is greyed out. */
        .panel-popover--merge { width: 260px; max-height: min(480px, 70vh); }
        .panel-popover--merge > .panel-input { width: 100%; margin-bottom: var(--sp-1); }
        .merge-menu-group { display: flex; align-items: center; gap: var(--sp-2); width: 100%; padding: var(--sp-2) var(--sp-2) var(--sp-1); border: 0; background: none; color: var(--text-soft); font-size: var(--txt-sm); font-weight: 600; text-align: left; cursor: pointer; }
        .merge-menu-group > svg { width: 13px; height: 13px; flex: none; transition: transform var(--motion-change); }
        .merge-menu-group[aria-expanded="true"] > svg { transform: rotate(90deg); }
        .merge-menu-group > span + span { margin-left: auto; font-weight: 400; }
        .merge-menu-item { padding-left: var(--sp-6); }  /* under the group name, past its chevron */
        .merge-menu-item[aria-disabled="true"] { color: var(--text-soft); opacity: 0.6; cursor: not-allowed; background: none; }
        /* A merge field in the text of a mail block: one piece with its name, not the code. It
           repeats the font stack of `body` on purpose: the chip stands in the frame of the mail,
           which has a font of its own. */
        .merge-chip { display: inline-flex; align-items: center; gap: var(--sp-1); padding: 0 var(--sp-2); border: 1px solid var(--border-strong); border-radius: var(--radius-pill); background: var(--surface-muted); color: var(--text); font-family: inherit; font-size: var(--txt-sm); font-weight: 400; line-height: var(--lh-compact); vertical-align: baseline; white-space: nowrap; user-select: all; }
        .merge-chip > svg { width: 13px; height: 13px; flex: none; color: var(--text-soft); }
        /* The text of an automatic e-mail with its merge fields as chips (decision JP 23-10-2026,
           "1b"): a plain text box without an editor. Its look as a field (border, padding, the
           required mark, the error) comes from the rules for `input, select, textarea`; here
           only what this box alone has. */
        .merge-text { box-sizing: border-box; width: 100%; min-height: 10rem; background: var(--card); white-space: pre-wrap; overflow-wrap: anywhere; }
        /* Inline, not inline-flex: the cursor cannot stand after a flex chip at the end of a line,
           and the text read back would break the line before it. */
        .merge-text .merge-chip { display: inline; }
        .merge-text .merge-chip > svg { margin-right: var(--sp-1); vertical-align: -2px; }
        .toolbar-fill { flex: 1; min-width: 0; }
        .toolbar-fill .panel-picker { display: flex; }
        .toolbar-fill .tb-button { width: 100%; justify-content: space-between; }
        /* The transparent border is there so every variant is the same height: the neutral
           one below needs a real border and would otherwise sit 2px taller than the rest. */
        /* `font-weight: 400` so a chip looks the same wherever it lands (2026-08-18). It
           had no weight of its own and inherited one, so the same badge came out bold inside
           a <strong> and normal in a table cell. A component class that changes appearance
           with its surroundings is not a component. */
        /* No room above and below (decision JP 2026-08-20, looking at the four forms side
           by side): the pill was reading as too heavy for what it says. The height comes
           from the line height of the text instead. Zero rather than 2px because the
           spacing scale starts at `--sp-1` and there is nothing smaller -- a literal 2px
           would be raw spacing, which the styleguard refuses and rightly so. */
        /* **The avatar** (`<c-ui.avatar>`, UX v3, decision JP 2026-11-11, "14a"): the initials on
           one of eight fixed tones, 24px in a list and 40px in the record heading. */
        .avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px; margin-right: var(--sp-2); border-radius: var(--radius-pill); background: var(--avatar-1); color: var(--text-inverse); font-size: var(--txt-xs); font-weight: 600; line-height: 1; vertical-align: middle; letter-spacing: 0.02em; }
        .avatar--large { width: 40px; height: 40px; margin-right: var(--sp-3); font-size: var(--txt-base); }
        .avatar[data-tone="2"] { background: var(--avatar-2); }
        .avatar[data-tone="3"] { background: var(--avatar-3); }
        .avatar[data-tone="4"] { background: var(--avatar-4); }
        .avatar[data-tone="5"] { background: var(--avatar-5); }
        .avatar[data-tone="6"] { background: var(--avatar-6); }
        .avatar[data-tone="7"] { background: var(--avatar-7); }
        .avatar[data-tone="8"] { background: var(--avatar-8); }
        .badge { padding: 0 var(--sp-2); border-radius: var(--radius-pill); font-size: var(--txt-sm); font-weight: 400; border: 1px solid transparent; }
        /* The variant is a meaning, never a status code (richtlijn-0002 §4):
           green = good/active, orange = needs attention, red = exclusively error or
           destructive, grey = ended/inactive/off. An ended team is not an error. */
        .badge--positive { background: var(--success-tint); color: var(--success); }
        .badge--warning { background: var(--warning-tint); color: var(--warning); }
        .badge--negative { background: var(--danger-tint); color: var(--danger); }
        /* Outlined, unlike the three above: they carry a tinted background that reads as a
           chip on its own, while `--surface-soft` on a white card is a 1% difference and so
           read as loose grey words rather than as chips (JP 2026-08-18, on the environment
           screen). The other three keep their tint; only the neutral one needs an edge. */
        .badge--neutral { background: var(--surface-muted); color: var(--text-soft); border-color: var(--border); }
        /* A tone tells kinds apart where no state is meant (`core/chips.py::TONES`, decision
           JP 17-11-2026, "6a"): a tint of the avatars on a neutral chip, never green, orange
           or red, which say a state. */
        .badge[data-tone] { border-color: transparent; font-weight: 500; }
        .badge[data-tone="blue"] { color: var(--avatar-1); background: color-mix(in srgb, var(--avatar-1) 12%, transparent); }
        .badge[data-tone="purple"] { color: var(--avatar-3); background: color-mix(in srgb, var(--avatar-3) 12%, transparent); }
        .badge[data-tone="teal"] { color: var(--avatar-7); background: color-mix(in srgb, var(--avatar-7) 12%, transparent); }
        /* The conditions of a rule as blocks (<c-ui.conditions>, decisions JP 17-11-2026, "13a" and
           "15a", alignment "1a" at 22:35 CET): OF in a narrow column of its own left of the frames,
           EN in a narrow column inside a frame, each halfway between the two items it joins. The
           word sits at the top of the second item and moves up by half the gap between the two
           (both gaps are --sp-2; change them together). In the side panel
           (`data-edit`) characteristic, comparison, value and remove button stand in fixed
           columns, so the conditions line up. The narrow columns are as wide as --sp-6, set on the
           word's own box, so a block with one condition lines up with the others. */
        .conditions { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--sp-2); row-gap: var(--sp-2); align-items: start; max-width: var(--w-sm); margin-block: var(--sp-2) var(--sp-3); font-size: var(--txt-base); color: var(--text); text-decoration: none; }
        .conditions[data-edit] { max-width: none; margin-block: var(--sp-2) 0; }
        .conditions > span, .conditions-line > span:first-child { display: flex; justify-content: center; width: var(--sp-6); min-height: 1px; }
        .conditions-block { display: grid; row-gap: var(--sp-2); min-width: 0; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); }
        .conditions-line { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--sp-2); align-items: center; min-height: 22px; margin-left: var(--sp-4); }
        .conditions-line > span:first-child { align-self: start; }
        .conditions[data-edit] .conditions-line > span:nth-child(2), .conditions .addrow, .conditions-line > form { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) 5rem; column-gap: var(--sp-2); align-items: center; }
        .conditions[data-edit] .conditions-line > span:nth-child(2) > form { justify-self: end; }
        /* A click on a condition opens it in its place to change it (decision JP 18-11-2026,
           "1a"): the three columns are one button over the same tracks, grey on hover like a
           table row. It stays grey above its open change row, and a second click closes the row,
           as the white add opener does (decision JP 18-11-2026, "1a"). */
        .conditions[data-edit] .conditions-line > span:nth-child(2) > button { grid-column: 1 / 4; display: grid; grid-template-columns: subgrid; align-items: center; min-height: var(--control-h); padding: 0; border: 0; border-radius: var(--radius-sm); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
        .conditions[data-edit] .conditions-line > span:nth-child(2) > button:is(:hover, [aria-expanded="true"]) { background: var(--row-hover); box-shadow: 0 0 0 var(--sp-1) var(--row-hover); }
        .conditions-line > form { grid-column: 2; margin-top: var(--sp-2); }
        .conditions .addrow, .conditions-line > form { row-gap: var(--sp-2); align-items: end; }
        /* The grid column sets the width here, not the field's own width class (`.field-medium`):
           the fields of every row line up (JP 17-11-2026, and 18-11-2026, 19:43 CET). */
        .conditions :is(.addrow, .conditions-line > form) :is(select, input:not([type=checkbox])) { width: 100%; min-width: 0; max-width: none; }
        .conditions-line > form :is(select, input:not([type=checkbox])) { min-height: var(--control-h); }
        .conditions .addrow > .button { grid-column: 1 / -1; justify-self: end; }
        /* The white opener goes while its row is open: only the blue button that adds stays
           (JP 18-11-2026, 19:41 CET, "2a"); Escape closes the row and brings it back. */
        .conditions .row > [data-show][aria-expanded="true"] { display: none; }
        /* <c-ui.chips>: values as small pills, so where one value ends and the next begins is
           seen (decision JP 18-11-2026, "1a"). To change, the chips stand in a box with the
           field look and a borderless box to type the next value in; the cross on a chip is
           22 px with room around it, so its 24 px circle touches no other target (WCAG 2.5.8). */
        .chips { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); min-width: 0; }
        .chips[data-chips] { display: flex; width: 100%; box-sizing: border-box; }
        .chips[data-chips]:has(> input[data-chips-type]:not([hidden])) { min-height: var(--control-h); padding: calc(var(--sp-1) / 2) var(--sp-1); border: 1px solid var(--border-field); border-radius: var(--radius-md); background: var(--card); align-content: center; }
        .chips[data-chips]:has(> input[data-chips-type]:focus-visible) { border-color: var(--brand-action); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-action) 22%, transparent); }
        /* One field, one height and one focus ring: the box is the field, the typing box inside
           it is not a second one (JP 18-11-2026, 19:43 CET). Raised above the add row's own
           field height (`.addrow :is(input...)`) with the checkbox exclusion. */
        :is(.chips[data-chips], .addrow .chips[data-chips]) > input[data-chips-type]:not([hidden]):not([type=checkbox]) { flex: 1 1 3rem; width: auto; min-width: 3rem; min-height: 22px; height: 22px; padding: 0 var(--sp-1); border: 0; background: none; box-shadow: none; outline: none; }
        /* The chevron of a pick list (`.combovalue::after`): it offers values. */
        .chips[data-chips]:has(> input[data-chips-type]:not([hidden]))::after { content: ""; width: 0.9em; height: 0.9em; flex: none; margin: 0 var(--sp-1) 0 auto; background-color: var(--text-soft); -webkit-mask: var(--chev-down) no-repeat center / contain; mask: var(--chev-down) no-repeat center / contain; }
        .chip { display: inline-flex; align-items: center; gap: var(--sp-1); max-width: 100%; padding: 0 var(--sp-2); border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface-muted); color: var(--text); font-size: var(--txt-sm); line-height: var(--lh-compact); white-space: nowrap; }
        .chip > span { overflow: hidden; text-overflow: ellipsis; }
        .chip > button { display: inline-grid; place-content: center; flex: none; width: 22px; height: 22px; margin-right: calc(var(--sp-2) * -1 + 1px); padding: 0; border: 0; border-radius: 50%; background: none; color: var(--text-soft); cursor: pointer; }
        .chip > button:hover { background: var(--row-hover); color: var(--text); }
        .chip > button:focus-visible { outline: 2px solid var(--brand-action); outline-offset: -2px; }
        .chip > button > svg { width: 13px; height: 13px; }
        .conditions-op { display: inline-flex; transform: translateY(calc(-50% - var(--sp-2) / 2)); }
        .conditions-block > .row, .conditions-block > .addrow { margin-left: calc(var(--sp-4) + var(--sp-6) + var(--sp-2)); }
        /* In a table row a status is a dot and its text, no pill (UX v3, decision JP 2026-11-11,
           "5a"): a column of pills drowns the row. The dot carries the meaning, the text keeps
           the colour of its chip, so a chip reads the same in a row and elsewhere. */
        td .badge { display: inline-flex; align-items: center; gap: calc(var(--sp-1) * 1.5); padding: 0; background: transparent; border-color: transparent; white-space: nowrap; }
        td .badge::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
        td :is(.badge--neutral)::before { background: var(--text-muted); }
        /* EN and OF are words that join, not a status: under a rule in a table they keep their
           tinted pill (<c-ui.conditions>). */
        td .conditions-op .badge { padding: 0 var(--sp-2); }
        td .conditions-op .badge[data-tone="purple"] { background: color-mix(in srgb, var(--avatar-3) 12%, transparent); }
        td .conditions-op .badge[data-tone="teal"] { background: color-mix(in srgb, var(--avatar-7) 12%, transparent); }
        td .conditions-op .badge::before { content: none; }
        .notice { padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-md); margin-bottom: var(--sp-3); font-size: var(--txt-sm); }  /* the size of the intro and hints around it (portal check 2026-10-02, JP 3a) */
        .notice--positive { background: var(--success-tint); color: var(--success); }
        .notice--negative { background: var(--danger-tint); color: var(--danger); }
        .notice--warning { background: var(--warning-tint); color: var(--warning); }
        /* Grey is news that is neither good nor bad (decision JP 2026-09-30, 4a): the source
           of a whole page -- "Source: Scalingo. You can only read these here" -- stated once at
           the top. Outlined like the neutral badge, for the same reason: a grey surface alone
           on a card is too faint to read as a notice at all. The text keeps the body colour,
           since this is a sentence to read and not a label. */
        .notice--neutral { background: var(--surface-muted); color: var(--text); border: 1px solid var(--border); }
        /* A link in a notice takes the notice's own colour, underlined so it still reads as a
           link (2026-10-06, bank statements): the general link colour on a tint stayed under
           WCAG AA in all four variants. Measured in core/tests_shell_layers.py. */
        .notice a { color: inherit; text-decoration: underline; }
        /* Review aid: screens that still need UX attention (nav item, superuser-only). */
        a.to-migrate { font-style: italic; color: var(--ux-mark); }
        a.to-migrate::after { content: " •"; color: var(--ux-mark); }
        /* On the white pill of the active row the amber text fell to 1.76:1 (2026-10-10, the
           sidebar of shell part 2). There the text keeps the pill's brand colour; italics and
           the amber dot still carry the marking. */
        aside nav a.active.to-migrate { color: var(--brand); }
        .fielderror { display: block; font-size: var(--txt-sm); color: var(--danger); }
        /* A field with an error: our own mark (`.invalid`, set by a script) or Django's
           (`aria-invalid`, on every field a form sends back with an error). */
        :is(input, select, textarea, .merge-text):is(.invalid, [aria-invalid="true"]) { border-color: var(--danger); background: var(--danger-field); }
        /* Empty table: the column headers stay, and one soft line under them says there is
           nothing (decision JP 2026-10-01, "1a"/"2b"; it used to hide the headers too). The
           softness sits on the `.hint` around the sentence, not on the cell (2026-08-19):
           grey is the colour of explanation, and a table cell that carries it is a second
           appearance of an object that already has one. */
        tr.row-empty td { border: 0; padding: var(--sp-2) var(--sp-1); }
        /* The totals row (decision JP 2026-10-01, "2a"): it closes the table, so a stronger rule
           above it and the weight of a heading, no rule under it. Element selectors on purpose:
           the row is the table's own tfoot, not a second kind of object that needs a name. */
        table.datatable tfoot td { font-weight: 600; border-top: 2px solid var(--border); border-bottom: 0; }
        /* A group heading between the rows (`row_group`, decision JP 2026-11-03, "22a"): 32px,
           small bold soft text on the soft surface, a strong rule above that opens the group.
           Not a row of the list, so no hover. */
        table.datatable tbody tr.row-group td { height: var(--control-h); font-size: var(--txt-sm); font-weight: 600; color: var(--text-soft); background: var(--surface-soft); border-top: 2px solid var(--border-strong); }
        /* The source of each column (decision JP 2026-09-30, 3a): a thin second header row
           under the column titles, in grey, one vendor per column or nothing when Squavio keeps
           that value itself. Cells and not headers, so a screen reader keeps taking a cell's
           header from the title row. It carries the header background and the rule under the
           header, which the title row then drops so there is one line under both. Not sticky:
           while scrolling a long list the titles stay and the sources scroll away with the
           rows. */
        thead tr.source-row td { background: var(--card); color: var(--text-soft); font-size: var(--txt-xs); padding-top: 0; border-bottom: 1px solid var(--border); white-space: nowrap; }
        thead tr:has(+ tr.source-row) th { border-bottom: 0; }
        .cardhead { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); }
        /* The one sentence under a card heading stands right under it, as a subtitle (the agreed
           visual, JP 2026-10-11, "1a 2b"); the room below the heading goes under that sentence. */
        .card > .cardhead:has(+ .hint) { margin-bottom: 0; }
        /* The page heading of a record or config screen stands on the page background, not in
           a card: title, actions, key-fields line and tabs, with the panels below it (shell
           proposal point 4, decision JP 2026-10-10; <c-layout.cardpage heading_only>). */
        .page-head { margin-bottom: var(--sp-4); }
        /* A heading with nothing under it brings no room of its own: the page head's margin is
           the one distance to the card. On a list screen <main> is a flex column, so the
           heading's margin no longer folds into the page head's and the head stood 8px taller,
           with 24px above the card instead of 16 (measured 14-10: 44px against 36px). */
        .page-head > .cardhead:last-child { margin-bottom: 0; }
        /* The path above the title (<c-ui.crumbs>, decisions JP 15-11-2026): small and grey, each
           step a link, underlined on hover. With a back arrow it starts where the title starts. */
        .crumbs { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-bottom: var(--sp-1); color: var(--text-soft); font-size: var(--txt-sm); line-height: var(--lh-compact); }
        .crumbs a { color: inherit; text-decoration: none; }
        .crumbs a:hover { text-decoration: underline; }
        .page-head:has(> .cardhead > [rel="up"]) > .crumbs { padding-left: calc(var(--control-h) + var(--sp-2)); }
        .page-head > .crumbs + .cardhead { margin-top: 0; }
        .page-head > .tabs { margin: var(--sp-3) 0 0; }
        .page-head > .tabs:not(:last-child) { margin-bottom: var(--sp-4); }
        /* A banner about the whole screen closes the page head (rule B8, JP 2026-10-21, "1b"): the
           head's own margin is the one distance to the card, as under a heading alone. */
        .page-head > .notice:last-child { margin-bottom: 0; }
        /* One distance each, whatever stands between (core/tests_uniformity.py): the tab line
           sits as far below the heading with or without a key-fields line, and an intro as far
           below the tab line whatever its own margin is. */
        .page-head > .cardhead + .tabs { margin-top: var(--sp-3); }
        .cardhead h1 > .head-icon { margin-right: var(--sp-2); }  /* the cog before "Settings · …" stood against the word */
        /* A box of var(--control-h) gives the heading the same height as an icon button, so align-items:center lands the title on the same spot whether or not the head carries a button. Without it the taller button row dropped the heading ~3px and the same page type sat at two heights (measured 16-09, tab-model track). */
        .cardhead h1, .cardhead h2, .cardhead h3, .tablebar h1 { margin: 0; line-height: var(--lh-compact); padding-block: max(0px, calc((var(--control-h) - var(--lh-compact) * 1em) / 2)); }
        /* The size of the one table under a heading, beside it (UX v3, decision JP 2026-11-11, "6a"),
           in a grey pill with the neutral chip's look, so it reads as a number and not as part of
           the heading (decision JP 2026-11-15, "4b"); a darker grey without a line and a bold figure, so it
           stands out beside the heading (decision JP 2026-11-17, "1a"): 11px/600, 18px high. A space stands before it,
           so a reader hears "Phone 0" and not "Phone0"; the margin makes up the rest of the gap. */
        .head-count { display: inline-block; margin-left: var(--sp-1); padding: calc((16px - var(--lh-compact) * 1em) / 2) calc(var(--sp-2) - 1px); border: 1px solid transparent; border-radius: var(--radius-pill); background: var(--border); color: var(--text); font-size: var(--txt-sm); font-weight: 600; line-height: var(--lh-compact); vertical-align: middle; font-variant-numeric: tabular-nums; }
        /* The kind above a name in a heading (decision JP 15-11-2026, "1a"): the grey word that says
           what the heading names ("Kind of membership" over "Club member" on Rates). The name
           itself keeps the heading's own size ("2a"). */
        /* The 36px box comes from padding around a normal line, not from a 36px line: one line
           still stands exactly where it did, but a title that wraps (a long card title next to
           its button, "Betaling: Clublid" at 1100px) now takes two text lines instead of two
           button-high lines with a gap between them (JP 2026-10-14, "1a"). */
        /* A badge or subtitle inside such a heading keeps its own line box: inheriting the 36px
           line height at a smaller font size shifted its baseline and grew the title row to 37
           or 39px on the record screens (measured 13-10). */
        .cardhead :is(h1, h2, h3) > :is(.badge, small) { line-height: var(--lh-compact); vertical-align: middle; }
        /* A labelled button in the actions slot (a "Save", not an icon button) is taller than
        an icon button's fixed height, so the rule above alone stops matching it: the row grows
        to fit the button and align-items:center then centres the heading in that taller row
        instead of its own line box, a ~1px drop (measured 23-09, uniformity walk on Platform
        settings and Sending domain). Pinning the button to the same height keeps the row -- and
        the heading inside it -- at the one size the rule above already establishes. */
        /* Every button in a heading is an icon with its label after it (decision JP 2026-09-24,
           "1a"): as wide as its label, on one line -- a label that wraps makes a two-line button
           beside a one-line heading. Only the fold-open plus of principle 5 stays an icon. */
        .cardhead .button:not(.button--icon) { height: var(--control-h); display: inline-flex; align-items: center; gap: var(--sp-2); white-space: nowrap; }
        /* The actions stand together on the right, the main one last: the first thing after the
           heading takes the free space. This used to be `justify-content: space-between` on the
           row, which is the same thing for one button and spreads two or more across the row. */
        .cardhead > :is(h1, h2, h3) + * { margin-left: auto; }
        /* A heading row without a heading (a tab side whose name the tab already carries, with only a plus button): the actions keep their place on the right. Until 17-09 the region rendered an empty h3 there, and the composition walk measured it as a heading 15px lower than every other. The back arrow of a record (rel="up") is a first child too, but it stands before the title, on the left. */
        .cardhead > :first-child:not(h1):not(h2):not(h3):not([rel="up"]) { margin-left: auto; }
        /* A card's heading row stays at the top of the content area while you scroll through
           that card (decision JP 2026-09-24, "1a"): the button that acts on the card sits in
           that row (rule 9 of cotton_conventies), so on a long form it stays within reach. It
           lets go when the card ends, and the next card's heading takes over. The list card is
           left out: its heading is already fixed, outside its own scroller. The row takes the
           card's own background (it differs on a config page and while editing) and stays
           inside the card's padding, so the editing accent on the left edge stays visible.
           `top` is negative: a sticky element stops at the scroller's content edge, and main's
           top padding (--sp-4, --sp-3 on a narrow screen) would otherwise leave a strip above
           it where the form shows through. z-index under the datatable toolbar (40), above a
           table's sticky column headers (3). */
        .card:not(.card--list) > .cardhead { position: sticky; top: calc(-1 * var(--sp-4)); z-index: 20; background: inherit; }
        /* A create screen's button acts on the whole form and stands in the page heading, so on
           a long form that heading stays in reach the same way: sticky, on the page background,
           above the form's own card heading (20). */
        .page-head:has([form="create-form"]) { position: sticky; top: calc(-1 * var(--sp-4)); z-index: 21; background: var(--background); margin: calc(-1 * var(--sp-4)) 0 0; padding: var(--sp-4) 0; }
        tr:is([data-href], [data-parts]) { cursor: pointer; }
        tr:is([data-href], [data-parts]):hover td { background: var(--brand-tint); }
        /* A picker's row whose click ticks its box (`row_ticks`, rows.js): it reads as clickable like a row that opens. */
        table[data-row-ticks] > tbody > tr:not([data-href], [data-parts]):has(> td.selectcolumn > input:not(:disabled)) { cursor: pointer; }
        table[data-row-ticks] > tbody > tr:not([data-href], [data-parts]):has(> td.selectcolumn > input:not(:disabled)):hover td { background: var(--brand-tint); }
        /* **Row menu on demand** (UX v3, decision JP 2026-11-11, "16a"). On a screen with a
           pointer, a row's menu appears when you point at the row, when it holds the focus, or as
           soon as anything in the table is ticked; an open menu stays. With the keyboard the focus
           shows it, and on a touch screen (no hover) it is always there. The tick box is always
           there (question 176, "always visible", JP 2026-11-13): a box that only shows under the
           pointer does not say the rows can be ticked. */
        @media (hover: hover) {
            table.datatable > tbody > tr > td.actioncolumn > .rowmenu { opacity: 0; transition: opacity var(--motion-change) ease; }
            table.datatable > tbody > tr:is(:hover, :focus-within) > td.actioncolumn > .rowmenu,
            table.datatable:has(> tbody > tr > td.selectcolumn > input:checked) > tbody > tr > td.actioncolumn > .rowmenu,
            table.datatable > tbody > tr > td.actioncolumn > .rowmenu[open] { opacity: 1; }
        }
        /* **The tick box of a table** is our own box and not the browser's (question 176, JP
           2026-11-13): the browser drew a thin light line of 13px that was hard to see. 16px,
           a 1.5px line in the field colour (--border-field, 3:1 against the card for WCAG
           1.4.11) and a white tick on the action blue; the dash for "some ticked" on the head's
           box. The same box in the selection bar, which stands where the head's box was. */
        :is(table.datatable :is(td, th).selectcolumn, .actionbar) > input[type="checkbox"] { appearance: none; box-sizing: border-box; width: 16px; height: 16px; margin: 0; padding: 0; font-weight: 400; border: 1.5px solid var(--border-field); border-radius: var(--radius-sm); background-color: var(--card); display: inline-grid; place-content: center; vertical-align: middle; cursor: pointer; }
        :is(table.datatable :is(td, th).selectcolumn, .actionbar) > input[type="checkbox"]:is(:checked, :indeterminate) { background-color: var(--brand-action); border-color: var(--brand-action); }
        :is(table.datatable :is(td, th).selectcolumn, .actionbar) > input[type="checkbox"]:checked::after { content: ""; width: 9px; height: 5px; border: solid var(--text-inverse); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
        :is(table.datatable :is(td, th).selectcolumn, .actionbar) > input[type="checkbox"]:indeterminate::after { content: ""; width: 8px; height: 2px; background: var(--text-inverse); }
        :is(table.datatable :is(td, th).selectcolumn, .actionbar) > input[type="checkbox"]:disabled { cursor: default; opacity: 0.5; }
        :is(table.datatable :is(td, th).selectcolumn, .actionbar) > input[type="checkbox"]:focus-visible { outline: 2px solid var(--brand-action); outline-offset: 2px; }
        /* The row the arrow keys are on: the hover tint plus a frame in the action blue, drawn
           inside the cells, since the outline of a table row is clipped by its scroller (decision
           JP 2026-10-23, q27). */
        tr:is([data-href], [data-parts]):focus-visible { outline: none; }
        tr:is([data-href], [data-parts]):focus-visible td { background: var(--brand-tint); box-shadow: inset 0 2px 0 var(--brand-action), inset 0 -2px 0 var(--brand-action); }
        tr:is([data-href], [data-parts]):focus-visible td:first-child { box-shadow: inset 2px 2px 0 var(--brand-action), inset 0 -2px 0 var(--brand-action); }
        tr:is([data-href], [data-parts]):focus-visible td:last-child { box-shadow: inset -2px 2px 0 var(--brand-action), inset 0 -2px 0 var(--brand-action); }
        /* A row with parts (decision JP 2026-10-26, "1a" and "2a"): an arrow before its first
           cell that turns when the row opens, and the parts under it indented, small and soft.
           Pointer, hover and focus are those of a row that opens a record (above). */
        tr.row-part > td { font-size: var(--txt-sm); color: var(--text-soft); }
        table.datatable tr[data-parts] > td > button[aria-expanded] { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; margin: calc(-1 * var(--sp-1)) 0 calc(-1 * var(--sp-1)) calc(-1 * var(--sp-1)); padding: 0; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text-soft); font: inherit; cursor: pointer; vertical-align: middle; }
        table.datatable tr[data-parts] > td > button[aria-expanded]::before { content: "\25B8"; }
        table.datatable tr[data-parts] > td > button[aria-expanded="true"]::before { content: "\25BE"; }
        table.datatable tr[data-parts] > td > button[aria-expanded]:focus-visible { outline: 2px solid var(--brand-action); outline-offset: -2px; }
        tr[data-parts]:has(> td > button[aria-expanded]:focus-visible) td { background: var(--brand-tint); }
        table.datatable tbody tr.row-part > td:first-of-type:not(.selectcolumn) { padding-left: calc(var(--sp-4) + var(--sp-4)); }
        /* A part without the arrow starts its name where the name of a part with one starts,
           and a part's lines one step further in (decision JP 2026-10-27, "2a"; UX review of
           #2259). */
        table.datatable tbody tr.row-part:not([data-parts], [data-line]) > td:first-of-type:not(.selectcolumn) { padding-left: calc(3 * var(--sp-4)); }
        table.datatable tbody tr.row-part[data-line] > td:first-of-type:not(.selectcolumn) { padding-left: calc(4 * var(--sp-4)); }
        .text-soft { color: var(--text-soft); }
        .text-small { font-size: var(--txt-sm); }
        [hidden] { display: none !important; }
        /* Empty date field: no dd/mm/jjjj placeholder text until focus or entry
           (a plain text colour works in all browsers, including Firefox/Safari) */
        input[type="date"].date-empty:not(:focus) { color: transparent; }
        form p { margin: var(--sp-2) 0; }
        /* One appearance, and the colour is part of it (2026-08-19). The rule set weight and
           size but no colour, so a label took the colour of whatever it stood in: soft in a
           record grid and a setting row, dark in a column picker, brand blue in a filter
           panel, black in a dialog -- four appearances of one object, measured by
           `core/tests_uniformity.py`. Soft is the §3D field-label appearance the setting row
           was already told to follow, so that is the one that wins. */
        label { display: block; font-weight: 400; font-size: var(--txt-sm); color: var(--text-soft); margin-bottom: var(--sp-1); }
        summary { cursor: pointer; }
        /* `--txt-sm`, and that is the whole story for a field (2026-08-19). It used to be
           `--txt-base` here, and then six rules downstream set it back to `--txt-sm` for the
           setting row, the table bar, the filter panel, the option row, the record grid and
           the calendar side -- so 13px was the real size everywhere and 15px only survived
           where nobody had written an override yet (the parameter dialog). Six copies of one
           value: the base rule owns it now and the six are gone. */
        input, select, textarea, .merge-text { padding: var(--sp-1) var(--sp-2); border: 1px solid var(--border-field); border-radius: var(--radius-md); font: inherit; font-size: var(--txt-base); color: var(--text); }
        input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), select { min-height: var(--field-h); }
        /* A field owns its white (decision JP 2026-09-30, 5a). Without a background of its own a
           field takes the browser's, and a select's default is grey while an input's is white.
           And once anything around the page declares a dark colour scheme -- the claude.ai
           viewer of a prototype does -- both turn near-black with our dark text on top
           (measured 30-09 in Chromium: rgb(59, 59, 59)). In `:where()` so it weighs nothing:
           every rule that colours a field on purpose (an invalid field, an editor's panel)
           still wins without having to outrank this one. Dark mode proper is a separate
           question and still open. */
        :where(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]):not([type=file]), select, textarea) { background-color: var(--card); }
        /* A field that shows a value nobody can change here looks it: the grey of a muted
           surface, soft text, no text cursor. The template editor's button link set to the
           notification's own link shows {{link}} this way (decision JP 2026-10-13, "1a"). A
           state of the field, not a class. */
        input[readonly], textarea[readonly] { background-color: var(--surface-muted); color: var(--text-soft); cursor: default; }
        select { min-width: 8.5rem; }  /* an empty choice must not let the dropdown shrink */
        input[type="checkbox"], input[type="radio"] { accent-color: var(--brand-light); }
        /* A row of choices (several roles, the payment terms a kind allows) stays a row of checkboxes,
           one choice under the other, each line as high as a field, with a 16px box in the action
           colour (decision JP 2026-10-14, variant 4 of the comparison with Moneybird). The selector
           is Django's own markup for a CheckboxSelectMultiple or RadioSelect: a wrapper with the
           field's id, a div per option, the input with its own id inside its label. The wrapper id
           keeps a hand-written label around a single checkbox out, and the input's [id] lifts the
           size above the fieldgrid's rule for a small checkbox. The browser draws the box; the
           accent colour fills it. */
        div[id] > div > label:has(> :is(input[type="checkbox"], input[type="radio"])) { display: flex; align-items: center; gap: var(--sp-2); min-height: var(--field-h); margin: 0; cursor: pointer; }
        div[id] > div > label > :is(input[type="checkbox"], input[type="radio"])[id] { box-sizing: border-box; width: 16px; height: 16px; margin: 0; padding: 0; flex: none; accent-color: var(--brand-action); cursor: pointer; }
        /* One on/off value is a switch and not a bare checkbox (decision JP 2026-09-18, 7a);
           the ui.toggle component writes these classes, and so does the switch in the invoice
           editor's panel, which a script builds (the same look, 2026-09-30). The control
           underneath stays a checkbox, so the keyboard, the form post and `cleaned_data` are
           unchanged and only the appearance moves to .toggle-track. Hence `opacity: 0` on the
           input and never `display: none`: an input that is not displayed is not focusable, and
           the switch would be unreachable without a mouse (WCAG 2.1.1). A row of checkboxes where
           you pick several out of a set (the roles) is a choice out of a row and not one value,
           and keeps its checkboxes -- the ui.field component makes that distinction.

           Do not write a component tag in this comment, and do not write a comment-close
           marker followed later by another one either -- CSS comments do not nest, so the
           browser closes this whole comment at the first such marker it meets and everything
           after becomes garbage that swallows the next rule. Cotton also reads this file for
           tags before the browser ever sees a comment marker, so a `c-` tag written here is
           parsed as a real component and the shell dies with "Unclosed tag" on every screen
           at once. Cost here: ten errored tests whose own templates were fine. */
        .toggle { position: relative; display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--field-h); margin-bottom: 0; cursor: pointer; }
        .toggle input[type="checkbox"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
        /* The four numbers of the switch only make sense together: track 40x24 with a 1px border
           leaves 38x22 inside, a 14px knob with --sp-1 around it fills that height exactly, and
           the travel is 38 - 22 = 16px. Change one and the other three need recomputing. */
        /* **The switch bar** (`<c-ui.switchbar>`, UX v3, decision JP 2026-11-11, "9a"): one choice
           out of a few as one bar of `--control-h`, the chosen one the white segment. Each radio
           button lies over its own label, invisible but focusable and clickable. */
        .switchbar { display: inline-flex; gap: var(--switch-gap); padding: var(--switch-gap); border-radius: var(--radius-md); background: var(--surface-muted); }
        .switchbar > label { position: relative; display: inline-flex; align-items: center; height: calc(var(--control-h) - 2 * var(--switch-gap)); margin: 0; padding: 0 var(--sp-3); border-radius: var(--radius-sm); font-size: var(--txt-base); font-weight: 400; color: var(--text-muted); cursor: pointer; transition: background-color var(--motion-change) ease, color var(--motion-change) ease; }
        .switchbar > label:hover { color: var(--text); }
        .switchbar > label:has(input:checked) { background: var(--card); color: var(--text); font-weight: 500; box-shadow: 0 1px 2px var(--shadow); }
        .switchbar > label:has(input:focus-visible) { outline: 2px solid var(--brand-action); outline-offset: 1px; }
        .switchbar input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
        .toggle-track { flex-shrink: 0; width: 40px; height: 24px; border: 1px solid var(--border-field); border-radius: var(--radius-pill); background: var(--card); transition: background 0.12s, border-color 0.12s; }
        .toggle-track::after { content: ""; display: block; width: 14px; height: 14px; margin: var(--sp-1); border-radius: var(--radius-pill); background: var(--border-strong); transition: transform 0.12s, background 0.12s; }
        .toggle input:checked + .toggle-track { background: var(--brand-action); border-color: var(--brand-action); }
        .toggle input:checked + .toggle-track::after { background: var(--card); transform: translateX(16px); }
        .toggle input:focus-visible + .toggle-track { outline: 2px solid var(--brand-action); outline-offset: 2px; }
        /* The read-only switch (decision JP 2026-09-20) has no <input>, so its state lives on
           the switch itself -- aria-checked, read by assistive tech, doubles as the hook these
           two rules need. Same colours as the editable switch: a read-only value stays at full
           contrast, unlike a disabled one (Carbon Design System's read-only-states pattern). */
        .toggle--readonly { cursor: default; }
        .toggle--readonly[aria-checked="true"] > .toggle-track { background: var(--brand-action); border-color: var(--brand-action); }
        .toggle--readonly[aria-checked="true"] > .toggle-track::after { background: var(--card); transform: translateX(16px); }
        :focus-visible.toggle--readonly > .toggle-track { outline: 2px solid var(--brand-action); outline-offset: 2px; }
        .selectsearch { display: block; margin-bottom: var(--sp-1); }
        /* The searchable pick list (the `ui.combobox` component, 2026-09-18). The native
           select keeps the value and keeps submitting; what it gives up is its own appearance, so
           `.combovalue` has to carry the field look itself -- the rules above bind to
           `select`, and by then the select is clipped away. Clipped, not hidden: a
           `required` select that is `display:none` makes the browser refuse to submit at
           all, because it cannot focus the control it wants to report on. */
        .combobox { position: relative; display: inline-block; min-width: 8.5rem; }
        /* The file field (<ui.filepicker>): a white button and the chosen name beside it. The
           native input is clipped inside it (`.sr-only`), so the picker is its containing block. */
        .file-picker { position: relative; display: inline-flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; min-width: 0; }
        .file-picker > .hint { overflow-wrap: anywhere; }
        .form .combobox, form p .combobox { display: block; width: 100%; max-width: var(--w-sm); }
        .combovalue { width: 100%; min-height: var(--field-h); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); text-align: left; padding: var(--sp-1) var(--sp-2); border: 1px solid var(--border-field); border-radius: var(--radius-md); background: var(--card); font: inherit; font-size: var(--txt-base); color: var(--text); cursor: pointer; }
        .combovalue::after { content: ""; width: 0.9em; height: 0.9em; flex: none; background-color: var(--text-soft); -webkit-mask: var(--chev-down) no-repeat center / contain; mask: var(--chev-down) no-repeat center / contain; }
        .combobox:has(select:required) .combovalue { border-left: 3px solid var(--brand-light); }
        .combovalue[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-field); }
        /* A required file field: the mark goes on the button, the input is clipped away. */
        /* The bar is added to the white button's own ring (`.button--secondary`), not put in its
           place: without the ring the button read as loose text (JP 2026-10-28). */
        .file-picker:has(> input:required) > button { box-shadow: inset 3px 0 0 var(--brand-light), inset 0 0 0 1px var(--border-strong); }
        .file-picker > button[aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--danger); background: var(--danger-field); }
        .file-picker:has(> input:required) > button[aria-invalid="true"] { box-shadow: inset 3px 0 0 var(--brand-light), inset 0 0 0 1px var(--danger); }
        .combopanel { position: fixed; z-index: 50; padding: var(--sp-2); min-width: 220px; max-height: 300px; overflow-y: auto; }
        .combolist { display: flex; flex-direction: column; }
        .comboitem { display: block; width: 100%; text-align: left; border: 0; background: none; padding: var(--sp-1) var(--sp-2); font-size: var(--txt-sm); cursor: pointer; border-radius: var(--radius-sm); color: var(--text); white-space: nowrap; }
        .comboitem:hover, .comboitem.active { background: var(--brand-tint); }
        .comboitem[aria-selected="true"] { font-weight: 600; color: var(--brand); }
        .comboempty { margin: var(--sp-1) var(--sp-2); }
        input:required, select:required, textarea:required, .merge-text[aria-required="true"] { border-left: 3px solid var(--brand-light); }  /* required field */
        /* Our text fields run on type="search" (keeps password-manager icons out, incl.
           Nordpass; see the script). Neutralise the search-specific styling so they look
           exactly like ordinary input fields. Real search fields (without data-textfield) untouched. */
        input[data-textfield] { -webkit-appearance: textfield; appearance: textfield; }
        input[data-textfield]::-webkit-search-cancel-button,
        input[data-textfield]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
        .form input, .form select, .form textarea, form p input, form p select, form p textarea { width: 100%; }
        :where(.form, form p) :where(input, select, textarea) { max-width: var(--w-sm); }  /* zero specificity: a field-* width class wins, see .field-full */
        /* One margin for a hint (UX standard v2, B2; decision JP 2026-10-20, "1a"): nothing above,
           the small step below. The space above belongs to whatever stands before it; no screen
           sets the margin of a hint by hand (shapeguard). As the last thing in its box a hint
           adds nothing, so the box keeps its own padding. The margin is for a sentence of its
           own (`p`, `div`); a hint inside a line (`span`, a table cell) keeps the line's height. */
        .hint { font-size: var(--txt-sm); color: var(--text-soft); }
        :where(p, div).hint { margin: 0 0 var(--sp-2); }
        :where(p, div).hint:last-child { margin-bottom: 0; }
        /* The value of an environment variable on the env screen: monospace, a touch
           smaller, a soft surface with a border -- so a host name or an endpoint reads as
           a *value* rather than as prose. Approved by JP 2026-08-16. Until then those
           values sat in a bare <code>, which has no rule in this stylesheet at all and so
           leaned on the browser default: not reuse but the third category principle 3
           rules out. */
        /* `color` set here on purpose (uniformity walk, 2026-09-17): a machine value is
           something you read character by character, so it does not take the softness
           of a hint it happens to sit in. Without it the zone in the intro of the
           sending-domain tab came out soft grey beside the same value dark in the table. */
        .envvalue { display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--txt-sm); color: var(--text); background: var(--surface-muted); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 var(--sp-1); word-break: break-all; }
        .envvalue[data-breaks="dots"] { word-break: normal; overflow-wrap: break-word; }  /* a host name wraps after a dot, not mid-label (JP 2026-10-25, card 83) */
        /* A secret shows a mask plus its last four characters. The mask is soft and spaced
           so the eye goes to the tail, which is the part that answers the question: *which*
           key is set. Approved by JP 2026-08-18, who asked for a mask instead of the
           sentence "eindigt op ..." that stood there first. */
        .mask { color: var(--text-soft); letter-spacing: .08em; }
        /* The copyfield component -- a value plus the button that copies it. `flex-start`
           and not `center`: a code value may wrap over six lines, and a button centred against
           that floats halfway down a block whose first line it belongs to. */
        .copyfield { display: inline-flex; align-items: flex-start; gap: var(--sp-1); max-width: 100%; }
        /* A text value stays on one line (decision JP 2026-10-21, "3a"): what does not fit ends in
           "...", the whole value is in the tooltip and the copy, and hovering or focusing the
           value lets it scroll sideways. `span`, because the copy button carries a `title` too, and
           `overflow: hidden` on it cut its 24px target down to the icon (measured 27-10). */
        .copyfield > span[title] { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .copyfield > span[title]:is(:hover, :focus-visible) { overflow-x: auto; text-overflow: clip; scrollbar-width: none; }
        /* Quiet like `.infobtn`, and for the same reason: this hands you a value that is
           already in front of you, it does not act on a record. */
        .copybtn { background: none; border: 0; padding: var(--sp-1) 0 0; margin: 0; cursor: pointer; color: var(--text-soft); line-height: 0; border-radius: var(--radius-sm); flex-shrink: 0; position: relative; }  /* the address gives way, not the button (JP 2026-10-21, 3a) */
        /* The icon stays small; the target around it is 24 x 24 (WCAG 2.5.8), centred on the icon
           below the top padding, as `.infobtn::after` does. Measured 27-10: the button was 15 x 19. */
        .copybtn::after { content: ""; position: absolute; left: 50%; top: calc(50% + var(--sp-1) / 2); width: 24px; height: 24px; transform: translate(-50%, -50%); }
        .copybtn:hover, .copybtn:focus-visible { color: var(--brand-action); }
        /* The only confirmation there is. A clipboard write leaves nothing on the screen,
           so without this the button answers a click with nothing at all. */
        .copybtn[data-copied] { color: var(--success); }
        .copyicon { width: 16px; height: 16px; }
        /* The figures component -- read-only tiles, a large number with its word under it
           (approved by JP 2026-10-05). The word comes first in the markup for a screen reader
           and is shown second, hence `column-reverse`. */
        .figures { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin: 0; }
        .figure { display: flex; flex-direction: column-reverse; justify-content: flex-end; min-width: 120px; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius-md); }
        .figure dt { font-size: var(--txt-sm); color: var(--text-soft); font-weight: 400; }
        .figure dd { margin: 0; font-size: var(--txt-xl); font-weight: 600; line-height: var(--lh-compact); font-variant-numeric: tabular-nums; }
        .figure[data-zero] dd { color: var(--text-muted); font-weight: 400; }
        /* **The key figures of the dashboard** (`spread`, UX v3, decision JP 2026-11-11, "8a"): equal
           boxes over the whole width, the word above and the number under it -- the DOM order. */
        .figures[data-spread] { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
        .figures[data-spread] > .figure { flex-direction: column; justify-content: flex-start; min-width: 0; padding: var(--sp-3) var(--sp-4); }
        .figures[data-spread] > .figure > dd:first-of-type { margin-top: var(--sp-1); }
        /* A tile that leads somewhere (JP 2026-10-05, "1b"): the link on the word is stretched
           over the tile, so the whole tile is the target; the edge becomes a control's edge. */
        .figure:has(a) { position: relative; border: 1px solid var(--border-field); }
        .figure a { color: inherit; text-decoration: none; }
        .figure dt a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
        .figure:has(a):hover:not(:has(dd + dd li:hover)) { background: var(--row-hover); }
        .figure:has(a:focus-visible) { outline: 2px solid var(--brand-action); outline-offset: 2px; }
        .figure a:focus-visible { outline: none; }
        .figure:has(dt a[aria-current]) { border: 1px solid var(--brand-action); box-shadow: inset 0 0 0 1px var(--brand-action); }
        /* The tone of a tile (JP 2026-11-05, "84a"): the edge and the number in the colour of
           the chip variant. Neutral is the plain tile. The tile whose filter is on keeps its
           blue edge (that rule is more specific); a 0 gets no tone from the template. */
        /* Since JP 2026-11-06, "105b": the colour is a 4px stripe on the left; the other edges
           stay those of the tile (a linked tile keeps its control edge), so the tiles of a row
           share one edge and three coloured tiles side by side stay calm. The tile whose
           filter is on keeps its stripe under the blue edge. */
        .figure[data-tone="positive"], .figure[data-tone="positive"]:has(dt a[aria-current]) { border-left: 4px solid var(--success); }
        .figure[data-tone="warning"], .figure[data-tone="warning"]:has(dt a[aria-current]) { border-left: 4px solid var(--warning); }
        .figure[data-tone="negative"], .figure[data-tone="negative"]:has(dt a[aria-current]) { border-left: 4px solid var(--danger); }
        .figure[data-tone="positive"] > dd:first-of-type { color: var(--success); }
        .figure[data-tone="warning"] > dd:first-of-type { color: var(--warning); }
        .figure[data-tone="negative"] > dd:first-of-type { color: var(--danger); }
        /* The lines under a tile (JP 2026-11-05, "80a" to "83a"): a second `dd`, shown under the
           word (`order: -1`, which `column-reverse` puts at the bottom) after a thin line. Each
           is a link of its own, lifted above the stretched link of the tile. */
        /* `justify-content: flex-end` above keeps the number at the top of a tile that a
           neighbour with lines makes taller (in a reversed column the end is the top). */
        .figure dd + dd { order: -1; margin-top: var(--sp-1); padding-top: var(--sp-1); border-top: 1px solid var(--border); font-size: var(--txt-sm); font-weight: 400; line-height: var(--lh-compact); color: var(--text-soft); }
        .figure dd + dd ul { list-style: none; margin: 0; padding: 0; }
        .figure dd + dd a { position: relative; z-index: 1; }
        /* One hover at a time (UX on 06-11-2026): over a line only the line lights up. */
        .figure dd + dd li:has(> a):hover:not(:has(li:hover)) { background: var(--row-hover); }
        .figure dd + dd a[aria-current] { color: var(--brand-action); font-weight: 600; }
        /* A line with parts (JP 2026-11-06, "95b") opens and closes them on an arrow of its own,
           lifted above the stretched link like the lines; the parts stand indented under it.
           The arrow follows the link in the markup, so the link is no control inside a control
           ("98a"); it is placed in the room left of the word, the parts flow on under it. The
           arrow keeps a 24px target (WCAG 2.5.8). */
        .figure dd + dd li:has(> details) { position: relative; padding-left: var(--sp-5); }
        /* The words of a list with an arrow in it start in one column, so a line without
           parts does not stick out to the left of one with them. */
        .figure dd + dd ul:has(> li > details) > li { padding-left: var(--sp-5); }
        .figure dd + dd li > details > summary { position: absolute; left: 0; top: 0; width: 24px; z-index: 1; }
        .figure dd + dd details ul { padding-left: 0; }
        /* Only the parts of a line stand indented; the lines behind "Show N more" are lines
           like the others, flush with them (JP 06-11-2026: "dat is niet zo netjes toch?"). */
        .figure dd + dd li > details li { padding-left: var(--sp-5); }
        /* The number of a line in a column of its own on the right (JP 2026-11-06, "106b"), so
           the numbers of a tile line up; each line keeps a 24px row. The parts of a line wrap
           onto the rows under it. */
        .figure dd + dd li { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--sp-2); min-height: 24px; }
        .figure dd + dd li > data { margin-left: auto; min-width: var(--sp-6); text-align: right; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
        .figure dd + dd li > details { flex-basis: 100%; }
        /* More lines behind "Show N more" (JP 2026-11-06, "107b"), on the arrow of the
           component's own folding (`.expander`), lifted above the stretched link; the one span
           is shown when closed, the other when open. */
        .figure dd + dd > details > summary { position: relative; z-index: 1; }
        .figure dd + dd > details > summary > span:last-child, .figure dd + dd > details[open] > summary > span:first-child { display: none; }
        .figure dd + dd > details[open] > summary > span:last-child { display: inline; }
        .figure dd + dd > details[open] > summary { order: 2; }
        .figure dd + dd > details[open] { display: flex; flex-direction: column; }
        /* Even tiles (JP 2026-11-06, "108b"): a grid of equal columns, the tiles of a row as
           tall as each other, the number beside its word and the lines under both. */
        .figures[data-even] { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
        .figures[data-even] .figure { display: grid; grid-template-columns: auto 1fr; align-items: baseline; align-content: start; column-gap: var(--sp-2); padding: var(--sp-3); }
        .figures[data-even] .figure > dt { grid-row: 1; grid-column: 2; font-size: var(--txt-base); font-weight: 600; color: var(--text); }
        .figures[data-even] .figure > dd:first-of-type { grid-row: 1; grid-column: 1; }
        .figures[data-even] .figure > dd + dd { grid-row: 2; grid-column: 1 / -1; margin-top: var(--sp-2); padding-top: var(--sp-2); }
        /* The infotip component -- info icon plus the explanation that hangs under it.
           `position: relative` here is what the panel is positioned against, so the
           component needs nothing of its surroundings. */
        .infotip { position: relative; display: inline; }
        /* At rest a touch darker than the border (--text-soft): visible enough to find,
           quiet enough to bear 32 times over (JP 2026-08-18: "te druk" about the first,
           heavier version, then "wel graag ietsje zichtbaarder" about the faintest one). */
        .infobtn { background: none; border: 0; padding: 0 0 0 var(--sp-1); margin: 0; cursor: pointer; color: var(--text-soft); vertical-align: -3px; line-height: 0; border-radius: 50%; position: relative; }
        /* The icon stays small; the target around it is 24 x 24 (WCAG 2.5.8). */
        .infobtn::after { content: ""; position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; transform: translate(-50%, -50%); }
        .infobtn:hover, .infobtn:focus-visible, .infobtn[aria-expanded="true"] { color: var(--brand-action); }
        .infoicon { width: 16px; height: 16px; }
        /* Floating, not in the flow: in the flow every hover would shift the table.
           A full line below the row, at JP's request 2026-08-18 -- closer than that it stuck
           to the bottom edge of its own row and read as part of it instead of as an
           explanation about it.
           The surface itself comes from `.panel`, like every other floating surface in the
           app; what stays here is what genuinely differs: where it hangs, how wide it may
           get, and that it is hidden until it is asked for. */
        /* `fixed`, not `absolute` (2026-08-19): an absolutely positioned panel grows out of
           the page from an icon near the right edge and adds to the scroll width, so the
           whole screen gains a horizontal scrollbar the moment it opens. Fixed coordinates
           can be clamped inside the window, which is what `positionFloater` does for the
           header filter and the row menu as well. Top/left are set from JavaScript; the
           values here are the position before the first hover. */
        /* `font-weight: 400` and not inherited (2026-09-23): settingrow nests the trigger
           inside its bold `label`/`strong`, so without this the panel took that weight too
           -- the same text read normal on /environment/ (trigger sits beside a <strong>, not
           inside it) and semibold everywhere settingrow uses it. Caught by the uniformity
           guard, which does not accept "depends where the trigger happens to sit" as a
           second appearance of the same explanation text. */
        .rowinfo { position: fixed; left: 0; top: 0; z-index: 30; display: none; width: max-content; max-width: 42ch; color: var(--text); padding: var(--sp-2) var(--sp-3); font-size: var(--txt-sm); font-weight: 400; line-height: var(--lh-text); }
        .infobtn:hover + .rowinfo, .infobtn:focus-visible + .rowinfo, .rowinfo[data-pinned] { display: block; }
        /* Escape closes it while the mouse and the focus stay where they are (WCAG 1.4.13,
           "Content on Hover or Focus" -- hover content has to be dismissible without moving
           either). Without this rule Escape unpinned it and the focus rule above put it
           straight back, measured in Chromium: a button keeps :focus-visible after a click.
           The marker is cleared as soon as the pointer or the focus leaves, so the next
           hover shows it again. Same specificity as the rules above and placed after them,
           which is what makes it win -- no !important needed. */
        .infobtn + .rowinfo[data-dismissed] { display: none; }
        /* Pinned reads differently from hovered on purpose: it stays after the mouse leaves,
           and without a mark that looks like the page is stuck. */
        .rowinfo[data-pinned] { border-color: var(--brand-action); }
        /* Inline editing (§3D): in edit mode ([data-editing]) the region stays white; the
           fields appearing in place of the values are the sign (shell proposal point 10,
           decision JP 2026-10-10). The tinted background with a bar on the left went. */
        /* §3F -- repeated inline compositions centralised (tokens inside, no sprawl).
           A semantics-leaning hybrid: component classes for compositions, a small
           utility layer for truly atomic presentation. Catalogue: docs/ontwerpsysteem.html §3F. */
        /* Before `.row`: <c-ui.actionform> keeps its own class and adds `css_class`, so a form that
           asks for `row` gets the flex row (UX inventory 09-11, "4c"). */
        .actionform { display: inline; margin: 0; }                                    /* a one-button action form, or the outer form around a region */
        .row { display: flex; gap: var(--sp-2); }                                   /* horizontal group, standard gap */
        .row--middle { align-items: center; }                                        /* with .row: centred vertically */
        .row-between { display: flex; justify-content: space-between; align-items: center; }  /* at both ends, no gap */
        .content-sm { max-width: var(--w-sm); }                                        /* narrow reading column */
        .centered { margin: var(--sp-6) auto; }                                    /* centre the block horizontally, rhythm above and below */
        .full-width { width: 100%; }
        /* Inline checkbox + label on one line (generic) */
        .tickbox { display: flex; align-items: center; gap: var(--sp-1); cursor: pointer; }
        .right { text-align: right; }
        .nowrap { white-space: nowrap; }
        /* A secondary detail cell in a data table (a module path, a technical reason) may
           break anywhere: a dotted path has no space to break at, and unbroken it pushed the
           Failures table out of its frame and the Technical column out of view (portal check
           2026-10-02, JP 3a). */
        table.datatable td.hint { overflow-wrap: anywhere; }
        .no-margin { margin: 0; }
        /* §3F extended -- margin scale, row variants, alignment, field widths, components.
           Full catalogue + purpose: docs/ontwerpsysteem.html §3F. One canonical margin scale
           (`.mt-*`/`.mb-*`, token-mapped); the old semantic aliases `.mt-2`(→ mt-2),
           `.mb-3`(→ mb-3) and `.mt-0`(→ mt-0) have been absorbed into it (2026-07-30). */
        .mt-0 { margin-top: 0; }
        .mt-1 { margin-top: var(--sp-1); } .mt-2 { margin-top: var(--sp-2); } .mt-3 { margin-top: var(--sp-3); }
        .mb-2 { margin-bottom: var(--sp-2); } .mb-3 { margin-bottom: var(--sp-3); }
        .ml-2 { margin-left: var(--sp-2); }
        .text-middle { text-align: center; }
        .inline-block { display: inline-block; }
        .row--tight { gap: var(--sp-1); }                                             /* with .row: a smaller gap */
        .row--loose { gap: var(--sp-3); }                                              /* with .row: a larger gap */
        .row--bottom { align-items: flex-end; }                                        /* with .row: aligned at the bottom */
        .row--start { align-items: flex-start; }
        .row--wrap { flex-wrap: wrap; }
        /* The right-hand column of a record screen (decision JP 2026-10-10, shell proposal point 7,
           2a): `<c-layout.recordpage>`'s `aside` slot, beside the regions. The wrapper carries no
           class; it is laid out by what it holds. A wrapping flex row rather than a breakpoint: the
           column drops under the regions once they would get less than 30rem, and then spans the row. The
           999 against 1 hands the regions all the free room while both share a line. */
        :has(> .record-aside) { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sp-4); }
        :has(> .record-aside) > :not(.record-aside) { flex: 999 1 30rem; min-width: 0; }
        /* The column holds one card (UX v3, decision JP 2026-11-11, "7a"), its sections
           divided by the thin line of a panel. Their headings are card heads like the ones beside
           it (question 177, JP 2026-11-13; they were a step smaller and grey). */
        .record-aside { flex: 1 1 300px; min-width: 0; }
        .record-aside > .card { margin-bottom: 0; }
        /* The one label column that stays narrower (decision JP 2026-10-21, "2b"): the key facts
           beside the regions, where 160px would leave the value too little room. */
        .record-aside .fieldgrid { grid-template-columns: 132px minmax(0, 1fr); }
        /* A list on the left, the chosen item on the right (`<c-layout.splitpage>`, decision JP
           2026-11-01, "4a"): the list a card of 220px with a card's padding (B6, decision JP
           2026-11-07, "1b"), rows of 32px; the item takes the rest, its
           regions the cards they always were. Up to 800px one column (JP 2026-11-01, "3a"): the
           list, or the item once it was opened from the list, with its back arrow. */
        .split { display: flex; align-items: flex-start; gap: var(--sp-4); }
        .split-list { flex: 0 0 220px; min-width: 0; margin: 0; padding: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-1); }
        .split-list input[type="search"] { width: 100%; height: 28px; }
        .split-list > .searchfield { display: flex; }
        .split-list .hint { padding: 0 var(--sp-2); }
        /* The rows share their columns, so a count and a chip stand aligned under each other
           (decision JP 2026-11-01 08:23 CET, "1c"): the name takes what is left. */
        .split-list ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; }
        .split-list li { display: contents; }
        .split-list a { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; column-gap: var(--sp-2); height: var(--control-h); padding: 0 var(--sp-2); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
        .split-list a:hover { background: var(--row-hover); }
        .split-list a[aria-current="page"] { background: var(--surface-muted); font-weight: 600; }
        .split-list a > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .split-list a > small { justify-self: end; color: var(--text-muted); font-size: var(--txt-xs); font-variant-numeric: tabular-nums; }
        .split-list a > .badge { justify-self: start; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .split[data-split-wide] > .split-list { flex-basis: 300px; }
        .split-list summary { display: flex; align-items: center; height: 28px; padding: 0 var(--sp-2); cursor: pointer; color: var(--text-muted); font-size: var(--txt-xs); font-weight: 600; }
        .split-list summary::-webkit-details-marker { display: none; }
        .split-list summary::after { content: ""; margin-left: auto; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
        .split-list details[open] > summary::after { transform: rotate(45deg); }
        .split-list [hidden] { display: none; }
        .split-item { flex: 1 1 auto; min-width: 0; }
        .split-item > .cardhead [rel="up"] { display: none; }
        @media (max-width: 800px) {
            .split { flex-direction: column; align-items: stretch; }
            .split-list { flex-basis: auto; }
            .split:not([data-split-opened]) > .split-item, .split[data-split-opened] > .split-list { display: none; }
            .split-item > .cardhead [rel="up"] { display: inline-flex; }
        }
        /* Two panes inside one card (`<c-ui.panes>`, decision JP 2026-11-01, "1b"): the parts on
           the left in a column of 200px with a line of 1px to its right, rows of 32px; the chosen
           part on the right. A part's own heading shows only while every part shows. An optional
           search field of 32px above the list. Up to 800px the list stands above the part. */
        .panes { display: flex; align-items: flex-start; }
        .panes-list { flex: 0 0 200px; min-width: 0; padding: 0 var(--sp-2) 0 0; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: var(--sp-2); }
        .panes-list input[type="search"] { width: 100%; }
        .panes-list ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
        .panes-list li { display: contents; }
        .panes-list button { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; column-gap: var(--sp-2); height: var(--control-h); padding: 0 var(--sp-2); border: 0; border-radius: var(--radius-sm); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
        .panes-list button:hover { background: var(--row-hover); }
        .panes-list button[aria-current="true"] { background: var(--surface-muted); font-weight: 600; }
        .panes-list button > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .panes-list button > small { justify-self: end; color: var(--text-muted); font-size: var(--txt-xs); font-variant-numeric: tabular-nums; }
        /* The orange count of rows with a problem, before the ordinary count (decision JP
           2026-11-03, "33a"): the badge at the size of the count beside it. */
        .panes-list button > small > .badge { font-size: var(--txt-xs); font-weight: 600; padding-inline: var(--sp-1); }
        .panes-item { flex: 1 1 auto; min-width: 0; padding-left: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-3); }
        .panes:not([data-panes-ready]) .panes-item > [data-pane] ~ [data-pane] { display: none; }
        .panes:not([data-panes-all]) [data-pane-title] { display: none; }
        @media (max-width: 800px) {
            .panes { flex-direction: column; align-items: stretch; gap: var(--sp-3); }
            .panes-list { flex-basis: auto; padding: 0 0 var(--sp-2); border-right: 0; border-bottom: 1px solid var(--border); }
            .panes-item { padding-left: 0; }
        }
        /* Three field widths (UX standard v2, B3; decisions JP 2026-10-19, "8a", and 2026-10-21,
           "1b"): `core/forms.py::field_width` gives each field short, medium or full, after what
           goes in it. The caps that stretch a field to its column (`.fieldgrid .value`, `.form`,
           `.setting-control`) keep their width but put their --w-sm limit in a zero-specificity
           `:where()`, so the class's max-width wins there. */
        .field-short { max-width: 150px; }                                     /* a number, a date, a code, text of up to 20 characters */
        .field-medium { width: 220px; max-width: 220px; }                      /* a name, a pick list, a password, a search */
        .field-full { width: var(--w-sm); max-width: var(--w-sm); }            /* an e-mail address, a URL, long text, a choice from the database */
        /* The add row of a detail record (principle 5): labels, fields and the blue confirm button
           on one bottom line that wraps as a whole inside its card, and the button as high as the
           fields beside it (decision JP 2026-10-14, variant B). Both stand at the one control
           height of the buttons in the heading above (decision JP 2026-10-21, "3b"); until that
           day the row stood at the field height. The alignment sits in :where() so a caller's
           .row--middle still wins. */
        .addrow { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
        .addrow > .button { margin-left: auto; }  /* at the end of the row, in line with the heading's button (principle 9, decision JP 2026-10-28, "3a") */
        :where(.addrow) { align-items: flex-end; }
        .addrow > .button,
        .addrow :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), select, .combovalue) { min-height: var(--control-h); }
        .plaintext { white-space: pre-wrap; font-family: inherit; }                /* plain-text view (mail body) */
        /* Brand colour preview (House style settings) -- WYSIWYG mock of the app look. */
        .brand-swatch { width: 3rem; height: 2.4rem; padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-md); cursor: pointer; }
        .hs-preview { display: flex; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; min-height: 150px; }
        .brand-sidebar { width: 132px; flex: none; background: var(--brand); color: var(--text-inverse); padding: var(--sp-2) var(--sp-3); font-size: var(--txt-sm); }
        .brand-navitem { margin-top: var(--sp-1); padding: var(--sp-1) var(--sp-2); opacity: 0.85; }
        .brand-navitem--active { margin-top: var(--sp-2); opacity: 1; background: var(--brand-dark); border-left: 3px solid var(--text-inverse); border-radius: var(--radius-sm); }
        .brand-content { flex: 1; min-width: 0; padding: var(--sp-3) var(--sp-4); background: var(--card); }
        /* §3F — the remaining (partly single-use) classes instead of marked one-offs */
        .icon-row { display: inline-flex; gap: var(--sp-1); align-items: center; }  /* icon + text inline */
        .weight-semibold { font-weight: 600; }
        .expander { cursor: pointer; color: var(--text-soft); list-style: none; display: flex; align-items: center; gap: var(--sp-1); padding-block: calc((24px - var(--lh-compact) * 1em) / 2); min-height: 24px; }  /* a 24px target around the compact line (WCAG 2.5.8, B14); the floor catches rounding */                          /* details-summary */
        .expander--accent { color: var(--brand-action); font-weight: 600; }
        /* The chevron of the sprite, not the browser's own marker (decision JP 2026-10-30, "3a"). */
        .expander::-webkit-details-marker { display: none; }
        .expander::before { content: ""; width: 13px; height: 13px; flex: none; background-color: currentColor;
            -webkit-mask: var(--chev-right) center / contain no-repeat; mask: var(--chev-right) center / contain no-repeat; }
        details[open] > .expander::before { -webkit-mask-image: var(--chev-down); mask-image: var(--chev-down); }
        /* A section that folds (<c-ui.section fold>, decisions JP 2026-11-03, "33a" and "34a"):
           the heading row is the summary, chevron first, then the h2 at its own size and
           colour, and the status line on a row of its own under the title, in line with it. */
        details.section > summary.cardhead { flex-wrap: wrap; column-gap: var(--sp-2); row-gap: 0; padding-block: 0; }
        details.section > summary.cardhead > h2 { color: var(--text); }
        details.section > summary.cardhead > .text-small { flex-basis: 100%; margin: 0 0 0 calc(13px + var(--sp-2)); }
        details.section:not([open]) > summary.cardhead { margin-bottom: 0; }
        /* A block that folds (<c-ui.block fold>, decision JP 17-11-2026, "C"): the same, one
           level down; folded, the next block stands right under its heading. */
        details.block > summary.cardhead { column-gap: var(--sp-2); }
        details.block > summary.cardhead > h3 { color: var(--text); display: flex; align-items: center; gap: var(--sp-1); }
        details.block:not([open]) > summary.cardhead { margin-bottom: 0; }
        details.block + details.block { margin-top: var(--sp-1); }
        /* The block's `meta`, how a component is given: one quiet word after a thin rule. */
        .block > .cardhead h3 > small { font-size: var(--txt-sm); font-weight: 400; color: var(--text-soft); margin-left: var(--sp-1); }
        .block > .cardhead h3 > small::before { content: ""; display: inline-block; width: 1px; height: 10px; margin-right: var(--sp-2); vertical-align: -1px; background: var(--border-strong); }
        /* A meta that opens with a chip (how a component is given, decision JP 17-11-2026,
           "6a") needs no divider: the chip sets itself apart. */
        .block > .cardhead h3 > small:has(> .badge:first-child)::before { content: none; }
        .cell-tight { padding: var(--sp-1); }
        .cardfoot--flat { border-top: 0; padding-top: 0; }
        .divider-top { margin-top: var(--sp-3); border-top: 1px solid var(--border); padding-top: var(--sp-2); }  /* separator above a collapsed block */
        .statusline { display: block; min-height: 1.1em; }                               /* reserves height (no jump) */
        .plaintext--framed { background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--sp-3); }
        .mail-frame { width: 100%; height: 60vh; border: 1px solid var(--border); border-radius: var(--radius-md); }  /* mail preview frame */
        .icon-sprite { position: absolute; }                                             /* hidden sprite holder */
        /* Accessibility (phase 5, §3G, WCAG 2.2 AA). */
        /* Skip link (2.4.1): first tab stop, jumps to the main content. */
        .skip { position: absolute; left: var(--sp-2); top: -3rem; z-index: 200; background: var(--card);
            color: var(--brand); border: 1px solid var(--border); border-radius: var(--radius-md);
            padding: var(--sp-2) var(--sp-3); text-decoration: none; transition: top 0.15s; }
        .skip:focus { top: var(--sp-2); }
        /* Visible keyboard focus (2.4.7/2.4.11): one token ring on all interactive elements;
           on the dark sidebar a light ring for enough contrast. */
        :focus-visible { outline: 2px solid var(--brand-action); outline-offset: 2px; }
        aside :focus-visible { outline-color: var(--text-inverse); }
        /* A field takes a soft ring instead (UX v3, decision JP 2026-11-11, "13a"): its border in the
           action colour, and around it a 3px halo of the same colour, light enough to read as a glow. */
        :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea):focus-visible { outline: none; border-color: var(--brand-action); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-action) 22%, transparent); }
        /* **Motion (UX v3, decision JP 2026-11-11, "13a").** A menu or panel opens in 140ms; a change
           of colour, border or shadow on something you point at takes 120ms. Off under
           prefers-reduced-motion, by the rule below. */
        details[open] > .panel { animation: panel-open var(--motion-open) cubic-bezier(0.2, 0.8, 0.2, 1); }
        @keyframes panel-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
        :is(.button, summary, aside nav a, .tabs a, input, select, textarea) { transition: background-color var(--motion-change) ease, border-color var(--motion-change) ease, color var(--motion-change) ease, box-shadow var(--motion-change) ease; }
        /* Hidden visually only, still read aloud (for screenreader-only labels).

           On one line, deliberately: `core/cssguard.py` matches a rule per line, so a body
           broken across two makes the class read as having no rule at all. Harmless while
           nothing carried the name, and the searchable pick list is the first thing that
           does -- it puts `.sr-only` on the select it clips away. */
        .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
        /* Respect the motion preference (2.3.3): animations and transitions all but off. */
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
        }
        /* Loading/busy feedback (spec 3H): the page change, and the busy state of the button
           that was pressed. Token-driven, and off under prefers-reduced-motion.

           **The page change (UX v3, decision JP 2026-11-11, "21a").** The browser keeps the old
           page in view until the new one paints (same-origin paint holding). A 2px line at the
           top of the work area moves while the next page is on its way; it replaced the 3px bar
           over the header that crept to 92%. The two pages cross-fade in 140ms (a view transition
           between our own documents). A transition the browser skips or aborts, and a click
           while it runs, are settled in `core/pagechange.js`, loaded in the head; without
           that, the first try aborted as a page error and held clicks back (#3051). The second try
           (#3074) was red only in CI's older Chromium; CI and the local runs now use the same
           Playwright (`PLAYWRIGHT_VERSION` in the e2e workflow).

           **The loading state (decision JP 2026-11-11, "22a").** When the next page takes
           longer than 200ms, the data on the screen turns into grey bars: table cells, the
           values of a field grid, the figures. That is a page change waiting, so it is not the
           waiting of a background job: a screen that waits on one keeps its readout with
           numbers, the progress component in `cotton/ui/` (decision JP 2026-08-31; named in
           words, because Django parses this file whole and cotton claims a tag that looks
           like one). */
        @view-transition { navigation: auto; }
        ::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--motion-open); }
        @media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
        .loadbar { position: fixed; top: var(--head-h); left: var(--side-w); right: 0; height: 2px; overflow: hidden;
            z-index: 70; opacity: 0; pointer-events: none; transition: opacity 0.15s; }
        .loadbar::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 38%;
            background: var(--brand-action); border-radius: var(--radius-sm); }
        .loadbar.busy { opacity: 1; }
        .loadbar.busy::before { animation: loadbar-slide 1.1s ease-in-out infinite; }
        @keyframes loadbar-slide { from { transform: translateX(-100%); } to { transform: translateX(270%); } }
        @media not all and (max-width: 800px) { html[data-sidebar="collapsed"] .loadbar { left: 64px; } }
        @media (max-width: 800px) { .loadbar { left: 0; } }
        /* Under the motion preference the line stands still, across the whole width. */
        @media (prefers-reduced-motion: reduce) { .loadbar::before { width: 100%; } }
        html[data-loading] main :is(table.datatable tbody td:not(.selectcolumn, .actioncolumn, .hint),
            .fieldgrid .read, dl.figures dd) {
            color: transparent; }
        html[data-loading] main :is(table.datatable tbody td:not(.selectcolumn, .actioncolumn, .hint),
            .fieldgrid .read, dl.figures dd) > * { visibility: hidden; }
        html[data-loading] main :is(table.datatable tbody td:not(.selectcolumn, .actioncolumn, .hint),
            .fieldgrid .read, dl.figures dd) {
            background-image: linear-gradient(90deg, var(--surface-muted), var(--border), var(--surface-muted));
            background-size: 200% 10px; background-repeat: no-repeat; background-position: 0 50%;
            animation: loading-shimmer 1.2s linear infinite; }
        @keyframes loading-shimmer { from { background-position: 200% 50%; } to { background-position: -200% 50%; } }
        [aria-busy="true"] { cursor: progress; }
        button[aria-busy="true"], .button[aria-busy="true"] { opacity: 0.7; }
        /* §3D record field grid: reading and editing share exactly the same grid -- the value cell
           shows the text (.read) in read mode and an input box in edit mode in that same
           spot. Both share the same box model, so toggling does not shift a pixel. */
        .fieldgrid { display: grid; grid-template-columns: var(--label-w) minmax(0, 1fr); align-items: center; row-gap: var(--sp-1); column-gap: var(--sp-2); }
        /* margin: 0 overrides the global `label` rule's margin-bottom below -- .fieldgrid's
           own row-gap already spaces the rows, and this is a real <label> since 2026-09-22 */
        .fieldgrid > .label { font-size: var(--txt-sm); font-weight: 400; color: var(--text-soft); min-height: var(--field-h); display: flex; align-items: center; margin: 0; }
        /* The label column is one width (`--label-w`), so a long
           label wraps inside it -- hyphenated where the browser knows the page's language, else
           at any letter -- instead of running over the field ("Standaardbetaaltermijn", measured 13-10). */
        .fieldgrid > .label { hyphens: auto; overflow-wrap: anywhere; min-width: 0; }
        /* Multiline field: label at the top (on the first line) instead of centred,
           so it does not move along with the height difference read text ↔ textarea */
        .fieldgrid > .label.label--top { align-self: flex-start; min-height: 0; padding-top: var(--sp-1); }
        .fieldgrid > .label:has(+ .value[role="group"]) { align-self: flex-start; }  /* the name of a row of choices sits on its first line (JP 2026-10-14, variant 4) */
        .fieldgrid > .value { min-width: 0; min-height: var(--field-h); display: flex; align-items: center; }
        /* max-width here is the field-level twin of .block's cap above: the same
           var(--w-sm) the old .form/"form p" rule already gave a plain Django-forms-as-
           paragraphs screen (login, password reset), now reaching a fieldgrid field too --
           that selector never matched one, since the field component (named in words, see
           the loadbar comment above for why) renders a .label/.value pair, not a paragraph
           (JP 2026-09-20). */
        .fieldgrid .read, .fieldgrid .value input:not([type=checkbox]):not([type=radio]), .fieldgrid .value select, .fieldgrid .value textarea {
            box-sizing: border-box; width: 100%; min-width: 0; min-height: var(--field-h); padding: var(--sp-1) var(--sp-2);
            border: 1px solid transparent; border-radius: var(--radius-md); font: inherit; font-size: var(--txt-base); line-height: var(--lh-text); }
        :where(.fieldgrid .read, .fieldgrid .value input:not([type=checkbox]):not([type=radio]), .fieldgrid .value select, .fieldgrid .value textarea) { max-width: var(--w-sm); }
        /* Checkbox/radio stay small, on the left; the 28px row (label) centres it → no jump */
        .fieldgrid .value input[type=checkbox], .fieldgrid .value input[type=radio] { width: auto; margin: 0; }
        .fieldgrid .read { display: flex; align-items: center; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .fieldgrid .read:empty::before { content: "\2014"; color: var(--border-strong); }
        /* Multi-line (textarea field): the read view and the textarea share one min-height → no jump */
        /* A long e-mail address has no space to break at; it breaks anywhere rather than being
           cut off behind an ellipsis (person screen, Contact block, 09-10-2026). */
        .fieldgrid .read.multiline { display: block; white-space: normal; overflow-wrap: anywhere; }
        /* The 56px only where a textarea takes the same spot in edit mode (10-10-2026): an
           e-mail cell is multiline so it can break, and was a 56px row in read mode against a
           32px input in edit mode -- a jump, and a tall row for a short address. */
        .fieldgrid .value:has(> textarea) > .read.multiline { min-height: 56px; }
        /* No colour of its own (2026-08-19): this was `--brand`, so a value turned blue the
           moment you started editing it while the read text beside it is `--text` -- and on
           the portal skin that same rule produced graphite where every other field on the
           same screen was browser-black. The base `input` rule owns the colour now, and
           read and edit modes finally show a value in the same colour. */
        /* The `:is()` lifts this to the weight of the base rule above, whose `:not()`s made it
           win with its transparent border: on the tinted edit region a white field still
           showed, on the white one of 2026-10-10 it vanished. */
        .fieldgrid .value :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { background: var(--card); border-color: var(--border-field); }
        /* The error mark wins over the grid's own field rule above, which outweighs the
           general one (found 19-10 in the UX screenshots; verzoek #1435). */
        .fieldgrid .value :is(input:not([type=checkbox]):not([type=radio]), select, textarea):is(.invalid, [aria-invalid="true"]) { border-color: var(--danger); background: var(--danger-field); }
        .fieldgrid .value textarea { min-height: 56px; resize: vertical; white-space: normal; }
        /* Required field -- blue left bar as an inset shadow, does not shift the text */
        .fieldgrid .value input:required, .fieldgrid .value select:required, .fieldgrid .value textarea:required { box-shadow: inset 3px 0 0 var(--brand-light); }
        .fieldgrid .value .combobox:has(select:required) .combovalue { border-left-width: 1px; box-shadow: inset 3px 0 0 var(--brand-light); }
        .fieldgrid .fielderror, .fieldgrid .hint { grid-column: 2; }
        /* Multi-checkbox (e.g. roles) compact inline, so the row does not grow much */
        .fieldgrid .value ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); }
        .fieldgrid .value ul li label { font-weight: 400; display: inline-flex; align-items: center; gap: var(--sp-1); }
        /* Toggle (generic, also for <ul> multiwidgets): read mode shows .read and hides
           the input; edit mode the other way round. Read-only .read.fixed always stays. */
        .fieldgrid .value > :not(.read) { display: none; }
        .editable[data-editing] .fieldgrid .value > .read:not(.fixed) { display: none; }
        .editable[data-editing] .fieldgrid .value > :not(.read) { display: block; }
        /* The file picker keeps its row in edit mode, so the chosen name sits level with the
           button (JP 2026-10-28). */
        .editable[data-editing] .fieldgrid .value > .file-picker { display: inline-flex; }
        /* Suffix (<ui.field> slot `suffix`, 10-10-2026): a .read.fixed.multiline after the
           control, so it stays in both modes and breaks anywhere; it is the only one with a
           sibling before it, which is what scopes these two rules to it. The read text
           before it shrinks to its content without the box padding, so the suffix starts at
           the same x in read and edit mode -- a switch sits at x 0 in both. */
        .fieldgrid .value > * ~ .read.fixed.multiline { flex: 1 1 0; }
        .fieldgrid .value > .read:not(.fixed):has(~ .read.fixed.multiline) { flex: none; width: auto; padding: 0; border-width: 0; }

        /* Config settings page type (§3C): setting rows in .card-sections. On the left the name
           (with its explanation behind an infotip, 2026-09-23), on the right a control that
           differs per value type (field/colour/status). All token-driven -- no font or size of
           its own, the same txt and sp scale as the rest. One line per row now that the
           explanation moved into <c-ui.infotip>, so the control centres against the label
           instead of anchoring to the label's old top line (was align-items: start).

           **The distance between two rows is one rule, not the sum of two (2026-09-23, JP --
           same day the padding fix below turned stale).** Each row used to carry its own
           `padding: var(--sp-2) 0`, later `var(--sp-1) 0`: two stacked rows add their own
           paddings (was 8+8=16px, then 4+4=8px), always double whatever `.fieldgrid` gets for
           the same one-line-per-row shape, because that one pays its `row-gap` once, between
           rows, not per row. The adjacent-sibling selector below does the same thing without
           `.fieldgrid`'s second ingredient (a wrapper div that turns several rows into one
           shared grid) -- a `margin-top` that only exists *between* two settingrows fires once
           per boundary, same as a row-gap would, while a lone or first-in-region row keeps
           none of it, exactly as it had none of the old padding's outer half once a sibling
           rule replaces a self rule. Also why this is not simply `.settingrow { padding:
           var(--sp-1) 0 }` again at half the value: that still charges every row for a
           neighbour that may not be there, and still doubles between two that are. Matches
           `.fieldgrid`'s 4px; a future change to that rhythm is one token on one line instead
           of two paddings two people have to remember to keep matching. */
        /* The value starts right after the label column, left-aligned and in table text size, the
           same as a record field grid (decision JP 2026-10-01, 1a; 2026-10-02, 1a: an editable
           control too, so one card never carries two alignments). Until then the control stood
           at the far right (`1fr auto`, `justify-self: end`) in body text size.
           The label column is `--label-w`, the same as a record's field grid and a translation row
           (UX standard v2, B3; decision JP 2026-10-19, "8a"): one line for every label on every
           screen. A long name ("Afzender bij de sms-dienst") wraps inside it. */
        /* The fold under an import column (decision JP 02-11-2026, "1a"): indented 24px under
           the column it belongs to, with a 2px line on its left so a reader sees where it hangs.
           `.value-map` is its list of value translations, a fieldgrid with no gap between its
           32px lines: the value in the file in the label column, read as a value rather than a
           name, then an arrow and what it becomes here, as wide as the select it is picked in
           (`.field-medium`). The add row below lines up with it: its first field is as wide as
           the label column, and its button stands beside the fields, not at the far end. */
        .value-fold { margin: 0 0 var(--sp-2) var(--sp-5); padding: var(--sp-1) 0 var(--sp-1) var(--sp-3); border-left: 2px solid var(--border-strong); }
        .value-fold > .addrow > .field-short { width: var(--label-w); max-width: var(--label-w); }
        .value-fold > .addrow { align-items: center; }  /* the arrow between the fields sits on their middle */
        .value-fold > .addrow > .button { margin-left: 0; }
        .value-map { row-gap: 0; }
        .value-map > .label { font-size: var(--txt-base); color: var(--text); }
        .value-map .read { gap: var(--sp-2); overflow: visible; padding-left: 0; height: var(--field-h); font-size: var(--txt-base); }
        /* The heading line is the first field: its label, and the value beside it. */
        .value-map > .label:first-child, .value-map > .label:first-child + .value .read { font-size: var(--txt-sm); color: var(--text-soft); }
        .settingrow { display: grid; grid-template-columns: var(--label-w) minmax(0, 1fr); gap: var(--sp-1) var(--sp-2); align-items: center; }
        .settingrow + .settingrow { margin-top: var(--sp-1); }
        /* The settings form of a region (`<c-ui.region settings>`, shell proposal point 11):
           a row has 16px of its own padding, so its label column and its value start that far
           from the card edge, the same distance as in any card (JP 2026-10-10, 4a). */
        /* Since UX v3 the settings card is a card like any other, with its heading inside it
           (decision JP 2026-11-11, "3a", which revises 2026-10-10 "3a", the flat card): one
           frame, the heading on top with a line under it, and the rows flush inside, each
           under a line of its own. A collapsed panel under a row (`[hidden]`, the value
           translations of an import column) does not show; open, it is one more row. */
        .card--settings { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0; overflow: hidden; margin-bottom: var(--sp-4); }  /* B6: the same gap as between cards (JP 2026-10-21, 1a) */
        .card--settings > .cardhead { margin: 0; padding: var(--sp-1) var(--sp-4); min-height: 40px; box-sizing: border-box; background: var(--card); }
        .card--settings > .cardhead h2 { margin: 0; }
        .card--settings > .hint { padding: 0 var(--sp-4); }
        :is(.card--settings, .card--settings > form) > :is(.settingrow, .translationrow) { background: var(--card); border: 0; border-top: 1px solid var(--border); border-radius: 0; margin: 0; padding: calc(var(--sp-1) - 1px) var(--sp-4); }  /* 3px above and below a 32px field: a 40px row since the compact shell (decision JP 2026-10-31, "1a"; 50px before) */
        .card--settings > :not(.cardhead, .hint, .settingrow, .translationrow, script, template, [hidden], form:not(:has(:not(input[type="hidden"]))), form:has(> .translationrow)) { background: var(--card); border: 0; border-top: 1px solid var(--border); border-radius: 0; padding: var(--sp-2) var(--sp-4); }
        .card--settings > :is(ul, ol) { padding-left: calc(var(--sp-4) + 1.5em); }
        /* The regions of a config screen stack as one column, each as wide as the page. */
        .config-regions { display: flex; flex-direction: column; }
        /* The overview Settings opens on: a card per group in columns, each card as tall as its
           screens (decisions JP 16-11-2026, "Overzicht Instellingen" and "2a"). One column on a
           narrow screen. */
        .card-columns { columns: 3 240px; column-gap: var(--sp-4); }
        .card-columns > .card { break-inside: avoid; }
        .card-columns .cardhead h2 { display: flex; align-items: center; gap: var(--sp-2); }
        /* A list of links in a card: one per line, the height of a row, a thin line between. */
        .link-list { list-style: none; margin: 0; padding: 0; }
        .link-list li + li { border-top: 1px solid var(--border); }
        .link-list a { display: flex; align-items: center; min-height: var(--control-h); text-decoration: none; }
        .link-list a:hover { text-decoration: underline; }
        .setting-info { min-width: 0; position: relative; }
        /* The infotip stands right after the name, on its line (the agreed visual, JP 2026-10-11,
           "1a 2b"). From 2026-10-02 ("1a") it hung left of the name in the card's padding, so
           that a long name plus the icon would not wrap in the then 132px label column; the
           agreed visual puts it back after the name. Inside the label in the DOM, so a screen
           reader reads the name first and the button after it.
           The button floats just past the last word (absolute within the inline `.infotip`),
           and the label keeps room for it on the right. As an inline box of its own Chromium
           may break the line right before it, also after a no-break space, and a long name
           then left the question mark alone on a line (measured in CI on 12-10). */
        .setting-info .infobtn { position: absolute; left: var(--sp-1); top: 50%; transform: translateY(-50%); padding: 0; }
        .setting-info :is(strong, label):has(.infotip) { padding-right: calc(16px + var(--sp-1)); }  /* the width of `.infoicon`, plus its gap */
        /* Label + input box follow the record field grid exactly (§3D input mode) for uniformity:
           small, semibold, soft label; --txt-sm input with --radius-md. Both a plain <strong>
           (read-only row) and a real <label for> (bound field, 2026-09-23) get the same look --
           the element differs, the appearance must not. */
        .setting-info strong, .setting-info label { display: block; font-size: var(--txt-sm); font-weight: 400; color: var(--text-soft); }
        /* The control never exceeds the record field grid's own input width (2026-09-23, same
           tokens as .fieldgrid's cap): a settingrow control used to be able to stretch across the
           whole card on a wide screen, which is what made the config-settings page type read
           sparse/wide compared to a capped record screen (JP, Platform Settings screenshot). */
        :where(.setting-control input:not([type=checkbox]):not([type=radio]):not([type=color]), .setting-control select, .setting-control textarea) { max-width: var(--w-sm); }
        /* The value side follows a field grid's `.read` (decision JP 2026-10-02, 3a: the Club card of
           a club's settings, a field grid, sat beside setting rows at 28px against 15px and with
           its text 9px further in). So the same 28px minimum and the same inset: the read text of a
           field grid starts after its padding plus its transparent border, and so does a value
           here. A form field that opens the control keeps its box on the column edge, as an input
           in an editing field grid does, so its text lands on that same line. */
        .setting-control { display: flex; align-items: center; gap: var(--sp-2); justify-self: stretch; align-self: start; flex-wrap: wrap; min-width: 0; min-height: var(--field-h); padding-left: calc(var(--sp-2) + 1px); font-size: var(--txt-base); }
        /* The buttons of a setting row stand at the end of the row (UX standard v2, rule A7,
           decision JP 2026-10-19): the control takes the row's width and the first button, menu
           or one-button form of the trailing run takes the free space before it, so a button
           and the menu beside it end the row together. Until that day the control shrank to
           its content and the button followed the value on the left; until 2026-10-20 only the
           last one moved, which left a button before a menu on the left. */
        .setting-control > :is(.button, details.rowmenu, form:has(> .button)):not(:is(.button, details.rowmenu, form:has(> .button)) + *) { margin-left: auto; }
        .setting-control > :is(input, select, textarea, .toggle, .combobox):first-child { margin-left: calc(-1 * (var(--sp-2) + 1px)); }
        .setting-control input:not([type=color]), .setting-control select { border-radius: var(--radius-md); }
        /* The source column (decision JP 2026-09-30, 2a): a fixed narrow column on the right of
           a setting row that says where the value lives -- a vendor (Zitadel, Scalingo, Bird),
           or empty when Squavio keeps it itself. Also the "Tab" column on the club record's
           Addresses and Set-up cards. The card switches it on (the region's `source_title` prop),
           which renders the column heading once; each row fills its own cell
           (the setting row's `source` prop). Every setting row is a grid of its own, so a row without
           a source simply leaves the column empty and the rows below stay aligned: the column
           has a fixed width, and only the control column in the middle varies per row. */
        /* 10rem since 2026-10-03: at 8rem the longest heading, "Why this value" in Dutch, broke
           over two lines (portal check 2026-10-02, JP 3a; measured 159px on one line). */
        .card--with-source .settingrow { grid-template-columns: var(--label-w) minmax(0, 1fr) 10rem; }
        .setting-source { font-size: var(--txt-xs); color: var(--text-soft); align-self: center; }
        /* The heading row above the rows (decision JP 2026-10-26, card 87): the source column's
           heading, and the headings of the name and value columns where a card has them ("Column
           in the file", "In Squavio" on an import mapping). One cell per column, so each heading
           lands on its own column without a placement rule. */
        .settingrow--head { border-bottom: 1px solid var(--border); padding-bottom: var(--sp-1); }
        .settingrow--head .setting-source { font-weight: 600; }
        /* The heading of the name and the value column (decision JP 2026-10-26, card 89): the look
           of the source column's heading, under a name of its own, because it is no source. */
        .setting-column-head { font-size: var(--txt-xs); color: var(--text-soft); align-self: center; font-weight: 600; }
        .settingrow--head + .settingrow { margin-top: var(--sp-2); }
        .card--settings > .settingrow--head { padding-bottom: var(--sp-1); }
        .card--settings > .settingrow--head + .settingrow { margin-top: 0; }
        @media (max-width: 640px) { .settingrow, .card--with-source .settingrow { grid-template-columns: 1fr; } .settingrow--head { display: none; } }
        /* The translation row (<c-ui.translationrow>, decision JP 2026-10-12, "1a" and "2a"): the
           name of a text, the source it is translated from and the field for the translation,
           at the same height, with a thin line under each row (the Moneybird look). As a
           setting row: every row its own grid with fixed outer columns, so the rows line up
           without a wrapper. The source is read-only, in the grey box of a value you do not
           edit here; `pre-wrap` keeps the line breaks of a mail body. */
        .translationrow { display: grid; grid-template-columns: var(--label-w) minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-3); align-items: start; padding-block: var(--sp-2); border-bottom: 1px solid var(--border); }
        .translationrow > label { margin: 0; padding-top: var(--sp-1); }
        .translationrow :is(textarea, input:not([type="checkbox"], [type="radio"], [type="hidden"])) { width: 100%; }
        /* A cell of the two-language shape: a grey box above a field when the club compares
           with the standard (decision JP 2026-10-12, "3d"/"4b"). */
        .translationrow > div:not(.translationrow-source) { display: grid; gap: var(--sp-1); align-content: start; min-width: 0; }
        .translationrow-source { min-height: var(--field-h); padding: var(--sp-1) var(--sp-2); font-size: var(--txt-sm); color: var(--text-soft); background: var(--surface-muted); border: 1px solid var(--border); border-radius: var(--radius-md); white-space: pre-wrap; overflow-wrap: anywhere; }
        .translationrow[data-head] { padding-block: 0 var(--sp-1); }
        /* Narrow: name, source and field under one another; a heading of plain names has no
           column then, but a heading of controls still acts and stays. */
        @media (max-width: 640px) { .translationrow { grid-template-columns: 1fr; gap: var(--sp-1); } .translationrow[data-head][aria-hidden] { display: none; } }
        /* One language (Talen per club, decision JP 2026-10-21): a region with
           data-translation="off" shows the club's own column only. The translation column goes,
           and a heading row of plain language names with it; a heading row of controls stays
           and loses its third cell, as every row does. The fields stay in the form, so a post
           keeps their values. The translation switch in the region's head flips the attribute
           (toggleaction.js). */
        [data-translation="off"] :is(.translationrow > :nth-child(3), .translationrow[data-head][aria-hidden]) { display: none; }
        [data-translation="off"] .translationrow { grid-template-columns: var(--label-w) minmax(0, 1fr); }
        @media (max-width: 640px) { [data-translation="off"] .translationrow { grid-template-columns: 1fr; } }
        .editable[data-editing] .fieldgrid .value > ul { display: flex; }
        .editable[data-editing] .fieldgrid .value > .toggle { display: inline-flex; margin: 0; }  /* the rule above sets display:block, which would flatten the switch */
        /* margin: 0 because the switch is a <label>, and the global `label` rule's 4px bottom
           margin made an on/off row 36px in edit mode against 32px in read mode (10-10-2026). */
        /* Show only in edit mode (e.g. the autosave hint); visibility (not display)
           so the space stays reserved in read mode → toggling shifts nothing */
        .editable:not([data-editing]) [data-edit-only] { visibility: hidden; }
        /* The autosave line in a panel heading (decision JP 2026-10-12, "6a") gives way on a
           phone, where it pushed the Edit button onto a line of its own: the toast says it there. */
        @media (max-width: 640px) { .cardhead .hint[data-edit-only] { display: none; } }
        /* A field row in one mode alone (<ui.field mode>, decision JP 2026-10-11, "1c"): the
           address as one block in read mode, as its fields in edit mode. display, not
           visibility: the block stands in for several rows, and their room would be a hole. */
        .editable:not([data-editing]) .fieldgrid > [data-mode="edit"] { display: none; }
        .editable[data-editing] .fieldgrid > [data-mode="read"] { display: none; }
        /* The name of a split item edited in its heading (UX v3, decision JP 2026-11-12, "2a"):
           the text in read mode, the field while editing, in the same place. */
        .split-item > .cardhead.editable:not([data-editing]) h2 > :not(.read) { display: none; }
        .split-item > .cardhead.editable[data-editing] h2 > .read { display: none; }
        .split-item > .cardhead.editable h2 > :not(.read) { font-weight: 400; }
        /* An empty field row out of read mode (<ui.field empty>, decision JP 2026-10-11, "3a"):
           only in a region that opts in, so a screen without the club's choice keeps its dash. */
        [data-hide-empty]:not([data-editing]) .fieldgrid > [data-empty] { display: none; }
        /* What is left without a row goes too (todo 11-10-2026, UX review of #528): a field group
           with no visible row, the mini-heading above it, and a block with no visible row in any
           of its groups. A block with an action in its heading stays: the action works in read
           mode as well (<ui.block>, slot `actions`). The same for a section inside the region
           (the Contact section of the person screen), unless its heading carries an action
           (Move on Address). One :has() each: a :has() inside a :has() is invalid and drops
           the whole rule. */
        [data-hide-empty]:not([data-editing]) .fieldgrid:not(:has(> :not([data-empty], [data-mode="edit"]))),
        [data-hide-empty]:not([data-editing]) h4:has(+ .fieldgrid):not(:has(+ .fieldgrid > :not([data-empty], [data-mode="edit"]))),
        [data-hide-empty]:not([data-editing]) .block:has(.fieldgrid):not(:has(> .cardhead)):not(:has(.fieldgrid > :not([data-empty], [data-mode="edit"]))),
        [data-hide-empty]:not([data-editing]) .section:has(.fieldgrid):not(:has(> .cardhead > :not(h2))):not(:has(.fieldgrid > :not([data-empty], [data-mode="edit"]))) { display: none; }
        /* A module heading is never smaller than the text below it (question 177, JP 2026-11-13). */
        h3 { margin: var(--sp-3) 0 var(--sp-1); color: var(--text); font-size: var(--txt-base); font-weight: 600; }
        h4 { margin: 0 0 var(--sp-1); font-size: var(--txt-sm); color: var(--text-soft); font-weight: 600; }
        /* A mini-heading over a field group (Contact on the person screen): room under it, and
           room between one group and the next heading (todo 11-10-2026, UX review of #528).
           The room sits on the group, so a group that drops out of read mode takes it along. */
        h4:has(+ .fieldgrid) { margin-bottom: var(--sp-2); }
        .fieldgrid:has(+ h4) { margin-bottom: var(--sp-4); }

        /* Table bar: filters, column choice, export, page size */
        /* Datatable frame: the toolbar sticks (on both axes) just below the app header, so it stays
           put when scrolling vertically and horizontally. The page is the only scroller (no
           table scrollbar). `.tablehead` wraps the toolbar; z-index below the app header (60). */
        .tablehead { position: sticky; top: 0; left: 0; z-index: 40; margin-bottom: var(--sp-3); }
        /* List page = fixed frame that fills the available height; only the rows area scrolls. The
           scrollbar sits right against the screen edge (= page level, not a framed table scroll).
           Title, tabs, toolbar, column headers (sticky top:0 inside the scroller) and foot sit outside
           the scroller and are therefore fixed -- no sticky-offset arithmetic (that differs per page), no JS.
           `:has()` switches this on only on list pages; main does not scroll there itself (one scrollbar). */
        /* The list page stays a real card (bg + border + radius, just like the other screens); the
           space around it comes from the padding on main. The card is a flex column that fills the height,
           only the scroller (`.tablewrap`) scrolls. The fixed head parts have side padding (text
           clear of the border); the scroller has no side padding so that (a) the rows run the full card
           width with the scrollbar neatly against the inner edge, and (b) the sticky-left columns stick
           to the edge instead of sideways-scrolled data showing through in a padding strip. */
        /* Since the page heading left the card (2026-10-10) main is a column: the heading and
           any banner take their own height, the list card the rest. */
        main:has(.card--list) { padding: var(--sp-4) var(--sp-5); overflow: hidden; display: flex; flex-direction: column; }
        .card--list { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; margin: 0; padding: 0; overflow: hidden; }
        .card--list > .cardhead { flex: 0 0 auto; padding: var(--sp-4) var(--sp-4) var(--sp-2); margin: 0; }  /* the card's top inset (B6) */
        .card--list .tabs { flex: 0 0 auto; padding: 0 var(--sp-4); margin: 0; }
        /* `>`, because this is a flex-child rule for the list card's own layout, not a rule
           about hints. Since the empty-row notice carries `.hint` (2026-08-19) a descendant
           selector would indent that sentence inside the table as well. */
        .card--list > .hint { flex: 0 0 auto; padding: 0 var(--sp-4); }
        /* `relative` (not `static`): the bulk action bar is an overlay with `inset: 0` and must
           stay inside the toolbar -- with `static` it escapes to the whole screen. */
        /* The list is one panel (shell proposal point 5, "the combi", decision JP 2026-10-10):
           our table bar runs as a grey strip across the top of the card, the rows are about
           40px high, and the first and last column line up with the strip's inner edge. */
        .card--list .tablehead { position: relative; flex: 0 0 auto; padding: 0; margin: 0; }
        .card--list .tablebar { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: var(--sp-2) var(--sp-4); }
        .card--list table.datatable :is(th, td):first-child:not(.selectcolumn) { padding-left: var(--sp-4); }
        .card--list table.datatable :is(th, td):last-child:not(.actioncolumn) { padding-right: var(--sp-4); }
        .card--list .tablewrap { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 0; }
        /* A list keeps every value on one line (the agreed visual, JP 2026-10-11, "1a 2b"): a
           name no longer breaks over two lines, a long address ends in an ellipsis once the
           column has a set width, and a list wider than the panel scrolls sideways. The sentence
           of an empty list is no value: it wraps inside the card instead of being cut off. */
        .card--list table.datatable tr:not(.row-empty) > td:not(.hint, .selectcolumn, .actioncolumn) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .card--list .tablefoot { position: static; flex: 0 0 auto; margin: 0; border-left: 0; border-right: 0; border-bottom: 0; border-radius: 0; padding: var(--sp-2) var(--sp-4); }
        .card--list table.datatable thead th { top: 0; }
        .tablebar { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--sp-2) var(--sp-2); min-height: var(--tablebar-h); }
        .tablebar .space { flex: 1; }
        .tablebar input, .tablebar select { background: var(--card); padding: var(--sp-1) var(--sp-2); }
        /* **The search field with its key** (UX v3, decision JP 2026-11-11, "18a"): "/" puts the focus
           in it, and the key stands at its right end until you type or touch it. Not on a touch
           screen, which has no key to press. */
        .searchfield { position: relative; display: inline-flex; align-items: center; min-width: 0; }
        .searchfield > input { width: 100%; padding-left: calc(var(--sp-2) + 20px); padding-right: calc(var(--sp-2) + 20px); }
        /* The magnifier at its start (UX v3, decision JP 2026-11-11, "10a"): every search field
           reads "Search in ..." and carries it. A field without the key keeps its right edge. */
        .searchfield > svg { position: absolute; left: var(--sp-2); width: 16px; height: 16px; color: var(--text-soft); pointer-events: none; }
        .searchfield > input:last-child { padding-right: var(--sp-2); }
        .searchfield > kbd { position: absolute; right: var(--sp-2); display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 var(--sp-1); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); color: var(--text-soft); font: inherit; font-size: var(--txt-xs); font-weight: 500; line-height: 1; pointer-events: none; }
        .searchfield > input:is(:focus, :not(:placeholder-shown)) + kbd { display: none; }
        @media (hover: none) { .searchfield > kbd { display: none; } .searchfield > input { padding-right: var(--sp-2); } }
        .panes-list > .searchfield { display: flex; }
        /* "Clear all filters" is an icon button of the toolbar (principle 9, decision JP 2026-10-28,
           "2a"). The text link stays only on the parked shifts list. */
        .filterclear:not(.button) { font-size: var(--txt-sm); color: var(--text-soft); text-decoration: none; align-self: center; white-space: nowrap; }
        .filterclear:not(.button):hover { color: var(--danger); }
        /* Table buttons: separate buttons (Columns/Export/Rows/View), each with its own flyout */
        .tablebuttons { display: flex; gap: var(--sp-2); align-items: center; margin-left: auto; }
        .tablebutton { position: relative; }
        .tablebutton summary { list-style: none; cursor: pointer; height: var(--control-h); display: inline-flex; align-items: center; }
        .tablebutton summary::-webkit-details-marker { display: none; }
        /* The raised panel: a white surface floating over the page. Five places open one
           -- the two toolbar popovers, the column filter, the row menu and the block
           editors' settings panel -- and until 2026-08-16 all five wrote these four
           declarations out by hand. What stays per place is what genuinely differs there:
           how it is positioned, its padding, its width. */
        .panel { background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--radius-md); box-shadow: 0 4px 14px var(--shadow); font-size: var(--txt-base); color: var(--text); }  /* one look wherever it opens, also in a grey column header (JP 2026-10-28, "2a") */
        /* A floating panel that fits neither below nor above its anchor scrolls inside; its height
           is the room on its side, set by `positionFloater` (core/static/core/shell/helpers.js;
           decision JP 2026-10-31, "2a"). */
        .panel--scroll { overflow-y: auto; }
        .tablebutton .panel { position: absolute; right: 0; top: calc(100% + 4px); padding: var(--sp-2) var(--sp-3); z-index: 50; min-width: 220px; }
        .tablebutton .panel:has(.segments) { min-width: 120px; }  /* rows per page: numbers only */
        .panel h4 { margin: var(--sp-1) 0 var(--sp-1); font-size: var(--txt-sm); color: var(--text-soft); }
        .tablebutton .panel > .toggle { display: flex; }  /* switches in a panel stand one per line (Show more on the person list, JP 2026-11-01, "1a") */
        .tablebutton .panel select { width: 100%; font-size: var(--txt-base); padding: var(--sp-1) var(--sp-1); }
        .result { font-size: var(--txt-sm); color: var(--text-soft); white-space: nowrap; align-self: center; }
        /* Header filters: small funnel on the right in the column head, options in a floating panel.
           Left = header text + sorting, right = filter: two separate click targets. */
        /* No transform here: that would anchor the floating (fixed) filter panel to the icon */
        .headerfilter { position: absolute; right: 4px; top: 50%; margin-top: -12px; }
        /* 24 x 24 target around the 11px funnel (WCAG 2.5.8); the funnel stays where it was. */
        .headerfilter summary { list-style: none; cursor: pointer; color: var(--text-muted); display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; }
        .headerfilter summary::-webkit-details-marker { display: none; }
        .headerfilter summary svg { width: 13px; height: 13px; }  /* `#i-funnel` from the sprite */
        .headerfilter summary:hover { color: var(--brand-action); }
        .headerfilter.active summary { color: var(--brand-light); }
        /* Out of sight until the column is pointed at or reached with the keyboard (the agreed
           visual, JP 2026-10-11, "1a 2b"); a filter that is on stays in view. Only where a
           pointer can hover: on a touch screen the funnel stays, or the filter is unreachable. */
        @media (hover: hover) {
            thead th:not(:hover, :focus-within) .headerfilter:not(.active, [open]) summary { opacity: 0; }
        }
        thead th:has(.headerfilter) { padding-right: var(--sp-5); }
        /* Active filter: the whole header cell clearly marked */
        thead th:has(.headerfilter.active) { background: var(--col-filtered); box-shadow: inset 0 -2px 0 var(--brand-light); }
        /* Sortable header: subtle ↕ on hover (as long as it is not sorted on yet) */
        th.sortable:hover:not(:has(.sortmarker))::after { content: ""; display: inline-block; width: 0.9em; height: 0.9em; margin-left: var(--sp-1); vertical-align: -0.15em; background-color: var(--brand-light); -webkit-mask: var(--chev-updown) no-repeat center / contain; mask: var(--chev-updown) no-repeat center / contain; }
        .headerfilter .panel { position: fixed; padding: var(--sp-2) var(--sp-2); z-index: 50; min-width: 160px; max-height: 280px; overflow-y: auto; text-transform: none; font-weight: 400; letter-spacing: normal; }
        .headerfilter .panel input[type="text"], .headerfilter .panel input[type="search"] { width: 170px; padding: var(--sp-1) var(--sp-2); }
        .filteroption { display: flex; gap: var(--sp-2); align-items: center; margin: var(--sp-1) 0; white-space: nowrap; cursor: pointer; }
        .filteroption input { width: auto; }
        /* Option list in flyouts (e.g. views) */
        .optionbutton { display: block; width: 100%; text-align: left; border: 0; background: none; padding: var(--sp-1) var(--sp-2); font-size: var(--txt-base); cursor: pointer; border-radius: var(--radius-sm); color: var(--text); white-space: nowrap; }
        .optionbutton:hover { background: var(--brand-tint); }
        .optionbutton.active, .segments button.active, .segments a.active { background: var(--brand-tint); box-shadow: inset 3px 0 0 var(--brand-light); color: var(--brand); font-weight: 600; }
        .optionrow input { flex: 1; min-width: 0; padding: var(--sp-1) var(--sp-2); }
        .optionslot { display: flex; align-items: center; justify-content: center; gap: var(--sp-1); width: 100%; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: none; color: var(--text-soft); font-size: var(--txt-sm); padding: var(--sp-1) var(--sp-2); cursor: pointer; margin-top: var(--sp-1); }
        .optionslot:hover { border-color: var(--brand-light); color: var(--brand); background: var(--brand-tint); }
        .optionslot svg { width: 13px; height: 13px; }
        /* Views panel: per-row icon actions (star (default), pin (pin down), pencil, trash)
           and the draft ("not saved") markers. The box takes the row size (decision JP 2026-10-22, "2b"). */
        .option-icon { border: 0; background: none; cursor: pointer; width: var(--control-h-row); height: var(--control-h-row); display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); color: var(--text-soft); flex: none; }
        .option-icon:hover { background: var(--brand-tint); color: var(--text); }
        .option-icon.on { color: var(--brand); }
        .option-icon.success { color: var(--success); }
        .vw-defaulticon { width: 16px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--brand); }
        .vw-defaulticon svg { width: 13px; height: 13px; }
        /* Kebab (⋮) in a view row the same size as the other row icons (`--control-h-row`/13px). */
        /* The size override that used to sit here (1.5rem) is gone: a row in the views panel
           is a row, so its menu takes `--control-h-row` from the rule above like every other
           one. It also crossed the WCAG 2.2 SC 2.5.8 minimum by nothing at all -- 24x24 exact
           -- where the standing row size clears it. The glyph stays smaller: the panel is
           narrow and the icon carries less work there than in a table row. */
        .optionrow .rowmenu > summary svg { width: 13px; height: 13px; }
        .option-icon svg { width: 13px; height: 13px; }
        .draft-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--warning); margin-left: var(--sp-1); vertical-align: middle; }
        .tablebutton summary.changed { position: relative; }
        .tablebutton summary.changed::after { content: ""; position: absolute; top: 1px; right: 1px; width: 7px; height: 7px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 0 1.5px var(--card); }
        /* styleguard:off — task calendar/dynamic (exception zone, §5a) */
        /* Task calendar: a Mon–Sun grid with task cards in their occupancy colour */
        /* Continuous week planner: the weeks stacked in one scrollable block */
        /* Shift type filter: colour chips that show or hide types */
        .calfilter { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-bottom: 0.55rem; }
        .calfilter-label { font-size: var(--txt-xs); color: var(--text-soft); margin-right: 0.15rem; }
        .calchip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.6rem; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); font-size: var(--txt-sm); font-family: inherit; line-height: var(--lh-compact); cursor: pointer; text-decoration: none; color: var(--text-soft); background: var(--card); }
        .calchip .calchip-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--chipcolour); flex: none; opacity: 0.4; }
        .calchip.on { color: var(--card); background: var(--chipcolour); border-color: var(--chipcolour); }
        .calchip.on .calchip-dot { background: var(--card); opacity: 1; }
        .calchip:not(.on) { text-decoration: line-through; opacity: 0.75; }
        .calchip:hover { filter: brightness(0.97); }
        /* Planning panel: candidates grouped per source group, with the shift type above them */
        .plansection + .plansection { margin-top: 0.6rem; }
        .plansection { border-radius: 6px; padding: 0.15rem 0.25rem; transition: opacity 0.2s, box-shadow 0.2s; }
        .plansection-types { display: flex; flex-wrap: wrap; gap: 0.25rem 0.55rem; margin-bottom: 0.15rem; }
        .plansource { display: inline-flex; align-items: center; gap: 0.3rem; font-size: var(--txt-sm); font-weight: 600; color: var(--text); }
        .plansource .calchip-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--chipcolour); flex: none; }
        /* Unavailability indicator next to a name in the scheduling panel (status dot instead of emoji) */
        .dot-unavailable { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); flex: none; }
        .plansection-head { margin: 0 0 0.3rem; font-size: var(--txt-sm); color: var(--brand); border-bottom: 1px solid var(--border); padding-bottom: 0.15rem; }
        /* Slot clicked: the section with draggable people lights up, the rest dims */
        .plansection.highlighted { box-shadow: 0 0 0 2px var(--brand-light); background: var(--cal-highlighted); }
        .plansection.dimmed { opacity: 0.35; }
        .slotbar.chosen { outline: 2px solid var(--brand-light); outline-offset: 1px; }
        /* Slots of the clicked person stand out; the rest dims */
        .slotbar.fromperson { outline: 3px solid var(--brand-light); outline-offset: 1px; box-shadow: 0 0 0 6px rgba(41,128,185,0.4); z-index: 1; }
        .caltask.dimmed { opacity: 0.3; }
        .planperson.chosen { box-shadow: inset 3px 0 0 var(--brand-light); background: var(--cal-highlighted); }
        /* While dragging: shifts this person is not allowed on are dimmed */
        .caltask.no-target { opacity: 0.3; }
        /* Scheduled member who is not in the group(s) of the shift */
        .slotbar.task.external { background: repeating-linear-gradient(45deg, var(--success-tint) 0 5px, var(--cal-external-2) 5px 10px); }
        .slotbar.task.external .who { font-weight: 600; }
        /* Status per person for the clicked time window */
        .planperson[data-status="free"] { box-shadow: inset 3px 0 0 var(--success); }
        .planperson[data-status="busy"], .planperson[data-status="away"] { opacity: 0.4; }
        .planperson[data-status] .personhead::after { font-size: 0.66rem; white-space: nowrap; margin-left: 0.3rem; }
        .calendar-card { padding: 0.4rem; overflow: hidden; position: relative; }
        .calscroll-buttons { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); z-index: 5; display: flex; flex-direction: column; gap: 6px; }
        .calscroll-buttons button { width: 32px; height: 32px; border: 1px solid var(--border-strong); background: rgba(255,255,255,0.92); border-radius: 50%; cursor: pointer; color: var(--brand); font-size: 0.9rem; line-height: 1; box-shadow: 0 1px 5px rgba(0,0,0,0.2); }
        .calscroll-buttons button:hover { background: var(--card); color: var(--brand-light); }
        .calscroll-buttons button:active { background: var(--brand-tint); }
        /* No visible scrollbar; navigating is done with the up/down buttons and the
           arrow keys. */
        .calendar-scroll { position: relative; overflow-y: auto; overflow-x: auto; height: calc(100vh - 190px); min-height: 360px; scrollbar-width: none; -ms-overflow-style: none; }
        .calendar-scroll::-webkit-scrollbar { width: 0; height: 0; }
        .calendar-head { position: sticky; top: 0; z-index: 3; display: grid; gap: 4px; background: var(--card); padding-bottom: 3px; border-bottom: 1px solid var(--border); }
        .calweek { display: grid; gap: 4px; padding: 4px 0; transition: grid-template-columns 0.35s ease; }
        .calweek + .calweek { border-top: 1px solid var(--border); }
        .calweek.current { background: var(--cal-highlighted); box-shadow: inset 3px 0 0 var(--brand-light); border-radius: 6px; }
        .calday { background: var(--card); border: 1px solid var(--border); border-radius: 6px; min-height: 92px; padding: 0.25rem 0.3rem; display: flex; flex-direction: column; gap: 3px; }
        .calday.weekend { background: var(--surface-muted); }
        .calday.today { border-color: var(--brand-light); box-shadow: inset 0 0 0 2px var(--brand-light); background: var(--cal-today-bg); }
        .caldate { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; font-weight: 600; color: var(--text); padding-bottom: 2px; border-bottom: 1px solid var(--border); }
        .calday.today .caldate { color: var(--brand); border-bottom-color: var(--brand-light); }
        .caldate .calday-name { font-size: 0.7rem; font-weight: 600; color: var(--text-soft); }
        .calday.today .caldate .calday-name { color: var(--brand-light); }
        .caldate .plusbutton { text-decoration: none; color: var(--text-soft); padding: 0 4px; border-radius: 3px; font-weight: 600; }
        .caldate .plusbutton:hover { background: var(--brand-tint); color: var(--brand); }
        .caltask { display: block; font-size: 0.73rem; padding: 0.14rem 0.35rem; border-radius: 4px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid; }
        .caltask.full { background: var(--success-tint); color: var(--success); border-color: var(--success); }
        .caltask.understaffed { background: var(--danger-tint); color: var(--cal-under-text); border-color: var(--danger); }
        .caltask:hover { filter: brightness(0.96); text-decoration: none; }
        .caltask.target { outline: 2px dashed var(--brand-light); outline-offset: 1px; }
        /* Vertical time axis per day: shifts as a block at their time, height = duration */
        .timeaxis { position: relative; margin-top: 3px; }
        .timeaxis .hourline { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--border); pointer-events: none; }
        .timeaxis .hourline span { position: absolute; left: 0; top: -0.52rem; font-size: 0.56rem; color: var(--text-soft); background: rgba(255,255,255,0.75); padding: 0 1px; z-index: 1; }
        /* Block track: leaves room on the left for the hour labels so they do not fall behind the blocks */
        .timeaxis .timeaxis-track { position: absolute; left: 16px; right: 1px; top: 0; bottom: 0; }
        /* Shift block: a tinted cell per status; the vertical slot bars fall inside it */
        .timeaxis .caltask { position: absolute; box-sizing: border-box; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border-strong); border-left: 3px solid var(--brand-light); border-radius: 3px; min-height: 15px; overflow: hidden; padding: 0; }
        .timeaxis .caltask.full { border-left-color: var(--success); border-color: var(--cal-full-border); background: var(--cal-full-bg); }
        .timeaxis .caltask.understaffed { border-left-color: var(--danger); border-color: var(--cal-under-border); background: var(--danger-field); }
        .timeaxis .caltask .blockhead { flex: none; font-size: 0.7rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 3px; border-bottom: 1px solid var(--border); }
        .timeaxis .caltask.full .blockhead { color: var(--cal-full-text); background: var(--cal-full-headbg); border-bottom-color: var(--cal-full-headborder); }
        .timeaxis .caltask.understaffed .blockhead { color: var(--cal-under-text); background: var(--cal-under-headbg); border-bottom-color: var(--cal-under-headborder); }
        .timeaxis .caltask .slots { display: flex; flex: 1 1 auto; min-height: 0; gap: 2px; padding: 2px; box-sizing: border-box; }
        .timeaxis .caltask .slot { position: relative; flex: 1 1 0; min-width: 0; }
        .slotbar { position: absolute; left: 3px; right: 3px; display: flex; flex-direction: column; justify-content: space-between; text-align: center; border-radius: 2px; font-size: 0.68rem; line-height: var(--lh-compact); overflow: hidden; padding: 0 2px; box-sizing: border-box; }
        .slotbar .time { font-size: 0.6rem; opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .slotbar .who { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-height: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .slotbar.task { background: var(--success-tint); color: var(--cal-full-text); border: 1px solid var(--cal-slot-border); }
        .slotbar.empty { border: 1px dashed var(--danger); background: var(--cal-empty-bg); color: var(--cal-under-text); }
        /* Child records in the task list: the staffing per place, below the shift */
        .childtoggle { border: 0; background: none; cursor: pointer; color: var(--text-soft); padding: 0 5px 0 0; font-size: 0.72rem; }
        .childtoggle:hover { color: var(--brand); }
        .childrow td.kind { font-size: 0.8rem; color: var(--text-soft); background: var(--surface-soft); padding-left: 1.8rem; }
        .childrow td.kind.empty { color: var(--cal-under-text); font-style: italic; }
        /* Planning panel beside the calendar: the people to drag in */
        .calcontent { display: flex; gap: 0.8rem; align-items: flex-start; flex-wrap: wrap; }
        .calside { width: var(--cal-panel); flex: none; background: var(--surface-muted); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0.5rem 0.6rem; position: sticky; top: 0.6rem; max-height: calc(100vh - 190px); overflow-y: auto; }
        .calside h4 { font-size: var(--txt-sm); color: var(--text-soft); }
        .planperson { background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 0.22rem 0.45rem; margin: 0.25rem 0; font-size: var(--txt-sm); cursor: grab; }
        .planperson:active { cursor: grabbing; }
        .planperson .personhead { display: flex; justify-content: space-between; align-items: center; gap: 0.3rem; }
        .planperson .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .planperson .meta { display: flex; gap: 0.2rem; align-items: center; flex: none; }
        /* styleguard:on */
        /* Paginator: one integrated block « ‹ 1–100 of 824 › » on the right in the bar */
        /* Datatable footer (§datatable-frame): sticks (on both axes) at the bottom; rows-per-page +
           count on the left, the pager on the right. That keeps navigation + count always in view, also when scrolling. */
        /* `main` scrolls with padding, and a sticky box stops that padding short of the edge:
           with `bottom: 0` the rows ran on under the footer and showed in the gap below it (a
           table in a section on a record page; JP 2026-10-27). The negative inset takes the
           padding back, as the sticky card head does at the top (narrow screens below). */
        .tablefoot { position: sticky; bottom: calc(-1 * var(--sp-4)); left: 0; z-index: 40; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--sp-1) var(--sp-3); margin-top: var(--sp-2); }
        .tablefoot .foot-left { display: flex; align-items: center; gap: var(--sp-3); }
        /* Rows-per-page sits at the bottom left → the panel opens upwards and to the right (otherwise it
           falls below/outside the viewport, or -- with `right: 0` -- to the left behind the sidebar). */
        .tablefoot .tablebutton .panel { top: auto; bottom: calc(100% + 4px); right: auto; left: 0; }
        /* Pager: bare chevron icon buttons (ghost, sprite icons), quiet; they light up on hover. */
        .paginator { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--txt-sm); white-space: nowrap; color: var(--text-soft); }
        .paginator a, .paginator .off { width: var(--control-h); height: var(--control-h); display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--border-strong); background: var(--card); text-decoration: none; color: var(--text); }
        .paginator a:hover { background: var(--surface-muted); }
        .paginator .off { opacity: 0.4; }
        .paginator svg { width: 16px; height: 16px; }
        .paginator .pagenumber { padding: 0 var(--sp-1); font-variant-numeric: tabular-nums; }
        /* Embedded ("flat") datatable in a detail card (tableframe with embedded): a short
           list that hangs off one record is not a full-height list page, so none of the three
           list stickies apply -- there is no scroll to hold headers under, and no toolbar. The
           footer also sheds its box and becomes a quiet count line. The `table.datatable`
           header rule above is (0,1,3), so the flat override doubles the class to win. */
        table.datatable.datatable--flat thead th { position: static; }
        /* With no sticky header there is nothing a scroll context can break, so an embedded
           table wider than its card scrolls sideways inside it. Without this it ran out of the
           card and over the record's side column (a person's Membership tab at 1100px; JP
           2026-10-14, "4a"). Its menus float (`position: fixed`), so the scroller clips none. */
        .tablewrap:has(> table.datatable--flat) { overflow-x: auto; }
        /* The count over an embedded table is a quiet line under the card heading, without the
           toolbar's box (the agreed visual, JP 2026-10-11, "1a 2b"): "2 results" above, "2 of 2"
           below. The flat bar is the one `.tablebar` that is a `div` and not the filter form
           (<ui.tablebar>), so the element says which it is and it needs no class of its own. */
        div.tablebar { min-height: 0; background: transparent; border: 0; padding: 0 0 var(--sp-2); }
        .tablefoot.tablefoot--flat { position: static; border: 0; background: transparent; padding: var(--sp-2) var(--sp-1) 0; margin-top: 0; }
        /* The embedded list that can be selected (decision JP 2026-10-08, "1b") wraps its flat bar
           and the bulk bar in a `.tablehead` like a list page, because the bulk bar is an overlay
           over the toolbar. Flat, so it does not stick either; `relative` (not `static`) keeps
           the overlay (`inset: 0`) inside the bar, and no margin, as the bare flat bar has none. */
        .tablehead.tablehead--flat { position: relative; top: auto; left: auto; z-index: auto; margin: 0; }
        .columnlist { max-height: 340px; overflow-y: auto; }
        /* Toasts: notices stack at the bottom centre, after Moneybird (decision JP
           2026-10-10, "2a", confirmed "1a" over the bottom-right corner of 2026-09-30).
           Colour code: green = succeeded, orange = warning, red = error; an icon in front
           repeats it for whoever does not read colour. Green goes by itself; orange and red
           stay until closed (decision JP 2026-09-17, 1a), so those two take pointer events
           for their close button while the stack itself stays click-through. */
        .toaststack { position: fixed; left: 0; right: 0; bottom: 5vh; display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); z-index: 100; pointer-events: none; padding: 0 var(--sp-4); }
        .toast { display: flex; align-items: center; gap: var(--sp-3); min-height: 2.5rem; color: var(--text-inverse); padding: var(--sp-2) var(--sp-4); border-radius: var(--radius-md); font-size: var(--txt-base); box-shadow: 0 0 0 1px var(--shadow), 0 1px 2px var(--shadow); max-width: min(40rem, 100%); overflow-wrap: anywhere; opacity: 0; transform: translateY(12px); transition: opacity 0.3s, transform 0.3s; }
        .toast.visible { opacity: 1; transform: none; }
        .toast--positive { background: var(--success); }
        .toast--neutral { background: var(--text-soft); pointer-events: auto; }  /* B9: information, dark grey with white text (JP 2026-10-21, 2a) */
        .toast--warning { background: var(--warning); pointer-events: auto; }
        .toast--negative { background: var(--danger); pointer-events: auto; }
        .toast > svg { flex: none; width: 16px; height: 16px; opacity: 0.7; }
        .toast button { flex: none; width: var(--control-h-row); height: var(--control-h-row); display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--radius-sm); background: none; color: inherit; cursor: pointer; }
        .toast button:hover { opacity: 0.75; }
        .toast button svg { width: 16px; height: 16px; }
        /* Rows-per-page option list: vertical, from top to bottom */
        .segments { display: flex; flex-direction: column; min-width: 110px; }
        .segments button, .segments a { border: 0; text-decoration: none; background: none; padding: var(--sp-1) var(--sp-2); font-size: var(--txt-base); cursor: pointer; color: var(--text); text-align: left; border-radius: var(--radius-sm); }
        .segments button:hover:not(.active), .segments a:hover:not(.active) { background: var(--brand-tint); }
        /* Export options with a file icon */
        .exportoption { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--txt-base); text-decoration: none; color: var(--text); padding: var(--sp-1) var(--sp-2); border-radius: var(--radius-sm); }
        .exportoption:hover { background: var(--brand-tint); text-decoration: none; }
        .exportoption svg { width: 16px; height: 16px; flex: none; }  /* the size of an icon in a button; without it the browser draws a sprite symbol at its default size */
        .columnrow { display: flex; gap: var(--sp-1); align-items: center; padding: 0 var(--sp-1); border-radius: var(--radius-sm); }
        .columnrow:hover { background: var(--brand-tint); }
        .columnrow button { border: 0; background: none; cursor: pointer; padding: 0 var(--sp-1); color: var(--text-soft); font-size: var(--txt-sm); line-height: var(--lh-compact); }
        .columnrow button:hover { color: var(--brand); }
        .columnrow label { display: flex; gap: var(--sp-2); margin: var(--sp-1) 0; white-space: nowrap; flex: 1; cursor: pointer; }
        .columnrow input { width: auto; }
        .optionrow { display: flex; align-items: center; gap: var(--sp-1); }
        .optionrow .optionbutton { flex: 1; }
        .columngrip { cursor: grab; color: var(--text-soft); font-size: var(--txt-xs); font-weight: 400; letter-spacing: -1px; padding: 0 var(--sp-1) 0 0; user-select: none; }
        .columnrow.dragging { opacity: 0.45; }
        .columnrow.droptarget { box-shadow: inset 0 2px 0 var(--brand-light); }
        /* A rule or component being dragged (core/static/core/reorder.js): the same look as a
           column in the chooser, a faded item and a blue line where it lands (JP 17-11-2026, "2a") */
        tr.dragging, .block.dragging { opacity: 0.45; }
        tr.droptarget[data-drop="before"] > td { box-shadow: inset 0 2px 0 var(--brand-light); }
        tr.droptarget[data-drop="after"] > td { box-shadow: inset 0 -2px 0 var(--brand-light); }
        .block.droptarget[data-drop="before"] { box-shadow: 0 -2px 0 var(--brand-light); }
        .block.droptarget[data-drop="after"] { box-shadow: 0 2px 0 var(--brand-light); }

        /* Tabs (settings and admin part) */
        /* Line tabs (§3C): underline style, calm for a data-rich record.
           One row (no wrap; NN/g: multiple rows break spatial memory);
           horizontal scrolling on a narrow screen. */
        .tabs { display: flex; gap: var(--sp-4); border-bottom: 1px solid var(--border); margin-bottom: var(--sp-4); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
        /* One gap above the tab row, whatever sits there: after a heading row that gap is the row's own margin, after a key-fields line (a record) it was nothing -- measured 17-09 by the composition walk, 0px on six record sides against 8px on nine config screens. The list card keeps its flush row (rule above). */
        .card > .tabs { margin-top: var(--sp-2); }
        .cardhead + .tabs { margin-top: 0; }
        .tabs::-webkit-scrollbar { height: 0; }
        .tabs a { flex: 0 0 auto; white-space: nowrap; padding: var(--sp-2) 0; text-decoration: none; color: var(--text-soft); font-size: var(--txt-base); border-bottom: 2px solid transparent; margin-bottom: -1px; }
        .tabs a.active { color: var(--brand); font-weight: 600; border-bottom-color: var(--brand-light); }
        .tabs a:hover:not(.active) { color: var(--brand); }

        /* Bulk action bar = overlay inside the sticky toolbar (§datatable-frame): with an active
           selection it covers the toolbar so nothing shifts (no separate row below it). */
        .actionbar { position: absolute; inset: 0; display: none; flex-wrap: wrap; gap: var(--sp-2); align-items: center; background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--sp-2) var(--sp-3); font-size: var(--txt-base); z-index: 1; }
        /* In a list the bar is the grey strip at the top of the panel, and with a selection it
           stays that strip (the agreed visual, JP 2026-10-11, "1a 2b"): same colour, same line,
           same padding as `.card--list .tablebar`. */
        .card--list .actionbar { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: var(--sp-2) var(--sp-4); }
        .tablehead[data-selection] .actionbar { display: flex; }
        .tablehead[data-selection] .tablebar { visibility: hidden; }
        .actionbar .counter { color: var(--text); white-space: nowrap; }
        .actionbar .bar-right { margin-left: auto; display: flex; gap: var(--sp-2); align-items: center; }
        /* The actions are an icon with their label, as in a page heading (decision JP
           2026-09-30, "6a"): the same height as the icon buttons beside them and on one line. */
        .actionbar .button:not(.button--icon) { height: var(--control-h); display: inline-flex; align-items: center; gap: var(--sp-2); white-space: nowrap; }
        /* "Select all 143": a quiet text button beside the count, since it acts on the
           selection and not on the members. In the link colour without a line, as in the agreed
           visual (JP 2026-10-11, "1a 2b"): the bar is the grey strip now, no longer the brand
           tint on which the link colour of a club dropped below AA. */
        .actionbar .select-all { border: 0; background: none; padding: 0; font: inherit; color: var(--brand-action); cursor: pointer; white-space: nowrap; }
        .actionbar .select-all:hover { text-decoration: underline; }
        /* Actions menu inside the action bar: reuses the ⋮ rowmenu (positioning + closing
           in the base.html JS), but with a label trigger instead of the bare ⋮ circle. */
        /* Bulk action menu = the ⋮ of the three-dot rule (principle 9): what does not fit in view,
           and a dangerous action always. The same size as an icon button (.button--icon, 1.9rem). */
        /* The bulk menu carries `.rowmenu` for its behaviour but sits in the toolbar, not in
           a row -- so it takes the standing size and not the row size. */
        /* Not a menu opened by a button with a label (<c-ui.filechoice>): that summary keeps the
           padding of a button, or "Attach" in a card head stood without it (UX inventory 02-11-2026). */
        .rowmenu.bulkmenu > summary, .cardhead .rowmenu > summary:not(.button) { width: var(--control-h); height: var(--control-h); padding: 0; border-radius: var(--radius-md); border: 1px solid var(--border-strong); background: var(--card); color: var(--text-soft); }
        .rowmenu.bulkmenu > summary:hover, .rowmenu.bulkmenu[open] > summary, .cardhead .rowmenu > summary:not(.button):hover, .cardhead .rowmenu[open] > summary:not(.button) { border-color: var(--brand-light); background: var(--card); color: var(--text); }
        .rowmenu.bulkmenu > summary svg, .cardhead .rowmenu > summary:not(.button) svg { width: 16px; height: 16px; }
        /* Parameter dialog for bulk actions that need input (e.g. membership type + date). The
           fields belong to the list form via form=, so submitting sends the whole selection. */
        /* Same flat styling as #confirmdialog: one padded surface, no header border or tinted
           footer bar -- that makes both dialogs one component family (2026-07-30). */
        /* Every <dialog> takes its text colour and its surface from this one rule, and from
           nowhere else (2026-09-23, JP: one owner, so a colour a club chooses later reaches
           every dialog the same way). A dialog is not a normal descendant: the browser's own
           stylesheet gives it `color: CanvasText` on `Canvas`, so it does not inherit `body`'s
           colour and its text came out black -- the heading here measured rgb(0,0,0) against
           `--text` on every other screen (2026-08-19), and so did the question in
           #confirmdialog and the heading of the re-verify dialog. Each had been given its own
           `color` or none at all. An element rule and not a class, because a dialog that
           forgets a class would be black again. */
        /* And the frame, from the same rule (2026-09-23, JP): no border, the large radius, one
           padded surface with its shadow, and the grey scrim behind it. The confirmation
           dialog, this parameter dialog and the re-verify dialog each carried a copy of these
           five values, word for word, so a change to one would have left two dialogs looking
           different. Its width comes from one of the two width classes below (.dialog-narrow,
           .dialog-wide), after what it holds: a question or a form. */
        dialog { color: var(--text); background: var(--card); border: 0; border-radius: var(--radius-lg); padding: var(--sp-4) var(--sp-5); box-shadow: 0 10px 34px var(--shadow-strong); }
        dialog::backdrop { background: var(--scrim); }
        /* A window over the page that is not modal (`core/static/core/shell/overlay.js`, the login
           window and the side panel, decision JP 2026-11-06, "1a"): it stands where a modal
           dialog stands, in the middle of the screen, and the scrim before it is the modal
           dialog's backdrop. The side panel sets its own place below. The layer of both is set
           by the script. */
        dialog[data-overlay]:not(.side-panel) { position: fixed; inset: 0; margin: auto; max-width: calc(100% - 6px - 2em); max-height: calc(100% - 6px - 2em); overflow: auto; }
        [data-overlay-scrim] { position: fixed; inset: 0; background: var(--scrim); }
        /* A dialog opened in the page rather than over it (`show()`, not `showModal()`) is the
           page's card: the sign-in page's login window. It takes a card's frame, a thin line and
           no shadow, and the auth card's room inside (the Moneybird login, decision JP
           2026-10-13, "4a"). */
        dialog:not(:modal, [data-overlay]) { border: 1px solid var(--border); box-shadow: none; padding: var(--sp-6); }
        /* A dialog's heading and its question stand left, its buttons bottom right with the
           main one last, in every dialog alike (UX standard v2, rule A8, decision JP 2026-10-19
           "7a"; from 2026-10-06 to that day they stood centred). */
        dialog h2 { text-align: left; }
        /* A centred dialog moves by its heading (core/static/core/shell/dialogdrag.js, decision
           JP 2026-10-22, "2a"). A side panel stays at its edge, and up to 800px nothing moves,
           so neither shows the move cursor. While it is dragged, nothing is selected. A heading
           that shares its row with a control makes the whole row the head; the control keeps
           its own cursor (the same list as `dialogHead` in dialogdrag.js). */
        dialog:is(:modal, [data-overlay]):not(.side-panel) :is(h2, :is(.row-between, .cardhead):has(> h2)) { cursor: move; }
        dialog:is(:modal, [data-overlay]):not(.side-panel) :is(.row-between, .cardhead):has(> h2) :is(a, button, input, select, textarea, label) { cursor: auto; }
        dialog[data-dragging] { user-select: none; }
        @media (max-width: 800px) {
            dialog:is(:modal, [data-overlay]):not(.side-panel) :is(h2, :is(.row-between, .cardhead):has(> h2)) { cursor: auto; }
        }
        /* "or" between two ways in, on the auth card (shell proposal point 12, JP 2026-10-10): a
           line, the word, a line. Only the layout: it goes together with `.hint`, which owns
           the soft small text, so the word looks like every other hint. The word is the
           paragraph's text, so it is translated where it is written. */
        .or-divider { display: flex; align-items: center; gap: var(--sp-3); margin: var(--sp-4) 0; }
        .or-divider::before, .or-divider::after { content: ""; flex: 1 1 0; border-top: 1px solid var(--border); }
        /* The club's logo above the title of a login screen. No panel: the logo stands loose on the
           calm page background (decision JP 2026-11-01, "1c"). */
        .auth-logo { display: inline-flex; margin: 0 0 var(--sp-4); }
        .auth-logo img { display: block; max-height: 64px; max-width: 240px; width: auto; height: auto; }
        /* The login screen (<c-layout.authpage>) and the login window (<c-shell.logindialog>);
           their rules stood in a <style> block of each template until spec contradiction 3
           (decision JP 2026-10-21, "3a": all styling in this file). A button on the card of a
           login screen spans the card (rule A10), the main one first and the second white
           under it. */
        :is(#sign-in-backdrop, #auth-backdrop) .card .button:not(.button--icon) { display: flex; width: 100%; justify-content: center; }
        /* Variant B of the screen comparison, screen 20 (decision JP 2026-11-01, "1a"): a calm
           middle on the page background, the logo and the club's name above the card, in place of
           the club colour that filled the page since shell proposal point 12 (2026-10-10). The
           club colour stays where the club is at work: the top bar and the sidebar. */
        #sign-in-backdrop, #auth-backdrop { position: fixed; inset: 0; overflow: auto; background: var(--bg); padding: calc(2 * var(--sp-6)) var(--sp-4) var(--sp-6); text-align: center; }
        #sign-in-backdrop > h1, #auth-backdrop > h1 { color: var(--text); margin: 0 0 var(--sp-6); }
        #sign-in-backdrop > .card, #auth-backdrop > .card { text-align: start; padding: var(--sp-6); border: 1px solid var(--border); box-shadow: none; }
        #sign-in-backdrop > .card > p, #auth-backdrop > .card > p { text-align: center; }
        #sign-in-backdrop > .card > :first-child, #auth-backdrop > .card > :first-child { margin-top: 0; }
        #sign-in-backdrop > .card > :last-child, #auth-backdrop > .card > :last-child { margin-bottom: 0; }
        #auth-backdrop > .card a:not(.button), #sign-in-fallback a:not(.button) { text-decoration: none; }
        #auth-backdrop > .card a:not(.button):hover, #sign-in-fallback a:not(.button):hover { text-decoration: underline; }
        #auth-backdrop > .card a:not(.button), #sign-in-fallback a:not(.button) { font-size: var(--txt-sm); }
        #auth-backdrop > .card > p.hint { margin-bottom: var(--sp-5); }
        :is(#auth-backdrop > .card, #sign-in-fallback) form > p { margin-bottom: var(--sp-4); }
        :is(#auth-backdrop > .card, #sign-in-fallback) form > p:has(+ .button, + p > .button:first-child) { margin-bottom: var(--sp-2); }
        /* The fallback card of a login in the window is the same card (UX inventory 26-10-2026:
           its buttons stood against each other). */
        :is(#auth-backdrop > .card, #sign-in-fallback) .button + .button { margin-top: var(--sp-2); }
        #auth-backdrop > .card > hr, #sign-in-fallback > hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-5) 0 var(--sp-4); }
        html:has(#sign-in-backdrop) #login-dialog h2 { text-align: start; margin-bottom: var(--sp-4); }
        html[data-framed] body, html[data-framed] #auth-backdrop { background: var(--card); }
        html[data-framed] body { display: block; height: auto; overflow: visible; }
        html[data-framed] main { padding: 0; overflow: visible; }
        html[data-framed] #auth-backdrop { position: static; padding: 0; }
        html[data-framed] #auth-backdrop > .auth-logo { display: none; }
        html[data-framed] #auth-backdrop > h1 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
        html[data-framed] #auth-backdrop > .card { max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
        /* Heading and lead left, 16px under the heading, over an app screen as on the sign-in
           page (decision JP 2026-10-31, "2a"). */
        #login-dialog h2 { margin: 0 0 var(--sp-4); }
        #login-lead { margin: 0 0 var(--sp-4); }
        #login-lead:empty { display: none; }
        #login-frame { display: block; width: 100%; height: min(600px, 70vh); max-height: 70vh; border: 0; }
        #login-error { margin: var(--sp-2) 0 0; }
        #login-error:empty { display: none; }
        /* The two dialog widths of rule B5 (decision JP 2026-10-19, "8a"): narrow for a question,
           wide for a form. A dialog takes its width from one of these two classes and from nowhere
           else, so that no dialog drifts from them (decision JP 2026-10-22, "6c"). The login
           dialog is narrow: as wide as the login card, over a page too (JP 2026-10-19, topic 11). */
        .dialog-narrow { width: min(var(--w-sm), 94vw); }
        .dialog-wide { width: min(720px, 94vw); }
        /* A dialog with a table, such as the member list a draft mailing picks its recipients
           from: the full window less a 16px edge, in width and in height (decision JP
           2026-11-09, "1b"). A frame in it (`.mail-frame`) fills what the title leaves. Only
           an open one is a column: a closed dialog must keep the browser's display: none. */
        .dialog-table { width: calc(100vw - 2 * var(--sp-4)); max-width: none; }
        .dialog-table[open], dialog[data-overlay].dialog-table[open] { display: flex; flex-direction: column; height: calc(100vh - 2 * var(--sp-4)); max-width: none; max-height: none; }
        .dialog-table .mail-frame { flex: 1; height: auto; min-height: 0; border: 0; }  /* the page in it has no edge of its own either (`chrome="frame"`) */
        .paramdialog h2 { margin: 0 0 var(--sp-4); }
        .paramdialog .dlg-body { display: flex; flex-direction: column; gap: var(--sp-3); }
        .paramdialog .paramfield { display: flex; flex-direction: column; gap: var(--sp-1); }
        .paramdialog .paramfield input, .paramdialog .paramfield select { width: 100%; }
        /* The button row at the foot of a dialog, shared by every dialog (2026-10-06): until
           then the confirmation and the login dialog each wrote the same values in their own
           `<style>` block. Right, with the main button last (rule A8, JP 2026-10-19); the side
           panel puts its buttons in the same row (rule A9). */
        .dlg-foot { margin-top: var(--sp-4); display: flex; justify-content: flex-end; gap: var(--sp-2); }
        .dlg-foot .button:not(.button--icon) { display: inline-flex; align-items: center; gap: var(--sp-2); }  /* icon apart from its label, as in a card head */
        /* The confirmation dialog of principle 2 (<c-shell.confirmdialog>): one question, two
           buttons. Narrow, as a question (`.dialog-narrow`); wide with a third button. */
        .confirmdialog p { margin: 0; text-align: left; }
        /* What confirm_choice lists under the question (the housemates of a move) and the one
           sentence after it (2026-10-24). */
        .confirmdialog ul { margin: var(--sp-2) 0 0; padding-left: var(--sp-4); }
        .confirmdialog [data-confirm-note] { margin-top: var(--sp-3); }
        /* The side panel (<c-ui.sidepanel>, JP 2026-10-07): a short form that slides in from the
           right over the screen. It floats a step clear of the window's edges, so it takes the
           shell's `dialog` rule whole -- surface, corners, padding, shadow and scrim -- and sets
           only its place, its motion and a head and body of its own. Open is the browser's
           [open], closing is [data-closing] (set by `core/static/core/shell/sidepanel.js`), so
           no class is written from JavaScript. The general reduced-motion rule above stills
           both slides. It opens in 140ms and closes in 120ms (UX v3, "13a"). Up to 800px it
           takes the whole width. */
        .side-panel { position: fixed; inset: var(--sp-2) var(--sp-2) var(--sp-2) auto; margin: 0; width: min(480px, calc(100vw - 2 * var(--sp-2))); max-width: none; height: auto; max-height: none; flex-direction: column; gap: var(--sp-4); overflow: hidden; }
        .side-panel[open] { display: flex; animation: side-panel-in var(--motion-open) cubic-bezier(0.22, 1, 0.36, 1); }
        .side-panel[data-closing] { animation: side-panel-out var(--motion-change) cubic-bezier(0.4, 0, 1, 1) forwards; }
        .side-panel[open]::backdrop { backdrop-filter: blur(3px); animation: side-panel-scrim-in var(--motion-open) ease-out; }
        .side-panel[data-closing]::backdrop { animation: side-panel-scrim-out var(--motion-change) ease-in forwards; }
        /* The same for the scrim of a side panel that opens without being modal (overlay.js). */
        [data-overlay-scrim]:has(+ .side-panel[open]) { backdrop-filter: blur(3px); animation: side-panel-scrim-in var(--motion-open) ease-out; }
        [data-overlay-scrim]:has(+ .side-panel[data-closing]) { animation: side-panel-scrim-out var(--motion-change) ease-in forwards; }
        @keyframes side-panel-in { from { transform: translateX(calc(100% + var(--sp-2))); } to { transform: translateX(0); } }
        @keyframes side-panel-out { from { transform: translateX(0); } to { transform: translateX(calc(100% + var(--sp-2))); } }
        @keyframes side-panel-scrim-in { from { opacity: 0; } to { opacity: 1; } }
        @keyframes side-panel-scrim-out { from { opacity: 1; } to { opacity: 0; } }
        .side-panel-head { display: flex; align-items: center; gap: var(--sp-2); padding-bottom: var(--sp-3); border-bottom: 1px solid var(--border); }
        .side-panel-head h2 { margin: 0; flex: 1; text-align: left; }
        .side-panel-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: var(--sp-4); }
        .side-panel[aria-busy="true"] .side-panel-body { opacity: 0.6; transition: opacity 0.2s; }
        .side-panel-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-2); padding-block: var(--sp-6); }
        .side-panel-done > h2 { text-align: center; }  /* the finished state stays centred; `dialog h2` puts a heading left */
        .side-panel > .dlg-foot { margin-top: 0; }  /* the panel's own gap already parts it from the body */
        /* The foot of an action screen (<c-layout.actionpage>) keeps its button in view (principle 9,
           "a foot keeps its button in view"): on a long form it sticks to the bottom of the window. It
           reaches over the card's padding with the card's own ground, so the fields scroll under it. */
        .card > footer.dlg-foot { position: sticky; bottom: 0; z-index: 1; margin: var(--sp-4) calc(-1 * var(--sp-3)) calc(-1 * var(--sp-3)); padding: var(--sp-3); background: var(--card); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
        .side-panel-done h2 { margin: 0; }
        .side-panel-done p { margin: 0; max-width: 32ch; }
        .side-panel-done-mark { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius-pill); background: var(--success-tint); animation: side-panel-mark 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) 0.08s both; }
        .side-panel-done-mark svg { width: 16px; height: 16px; color: var(--success); }
        @keyframes side-panel-mark { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
        @media (max-width: 800px) {
            .side-panel { width: calc(100vw - 2 * var(--sp-2)); }
        }
        /* The wide side panel (<c-ui.sidepanel wide>, the help, JP 2026-10-09 "1a"): reading
           rather than a short form, so about twice as wide. An attribute like [data-closing];
           up to 800px the rule above already gives every panel the whole width. */
        .side-panel[data-side-panel-wide] { width: min(900px, calc(100vw - 2 * var(--sp-2))); }
        .side-panel[data-side-panel-wide="table"] { width: min(1200px, calc(100vw - 2 * var(--sp-2))); }  /* a panel with a table (JP 2026-10-28, "2a") */
        /* The panel as wide as the screen (the import row, JP 2026-10-28, "2c"): its left edge
           stands 64px right of the sidebar, so the list behind it stays in view, and it grows
           with the screen. The sidebar is `--side-w`, collapsed 64px: the columns of the body grid,
           which `core/tests_cotton.py` holds this rule to. Up to 800px the sidebar is a drawer
           and the rule above gives the panel the whole width. */
        @media not all and (max-width: 800px) {
            .side-panel[data-side-panel-wide="screen"] { left: calc(var(--side-w) + 64px); width: auto; }
            html[data-sidebar="collapsed"] .side-panel[data-side-panel-wide="screen"] { left: calc(64px + 64px); }
        }
        /* The manual scrolls each column on its own, so the body around it does not. Other
           wide content keeps the body's own scroll. */
        .side-panel[data-side-panel-wide] .side-panel-body:has(> .manual) { overflow: hidden; }
        /* <c-ui.manual>: the contents and the search on the left, the article on the right.
           In the panel each column scrolls on its own, so the contents stay in view while the
           article is read; on the page of the separate window the page scrolls. The window
           opens 760px wide, so the columns stay side by side down to 640px and only stack
           below it, the contents first. Left-aligned: the shell centres a dialog's text. */
        .manual { flex: 1; min-height: 0; text-align: left; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--sp-4); }
        .manual-contents { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-1) var(--sp-3) var(--sp-1) var(--sp-1); border-right: 1px solid var(--border); }
        .manual-contents input[type=search] { width: 100%; }
        .manual-contents h4 { margin: var(--sp-2) 0 0; }
        .manual-contents ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
        /* A chapter that folds (`collapsed`): the heading is the handle, with the chevron of the
           sidebar groups in front of it. */
        .manual-chapter > summary { list-style: none; display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-1) var(--sp-2) var(--sp-1) 0; cursor: pointer; }
        .manual-chapter > summary::-webkit-details-marker { display: none; }
        .manual-chapter > summary::before {
            content: ""; width: 0.72em; height: 0.72em; flex: none; opacity: 0.7; background-color: currentColor;
            -webkit-mask: var(--chev-right) center / contain no-repeat; mask: var(--chev-right) center / contain no-repeat; }
        .manual-chapter[open] > summary::before { -webkit-mask-image: var(--chev-down); mask-image: var(--chev-down); }
        .manual-chapter > summary > h4 { margin: 0; }
        .manual-chapter > ul { padding-left: var(--sp-3); }
        .manual-contents a { display: flex; flex-direction: column; padding: var(--sp-1) var(--sp-2); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
        .manual-contents a:hover, .manual-contents a:focus-visible { background: var(--brand-tint); }
        .manual-contents a[aria-current="page"] { background: var(--brand-tint); box-shadow: inset 3px 0 0 var(--brand); font-weight: 600; }
        .manual-article { min-width: 0; min-height: 0; overflow-y: auto; line-height: var(--lh-text); }
        .manual-article > h2:first-of-type { margin-top: 0; }
        /* A form in the right column (the ticket beside the contents) spaces its parts like the
           body of a narrow panel does. */
        div.manual-article { display: flex; flex-direction: column; gap: var(--sp-4); }
        div.manual-article > h2 { margin: 0; }
        .manual-article img { max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
        .manual-article table { display: block; overflow-x: auto; border-collapse: collapse; }
        .manual-article th, .manual-article td { padding: var(--sp-1) var(--sp-2); border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
        @media (max-width: 640px) {
            .manual { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
            .manual-contents { max-height: 40vh; padding-right: var(--sp-1); padding-bottom: var(--sp-3); border-right: 0; border-bottom: 1px solid var(--border); }
        }
        /* The preview of an automatic e-mail (decision JP 21-10-2026, "1a"): a dialog over the
           screen as wide as the mail (.dialog-wide), the language picker in its head, the mail in its frame. */
        .mail-preview { max-height: calc(100vh - 2 * var(--sp-4)); text-align: left; }
        .mail-preview[open] { display: flex; flex-direction: column; gap: var(--sp-2); }
        .mail-preview h2, .mail-preview p { margin: 0; }
        /* While the screenshot is taken (capture.js), an open side panel steps aside, scrim
           and all: the picture is of the screen underneath, not of the ticket form. */
        .side-panel[data-side-panel-aside], .side-panel[data-side-panel-aside]::backdrop, [data-overlay-scrim]:has(+ .side-panel[data-side-panel-aside]) { visibility: hidden; }
        /* <c-shell.capture>: the editor of the ticket form's screenshot. As large as the
           window allows, the picture scaled into it; a drag on the picture frames or blacks
           out, hence the crosshair. The tool that is on shows as pressed (`aria-pressed`). */
        .capture-editor { width: min(var(--w-xl), calc(100vw - 2 * var(--sp-2))); max-height: calc(100vh - 2 * var(--sp-2)); display: flex; flex-direction: column; gap: var(--sp-2); text-align: left; }
        .capture-editor:not([open]) { display: none; }
        .capture-editor h2 { text-align: left; }
        /* The dialog spaces its parts with its own gap, so a hint inside adds nothing. */
        .capture-editor .hint { margin: 0; }
        .capture-stage { min-height: 0; flex: 1; display: flex; justify-content: center; overflow: hidden; }
        .capture-stage canvas { max-width: 100%; max-height: 65vh; width: auto; height: auto; object-fit: contain; cursor: crosshair; touch-action: none; border: 1px solid var(--border); border-radius: var(--radius-sm); }
        /* Structural columns: [selection] at the front, [actions] at the end. Both sticky,
           so they stay in view while scrolling horizontally, with an opaque background so
           nothing shows through underneath. */
        /* The selection column has a fixed width via min=max (content-independent, also in
           table-layout:auto) and zero side padding, so it is exactly 2rem and no data column
           disappears under it. The table.datatable prefix carries enough weight to override
           the generic `thead th { position: relative }` (resize handle context) -- otherwise
           the head was shifted relatively instead of sticky. */
        table.datatable td.selectcolumn, table.datatable th.selectcolumn {
            box-sizing: border-box; width: 2rem; min-width: 2rem; max-width: 2rem;
            padding-left: 0; padding-right: 0; text-align: center; cursor: pointer;
            position: sticky; left: 0; z-index: 2; background: var(--card); }
        /* The action column stands at the end of the row (decision JP 2026-10-03, 1a; rule 9 in
           cotton_conventies: a button stands at the end of what it works on), sticky on the right
           so a wide table keeps it in view. It holds the menu and nothing else (UX standard v2,
           rule A6), so it keeps the menu's 2rem, the same as the selection column. */
        table.datatable td.actioncolumn, table.datatable th.actioncolumn {
            box-sizing: border-box; width: 2rem; min-width: 2rem; max-width: 2rem;
            padding-left: 0; padding-right: 0; text-align: center;
            position: sticky; right: 0; z-index: 2; background: var(--card); }
        /* The name column stays in view too (UX v3, decision JP 2026-11-11, "26a"): right of the
           selection column, or at the edge in a table without one, with a line and a soft
           shadow at its right edge so the columns that pass under it read as passing under. */
        table.datatable [data-anchor] { position: sticky; left: 0; z-index: 2; background: var(--card);
            box-shadow: inset -1px 0 0 var(--border), 6px 0 6px -6px var(--shadow); }
        table.datatable:has(.selectcolumn) [data-anchor] { left: 2rem; }
        table.datatable thead th[data-anchor] { z-index: 4; }
        @media not all and (max-width: 640px) {
            table.datatable tbody tr:hover td[data-anchor] { background: var(--row-hover); }
            table.datatable tbody tr[data-href]:is(:hover, :focus-visible) td[data-anchor] { background: var(--brand-tint); }
        }
        /* A sticky cell with a z-index is a stacking context of its own, so the open menu's
           floating panel only competes inside its cell, and the cell of the next row (later in
           the document, same z-index) was painted over it (2026-10-06). The row whose menu is
           open lifts its cell above the others and above the sticky head (3/4). Measured in
           core/tests_shell_layers.py. */
        table.datatable td.actioncolumn:has(.rowmenu[open]) { z-index: 5; }
        table.datatable td.actioncolumn > * { display: inline-flex; vertical-align: middle; }
        /* Every icon button in a table cell has the row's size, also in a table that is not a
           datatable (roles, the clock's jobs): one row button, one size. */
        td .button--icon { width: var(--control-h-row); height: var(--control-h-row); }
        td .button--icon svg { width: 16px; height: 16px; }
        /* Opaque, and in the colour of the row they sit in (2026-10-02). The head is white since
           point 5 (2026-10-10), which the base rule of these columns already gives; only the
           hover still needs carrying over. Above the 640px card layout only: below it a row is
           a card. */
        @media not all and (max-width: 640px) {
            table.datatable tbody tr:hover td.selectcolumn, table.datatable tbody tr:hover td.actioncolumn { background: var(--row-hover); }
            table.datatable tbody tr[data-href]:is(:hover, :focus-visible) td.selectcolumn, table.datatable tbody tr[data-href]:is(:hover, :focus-visible) td.actioncolumn { background: var(--brand-tint); }
        }
        /* ⋮ rowmenu: floating panel (position: fixed, placed in JS) so the
           overflow of the tablewrap does not clip it -- same approach as the headerfilter. A
           floating panel (this one, the headerfilter's, the combobox's) lies at 50: above the
           sticky table bars (40), which come later in the document and covered a heading menu
           that opened over them, and below the app header (60). */
        .rowmenu { display: inline-block; }
        /* Subtle, borderless ⋮ icon (no button look); hover gives a soft circle */
        /* The font size is the menu's own and not its surroundings': the ellipsis carries no
           text, but a summary inherits one, and in a heading that made the same control 15px
           where a table row makes it 13px (uniformity walk, 2026-09-24). */
        .rowmenu > summary, .rowmenu-empty { font-size: var(--txt-sm); list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: var(--control-h-row); height: var(--control-h-row); border-radius: var(--radius-pill); color: var(--text-soft); }
        .rowmenu > summary svg, .rowmenu-empty svg { width: 16px; height: 16px; }
        .rowmenu > summary:hover, .rowmenu[open] > summary { background: var(--surface-soft); color: var(--text); }
        .rowmenu-empty { opacity: 0.4; cursor: default; }
        .rowmenu > summary::-webkit-details-marker { display: none; }
        /* A menu opened by a button with a label (<c-ui.filechoice>, decisions JP 2026-10-21): the
           summary carries `.button.button--secondary` and keeps that look, not the ellipsis's
           round icon above. Its icons are the 16px of every button with text (B1; decision JP 2026-10-30, "2a"). */
        .rowmenu > summary.button { width: auto; height: auto; border-radius: var(--radius-md); color: var(--text); font-size: var(--txt-base); }
        .rowmenu > summary.button:hover, .rowmenu[open] > summary.button { background: var(--surface-muted); }
        /* The files chosen on the compose screen: one framed line per file, the name and its remove
           button inside, and the file choice below them as wide as the lines (decision JP
           2026-10-24, cards 49 and 51). */
        .attachment-line { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); padding: var(--sp-1) var(--sp-1) var(--sp-1) var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-soft); }
        .attachment-line + .attachment-line { margin-top: var(--sp-2); }
        .attachment-line > span { min-width: 0; overflow-wrap: anywhere; }
        [data-filechoice].full-width, [data-filechoice].full-width > .rowmenu { display: block; }
        [data-filechoice].full-width > .rowmenu > summary.button, [data-filechoice].full-width > .button { width: 100%; text-align: center; }
        .button--icon[aria-disabled="true"] { opacity: 0.4; cursor: default; }
        /* A button that switches something on and off shows "on" through `aria-pressed`: the
           capture tools, the margin switch of the invoice editor (verzoek #1500; one rule since the
           UX review of #1596). With `:hover` it outweighs the white shape and its hover. */
        .button[aria-pressed="true"], .button[aria-pressed="true"]:hover { background: var(--brand-tint); box-shadow: inset 0 0 0 2px var(--brand-light); }
        .rowmenu .panel { position: fixed; padding: var(--sp-1); z-index: 50; min-width: 180px; display: flex; flex-direction: column; }
        .rowmenu .panel form { margin: 0; }
        .rowmenu .panel a, .rowmenu .panel button, .rowmenu .panel span:not(.sr-only) { display: flex; align-items: center; gap: var(--sp-2); width: 100%; white-space: nowrap; box-sizing: border-box; font-size: var(--txt-base); text-align: left; text-decoration: none; color: var(--text); padding: var(--sp-1) var(--sp-2); border-radius: var(--radius-sm); background: none; border: 0; cursor: pointer; font-family: inherit; }
        /* An option is at least 24px high, the size WCAG 2.5.8 asks of a click target (decision
           JP 18-11-2026); the padding alone made it 22px. */
        .rowmenu .panel a, .rowmenu .panel button { min-height: 1.5rem; }
        .rowmenu .panel a:hover, .rowmenu .panel button:hover { background: var(--brand-tint); }
        .rowmenu .panel .button--danger { color: var(--danger); }
        /* A dangerous action sits at the bottom of the menu, apart from the rest (decision JP
           2026-09-24): the rule is drawn above the first one, whether it is the item itself or
           the form around it, so no screen draws it by hand. */
        .rowmenu .panel > :not(.button--danger, :has(.button--danger)) + :is(.button--danger, :has(.button--danger)) { border-top: 1px solid var(--border); margin-top: var(--sp-1); padding-top: var(--sp-1); }
        .rowmenu .panel [aria-disabled="true"] { opacity: 0.45; cursor: default; }
        .rowmenu .panel [aria-disabled="true"]:hover { background: none; }
        .rowmenu .panel svg { flex: none; width: 13px; height: 13px; }

        /* Narrow screens (tablet portrait/mobile): the sidebar becomes a collapsible top bar,
           flyouts appear below the heading instead of next to it */
        @media (max-width: 800px) {
            body { grid-template-columns: 1fr; grid-template-areas: "head" "main-content"; }
            .navbutton { display: inline-flex; }
            /* Sidebar = slide-out drawer below the header; the hamburger toggles .open.
               height:auto (instead of the inherited calc(100vh…)) lets top+bottom decide
               the height against the REAL viewport -- otherwise the drawer gets too tall on
               mobile (100vh counts the browser chrome), does not scroll and its bottom
               (Instellingen) falls away. With top/bottom + overflow-y:auto the drawer scrolls. */
            aside { position: fixed; top: var(--head-h); left: 0; bottom: 0; height: auto; width: 15rem; max-width: 80vw; transform: translateX(-100%); transition: transform 0.2s ease; z-index: 55; box-shadow: 0 6px 20px var(--shadow-strong); }
            aside.open { transform: translateX(0); }
            aside [data-sidebar-toggle] { display: none; }  /* a drawer does not collapse */
            /* The first name is the whole button since the avatar went (2026-10-10), so it
               stays on a phone too, just shorter; hidden, the button was an empty box. */
            .profile .name { max-width: 6rem; }
            main { padding: var(--sp-3); margin: 0; border-radius: 0; box-shadow: none; }  /* a phone has no frame to lie in */
            .card:not(.card--list) > .cardhead { top: calc(-1 * var(--sp-3)); }
            .tablefoot { bottom: calc(-1 * var(--sp-3)); }
            .page-head:has([form="create-form"]) { top: calc(-1 * var(--sp-3)); margin-top: calc(-1 * var(--sp-3)); padding-top: var(--sp-3); }
            /* A heading's buttons keep their label and stay on one line (decision JP 2026-09-24,
               "1a"), so on a narrow screen they do not fit beside the heading: they overflowed
               the card, or were cut off at the screen edge (measured 25-09 at 360 and 390px on
               the member list, the member record and a new person). The row wraps instead: when
               heading and buttons do not fit side by side, the buttons take their own line under
               the heading, still on the right, and when they do not fit on one line either they
               wrap among themselves. Where everything fits nothing moves. */
            .cardhead { flex-wrap: wrap; }
            .cardhead > :not(h1, h2, h3) { flex-wrap: wrap; justify-content: flex-end; }
            /* Do not hang the header dropdowns (bell + user menu) off the button (it sits
               indented from the edge → the panel falls off screen on the left), but clamp
               them under the header across the full width with a margin. */
            .appheader .header-panel { position: fixed; top: var(--head-h); left: var(--sp-2); right: var(--sp-2); width: auto; min-width: 0; max-width: none; }
        }
        /* Responsive datatable → cards (phone). On a narrow screen every row of the
           shared datatable component folds into a card: the head disappears and
           every cell stacks with its column label in front of it (`data-label` on the <td>,
           filled from `cel.label`). Wide lists no longer run off screen. Row click
           (`data-href`), the selection checkbox and the ⋮ action menu keep working.
           Dense matrices (the permissions matrix) run on a custom template with scroll-x
           and are deliberately left out here. */
        @media (max-width: 640px) {
            /* Hide the header accessibly (each cell now carries its own label) */
            table.datatable thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
            table.datatable, table.datatable tbody, table.datatable tfoot { display: block; width: auto; }
            /* Row = card. Flex-wrap: the selection checkbox and ⋮ share the card header line
               (checkbox left, ⋮ right); the data cells each take 100% and stack below it,
               with their column label in front. */
            table.datatable tr { display: flex; flex-wrap: wrap; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); margin-bottom: var(--sp-2); padding: 0 var(--sp-3); }
            /* No hover background: the card already marks off the row */
            table.datatable tbody tr:hover td { background: transparent; }
            table.datatable td { flex: 1 1 100%; border: none; border-bottom: 1px solid var(--border); padding: var(--sp-1) 0; display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); text-align: right; }
            table.datatable tbody td { height: auto; padding-block: var(--sp-1); }
            /* Empty cell = no value: drop the whole field line (otherwise label noise on the card).
               `:empty` does not count the ::before content, so the label alone does not keep it
               "filled"; selection/action cells have a checkbox/menu and stay. */
            table.datatable td:empty { display: none; }
            table.datatable tr td:last-child { border-bottom: 0; }
            table.datatable td::before { content: attr(data-label); flex: 0 0 33%; text-align: left; color: var(--brand); font-weight: 600; font-size: var(--txt-xs); }
            /* A row with parts: on a card the first cell keeps its column label, not the arrow. */
            table.datatable tr[data-parts] > td:first-of-type::before { content: attr(data-label); width: auto; color: var(--brand); }
            /* A part is a card like its supplier: the same inset as every card's first cell. */
            table.datatable tbody tr.row-part > td:first-of-type:not(.selectcolumn), table.datatable tbody tr.row-part:not([data-parts], [data-line]) > td:first-of-type:not(.selectcolumn), table.datatable tbody tr.row-part[data-line] > td:first-of-type:not(.selectcolumn) { padding-left: var(--sp-4); }
            /* Selection + ⋮ on the card header line: natural width, no label, no
               bottom border; the ⋮ is pushed to the right with an auto margin. */
            table.datatable td.selectcolumn, table.datatable td.actioncolumn { flex: 0 0 auto; position: static; border-bottom: 0; }
            table.datatable td[data-anchor] { position: static; box-shadow: none; }
            table.datatable td.selectcolumn::before, table.datatable td.actioncolumn::before { content: none; }
            table.datatable td.actioncolumn { margin-left: auto; }
            /* The ⋮ cell is the row's last <td>, so without an order it wrapped onto the card's
               last line instead of its header line (UX inventory 26-10, measured again 28-10). */
            /* Stretched to the header line and centred on it: the box is 16px since question 176
               (JP 2026-11-13), and a shorter cell sat lower than the menu beside it. */
            table.datatable td.selectcolumn { order: -2; align-self: stretch; align-items: center; justify-content: center; }
            table.datatable td.actioncolumn { order: -1; }
            /* Empty table: the notice at full width, without a label column, on the left */
            table.datatable tr.row-empty td { flex: 1 1 100%; justify-content: flex-start; text-align: left; }
            table.datatable tr.row-empty td::before { content: none; }
            /* A group heading stands above its cards, not as a card of its own: no card frame,
               the title on the left without a label column (review Arch on #2642). */
            table.datatable tbody tr.row-group { border: 0; border-radius: 0; background: transparent; padding: 0; }
            table.datatable tbody tr.row-group td { flex: 1 1 100%; justify-content: flex-start; text-align: left; padding-inline: var(--sp-3); }
            table.datatable tbody tr.row-group td::before { content: none; }
        }
        /* Touch screens: dragging (column order/width) is off, so hide the
           handles that belong to it */
        /* Desktop work (template editor, calendar planner): on small or
           touch screens replaced by a notice */
        .desktop-notice { display: none; }
        @media (max-width: 999px), (pointer: coarse) {
            .desktop-only { display: none !important; }
            .desktop-notice { display: block; }
        }
        @media (pointer: coarse) and (not (any-pointer: fine)) {
            .columnhandle, .columngrip { display: none; }
        }
        @media print { aside, .tablebar, .actionbar, .button, .paginator { display: none !important; } body { height: auto; overflow: visible; background: none; } main { padding: 0; overflow: visible; margin: 0; border-radius: 0; box-shadow: none; } }

        /* ===== DOCUMENTATION VIEWER (docs-*) =====================================
           Chrome around the documentation viewer, NOT part of the app's design
           system. Separate on purpose (agreement JP 2026-08-09): these classes are
           registered in DOCS_CLASSES, not in CLASSES, they all carry the `docs-`
           prefix, and they may only be used by the viewer templates. The guard in
           core/tests_vocabulary.py holds all three of those.

           What belongs here is the *reading environment* (navigating, finding your
           place). What a document looks like on the inside is the document's own
           business -- it carries its own house style, see
           docs/documentatiestandaard.html paragraph 4B. */
        .docs-layout { display: flex; gap: var(--sp-4); height: calc(100vh - var(--head-h) - 2*var(--sp-4)); }
        .docs-frame { flex: 1 1 auto; display: block; width: 100%; height: 100%; border: 0; }
